// WORK SCRIPTS //
		
// Start jQuery


$(document).ready(function() {

/* Funciones de rollover ***********************************************/
    

	
//	$("div.portfolio-item img.hovered").hide();
//	$("div.portfolio-item").hover(function() {
//		$(this).find('img').fadeIn(200);
//	}, function() {
//		$(this).find('img.hovered').fadeOut(200);
//	});
	
	$("div.portfolio-item").click(function(){
    	window.location=$(this).find("a").attr("href");
    	return false;
	});
	$("div.blog-item").click(function(){
    	window.location=$(this).find("a").attr("href");
    	return false;
	});
	
	$('.hover').hover(function() {
	  $(this).addClass('active');
	  Cufon.replace('div.active h3');


	}, function() {
	  $(this).removeClass('active');
	  Cufon.refresh('div.portfolio-item h3');
	});
	
	/* Work slider ****************************************************************/

	$("div.imagearea").jCarouselLite({
	    btnNext: "div#screenrotator .next",
	    btnPrev: "div#screenrotator .prev",
	    visible: 1,
	    speed: 450,
	    easing: "backout"
	});
	
	/* Full excerpt on individual work page ***************************************/
	
		$.fn.fadeToggle = function(speed) {
	   return this.animate({opacity: 'toggle'}, speed);
	};
	
	$('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;
	});
}); // End jQuery

