/*! LAB.js (LABjs :: Loading And Blocking JavaScript)
    v1.0.3 (c) Kyle Simpson
    MIT License
*/
(function(p){var q="string",w="head",H="body",Y="script",t="readyState",j="preloaddone",x="loadtrigger",I="srcuri",C="preload",Z="complete",y="done",z="which",J="preserve",D="onreadystatechange",ba="onload",K="hasOwnProperty",bb="script/cache",L="[object ",bv=L+"Function]",bw=L+"Array]",e=null,h=true,i=false,n=p.document,bx=p.location,bc=p.ActiveXObject,A=p.setTimeout,bd=p.clearTimeout,M=function(a){return n.getElementsByTagName(a)},N=Object.prototype.toString,O=function(){},r={},P={},be=/^[^?#]*\//.exec(bx.href)[0],bf=/^\w+\:\/\/\/?[^\/]+/.exec(be)[0],by=M(Y),bg=p.opera&&N.call(p.opera)==L+"Opera]",bh=("MozAppearance"in n.documentElement.style),u={cache:!(bh||bg),order:bh||bg,xhr:h,dupe:h,base:"",which:w};u[J]=i;u[C]=h;r[w]=n.head||M(w);r[H]=M(H);function Q(a){return N.call(a)===bv}function R(a,b){var c=/^\w+\:\/\//,d;if(typeof a!=q)a="";if(typeof b!=q)b="";d=(c.test(a)?"":b)+a;return((c.test(d)?"":(d.charAt(0)==="/"?bf:be))+d)}function bz(a){return(R(a).indexOf(bf)===0)}function bA(a){var b,c=-1;while(b=by[++c]){if(typeof b.src==q&&a===R(b.src)&&b.type!==bb)return h}return i}function E(v,k){v=!(!v);if(k==e)k=u;var bi=i,B=v&&k[C],bj=B&&k.cache,F=B&&k.order,bk=B&&k.xhr,bB=k[J],bC=k.which,bD=k.base,bl=O,S=i,G,s=h,l={},T=[],U=e;B=bj||bk||F;function bm(a,b){if((a[t]&&a[t]!==Z&&a[t]!=="loaded")||b[y]){return i}a[ba]=a[D]=e;return h}function V(a,b,c){c=!(!c);if(!c&&!(bm(a,b)))return;b[y]=h;for(var d in l){if(l[K](d)&&!(l[d][y]))return}bi=h;bl()}function bn(a){if(Q(a[x])){a[x]();a[x]=e}}function bE(a,b){if(!bm(a,b))return;b[j]=h;A(function(){r[b[z]].removeChild(a);bn(b)},0)}function bF(a,b){if(a[t]===4){a[D]=O;b[j]=h;A(function(){bn(b)},0)}}function W(b,c,d,g,f,m){var o=b[z];A(function(){if("item"in r[o]){if(!r[o][0]){A(arguments.callee,25);return}r[o]=r[o][0]}var a=n.createElement(Y);if(typeof d==q)a.type=d;if(typeof g==q)a.charset=g;if(Q(f)){a[ba]=a[D]=function(){f(a,b)};a.src=c}r[o].insertBefore(a,(o===w?r[o].firstChild:e));if(typeof m==q){a.text=m;V(a,b,h)}},0)}function bo(a,b,c,d){P[a[I]]=h;W(a,b,c,d,V)}function bp(a,b,c,d){var g=arguments;if(s&&a[j]==e){a[j]=i;W(a,b,bb,d,bE)}else if(!s&&a[j]!=e&&!a[j]){a[x]=function(){bp.apply(e,g)}}else if(!s){bo.apply(e,g)}}function bq(a,b,c,d){var g=arguments,f;if(s&&a[j]==e){a[j]=i;f=a.xhr=(bc?new bc("Microsoft.XMLHTTP"):new p.XMLHttpRequest());f[D]=function(){bF(f,a)};f.open("GET",b);f.send("")}else if(!s&&a[j]!=e&&!a[j]){a[x]=function(){bq.apply(e,g)}}else if(!s){P[a[I]]=h;W(a,b,c,d,e,a.xhr.responseText);a.xhr=e}}function br(a){if(a.allowDup==e)a.allowDup=k.dupe;var b=a.src,c=a.type,d=a.charset,g=a.allowDup,f=R(b,bD),m,o=bz(f);if(typeof d!=q)d=e;g=!(!g);if(!g&&((P[f]!=e)||(s&&l[f])||bA(f))){if(l[f]!=e&&l[f][j]&&!l[f][y]&&o){V(e,l[f],h)}return}if(l[f]==e)l[f]={};m=l[f];if(m[z]==e)m[z]=bC;m[y]=i;m[I]=f;S=h;if(!F&&bk&&o)bq(m,f,c,d);else if(!F&&bj)bp(m,f,c,d);else bo(m,f,c,d)}function bs(a){T.push(a)}function X(a){if(v&&!F)bs(a);if(!v||B)a()}function bt(a){var b=[],c;for(c=-1;++c<a.length;){if(N.call(a[c])===bw)b=b.concat(bt(a[c]));else b[b.length]=a[c]}return b}G={script:function(){bd(U);var a=bt(arguments),b=G,c;if(bB){for(c=-1;++c<a.length;){if(c===0){X(function(){br((typeof a[0]==q)?{src:a[0]}:a[0])})}else b=b.script(a[c]);b=b.wait()}}else{X(function(){for(c=-1;++c<a.length;){br((typeof a[c]==q)?{src:a[c]}:a[c])}})}U=A(function(){s=i},5);return b},wait:function(a){bd(U);s=i;if(!Q(a))a=O;var b=E(h,k),c=b.trigger,d=function(){try{a()}catch(err){}c()};delete b.trigger;var g=function(){if(S&&!bi)bl=d;else d()};if(v&&!S)bs(g);else X(g);return b}};if(v){G.trigger=function(){var a,b=-1;while(a=T[++b])a();T=[]}}return G}function bu(a){var b,c={},d={"UseCachePreload":"cache","UseLocalXHR":"xhr","UsePreloading":C,"AlwaysPreserveOrder":J,"AllowDuplicates":"dupe"},g={"AppendTo":z,"BasePath":"base"};for(b in d)g[b]=d[b];c.order=!(!u.order);for(b in g){if(g[K](b)&&u[g[b]]!=e)c[g[b]]=(a[b]!=e)?a[b]:u[g[b]]}for(b in d){if(d[K](b))c[d[b]]=!(!c[d[b]])}if(!c[C])c.cache=c.order=c.xhr=i;c.which=(c.which===w||c.which===H)?c.which:w;return c}p.$LAB={setGlobalDefaults:function(a){u=bu(a)},setOptions:function(a){return E(i,bu(a))},script:function(){return E().script.apply(e,arguments)},wait:function(){return E().wait.apply(e,arguments)}};(function(a,b,c){if(n[t]==e&&n[a]){n[t]="loading";n[a](b,c=function(){n.removeEventListener(b,c,i);n[t]=Z},i)}})("addEventListener","DOMContentLoaded")})(window); 
