$(document).ready(function(){  
	$('.thumb img').hover( function() { $('#output').html($(this).attr('alt')); },function(){} );
 
	$(".thumb a").hover(function(){
		var imgHref = $(this).attr('href');  //get the src of the thumbnail
		$(".thumb a").removeClass("selected");  //remove .selected class from all other links
    	$(this).addClass("selected");  //add .selected class to current link
    	$(".big").stop();
    	$(".big").stop().fadeTo(700, 0, 
			function() {  //fade image out
    			$('.big').attr('src',imgHref);  //give new image a src attribute
  			}).fadeTo("slow", 1);  //fade the image in
 		},function(){});
});

