jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel();  
      $.fn.image = function(src, f){ 
       return this.each(function(){
           $(this).hide(); 
           $("#imageLoading").show();
           var i = new Image(); 
           i.src = src; 
           i.onload = f;           
           $(this).html("");
           this.appendChild(i);
           $("#imageLoading").hide();
          $(this).fadeIn('slow');  
        }); 
      }   
      $(".imgThumb").click(function(){
          if (!$(this).hasClass('active') ){
              $(".active").removeClass('active');
              $(this).addClass('active');          
              $("#childImageDiv").image($(this).attr("file"),function(){
                  //$("#imageLoading").hide();
                  //$(this).parent().fadeIn('slow');
                  
              });
          }
      });
      $(".imgThumb:first").addClass('active');
          
});