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