jQuery(document).ready(function() {

//opening for all pages:
$("#title1").fadeIn(1500);

$("a")
   .filter(".pitchhide")
     .click(function(){
		$("#feature").height(20);
		$("#pitchteasertop").animate({top: 0}, 0.1);
		$("#pitchteaserbottom").animate({left: -330}, 0.1);
		$("#pitchteaserbottom").hide();
		$("#title1").fadeIn();
		$("#title2").hide();
		$("#title3").hide();
//		$("#title4").hide();
//		$("#title5").hide();
//		$("#title6").hide();
//		$("#title7").hide();
//		$("#title8").hide();
//		$("#title9").hide();
//		$("#title10").hide();
//		$("#pitchnav2").hide();
		$("#pitchnav3").hide();
		$("#pitchnav4").hide();
		$("#pitchnav5").hide();
//		$("#pitchnav6").hide();
//		$("#pitchnav7").hide();
//		$("#pitchnav8").hide();
//		$("#pitchnav9").hide();
//		$("#pitchnav10").hide();
		$("#pitchcloser").hide();
		$("#pitchslidetitles").animate({top: 28}, 0.1);
		$("#toprightcontent").animate({top: 30}, 0.1);
		$("#bottomleftcontent").animate({top: 65}, 0.1);
		$("#pitchslide1").hide();
		$("#pitchslide0").hide();
		$("#toprightcontent1").hide();
		$("#toprightcontent2").hide();
		$("#toprightcontent4").hide();
		$("#toprightcontent3").hide();
		
		$("#bottomleftcontent3").hide();
		$("#bottomleftcontent2").hide();
		$("#bottomleftcontent1").hide();
//		$("#videocontent").hide();
		
		$("#bottomleftcontent4").hide();
		
     })

  $("a")
   .filter(".pitchshow")
     .click(function(){
//       alert("showing the slideshow.");
		$("#feature").height(178);
		$("#pitchteaserbottom").show();
		$("#pitchslide1").fadeOut(500);
		$("#pitchslide0").hide();

		$("#pitchteaserbottom").animate({left: -330}, 1500);
		$("#pitchteasertop").animate({top: 0}, 1500);
		$("#pitchslidetitles").animate({top: 28}, 1500);
		$("#toprightcontent").animate({top: 30}, 1500);
		$("#bottomleftcontent").animate({top: 65}, 1500);


		$("#title3").hide();
		$("#pitchnav3").hide();
		$("#pitchnav5").hide();
		$("#pitchnav4").hide();

		$("#title1").fadeOut();
		$("#title2").fadeIn(1500);
//		$("#pitchnav2").fadeIn();
//		$("#pitchhider").fadeIn();
		$("#toprightcontent4").hide();
		$("#toprightcontent3").hide();
		
		$("#toprightcontent2").hide();
		$("#toprightcontent1").fadeIn(2000);
		$("#bottomleftcontent3").hide();
		$("#bottomleftcontent2").hide();
		$("#bottomleftcontent1").fadeIn(5000);
		$("#pitchslide0").fadeIn(5000);
//		$("#videocontent").hide();
		$("#bottomleftcontent4").hide();
		setTimeout(function() { 
					$("#pitchteaserbottom").animate({left: 0}, 1500);
					$("#pitchteasertop").animate({top: -21}, 1500);
					$("#toprightcontent").animate({top: 8}, 1500);
					$("#bottomleftcontent").animate({top: 35}, 1500);
					$("#pitchslidetitles").animate({top: 8}, 1500);
//					$("#pitchslide0").hide();
//					$("#pitchslide1").fadeIn(3000);
					$("#title2").hide();
					$("#title4").hide();
					$("#title3").fadeIn(1500);
//					$("#pitchnav2").hide();
					$("#pitchnav5").hide();
					$("#pitchnav4").hide();
					$("#pitchnav3").fadeIn(0.1);
					$("#bottomleftcontent1").hide();
					$("#bottomleftcontent3").hide();
					$("#bottomleftcontent2").fadeIn(3000);

					$("#toprightcontent1").hide();
					$("#toprightcontent3").hide();
					$("#toprightcontent4").hide();
					$("#toprightcontent2").fadeIn(2000);
					$("#videocontent").hide();
					$("#bottomleftcontent4").hide();
    	}, 7000);

		setTimeout(function() { 
			$("#pitchnav3").hide();
			$("#pitchnav5").hide();
			$("#pitchnav4").fadeIn(0.1);
			$("#pitchslide0").hide();
			$("#pitchslide1").fadeIn(3000);
			$("#toprightcontent2").hide();
			$("#toprightcontent4").hide();
			$("#toprightcontent3").fadeIn(2000);
			$("#bottomleftcontent2").hide();
			$("#bottomleftcontent3").fadeIn(3000);
			$("#bottomleftcontent4").hide();


		}, 13000);

		setTimeout(function() { 
					$("#pitchslide0").hide();
			//		$("#pitchslide1").fadeOut(3000);
					$("#pitchnav4").hide();
			//		$("#pitchnav6").hide();
					$("#pitchnav5").fadeIn(0.1);
					$("#toprightcontent3").hide();
					$("#toprightcontent4").fadeIn(2000);
					$("#bottomleftcontent3").hide();
					$("#bottomleftcontent4").fadeIn(3000);
			//		$("#videocontent").fadeIn(3000);


		}, 22000);

     })

  $("a")
   .filter(".step2")
     .click(function(){
//		alert("hiding this nav");
//       alert("moving the bottom.");
		$("#pitchteaserbottom").animate({left: 0}, 1500);
		$("#pitchteasertop").animate({top: -21}, 1500);
		$("#toprightcontent").animate({top: 8}, 1500);
		$("#bottomleftcontent").animate({top: 35}, 1500);
		$("#pitchslidetitles").animate({top: 8}, 1500);
		$("#pitchslide0").hide();
		$("#pitchslide1").fadeIn(3000);
//		$("#pitchslide1").animate({right: 80}, 500);
		$("#title2").hide();
		$("#title4").hide();
		$("#title3").fadeIn(1500);
//		$("#pitchnav2").hide();
		$("#pitchnav4").hide();
		$("#pitchnav3").fadeIn(0.1);
		$("#bottomleftcontent1").hide();
		$("#bottomleftcontent3").hide();
		$("#bottomleftcontent2").fadeIn(3000);
		
		$("#toprightcontent1").hide();
		$("#toprightcontent3").hide();
		$("#toprightcontent4").hide();
		$("#toprightcontent2").fadeIn(2000);
//		$("#videocontent").hide();
		$("#bottomleftcontent4").hide();
		
		
     })

  $("a")
   .filter(".step3")
     .click(function(){
//       alert("moving the bottom.");
//		$("#title5").hide();
//		$("#title3").hide();
//		$("#title4").fadeIn(1500);
		$("#pitchnav3").hide();
		$("#pitchnav5").hide();
		$("#pitchnav4").fadeIn(0.1);
		$("#pitchslide0").hide();
		$("#pitchslide1").fadeIn(3000);
		$("#toprightcontent2").hide();
		$("#toprightcontent4").hide();
		$("#toprightcontent3").fadeIn(2000);
		$("#bottomleftcontent2").hide();
		$("#bottomleftcontent3").fadeIn(3000);
		$("#bottomleftcontent4").hide();
//		$("#videocontent").hide();
		
		
     })

  $("a")
   .filter(".step4")
     .click(function(){
//       alert("moving the bottom.");
//		$("#title4").hide();
//		$("#title6").hide();
//		$("#title5").fadeIn(1500);
		$("#pitchslide0").hide();
//		$("#pitchslide1").fadeOut(3000);
		$("#pitchnav4").hide();
//		$("#pitchnav6").hide();
		$("#pitchnav5").fadeIn(0.1);
		$("#toprightcontent3").hide();
		$("#toprightcontent4").fadeIn(2000);
		$("#bottomleftcontent3").hide();
		$("#bottomleftcontent4").fadeIn(3000);
//		$("#videocontent").fadeIn(3000);
		
     })


	
});

