// when the DOM is ready
$(function () {
  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    
      $("img.panorama").hide();
    
      // with the holding div #loader, apply:
      $('#loader')
        // remove the loading class (so no background spinner), 
        .removeClass('loading')
        // then insert our image
        .append(this);
    
      // fade our image in to create a nice effect

      $("img.panorama").fadeIn();
	  

	})

    // *finally*, set the src attribute of the new image to our image
    .attr('src', $("img.panorama").attr('src'));
});

