$(document).ready(function() {
$(".main_image .desc").show(); //Show Banner
$(".main_image .block").animate({ opacity: 0.8 }, 1 ); //Set Opacity

$(".image_thumb ul li:first").addClass('active'); //Add the active class (highlights the very first list item by default)
$(".image_thumb ul li").click(function(){
       // return false;  Don't click through - Prevents repetitive animations on active/selected list-item
})
$(".image_thumb ul li").hover(function(){
    //Set Variables
    var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image
    var imgTitle = $(this).find('a').attr("rel"); //Get Main Image URL
    var imgDesc = $(this).find('.block div').html();  //Get HTML of the "block" container
    var imgDescHeight = $(".main_image").find('.block').height(); //Find the height of the "block"

    if ($(this).is(".active")) {  //If the list item is active/selected, then...
        return false; // Don't click through - Prevents repetitive animations on active/selected list-item
    } else { //If not active then...
        //Animate the Description
        $(".main_image img").animate({ opacity: 0}, 300 );
$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 300 , function() {
$(".main_image .block").html(imgDesc).animate({ opacity: 0.85,	marginBottom: "0" }, 300 );
$(".main_image img").attr({ src: imgTitle , alt: imgAlt}).animate({ opacity: 1}, 300 );
});
    }
    //Show active list-item
    $(".image_thumb ul li").removeClass('active'); //Remove class of 'active' on all list-items
    $(this).addClass('active');  //Add class of 'active' on the selected list
    return false; 

})
});
