(function(e){e.queryLoader2=function(t,n){var r=this;r.$el=e(t);r.el=t;r.$el.data("queryLoader2",r);r.qLimageContainer="";r.qLoverlay="";r.qLbar="";r.qLpercentage="";r.qLimages=[];r.qLbgimages=[];r.qLimageCounter=0;r.qLdone=0;r.qLdestroyed=false;r.init=function(){r.options=e.extend({},e.queryLoader2.defaultOptions,n);r.findImageInElement(r.el);if(r.options.deepSearch==true){r.$el.find("*:not(script)").each(function(){r.findImageInElement(this)})}r.createPreloadContainer();r.createOverlayLoader()};r.createPreloadContainer=function(){r.qLimageContainer=e("
").appendTo("body").css({display:"none",width:0,height:0,overflow:"hidden"});for(var t=0;r.qLbgimages.length>t;t++){e.ajax({url:r.qLbgimages[t],type:"HEAD",complete:function(e){if(!r.qLdestroyed){r.addImageForPreload(this["url"])}}})}};r.addImageForPreload=function(t){var n=e("").attr("src",t);r.bindLoadEvent(n);n.appendTo(r.qLimageContainer)};r.createOverlayLoader=function(){var t="absolute";if(r.$el.prop("tagName")=="BODY"){t="fixed"}else{r.$el.css("position","relative")}r.qLoverlay=e("").css({width:"100%",height:"100%",backgroundColor:r.options.backgroundColor,backgroundPosition:"fixed",position:t,zIndex:666999,top:0,left:0}).appendTo(r.$el);r.qLbar=e("").css({height:"35px",marginTop:"0px",width:"0%",position:"absolute"}).appendTo(r.qLoverlay);if(r.options.percentage==true){r.qLpercentage=e("").text("0%").css({position:"absolute",bottom:"10px",right:"10px",textAlign:"center"}).appendTo(r.qLoverlay)}if(!r.qLimages.length){r.destroyContainers()}};r.destroyContainers=function(){r.qLdestroyed=true;r.qLimageContainer.remove();r.qLoverlay.remove()};r.findImageInElement=function(t){var n="";var i=e(t);var s="normal";if(i.css("background-image")!="none"){n=i.css("background-image");s="background"}else if(typeof i.attr("src")!="undefined"&&t.nodeName.toLowerCase()=="img"){n=i.attr("src")}if(n.indexOf("gradient")==-1){n=n.replace(/url\(\"/g,"");n=n.replace(/url\(/g,"");n=n.replace(/\"\)/g,"");n=n.replace(/\)/g,"");var o=n.split(", ");for(var u=0;u