var Customers = {
	
	init: function(){
		var customers = Customers.prepare($$('#customers li'));
		
		if (customers.length == 0) return;
		
		var interval = window.setInterval(function(){
			Customers.scrollToNext();
		}, 5000);
	},
	
	scrollToNext: function(){
		$E('#customers li').tween('margin-left', [0, -160]);
		
		window.setTimeout(function(){
			Customers.prepare($E('#customers li').clone()).inject($E('#customers ul'));
			
			$E('#customers li').destroy();
		}, 1000);
	},
	
	hide: function(el){
		el.tween('top', [0, 200]);
	},
	
	prepare: function(el){
		return el.set({
			tween: {
				duration: 500,
				transition: Fx.Transitions.Sine.easeOut
			},
			styles: {
				'margin-left': 0
			}
		});
	}
	
}

window.addEvent('domready', Customers.init);