var earlyResetLarge = false;
var largeImg = null;
function largeImageLoaded() {
if(!earlyResetLarge) {
var top = Math.round(($(window).height() - (largeImg.height + 50)) /2);
var left = Math.round(($(window).width() - (largeImg.width + 50)) /2);
if(top < 0)
top = 0;
if(left < 0)
left = 0;
if((largeImg.height + 40) > $(window).height()) {
$('#largeImageContainer').css('height', (largeImg.height + 50)+'px');
$('#largeImageBackground').css('height', (largeImg.height + 50)+'px');
}
if((largeImg.width + 40) > $(window).width()) {
$('#largeImageContainer').css('width', (largeImg.width + 50)+'px');
$('#largeImageBackground').css('width', (largeImg.width + 50)+'px');
}
$('#loadingLargeContainer').animate({
width: largeImg.width,
height: largeImg.height,
top: top,
left: left
}, 300);//, 'linear', function() {
//});
$('#largeImageSource').html('');
$('#largeImageSource').click(function() {
$('#largeImageContainer').fadeOut('fast', function() {
$('#largeImageContainer').remove();
});
});
$('#largeImageBackground').click(function() {
$('#largeImageContainer').fadeOut('fast', function() {
$('#largeImageContainer').remove();
});
});
$('#loadingLargeImage').fadeOut('500', function() {
$('#largeImageLoader').fadeIn('500');
});
}
}
function earlyResetLoad() {
earlyReset = true;
$('#imageLoader').fadeOut('fast');
$('#loadingImage').fadeOut('500', function() {
$('#rightInnerContent').fadeIn('500');
});
}
function earlyResetLargeLoad() {
earlyResetLarge = true;
$('#imageLoader').fadeOut('fast');
$('#largeImageContainer').remove();
}
/*
function loadFullSize(src) {
var html = "";
var height = $('body').height();
if($("#pageLayout").height() > height)
height = $('#pageLayout').height();
html += "