jQuery.fn.imageLoader=function(j,c){var b=$.extend({},$.fn.imageLoader.defaults,j);var d=1;var a=this;var h=[];f();for(var e=0;e<b.images.length;e++){h["img"+e]=new Image();$(h["img"+e]).load(function(){if(b.hideImages){$(this).hide()}$(a).append(this);g()}).attr("src",b.images[e])}return $(this);function g(){d++;if((b.images.length+1)==d){if(b.endableSplashScreen){$("#imageLoaderSplashArea").remove()}if(typeof c=="function"){c.call()}}else{if(b.endableSplashScreen&&b.enableSplashScreenText){$("#imageLoaderSplashArea p.loadingText").html("Loading "+d+" of "+b.images.length)}}}function f(){if(b.endableSplashScreen){var i='<div id="imageLoaderSplashArea">'+((b.enableSplashScreenImage)?'<img src="'+b.splashScreenImage+'" class="splashScreenImage" />':"")+((b.enableSplashScreenText)?'<p class="loadingText">Loading '+d+" of "+b.images.length+"</p>":"")+"</div>";$(a).append(i)}}};jQuery.fn.imageLoader.defaults={images:[],splashScreenImage:"images/splashScreenImage.gif",enableSplashScreenImage:1,enableSplashScreenText:1,endableSplashScreen:1,hideImages:1};