var Cufon=function(){function ft(n){var t=this.face=n.face,i={" ":1," ":1,"　":1};this.glyphs=n.glyphs,this.w=n.w,this.baseSize=parseInt(t["units-per-em"],10),this.family=t["font-family"].toLowerCase(),this.weight=t["font-weight"],this.style=t["font-style"]||"normal",this.viewBox=function(){var i=t.bbox.split(/\s+/),n={minX:parseInt(i[0],10),minY:parseInt(i[1],10),maxX:parseInt(i[2],10),maxY:parseInt(i[3],10)};return n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")},n}(),this.ascent=-parseInt(t.ascent,10),this.descent=-parseInt(t.descent,10),this.height=-this.ascent+this.descent,this.spacing=function(n,t,r){var l=this.glyphs,e,s,c,f=[],o=0,a=-1,h=-1,u;while(u=n[++a]){e=l[u]||this.missingGlyph;if(!e)continue;s&&(o-=c=s[u]||0,f[h]-=c),o+=f[++h]=~~(e.w||this.w)+t+(i[u]?r:0),s=e.k}return f.total=o,f}}function ut(){var n={},t={oblique:"italic",italic:"oblique"};this.add=function(t){(n[t.style]||(n[t.style]={}))[t.weight]=t},this.get=function(i,r){var e=n[i]||n[t[i]]||n.normal||n.italic||n.oblique,h,c,s,o,u;if(!e)return null;r={normal:400,bold:700}[r]||parseInt(r,10);if(e[r])return e[r];h={1:1,99:0}[r%100],c=[],h===undefined&&(h=r>400),r==500&&(r=400);for(u in e){if(!f(e,u))continue;u=parseInt(u,10),(!s||u<s)&&(s=u),(!o||u>o)&&(o=u),c.push(u)}return r<s&&(r=s),r>o&&(r=o),c.sort(function(n,t){return h?n>=r&&t>=r?n<t:n>t:n<=r&&t<=r?n>t:n<t?-1:1}),e[c[0]]}}function d(){function f(n,t){return n.contains?n.contains(t):n.compareDocumentPosition(t)&16}function u(n){var t=n.relatedTarget;if(!t||f(this,t))return;i(this,n.type=="mouseover")}function t(n){i(this,n.type=="mouseenter")}function i(t,i){setTimeout(function(){var r=a.get(t).options;n.replace(t,i?l(r,r.hover):r,!0)},10)}this.attach=function(n){n.onmouseenter===undefined?(r(n,"mouseover",u),r(n,"mouseout",u)):(r(n,"mouseenter",t),r(n,"mouseleave",t))}}function nt(){function r(n){for(var u=[],f,r=0;f=n[r];++r)u[r]=t[i[f]];return u}var t=[],i={};this.add=function(n,r){i[n]=t.push(r)-1},this.repeat=function(){for(var f=arguments.length?r(arguments):t,i,u=0;i=f[u++];)n.replace(i[0],i[1],!0)}}function g(){function t(n){return n.cufid||(n.cufid=++i)}var n={},i=0;this.get=function(i){var r=t(i);return n[r]||(n[r]={})}}function c(n){var i={},r={};this.extend=function(n){for(var t in n)f(n,t)&&(i[t]=n[t]);return this},this.get=function(t){return i[t]!=undefined?i[t]:n[t]},this.getSize=function(n,i){return r[n]||(r[n]=new t.Size(this.get(n),i))},this.isUsable=function(){return!!n}}function r(n,t,i){n.addEventListener?n.addEventListener(t,i,!1):n.attachEvent&&n.attachEvent("on"+t,function(){return i.call(n,window.event)})}function k(n,t){var i=a.get(n);return i.options?n:(t.hover&&t.hoverables[n.nodeName.toLowerCase()]&&b.attach(n),i.options=t,n)}function i(n){var t={};return function(i){return f(t,i)||(t[i]=n.apply(null,arguments)),t[i]}}function tt(n,i){for(var e=t.quotedList(i.get("fontFamily").toLowerCase()),r,f=0;r=e[f];++f)if(u[r])return u[r].get(i.get("fontStyle"),i.get("fontWeight"));return null}function e(n){return document.getElementsByTagName(n)}function f(n,t){return n.hasOwnProperty(t)}function l(){for(var u={},t,i,n=0,r=arguments.length;t=arguments[n],n<r;++n)for(i in t)f(t,i)&&(u[i]=t[i]);return u}function it(n,i,r,u,f,e){var l=document.createDocumentFragment(),a,o,c;if(i==="")return l;var v=u.separate,s=i.split(w[v]),y=v=="words";for(y&&p&&(/^\s/.test(i)&&s.unshift(""),/\s$/.test(i)&&s.push("")),o=0,c=s.length;o<c;++o)a=h[u.engine](n,y?t.textAlign(s[o],r,o,c):s[o],r,u,f,e,o<c-1),a&&l.appendChild(a);return l}function rt(n,i){var l=n.nodeName.toLowerCase();if(i.ignore[l])return;var a=!i.textless[l],f=t.getStyle(k(n,i)).extend(i),s=tt(n,f),r,o,e,u,v,c;if(!s)return;for(r=n.firstChild;r;r=e){o=r.nodeType,e=r.nextSibling;if(a&&o==3){u?(u.appendData(r.data),n.removeChild(r)):u=r;if(e)continue}u&&(n.replaceChild(it(s,t.whiteSpace(u.data,f,u,c),f,i,r,n),u),u=null),o==1&&(r.firstChild&&(r.nodeName.toLowerCase()=="cufon"?h[i.engine](s,null,f,i,r,n):arguments.callee(r,i)),c=r)}}var n=function(){return n.replace.apply(null,arguments)},o=n.DOM={ready:function(){var t=!1,u={loaded:1,complete:1},i=[],n=function(){if(t)return;t=!0;for(var n;n=i.shift();n());};return document.addEventListener&&(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("pageshow",n,!1)),!window.opera&&document.readyState&&function(){u[document.readyState]?n():setTimeout(arguments.callee,10)}(),document.readyState&&document.createStyleSheet&&function(){try{document.body.doScroll("left"),n()}catch(t){setTimeout(arguments.callee,1)}}(),r(window,"load",n),function(r){arguments.length?t?r():i.push(r):n()}}(),root:function(){return document.documentElement||document.body}},t=n.CSS={Size:function(n,t){this.value=parseFloat(n),this.unit=String(n).match(/[a-z%]*$/)[0]||"px",this.convert=function(n){return n/t*this.value},this.convertFrom=function(n){return n/this.value*t},this.toString=function(){return this.value+this.unit}},addClass:function(n,t){var i=n.className;return n.className=i+(i&&" ")+t,n},color:i(function(n){var t={};return t.color=n.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(n,i,r){return t.opacity=parseFloat(r),"rgb("+i+")"}),t}),fontStretch:i(function(n){return typeof n=="number"?n:/%$/.test(n)?parseFloat(n)/100:{"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}[n]||1}),getStyle:function(n){var t=document.defaultView;return t&&t.getComputedStyle?new c(t.getComputedStyle(n,null)):n.currentStyle?new c(n.currentStyle):new c(n.style)},gradient:i(function(n){for(var f={id:n,type:n.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},u=n.substr(n.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig),r,t=0,i=u.length;t<i;++t)r=u[t].split("=",2).reverse(),f.stops.push([r[1]||t/(i-1),r[0]]);return f}),quotedList:i(function(n){var i=[],r=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,t;while(t=r.exec(n))i.push(t[3]||t[1]);return i}),recognizesMedia:i(function(n){var t=document.createElement("style"),r,i,u;t.type="text/css",t.media=n;try{t.appendChild(document.createTextNode("/**/"))}catch(f){}return i=e("head")[0],i.insertBefore(t,i.firstChild),r=t.sheet||t.styleSheet,u=r&&!r.disabled,i.removeChild(t),u}),removeClass:function(n,t){var i=RegExp("(?:^|\\s+)"+t+"(?=\\s|$)","g");return n.className=n.className.replace(i,""),n},supports:function(n,t){var i=document.createElement("span").style;return i[n]===undefined?!1:(i[n]=t,i[n]===t)},textAlign:function(n,t,i,r){return t.get("textAlign")=="right"?i>0&&(n=" "+n):i<r-1&&(n+=" "),n},textShadow:i(function(n){if(n=="none")return null;var r=[],i={},t,u=0,f=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(t=f.exec(n))t[0]==","?(r.push(i),i={},u=0):t[1]?i.color=t[1]:i[["offX","offY","blur"][u++]]=t[2];return r.push(i),r}),textTransform:function(){var n={uppercase:function(n){return n.toUpperCase()},lowercase:function(n){return n.toLowerCase()},capitalize:function(n){return n.replace(/\b./g,function(n){return n.toUpperCase()})}};return function(t,i){var r=n[i.get("textTransform")];return r?r(t):t}}(),whiteSpace:function(){var i={inline:1,"inline-block":1,"run-in":1},n=/^\s+/,t=/\s+$/;return function(r,u,f,e){return e&&e.nodeName.toLowerCase()=="br"&&(r=r.replace(n,"")),i[u.get("display")]?r:(f.previousSibling||(r=r.replace(n,"")),f.nextSibling||(r=r.replace(t,"")),r)}}()};t.ready=function(){function u(n){return n.disabled||r(n.sheet,n.media||"screen")}function r(n,i){var e,f,u,o;if(!t.recognizesMedia(i||"all"))return!0;if(!n||n.disabled)return!1;try{e=n.cssRules;if(e)n:for(u=0,o=e.length;f=e[u],u<o;++u)switch(f.type){case 2:break;case 3:if(!r(f.styleSheet,f.media.mediaText))return!1;break;default:break n}}catch(s){}return!0}function s(){if(document.createStyleSheet)return!0;for(var t,n=0;t=c[n];++n)if(t.rel.toLowerCase()=="stylesheet"&&!u(t))return!1;for(n=0;t=l[n];++n)if(!u(t))return!1;return!0}var i=!t.recognizesMedia("all"),n=!1,f=[],h=function(){i=!0;for(var n;n=f.shift();n());},c=e("link"),l=e("style");return o.ready(function(){n||(n=t.getStyle(document.body).isUsable()),i||n&&s()?h():setTimeout(arguments.callee,10)}),function(n){i?n():f.push(n)}}();var p=" ".split(/\s+/).length==0,a=new g,b=new d,s=new nt,y=!1,h={},u={},v={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,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:!0,selector:window.Sizzle||window.jQuery&&function(n){return jQuery(n)}||window.dojo&&dojo.query||window.Ext&&Ext.query||window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query||window.$$&&function(n){return $$(n)}||window.$&&function(n){return $(n)}||document.querySelectorAll&&function(n){return document.querySelectorAll(n)}||e,separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"},w={words:/\s/.test(" ")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};return n.now=function(){return o.ready(),n},n.refresh=function(){return s.repeat.apply(s,arguments),n},n.registerEngine=function(t,i){return i?(h[t]=i,n.set("engine",t)):n},n.registerFont=function(t){if(!t)return n;var r=new ft(t),i=r.family;return u[i]||(u[i]=new ut),u[i].add(r),n.set("fontFamily",'"'+i+'"')},n.replace=function(i,r,u){return r=l(v,r),r.engine?(y||(t.addClass(o.root(),"cufon-active cufon-loading"),t.ready(function(){t.addClass(t.removeClass(o.root(),"cufon-loading"),"cufon-ready")}),y=!0),r.hover&&(r.forceHitArea=!0),r.autoDetect&&delete r.fontFamily,typeof r.textShadow=="string"&&(r.textShadow=t.textShadow(r.textShadow)),typeof r.color=="string"&&/^-/.test(r.color)?r.textGradient=t.gradient(r.color):delete r.textGradient,u||s.add(i,arguments),(i.nodeType||typeof i=="string")&&(i=[i]),t.ready(function(){for(var t,u=0,f=i.length;u<f;++u)t=i[u],typeof t=="string"?n.replace(r.selector(t),r,!0):rt(t,r)}),n):n},n.set=function(t,i){return v[t]=i,n},n}();Cufon.registerEngine("vml",function(){function o(n,t){return i(n,/(?:em|ex|%)$|^[a-z-]+$/i.test(t)?"1em":t)}function i(n,t){var u,r,i;return t==="0"?0:/px$/i.test(t)?parseFloat(t):(u=n.style.left,r=n.runtimeStyle.left,n.runtimeStyle.left=n.currentStyle.left,n.style.left=t.replace("%","em"),i=n.style.pixelLeft,n.style.left=u,n.runtimeStyle.left=r,i)}function f(n,t,r,u){var e="computed"+u,f=t[e];return isNaN(f)&&(f=t.get(u),t[e]=f=f=="normal"?0:~~r.convertFrom(i(n,f))),f}function e(n){var e=n.id,r,f;if(!t[e]){var u=n.stops,i=document.createElement("cvml:fill"),o=[];for(i.type="gradient",i.angle=180,i.focus="0",i.method="sigma",i.color=u[0][1],r=1,f=u.length-1;r<f;++r)o.push(u[r][0]*100+"% "+u[r][1]);i.colors=o.join(","),i.color2=u[f][1],t[e]=i}return t[e]}var r=document.namespaces,n,u,t;if(!r)return;return r.add("cvml","urn:schemas-microsoft-com:vml"),r=null,n=document.createElement("cvml:shape"),n.style.behavior="url(#default#VML)",n.coordsize?(n=null,u=(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:'+(u?"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;")),t={},function(n,t,r,s,h,c,l){var yt=t===null,g,p,y,b,ct,ft,a,st,v,at,lt,d,k;yt&&(t=h.alt),g=n.viewBox,p=r.computedFontSize||(r.computedFontSize=new Cufon.CSS.Size(o(c,r.get("fontSize"))+"px",n.baseSize)),yt?(y=h,b=h.firstChild):(y=document.createElement("cufon"),y.className="cufon cufon-vml",y.alt=t,b=document.createElement("cufoncanvas"),y.appendChild(b),s.printable&&(ct=document.createElement("cufontext"),ct.appendChild(document.createTextNode(t)),y.appendChild(ct)),l||y.appendChild(document.createElement("cvml:shape")));var tt=y.style,ht=b.style,ti=p.convert(g.height),ut=Math.ceil(ti),hi=ut/ti,ii=hi*Cufon.CSS.fontStretch(r.get("fontStretch")),vt=g.minX,ri=g.minY;ht.height=ut,ht.top=Math.round(p.convert(ri-n.ascent)),ht.left=Math.round(p.convert(vt)),tt.height=p.convert(n.height)+"px";var vi=r.get("color"),pt=Cufon.CSS.textTransform(t,r).split(""),nt=n.spacing(pt,f(c,r,p,"letterSpacing"),f(c,r,p,"wordSpacing"));if(!nt.length)return null;var dt=nt.total,fi=-vt+dt+(g.width-nt[nt.length-1]),ci=p.convert(fi*ii),gt=Math.round(ci),ni=fi+","+g.height,oi,li="r"+ni+"ns",ui=s.textGradient&&e(s.textGradient),si=n.glyphs,ei=0,ot=s.textShadow,bt=-1,kt=0,ai;while(ai=pt[++bt]){ft=si[pt[bt]]||n.missingGlyph;if(!ft)continue;if(yt){a=b.childNodes[kt];while(a.firstChild)a.removeChild(a.firstChild)}else a=document.createElement("cvml:shape"),b.appendChild(a);a.stroked="f",a.coordsize=ni,a.coordorigin=oi=vt-ei+","+ri,a.path=(ft.d?"m"+ft.d+"xe":"")+"m"+oi+li,a.fillcolor=vi,ui&&a.appendChild(ui.cloneNode(!1)),st=a.style,st.width=gt,st.height=ut;if(ot){var et=ot[0],it=ot[1],wt=Cufon.CSS.color(et.color),rt,w=document.createElement("cvml:shadow");w.on="t",w.color=wt.color,w.offset=et.offX+","+et.offY,it&&(rt=Cufon.CSS.color(it.color),w.type="double",w.color2=rt.color,w.offset2=it.offX+","+it.offY),w.opacity=wt.opacity||rt&&rt.opacity||1,a.appendChild(w)}ei+=nt[kt++]}return v=a.nextSibling,s.forceHitArea?(v||(v=document.createElement("cvml:rect"),v.stroked="f",v.className="cufon-vml-cover",at=document.createElement("cvml:fill"),at.opacity=0,v.appendChild(at),b.appendChild(v)),lt=v.style,lt.width=gt,lt.height=ut):v&&b.removeChild(v),tt.width=Math.max(Math.ceil(p.convert(dt*ii)),0),u&&(d=r.computedYAdjust,d===undefined&&(k=r.get("lineHeight"),k=="normal"?k="1em":isNaN(k)||(k+="em"),r.computedYAdjust=d=.5*(i(c,k)-parseFloat(tt.height))),d&&(tt.marginTop=Math.ceil(d)+"px",tt.marginBottom=d+"px")),y}):void 0}()),Cufon.registerEngine("canvas",function(){function u(n,t){var e=0,f=0,u=[],s=/([mrvxe])([^a-z]*)/g,o,r,i;n:for(r=0;o=s.exec(n);++r){i=o[2].split(",");switch(o[1]){case"v":u[r]={m:"bezierCurveTo",a:[e+~~i[0],f+~~i[1],e+~~i[2],f+~~i[3],e+=~~i[4],f+=~~i[5]]};break;case"r":u[r]={m:"lineTo",a:[e+=~~i[0],f+=~~i[1]]};break;case"m":u[r]={m:"moveTo",a:[e=~~i[0],f=~~i[1]]};break;case"x":u[r]={m:"closePath"};break;case"e":break n}t[u[r].m].apply(t,u[r].a)}return u}function r(n,t){for(var r,i=0,u=n.length;i<u;++i)r=n[i],t[r.m].apply(t,r.a)}var n=document.createElement("canvas");if(!n||!n.getContext||!n.getContext.apply)return;n=null;var i=Cufon.CSS.supports("display","inline-block"),f=!i&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId)),t=document.createElement("style");return t.type="text/css",t.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;overflow:hidden;text-indent:-10000in;}"+(i?"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(t),function(n,t,f,e,o){function vt(){var o=n.glyphs,i=-1,e=-1,f,t;h.scale(dt,1);while(f=ut[++i]){t=o[ut[i]]||n.missingGlyph;if(!t)continue;t.d&&(h.beginPath(),t.code?r(t.code,h):t.code=u("m"+t.d,h),h.fill()),h.translate(p[++e],0)}h.restore()}var yt=t===null,ut,p,kt,a,y,at,et,h,ot,rt,st,ht,ft,l,pt;yt&&(t=o.getAttribute("alt"));var v=n.viewBox,c=f.getSize("fontSize",n.baseSize),k=0,nt=0,ct=0,b=0,w=e.textShadow,bt=[];if(w)for(l=w.length;l--;){var rt=w[l],g=c.convertFrom(parseFloat(rt.offX)),d=c.convertFrom(parseFloat(rt.offY));bt[l]=[g,d],d<k&&(k=d),g>nt&&(nt=g),d>ct&&(ct=d),g<b&&(b=g)}ut=Cufon.CSS.textTransform(t,f).split(""),p=n.spacing(ut,~~c.convertFrom(parseFloat(f.get("letterSpacing"))||0),~~c.convertFrom(parseFloat(f.get("wordSpacing"))||0));if(!p.length)return null;kt=p.total,nt+=v.width-p[p.length-1],b+=v.minX,yt?(a=o,y=o.firstChild):(a=document.createElement("cufon"),a.className="cufon cufon-canvas",a.setAttribute("alt",t),y=document.createElement("canvas"),a.appendChild(y),e.printable&&(at=document.createElement("cufontext"),at.appendChild(document.createTextNode(t)),a.appendChild(at)));var tt=a.style,it=y.style,lt=c.convert(v.height),ii=Math.ceil(lt),wt=ii/lt,dt=wt*Cufon.CSS.fontStretch(f.get("fontStretch")),ti=kt*dt,gt=Math.ceil(c.convert(ti+nt-b)),ni=Math.ceil(c.convert(v.height-k+ct));y.width=gt,y.height=ni,it.width=gt+"px",it.height=ni+"px",k+=v.minY,it.top=Math.round(c.convert(k-n.ascent))+"px",it.left=Math.round(c.convert(b))+"px",et=Math.max(Math.ceil(c.convert(ti)),0)+"px",i?(tt.width=et,tt.height=c.convert(n.height)+"px"):(tt.paddingLeft=et,tt.paddingBottom=c.convert(n.height)-1+"px"),h=y.getContext("2d"),ot=lt/v.height,h.scale(ot,ot*wt),h.translate(-b,-k),h.save();if(w)for(l=w.length;l--;)rt=w[l],h.save(),h.fillStyle=rt.color,h.translate.apply(h,bt[l]),vt();st=e.textGradient;if(st){for(ht=st.stops,ft=h.createLinearGradient(0,v.minY,0,v.maxY),l=0,pt=ht.length;l<pt;++l)ft.addColorStop.apply(ft,ht[l]);h.fillStyle=ft}else h.fillStyle=f.get("color");return vt(),a}}())
