function rangeOnglet(groupe1,hauteur1,groupe2,hauteur2,groupe3,hauteur3,groupe4,hauteur4)
{
	$("#"+groupe1+" a").click(function () {
		$("div").mouseout(function(){});
		$("div").mouseover(function(){});
		
		$("#contact").animate({top:"-2500px"},700);
		$("#"+groupe2+"").animate({top:"-"+hauteur2+"px"},700);
		$("#"+groupe3+"").animate({top:"-"+hauteur3+"px"},700);
		$("#"+groupe4+"").animate({top:"-"+hauteur4+"px"},800,function(){
		
			$("#ldcconseil").animate({top:"-500px"},700);
			$("#"+groupe1+"").animate({top:"-"+hauteur1+"px"},700,function(){
				$("#blocMenu").animate({width:"0px"},1000);
				$("#blocCentral").animate({width:"502px"},1000,function(){
					document.location=$("#"+groupe1+" a")[0].href;
				});
			});
		});
		return false;
	});
}
function openTab(id,step)
{
	return;
	step=20*step;
	$("div").clearQueue();
	$("div").not(id).animate({left:"0px"},500);
	
	$(id).animate({left:step+"px"},500);
}

$(document).ready(function() {
	$(document).pngFix(); 

	$("#strateg").css("top","-500px");
	$("#profiler").css("top","-1000px");
	$("#meeteven").css("top","-1500px");
	$("#formaxiome").css("top","-2000px");
	$("#contact").css("top","-2500px");
	$("#ldcconseil").css("top","-2500px");
	$("#construction").css("top","-2500px");
	
	$("#strateg").css("left","0px");
	$("#profiler").css("left","0px");
	$("#meeteven").css("left","0px");
	$("#formaxiome").css("left","0px");
	
	$("#blocMenu").css("width","0px");
	$("#blocCentral").css("width","502px");
	
	
	//On lance l'ouverture du centre
	$("#blocMenu").animate({width:"226px"},1000);
	$("#blocCentral").animate({width:"728px"},900,
		function(){
			$("#ldcconseil").animate({top:"0px"},500);
			$("#strateg").animate({top:"0px"},1500);
			$("#profiler").animate({top:"0px"},1500);
			$("#meeteven").animate({top:"0px"},1500);
			$("#formaxiome").animate({top:"0px"},1500);
			$("#contact").animate({top:"0px"},1500);
			$("#construction").animate({top:"0px"},1500);
	
		}
	);


	$("#strateg").mouseover(function(){openTab(this,1);})
	$("#strateg").mouseout(function(){openTab("-",0);})
	
	$("#profiler").mouseover(function(){openTab(this,-1);})
	$("#profiler").mouseout(function(){openTab("-",0);})
	
	$("#meeteven").mouseover(function(){openTab(this,1);})
	$("#meeteven").mouseout(function(){openTab("-",0);})
	
	$("#formaxiome").mouseover(function(){openTab(this,-1);})
	$("#formaxiome").mouseout(function(){openTab("-",0);})

	
	rangeOnglet("strateg","500","profiler","1000","meeteven","1500","formaxiome","2000");
	rangeOnglet("profiler","1000","strateg","500","meeteven","1500","formaxiome","2000");
	rangeOnglet("meeteven","1500","strateg","500","profiler","1000","formaxiome","2000");
	rangeOnglet("formaxiome","2000","strateg","500","profiler","1000","meeteven","1500");
});