
/* jscript version of PHP's in_array */
function in_array(a){
	  var o = {};
	  for(var i=0;i<a.length;i++)
	  {
		o[a[i]]='';
	  }
	  return o;
}

/*	ColorBox v1.3.3 - a full featured, light-weight, customizable lightbox based on jQuery 1.3 */
(function(c){var s="colorbox",B="hover",o=true,g=false,e,E=!c.support.opacity,N=E&&!window.XMLHttpRequest,O="click.colorbox",fa="cbox_open",J="cbox_load",P="cbox_complete",Q="cbox_cleanup",aa="cbox_closed",R="resize.cbox_resize",u,j,x,p,S,T,U,V,h,r,n,K,L,ba,W,y,F,G,M,C,D,z,A,m,k,a,H,I,X,Y={transition:"elastic",speed:350,width:g,height:g,innerWidth:g,innerHeight:g,initialWidth:"400",initialHeight:"400",maxWidth:g,maxHeight:g,scalePhotos:o,scrolling:o,inline:g,html:g,iframe:g,photo:g,href:g,title:g, rel:g,opacity:0.9,preloading:o,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:g,overlayClose:o,slideshow:g,slideshowAuto:o,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",preloadIMG:o};function v(b,d){d=d==="x"?document.documentElement.clientWidth:document.documentElement.clientHeight;return typeof b==="string"?Math.round(b.match(/%/)?d/100*parseInt(b,10):parseInt(b,10)):b}function Z(b){return a.photo||b.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)} function ca(){for(var b in a)if(typeof a[b]==="function")a[b]=a[b].call(m)}e=c.fn.colorbox=function(b,d){this.length?this.each(function(){var i=c(this).data(s)?c.extend({},c(this).data(s),b):c.extend({},Y,b);c(this).data(s,i).addClass("cboxelement")}):c(this).data(s,c.extend({},Y,b));c(this).unbind(O).bind(O,function(i){m=this;a=c(m).data(s);ca();X=d||g;var l=a.rel||m.rel;if(l&&l!=="nofollow"){h=c(".cboxelement").filter(function(){var f=c(this).data(s).rel||this.rel;return f===l});k=h.index(m);if(k< 0){h=h.add(m);k=h.length-1}}else{h=c(m);k=0}if(!H){I=H=o;c().bind("keydown.cbox_close",function(f){if(f.keyCode===27){f.preventDefault();e.close()}}).bind("keydown.cbox_arrows",function(f){if(f.keyCode===37){f.preventDefault();G.click()}else if(f.keyCode===39){f.preventDefault();F.click()}});a.overlayClose&&u.css({cursor:"pointer"}).one("click",e.close);m.blur();c.event.trigger(fa);M.html(a.close);u.css({opacity:a.opacity}).show();a.w=v(a.initialWidth,"x");a.h=v(a.initialHeight,"y");e.position(0); N&&r.bind("resize.cboxie6 scroll.cboxie6",function(){u.css({width:r.width(),height:r.height(),top:r.scrollTop(),left:r.scrollLeft()})}).trigger("scroll.cboxie6")}e.slideshow();e.load();i.preventDefault()});b&&b.open&&c(this).triggerHandler(O);return this};e.init=function(){function b(d){return c('<div id="cbox'+d+'"/>')}r=c(window);j=c('<div id="colorbox"/>');u=b("Overlay").hide();x=b("Wrapper");p=b("Content").append(n=b("LoadedContent").css({width:0,height:0}),K=b("LoadingOverlay"),L=b("LoadingGraphic"), ba=b("Title"),W=b("Current"),y=b("Slideshow"),F=b("Next"),G=b("Previous"),M=b("Close"));x.append(c("<div/>").append(b("TopLeft"),S=b("TopCenter"),b("TopRight")),c("<div/>").append(T=b("MiddleLeft"),p,U=b("MiddleRight")),c("<div/>").append(b("BottomLeft"),V=b("BottomCenter"),b("BottomRight"))).children().children().css({"float":"left"});c("body").prepend(u,j.append(x));if(E){j.addClass("cboxIE");N&&u.css("position","absolute")}p.children().addClass(B).mouseover(function(){c(this).addClass(B)}).mouseout(function(){c(this).removeClass(B)}).hide(); C=S.height()+V.height()+p.outerHeight(o)-p.height();D=T.width()+U.width()+p.outerWidth(o)-p.width();z=n.outerHeight(o);A=n.outerWidth(o);j.css({"padding-bottom":C,"padding-right":D}).hide();F.click(e.next);G.click(e.prev);M.click(e.close);p.children().removeClass(B)};e.position=function(b,d){var i=document.documentElement.clientHeight;i=Math.max(i-a.h-z-C,0)/2+r.scrollTop();var l=Math.max(document.documentElement.clientWidth-a.w-A-D,0)/2+r.scrollLeft();b=j.width()===a.w+A&&j.height()===a.h+z?0:b; x[0].style.width=x[0].style.height="9999px";function f(q){S[0].style.width=V[0].style.width=p[0].style.width=q.style.width;L[0].style.height=K[0].style.height=p[0].style.height=T[0].style.height=U[0].style.height=q.style.height}j.dequeue().animate({width:a.w+A,height:a.h+z,top:i,left:l},{duration:b,complete:function(){f(this);I=g;x[0].style.width=a.w+A+D+"px";x[0].style.height=a.h+z+C+"px";d&&d()},step:function(){f(this)}})};e.resize=function(b){if(H){function d(w){e.position(w,function(){if(H){if(E){q&& n.fadeIn(100);j[0].style.removeAttribute("filter")}p.children().show();if(a.iframe)n.append("<iframe id='cboxIframe'"+(a.scrolling?" ":"scrolling='no'")+" name='iframe_"+(new Date).getTime()+"' frameborder=0 src='"+(a.href||m.href)+"' />");K.hide();L.hide();y.hide();if(h.length>1){W.html(a.current.replace(/\{current\}/,k+1).replace(/\{total\}/,h.length));F.html(a.next);G.html(a.previous);a.slideshow&&y.show()}else{W.hide();F.hide();G.hide()}ba.html(a.title||m.title);c.event.trigger(P);X&&X.call(m); a.transition==="fade"&&j.fadeTo(t,1,function(){E&&j[0].style.removeAttribute("filter")});r.bind(R,function(){e.position(0)})}})}function i(){a.h=a.h||n.height();return a.h}function l(){a.w=a.w||n.width();return a.w}var f,q,t=a.transition==="none"?0:a.speed;r.unbind(R);if(b){n.remove();n=c('<div id="cboxLoadedContent"/>').html(b);n.hide().appendTo(u).css({width:l(),overflow:a.scrolling?"auto":"hidden"}).css({height:i()}).prependTo(p);c("#cboxPhoto").css({cssFloat:"none"});N&&c("select:not(#colorbox select)").filter(function(){return this.style.visibility!== "hidden"}).css({visibility:"hidden"}).one(Q,function(){this.style.visibility="inherit"});a.transition==="fade"&&j.fadeTo(t,0,function(){d(0)})||d(t);if(a.preloading&&h.length>1){b=k>0?h[k-1]:h[h.length-1];f=k<h.length-1?h[k+1]:h[0];f=c(f).data(s).href||f.href;b=c(b).data(s).href||b.href;Z(f)&&c("<img />").attr("src",f);Z(b)&&c("<img />").attr("src",b)}}else b=setTimeout(function(){var w=n.wrapInner("<div style='overflow:auto'></div>").children();a.h=w.height();n.css({height:a.h});w.replaceWith(w.children()); e.position(t)},1)}};e.load=function(){var b,d,i,l=e.resize;I=o;function f(q){var t=c(q),w=t.find("img"),$=w.length;function da(){var ea=new Image;$-=1;if($>=0&&a.preloadIMG){ea.onload=da;ea.src=w[$].src}else l(t)}da()}m=h[k];a=c(m).data(s);ca();c.event.trigger(J);a.h=a.height?v(a.height,"y")-z-C:a.innerHeight?v(a.innerHeight,"y"):g;a.w=a.width?v(a.width,"x")-A-D:a.innerWidth?v(a.innerWidth,"x"):g;a.mw=a.w;a.mh=a.h;if(a.maxWidth){a.mw=v(a.maxWidth,"x")-A-D;a.mw=a.w&&a.w<a.mw?a.w:a.mw}if(a.maxHeight){a.mh= v(a.maxHeight,"y")-z-C;a.mh=a.h&&a.h<a.mh?a.h:a.mh}b=a.href||c(m).attr("href");K.show();L.show();M.show();if(a.inline){c('<div id="cboxInlineTemp" />').hide().insertBefore(c(b)[0]).bind(J+" "+Q,function(){c(this).replaceWith(n.children())});l(c(b))}else if(a.iframe)l(" ");else if(a.html)f(a.html);else if(Z(b)){d=new Image;d.onload=function(){var q;d.onload=null;d.id="cboxPhoto";c(d).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(a.scalePhotos){i=function(){d.height-=d.height* q;d.width-=d.width*q};if(a.mw&&d.width>a.mw){q=(d.width-a.mw)/d.width;i()}if(a.mh&&d.height>a.mh){q=(d.height-a.mh)/d.height;i()}}if(a.h)d.style.marginTop=Math.max(a.h-d.height,0)/2+"px";l(d);h.length>1&&c(d).css({cursor:"pointer"}).click(e.next);if(E)d.style.msInterpolationMode="bicubic"};d.src=b}else c("<div />").load(b,function(q,t){t==="success"?f(this):l(c("<p>Request unsuccessful.</p>"))})};e.next=function(){if(!I){k=k<h.length-1?k+1:0;e.load()}};e.prev=function(){if(!I){k=k>0?k-1:h.length- 1;e.load()}};e.slideshow=function(){var b,d,i="cboxSlideshow_";y.bind(aa,function(){y.unbind();clearTimeout(d);j.removeClass(i+"off "+i+"on")});function l(){y.text(a.slideshowStop).bind(P,function(){d=setTimeout(e.next,a.slideshowSpeed)}).bind(J,function(){clearTimeout(d)}).one("click",function(){b();c(this).removeClass(B)});j.removeClass(i+"off").addClass(i+"on")}b=function(){clearTimeout(d);y.text(a.slideshowStart).unbind(P+" "+J).one("click",function(){l();d=setTimeout(e.next,a.slideshowSpeed); c(this).removeClass(B)});j.removeClass(i+"on").addClass(i+"off")};if(a.slideshow&&h.length>1)a.slideshowAuto?l():b()};e.close=function(){c.event.trigger(Q);H=g;c().unbind("keydown.cbox_close keydown.cbox_arrows");r.unbind(R+" resize.cboxie6 scroll.cboxie6");u.css({cursor:"auto"}).fadeOut("fast");j.stop(o,g).fadeOut("fast",function(){n.remove();j.css({opacity:1});p.children().hide();c.event.trigger(aa)})};e.element=function(){return c(m)};e.settings=Y;c(e.init)})(jQuery);

/*
 * Copyright (c) 2009 Simo Kinnunen.
 * Licensed under the MIT license.
 *
 * @version 1.09
 */
var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.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:j(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:j(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 a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(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:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},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:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),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}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.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(!G(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=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(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(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}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++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return !!B}}function q(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 v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},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,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.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)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(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;overflow:hidden;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(f);function d(p,h){var n=0,m=0;var g=[],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":g[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":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(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(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());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 a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());
Cufon.registerFont({"w":217,"face":{"font-family":"Boton","font-weight":500,"font-stretch":"normal","units-per-em":"360","panose-1":"2 0 6 3 0 0 0 0 0 0","ascent":"288","descent":"-72","bbox":"-17 -293 335 90","underline-thickness":"18","underline-position":"-36","stemh":"37","stemv":"48","unicode-range":"U+0020-U+007E"},"glyphs":{" ":{"w":105},"!":{"d":"46,-74r-5,-180r55,0r-7,180r-43,0xm41,0r0,-53r53,0r0,53r-53,0","w":119},"\"":{"d":"129,-258v4,36,-11,70,-15,106r-10,0r-18,-96v0,-25,35,-29,43,-10xm54,-258v2,36,-11,70,-15,106r-10,0v-5,-32,-15,-61,-17,-96v-1,-25,35,-29,42,-10","w":142},"#":{"d":"168,-77r-11,77r-37,0r11,-77r-35,0r-11,77r-37,0r11,-77r-44,0r0,-36r49,0r4,-34r-45,0r0,-36r50,0r10,-71r37,0r-10,71r35,0r10,-71r37,0r-10,71r42,0r0,36r-47,0r-5,34r44,0r0,36r-48,0xm100,-113r36,0r5,-34r-36,0","w":240},"$":{"d":"145,-66v0,-64,-128,-35,-124,-119v0,-15,4,-33,17,-48v17,-19,37,-21,49,-23r0,-37r40,0r0,41v12,5,16,10,22,18r1,-18r38,0r0,85r-39,0v-5,-23,-12,-51,-48,-51v-22,0,-32,15,-32,28v0,44,101,44,113,78v32,47,-3,116,-55,115r0,38r-40,0r0,-42v-15,-5,-20,-12,-28,-22r0,23r-39,0r0,-89r39,0v1,23,21,56,50,56v17,0,36,-11,36,-33","w":209},"%":{"d":"258,3v-80,0,-83,-165,0,-165v67,0,75,106,43,147v-14,18,-35,18,-43,18xm259,-21v43,-4,37,-123,-2,-117v-29,4,-24,25,-28,58v-4,31,13,61,30,59xm73,-92v-40,2,-62,-44,-62,-82v0,-18,3,-83,60,-83v26,0,39,10,44,18v22,31,36,143,-42,147xm73,-233v-33,8,-31,16,-31,58v0,41,9,59,29,59v17,6,34,-37,30,-60v-3,-17,3,-58,-28,-57xm103,0r98,-255r25,0r-97,255r-26,0","w":330},"&":{"d":"197,-207v-2,41,-31,54,-68,68v19,21,47,50,56,58v3,-10,4,-16,5,-33r46,0v-2,28,-6,44,-17,66r51,48r-64,0r-17,-15v-13,8,-33,20,-69,20v-60,0,-100,-35,-100,-80v0,-41,30,-62,46,-72v-8,-14,-17,-29,-17,-51v-3,-81,152,-76,148,-9xm106,-168v10,-4,43,-16,43,-35v0,-9,-9,-18,-26,-18v-32,0,-32,37,-17,53xm88,-117v-7,7,-20,19,-20,39v0,48,65,60,90,34v-24,-23,-48,-47,-70,-73","w":270},"(":{"d":"99,-260v-31,99,-27,236,0,328r-43,0v-37,-78,-42,-244,0,-328r43,0","w":119},")":{"d":"20,68v25,-52,29,-266,0,-329r43,0v10,25,31,76,31,166v0,44,-14,133,-31,163r-43,0","w":119},"*":{"d":"60,-217r-2,-37r33,0r-1,37r31,-21r18,29r-36,18r36,18r-18,29r-31,-21r1,39r-33,0r2,-39r-32,21r-16,-29r33,-18r-35,-18r18,-29","w":150},"+":{"d":"139,-86r0,86r-37,0r0,-86r-87,0r0,-37r87,0r0,-87r37,0r0,87r86,0r0,37r-86,0","w":240},",":{"d":"11,38r24,-83r58,0r-46,83r-36,0","w":105},"-":{"d":"13,-79r0,-44r132,0r0,44r-132,0","w":157},".":{"d":"25,0r0,-54r54,0r0,54r-54,0","w":105},"\/":{"d":"-2,37r110,-328r43,0r-111,328r-42,0","w":150},"0":{"d":"206,-126v0,76,-15,131,-98,131v-98,0,-111,-116,-83,-207v16,-53,74,-70,125,-49v14,6,56,32,56,125xm156,-103v4,-50,2,-117,-47,-119v-54,-1,-45,66,-48,95v-5,42,14,95,49,95v21,0,42,-10,46,-71"},"1":{"d":"58,-238v24,-8,45,-19,80,-16r0,217r24,0r0,37r-94,0r0,-37r22,0r0,-173r-32,13r0,-41"},"2":{"d":"22,-186v1,-44,37,-74,85,-74v53,0,80,31,80,68v0,32,-21,56,-35,71v-22,24,-53,55,-81,84r79,0r0,-36r39,0r0,73r-173,0r0,-42r82,-83v21,-21,41,-42,41,-67v0,-21,-15,-30,-34,-30v-33,0,-35,27,-36,36r-47,0"},"3":{"d":"140,-186v-5,-59,-81,-40,-81,0r-46,0v4,-39,30,-74,88,-74v45,0,88,22,88,68v0,43,-27,54,-46,61v24,6,52,26,51,61v-1,83,-129,100,-170,40v-12,-17,-13,-33,-14,-43r48,0v1,22,15,42,43,42v19,0,45,-10,45,-40v0,-36,-31,-47,-66,-42r0,-36v36,3,62,-12,60,-37"},"4":{"d":"12,-108r83,-146r70,0r0,146r42,0r0,34r-42,0r0,37r23,0r0,37r-96,0r0,-37r25,0r0,-37r-105,0r0,-34xm119,-108r0,-113r-61,113r61,0"},"5":{"d":"66,-73v-1,16,19,41,40,41v23,0,42,-16,42,-46v0,-54,-56,-63,-76,-33r-46,-6r12,-137r146,0r0,68r-39,0r0,-31r-67,0r-6,68v10,-7,24,-17,49,-17v73,0,98,105,52,147v-39,36,-79,31,-119,10v-32,-17,-34,-47,-35,-64r47,0"},"6":{"d":"19,-118v1,-68,11,-138,96,-141v21,0,37,4,50,13v28,18,30,47,30,60r-46,0v-8,-50,-62,-45,-77,-3v-5,15,-6,30,-6,45v6,-6,22,-21,55,-21v48,0,81,34,81,83v0,51,-34,87,-89,87v-72,0,-95,-61,-94,-123xm111,-126v-28,0,-44,17,-44,44v0,37,24,51,44,51v20,0,43,-13,43,-46v0,-29,-15,-49,-43,-49"},"7":{"d":"17,-186r0,-68r168,0r0,34r-59,183r27,0r0,37r-104,0r0,-37r27,0r60,-180r-80,0r0,31r-39,0"},"8":{"d":"197,-192v0,35,-10,48,-47,61v33,9,53,32,53,61v0,43,-36,75,-93,75v-56,0,-95,-30,-95,-74v0,-18,9,-56,58,-62v-31,-8,-49,-27,-50,-61v-1,-48,47,-67,89,-67v46,0,85,21,85,67xm110,-224v-23,0,-41,15,-41,36v0,23,19,38,40,38v22,0,40,-16,40,-37v0,-18,-14,-37,-39,-37xm108,-114v-10,0,-45,4,-45,41v0,57,92,54,92,1v0,-30,-25,-42,-47,-42"},"9":{"d":"104,-260v106,0,126,167,63,241v-23,27,-67,31,-105,18v-48,-16,-48,-60,-48,-72r48,0v-2,37,47,55,72,27v17,-19,18,-49,18,-65v-9,9,-23,21,-56,21v-60,0,-81,-42,-81,-81v0,-55,36,-89,89,-89xm107,-222v-25,0,-44,18,-44,46v0,26,15,47,42,47v19,0,44,-13,44,-46v0,-28,-18,-47,-42,-47"},":":{"d":"40,-132r0,-54r54,0r0,54r-54,0xm40,0r0,-54r54,0r0,54r-54,0","w":119},";":{"d":"45,-133r0,-53r54,0r0,53r-54,0xm26,37r24,-82r57,0r-44,82r-37,0","w":119},"<":{"d":"240,-39r0,40r-240,-109r0,-37r240,-110r0,40r-190,88","w":240},"=":{"d":"240,-90r0,37r-240,0r0,-37r240,0xm240,-157r0,37r-240,0r0,-37r240,0","w":240},">":{"d":"240,-108r-240,109r0,-40r190,-88r-190,-88r0,-40r240,110r0,37","w":240},"?":{"d":"117,0r-54,0r0,-53r54,0r0,53xm171,-193v0,65,-56,64,-58,118r-46,0v-14,-54,57,-76,57,-114v0,-25,-16,-33,-31,-33v-36,0,-39,30,-41,49r-46,0v1,-14,3,-37,16,-55v46,-59,148,-33,149,35","w":180},"@":{"d":"171,23v47,0,93,-25,114,-49r13,17v-38,40,-86,53,-131,53v-89,0,-143,-54,-143,-131v0,-86,67,-169,157,-169v71,0,116,52,116,120v0,61,-40,112,-78,112v-13,0,-28,-6,-31,-28v-28,41,-94,37,-94,-37v0,-57,42,-102,80,-102v20,0,33,12,37,26r4,-16r27,0r-25,123v-2,5,4,12,14,10v29,-13,43,-56,43,-90v0,-57,-41,-97,-93,-97v-75,0,-124,79,-124,148v0,67,47,110,114,110xm150,-48v27,0,50,-69,50,-94v0,-22,-13,-29,-23,-29v-40,13,-49,67,-48,105v3,11,10,18,21,18","w":322},"A":{"d":"63,-219r0,-35r117,0r0,35r-18,0r54,182r22,0r0,37r-93,0r0,-37r21,0r-12,-43r-74,0r-14,43r20,0r0,37r-85,0r0,-37r21,0r59,-182r-18,0xm145,-117r-28,-100r-28,100r56,0","w":240},"B":{"d":"203,-67v0,89,-111,63,-195,67r0,-37r24,0r0,-180r-24,0r0,-37v84,5,190,-24,190,65v0,31,-18,55,-46,59v30,2,51,21,51,63xm148,-181v-4,-36,-31,-39,-68,-36r0,70v37,6,71,-11,68,-34xm153,-72v1,-18,-18,-43,-36,-37r-37,0r0,72v38,-1,70,7,73,-35"},"C":{"d":"110,-31v25,0,44,-32,43,-60r49,0v-1,21,-3,57,-34,80v-17,12,-39,17,-59,17v-75,0,-95,-52,-96,-131v0,-25,1,-135,93,-135v21,0,44,7,55,31r1,-26r37,0r0,86r-40,0v1,-32,-27,-57,-46,-53v-48,-2,-50,60,-52,95v-2,29,13,96,49,96"},"D":{"d":"9,-217r0,-37v67,3,145,-12,178,26v48,55,45,178,-13,213v-47,28,-103,11,-165,15r0,-37r23,0r0,-180r-23,0xm80,-37v87,14,109,-71,81,-145v-16,-43,-42,-34,-81,-35r0,180","w":232},"E":{"d":"6,-217r0,-37r187,0r0,86r-40,0r0,-48r-73,0r0,64r64,0r0,38r-64,0r0,77r73,0r0,-54r40,0r0,91r-187,0r0,-37r25,0r0,-180r-25,0","w":209},"F":{"d":"8,-217r0,-37r177,0r0,86r-40,0r0,-47r-65,0r0,62r58,0r0,38r-58,0r0,78r23,0r0,37r-95,0r0,-37r24,0r0,-180r-24,0","w":195},"G":{"d":"63,-125v0,62,37,118,85,79v13,-11,16,-30,17,-47r-45,0r0,-37r91,0r0,130r-39,0r0,-30v-5,11,-17,35,-65,35v-67,1,-94,-65,-94,-130v0,-55,20,-135,96,-135v26,0,49,11,58,31r0,-25r39,0r0,86r-41,0v-1,-25,-22,-53,-48,-53v-42,0,-54,52,-54,96","w":232},"H":{"d":"8,-217r0,-37r96,0r0,37r-24,0r0,65r87,0r0,-65r-24,0r0,-37r96,0r0,37r-23,0r0,180r23,0r0,37r-96,0r0,-37r24,0r0,-77r-87,0r0,77r24,0r0,37r-96,0r0,-37r24,0r0,-180r-24,0","w":247},"I":{"d":"8,-254r96,0r0,37r-24,0r0,180r24,0r0,37r-96,0r0,-37r23,0r0,-180r-23,0r0,-37","w":112},"J":{"d":"1,-47v31,18,71,15,71,-27r0,-143r-23,0r0,-37r95,0r0,37r-23,0r0,147v0,16,-1,45,-26,63v-26,18,-71,9,-94,2r0,-42","w":150},"K":{"d":"9,-217r0,-37r91,0r0,37r-20,0r0,74r73,-74r-19,0r0,-37r85,0r0,37r-16,0r-64,65r66,115r19,0r0,37r-93,0r0,-37r19,0r-45,-83r-25,24r0,59r20,0r0,37r-91,0r0,-37r23,0r0,-180r-23,0","w":232},"L":{"d":"8,-217r0,-37r95,0r0,37r-24,0r0,180r57,0r0,-54r40,0r0,91r-168,0r0,-37r23,0r0,-180r-23,0","w":187},"M":{"d":"8,-217r0,-37r97,0r40,188r43,-188r96,0r0,37r-24,0r0,180r24,0r0,37r-88,0r0,-37r19,0r0,-174r-51,211r-44,0r-48,-213r0,176r18,0r0,37r-82,0r0,-37r23,0r0,-180r-23,0","w":292},"N":{"d":"5,-217r0,-37r98,0r68,217r0,-180r-21,0r0,-37r85,0r0,37r-24,0r0,217r-73,0r-68,-217r0,180r21,0r0,37r-86,0r0,-37r24,0r0,-180r-24,0","w":240},"O":{"d":"120,5v-123,0,-138,-185,-63,-245v22,-18,58,-24,90,-17v73,16,79,102,79,131v0,30,-6,60,-21,86v-9,15,-30,45,-85,45xm120,-33v43,-7,57,-32,57,-93v0,-31,-6,-95,-56,-95v-62,0,-71,96,-50,152v13,35,43,36,49,36","w":240},"P":{"d":"169,-111v-29,20,-52,14,-88,15r0,59r22,0r0,37r-95,0r0,-37r24,0r0,-180r-24,0r0,-37v61,5,134,-14,167,21v24,41,32,77,-6,122xm144,-174v3,-33,-25,-49,-63,-43r0,86v41,-2,58,8,63,-43","w":202},"Q":{"d":"13,-125v-2,-70,30,-134,108,-134v104,0,125,121,91,208v-14,35,-40,43,-53,48r63,30r-34,31r-98,-58v-10,-2,-23,-5,-38,-18v-39,-34,-39,-90,-39,-107xm178,-126v2,-50,-16,-101,-59,-94v-61,-3,-66,96,-47,152v11,31,32,35,49,35v52,-3,55,-48,57,-93","w":240},"R":{"d":"203,-191v-4,43,-22,58,-48,61v43,1,35,55,44,93r22,0r0,37r-63,0v-7,-33,-9,-72,-20,-100v-12,-18,-34,-9,-58,-11r0,74r24,0r0,37r-96,0r0,-37r24,0r0,-180r-24,0r0,-37r121,0v36,-5,78,24,74,63xm154,-183v3,-37,-35,-36,-74,-34r0,68v37,-3,70,14,74,-34","w":232},"S":{"d":"149,-167v0,-17,-17,-52,-47,-52v-21,0,-32,14,-32,28v0,34,43,35,68,47v18,8,56,23,56,73v0,44,-30,74,-77,74v-36,0,-51,-16,-58,-25r0,22r-40,0r0,-90r40,0v1,29,26,56,50,56v19,0,36,-11,36,-33v0,-40,-42,-37,-70,-51v-30,-15,-53,-31,-53,-68v0,-75,107,-90,127,-44r1,-23r39,0r0,86r-40,0","w":209},"T":{"d":"8,-254r202,0r0,86r-39,0r0,-48r-38,0r0,179r23,0r0,37r-94,0r0,-37r23,0r0,-179r-38,0r0,48r-39,0r0,-86"},"U":{"d":"199,-87v4,48,-27,92,-84,92v-16,0,-36,-3,-53,-12v-35,-19,-36,-55,-36,-79r0,-131r-22,0r0,-37r92,0r0,37r-22,0v7,67,-24,177,38,182v21,2,46,-26,40,-43r0,-139r-23,0r0,-37r93,0r0,37r-23,0r0,130","w":225},"V":{"d":"3,-217r0,-37r94,0r0,37r-23,0r47,169r52,-169r-23,0r0,-37r87,0r0,37r-20,0r-70,217r-58,0r-65,-217r-21,0","w":240},"W":{"d":"2,-217r0,-37r89,0r0,37r-22,0r29,162r41,-199r60,0r41,199r33,-162r-23,0r0,-37r85,0r0,37r-19,0r-49,217r-57,0r-43,-201r-41,201r-57,0r-47,-217r-20,0","w":337},"X":{"d":"14,-254r89,0r0,37r-19,0r30,54r32,-54r-19,0r0,-37r86,0r0,37r-21,0r-52,87r57,93r20,0r0,37r-90,0r0,-37r19,0r-36,-60r-36,60r15,0r0,37r-81,0r0,-37r21,0r57,-92r-54,-88r-18,0r0,-37","w":225},"Y":{"d":"6,-217r0,-37r94,0r0,37r-27,0r39,88r39,-88r-26,0r0,-37r87,0r0,37r-16,0r-63,132r0,48r23,0r0,37r-93,0r0,-37r23,0r0,-48r-63,-132r-17,0"},"Z":{"d":"26,-168r0,-86r168,0r0,37r-116,179r76,0r0,-52r40,0r0,90r-172,0r0,-37r117,-180r-73,0r0,49r-40,0","w":209},"[":{"d":"34,-261r90,0r0,39r-43,0r0,252r43,0r0,38r-90,0r0,-329","w":127},"\\":{"d":"151,37r-43,0r-110,-328r42,0","w":150},"]":{"d":"4,-261r90,0r0,329r-90,0r0,-38r42,0r0,-252r-42,0r0,-39","w":127},"^":{"d":"149,-254r67,137r-42,0r-42,-88r-44,88r-42,0r70,-137r33,0","w":262},"_":{"d":"184,27r0,18r-188,0r0,-18r188,0","w":180},"a":{"d":"31,-165v51,-57,145,-26,133,53r0,75r24,0r0,37r-64,0r0,-24v-6,10,-19,29,-55,29v-45,0,-57,-32,-57,-56v0,-59,61,-63,106,-62v5,-30,-10,-46,-25,-44v-9,-3,-29,14,-26,27r-48,0v1,-6,1,-23,12,-35xm86,-31v27,-1,36,-26,32,-55v-22,-1,-60,2,-58,30v0,15,12,25,26,25","w":195},"b":{"d":"198,-95v-5,73,-23,100,-75,100v-31,0,-43,-20,-49,-29r0,24r-68,0r0,-37r23,0r0,-180r-23,0r0,-37r71,0r0,88v6,-8,19,-26,50,-26v38,0,75,45,71,97xm149,-92v0,-22,-8,-63,-35,-63v-19,0,-38,18,-38,61v0,44,18,62,37,62v26,0,36,-33,36,-60","w":209},"c":{"d":"98,-32v16,3,29,-21,29,-34r46,0v-1,12,-3,32,-19,49v-31,30,-91,32,-118,-2v-50,-63,-21,-173,51,-171v32,0,43,15,49,23r1,-18r34,0r0,66r-41,0v2,-14,-12,-40,-31,-36v-31,6,-36,13,-36,61v0,36,6,58,35,62","w":180},"d":{"d":"83,-191v20,0,44,13,49,22r0,-48r-24,0r0,-37r72,0r0,217r23,0r0,37r-67,0r-1,-18v-8,9,-20,24,-51,24v-54,0,-73,-53,-73,-99v0,-47,20,-98,72,-98xm134,-96v-1,-24,-3,-58,-37,-60v-26,-1,-37,29,-37,65v0,28,4,60,35,60v27,0,40,-29,39,-65","w":209},"e":{"d":"61,-86v-3,22,13,64,37,58v31,0,35,-24,36,-32r48,0v-2,11,-4,23,-15,37v-23,28,-57,28,-69,28v-57,0,-85,-32,-85,-98v0,-100,96,-124,148,-72v24,24,22,64,22,79r-122,0xm63,-117r71,0v0,-10,-5,-40,-35,-40v-22,0,-36,23,-36,40","w":195},"f":{"d":"34,-186v-2,-45,4,-72,56,-71v11,0,19,2,30,3r0,36v-23,-3,-46,-3,-40,32r34,0r0,37r-33,0r0,112r25,0r0,37r-97,0r0,-37r25,0r0,-112r-25,0r0,-37r25,0","w":119},"g":{"d":"181,0v3,72,-78,109,-143,63v-18,-13,-21,-34,-22,-43r51,0v2,8,5,24,32,24v44,0,34,-26,36,-63v-8,8,-23,21,-50,21v-41,0,-73,-35,-73,-97v0,-55,30,-96,76,-96v31,0,45,18,51,26r0,-21r65,0r0,37r-23,0r0,149xm97,-35v22,0,38,-31,38,-60v0,-24,-7,-59,-37,-59v-28,0,-36,33,-36,60v0,40,15,59,35,59","w":209},"h":{"d":"111,-151v-45,0,-31,65,-33,114r20,0r0,37r-90,0r0,-37r23,0r0,-180r-23,0r0,-37r70,0r0,88v8,-14,28,-25,51,-25v72,2,56,80,57,154r24,0r0,37r-90,0r0,-37r19,0v-4,-43,16,-114,-28,-114"},"i":{"d":"26,-214r0,-41r56,0r0,41r-56,0xm10,-149r0,-37r72,0r0,149r24,0r0,37r-96,0r0,-37r24,0r0,-112r-24,0","w":112},"j":{"d":"23,-213r0,-41r55,0r0,41r-55,0xm78,19v4,33,-18,63,-56,63v-15,0,-27,-3,-39,-6r0,-37v7,3,15,5,24,5v22,0,23,-18,23,-31r0,-162r-25,0r0,-37r73,0r0,205","w":105},"k":{"d":"9,-217r0,-37r69,0r0,149r48,-45r-16,0r0,-36r87,0r0,37r-21,0r-33,30r50,82r15,0r0,37r-87,0r0,-37r18,0r-31,-54r-30,27r0,27r17,0r0,37r-86,0r0,-37r23,0r0,-180r-23,0"},"l":{"d":"7,-254r72,0r0,217r23,0r0,37r-95,0r0,-37r24,0r0,-180r-24,0r0,-37","w":112},"m":{"d":"112,-151v-47,0,-27,66,-31,114r19,0r0,37r-89,0r0,-37r24,0r0,-112r-24,0r0,-37r67,0r3,24v17,-33,81,-46,100,0v11,-41,119,-40,103,26r0,99r23,0r0,37r-90,0r0,-37r20,0r0,-81v0,-14,-1,-33,-25,-33v-49,0,-24,70,-30,114r19,0r0,37r-84,0r0,-37r19,0v-5,-41,16,-114,-24,-114","w":315},"n":{"d":"114,-152v-11,-5,-39,22,-33,35r0,80r19,0r0,37r-91,0r0,-37r25,0r0,-112r-25,0r0,-37r67,0r3,23v15,-27,42,-28,52,-28v14,0,35,1,46,20v21,36,6,85,10,134r23,0r0,37r-89,0r0,-37r18,0v-6,-42,19,-111,-25,-115"},"o":{"d":"100,-191v57,0,88,25,90,98v0,27,-5,57,-26,75v-60,53,-157,17,-151,-72v4,-55,17,-101,87,-101xm141,-93v-6,-45,0,-53,-39,-63v-24,-1,-43,29,-41,63v2,30,8,62,40,62v39,0,38,-42,40,-62","w":202},"p":{"d":"199,-92v0,50,-27,111,-88,95v-19,-5,-27,-14,-33,-23r0,58r23,0r0,37r-95,0r0,-37r24,0r0,-187r-24,0r0,-37r65,0r1,27v4,-14,33,-33,56,-33v47,0,71,45,71,100xm113,-32v27,4,37,-36,37,-61v0,-27,-8,-61,-37,-61v-30,0,-38,31,-38,59v0,51,8,58,38,63","w":209},"q":{"d":"132,38r0,-56v-49,57,-120,7,-120,-73v0,-65,30,-100,74,-100v31,0,45,19,53,29r2,-24r63,0r0,37r-23,0r0,187r23,0r0,37r-95,0r0,-37r23,0xm98,-30v31,-9,37,-14,37,-63v0,-19,-3,-60,-37,-60v-56,0,-46,125,0,123","w":209},"r":{"d":"144,-144v-64,-15,-66,43,-62,107r24,0r0,37r-96,0r0,-37r24,0r0,-112r-24,0r0,-37r66,0r2,37v1,-13,24,-49,66,-40r0,45","w":150},"s":{"d":"116,-121v1,-19,-16,-39,-33,-37v-22,-5,-29,27,-14,35v36,18,85,13,89,72v4,66,-92,68,-114,34r0,18r-32,0r0,-67r36,0v1,17,20,41,41,39v24,4,33,-33,12,-37v-36,-20,-88,-10,-88,-69v0,-31,23,-58,61,-58v20,0,46,16,48,23r1,-17r30,0r0,64r-37,0","w":172},"t":{"d":"29,-230r45,-10r0,54r36,0r0,37r-36,0r0,90v-4,18,15,28,34,21r0,36v-30,11,-81,-1,-81,-43r0,-104r-24,0r0,-37r26,0r0,-44","w":119},"u":{"d":"84,5v-85,0,-50,-80,-57,-154r-23,0r0,-37r71,0r0,118v-1,18,6,36,25,35v46,-3,24,-68,29,-116r-24,0r0,-37r72,0r0,149r22,0r0,37r-66,0r-2,-21v-6,10,-18,26,-47,26","w":209},"v":{"d":"0,-186r85,0r0,37r-18,0r27,102r29,-102r-19,0r0,-37r81,0r0,37r-19,0r-46,149r-53,0r-50,-149r-17,0r0,-37","w":187},"w":{"d":"0,-149r0,-37r77,0r0,37r-18,0r22,100r37,-137r56,0r38,137r25,-100r-18,0r0,-37r73,0r0,37r-15,0r-40,149r-53,0r-40,-139r-38,139r-52,0r-41,-149r-13,0","w":292},"x":{"d":"12,-149r0,-37r78,0r0,37r-14,0r23,36r23,-36r-14,0r0,-37r72,0r0,37r-15,0r-35,53r40,59r15,0r0,37r-80,0r0,-37r14,0r-26,-42r-25,42r14,0r0,37r-74,0r0,-37r15,0r39,-59r-35,-53r-15,0","w":195},"y":{"d":"4,-149r0,-37r84,0r0,37r-19,0r30,100r30,-100r-19,0r0,-37r82,0r0,37r-17,0v-27,68,-47,148,-79,209v-19,20,-48,22,-79,16r0,-38v27,10,52,4,57,-31r-55,-156r-15,0","w":195},"z":{"d":"13,-122r0,-64r152,0r0,37r-97,117r57,0r0,-34r40,0r0,66r-153,0r0,-35r98,-118r-57,0r0,31r-40,0","w":180},"{":{"d":"42,2v4,-41,-1,-84,-36,-80r0,-36v8,0,22,1,29,-12v20,-38,-11,-119,40,-130v12,-3,23,-4,51,-4r0,35v-35,-5,-43,17,-39,50v7,55,-20,74,-38,80v8,1,30,4,36,35v7,39,-12,103,41,93r0,35v-63,8,-88,-24,-84,-66","w":127},"|":{"d":"60,-270r0,360r-37,0r0,-360r37,0","w":82},"}":{"d":"90,-194v-3,41,1,85,36,80r0,36v-8,0,-22,-1,-29,12v-20,38,11,119,-40,130v-12,3,-23,4,-51,4r0,-35v53,14,35,-61,41,-93v6,-34,32,-30,37,-37v-8,-1,-31,-4,-37,-35v-7,-39,13,-104,-41,-93r0,-35v63,-8,88,24,84,66","w":127},"~":{"d":"222,-104v-20,30,-68,38,-101,13v-29,-13,-41,-13,-63,16r-17,-31v5,-19,57,-46,90,-21v23,17,59,20,74,-9","w":262},"'":{"d":"58,-258v2,36,-12,70,-16,106r-9,0r-18,-96v0,-25,35,-29,43,-10","w":74},"`":{"d":"48,-217r-30,-49r54,0r15,49r-39,0","w":105},"\u00a0":{"w":105}}});

Cufon.replace('.cf', { fontFamily: 'Boton' });
Cufon.replace('.cf-1', { textShadow: '#000000 1px 3px' });
Cufon.replace('.cf-2', { textShadow: '#bebcbb 0 -1px' });
Cufon.replace('.cf-3', { textShadow: '#9a3f2a 0 -1px, #fef6c5 0 2px' });
Cufon.replace('.cf-4', { textShadow: '#000000 1px 1px' });

/*
 * jquery.tools 1.1.2 - The missing UI library for the Web
 * 
 * [tools.tabs-1.0.4]
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 * 
 * -----
 * 
 * File generated: Wed Oct 07 11:06:47 GMT+00:00 2009
 */
(function(d){d.tools=d.tools||{};d.tools.tabs={version:"1.0.4",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(e,f){c[e]=f}};var c={"default":function(f,e){this.getPanes().hide().eq(f).show();e.call()},fade:function(g,e){var f=this.getConf(),j=f.fadeOutSpeed,h=this.getPanes();if(j){h.fadeOut(j)}else{h.hide()}h.eq(g).fadeIn(f.fadeInSpeed,e)},slide:function(f,e){this.getPanes().slideUp(200);this.getPanes().eq(f).slideDown(400,e)},ajax:function(f,e){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),e)}};var b;d.tools.tabs.addEffect("horizontal",function(f,e){if(!b){b=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){d(this).hide()});this.getPanes().eq(f).animate({width:b},function(){d(this).show();e.call()})});function a(g,h,f){var e=this,j=d(this),i;d.each(f,function(k,l){if(d.isFunction(l)){j.bind(k,l)}});d.extend(this,{click:function(k,n){var o=e.getCurrentPane();var l=g.eq(k);if(typeof k=="string"&&k.replace("#","")){l=g.filter("[href*="+k.replace("#","")+"]");k=Math.max(g.index(l),0)}if(f.rotate){var m=g.length-1;if(k<0){return e.click(m,n)}if(k>m){return e.click(0,n)}}if(!l.length){if(i>=0){return e}k=f.initialIndex;l=g.eq(k)}if(k===i){return e}n=n||d.Event();n.type="onBeforeClick";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}c[f.effect].call(e,k,function(){n.type="onClick";j.trigger(n,[k])});n.type="onStart";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}i=k;g.removeClass(f.current);l.addClass(f.current);return e},getConf:function(){return f},getTabs:function(){return g},getPanes:function(){return h},getCurrentPane:function(){return h.eq(i)},getCurrentTab:function(){return g.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)},bind:function(k,l){j.bind(k,l);return e},onBeforeClick:function(k){return this.bind("onBeforeClick",k)},onClick:function(k){return this.bind("onClick",k)},unbind:function(k){j.unbind(k);return e}});g.each(function(k){d(this).bind(f.event,function(l){e.click(k,l);return false})});if(location.hash){e.click(location.hash)}else{if(f.initialIndex===0||f.initialIndex>0){e.click(f.initialIndex)}}h.find("a[href^=#]").click(function(k){e.click(d(this).attr("href"),k)})}d.fn.tabs=function(i,f){var g=this.eq(typeof f=="number"?f:0).data("tabs");if(g){return g}if(d.isFunction(f)){f={onBeforeClick:f}}var h=d.extend({},d.tools.tabs.conf),e=this.length;f=d.extend(h,f);this.each(function(l){var j=d(this);var k=j.find(f.tabs);if(!k.length){k=j.children()}var m=i.jquery?i:j.children(i);if(!m.length){m=e==1?d(i):j.parent().find(i)}g=new a(k,m,f);j.data("tabs",g)});return f.api?g:this}})(jQuery);
(function(c){var d=[];c.tools=c.tools||{};c.tools.tooltip={version:"1.1.2",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(e,g,f){b[e]=[g,f]}};var b={toggle:[function(e){var f=this.getConf(),g=this.getTip(),h=f.opacity;if(h<1){g.css({opacity:h})}g.show();e.call()},function(e){this.getTip().hide();e.call()}],fade:[function(e){this.getTip().fadeIn(this.getConf().fadeInSpeed,e)},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e)}]};function a(f,g){var p=this,k=c(this);f.data("tooltip",p);var l=f.next();if(g.tip){l=c(g.tip);if(l.length>1){l=f.nextAll(g.tip).eq(0);if(!l.length){l=f.parent().nextAll(g.tip).eq(0)}}}function o(u){var t=g.relative?f.position().top:f.offset().top,s=g.relative?f.position().left:f.offset().left,v=g.position[0];t-=l.outerHeight()-g.offset[0];s+=f.outerWidth()+g.offset[1];var q=l.outerHeight()+f.outerHeight();if(v=="center"){t+=q/2}if(v=="bottom"){t+=q}v=g.position[1];var r=l.outerWidth()+f.outerWidth();if(v=="center"){s-=r/2}if(v=="left"){s-=r}return{top:t,left:s}}var i=f.is(":input"),e=i&&f.is(":checkbox, :radio, select, :button"),h=f.attr("type"),n=g.events[h]||g.events[i?(e?"widget":"input"):"def"];n=n.split(/,\s*/);if(n.length!=2){throw"Tooltip: bad events configuration for "+h}f.bind(n[0],function(r){if(g.oneInstance){c.each(d,function(){this.hide()})}var q=l.data("trigger");if(q&&q[0]!=this){l.hide().stop(true,true)}r.target=this;p.show(r);n=g.events.tooltip.split(/,\s*/);l.bind(n[0],function(){p.show(r)});if(n[1]){l.bind(n[1],function(){p.hide(r)})}});f.bind(n[1],function(q){p.hide(q)});if(!c.browser.msie&&!i&&!g.predelay){f.mousemove(function(){if(!p.isShown()){f.triggerHandler("mouseover")}})}if(g.opacity<1){l.css("opacity",g.opacity)}var m=0,j=f.attr("title");if(j&&g.cancelDefault){f.removeAttr("title");f.data("title",j)}c.extend(p,{show:function(r){if(r){f=c(r.target)}clearTimeout(l.data("timer"));if(l.is(":animated")||l.is(":visible")){return p}function q(){l.data("trigger",f);var t=o(r);if(g.tip&&j){l.html(f.data("title"))}r=r||c.Event();r.type="onBeforeShow";k.trigger(r,[t]);if(r.isDefaultPrevented()){return p}t=o(r);l.css({position:"absolute",top:t.top,left:t.left});var s=b[g.effect];if(!s){throw'Nonexistent effect "'+g.effect+'"'}s[0].call(p,function(){r.type="onShow";k.trigger(r)})}if(g.predelay){clearTimeout(m);m=setTimeout(q,g.predelay)}else{q()}return p},hide:function(r){clearTimeout(l.data("timer"));clearTimeout(m);if(!l.is(":visible")){return}function q(){r=r||c.Event();r.type="onBeforeHide";k.trigger(r);if(r.isDefaultPrevented()){return}b[g.effect][1].call(p,function(){r.type="onHide";k.trigger(r)})}if(g.delay&&r){l.data("timer",setTimeout(q,g.delay))}else{q()}return p},isShown:function(){return l.is(":visible, :animated")},getConf:function(){return g},getTip:function(){return l},getTrigger:function(){return f},bind:function(q,r){k.bind(q,r);return p},onHide:function(q){return this.bind("onHide",q)},onBeforeShow:function(q){return this.bind("onBeforeShow",q)},onShow:function(q){return this.bind("onShow",q)},onBeforeHide:function(q){return this.bind("onBeforeHide",q)},unbind:function(q){k.unbind(q);return p}});c.each(g,function(q,r){if(c.isFunction(r)){p.bind(q,r)}})}c.prototype.tooltip=function(e){var f=this.eq(typeof e=="number"?e:0).data("tooltip");if(f){return f}var g=c.extend(true,{},c.tools.tooltip.conf);if(c.isFunction(e)){e={onBeforeShow:e}}else{if(typeof e=="string"){e={tip:e}}}e=c.extend(true,g,e);if(typeof e.position=="string"){e.position=e.position.split(/,?\s/)}if(e.lazy!==false&&(e.lazy===true||this.length>20)){this.one("mouseover",function(h){f=new a(c(this),e);f.show(h);d.push(f)})}else{this.each(function(){f=new a(c(this),e);d.push(f)})}return e.api?f:this}})(jQuery);
(function(d){var c=d.tools.tooltip;c.plugins=c.plugins||{};c.plugins.dynamic={version:"1.0.1",conf:{api:false,classNames:"top right bottom left"}};function b(h){var e=d(window);var g=e.width()+e.scrollLeft();var f=e.height()+e.scrollTop();return[h.offset().top<=e.scrollTop(),g<=h.offset().left+h.width(),f<=h.offset().top+h.height(),e.scrollLeft()>=h.offset().left]}function a(f){var e=f.length;while(e--){if(f[e]){return false}}return true}d.fn.dynamic=function(g){var h=d.extend({},c.plugins.dynamic.conf),f;if(typeof g=="number"){g={speed:g}}g=d.extend(h,g);var e=g.classNames.split(/\s/),i;this.each(function(){if(d(this).tooltip().jquery){throw"Lazy feature not supported by dynamic plugin. set lazy: false for tooltip"}var j=d(this).tooltip().onBeforeShow(function(n,o){var m=this.getTip(),l=this.getConf();if(!i){i=[l.position[0],l.position[1],l.offset[0],l.offset[1],d.extend({},l)]}d.extend(l,i[4]);l.position=[i[0],i[1]];l.offset=[i[2],i[3]];m.css({visibility:"hidden",position:"absolute",top:o.top,left:o.left}).show();var k=b(m);if(!a(k)){if(k[2]){d.extend(l,g.top);l.position[0]="top";m.addClass(e[0])}if(k[3]){d.extend(l,g.right);l.position[1]="right";m.addClass(e[1])}if(k[0]){d.extend(l,g.bottom);l.position[0]="bottom";m.addClass(e[2])}if(k[1]){d.extend(l,g.left);l.position[1]="left";m.addClass(e[3])}if(k[0]||k[2]){l.offset[0]*=-1}if(k[1]||k[3]){l.offset[1]*=-1}}m.css({visibility:"visible"}).hide()});j.onShow(function(){var l=this.getConf(),k=this.getTip();l.position=[i[0],i[1]];l.offset=[i[2],i[3]]});j.onHide(function(){var k=this.getTip();k.removeClass(g.classNames)});f=j});return g.api?f:this}})(jQuery);




