// WORK SCRIPTS //
		
// Start jQuery

$(document).ready(function() {

/* Work Image - Hover qualities ***********************************************/
    
	$("div.ourwork div.casestudy:nth-child(1)").addClass("top");
	$("div.ourwork div.casestudy:nth-child(2)").addClass("top");
	$("div.ourwork div.casestudy:nth-child(3)").addClass("top");
	$("div.ourwork div.casestudy:nth-child(4)").addClass("top");
	
	$("div.casestudy img.hovered").hide();
	$("div.casestudy").hover(function() {
		$(this).find('img').fadeIn(200);
	}, function() {
		$(this).find('img.hovered').fadeOut(200);
	});
	
	$("div.casestudy").click(function(){
    	window.location=$(this).find("a").attr("href");
    	return false;
	});

/* Full client list ***********************************************************/

	$('div#clientlist').hide();
	$("a.clientlist").click(function(){
		$("div#clientlist").toggle();
		$(this).toggleClass("active");
		return false;
	});
	
	$('ul.clientcolumn li:last-child').addClass('last');
	
/* Full excerpt on individual work page ***************************************/
	
	$('div#fullworkcontent').hide();
	
	$("a.fullcontent").click(function(){
		$("div#fullworkcontent").fadeToggle(150);
		$(this).toggleClass("active");
		return false;
	});
	
	$("a.closecontent").click(function () {
		$("div#fullworkcontent").fadeToggle(150);
		return false;
	});
	

/* Work slider ****************************************************************/

	$("div.imagearea").jCarouselLite({
	    btnNext: "div#screenrotator .next",
	    btnPrev: "div#screenrotator .prev",
	    visible: 1,
	    speed: 450,
	    easing: "backout"
	});
	
/* Work navigation ************************************************************/

	$("ul.worknav li:last-child").addClass('last');
	
}); // End jQuery
