Current File : /pages/54/47/d0016649/home/htdocs/cd24/wp-content/themes/en-vision/lib/js/queryloader2.min.js |
/*!
* Envision
*
* @version 3.7.0
*
* @author Wptation
* @link http://envision.wptation.com/
* @license ThemeForest Split Licence
* @copyright 2019
*/
!function(s){var g;(g={}).mozilla=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase()),g.webkit=/webkit/.test(navigator.userAgent.toLowerCase()),g.opera=/opera/.test(navigator.userAgent.toLowerCase()),g.msie=/msie/.test(navigator.userAgent.toLowerCase()),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var i=this.length>>>0,t=Number(arguments[1])||0;for((t=t<0?Math.ceil(t):Math.floor(t))<0&&(t+=i);t<i;t++)if(t in this&&this[t]===e)return t;return-1});function i(e){var i="",t=s(e),n="normal";if("none"!=t.css("background-image"))i=t.css("background-image"),n="background";else if(void 0!==t.attr("src")&&"img"==e.nodeName.toLowerCase())i=t.attr("src");if(-1==i.indexOf("gradient"))for(var r=(i=(i=(i=(i=i.replace(/url\(\"/g,"")).replace(/url\(/g,"")).replace(/\"\)/g,"")).replace(/\)/g,"")).split(", "),o=0;o<r.length;o++)if(0<r[o].length&&-1==d.indexOf(r[o])&&!r[o].match(/^(data:)/i)){var a="";g.msie&&g.version<9?(a="?"+Math.floor(3e3*Math.random()),u.push(r[o]+a),d.push(r[o])):(d.push(r[o]),"background"==n?u.push(r[o]+a):b(t))}}var d=[],u=[],t=0,n=!1,r="",o="",a="",c="",h="",l=0,p=0,v={onComplete:function(){},backgroundColor:"#000",barColor:"#fff",overlayId:"qLoverlay",barHeight:1,percentage:!1,deepSearch:!0,completeAnimation:"fade",minimumTime:500,onLoadComplete:function(){if("grow"==v.completeAnimation){var e=500,i=new Date;i.getTime()-p<v.minimumTime&&(e=v.minimumTime-(i.getTime()-p)),s(c).stop().animate({width:"100%"},e,function(){s(this).animate({top:"0%",width:"100%",height:"100%"},500,function(){s("#"+v.overlayId).fadeOut(500,function(){s(this).remove(),v.onComplete()})})})}else"fade"==v.completeAnimation?s("#"+v.overlayId).fadeOut(500,function(){s("#"+v.overlayId).remove(),v.onComplete()}):(s("#"+v.overlayId).remove(),v.onComplete())}},m=function(){o=s("<div></div>").appendTo("body").css({display:"none",width:0,height:0,overflow:"hidden"});for(var e=0;u.length>e;e++)s.ajax({url:u[e],type:"HEAD",complete:function(e){n||f(this.url)}})},f=function(e){var i=s("<img />").attr("src",e).appendTo(o);b(i)},b=function(e){l++,e.imagesLoaded(function(e){y()})},y=function(){var e=++t/l*100;s(c).stop().animate({width:e+"%",minWidth:e+"%"},200),1==v.percentage&&s(h).text(Math.ceil(e)+"%"),t==l&&S()},S=function(){s(o).remove(),n=!0,v.onLoadComplete()},w=function(){var e="absolute";"BODY"==r.prop("tagName")?e="fixed":r.css("position","relative"),a=s("<div id='"+v.overlayId+"'></div>").css({width:"100%",height:"100%",backgroundColor:v.backgroundColor,backgroundPosition:"fixed",position:e,zIndex:666999,top:0,left:0}).appendTo(r),c=s("<div id='qLbar' class='ui--accent-gradient'></div>").css({height:v.barHeight+"px",marginTop:"-"+v.barHeight/2+"px",width:"0%",position:"absolute",top:"50%"}).appendTo(a),1==v.percentage&&(h=s("<h1 id='qLpercentage'></h1>").text("0%").css({height:"40px",width:"100px",position:"absolute",fontSize:"3em",top:"50%",left:"50%",marginTop:"-"+(59+v.barHeight)+"px",textAlign:"center",marginLeft:"-50px",color:v.barColor}).appendTo(a)),d.length||S()};s.fn.queryLoader2=function(e){return e&&s.extend(v,e),this.each(function(){i(this),1==v.deepSearch&&s(this).find("*:not(script)").each(function(){i(this)})}),function(e){r=e,n=!1;var i=new Date;p=i.getTime(),0<d.length?(m(),w()):S()}(this),this};var e={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version",this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(e){for(var i=0;i<e.length;i++){var t=e[i].string,n=e[i].prop;if(this.versionSearchString=e[i].versionSearch||e[i].identity,t){if(-1!=t.indexOf(e[i].subString))return e[i].identity}else if(n)return e[i].identity}},searchVersion:function(e){var i=e.indexOf(this.versionSearchString);if(-1!=i)return parseFloat(e.substring(i+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera",versionSearch:"Version"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};e.init(),g.version=e.version}(jQuery),jQuery(document).ready(function(){jQuery("body").css({visibility:"visible"}).queryLoader2({barColor:"#333333",backgroundColor:"#ffffff",percentage:!0,barHeight:3,completeAnimation:"none",minimumTime:200,onComplete:function(){jQuery("html").removeClass("html-loading").addClass("html-loaded")}})});