$(document).ready(function() {  

    //Show Banner
    //$(".image_thumb .desc").show(); //Show Banner
    $(".main_copy .block").animate({ opacity: 1 }, 1 ); //Set Opacity
    $(".main_image img").animate({ opacity: 1 });

    //Click and Hover events for thumbnail list
    $(".image_thumb ul li:first").addClass('active').removeClass('inactive'); 
    $(".image_thumb ul li").click(function(){ 
        //Set Variables
        var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image
        var imgTitle = $(this).find('a').attr("href"); //Get Main Image URL
        var imgDesc = $(this).find('.block').html();    //Get HTML of block
        var imgSrc = $(this).find('img').attr("src");


        if ($(this).is(".active")) {  //If it's already active, then...
            return false; // Don't click through
        } else {


            //Animate the Copy
            $(".main_copy .block").animate({ opacity: 0 }, 250 , function() {
                    $(".main_copy .block").html(imgDesc).animate({ opacity: 1 }, 250 );
            });


            //Animate the Image
            $("..main_image img").animate({ opacity: 0 }, function() {
                $(".main_image img").attr({ src: imgTitle , alt: imgAlt}).animate({ opacity: 1 });
            });
        }


        $(".image_thumb ul li").removeClass('active').addClass('inactive'); //Remove class of 'active' on all lists
        $(this).addClass('active').removeClass('inactive');  //add class of 'active' on this list only
        return false;
        
    }) .hover(function(){
        $(this).addClass('hover');
        }, function() {
        $(this).removeClass('hover');
    });
            

    
});//Close Function
