$(document).ready(function() { 
	
	// Image Hover Effect
	$('div.image').hover(
	
		function() 
		{
			// Show the Magnifying Glass		
    		$(this).find("a").fadeIn(300);
  			
  			
  			// Increase z-index 
  			var maxZ =0;
  			
  			$('div.image').each(function()
  			{
  				var thisZ = parseInt($(this).css('z-index'))
  				if(thisZ > maxZ) maxZ = thisZ;
  				
  			})	
  			
  			$(this).css('z-index', maxZ+10);
  			
  			// Remove Rotation			
  			$(this).addClass('hover');
  			  			
  		},
  		
  		
  		function() 
  		{
   			// Hide the Magnifying Glass
   			$(this).find("a").fadeOut(300);
  			
  			// Put back to the bottom of the pile
  			$(this).css('z-index', 0);
  			
  			// Give rotate back
  			$(this).removeClass('hover'); 
  			
  		}	
  	);
  	
  	// Fancybox links
  	$("div.image a").lightBox();
  	
  	//$("div.image a").fancybox({
	//	'titleShow'		: false
	//});
});