// JavaScript Document

$(document).ready(function() { 

	//BRING IN HOME PANELS
	$(".hm-panel").mouseover(function(){
		$(this).children(".hm-panel-on").fadeIn();								   
	});
	$(".hm-panel-on").mouseout(function(){
		$(this).fadeOut();								   
	});
	
	//Carousels
	$('#folio_projects').jcarousel({
        vertical: true,
        scroll: 2
    });
	
	//Thumb Mouseover effect
	/*
	
	$(".project_thumb").mouseover(function(){
		$(this).animate( {opacity: 1}, 300 );									   
	});
	$(".project_thumb").mouseout(function(){
		$(this).animate( {opacity: 0.7}, 300 );									   
	});
	*/
	$(".project_thumb").css('opacity','0.7');
	$(".project_thumb").hover(
		function(){$(this).animate( {opacity: 1}, 300 );},
		function(){$(this).animate( {opacity: 0.7}, 600 );}
	);
	
	
	//load slides based on project thumb click
	$(".project_thumb").click(function(){
		var $this = $(this);
		var idx = $this.index();
		var project_id = $(this).attr('id');
		$('#slides').animate( {opacity: 0}, 200, function(){			
			$('#slides').load('/folio/slides.cfm?project_id=' + project_id).ajaxComplete(function(){
				$('#slides').animate( {opacity: 1}, 200 );
			});											  
		});
	});
	
	
	
});

