$(document).ready(function(){
   /* PEOPLE *************************/
   $("SPAN.personred")
			.css("display", "none" );
			
   $("SPAN.personwrapper")
			  
			 .hover(
			 	function () {
					$( $(this).children()[1] ).toggle()
	            	$( $(this).children()[0] ).addClass("personred")
					$( $(this).children()[0] ).removeClass("persongrey")
	            }, function () {
				  	$( $(this).children()[1] ).toggle();
	 			  	$( $(this).children()[0] ).removeClass("personred")
				  	$( $(this).children()[0] ).addClass("persongrey")
	            });
				
	/* PROJECTS *************************/
	$("DIV.toHide")
		.css("opacity", "0" );
		
	$("SPAN.projGrey")
		.css("background", "#636363" );
		
	$("IMG" , $("#projectthumbs a:gt(0)") ).css("opacity", "0" );
	
	$("IMG" , $("a.project")).css("opacity", "0" );
		
	$("a.project")
			 .hover(
			 	function () {
					$("SPAN" , this ).css("background", "#7d0629" );
					$("IMG" , this ).stop().fadeTo("fast", 1);
	            }, function () {
				  	$("SPAN" , this ).css("background", "#636363" );
	 			  	$("IMG" , this ).stop().fadeTo("fast", 0);
				 });
				
	/* PROJECT IMAGES **********************/
	$("a.galleryItem")
		.removeAttr("href")
	
	$("a.galleryItem")
			 .hover(
			 	function () {
					$("IMG" , this ).stop().fadeTo("fast", 1);
				}, function () {
				
					var target = 'DIV#'+$(this).attr("imTarget");
					if($(target).css("opacity") != 1){
						$("IMG" , this ).stop().fadeTo("fast", 0);
					}
					
	            });
		
	$("a.galleryItem")
			 .click(
			 	function () {
					
					$("DIV.galleryImage").css("opacity", "0" );
					$("DIV.galleryImageFirst").css("opacity", "0" );
					
					$("a IMG")
						.css("opacity", "0" );
					
					var target = 'DIV#'+$(this).attr("imTarget");
					$(target).css("opacity", "1" );
					$("IMG" , this ).stop().css("opacity", "1" );
					//$(target).stop().fadeTo("slow", 1);
				
				 });		
			
	
});