window.addEvent('domready', function(){
	var tabs = document.getElements('.tab');
    var slideshow = new SlideShow(document.getElement('.tabs-wrapper'), {
    	duration: 0,
        autoplay: false,
        onShow: function(){
            tabs.filter('.active').removeClass('active');
            tabs[curIndex].addClass('active');
            tabs.getParent().set('class', 'tabs line tab-' + curIndex);
        }
    });
	
	tabs.each(function(tab, i){
		tab.addEvent('click', function(e){
			e.stop();
			curIndex = i;
			slideshow.show(i);
		});
	});
	tabs[0].addClass('active');
});
