$(function()
{
    $("#imageOptions a").hover(function()
        {
       var imageSource = $(this).children("img").attr("src");
       var title = $(this).children("img").attr("alt")
       //replace thumbs directory with large directory
       var largeImage = imageSource.replace("tourThumbs","tourLarge");
       
       // $("#loader").addClass("loading");
        $("h3").empty();
        $("h3").append(title);
          showImage(largeImage);
          return false;
        },function(){});
        
      
});

function showImage(src)
{
$("#loader img").fadeOut("normal").remove();
var largeImage = new Image();
$(largeImage).load(function()
                        {
                        $(this).hide();
                        $("#loader").prepend(this).removeClass("loading");
                                             
                        $(this).fadeIn("slow");              
                        });    
$(largeImage).attr("src", src);                                                                               
}



