function lunchCarousel(){

	var items = $$('#liste_carrousel div.item'); // The different elements, this is an array
	var wrapper = $('carrousel_horizontal'); // The outer wrapper
	var carousel = $('liste_carrousel'); // The inner wrapper
	var itemwidth = 202; // The full width of a single item (incl. borders, padding, etc ... if there is any)
	var maxmargin = items.length * itemwidth - itemwidth;
	carousel.setStyle("width",maxmargin);

	movenext.periodical(6000);

	var animation = new Fx.Tween(carousel, { duration: 1000,onComplete:cloneFirst});

	function movenext(){
		var position = parseInt(carousel.getStyle('left'));
		var width = parseInt(carousel.getStyle('width'));
		carousel.setStyle("width",width + itemwidth );
		animation.start('left', position-itemwidth);
	}

	function cloneFirst(){
		var first = carousel.getFirst();
		var last = carousel.getLast();
		var cloned = first.clone();
		cloned.cloneEvents(first).inject(last,'after');
		myTips.attach(cloned.getFirst());
		first.destroy();
		var position = parseInt(carousel.getStyle('left'));
		carousel.setStyle("left",position+itemwidth);
		carousel.setStyle("width",maxmargin);


	}
}

document.addEvent("domready",lunchCarousel);

