

		
$(document).ready( function () { 
							 
							 
							 
var maxStep = Math.floor($(document).find("#menu").find("div").size() / 4);

function doSlide(speed_int){	
		//
	var thisDiv = $(document).find("#menu");
	//
	
	if(step_int>-1 && step_int < (maxStep+1)){
		var destination_int =- 954 * step_int;		
		thisDiv.animate({left:destination_int},speed_int);
		//
		$("#menu-bulle ul li ").find("*").css("background-position","0 0px");
		//
		$("#menu-bulle-"+step_int+" a").css("background-position","0 10px");
			
	}
	//
	if(step_int<0)step_int=0;
	if(step_int>maxStep)step_int=maxStep;
			
	var anchorName = "#"+(step_int);
	$(document).find("#fleche-gauche a").attr("href",anchorName);
	$(document).find("#fleche-droite a").attr("href",anchorName);
	
}					 
							 
							 
							 
							 
		var step_int = 0;
		var myFile = document.location.toString();		
		//
		if (myFile.match('#')) {  		
  			step_int = myFile.split('#')[1];
			if(step_int.length == 0)step_int = 0;
		}
		//						 
							 
		for(var i=0;i<(maxStep+1);i++){
			var anchorName = "#"+(i);			
			$(document).find("#menu-bulle-"+i+" a").attr("href",anchorName);
		}		
		
		 $("#fleche-droite a").click( function () { 		
			step_int = step_int + 1;
			doSlide();
		});	 
		 $("#fleche-gauche a").click( function () { 
			step_int = step_int - 1;	
			doSlide(200);
			
		});	

			
		$("#menu-bulle ul li div").find("a").click( function () { 
				
			var divId = $(this).parent().parent();
			var list = $(this).parents().find("#menu-bulle ul li");
			step_int = list.index(divId);
			doSlide(200);
			
		});	
		
			
		
		doSlide(0);
		
		$("#menu-bulle-"+step_int+" a").css("background-position","0 10px");
		 
		
});