(function($){$.extend($,{preload:function(src,opt){if(typeof src==='object'){$.each(src,function(){$.preload(String(this),opt);});return;}var img=new Image();opt=opt ||{};$.each(['load','error','abort'],function(){var e=String(this);if(typeof opt[e]==='function'){ $(img).bind(e,opt[e]); }if(typeof opt.complete==='function'){$(img).bind(e,opt.complete);}});img.src=src;return img;}});$.extend($.fn,{preload:function(opt){return this.each(function(){$.preload(this.src,opt);});}});})(jQuery);
