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