$(document).ready(function() {
	var bouton = 0;
	var speed = 300;
	var $ul = $('#moduleRome').find('ul');
	var $countLi = $('#moduleRome').find('li').length;
	var $widthLi = $('#moduleRome').find('li').outerWidth(true);
	var $calculW = $countLi * $widthLi;
	$ul.width($calculW);
	$('#moduleRome').find('.annonceFlipping').each(function() {
		$(this).css('cursor','pointer');
		$(this).hover(
		function() {
			$(this).children('.contentAnnonceFlipping').fadeIn(150);
		},
		function() {
			$(this).children('.contentAnnonceFlipping').fadeOut(150);
		});
	});
	if($countLi > 4) {
		$('#moduleRome').children('#flecheGauche').css('cursor','pointer');
		$('#moduleRome').children('#flecheGauche').click(function() {
			if(bouton == 0) {
				bouton = 1;
				var $position = $widthLi * 4;
				var $container = $('#masqueModuleRome').children('ul');
				var $ml = parseInt($container.css('margin-left'));
				if($ml == 0) {
					var $calcul = $ml-$position;
					$container.animate({marginLeft:-$calculW-$calcul},speed,function(){bouton=0;});
				} else {
					var $calcul = $ml-($position * -1);
					if($calcul > 0) {
						$calcul = 0;
					}
					$container.animate({marginLeft:$calcul},speed, function(){bouton=0;});
				}
			}
		});
		$('#moduleRome').children('#flecheDroite').css('cursor','pointer');
		$('#moduleRome').children('#flecheDroite').click(function() {
			if(bouton == 0) {
				bouton = 1;
				var $position = $widthLi * 4;
				var $container = $('#masqueModuleRome').children('ul');
				var $ml = parseInt($container.css('margin-left'));
				var $calcul = $ml-$position;
				if(($calcul * -1) == $calculW) {
					$container.animate({marginLeft:0},speed,function(){bouton=0;});
				} else {
					if(($calcul * -1) >= $calculW) {
						$calcul = 0;
					}
					$container.animate({marginLeft:$calcul},speed,function(){bouton=0;});
				}
			}
		});
	} else {
		$('#moduleRome').children('#flecheDroite').css('display','none');
		$('#moduleRome').children('#flecheGauche').css('display','none');
	}
});<!-- ID3x v4.60 (422) - X24 - 00.010.840 - none - 22/02/2012 23:37:19 - scripts\module\module_rome.js -->