/**
 * Equal Heights Plugin
 * Equalize the heights of elements. Great for columns or any elements
 * that need to be the same size (floats, etc).
 * 
 * Version 1.0
 * Updated 12/10/2008
 *
 * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com) 
 *
 * Usage: $(object).equalHeights([minHeight], [maxHeight]);
 * 
 * Example 1: $(".cols").equalHeights(); Sets all columns to the same height.
 * Example 2: $(".cols").equalHeights(400); Sets all cols to at least 400px tall.
 * Example 3: $(".cols").equalHeights(100,300); Cols are at least 100 but no more
 * than 300 pixels tall. Elements with too much content will gain a scrollbar.
 * 
 */
(function($){$.fn.equalHeights=function(minHeight,maxHeight){tallest=(minHeight)?minHeight:0;this.each(function(){if($(this).height()>tallest){tallest=$(this).height();}});if((maxHeight)&&tallest>maxHeight)tallest=maxHeight;return this.each(function(){$(this).height(tallest).css("overflow","visible");});}})(jQuery);


/**
 * Compact labels plugin
 */
(function($){$.fn.compactize=function(){return this.each(function(){var label=$(this),input=$('#'+label.attr('for'));input.focus(function(){label.hide();}).blur(function(){if(input.val()===''){label.show();}});window.setTimeout(function(){if(input.val()!==''){label.hide();}},50);});};})(jQuery);

