$(document).ready(function() {	
 
	
	$(".main_image .desc").show(); 
	$(".main_image .block").animate({ opacity: 0.90 }, 1 ); 
 
	 
	$(".image_thumb ul li").click(function(){ 
		
		var imgAlt = $(this).find('img').attr("alt"); 
		var imgTitle = $(this).find('a').attr("href"); 
		var imgDesc = $(this).find('.block').html(); 	
		var imgDescHeight = $(".main_image").find('.block').height();	
		
		if ($(this).is(".active")) {  
			return false; 
		} else {
				
			$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 250 , function() {
				$(".main_image .block").html(imgDesc).animate({ opacity: 0.90,	marginBottom: "0" }, 250 );
				$(".main_image img").attr({ src: imgTitle , alt: imgAlt});
			});
		}
		
		$(".image_thumb ul li").removeClass('active'); 
		$(this).addClass('active');  
		return false;
		
	}) .hover(function(){
		$(this).addClass('hover');
		}, function() {
		$(this).removeClass('hover');
	});
			

	$("a.collapse").click(function(){
		$(".main_image .block").slideToggle();
		$("a.collapse").toggleClass("show");
	});
	
});