//

var Cycler = new Class({
	Extends:Tabs,
	Implements:[Options,Events],
	options: {},
	initialize: function(handles,elems,options){
		this.parent(handles,elems,options);
		this.elems[0].getParent().set('width',800);
	},
	activate:function(i){
		this.elems.setStyle('display','inline'); //Je sais pas oł le mettre...
		this.elems.fade('show'); //Je sais pas oł le mettre...
		this.timer=$clear(this.timer);
		if(i>this.handles.length-1)return this.activate(this.handles.length-1);
		this.log('Activating : '+i);
		this.handles[this.currentIndex].removeClass(this.options.activeClass);
		this.handles[i].addClass(this.options.activeClass);
		
		this.elems[i].getParent().tween('left',104-((i)*145));		
		
		this.currentIndex=i;
		this.fireEvent('onChange');
		if(this.options.useCycler)this.timer=this.next.delay(this.options.cyleTime,this);

		
	}
	
	
});
