// Original imageLoad function from: http://www.chazzuka.com/experiments/jquery-ajax-image-viewer/filebrowser.asp
// Modified by Tyler Mulligan - www.detrition.net

function imageLoad(file)
{
  $('#picView')
	.addClass("loading")
	.html('<img src="../css/img/ajax_loader.gif" style="width:32px;height:32px;border:0;" /><p>Loading...</p>');	
  var img = new Image();
  $(img)
	.load(function () {
		  $(this).hide();
		  $('#picView').removeClass('loading').html('').append(this);
			//alert(this.height);
		  	//alert(this.width);
		  //if(this.height > this.width) {
			  //$('#picView img').height(1092);
			  //$('#picView img').width(728);
		  //} else {
			  //$('#picView img').height(480);
			  //$('#picView img').width(720);
		  //}
		  $(this).fadeIn();
		  
	})
	.error(function () {alert('Could not load the file');})
	.attr('src', file);
}
