//Variable Declarations
	$(document).ready(function(){	
	
		/*---- jCarousel for Quick Projects -----*/
		$('#proj-carousel').jcarousel({
			scroll: 4,
			animation: 1000
		});
		$('.slider-with-controls .images-container').cycle({
     	    fx:     'fade', 
		    speed:  'slow', 
		    timeout: 8000,
		    pager:	'#pager',
		    next:   '.next', 
		    prev:   '.prev'
		});
		$('.pause').click(function() { 
   			$('.slider-with-controls .images-container').cycle('pause'); 
   			return false;
		});
		$('.play').click(function() { 
   			$('.slider-with-controls .images-container').cycle('resume'); 
   			return false;
		});
	// Cycle Plugin Methods
		$('.image-slider').cycle({
			 fx:     'fade', 
		    speed:   'slow', 
		    timeout: 6000,	   
		    before:	function(){		    		// Show the desc as soon as image is shown
				//$(".desc").animate({top: 314},hideSpeed); 	//$('.desc').fadeIn(500);		
		    }
		});		
	// FANCY BOX METHODS
		$("a.visit-site").fancybox({
			'width'			:	'90%',
			'height'		: 	'90%',
			'titlePosition'	: 	'inside',
			'transitionIn'	:	'elastic',
			'transitionOut'	:	'elastic',
			'speedIn'		:	600, 
			'speedOut'		:	600,
			'overlayShow'	:	false,
			'autoScale'		:	false,
			'type'			:	'iframe'
		});
		
	// QUICK PROJECT HOVER EFFECT
		$('#quick-proj ul li').each(function(){
			var imgWidth = $(this).find("img").attr("width"); //Get image url and assign it to 'thumbOver'
			$(this).find("a").css({'width' : imgWidth});
		});
		$("#quick-proj ul li").hover(function() { //On hover...
			var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'	
			//Set a background image(thumbOver) on the <a> tag - Set position to bottom
			$(this).find("a").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});	
			//Animate the image to 0 opacity (fade it out)
			$(this).find("span").stop().fadeTo('fast', 0 , function() {
				$(this).hide() //Hide the image after fade
			});
		} , function() { //on hover out...
			//Fade the image to full opacity 
			$(this).find("span").stop().fadeTo('fast', 1).show();
		});						
	});
