(function(h){var g="string",k="head",D="body",B="script",j="readyState",d="preloaddone",l="loadtrigger",C="srcuri",r="preload",I="complete",p="done",o="which",z="preserve",q="onreadystatechange",O="onload",w="hasOwnProperty",G="script/cache",A="[object ",T=A+"Function]",S=A+"Array]",a=null,c=true,b=false,e=h.document,U=h.location,L=h.ActiveXObject,m=h.setTimeout,F=h.clearTimeout,u=function(a){return e.getElementsByTagName(a)},x=Object.prototype.toString,t=function(){},f={},y={},M=/^[^?#]*\//.exec(U.href)[0],N=/^\w+\:\/\/\/?[^\/]+/.exec(M)[0],Q=u(B),K=h.opera&&x.call(h.opera)==A+"Opera]",J="MozAppearance" in e.documentElement.style,E=e.createElement(B).async===true,i={cache:!(J||K),order:J||K||E,xhr:c,dupe:c,base:"",which:k};i[z]=b;i[r]=c;f[k]=e.head||u(k);f[D]=u(D);function n(a){return x.call(a)===T}function v(b,c){var d=/^\w+\:\/\//,a;if(typeof b!=g)b="";if(typeof c!=g)c="";a=(d.test(b)?"":c)+b;return (d.test(a)?"":a.charAt(0)==="/"?N:M)+a}function R(a){return v(a).indexOf(N)===0}function P(e){var a,d=-1;while(a=Q[++d])if(typeof a.src==g&&e===v(a.src)&&a.type!==G)return c;return b}function s(H,A){H=!!H;if(A==a)A=i;var ib=b,J=H&&A[r],Y=J&&A.cache,M=J&&A.order,Z=J&&A.xhr,lb=A[z],nb=A.which,mb=A.base,hb=t,N=b,K,D=c,u={},W=[],Q=a;J=Y||Z||M;function bb(d,e){if(d[j]&&d[j]!==I&&d[j]!=="loaded"||e[p])return b;d[O]=d[q]=a;return c}function T(e,b,a){a=!!a;if(!a&&!bb(e,b))return;b[p]=c;for(var d in u)if(u[w](d)&&!u[d][p])return;ib=c;hb()}function X(b){if(n(b[l])){b[l]();b[l]=a}}function jb(b,a){if(!bb(b,a))return;a[d]=c;m(function(){f[a[o]].removeChild(b);X(a)},0)}function kb(b,a){if(b[j]===4){b[q]=t;a[d]=c;m(function(){X(a)},0)}}function U(h,r,p,j,l,i){var d=h[o];m(function(){if("item" in f[d]){if(!f[d][0]){m(arguments.callee,25);return}f[d]=f[d][0]}var o=e.createElement(B);if(typeof p==g)o.type=p;if(typeof j==g)o.charset=j;if(n(l)){o[O]=o[q]=function(){l(o,h)};o.src=r;if(E)o.async=b}f[d].insertBefore(o,d===k?f[d].firstChild:a);if(typeof i==g){o.text=i;T(o,h,c)}},0)}function cb(a,e,d,b){y[a[C]]=c;U(a,e,d,b,T)}function ab(c,g,h,f){var e=arguments;if(D&&c[d]==a){c[d]=b;U(c,g,G,f,jb)}else if(!D&&c[d]!=a&&!c[d])c[l]=function(){ab.apply(a,e)};else!D&&cb.apply(a,e)}function db(e,g,k,i){var j=arguments,f;if(D&&e[d]==a){e[d]=b;f=e.xhr=L?new L("Microsoft.XMLHTTP"):new h.XMLHttpRequest;f[q]=function(){kb(f,e)};f.open("GET",g);f.send("")}else if(!D&&e[d]!=a&&!e[d])e[l]=function(){db.apply(a,j)};else if(!D){y[e[C]]=c;U(e,g,k,i,a,e.xhr.responseText);e.xhr=a}}function fb(h){if(typeof h=="undefined"||!h)return;if(h.allowDup==a)h.allowDup=A.dupe;var m=h.src,k=h.type,i=h.charset,j=h.allowDup,e=v(m,mb),f,l=R(e);if(typeof i!=g)i=a;j=!!j;if(!j&&(y[e]!=a||D&&u[e]||P(e))){u[e]!=a&&u[e][d]&&!u[e][p]&&l&&T(a,u[e],c);return}if(u[e]==a)u[e]={};f=u[e];if(f[o]==a)f[o]=nb;f[p]=b;f[C]=e;N=c;if(!M&&Z&&l)db(f,e,k,i);else if(!M&&Y)ab(f,e,k,i);else cb(f,e,k,i)}function gb(a){W.push(a)}function V(a){H&&!M&&gb(a);(!H||J)&&a()}function eb(b){for(var a=[],c=-1;++c<b.length;)if(x.call(b[c])===S)a=a.concat(eb(b[c]));else a[a.length]=b[c];return a}K={script:function(){F(Q);var c=eb(arguments),d=K,a;if(lb)for(a=-1;++a<c.length;){if(n(c[a]))c[a]=c[a]();if(a===0)V(function(){fb(typeof c[0]==g?{src:c[0]}:c[0])});else d=d.script(c[a]);d=d.wait()}else{for(a=-1;++a<c.length;)if(n(c[a]))c[a]=c[a]();V(function(){for(a=-1;++a<c.length;)fb(typeof c[a]==g?{src:c[a]}:c[a])})}Q=m(function(){D=b},5);return d},wait:function(a){F(Q);D=b;if(!n(a))a=t;var c=s(H||N,A),f=c.trigger,d=function(){try{a()}catch(b){}f()};delete c.trigger;var e=function(){if(N&&!ib)hb=d;else d()};if(H&&!N)gb(e);else V(e);return c}};if(H)K.trigger=function(){var a,b=-1;while(a=W[++b])a();W=[]};else K.trigger=t;return K}function H(g){var c,d={},e={UseCachePreload:"cache",UseLocalXHR:"xhr",UsePreloading:r,AlwaysPreserveOrder:z,AllowDuplicates:"dupe"},f={AppendTo:o,BasePath:"base"};for(c in e)f[c]=e[c];d.order=!!i.order;for(c in f)if(f[w](c)&&i[f[c]]!=a)d[f[c]]=g[c]!=a?g[c]:i[f[c]];for(c in e)if(e[w](c))d[e[c]]=!!d[e[c]];if(!d[r])d.cache=d.order=d.xhr=b;d.which=d.which===k||d.which===D?d.which:k;return d}h.$LAB={setGlobalDefaults:function(a){i=H(a)},setOptions:function(a){return s(b,H(a))},script:function(){return s().script.apply(a,arguments)},wait:function(){return s().wait.apply(a,arguments)}};(function(d,c,f){if(e[j]==a&&e[d]){e[j]="loading";e[d](c,f=function(){e.removeEventListener(c,f,b);e[j]=I},b)}})("addEventListener","DOMContentLoaded")})(window)
