(function(A){A.xLazyLoader=function(D,C){if(typeof D=="object"){C=D;D="load"}B[D](C)};var B=new function(){var C=document.getElementsByTagName("head")[0];this.load=function(F){var J={js:[],css:[],image:[],name:null,load:function(){}};A.extend(J,F);var D=this,G=false,E={js:[],css:[],image:[]};I("js",J.js);I("css",J.css);I("image",J.image);function I(K,L){if(A.isArray(L)&&L.length>0){A.each(L,function(N,M){H(K,M)})}else{if(typeof L=="string"){H(K,L)}}}function H(L,K){D[L](K,function(){A.isArray(J[L])?E[L].push(K):E[L]=K;J.js.length==E.js.length&&J.css.length==E.css.length&&J.image.length==E.image.length&&J.load.apply(E,[]);return },J.name?"lazy-loaded-"+J.name:"lazy-loaded-"+new Date().getTime())}};this.js=function(F,G,E){if(A('script[src*="'+F+'"]').length>0){G();return }var D=document.createElement("script");D.setAttribute("type","text/javascript");D.setAttribute("src",F);D.setAttribute("id",E);if(A.browser.msie){D.onreadystatechange=function(){/loaded|complete/.test(D.readyState)&&G()}}else{D.onload=G}C.appendChild(D)};this.css=function(D,G,E){if(A('link[href*="'+D+'"]').length>0){G();return }var F=A('<link rel="stylesheet" type="text/css" media="all" href="'+D+'" id="'+E+'"></link>')[0];if(A.browser.msie){F.onreadystatechange=function(){/loaded|complete/.test(F.readyState)&&G()}}else{if(A.browser.opera){F.onload=G}else{(function(){try{F.sheet.cssRule}catch(H){setTimeout(arguments.callee,20);return }G()})()}}C.appendChild(F)};this.image=function(E,F){var D=new Image();D.onload=F;D.src=E};this.disable=function(D){A("#lazy-loaded-"+D,C).attr("disabled","disabled")};this.enable=function(D){A("#lazy-loaded-"+D,C).removeAttr("disabled")};this.destroy=function(D){A("#lazy-loaded-"+D,C).remove()}}})(jQuery);