// JavaScript Document
function initId(){
$( "header").animate({top:'0'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	$( "#container").animate({top:'0'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	$( "#acces").animate({height:'0', opacity:'0'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	$( "#close").animate({height:'0', opacity:'0'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	$( "#appStore").animate({height:'0', opacity:'0'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	$( "#close2").animate({height:'0', opacity:'0'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	$( "#mdp_oublie").animate({height:'0', opacity:0}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
}

$(function() {
	$( "#go1" ).click();
});
$( "#go1" ).click(function(){
	initId();		
  $( "#triangle_historique" ).animate({ opacity:1, top:'274'}, { queue: false, duration: 500});
  /**/
  $( "#triangle_pole" ).animate({ opacity:1, top:'255'}, {queue: false, duration: 500, complete: Effet2});
  /**/
  function Effet2(){
	   $( "#backHistorique" ).animate({width:'340', height:'185',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	   $( "#backActivite" ).animate({ width:'897','z-index':'2',/*width:'535',*/ height:'140', opacity:1}, 
	   {queue: false, duration: 500, specialEasing:'easeOutBounce', complete:Effet3});
  }
  function Effet3(){
	  $( "#societe h1" ).animate({left:'940', top:'142',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	  $( "#dix" ).animate({left:'1310', top:'145',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
  
  	  $( "#collaborateurs" ).animate({left:'1320', top:'230',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete:Effet4});
  }
  function Effet4(){
	  $( "#backNumber").animate({left:'855', top:'295',opacity:1}, {queue: false, duration: 300, specialEasing:'easeOutBounce'});
	  $( "#number_societe").animate({left:'876', top:'289',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
  	  $( "#trois" ).animate({top:'358', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
  	  $( "#pole" ).animate({top:'378', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete:Effet5});
  }
  function Effet5(){
	  $( "#graph" ).animate({opacity:1}, {queue: '1', duration: 500, specialEasing:'easeOutBounce'});
	  $( "#iEco a" ).animate({width:'77', height:'77',left:'1250', top:'520',opacity:1}, {queue: '2', duration: 300, specialEasing:'easeOutBounce'});
  	  $( "#iDb a" ).animate({width:'77', height:'77',left:'1430', top:'520', opacity:1}, {queue: 3, duration: 300, specialEasing:'easeOutBounce'});
  	  $( "#iMulti a" ).animate({width:'77', height:'77',left:'1605', top:'520', opacity:1}, {queue: 4, duration: 300, specialEasing:'easeOutBounce', complete:Effet6});
  }
  function Effet6(){
	    $( "#etiquette.db, #etiquette.eco, #etiquette.multi" ).animate({opacity:1}, {queue: false, duration: 300, specialEasing:'easeOutBounce'});
		$( "#house0 h3" ).animate({width:'105', height:'20', opacity:1}, {queue: false, duration: 300, specialEasing:'easeOutBounce', complete:Effet7});
  }
  function Effet7(){
	  $("#partenaires" ).animate({ width:'360', height:'105', opacity:1}, 
	   {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	   $( "#personnages" ).animate({ left:'1390', opacity:1}, 
	   {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	  	/*$( "#backActivite" ).animate({ width:'525', height:'120', opacity:1}, 
	   {queue: false, duration: 500, specialEasing:'easeOutBounce'});*/
	  	$( "#texteHistorique p" ).animate({opacity:1, width:'100%', 'z-index':'10'}, {queue: false, duration: 300, specialEasing:'easeOutBounce'});
		$( "#partenaires p" ).animate({opacity:1, width:'100%', 'z-index':'10'}, {queue: false, duration: 300, specialEasing:'easeOutBounce'});
		$( "#texteHistorique" ).animate({opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#house0 p" ).animate({opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	    $( "#house0 h2" ).animate({opacity:1, 'z-index':'10'}, {queue: false, duration: 300, specialEasing:'easeOutBounce'});
		/*$( "article" ).animate({opacity:1}, {queue: false, duration: 300, specialEasing:'easeOutBounce'});*/
  }
});

$( "#go2" ).click(function(){
  /**/
  initId();
  $( "#backHopital" ).animate({ opacity:1, top:'458'}, {queue: false, duration: 500});
  $( "#modelisation" ).animate({ opacity:1, top:'440'}, {queue: false, duration: 500});
  $( "#triangle_modelisation" ).animate({top:'290',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
  $( "#triangle_hopital" ).animate({top:'150', opacity:1},{queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet2a});
  /**/
  function Effet2a(){
	   $( "#triangle_number" ).animate({top:'290', left:'1350',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet3a});	   
  }
  function Effet3a(){
	   $( "#domaine h1" ).animate({ opacity:1, top:'150', left:'760'}, { queue: false, duration: 500});
	   $( "#number_domaine" ).animate({top:'295', left:'1365', opacity:1}, 
	   {queue: false, duration: 500, specialEasing:'easeOutBounce', complete:Effet4a});
  }
  function Effet4a(){
	   $( "#modelisation h2" ).animate({'margin-top':'0', opacity:1}, { queue: false, duration: 500});
	   $( "#modelisation p" ).animate({'margin-top':'0', opacity:1}, { queue: false, duration: 500});
	   $( "#texteHopital" ).animate({opacity:1, top:'370'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
  }
});
/*#i1, #i4, #i6{
right:335px;
}
#i2, #i5{
	right:565px;
}
#i3{
	right:795px;
	}
*/
$( "#go3" ).click(function(){
	initId();
	$( "#triangle_clients" ).animate({top:'110',left:'815',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet2b});
	
	function Effet2b(){
		$( "#i1").animate({right:'815',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#i4").animate({right:'815',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#i6").animate({right:'815',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#clients h1").animate({top:'548', left:'810',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	   $( "#clients h2" ).animate({top:'160',left:'1220',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet3b});
  }
  function Effet3b(){
	  $( "#i2").animate({right:'1045',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	  $( "#i5").animate({right:'1045',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#carre_number").animate({top:'132', left:'1250',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet4b});
  }
  function Effet4b(){
	  $( "#i3").animate({right:'1275',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	  $( "#prev").animate({top:'420',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'}); 
	  $( "#next").animate({top:'450',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'}); 
		$( "#texteClient").animate({top:'150', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#client_number").animate({left:'1325', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
  }
});

$( "#go4" ).click(function(){
	initId();
	$( "#triangle_formu" ).animate({top:'170',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	$( "#backFormu" ).animate({top:'420',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
	$( "#coordonne" ).animate({top:'237',left:'1320',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet2c});
	function Effet2c(){
		$( "#coordonne h2").animate({left:'20', top:'117',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#contact h1").animate({top:'172', left:'778',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet3c});
  }
  function Effet3c(){
		$( "#carre_num").animate({width:'170', height:'170', rotate:'+=5', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#iconSend a").animate({width:'97', height:'97',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#bandeFormu").animate({width:'350',opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet4c});
  }
  function Effet4c(){
		$( "#texteCoordonne").animate({right:'30', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#map").animate({bottom:'10', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#formContact").animate({opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce', complete: Effet4c});
		$( "#number").animate({opacity:1, 'margin-top':'65', 'margin-left':'75'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
  }
});
$( "#go5" ).click(function(){
		$( "header").animate({top:'400'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#container").animate({top:'400'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#acces").animate({height:'400', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#close").animate({height:'65', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
});
$( "#go6" ).click(function(){
	initId();
});
$( "#go8" ).click(function(){
	initId();
});
$( "#go7" ).click(function(){
		$( "header").animate({top:'400'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#container").animate({top:'400'}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#appStore").animate({height:'400', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
		$( "#close2").animate({height:'65', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
});
$( "#mdp_f" ).click(function(){
		$( "#mdp_oublie").animate({height:'100', opacity:1}, {queue: false, duration: 500, specialEasing:'easeOutBounce'});
});
