
	
jQuery(function(){

	Cufon.replace('h1')('h2')('.hero-discipline li span')('blockquote');
		
	/* jQuery('ul.sf-menu').superfish({
		autoArrows:  false,
		dropShadows: false
	});*/

	$('#linkDirectors').click(function(){ showPeople('Directors', this);return false;  });
	$('#linkClient').click(function(){ showPeople('Client', this);return false;  });
	$('#linkDesign').click(function(){ showPeople('Design', this);return false;  });
	$('#linkDigital').click(function(){ showPeople('Digital', this);return false;  });
	$('#linkArtwork').click(function(){ showPeople('Artwork', this);return false;  });
	$('#linkStrategy').click(function(){ showPeople('Strategy', this);return false;  });
	$('#linkOthers').click(function(){ showPeople('Others', this);return false;  });
	
	
	//$("img[rel]").click(function(){ overlay();return false;  });
	$("img[rel]").overlay({
		absolute: true,
		left: 581,
		top: 29
	});
	
	
	/* Clients page thumbnails */
	(function(){

		if($("body").hasClass('clients')){
			var cs_overlay = $("li[rel]").overlay({
				absolute: true,
				closeOnClick: false,
				close: "a",
				api: true,
				left: 0,
				top: 0
			});
			
			cs_overlay.onLoad(function(){

			})
		}
	}());

	
});


function showPeople(role, linkRef){
	
	peopleReset();
	
	$("#peopleULList li[class*=people"+role+"]").animate({opacity:1}, 500);
	$("#peopleULList li:not([class*=people"+role+"])").animate({opacity:0.1}, 500);	
	$("#peopleULList li").animate({g:1}, 2000).animate({opacity:1}, 1000);

}

function peopleReset(){
	//  var xx = $.tools.getOverlay();//.close();
	$("#peopleULList li").stop(true);
	$("#peopleULList li").animate({opacity:1}, 500);
}



  