/*
 * hrefID jQuery extention - returns a valid #hash string from link href attribute in Internet Explorer
 */
(function($){$.fn.extend({hrefId:function(){return $(this).attr('href').substr($(this).attr('href').indexOf('#'));}});})(jQuery);

/*
 * Scripts
 *
 */
jQuery(function($) {
 
	var Engine = {
		utils : {
			links : function(){
				$('a[rel*=external]').click(function(e){
					e.preventDefault();
					window.open($(this).attr('href'));						  
				});
			},
			mails : function(){
				$('a[href^=mailto:]').each(function(){
					var mail = $(this).attr('href').replace('mailto:','');
					var replaced = mail.replace('/at/','@');
					$(this).attr('href','mailto:'+replaced);
					if($(this).text() == mail) {
						$(this).text(replaced);
					}
				});
			}			
		},
		ui : {
			compactLabels : function () {
				$('.form-a label, .form-b label').compactize();				
			},
			equalHeightsInit : function () {
				$('.box-. p').not('.button-b').equalHeights();							
			},
			tabsInit : function () {
				$("ul.tabs").tabs("div.panes > div", { current : 'active' } ); 
			},
			collapseBoxes : function () {
				//hide by default (newsletter)
				$('.box-k .form-a').parent().hide();
				
				$('.collapse-trigger').click(function () {
					var collapsable = $(this).parent().find('.collapsable');
					collapsable.slideToggle();					
					$(this).toggleClass('collapsed');					
				});
			},
			colorboxInit : function () {
				$('.box-e').each(function () {
					var tellAFriend = $(this).find('.tell-a-friend').html();					
					$(this).find('.button-d a').colorbox({html : tellAFriend, opacity : 0.75/*, transition: 'none'*/ });
					var theBounty = $(this).find('.the-bounty').html();					
					$(this).find('.box-f a.link-b').colorbox({html : theBounty, opacity : 0.75/*, transition: 'none'*/ });
					
				});
				
				var theBounty = $('.the-bounty').html();	
				$('.water-counter').colorbox({html : theBounty, opacity : 0.75/*, transition: 'none'*/ });
								
//				var contactForm = $('#footer .contact-form').html();					
//				$('.list-j .contact-us a, #nav_762523 li:last, #nav_762647 li:last, .primary-te .contact-us').colorbox({html : contactForm, opacity : 0.75/*, transition: 'none'*/});	
				
				var cvcWhat = $('#cvcAction').html();					
				$('.ccv-link').colorbox({html : cvcWhat, opacity : 0.75/*, transition: 'none'*/});
				
				
			},
				tooltipInit : function () {				
		var myEffect = 'fade';
		if($.browser.msie) var myEffect = 'toggle';
		
		$('.box-e').each(function () {
			var myTooltip = $(this).find('.tooltip');
			
			$(this).find('a.tooltip-trigger').tooltip({relative : true, tip : myTooltip, effect: myEffect, offset : [5, 72], events: { 
				def:		"not, not", 
				input:		"focus,blur", 
				widget:		"focus mouseover,blur mouseout", 
				tooltip:	"not, not" 
			}});
			
			$(this).find('a.tooltip-trigger').click(function (e) {
				var myApi = $(this).tooltip();
				if(myApi.isShown()){
					myApi.hide();
				} else {
					myApi.show();
				}
				e.preventDefault();
			});
		});			
	}
		},
		
		tweaks : {
			
			joinNewsletterFocus : function(){
				
					$("#joinNewsletterBtn").click(function(){
						$(".wrapper-b").css("display","block");
						$(".box-k .wrapper h2").css("background-position","100% 10px");
						
					});
				
				},
				
			twitterAddon : function(){
				
				$("#tweet").wrap("<p></p>");
			
				},
				
			addSpan : function(nav){
				$('#' + nav + ' li a').contents().each(function(){
						$(this).wrap("<span></span>");
				});
				
				$('#' + nav + ' li ul li a').contents().each(function(){
						$(this).wrap("");
				});
			},
			
			disableProdLink : function (){
				
				$(".cart .col1").find("a").click(function(){
					return false;
				});
				
				$(".cart .col1").find("a").hover(function(){
					$(this).css("cursor","default");
				});
				
				},
				

			
			checkout : function(){
				// -----------------------------------------------------
				// This will copy over the shipping address value to the 
				// billing address.  Make sure the checkbox Id is "SameAsShipping"
				//
				// * Update - changed to check length and clear fields on unchecked
				// -----------------------------------------------------	
				$("#SameAsShipping").bind("change", function(e){
					
					var n = $("#SameAsShipping:checked").length
						if(n == 0){
							$("#ShippingAttention").val('');
							$("#CAT_Custom_116466").val('');
							$("#CAT_Custom_117102").val('');
							$("#ShippingAddress").val('');
							$("#ShippingCity").val('');
							$("#ShippingState").val('');
							$("#ShippingZip").val('');
							$("#ShippingPhone").val('');
						}else{
							
							$("#ShippingAttention").val($("#FirstName").val() + " " + $("#LastName").val());
							$("#CAT_Custom_116466").val($("#CAT_Custom_117102").val());
							$("#ShippingAddress").val($("#BillingAddress").val());
							$("#ShippingCity").val($("#BillingCity").val());
							$("#ShippingState").val($("#BillingState").val());
							$("#ShippingZip").val($("#BillingZip").val());
							$("#ShippingPhone").val($("#BillingPhone").val());
						}
				
				});
				
			},// end checkout
	
			productWizard : function(){
				
				$(".box-e").each(function(){
										 
										  
					// insert buy now button
    				$(this).find("p.button-e").html($(this).find(".hide .buyNow").html());
					
					// figure out background
					var inventoryStart = $(this).find(".inventoryStart").text();
					var currentInventory = $(this).find(".inventory").text();
					var inventoryDifference = inventoryStart - currentInventory;
				
					var a = inventoryDifference;
					var b = inventoryStart;
				
					var c = a/b;
					var d = c*100;
					
					var d = Math.round(d);
				
					// if we are less than but greater than 
					if(d <= 99 && d >= 90){ var bgNum = 2; }
					if(d <= 89 && d >= 80){ var bgNum = 2; }
					if(d <= 79 && d >= 70){ var bgNum = 3; }
					if(d <= 69 && d >= 60){ var bgNum = 4; }
					if(d <= 59 && d >= 50){ var bgNum = 5; }
					if(d <= 49 && d >= 40){ var bgNum = 6; }
					if(d <= 39 && d >= 30){ var bgNum = 7; }
					if(d <= 29 && d >= 20){ var bgNum = 8; }
					if(d <= 19 && d >= 10){ var bgNum = 9; }
					if(d <= 9 && d >= 0){ var bgNum = 10; }
					
					// if out of stock completely
					if(currentInventory == 0){	bgNum = 1; }
					
					// if full stock
					if(currentInventory == inventoryStart){	bgNum = 10; }
					
					// add class to .bog-g to display current stock level.
					$(this).find(".box-g").addClass("bg-"+bgNum);

					
					//console.log("Background Number: "+bgNum);
					//console.log("Current Inventory: "+currentInventory);
					
					// Out of stock Banner / disable buttons
					if(currentInventory == 0){
						
						$(this).find(".box-i").css("display","block");
						
						
						}
					
					// add large images from products to header
					// wine 1
					// 
					$(".secondary-ta .list-b li:nth-child(1)").html($(".box-e:nth-child(1)").find(".largeImage a").html());
					$(".secondary-ta .list-b li:nth-child(2)").html($(".box-e:nth-child(2)").find(".largeImage a").html());
					$(".secondary-ta .list-b li:nth-child(3)").html($(".box-e:nth-child(3)").find(".largeImage a").html());
					
					
					
				});
				
				
			},
			
			blog2Attack : function(){
			
				if (document.location.href.indexOf("Learn_More") != -1){	
					$("#wigTags, #wigArchives, #wigFeed").hide();
				}	
				
			},
			
			continueShopping : function(){
				$("#catCartDetails .cartLink").parent().html('<a target="_top" class="cartLink" href="../external.html?link=http://www.cellarthief.com/">Shopping cart is empty. Continue Shopping.</a>');
					
			},
			
			sfCounter : function(){
				
				var Total = $(".sfCounter span.total").text();
	
				var nodes = Total.split(",");
						for(i=0;i<nodes.length;i++)
						{
							var numRand = Math.floor(Math.random()*100)
					
							$(".sfCounter .wrap").append("<span class='num-"+nodes[i]+"'></span>")
							$(".sfCounter .wrap span").fadeOut(numRand).slideDown(numRand);
						}
				
				} // end sfCounter
			
			
			
		},// end tweaks
		
		forms : {
			shippingCart : function(){
			
				if ($('#catshopbuy').length === 0 || typeof ValidateCart !== 'function'){
					return;
				}
				
				var fnc = ValidateCart;
				
				ValidateCart = function(){  
					if($('#shippingPostcode').size() > 0){
						if(checkIt($('#shippingPostcode').val()) === false) return false;
					}
					var res = fnc.apply(this,arguments);
					return res;
				};
				
				// ZIP fields
				
				var checkShipping = setInterval(function(){
					if($('#shippingPostcode').size() > 0 && !$('#shippingPostcode').is('.working')){
						$('#shippingPostcode').addClass('working').blur(function(){
							return checkIt($(this).val());
						});
					}					
				},50);
				
			},
			shippingCheckout : function(){

				$('#catwebformform44369').submit(function(){
					if($('#ShippingZip').size() > 0){
						return checkIt($('#ShippingZip').val());
					}
				});
				
				$('#ShippingZip').blur(function(){
					return checkIt($(this).val());
				});
			
			}
			
			
			
		}
		
		
	
		
	};

	Engine.utils.links();
	Engine.utils.mails();
	Engine.ui.compactLabels();
	Engine.ui.equalHeightsInit();
	Engine.ui.tabsInit();
	Engine.ui.collapseBoxes();
	Engine.ui.colorboxInit();
	Engine.ui.tooltipInit();
	
	Engine.tweaks.joinNewsletterFocus();
	Engine.tweaks.twitterAddon();
	Engine.tweaks.addSpan("nav");
	Engine.tweaks.disableProdLink();
	Engine.tweaks.checkoutTotal();
	Engine.tweaks.haltViewCart();
	Engine.tweaks.viewCartIconChange();
	Engine.tweaks.checkout();
	Engine.tweaks.blog2Attack();
	//Engine.tweaks.continueShopping();
	//Engine.tweaks.checkShipping();
	Engine.forms.shippingCart();
	Engine.forms.shippingCheckout();
	
	Engine.tweaks.productWizard();
	
	Engine.tweaks.sfCounter();


	$("#shippingPostcode").attr("maxlength","5"); // limit zip in checkout to 5 chars
	//$(".box-k H2").removeClass("collapsed"); // show collapsed email list form 
	//$('.box-k .form-a').parent().show(); // show collapsed email list form 


});

var zipCheck = function(code){
	if(typeof zips != 'undefined') return zips.hasOwnProperty(code);
	return false;
}

var checkIt = function(code){
	if(zipCheck(code) === true){
		alert('We are sorry we don\'t ship to that zipcode, please review our shipping policy');
		return false;
	}
}
