/* * Copyright 2013 Small Batch, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ ;(function(window,document,undefined){ var j=void 0,k=!0,l=null,m=!1;function n(a){return function(){return this[a]}}var o;function t(a,b,c){var d=2w';a.ba=/top/.test(b.getElementsByTagName("a")[0].getAttribute("style"))}return a.ba} function y(a){var b=a.K.location.protocol;"about:"==b&&(b=a.P.location.protocol);return"https:"==b?"https:":"http:"};function z(a,b,c){this.Ta=a;this.Ra=b;this.Sa=c}z.prototype.J=n("Ta");z.prototype.Y=n("Ra");function A(a,b,c,d,e,f,g,i){this.Ja=a;this.Qa=b;this.wa=c;this.va=d;this.Na=e;this.Ma=f;this.ua=g;this.v=i}o=A.prototype;o.getName=n("Ja");o.Da=n("Qa");o.fa=n("wa");o.Aa=n("va");o.Ba=n("Na");o.Ca=n("Ma");o.za=n("ua");o.z=n("v");function B(a,b){this.a=a;this.q=b}var fa=new A("Unknown","Unknown","Unknown","Unknown","Unknown","Unknown",j,new z(m,m,m)); B.prototype.parse=function(){var a;if(-1!=this.a.indexOf("MSIE")){a=C(this);var b=D(this),c=E(this.a,/(MSIE [\d\w\.]+)/,1);if(""!=c){var d=c.split(" "),c=d[0],d=d[1],e=F(d),f=F(b);a=new A(c,d,c,d,a,b,G(this.q),new z("Windows"==a&&6<=e.e||"Windows Phone"==a&&8<=f.e,m,m))}else a=new A("MSIE","Unknown","MSIE","Unknown",a,b,G(this.q),new z(m,m,m))}else if(-1!=this.a.indexOf("Opera"))a=ga(this);else if(/AppleWeb(K|k)it/.test(this.a)){a=C(this);var b=D(this),c=E(this.a,/AppleWeb(?:K|k)it\/([\d\.\+]+)/, 1),g=m;""==c&&(c="Unknown");d=F(c);g=F(b);e="Unknown";-1!=this.a.indexOf("Chrome")||-1!=this.a.indexOf("CrMo")||-1!=this.a.indexOf("CriOS")?e="Chrome":"BlackBerry"==a||"Android"==a?e="BuiltinBrowser":-1!=this.a.indexOf("Safari")?e="Safari":-1!=this.a.indexOf("AdobeAIR")&&(e="AdobeAIR");f="Unknown";"BuiltinBrowser"==e?f="Unknown":-1!=this.a.indexOf("Version/")?f=E(this.a,/Version\/([\d\.\w]+)/,1):"Chrome"==e?f=E(this.a,/(Chrome|CrMo|CriOS)\/([\d\.]+)/,2):"AdobeAIR"==e&&(f=E(this.a,/AdobeAIR\/([\d\.]+)/, 1));"AdobeAIR"==e?(g=F(f),g=2d.e||536==d.e&&11>d.A,"iPhone"==a||"iPad"==a||"iPod"==a||"Macintosh"==a))}else-1!=this.a.indexOf("Gecko")?(b=a="Unknown",c=m,-1!=this.a.indexOf("Firefox")?(a="Firefox",d=E(this.a,/Firefox\/([\d\w\.]+)/,1),""!=d&&(c=F(d),b=d,c=3<=c.e&&5<=c.A)):-1!=this.a.indexOf("Mozilla")&&(a="Mozilla"),d=E(this.a,/rv:([^\)]+)/, 1),""==d?d="Unknown":c||(c=F(d),c=1=this.ca?this.v.Y()&&pa(this,a,b)&&(this.la===l||this.la.hasOwnProperty(this.M))?Q(this,this.Q):Q(this,this.ha):qa(this):Q(this,this.Q)};function qa(a){a.C(function(a,c){return function(){c.call(a)}}(a,a.W),25)}function Q(a,b){a.F.remove();a.G.remove();b(a.M,a.s)};function L(a,b,c){this.c=a;this.t=b;this.H=c;this.Ia=new ra;this.I=new R;this.S=this.c.createElement("span",{},this.H)}function O(a,b,c){var d=a.c,e=a.S,c=c?a.I.expand(c):"",a="position:absolute;top:-999px;left:-999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+a.Ia.quote(b)+";"+c;ba(d)?e.setAttribute("style",a):e.style.cssText=a}function M(a){u(a.c,"body",a.S)}L.prototype.m=function(){return this.t.m(this.S)}; L.prototype.remove=function(){var a=this.S;a.parentNode&&a.parentNode.removeChild(a)};function T(a,b,c,d){this.P=a;this.ea=b;this.C=c;this.a=d;this.Z=this.$=0}T.prototype.u=function(a,b){this.ea.ma[a]=b};T.prototype.load=function(a){var b=a.context||this.P;this.c=new aa(this.P,b);b=new ha(this.c,b.document.documentElement,a);this.a.z().J()?sa(this,b,a):I(b)};T.prototype.Ea=function(a,b,c,d){var e=a.ga?a.ga():K;d?a.load(t(this,this.Ka,b,c,e)):(a=0==--this.$,this.Z--,a&&(0==this.Z?I(b):ka(b)),c.watch([],{},{},e,a))}; T.prototype.Ka=function(a,b,c,d,e,f){var g=0==--this.$;g&&ka(a);this.C(t(this,function(a,b,c,d,e,f){a.watch(b,c||{},d||{},e,f)},b,d,e,f,c,g))};function sa(a,b,c){var d=ma(a.ea,c,a.c),c=c.timeout;a.Z=a.$=d.length;for(var c=new J(a.a,a.c,b,{m:function(a){return new na(a.offsetWidth,a.offsetHeight)}},a.C,function(){return(new Date).getTime()},c),e=0,f=d.length;e