//jQuery Robot v.01 - Original idea, graphics, mark-up, css and clunkified js script by: Anthony Calzadilla
//jQuery robot script completely rewritten by the very generous folks at: codingcyborg.com

$(document).ready(function(){ 


				$('#cocktail').mouseover(function(){
					bounceHim();
					
				});
				
			
			
			$("#cocktail").animate({left:"15%",marginLeft:"0px"}, 3000);
	var nb=0;
		while(nb<1000){
			nb++;
			$("#large").animate({left:"960px",marginLeft:"-150px"}, 2000);	
			$("#large").animate({left:"0px",marginLeft:"-150px"}, 2000);	
			
			$("#petit").animate({left:"0px",marginLeft:"-150px"}, 1000);	
			$("#petit").animate({left:"960px",marginLeft:"-150px"}, 3000);
			
			$("#moyenne").animate({left:"960px",marginLeft:"-150px"}, 5000);	
			$("#moyenne").animate({left:"0px",marginLeft:"-150px"}, 5000);
			
			$("#moyenne1").animate({left:"0px",marginLeft:"-150px"}, 5000);	
			$("#moyenne1").animate({left:"960px",marginLeft:"-150px"}, 5000);
			

			$("#show").animate({right:"5%",marginLeft:"0px"}, 3000);
			
			
		}
		
		
		
		setTimeout("godownPhoto()",4000);
		setTimeout("godownPhoto1()",10500);
		setTimeout("godownPhoto2()",15000);
});
	var num = 1;
function startHim(){
	num++;
	$("#cocktail").animate({top:"-=5px"},150).animate({top:"+=5px"},150);
	$("#moyenne,#large").animate({top:"-="+num+"px"},150).animate({top:"+="+num+"px"},150);
	if(num<4){
		setTimeout("startHim()",300);
	} else {
		setTimeout("bounceHim()",300);
	}
}
	
function bounceHim(){
	/*$("#sec-content,#large").animate({top:"-=4px"},150).animate({top:"+=4px"},150);
while(nb1<10){
nb1++;
	$("#cocktail").animate({top:"1px"},1).animate({top:"-1px"},1);
	
}*/		
		/*setTimeout("bounceHim()",0);*/
}
	
function leaveScreen(){
	$("#full-robot").animate({left:"100%",marginLeft:"0px"}, 2000);
}

function godownPhoto(){
	$("#teste1").animate({top:"140px",marginLeft:"0px"}, 2000);
	setTimeout("goupPhoto()",1000);
	}
function goupPhoto(){
	$("#teste1").animate({top:"-150px",marginLeft:"0px"}, 2000);
	}
function godownPhoto1(){
	$("#teste2").animate({top:"290px",marginLeft:"0px"}, 2000);
	setTimeout("goupPhoto1()",2000);
	}
function goupPhoto1(){
	$("#teste2").animate({top:"-150px",marginLeft:"0px"}, 2000);
	}
function godownPhoto2(){
	$("#teste3").animate({top:"446px",marginLeft:"0px"}, 2000);
	setTimeout("goupPhoto2()",2000);
	}
function goupPhoto2(){
	$("#teste3").animate({top:"-150px",marginLeft:"0px"}, 2000);
	}
