Fx.Scroll.Show = new Class({

	Extends: Fx.Scroll,

	options: {
		mode:'horizontal',
		loop:true,
		step:1,
		autoplay:false,
		childs:'ul',
		duration:1500,
		transition:'linear',
		fps:50
	},

	initialize: function(element, options){
	//	parse all options
		this.parent(element, options);
	//	duplicate the ul
		if(this.options.childs)
			var els = this.element.getElement('ul').clone();
	//	duplicate the list elements
		var cnt = 0;
		this.mix = this.element.getScroll().x;
		els.getElements('li').each(function(el){
			el.inject(this.element.getElement('ul'),'bottom');
			if(!this.target) {this.target = el;}
			cnt = cnt+1;
		},this);
		this.options.duration = this.options.duration * cnt;
	//	make the banner pause and resume
		this.element.addEvent('mouseover',this.pause.bind(this));
		this.element.addEvent('mouseout',this.resume.bind(this));
	//	start the loop
		if(this.options.autoplay)
			this.toElement(this.target);
	},

	onComplete:function(){
		this.parent();
		this.set(this.mix,this.element.getScroll().y);
		this.toElement(this.target);
	}
});
