﻿var Cufon=function(){var a=function(){return a.replace.apply(null,arguments)},h=a.DOM={ready:function(){var b=false,d={loaded:1,complete:1},c=[],a=function(){if(b)return;b=true;for(var a;a=c.shift();a());};if(document.addEventListener){document.addEventListener("DOMContentLoaded",a,false);window.addEventListener("pageshow",a,false)}if(!window.opera&&document.readyState)(function(){d[document.readyState]?a():setTimeout(arguments.callee,10)})();if(document.readyState&&document.createStyleSheet)(function(){try{document.body.doScroll("left");a()}catch(b){setTimeout(arguments.callee,1)}})();f(window,"load",a);return function(d){if(!arguments.length)a();else b?d():c.push(d)}}(),root:function(){return document.documentElement||document.body}},b=a.CSS={Size:function(b,a){this.value=parseFloat(b);this.unit=String(b).match(/[a-z%]*$/)[0]||"px";this.convert=function(b){return b/a*this.value};this.convertFrom=function(b){return b/this.value*a};this.toString=function(){return this.value+this.unit}},addClass:function(a,c){var b=a.className;a.className=b+(b&&" ")+c;return a},color:c(function(b){var a={};a.color=b.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(d,b,c){a.opacity=parseFloat(c);return "rgb("+b+")"});return a}),fontStretch:c(function(a){if(typeof a=="number")return a;if(/%$/.test(a))return parseFloat(a)/100;return ({"ultra-condensed":.5,"extra-condensed":.625,condensed:.75,"semi-condensed":.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2})[a]||1}),getStyle:function(a){var b=document.defaultView;if(b&&b.getComputedStyle)return new i(b.getComputedStyle(a,null));if(a.currentStyle)return new i(a.currentStyle);return new i(a.style)},gradient:c(function(b){var f={id:b,type:b.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},e=b.substr(b.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var a=0,d=e.length,c;a<d;++a){c=e[a].split("=",2).reverse();f.stops.push([c[1]||a/(d-1),c[0]])}return f}),hasClass:function(b,a){return RegExp("(?:^|\\s)"+a+"(?=\\s|$)").test(b.className)},quotedList:c(function(d){var b=[],c=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,a;while(a=c.exec(d))b.push(a[3]||a[1]);return b}),recognizesMedia:c(function(e){var a=document.createElement("style"),c,b,d;a.type="text/css";a.media=e;try{a.appendChild(document.createTextNode("/**/"))}catch(f){}b=g("head")[0];b.insertBefore(a,b.firstChild);c=a.sheet||a.styleSheet;d=c&&!c.disabled;b.removeChild(a);return d}),removeClass:function(a,c){var b=RegExp("(?:^|\\s+)"+c+"(?=\\s|$)","g");a.className=a.className.replace(b,"");return a},supports:function(b,c){var a=document.createElement("span").style;if(a[b]===undefined)return false;a[b]=c;return a[b]===c},textAlign:function(a,d,b,c){if(d.get("textAlign")=="right"){if(b>0)a=" "+a}else if(b<c-1)a+=" ";return a},textDecoration:function(g,b){if(!b)b=this.getStyle(g);var a={underline:null,overline:null,"line-through":null};for(var c=g;c.parentNode&&c.parentNode.nodeType==1;){var f=true;for(var d in a){if(!e(a,d)||a[d])continue;if(b.get("textDecoration").indexOf(d)!=-1)a[d]=b.get("color");f=false}if(f)break;b=this.getStyle(c=c.parentNode)}return a},textShadow:c(function(e){if(e=="none")return null;var c=[],b={},a,d=0,f=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(a=f.exec(e))if(a[0]==","){c.push(b);b={};d=0}else if(a[1])b.color=a[1];else b[(["offX","offY","blur"])[d++]]=a[2];c.push(b);return c}),textTransform:function(){var a={uppercase:function(a){return a.toUpperCase()},lowercase:function(a){return a.toLowerCase()},capitalize:function(a){return a.replace(/\b./g,function(a){return a.toUpperCase()})}};return function(c,d){var b=a[d.get("textTransform")];return b?b(c):c}}(),whiteSpace:function(){var a={inline:1,"inline-block":1,"run-in":1};return function(b,d,c){if(a[d.get("display")])return b;if(!c.previousSibling)b=b.replace(/^\s+/,"");if(!c.nextSibling)b=b.replace(/\s+$/,"");return b}}()};b.ready=function(){var a=!b.recognizesMedia("all"),c=false,e=[],j=function(){a=true;for(var b;b=e.shift();b());},k=g("link"),l=g("style");function d(a){return a.disabled||f(a.sheet,a.media||"screen")}function f(d,h){if(!b.recognizesMedia(h||"all"))return true;if(!d||d.disabled)return false;try{var e=d.cssRules,a;if(e)a:for(var c=0,g=e.length;a=e[c],c<g;++c)switch(a.type){case 2:break;case 3:if(!f(a.styleSheet,a.media.mediaText))return false;break;default:break a}}catch(i){}return true}function i(){if(document.createStyleSheet)return true;var b,a;for(a=0;b=k[a];++a)if(b.rel.toLowerCase()=="stylesheet"&&!d(b))return false;for(a=0;b=l[a];++a)if(!d(b))return false;return true}h.ready(function(){if(!c)c=b.getStyle(document.body).isUsable();if(a||c&&i())j();else setTimeout(arguments.callee,10)});return function(b){if(a)b();else e.push(b)}}();function x(b){var a=this.face=b.face;this.glyphs=b.glyphs;this.w=b.w;this.baseSize=parseInt(a["units-per-em"],10);this.family=a["font-family"].toLowerCase();this.weight=a["font-weight"];this.style=a["font-style"]||"normal";this.viewBox=function(){var c=a.bbox.split(/\s+/),b={minX:parseInt(c[0],10),minY:parseInt(c[1],10),maxX:parseInt(c[2],10),maxY:parseInt(c[3],10)};b.width=b.maxX-b.minX;b.height=b.maxY-b.minY;b.toString=function(){return [this.minX,this.minY,this.width,this.height].join(" ")};return b}();this.ascent=-parseInt(a.ascent,10);this.descent=-parseInt(a.descent,10);this.height=-this.ascent+this.descent}function r(){var a={},b={oblique:"italic",italic:"oblique"};this.add=function(b){(a[b.style]||(a[b.style]={}))[b.weight]=b};this.get=function(k,c){var f=a[k]||a[b[k]]||a.normal||a.italic||a.oblique;if(!f)return null;c=({normal:400,bold:700})[c]||parseInt(c,10);if(f[c])return f[c];var i=({1:1,99:0})[c%100],j=[],h,g;if(i===undefined)i=c>400;if(c==500)c=400;for(var d in f){if(!e(f,d))continue;d=parseInt(d,10);if(!h||d<h)h=d;if(!g||d>g)g=d;j.push(d)}if(c<h)c=h;if(c>g)c=g;j.sort(function(b,a){return i?b>c&&a>c?b<a:b>a:b<c&&a<c?b>a:b<a?-1:1});return f[j[0]]}}function w(){function e(a,b){if(a.contains)return a.contains(b);return a.compareDocumentPosition(b)&16}function b(b){var a=b.relatedTarget;if(!a||e(this,a))return;c(this)}function d(){c(this)}function c(b){setTimeout(function(){a.replace(b,l.get(b).options,true)},10)}this.attach=function(a){if(a.onmouseenter===undefined){f(a,"mouseover",b);f(a,"mouseout",b)}else{f(a,"mouseenter",d);f(a,"mouseleave",d)}}}function z(){var b=[],c={};function d(f){var d=[],e;for(var a=0;e=f[a];++a)d[a]=b[c[e]];return d}this.add=function(d,a){c[d]=b.push(a)-1};this.repeat=function(){var e=arguments.length?d(arguments):b,c;for(var f=0;c=e[f++];)a.replace(c[0],c[1],true)}}function o(){var a={},b=0;function c(a){return a.cufid||(a.cufid=++b)}this.get=function(d){var b=c(d);return a[b]||(a[b]={})}}function i(c){var a={},d={};this.extend=function(b){for(var c in b)if(e(b,c))a[c]=b[c];return this};this.get=function(b){return a[b]!=undefined?a[b]:c[b]};this.getSize=function(a,c){return d[a]||(d[a]=new b.Size(this.get(a),c))};this.isUsable=function(){return !!c}}function f(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else if(a.attachEvent)a.attachEvent("on"+b,function(){return c.call(a,window.event)})}function A(a,b){var c=l.get(a);if(c.options)return a;if(b.hover&&b.hoverables[a.nodeName.toLowerCase()])p.attach(a);c.options=b;return a}function c(b){var a={};return function(c){if(!e(a,c))a[c]=b.apply(null,arguments);return a[c]}}function q(g,c){var f=b.quotedList(c.get("fontFamily").toLowerCase()),a;for(var e=0;a=f[e];++e)if(d[a])return d[a].get(c.get("fontStyle"),c.get("fontWeight"));return null}function g(a){return document.getElementsByTagName(a)}function e(b,a){return b.hasOwnProperty(a)}function s(){var d={},a,b;for(var c=0,f=arguments.length;a=arguments[c],c<f;++c)for(b in a)if(e(a,b))d[b]=a[b];return d}function u(n,d,j,h,o,m){var g=document.createDocumentFragment(),f;if(d==="")return g;var l=h.separate,c=d.split(v[l]),i=l=="words";if(i&&y){if(/^\s/.test(d))c.unshift("");if(/\s$/.test(d))c.push("")}for(var a=0,e=c.length;a<e;++a){f=k[h.engine](n,i?b.textAlign(c[a],j,a,e):c[a],j,h,o,m,a<e-1);if(f)g.appendChild(f)}return g}function t(d,e){var f=b.getStyle(A(d,e)).extend(e),i=q(d,f),a,h,g,c,j;for(a=d.firstChild;a;a=g){h=a.nodeType;g=a.nextSibling;if(h==3){if(c){c.appendData(a.data);d.removeChild(a)}else c=a;if(g)continue}if(c){d.replaceChild(u(i,b.whiteSpace(c.data,f,c),f,e,a,d),c);c=null}if(h==1&&a.firstChild)if(b.hasClass(a,"cufon"))k[e.engine](i,null,f,e,a,d);else arguments.callee(a,e)}}var y=" ".split(/\s+/).length==0,l=new o,p=new w,j=new z,m=false,k={},d={},n={enableTextDecoration:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},printable:true,selector:window.Sizzle||window.jQuery&&function(a){return jQuery(a)}||window.dojo&&dojo.query||window.Ext&&Ext.query||window.$$&&function(a){return $$(a)}||window.$&&function(a){return $(a)}||document.querySelectorAll&&function(a){return document.querySelectorAll(a)}||g,separate:"words",textShadow:"none"},v={words:/[^\S\u00a0]+/,characters:"",none:/^/};a.now=function(){h.ready();return a};a.refresh=function(){j.repeat.apply(j,arguments);return a};a.registerEngine=function(c,b){if(!b)return a;k[c]=b;return a.set("engine",c)};a.registerFont=function(e){var c=new x(e),b=c.family;if(!d[b])d[b]=new r;d[b].add(c);return a.set("fontFamily",'"'+b+'"')};a.replace=function(d,c,e){c=s(n,c);if(!c.engine)return a;if(!m){b.addClass(h.root(),"cufon-active cufon-loading");b.ready(function(){b.addClass(b.removeClass(h.root(),"cufon-loading"),"cufon-ready")});m=true}if(c.hover)c.forceHitArea=true;if(typeof c.textShadow=="string")c.textShadow=b.textShadow(c.textShadow);if(typeof c.color=="string"&&/^-/.test(c.color))c.textGradient=b.gradient(c.color);if(!e)j.add(d,arguments);if(d.nodeType||typeof d=="string")d=[d];b.ready(function(){for(var b=0,f=d.length;b<f;++b){var e=d[b];if(typeof e=="string")a.replace(c.selector(e),c,true);else t(e,c)}});return a};a.set=function(b,c){n[b]=c;return a};return a}();Cufon.registerEngine("canvas",function(){var a=document.createElement("canvas");if(!a||!a.getContext||!a.getContext.apply)return;a=null;var b=Cufon.CSS.supports("display","inline-block"),f=!b&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId)),c=document.createElement("style");c.type="text/css";c.appendChild(document.createTextNode((".cufon-canvas{text-indent:0;}@media screen,projection{.cufon-canvas{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(f?"":"font-size:1px;line-height:1px;")+"}.cufon-canvas .cufon-alt{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(b?".cufon-canvas canvas{position:relative;}":".cufon-canvas canvas{position:absolute;}")+"}@media print{.cufon-canvas{padding:0;}.cufon-canvas canvas{display:none;}.cufon-canvas .cufon-alt{display:inline;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(c);function e(i,g){var e=0,d=0,b=[],h=/([mrvxe])([^a-z]*)/g,f;a:for(var c=0;f=h.exec(i);++c){var a=f[2].split(",");switch(f[1]){case "v":b[c]={m:"bezierCurveTo",a:[e+~~a[0],d+~~a[1],e+~~a[2],d+~~a[3],e+=~~a[4],d+=~~a[5]]};break;case "r":b[c]={m:"lineTo",a:[e+=~~a[0],d+=~~a[1]]};break;case "m":b[c]={m:"moveTo",a:[e=~~a[0],d=~~a[1]]};break;case "x":b[c]={m:"closePath"};break;case "e":break a}g[b[c].m].apply(g,b[c].a)}return b}function d(d,c){for(var a=0,e=d.length;a<e;++a){var b=d[a];c[b.m].apply(c,b.a)}}return function(c,p,o,u,B,bb){var T=p===null;if(T)p=B.alt;var i=c.viewBox,g=o.getSize("fontSize",c.baseSize),y=o.get("letterSpacing");y=y=="normal"?0:g.convertFrom(parseInt(y,10));var m=0,z=0,J=0,k=0,l=u.textShadow,Y=[];if(l)for(var f=l.length;f--;){var E=l[f],r=g.convertFrom(parseFloat(E.offX)),q=g.convertFrom(parseFloat(E.offY));Y[f]=[r,q];if(q<m)m=q;if(r>z)z=r;if(q>J)J=q;if(r<k)k=r}var s=Cufon.CSS.textTransform(p,o).split(""),Q,U=c.glyphs,v,F,M,w=0,H,D=[];for(var f=0,N=0,L=s.length;f<L;++f){v=U[Q=s[f]]||c.missingGlyph;if(!v)continue;if(F){w-=M=F[Q]||0;D[N-1]-=M}w+=H=D[N++]=~~(v.w||c.w)+y;F=v.k}if(H===undefined)return null;z+=i.width-H;k+=i.minX;var h,j;if(T){h=B;j=B.firstChild}else{h=document.createElement("span");h.className="cufon cufon-canvas";h.alt=p;j=document.createElement("canvas");h.appendChild(j);if(u.printable){var A=document.createElement("span");A.className="cufon-alt";A.appendChild(document.createTextNode(p));h.appendChild(A)}}var t=h.style,x=j.style,C=g.convert(i.height),cb=Math.ceil(C),Z=cb/C,V=Z*Cufon.CSS.fontStretch(o.get("fontStretch")),W=w*V,K=Math.ceil(g.convert(W+z-k)),X=Math.ceil(g.convert(i.height-m+J));j.width=K;j.height=X;x.width=K+"px";x.height=X+"px";m+=i.minY;x.top=Math.round(g.convert(m-c.ascent))+"px";x.left=Math.round(g.convert(k))+"px";var P=Math.ceil(g.convert(W))+"px";if(b){t.width=P;t.height=g.convert(c.height)+"px"}else{t.paddingLeft=P;t.paddingBottom=g.convert(c.height)-1+"px"}var a=j.getContext("2d"),S=C/i.height;a.scale(S,S*Z);a.translate(-k,-m);a.lineWidth=c.face["underline-thickness"];a.save();function G(b,c){a.strokeStyle=c;a.beginPath();a.moveTo(0,b);a.lineTo(w,b);a.stroke()}var n=u.enableTextDecoration?Cufon.CSS.textDecoration(bb,o):{};if(n.underline)G(-c.face["underline-position"],n.underline);if(n.overline)G(c.ascent,n.overline);function O(){a.scale(V,1);for(var f=0,h=0,g=s.length;f<g;++f){var b=U[s[f]]||c.missingGlyph;if(!b)continue;if(b.d){a.beginPath();if(b.code)d(b.code,a);else b.code=e("m"+b.d,a);a.fill()}a.translate(D[h++],0)}a.restore()}if(l)for(var f=l.length;f--;){var E=l[f];a.save();a.fillStyle=E.color;a.translate.apply(a,Y[f]);O()}var ab=u.textGradient;if(ab){var R=ab.stops,I=a.createLinearGradient(0,i.minY,0,i.maxY);for(var f=0,L=R.length;f<L;++f)I.addColorStop.apply(I,R[f]);a.fillStyle=I}else a.fillStyle=o.get("color");O();if(n["line-through"])G(-c.descent,n["line-through"]);return h}}());Cufon.registerEngine("vml",function(){var c=document.namespaces;if(!c)return;c.add("cvml","urn:schemas-microsoft-com:vml");c=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize)return;b=null;var e=(document.documentMode||0)<8;document.write(('<style type="text/css">.cufon-vml-canvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}.cufon-vml-canvas{position:absolute;text-align:left;}.cufon-vml{display:inline-block;position:relative;vertical-align:'+(e?"middle":"text-bottom")+";}.cufon-vml .cufon-alt{position:absolute;left:-10000in;font-size:1px;}a .cufon-vml{cursor:pointer}}@media print{.cufon-vml *{display:none;}.cufon-vml .cufon-alt{display:inline;}}</style>").replace(/;/g,"!important;"));function f(c,b){return a(c,/(?:em|ex|%)$|^[a-z-]+$/i.test(b)?"1em":b)}function a(a,b){if(/px$/i.test(b))return parseFloat(b);var e=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b.replace("%","em");var c=a.style.pixelLeft;a.style.left=e;a.runtimeStyle.left=d;return c}var d={};function g(h){var e=h.id;if(!d[e]){var b=h.stops,a=document.createElement("cvml:fill"),f=[];a.type="gradient";a.angle=180;a.focus="0";a.method="sigma";a.color=b[0][1];for(var c=1,g=b.length-1;c<g;++c)f.push(b[c][0]*100+"% "+b[c][1]);a.colors=f.join(",");a.color2=b[g][1];d[e]=a}return d[e]}return function(j,t,c,p,F,w,db){var G=t===null;if(G)t=F.alt;var u=j.viewBox,n=c.computedFontSize||(c.computedFontSize=new Cufon.CSS.Size(f(w,c.get("fontSize"))+"px",j.baseSize)),o=c.computedLSpacing;if(o==undefined){o=c.get("letterSpacing");c.computedLSpacing=o=o=="normal"?0:~~n.convertFrom(a(w,o))}var d,i;if(G){d=F;i=F.firstChild}else{d=document.createElement("span");d.className="cufon cufon-vml";d.alt=t;i=document.createElement("span");i.className="cufon-vml-canvas";d.appendChild(i);if(p.printable){var B=document.createElement("span");B.className="cufon-alt";B.appendChild(document.createTextNode(t));d.appendChild(B)}if(!db)d.appendChild(document.createElement("cvml:shape"))}var r=d.style,K=i.style,V=n.convert(u.height),x=Math.ceil(V),hb=x/V,Z=hb*Cufon.CSS.fontStretch(c.get("fontStretch")),N=u.minX,bb=u.minY;K.height=x;K.top=Math.round(n.convert(bb-j.ascent));K.left=Math.round(n.convert(N));r.height=n.convert(j.height)+"px";var ib=p.enableTextDecoration?Cufon.CSS.textDecoration(w,c):{},fb=c.get("color"),C=Cufon.CSS.textTransform(t,c).split(""),T,X=j.glyphs,k,I,Q,z=0,H=[],ab=0,M,b,E=p.textShadow;for(var m=0,q=0,P=C.length;m<P;++m){k=X[T=C[m]]||j.missingGlyph;if(!k)continue;if(I){z-=Q=I[T]||0;H[q-1]-=Q}z+=M=H[q++]=~~(k.w||j.w)+o;I=k.k}if(M===undefined)return null;var S=-N+z+(u.width-M),eb=n.convert(S*Z),O=Math.round(eb),Y=S+","+u.height,W,gb="r"+Y+"ns",cb=p.textGradient&&g(p.textGradient);for(m=0,q=0;m<P;++m){k=X[C[m]]||j.missingGlyph;if(!k)continue;if(G){b=i.childNodes[q];while(b.firstChild)b.removeChild(b.firstChild)}else{b=document.createElement("cvml:shape");i.appendChild(b)}b.stroked="f";b.coordsize=Y;b.coordorigin=W=N-ab+","+bb;b.path=(k.d?"m"+k.d+"xe":"")+"m"+W+gb;b.fillcolor=fb;if(cb)b.appendChild(cb.cloneNode(false));var R=b.style;R.width=O;R.height=x;if(E){var J=E[0],A=E[1],U=Cufon.CSS.color(J.color),y,l=document.createElement("cvml:shadow");l.on="t";l.color=U.color;l.offset=J.offX+","+J.offY;if(A){y=Cufon.CSS.color(A.color);l.type="double";l.color2=y.color;l.offset2=A.offX+","+A.offY}l.opacity=U.opacity||y&&y.opacity||1;b.appendChild(l)}ab+=H[q++]}var h=b.nextSibling,L,D;if(p.forceHitArea){if(!h){h=document.createElement("cvml:rect");h.stroked="f";h.className="cufon-vml-cover";L=document.createElement("cvml:fill");L.opacity=0;h.appendChild(L);i.appendChild(h)}D=h.style;D.width=O;D.height=x}else if(h)i.removeChild(h);r.width=Math.max(Math.ceil(n.convert(z*Z)),0);if(e){var v=c.computedYAdjust;if(v===undefined){var s=c.get("lineHeight");if(s=="normal")s="1em";else if(!isNaN(s))s+="em";c.computedYAdjust=v=.5*(a(w,s)-parseFloat(r.height))}if(v){r.marginTop=Math.ceil(v)+"px";r.marginBottom=v+"px"}}return d}}())
