function print_r(arr,level) { var dumped_text = ""; if(!level) level = 0; //The padding given at the beginning of the line. var level_padding = ""; for(var j=0;j \"" + value + "\"\n"; } } } else { //Stings/Chars/Numbers etc. dumped_text = "===>"+arr+"<===("+typeof(arr)+")"; } return dumped_text; } function loadAnother(direction) { $('#imageLoader').fadeOut('fast', function() { $('#loadingImage').fadeIn('fast', function () { current = parseInt(loadingSeq) + parseInt(direction); img = new Image(); img.onload = mediumImageLoaded; if(current >= carouselListItems.length) current = 0; if(current < 0) current = (carouselListItems.length) - 1; loadingSeq = current; earlyReset = false; img = new Image(); img.onload = mediumImageLoaded; img.src = baseUrl + "/templateImages/imageLoad.php?id=" + $(carouselListItems[current]).attr('alt'); }); }); } function mediumImageLoaded() { if(!earlyReset) { if($(carouselListItems[parseInt(loadingSeq)]).attr('large')) { $('#imageSource').html('
close
full size
'); $('#mediumFullSizeText').click(function () { loadFullSize($(carouselListItems[parseInt(loadingSeq)]).attr('large')); }); } else $('#imageSource').html('
close
'); $('#mediumImage').click(function() { $('#imageLoader').fadeOut('fast', function() { $('#rightInnerContent').fadeIn('500'); }); }); $('#mediumCloseText').click(function() { $('#imageLoader').fadeOut('fast', function() { $('#rightInnerContent').fadeIn('500'); }); }); $('#loadingImage').fadeOut('500', function() { $('#imageLoader').fadeIn('500'); }); } } 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'); } $('#largeImageSource').html('
close
'); $('#loadingLargeContainer').animate({ width: largeImg.width, height: largeImg.height, top: top, left: left }, 300);//, 'linear', function() { //}); $('#largeImageSource').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'); $('#loadingImage').fadeOut('500', function() { $('#rightInnerContent').fadeIn('500'); }); } function loadFullSize(id) { var html = ""; html += "
"; html += "
 
"; html += "
"; html += ""; html += "
"; html += "
 
"; html += "
"; html += "
"; html += "
"; $('body').append(html); $('#largeImageContainer').fadeIn('fast', function() { largeImg = new Image(); largeImg.onload = largeImageLoaded; largeImg.src = baseUrl + "/templateImages/imageLoad.php?id="+id+"&maxWidth=980&maxHeight=740&proportion=true"; }); }