$(document).ready(function() {
	// Logo hover effect
	$('#brand h1 a').append('<span class="hover"></span>').each(function () {
  		var $span = $('> span.hover', this).css('opacity', 0);
  		$(this).hover(function () {
    		$span.stop().fadeTo(400, 1);
 		}, function () {
   			$span.stop().fadeTo(300, 0);
  		});
	});
	
	//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
	//Full Caption Sliding (Hidden to Visible)
	$('.boxgrid').hover(function(){
		$(".cover", this).stop().animate({top:'80px'},{queue:false,duration:160});
	}, function() {
		$(".cover", this).stop().animate({top:'115px'},{queue:false,duration:160});
	});
	
	// Cycle for project / rotating images
		$('#slideshow.orange').after('<p class="label"></p>');
    $('#slideshow').after('<ul class="galleryNav '+ $('#slideshow').attr("class") +'">').cycle({
    	fx: 'fade',
	    speed:   1000, 
	    timeout: 4000,
	    pager:  '.galleryNav',
	    // callback fn that creates a thumbnail to use as pager anchor 
			pagerAnchorBuilder: function(idx, slide) { 
					return '<li><a href="#">' + (idx+1) + '</a></li>'; 
			},
			before: showLabel
    });
		function showLabel() {
    $('.label').html('<a href="'+ this.href +'">' + this.title+ '</a>');
		}
});
