jQuery(document).ready(function() {
	
	
	$( "div.sub-photo a" ).click( function () { 
		var img = $(this).attr('href');
			
		$("#photo-bg").fadeOut('slow',function(){					        		
					        		$(this).css("background-image","url("+img+")");
								    $(this).fadeIn('slow');
								});			
		return false;
	});
	
})
