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