


//this functions animates those nice, half-transparent buttons that slide in when gallery thumbnail is hovered
function galleryButtons(){
	
	//set the buttons initial position
	$('.zoomButton').each(function(){
		$(this).css( { left: "-97px" } );								
	});
	$('.descriptionButton').each(function(){
		$(this).css( { right: "-98px" } );								
	});
	
	//add a opacity attribute to each gallery thumbnail
	$('.galleryImage').each(function(){
		$(this).css( { opacity: "1" } );					  
	});
	
	//animate gallery thumbnail's opacity and slide in buttons on thumbnail hover
	$('.galleryImage').hover(
		function(){
			$(this).children('.zoomButton').stop().animate( { left: "0px" }, { queue: false, duration: 500, easing: "easeOutQuad" } );
			$(this).children('.descriptionButton').stop().animate( { right: "0px" }, { queue: false, duration: 500, easing: "easeOutQuad" } );
			$(this).children('img').stop().animate( { opacity: ".4" }, { queue: false, duration: 500 } );
		},
		function(){
			$(this).children('.zoomButton').stop().animate( { left: "-97px" }, { queue: false, duration: 500, easing: "easeInQuad" } );
			$(this).children('.descriptionButton').stop().animate( { right: "-98px" }, { queue: false, duration: 500, easing: "easeInQuad" } );
			$(this).children('img').stop().animate( { opacity: "1" }, { queue: false, duration: 500 } );
		}
	);
}


