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