function loadImg (src) {

  // $('#bigimg').empty();
  $('#bigimg').addClass('loading');
  
  $('#bigimg img').fadeTo("slow", 0.20);

  
  var img = new Image();

  // wrap our new image in jQuery, then:
  $(img)
    // once the image has loaded, execute this code
    .load(function () {
      // set the image hidden by default    
      $(this).hide();
      $('#bigimg').empty();
      // with the holding div #loader, apply:
      $('#bigimg')
        // remove the loading class (so no background spinner), 
        //.removeClass('loading')
        // then insert our image
        .append(this).append('<br />');
    
      // fade our image in to create a nice effect
      $(this).fadeIn();
      $(this).css('display', 'inline');      
    })
    
    // if there was an error loading the image, react accordingly
    .error(function () {
      // notify the user that the image could not be loaded
    })
    
    // *finally*, set the src attribute of the new image to our image
    .attr('src', src);
}


$(document).ready(function() {

     $("#wthumbs > img").click(function(){
         // alert('Cucu');
         var t = this.src;
         t = t.replace('_.', '.');
         // alert(t);
         
         loadImg(t);
         
         $('#wthumbs > img').removeClass('imgOn');
         $(this).addClass('imgOn');
     });
});
