$(document).ready(function(){
	$('.email').mailto();
	$("#harttext").hide();
	$("#hart").removeClass("rodebox");
	$("#hartlijn").css("width","0px");
	
	

      	$("#outerred").animate({ 
        	height: "0px"}, 750,function() { $("#lijf").show("slow"); });
        	
 
     // Contact
     $("#contact").click(function(){
     	$("#innercontent").text("");
	 	$("#outercontent").animate({height: "98%"}, 1100).animate({height: "75%"},300).animate({height: "100%"}, 500,function() { 
	 			$("#middlecontent").css("visibility","visible"); 
	 			$("#innercontent").load("contact.html"); 
	 			if(!$.browser.msie){ $("#outercontent").css("display","table"); }
	 			else { if (parseInt($.browser.version)>7) $("#outercontent").css("display","table"); }
	 			});	
	 	pageTracker._trackPageview("/contact.html");
     }); 
     
     //gezichten
     $("#gezichten").click(function(){
     	$("#innercontent").text("");
	 	$("#outercontent").animate({height: "98%"}, 1100).animate({height: "75%"},300).animate({height: "100%"}, 500,function() { 
	 			$("#middlecontent").css("visibility","visible"); 
	 			$("#innercontent").load("contact.html"); 
	 			if(!$.browser.msie){ $("#outercontent").css("display","table"); }
	 			else { if (parseInt($.browser.version)>7) $("#outercontent").css("display","table"); }
	 			});	
	 	pageTracker._trackPageview("/contact.html");
     }); 
     
     //ondernemers
     $("#ondernemers").click(function(){
     	$("#innercontent").text("");
	 	$("#outercontent").animate({height: "98%"}, 1100).animate({height: "75%"},300).animate({height: "100%"}, 500,function() { 
	 			$("#middlecontent").css("visibility","visible"); 
	 			$("#innercontent").load("ondernemers.html"); 
	 			if(!$.browser.msie){ $("#outercontent").css("display","table"); }
	 			else { if (parseInt($.browser.version)>7) $("#outercontent").css("display","table"); }
	 			});	
	 	pageTracker._trackPageview("/ondernemers.html");
     });
     
     //partners
     $("#partners").click(function(){
     	$("#innercontent").text("");
	 	$("#outercontent").animate({height: "98%"}, 1100).animate({height: "75%"},300).animate({height: "100%"}, 500,function() { 
	 			$("#middlecontent").css("visibility","visible"); 
	 			$("#innercontent").load("ondernemers.html"); 
	 			if(!$.browser.msie){ $("#outercontent").css("display","table"); }
	 			else { if (parseInt($.browser.version)>7) $("#outercontent").css("display","table"); }
	 			});	
	 	pageTracker._trackPageview("/ondernemers.html");
     });
     
     //cases
     $("#cases").click(function(){
     	$("#innercontent").text("");
	 	$("#outercontent").animate({height: "98%"}, 1100).animate({height: "75%"},300).animate({height: "100%"}, 500,function() { 
	 			$("#middlecontent").css("visibility","visible"); 
	 			$("#innercontent").load("projecten.html"); 
	 			if(!$.browser.msie){ $("#outercontent").css("display","table"); }
	 			else { if (parseInt($.browser.version)>7) $("#outercontent").css("display","table"); }
	 			});	
	 	pageTracker._trackPageview("/projecten.html");
     });
     
     //projecten
     $("#projecten").click(function(){
     	$("#innercontent").text("");
	 	$("#outercontent").animate({height: "98%"}, 1100).animate({height: "75%"},300).animate({height: "100%"}, 500,function() { 
	 			$("#middlecontent").css("visibility","visible"); 
	 			$("#innercontent").load("projecten.html"); 
	 			if(!$.browser.msie){ $("#outercontent").css("display","table"); }
	 			else { if (parseInt($.browser.version)>7) $("#outercontent").css("display","table"); }
	 			});	
	 	pageTracker._trackPageview("/projecten.html");
     });
     
     //visie
     $("#visie").click(function(){
     	  reset();
       $(this).css('background-image','none'); 
	   $(this).addClass("rodebox");
       $("#hartlijn").animate({ 
        width: "311px"
      }, 200,function() { showRoll('#harttext'); });
     });
     
     
     $("#main").click(function(){
    	 $("#middlecontent").css("visibility","hidden");
	 	$("#outercontent").animate({height: "0px"}, 500,function() {   $("#outercontent").css("display","none");});	
     });


	$("#hart").hover(
      function () {
       reset();
       $(this).css('background-image','none'); 
	   $(this).addClass("rodebox");
       $("#hartlijn").animate({ 
        width: "311px"
      }, 200,function() { showRoll('#harttext'); });
      }, function () { }
	);

	$("#voet").hover(
      function () {
       reset();
       $(this).css('background-image','none');
	   $(this).addClass("rodebox");
       $("#voetlijn").animate({ 
        width: "159px"
      }, 200,function() { showRoll('#voettext'); });
      }, function () { }
	);
	
	$("#hand").hover(
      function () {
       reset();
       $(this).css('background-image','none');
	   $(this).addClass("rodebox");
       $("#handlijn").animate({ 
        width: "64px"
      }, 100,function() { showRoll('#handtext'); });
      }, function () { }
	);
	
		$("#kop").hover(
      function () {
       reset();
       $(this).css('background-image','none');
	   $(this).addClass("rodebox");
       $("#koplijn").animate({ 
        width: "211px"
      }, 100,function() { showRoll('#koptext'); });
      }, function () { }
	);
	
	
});

function showRoll(which) {
$(which).slideDown('fast');
return;
}

function reset() {
		  $("#hart").removeClass("rodebox");
		  $("#hart").css('background-image','url(/images/hart_wacht.gif)');
      $("#harttext").hide();
  		$("#hartlijn").css("width","0px");
  		$("#voet").removeClass("rodebox");
  		$("#voet").css('background-image','url(/images/voet_wacht.gif)');
      $("#voettext").hide();
  		$("#voetlijn").css("width","0px");
  		$("#hand").removeClass("rodebox");
  		$("#hand").css('background-image','url(/images/hand_wacht.gif)');
      $("#handtext").hide();
  		$("#handlijn").css("width","0px");
  		$("#kop").removeClass("rodebox");
  		$("#kop").css('background-image','url(/images/hand_wacht.gif)');
      $("#koptext").hide();
  		$("#koplijn").css("width","0px");
}
