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