/* * Copyright (c) 2009 Simo Kinnunen. * Licensed under the MIT license. */ var Cufon=(function(){var L=function(){return L.replace.apply(null,arguments)};var V=L.DOM={ready:(function(){var a=false,c={loaded:1,complete:1};var Z=[],b=function(){if(a){return}a=true;for(var d;d=Z.shift();d()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",b,false);window.addEventListener("pageshow",b,false)}if(!window.opera&&document.readyState){(function(){c[document.readyState]?b():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");b()}catch(d){setTimeout(arguments.callee,1)}})()}P(window,"load",b);return function(d){if(!arguments.length){b()}else{a?d():Z.push(d)}}})()};var M=L.CSS={Size:function(a,Z){this.value=parseFloat(a);this.unit=String(a).match(/[a-z%]*$/)[0]||"px";this.convert=function(b){return b/Z*this.value};this.convertFrom=function(b){return b/this.value*Z};this.toString=function(){return this.value+this.unit}},getStyle:function(a){var Z=document.defaultView;if(Z&&Z.getComputedStyle){return new A(Z.getComputedStyle(a,null))}if(a.currentStyle){return new A(a.currentStyle)}return new A(a.style)},quotedList:I(function(c){var b=[],a=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,Z;while(Z=a.exec(c)){b.push(Z[3]||Z[1])}return b}),recognizesMedia:I(function(c){var b=document.createElement("style"),a,Z;b.type="text/css";b.media=c;a=F("head")[0];a.insertBefore(b,a.firstChild);Z=!!(b.sheet||b.styleSheet);a.removeChild(b);return Z}),supports:function(b,a){var Z=document.createElement("span").style;if(Z[b]===undefined){return false}Z[b]=a;return Z[b]===a},textAlign:function(c,b,Z,a){if(b.get("textAlign")=="right"){if(Z>0){c=" "+c}}else{if(Z400}if(g==500){g=400}for(var h in e){if(!J(e,h)){continue}h=parseInt(h,10);if(!d||hb){b=h}i.push(h)}if(gb){g=b}i.sort(function(k,j){return(c?(k>g&&j>g)?kj:(kj:kj){j=c}if(b>f){f=b}if(c.cufon-vml-canvas{text-indent:0}@media screen{cvml\\:shape,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:middle}.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}}');function C(D,E){return A(D,/(?:em|ex|%)$/i.test(E)?"1em":E)}function A(G,H){if(/px$/i.test(H)){return parseFloat(H)}var F=G.style.left,E=G.runtimeStyle.left;G.runtimeStyle.left=G.currentStyle.left;G.style.left=H;var D=G.style.pixelLeft;G.style.left=F;G.runtimeStyle.left=E;return D}return function(s,V,n,S,Z,t,j){var G=(V===null);if(G){V=Z.alt}var X=s.viewBox;var H=n.computedFontSize||(n.computedFontSize=new Cufon.CSS.Size(C(t,n.get("fontSize"))+"px",s.baseSize));var h=n.computedLSpacing;if(h==undefined){h=n.get("letterSpacing");n.computedLSpacing=h=(h=="normal")?0:~~H.convertFrom(A(t,h))}var P,I;if(G){P=Z;I=Z.firstChild}else{P=document.createElement("span");P.className="cufon cufon-vml";P.alt=V;I=document.createElement("span");I.className="cufon-vml-canvas";P.appendChild(I);if(S.printable){var q=document.createElement("span");q.className="cufon-alt";q.appendChild(document.createTextNode(V));P.appendChild(q)}if(!j){P.appendChild(document.createElement("cvml:shape"))}}var y=P.style;var c=I.style;var E=H.convert(X.height),v=Math.ceil(E);var g=v/E;var f=X.minX,e=X.minY;c.height=v;c.top=Math.round(H.convert(e-s.ascent));c.left=Math.round(H.convert(f));y.height=H.convert(s.height)+"px";var L=S.enableTextDecoration?Cufon.CSS.textDecoration(t,n):{};var U=n.get("color");var w=Cufon.CSS.textTransform(V,n).split("");var D=0,d=0,M=null;var T,N,W=S.textShadow;for(var r=0,p=0,o=w.length;r