/* * Copyright 2010 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){ webfont={};webfont.Q=function(a,b){var c=arguments.length>2?Array.prototype.slice.call(arguments,2):[];return function(){c.push.apply(c,arguments);return b.apply(a,c)}};webfont.z=function(a){this.R=a};webfont.z.prototype.createElement=function(a,b,c){a=this.R.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)&&a.setAttribute(d,b[d]);c&&a.appendChild(this.R.createTextNode(c));return a};function i(a,b,c){a=a.R.getElementsByTagName(b)[0];if(!a)a=document.documentElement;if(a&&a.lastChild){a.insertBefore(c,a.lastChild);return true}return false}function m(a,b){function c(){document.body?b():setTimeout(c,0)}c()} function n(a,b){if(b.parentNode){b.parentNode.removeChild(b);return true}return false}function o(a,b){return a.createElement("link",{rel:"stylesheet",href:b})}function p(a,b,c){a=b.className.split(/\s+/);for(var d=0,e=a.length;d=6)}return new webfont.o("MSIE",webfont.e.f,"MSIE",webfont.e.f,v(a),false)} function s(a){var b=webfont.e.f,c=webfont.e.f,d=w(a,a.a,/(Presto\/[\d\w\.]+)/);if(d!=""){c=d.split("/");b=c[0];c=c[1]}else{if(a.a.indexOf("Gecko")!=-1)b="Gecko";d=w(a,a.a,/rv:([^\)]+)/);if(d!="")c=d}if(a.a.indexOf("Version/")!=-1){d=w(a,a.a,/Version\/([\d\.]+)/);if(d!="")return new webfont.o("Opera",d,b,c,v(a),x(a,d)>=10)}d=w(a,a.a,/Opera[\/ ]([\d\.]+)/);if(d!="")return new webfont.o("Opera",d,b,c,v(a),x(a,d)>=10);return new webfont.o("Opera",webfont.e.f,b,c,v(a),false)} function t(a){var b=v(a),c=w(a,a.a,/AppleWebKit\/([\d\.\+]+)/);if(c=="")c=webfont.e.f;var d=webfont.e.f;if(a.a.indexOf("Chrome")!=-1)d="Chrome";else if(a.a.indexOf("Safari")!=-1)d="Safari";var e=webfont.e.f;if(a.a.indexOf("Version/")!=-1)e=w(a,a.a,/Version\/([\d\.\w]+)/);else if(d=="Chrome")e=w(a,a.a,/Chrome\/([\d\.]+)/);var f=w(a,c,/\d+\.(\d+)/);return new webfont.o(d,e,"AppleWebKit",c,b,x(a,c)>=526||x(a,c)>=525&&parseInt(f)>=13)} function u(a){var b=webfont.e.f,c=webfont.e.f,d=false;if(a.a.indexOf("Firefox")!=-1){b="Firefox";var e=w(a,a.a,/Firefox\/([\d\w\.]+)/);if(e!=""){d=w(a,e,/\d+\.(\d+)/);c=e;d=e!=""&&x(a,e)>=3&&parseInt(d)>=5}}else if(a.a.indexOf("Mozilla")!=-1)b="Mozilla";e=w(a,a.a,/rv:([^\)]+)/);if(e=="")e=webfont.e.f;else if(!d){d=x(a,e);var f=parseInt(w(a,e,/\d+\.(\d+)/)),h=parseInt(w(a,e,/\d+\.\d+\.(\d+)/));d=d>1||d==1&&f>9||d==1&&f==9&&h>=2||e.match(/1\.9\.1b[123]/)!=null||e.match(/1\.9\.1\.[\d\.]+/)!=null}return new webfont.o(b, c,"Gecko",e,v(a),d)}function x(a,b){a=w(a,b,/(\d+)/);if(a!="")return parseInt(a);return-1}function w(a,b,c){if((a=b.match(c))&&a[1])return a[1];return""};webfont.d=function(a,b,c,d){this.c=a;this.j=b;this.ba=c;this.q=d||webfont.d.oa;this.p=new webfont.F("-")};webfont.d.oa="wf";webfont.d.u="loading";webfont.d.D="active";webfont.d.I="inactive";webfont.d.O="font";function y(a){p(a.c,a.j,a.p.h(a.q,webfont.d.u));A(a,webfont.d.u)}function B(a,b,c){q(a.c,a.j,a.p.h(a.q,b,c,webfont.d.u));p(a.c,a.j,a.p.h(a.q,b,c,webfont.d.D));A(a,webfont.d.O+webfont.d.D,b,c)}function C(a){p(a.c,a.j,a.p.h(a.q,webfont.d.I));A(a,webfont.d.I)} function D(a){q(a.c,a.j,a.p.h(a.q,webfont.d.u));p(a.c,a.j,a.p.h(a.q,webfont.d.D));A(a,webfont.d.D)}function A(a,b,c,d){a.ba[b]&&a.ba[b](c,d)};webfont.qa=function(){this.ia={}};function E(a,b){var c=[];for(var d in b)if(b.hasOwnProperty(d)){var e=a.ia[d];e&&c.push(e(b[d]))}return c};webfont.t=function(a,b,c,d,e){this.c=a;this.v=b;this.S=c;this.L=d;this.fa=e;this.ca=0;this.X=this.ha=false;this.za=new webfont.$;this.M=new webfont.g};webfont.t.aa="DEFAULT_FONT";webfont.t.pa="n4"; webfont.t.prototype.watch=function(a,b,c){for(var d=a.length,e=0;e0)e=f}else e=["n4"];this.ja.push(d);this.la[d]=e}};webfont.A=function(a,b,c){this.a=a;this.c=b;this.k=c};webfont.A.B="google";webfont.A.prototype.Y=function(a,b){a.Ca.match(/iPad|iPod|iPhone/)!=null&&b(false);return b(a.Z)};webfont.A.prototype.load=function(a){var b=new webfont.H(this.k.api),c=this.k.families,d=this.c,e=this.a.getName()=="MSIE"&&this.k.blocking!=true;b.m=c;e?m(d,function(){i(d,"head",o(d,b.h()))}):i(d,"head",o(d,b.h()));c=new webfont.G(c);c.parse();a(c.ja,c.la)}; WebFont.K(webfont.A.B,function(a){var b=(new webfont.e(navigator.userAgent)).parse();return new webfont.A(b,new webfont.z(document),a)});webfont.w=function(a,b){this.c=a;this.k=b};webfont.w.B="custom";webfont.w.prototype.load=function(a){for(var b=this.k.urls||[],c=this.k.families||[],d=0,e=b.length;d