(function(a){a.event.special.mousewheel={setup:function(){var b=a.event.special.mousewheel.handler;if(a.browser.mozilla){a(this).bind("mousemove.mousewheel",function(c){a.data(this,"mwcursorposdata",{pageX:c.pageX,pageY:c.pageY,clientX:c.clientX,clientY:c.clientY})})}if(this.addEventListener){this.addEventListener((a.browser.mozilla?"DOMMouseScroll":"mousewheel"),b,false)}else{this.onmousewheel=b}},teardown:function(){var b=a.event.special.mousewheel.handler;a(this).unbind("mousemove.mousewheel");if(this.removeEventListener){this.removeEventListener((a.browser.mozilla?"DOMMouseScroll":"mousewheel"),b,false)}else{this.onmousewheel=function(){}}a.removeData(this,"mwcursorposdata")},handler:function(d){var b=Array.prototype.slice.call(arguments,1);d=a.event.fix(d||window.event);a.extend(d,a.data(this,"mwcursorposdata")||{});var c=0,e=true;if(d.wheelDelta){c=d.wheelDelta/120}if(d.detail){c=-d.detail/3}d.data=d.data||{};d.type="mousewheel";b.unshift(c);b.unshift(d);return a.event.handle.apply(this,b)}};a.fn.extend({mousewheel:function(b){return b?this.bind("mousewheel",b):this.trigger("mousewheel")},unmousewheel:function(b){return this.unbind("mousewheel",b)}})})(jQuery);var Cufon=(function(){var O=function(){return O.replace.apply(null,arguments)};var Z=O.DOM={ready:(function(){var b=false,d={loaded:1,complete:1};var a=[],c=function(){if(b){return}b=true;for(var e;e=a.shift();e()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",c,false);window.addEventListener("pageshow",c,false)}if(!window.opera&&document.readyState){(function(){d[document.readyState]?c():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");c()}catch(e){setTimeout(arguments.callee,1)}})()}S(window,"load",c);return function(e){if(!arguments.length){c()}else{b?e():a.push(e)}}})(),root:function(){return document.documentElement||document.body}};var P=O.CSS={Size:function(b,a){this.value=parseFloat(b);this.unit=String(b).match(/[a-z%]*$/)[0]||"px";this.convert=function(c){return c/a*this.value};this.convertFrom=function(c){return c/this.value*a};this.toString=function(){return this.value+this.unit}},addClass:function(b,a){var c=b.className;b.className=c+(c&&" ")+a;return b},color:L(function(b){var a={};a.color=b.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(d,c,e){a.opacity=parseFloat(e);return"rgb("+c+")"});return a}),fontStretch:L(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(b){var a=document.defaultView;if(a&&a.getComputedStyle){return new B(a.getComputedStyle(b,null))}if(b.currentStyle){return new B(b.currentStyle)}return new B(b.style)},gradient:L(function(e){var f={id:e,type:e.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},b=e.substr(e.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var d=0,a=b.length,c;d<a;++d){c=b[d].split("=",2).reverse();f.stops.push([c[1]||d/(a-1),c[0]])}return f}),quotedList:L(function(d){var c=[],b=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,a;while(a=b.exec(d)){c.push(a[3]||a[1])}return c}),recognizesMedia:L(function(f){var d=document.createElement("style"),c,b,a;d.type="text/css";d.media=f;try{d.appendChild(document.createTextNode("/**/"))}catch(e){}b=I("head")[0];b.insertBefore(d,b.firstChild);c=(d.sheet||d.styleSheet);a=c&&!c.disabled;b.removeChild(d);return a}),removeClass:function(c,b){var a=RegExp("(?:^|\\s+)"+b+"(?=\\s|$)","g");c.className=c.className.replace(a,"");return c},supports:function(c,b){var a=document.createElement("span").style;if(a[c]===undefined){return false}a[c]=b;return a[c]===b},textAlign:function(d,c,a,b){if(c.get("textAlign")=="right"){if(a>0){d=" "+d}}else{if(a<b-1){d+=" "}}return d},textShadow:L(function(e){if(e=="none"){return null}var d=[],f={},a,b=0;var c=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(a=c.exec(e)){if(a[0]==","){d.push(f);f={};b=0}else{if(a[1]){f.color=a[1]}else{f[["offX","offY","blur"][b++]]=a[2]}}}d.push(f);return d}),textTransform:(function(){var a={uppercase:function(b){return b.toUpperCase()},lowercase:function(b){return b.toLowerCase()},capitalize:function(b){return b.replace(/\b./g,function(c){return c.toUpperCase()})}};return function(d,c){var b=a[c.get("textTransform")];return b?b(d):d}})(),whiteSpace:(function(){var c={inline:1,"inline-block":1,"run-in":1};var b=/^\s+/,a=/\s+$/;return function(g,e,f,d){if(d){if(d.nodeName.toLowerCase()=="br"){g=g.replace(b,"")}}if(c[e.get("display")]){return g}if(!f.previousSibling){g=g.replace(b,"")}if(!f.nextSibling){g=g.replace(a,"")}return g}})()};P.ready=(function(){var a=!P.recognizesMedia("all"),d=false;var c=[],g=function(){a=true;for(var j;j=c.shift();j()){}};var h=I("link"),i=I("style");function b(j){return j.disabled||f(j.sheet,j.media||"screen")}function f(l,o){if(!P.recognizesMedia(o||"all")){return true}if(!l||l.disabled){return false}try{var p=l.cssRules,n;if(p){search:for(var k=0,j=p.length;n=p[k],k<j;++k){switch(n.type){case 2:break;case 3:if(!f(n.styleSheet,n.media.mediaText)){return false}break;default:break search}}}}catch(m){}return true}function e(){if(document.createStyleSheet){return true}var k,j;for(j=0;k=h[j];++j){if(k.rel.toLowerCase()=="stylesheet"&&!b(k)){return false}}for(j=0;k=i[j];++j){if(!b(k)){return false}}return true}Z.ready(function(){if(!d){d=P.getStyle(document.body).isUsable()}if(a||(d&&e())){g()}else{setTimeout(arguments.callee,10)}});return function(j){if(a){j()}else{c.push(j)}}})();function U(c){var b=this.face=c.face,a={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=c.glyphs;this.w=c.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 e=b.bbox.split(/\s+/);var d={minX:parseInt(e[0],10),minY:parseInt(e[1],10),maxX:parseInt(e[2],10),maxY:parseInt(e[3],10)};d.width=d.maxX-d.minX;d.height=d.maxY-d.minY;d.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return d})();this.ascent=-parseInt(b.ascent,10);this.descent=-parseInt(b.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(k,m,d){var n=this.glyphs,l,j,f,o=[],e=0,i=-1,h=-1,g;while(g=k[++i]){l=n[g]||this.missingGlyph;if(!l){continue}if(j){e-=f=j[g]||0;o[h]-=f}e+=o[++h]=~~(l.w||this.w)+m+(a[g]?d:0);j=l.k}o.total=e;return o}}function H(){var b={},a={oblique:"italic",italic:"oblique"};this.add=function(c){(b[c.style]||(b[c.style]={}))[c.weight]=c};this.get=function(g,h){var f=b[g]||b[a[g]]||b.normal||b.italic||b.oblique;if(!f){return null}h={normal:400,bold:700}[h]||parseInt(h,10);if(f[h]){return f[h]}var d={1:1,99:0}[h%100],j=[],e,c;if(d===undefined){d=h>400}if(h==500){h=400}for(var i in f){if(!M(f,i)){continue}i=parseInt(i,10);if(!e||i<e){e=i}if(!c||i>c){c=i}j.push(i)}if(h<e){h=e}if(h>c){h=c}j.sort(function(l,k){return(d?(l>=h&&k>=h)?l<k:l>k:(l<=h&&k<=h)?l>k:l<k)?-1:1});return f[j[0]]}}function T(){function c(e,f){if(e.contains){return e.contains(f)}return e.compareDocumentPosition(f)&16}function a(f){var e=f.relatedTarget;if(!e||c(this,e)){return}b(this,f.type=="mouseover")}function d(e){b(this,e.type=="mouseenter")}function b(e,f){setTimeout(function(){var g=F.get(e).options;O.replace(e,f?J(g,g.hover):g,true)},10)}this.attach=function(e){if(e.onmouseenter===undefined){S(e,"mouseover",a);S(e,"mouseout",a)}else{S(e,"mouseenter",d);S(e,"mouseleave",d)}}}function W(){var b=[],c={};function a(g){var d=[],f;for(var e=0;f=g[e];++e){d[e]=b[c[f]]}return d}this.add=function(e,d){c[e]=b.push(d)-1};this.repeat=function(){var d=arguments.length?a(arguments):b,e;for(var f=0;e=d[f++];){O.replace(e[0],e[1],true)}}}function C(){var c={},a=0;function b(d){return d.cufid||(d.cufid=++a)}this.get=function(d){var e=b(d);return c[e]||(c[e]={})}}function B(a){var c={},b={};this.extend=function(d){for(var e in d){if(M(d,e)){c[e]=d[e]}}return this};this.get=function(d){return c[d]!=undefined?c[d]:a[d]};this.getSize=function(e,d){return b[e]||(b[e]=new P.Size(this.get(e),d))};this.isUsable=function(){return !!a}}function S(b,a,c){if(b.addEventListener){b.addEventListener(a,c,false)}else{if(b.attachEvent){b.attachEvent("on"+a,function(){return c.call(b,window.event)})}}}function X(b,a){var c=F.get(b);if(c.options){return b}if(a.hover&&a.hoverables[b.nodeName.toLowerCase()]){D.attach(b)}c.options=a;return b}function L(a){var b={};return function(c){if(!M(b,c)){b[c]=a.apply(null,arguments)}return b[c]}}function E(e,d){var a=P.quotedList(d.get("fontFamily").toLowerCase()),c;for(var b=0;c=a[b];++b){if(K[c]){return K[c].get(d.get("fontStyle"),d.get("fontWeight"))}}return null}function I(a){return document.getElementsByTagName(a)}function M(b,a){return b.hasOwnProperty(a)}function J(){var b={},a,e;for(var d=0,c=arguments.length;a=arguments[d],d<c;++d){for(e in a){if(M(a,e)){b[e]=a[e]}}}return b}function Q(d,l,b,m,e,c){var j=document.createDocumentFragment(),g;if(l===""){return j}var k=m.separate;var h=l.split(R[k]),a=(k=="words");if(a&&V){if(/^\s/.test(l)){h.unshift("")}if(/\s$/.test(l)){h.push("")}}for(var i=0,f=h.length;i<f;++i){g=ab[m.engine](d,a?P.textAlign(h[i],b,i,f):h[i],b,m,e,c,i<f-1);if(g){j.appendChild(g)}}return j}function N(c,l){var b=c.nodeName.toLowerCase();if(l.ignore[b]){return}var d=!l.textless[b];var a=P.getStyle(X(c,l)).extend(l);var e=E(c,a),f,j,h,g,k,i;if(!e){return}for(f=c.firstChild;f;f=h){j=f.nodeType;h=f.nextSibling;if(d&&j==3){if(g){g.appendData(f.data);c.removeChild(f)}else{g=f}if(h){continue}}if(g){c.replaceChild(Q(e,P.whiteSpace(g.data,a,g,i),a,l,f,c),g);g=null}if(j==1){if(f.firstChild){if(f.nodeName.toLowerCase()=="cufon"){ab[l.engine](e,null,a,l,f,c)}else{arguments.callee(f,l)}}i=f}}}var V=" ".split(/\s+/).length==0;var F=new C();var D=new T();var aa=new W();var G=false;var ab={},K={},Y={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(a){return jQuery(a)})||(window.dojo&&dojo.query)||(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)})||I),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var R={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};O.now=function(){Z.ready();return O};O.refresh=function(){aa.repeat.apply(aa,arguments);return O};O.registerEngine=function(b,a){if(!a){return O}ab[b]=a;return O.set("engine",b)};O.registerFont=function(c){if(!c){return O}var a=new U(c),b=a.family;if(!K[b]){K[b]=new H()}K[b].add(a);return O.set("fontFamily",'"'+b+'"')};O.replace=function(c,b,a){b=J(Y,b);if(!b.engine){return O}if(!G){P.addClass(Z.root(),"cufon-active cufon-loading");P.ready(function(){P.addClass(P.removeClass(Z.root(),"cufon-loading"),"cufon-ready")});G=true}if(b.hover){b.forceHitArea=true}if(b.autoDetect){delete b.fontFamily}if(typeof b.textShadow=="string"){b.textShadow=P.textShadow(b.textShadow)}if(typeof b.color=="string"&&/^-/.test(b.color)){b.textGradient=P.gradient(b.color)}else{delete b.textGradient}if(!a){aa.add(c,arguments)}if(c.nodeType||typeof c=="string"){c=[c]}P.ready(function(){for(var e=0,d=c.length;e<d;++e){var f=c[e];if(typeof f=="string"){O.replace(b.selector(f),b,true)}else{N(f,b)}}});return O};O.set=function(a,b){Y[a]=b;return O};return O})();Cufon.registerEngine("vml",(function(){var m=document.namespaces;if(!m){return}m.add("cvml","urn:schemas-microsoft-com:vml");m=null;var j=document.createElement("cvml:shape");j.style.behavior="url(#default#VML)";if(!j.coordsize){return}j=null;var p=(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:'+(p?"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 k(a,b){return i(a,/(?:em|ex|%)$|^[a-z-]+$/i.test(b)?"1em":b)}function i(d,e){if(e==="0"){return 0}if(/px$/i.test(e)){return parseFloat(e)}var c=d.style.left,b=d.runtimeStyle.left;d.runtimeStyle.left=d.currentStyle.left;d.style.left=e.replace("%","em");var a=d.style.pixelLeft;d.style.left=c;d.runtimeStyle.left=b;return a}function n(d,c,b,f){var a="computed"+f,e=c[a];if(isNaN(e)){e=c.get(f);c[a]=e=(e=="normal")?0:~~b.convertFrom(i(d,e))}return e}var o={};function l(f){var g=f.id;if(!o[g]){var d=f.stops,e=document.createElement("cvml:fill"),a=[];e.type="gradient";e.angle=180;e.focus="0";e.method="sigma";e.color=d[0][1];for(var c=1,b=d.length-1;c<b;++c){a.push(d[c][0]*100+"% "+d[c][1])}e.colors=a.join(",");e.color2=d[b][1];o[g]=e}return o[g]}return function(d,aj,aR,ad,ao,e,aN){var au=(aj===null);if(au){aj=ao.alt}var al=d.viewBox;var ay=aR.computedFontSize||(aR.computedFontSize=new Cufon.CSS.Size(k(e,aR.get("fontSize"))+"px",d.baseSize));var aQ,aA;if(au){aQ=ao;aA=ao.firstChild}else{aQ=document.createElement("cufon");aQ.className="cufon cufon-vml";aQ.alt=aj;aA=document.createElement("cufoncanvas");aQ.appendChild(aA);if(ad.printable){var aT=document.createElement("cufontext");aT.appendChild(document.createTextNode(aj));aQ.appendChild(aT)}if(!aN){aQ.appendChild(document.createElement("cvml:shape"))}}var ab=aQ.style;var aD=aA.style;var ap=ay.convert(al.height),g=Math.ceil(ap);var aL=g/ap;var az=aL*Cufon.CSS.fontStretch(aR.get("fontStretch"));var aJ=al.minX,aH=al.minY;aD.height=g;aD.top=Math.round(ay.convert(aH-d.ascent));aD.left=Math.round(ay.convert(aJ));ab.height=ay.convert(d.height)+"px";var ag=aR.get("color");var h=Cufon.CSS.textTransform(aj,aR).split("");var aq=d.spacing(h,n(e,aR,ay,"letterSpacing"),n(e,aR,ay,"wordSpacing"));if(!aq.length){return null}var an=aq.total;var aO=-aJ+an+(al.width-aq[aq.length-1]);var aa=ay.convert(aO*az),aP=Math.round(aa);var ax=aO+","+al.height,ar;var am="r"+ax+"ns";var aI=ad.textGradient&&l(ad.textGradient);var aw=d.glyphs,aF=0;var ak=ad.textShadow;var c=-1,b=0,aM;while(aM=h[++c]){var ae=aw[h[c]]||d.missingGlyph,aK;if(!ae){continue}if(au){aK=aA.childNodes[b];while(aK.firstChild){aK.removeChild(aK.firstChild)}}else{aK=document.createElement("cvml:shape");aA.appendChild(aK)}aK.stroked="f";aK.coordsize=ax;aK.coordorigin=ar=(aJ-aF)+","+aH;aK.path=(ae.d?"m"+ae.d+"xe":"")+"m"+ar+am;aK.fillcolor=ag;if(aI){aK.appendChild(aI.cloneNode(false))}var f=aK.style;f.width=aP;f.height=g;if(ak){var aE=ak[0],aC=ak[1];var ac=Cufon.CSS.color(aE.color),aS;var av=document.createElement("cvml:shadow");av.on="t";av.color=ac.color;av.offset=aE.offX+","+aE.offY;if(aC){aS=Cufon.CSS.color(aC.color);av.type="double";av.color2=aS.color;av.offset2=aC.offX+","+aC.offY}av.opacity=ac.opacity||(aS&&aS.opacity)||1;aK.appendChild(av)}aF+=aq[b++]}var at=aK.nextSibling,aG,a;if(ad.forceHitArea){if(!at){at=document.createElement("cvml:rect");at.stroked="f";at.className="cufon-vml-cover";aG=document.createElement("cvml:fill");aG.opacity=0;at.appendChild(aG);aA.appendChild(at)}a=at.style;a.width=aP;a.height=g}else{if(at){aA.removeChild(at)}}ab.width=Math.max(Math.ceil(ay.convert(an*az)),0);if(p){var aB=aR.computedYAdjust;if(aB===undefined){var af=aR.get("lineHeight");if(af=="normal"){af="1em"}else{if(!isNaN(af)){af+="em"}}aR.computedYAdjust=aB=0.5*(i(e,af)-parseFloat(ab.height))}if(aB){ab.marginTop=Math.ceil(aB)+"px";ab.marginBottom=aB+"px"}}return aQ}})());Cufon.registerEngine("canvas",(function(){var h=document.createElement("canvas");if(!h||!h.getContext||!h.getContext.apply){return}h=null;var g=Cufon.CSS.supports("display","inline-block");var k=!g&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var l=document.createElement("style");l.type="text/css";l.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(k?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(g?"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(l);function j(s,b){var q=0,f=0;var a=[],r=/([mrvxe])([^a-z]*)/g,d;generate:for(var c=0;d=r.exec(s);++c){var e=d[2].split(",");switch(d[1]){case"v":a[c]={m:"bezierCurveTo",a:[q+~~e[0],f+~~e[1],q+~~e[2],f+~~e[3],q+=~~e[4],f+=~~e[5]]};break;case"r":a[c]={m:"lineTo",a:[q+=~~e[0],f+=~~e[1]]};break;case"m":a[c]={m:"moveTo",a:[q=~~e[0],f=~~e[1]]};break;case"x":a[c]={m:"closePath"};break;case"e":break generate}b[a[c].m].apply(b,a[c].a)}return a}function i(e,d){for(var c=0,b=e.length;c<b;++c){var a=e[c];d[a.m].apply(d,a.a)}}return function(aC,aD,ap,ax,d,aE){var af=(aD===null);if(af){aD=d.getAttribute("alt")}var a=aC.viewBox;var ai=ap.getSize("fontSize",aC.baseSize);var c=0,an=0,al=0,az=0;var aH=ax.textShadow,ah=[];if(aH){for(var aA=aH.length;aA--;){var x=aH[aA];var ag=ai.convertFrom(parseFloat(x.offX));var ac=ai.convertFrom(parseFloat(x.offY));ah[aA]=[ag,ac];if(ac<c){c=ac}if(ag>an){an=ag}if(ac>al){al=ac}if(ag<az){az=ag}}}var aI=Cufon.CSS.textTransform(aD,ap).split("");var f=aC.spacing(aI,~~ai.convertFrom(parseFloat(ap.get("letterSpacing"))||0),~~ai.convertFrom(parseFloat(ap.get("wordSpacing"))||0));if(!f.length){return null}var aa=f.total;an+=a.width-f[f.length-1];az+=a.minX;var av,ak;if(af){av=d;ak=d.firstChild}else{av=document.createElement("cufon");av.className="cufon cufon-canvas";av.setAttribute("alt",aD);ak=document.createElement("canvas");av.appendChild(ak);if(ax.printable){var aw=document.createElement("cufontext");aw.appendChild(document.createTextNode(aD));av.appendChild(aw)}}var b=av.style;var ab=ak.style;var ad=ai.convert(a.height);var aG=Math.ceil(ad);var aj=aG/ad;var y=aj*Cufon.CSS.fontStretch(ap.get("fontStretch"));var ae=aa*y;var ar=Math.ceil(ai.convert(ae+an-az));var am=Math.ceil(ai.convert(a.height-c+al));ak.width=ar;ak.height=am;ab.width=ar+"px";ab.height=am+"px";c+=a.minY;ab.top=Math.round(ai.convert(c-aC.ascent))+"px";ab.left=Math.round(ai.convert(az))+"px";var at=Math.max(Math.ceil(ai.convert(ae)),0)+"px";if(g){b.width=at;b.height=ai.convert(aC.height)+"px"}else{b.paddingLeft=at;b.paddingBottom=(ai.convert(aC.height)-1)+"px"}var aF=ak.getContext("2d"),e=ad/a.height;aF.scale(e,e*aj);aF.translate(-az,-c);aF.save();function ay(){var p=aC.glyphs,m,o=-1,n=-1,q;aF.scale(y,1);while(q=aI[++o]){var m=p[aI[o]]||aC.missingGlyph;if(!m){continue}if(m.d){aF.beginPath();if(m.code){i(m.code,aF)}else{m.code=j("m"+m.d,aF)}aF.fill()}aF.translate(f[++n],0)}aF.restore()}if(aH){for(var aA=aH.length;aA--;){var x=aH[aA];aF.save();aF.fillStyle=x.color;aF.translate.apply(aF,ah[aA]);ay()}}var aq=ax.textGradient;if(aq){var aB=aq.stops,ao=aF.createLinearGradient(0,a.minY,0,a.maxY);for(var aA=0,au=aB.length;aA<au;++aA){ao.addColorStop.apply(ao,aB[aA])}aF.fillStyle=ao}else{aF.fillStyle=ap.get("color")}ay();return av}})());$.fn.NavFlair=function(){var a=jQuery(this);if(a!==null){a.mouseenter(function(){jQuery(this).prepend('<span class="navflair"></span>');jQuery(".navflair").animate({left:"65%"},200,function(){jQuery(this).hide()})}).mouseleave(function(){jQuery(".navflair",this).remove()})}};(function(a,W){var z={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true},y="colorbox",R="cbox",G=R+"_open",F=R+"_load",D=R+"_complete",B=R+"_cleanup",C=R+"_closed",K=a.browser.msie&&!a.support.opacity,L=K&&a.browser.version<7,E=R+"_IE6",m,c,u,e,s,h,p,b,o,t,i,j,k,r,f,q,l,n,d,I,J,O,P,A,w,H,V,Q,v,T,x=R+"Element";function g(Y,X){Y=Y?' id="'+R+Y+'"':"";X=X?' style="'+X+'"':"";return a("<div"+Y+X+"/>")}function U(Y,X){X=X==="x"?t.width():t.height();return(typeof Y==="string")?Math.round((Y.match(/%/)?(X/100)*parseInt(Y,10):parseInt(Y,10))):Y}function M(X){X=a.isFunction(X)?X.call(A):X;return V.photo||X.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function S(){for(var X in V){if(a.isFunction(V[X])&&X.substring(0,2)!=="on"){V[X]=V[X].call(A)}}V.rel=V.rel||A.rel||"nofollow";V.href=V.href||a(A).attr("href");V.title=V.title||A.title}function N(Y){A=Y;V=a.extend({},a(A).data(y));S();if(V.rel!=="nofollow"){o=a("."+x).filter(function(){var Z=a(this).data(y).rel||this.rel;return(Z===V.rel)});H=o.index(A);if(H===-1){o=o.add(A);H=o.length-1}}else{o=a(A);H=0}if(!Q){Q=v=true;w=A;try{w.blur()}catch(X){}a.event.trigger(G);if(V.onOpen){V.onOpen.call(A)}m.css({opacity:+V.opacity,cursor:V.overlayClose?"pointer":"auto"}).show();V.w=U(V.initialWidth,"x");V.h=U(V.initialHeight,"y");T.position(0);if(L){t.bind("resize."+E+" scroll."+E,function(){m.css({width:t.width(),height:t.height(),top:t.scrollTop(),left:t.scrollLeft()})}).trigger("scroll."+E)}}f.add(n).add(l).add(q).add(r).hide();d.html(V.close).show();T.slideshow();T.load()}T=a.fn[y]=a[y]=function(Z,Y){var X=this;if(!X[0]&&X.selector){return X}Z=Z||{};if(Y){Z.onComplete=Y}if(!X[0]||X.selector===undefined){X=a("<a/>");Z.open=true}X.each(function(){a(this).data(y,a.extend({},a(this).data(y)||z,Z)).addClass(x)});if(Z.open){N(X[0])}return X};T.init=function(){t=a(W);c=g().attr({id:y,"class":K?R+"IE":""});m=g("Overlay",L?"position:absolute":"").hide();u=g("Wrapper");e=g("Content").append(i=g("LoadedContent","width:0; height:0"),k=g("LoadingOverlay").add(g("LoadingGraphic")),r=g("Title"),f=g("Current"),l=g("Next"),n=g("Previous"),q=g("Slideshow"),d=g("Close"));u.append(g().append(g("TopLeft"),s=g("TopCenter"),g("TopRight")),g().append(h=g("MiddleLeft"),e,p=g("MiddleRight")),g().append(g("BottomLeft"),b=g("BottomCenter"),g("BottomRight"))).children().children().css({"float":"left"});j=g(false,"position:absolute; width:9999px; visibility:hidden; display:none");a("body").prepend(m,c.append(u,j));e.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover");I=s.height()+b.height()+e.outerHeight(true)-e.height();J=h.width()+p.width()+e.outerWidth(true)-e.width();O=i.outerHeight(true);P=i.outerWidth(true);c.css({"padding-bottom":I,"padding-right":J}).hide();l.click(T.next);n.click(T.prev);d.click(T.close);e.children().removeClass("hover");a("."+x).live("click",function(X){if((X.button!==0&&typeof X.button!=="undefined")||X.ctrlKey||X.shiftKey||X.altKey){return true}else{N(this);return false}});m.click(function(){if(V.overlayClose){T.close()}});a(document).bind("keydown",function(X){if(Q&&V.escKey&&X.keyCode===27){X.preventDefault();T.close()}if(Q&&V.arrowKey&&!v&&o[1]){if(X.keyCode===37&&(H||V.loop)){X.preventDefault();n.click()}else{if(X.keyCode===39&&(H<o.length-1||V.loop)){X.preventDefault();l.click()}}}})};T.remove=function(){c.add(m).remove();a("."+x).die("click").removeData(y).removeClass(x)};T.position=function(ac,Y){var X,ab=Math.max(t.height()-V.h-O-I,0)/2+t.scrollTop(),aa=Math.max(t.width()-V.w-P-J,0)/2+t.scrollLeft();X=(c.width()===V.w+P&&c.height()===V.h+O)?0:ac;u[0].style.width=u[0].style.height="9999px";function Z(ad){s[0].style.width=b[0].style.width=e[0].style.width=ad.style.width;k[0].style.height=k[1].style.height=e[0].style.height=h[0].style.height=p[0].style.height=ad.style.height}c.dequeue().animate({width:V.w+P,height:V.h+O,top:ab,left:aa},{duration:X,complete:function(){Z(this);v=false;u[0].style.width=(V.w+P+J)+"px";u[0].style.height=(V.h+O+I)+"px";if(Y){Y()}},step:function(){Z(this)}})};T.resize=function(Y){if(Q){Y=Y||{};if(Y.width){V.w=U(Y.width,"x")-P-J}if(Y.innerWidth){V.w=U(Y.innerWidth,"x")}i.css({width:V.w});if(Y.height){V.h=U(Y.height,"y")-O-I}if(Y.innerHeight){V.h=U(Y.innerHeight,"y")}if(!Y.innerHeight&&!Y.height){var X=i.wrapInner("<div style='overflow:auto'></div>").children();V.h=X.height();X.replaceWith(X.children())}i.css({height:V.h});T.position(V.transition==="none"?0:V.speed)}};T.prep=function(Z){if(!Q){return}var aa,ac=V.transition==="none"?0:V.speed;t.unbind("resize."+R);i.remove();i=g("LoadedContent").html(Z);function Y(){V.w=V.w||i.width();V.w=V.mw&&V.mw<V.w?V.mw:V.w;return V.w}function X(){V.h=V.h||i.height();V.h=V.mh&&V.mh<V.h?V.mh:V.h;return V.h}i.hide().appendTo(j.show()).css({width:Y(),overflow:V.scrolling?"auto":"hidden"}).css({height:X()}).prependTo(e);j.hide();a("#"+R+"Photo").css({cssFloat:"none"});if(L){a("select").not(c.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(B,function(){this.style.visibility="inherit"})}function ab(ai){var ag,ah,ae,af,aj=o.length,ad=V.loop;T.position(ai,function(){function ak(){if(K){c[0].style.removeAttribute("filter")}}if(!Q){return}if(K){if(aa){i.fadeIn(100)}}if(V.iframe){a("<iframe frameborder=0"+(V.scrolling?"":" scrolling='no'")+(K?" allowtransparency='true'":"")+"/>").attr({src:V.href,name:new Date().getTime()}).appendTo(i)}i.show();r.show().html(V.title);if(aj>1){f.html(V.current.replace(/\{current\}/,H+1).replace(/\{total\}/,aj)).show();l[(ad||H<aj-1)?"show":"hide"]().html(V.next);n[(ad||H)?"show":"hide"]().html(V.previous);ag=H?o[H-1]:o[aj-1];ae=H<aj-1?o[H+1]:o[0];if(V.slideshow){q.show();if(H===aj-1&&!ad&&c.is("."+R+"Slideshow_on")){q.click()}}if(V.preloading){af=a(ae).data(y).href||ae.href;ah=a(ag).data(y).href||ag.href;if(M(af)){a("<img/>")[0].src=af}if(M(ah)){a("<img/>")[0].src=ah}}}k.hide();if(V.transition==="fade"){c.fadeTo(ac,1,function(){ak()})}else{ak()}t.bind("resize."+R,function(){T.position(0)});a.event.trigger(D);if(V.onComplete){V.onComplete.call(A)}})}if(V.transition==="fade"){c.fadeTo(ac,0,function(){ab(0)})}else{ab(ac)}};T.load=function(){var X,Y,aa,Z=T.prep;v=true;A=o[H];V=a.extend({},a(A).data(y));S();a.event.trigger(F);if(V.onLoad){V.onLoad.call(A)}V.h=V.height?U(V.height,"y")-O-I:V.innerHeight&&U(V.innerHeight,"y");V.w=V.width?U(V.width,"x")-P-J:V.innerWidth&&U(V.innerWidth,"x");V.mw=V.w;V.mh=V.h;if(V.maxWidth){V.mw=U(V.maxWidth,"x")-P-J;V.mw=V.w&&V.w<V.mw?V.w:V.mw}if(V.maxHeight){V.mh=U(V.maxHeight,"y")-O-I;V.mh=V.h&&V.h<V.mh?V.h:V.mh}X=V.href;k.show();if(V.inline){g("InlineTemp").hide().insertBefore(a(X)[0]).bind(F+" "+B,function(){a(this).replaceWith(i.children())});Z(a(X))}else{if(V.iframe){Z(" ")}else{if(V.html){Z(V.html)}else{if(M(X)){Y=new Image();Y.onload=function(){var ab;Y.onload=null;Y.id=R+"Photo";a(Y).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(V.scalePhotos){aa=function(){Y.height-=Y.height*ab;Y.width-=Y.width*ab};if(V.mw&&Y.width>V.mw){ab=(Y.width-V.mw)/Y.width;aa()}if(V.mh&&Y.height>V.mh){ab=(Y.height-V.mh)/Y.height;aa()}}if(V.h){Y.style.marginTop=Math.max(V.h-Y.height,0)/2+"px"}setTimeout(function(){Z(Y)},1);if(o[1]&&(H<o.length-1||V.loop)){a(Y).css({cursor:"pointer"}).click(T.next)}if(K){Y.style.msInterpolationMode="bicubic"}};Y.src=X}else{g().appendTo(j).load(X,function(ab,ac,ad){Z(ac==="error"?"Request unsuccessful: "+ad.statusText:this)})}}}}};T.next=function(){if(!v){H=H<o.length-1?H+1:0;T.load()}};T.prev=function(){if(!v){H=H?H-1:o.length-1;T.load()}};T.slideshow=function(){var Z,aa,X=R+"Slideshow_";q.bind(C,function(){q.unbind();clearTimeout(aa);c.removeClass(X+"off "+X+"on")});function Y(){q.text(V.slideshowStop).bind(D,function(){aa=setTimeout(T.next,V.slideshowSpeed)}).bind(F,function(){clearTimeout(aa)}).one("click",function(){Z()});c.removeClass(X+"off").addClass(X+"on")}Z=function(){clearTimeout(aa);q.text(V.slideshowStart).unbind(D+" "+F).one("click",function(){Y();aa=setTimeout(T.next,V.slideshowSpeed)});c.removeClass(X+"on").addClass(X+"off")};if(V.slideshow&&o[1]){if(V.slideshowAuto){Y()}else{Z()}}};T.close=function(){if(Q){Q=false;a.event.trigger(B);if(V.onCleanup){V.onCleanup.call(A)}t.unbind("."+R+" ."+E);m.fadeTo("fast",0);c.stop().fadeTo("fast",0,function(){c.find("iframe").attr("src","about:blank");i.remove();c.add(m).css({opacity:1,cursor:"auto"}).hide();try{w.focus()}catch(X){}setTimeout(function(){a.event.trigger(C);if(V.onClosed){V.onClosed.call(A)}},1)})}};T.element=function(){return a(A)};T.settings=z;a(T.init)}(jQuery,this));jQuery(function(a){var ah=navigator.userAgent.toLowerCase();var d=(ah.match(/.+(?:rv|webkit|khtml|opera|msie)[\/: ]([\d.]+)/)||[0,"0"])[1];var K=(/msie/.test(ah)&&!/opera/.test(ah)&&parseInt(d)<7&&(!window.XMLHttpRequest||typeof(XMLHttpRequest)==="function"));var c=a("body");var j;var f;var Z=false;var v={};var t=false;var h;var i;var O={started:false,ready:false,dataReady:false,anim:false,animContent:false,loadingShown:false,transition:false,resizing:false,closing:false,error:false,blocker:null,blockerVars:null,full:null,bg:null,loading:null,tmp:null,content:null,wrapper:null,contentWrapper:null,scripts:new Array(),scriptsShown:new Array()};var S={width:false,height:false,windowResizing:false};var J={width:null,height:null,windowResizing:true};var aj;a.fn.nyroModal=function(al){if(!this){return false}return this.each(function(){var am=a(this);if(this.nodeName.toLowerCase()=="form"){am.unbind("submit.nyroModal").bind("submit.nyroModal",function(an){if(an.isDefaultPrevented()){return false}if(am.data("nyroModalprocessing")){return true}if(this.enctype=="multipart/form-data"){P(a.extend(al,{from:this}));return true}an.preventDefault();P(a.extend(al,{from:this}));return false})}else{am.unbind("click.nyroModal").bind("click.nyroModal",function(an){if(an.isDefaultPrevented()){return false}an.preventDefault();P(a.extend(al,{from:this}));return false})}})};a.fn.nyroModalManual=function(al){if(!this.length){P(al)}return this.each(function(){P(a.extend(al,{from:this}))})};a.nyroModalManual=function(al){P(al)};a.nyroModalSettings=function(an,al,am){T(an,al,am);if(!al&&O.started){if(O.bg&&an.bgColor){j.updateBgColor(O,j,function(){})}if(O.contentWrapper&&an.title){Y()}if(!O.error&&(an.windowResizing||(!O.resizing&&(("width" in an&&an.width==j.width)||("height" in an&&an.height==j.height))))){O.resizing=true;if(O.contentWrapper){e(true)}if(O.contentWrapper&&O.contentWrapper.is(":visible")&&!O.animContent){if(t){O.content.css({position:""})}j.resize(O,j,function(){j.windowResizing=false;O.resizing=false;if(t){O.content.css({position:"fixed"})}if(a.isFunction(j.endResize)){j.endResize(O,j)}})}}}};a.nyroModalRemove=function(){Q()};a.nyroModalNext=function(){var al=z(1);if(al){return al.nyroModalManual(y())}return false};a.nyroModalPrev=function(){var al=z(-1);if(al){return al.nyroModalManual(y())}return false};a.fn.nyroModal.settings={debug:false,blocker:false,windowResize:true,modal:false,type:"",forceType:null,from:"",hash:"",processHandler:null,selIndicator:"nyroModalSel",formIndicator:"nyroModal",content:null,bgColor:"#000000",ajax:{},swf:{wmode:"transparent"},width:null,height:null,minWidth:400,minHeight:300,resizable:true,autoSizable:true,padding:25,regexImg:"[^.].(jpg|jpeg|png|tiff|gif|bmp)s*$",addImageDivTitle:false,defaultImgAlt:"Image",setWidthImgTitle:true,ltr:true,gallery:null,galleryLinks:'<a href="#" class="nyroModalPrev">Prev</a><a href="#"  class="nyroModalNext">Next</a>',galleryCounts:w,galleryLoop:false,zIndexStart:100,cssOpt:{bg:{position:"absolute",overflow:"hidden",top:0,left:0,height:"100%",width:"100%"},wrapper:{position:"absolute",top:"50%",left:"50%"},wrapper2:{},content:{},loading:{position:"absolute",top:"50%",left:"50%",marginTop:"-50px",marginLeft:"-50px"}},wrap:{div:'<div class="wrapper"></div>',ajax:'<div class="wrapper"></div>',form:'<div class="wrapper"></div>',formData:'<div class="wrapper"></div>',image:'<div class="wrapperImg"></div>',swf:'<div class="wrapperSwf"></div>',iframe:'<div class="wrapperIframe"></div>',iframeForm:'<div class="wrapperIframe"></div>',manual:'<div class="wrapper"></div>'},closeButton:'<a href="#" class="nyroModalClose" id="closeBut" title="close">Close</a>',title:null,titleFromIframe:true,openSelector:".nyroModal",closeSelector:".nyroModalClose",contentLoading:'<a href="#" class="nyroModalClose">Cancel</a>',errorClass:"error",contentError:'The requested content cannot be loaded.<br />Please try again later.<br /><a href="#" class="nyroModalClose">Close</a>',handleError:null,showBackground:aa,hideBackground:C,endFillContent:null,showContent:ab,endShowContent:null,beforeHideContent:null,hideContent:D,showTransition:af,hideTransition:F,showLoading:ad,hideLoading:E,resize:R,endResize:null,updateBgColor:ag,endRemove:null};function P(aq){if(O.loadingShown||O.transition||O.anim){return}k("processModal");O.started=true;f=a.extend(true,aq);U(aq);if(!O.full){O.blockerVars=O.blocker=null}O.error=false;O.closing=false;O.dataReady=false;O.scripts=new Array();O.scriptsShown=new Array();j.type=q();if(j.forceType){if(!j.content){j.from=true}j.type=j.forceType;j.forceType=null}if(a.isFunction(j.processHandler)){j.processHandler(j)}var an=j.from;var au=j.url;J.width=j.width;J.height=j.height;if(j.type=="swf"){T({overflow:"visible"},"cssOpt","content");j.content='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+j.width+'" height="'+j.height+'"><param name="movie" value="'+au+'"></param>';var at="";a.each(j.swf,function(aw,ax){j.content+='<param name="'+aw+'" value="'+ax+'"></param>';at+=" "+aw+'="'+ax+'"'});j.content+='<embed src="'+au+'" type="application/x-shockwave-flash" width="'+j.width+'" height="'+j.height+'"'+at+"></embed></object>"}if(an){var ap=a(an).blur();if(j.type=="form"){var al=a(an).serializeArray();al.push({name:j.formIndicator,value:1});if(j.selector){al.push({name:j.selIndicator,value:j.selector.substring(1)})}ae();a.ajax(a.extend({},j.ajax,{url:au,data:al,type:ap.attr("method")?ap.attr("method"):"get",success:b,error:N}));k("Form Ajax Load: "+ap.attr("action"))}else{if(j.type=="formData"){I();ap.attr("target","nyroModalIframe");ap.attr("action",au);ap.prepend('<input type="hidden" name="'+j.formIndicator+'" value="1" />');if(j.selector){ap.prepend('<input type="hidden" name="'+j.selIndicator+'" value="'+j.selector.substring(1)+'" />')}O.tmp.html('<iframe frameborder="0" hspace="0" name="nyroModalIframe" src="javascript:\'\';"></iframe>');a("iframe",O.tmp).css({width:j.width,height:j.height}).error(N).load(u);k("Form Data Load: "+ap.attr("action"));ae();ac()}else{if(j.type=="image"){k("Image Load: "+au);var ar=ap.attr("title")||j.defaultImgAlt;I();O.tmp.html('<img id="nyroModalImg" />').find("img").attr("alt",ar);O.tmp.css({lineHeight:0});a("img",O.tmp).error(N).load(function(){k("Image Loaded: "+this.src);a(this).unbind("load");var ax=O.tmp.width();var aw=O.tmp.height();O.tmp.css({lineHeight:""});S.width=ax;S.height=aw;T({width:ax,height:aw,imgWidth:ax,imgHeight:aw});J.width=ax;J.height=aw;T({overflow:"visible"},"cssOpt","content");O.dataReady=true;if(O.loadingShown||O.transition){ac()}}).attr("src",au);ae()}else{if(j.type=="iframeForm"){I();O.tmp.html('<iframe frameborder="0" hspace="0" src="javascript:\'\';" name="nyroModalIframe" id="nyroModalIframe"></iframe>');k("Iframe Form Load: "+au);a("iframe",O.tmp).eq(0).css({width:"100%",height:a.support.boxModel?"99%":"100%"}).load(G);O.dataReady=true;ae()}else{if(j.type=="iframe"){I();O.tmp.html('<iframe frameborder="0" hspace="0" src="javascript:\'\';" name="nyroModalIframe" id="nyroModalIframe"></iframe>');k("Iframe Load: "+au);a("iframe",O.tmp).eq(0).css({width:"100%",height:a.support.boxModel?"99%":"100%"}).load(G);O.dataReady=true;ae()}else{if(j.type){k("Content: "+j.type);I();O.tmp.html(j.content);var av=O.tmp.width();var ao=O.tmp.height();var am=a(j.type);if(am.length){T({type:"div"});av=am.width();ao=am.height();if(h){i=h}h=am;O.tmp.append(am.contents())}J.width=av;J.height=ao;T({width:av,height:ao});if(O.tmp.html()){O.dataReady=true}else{N()}if(!O.ready){ae()}else{m()}}else{k("Ajax Load: "+au);T({type:"ajax"});var al=j.ajax.data||{};if(j.selector){if(typeof al=="string"){al+="&"+j.selIndicator+"="+j.selector.substring(1)}else{al[j.selIndicator]=j.selector.substring(1)}}ae();a.ajax(a.extend(true,j.ajax,{url:au,success:b,error:N,data:al}))}}}}}}}else{if(j.content){k("Content: "+j.type);T({type:"manual"});I();O.tmp.html(a("<div/>").html(j.content).contents());if(O.tmp.html()){O.dataReady=true}else{N()}ae()}else{}}}function U(al){k("setDefaultCurrentSettings");j=a.extend(true,{},a.fn.nyroModal.settings,al);V()}function T(an,al,am){if(O.started){if(al&&am){a.extend(true,j[al][am],an)}else{if(al){a.extend(true,j[al],an)}else{if(O.animContent){if("width" in an){if(!O.resizing){an.setWidth=an.width;Z=true}delete an.width}if("height" in an){if(!O.resizing){an.setHeight=an.height;Z=true}delete an.height}}a.extend(true,j,an)}}}else{if(al&&am){a.extend(true,a.fn.nyroModal.settings[al][am],an)}else{if(al){a.extend(true,a.fn.nyroModal.settings[al],an)}else{a.extend(true,a.fn.nyroModal.settings,an)}}}}function X(){if(K&&!O.blocker){if(document.documentElement){j.marginScrollLeft=document.documentElement.scrollLeft;j.marginScrollTop=document.documentElement.scrollTop}else{j.marginScrollLeft=document.body.scrollLeft;j.marginScrollTop=document.body.scrollTop}}else{j.marginScrollLeft=0;j.marginScrollTop=0}}function V(){X();j.marginLeft=-(j.width+j.borderW)/2;j.marginTop=-(j.height+j.borderH)/2;if(!O.blocker){j.marginLeft+=j.marginScrollLeft;j.marginTop+=j.marginScrollTop}}function W(){X();var al=B(O.loading);j.marginTopLoading=-(O.loading.height()+al.h.border+al.h.padding)/2;j.marginLeftLoading=-(O.loading.width()+al.w.border+al.w.padding)/2;if(!O.blocker){j.marginLeftLoading+=j.marginScrollLeft;j.marginTopLoading+=j.marginScrollTop}}function Y(){var al=a("h1#nyroModalTitle",O.contentWrapper);if(al.length){al.text(j.title)}else{O.contentWrapper.prepend('<h1 id="nyroModalTitle">'+j.title+"</h1>")}}function I(){k("initModal");if(!O.full){if(j.debug){T({color:"white"},"cssOpt","bg")}var am={zIndex:j.zIndexStart,position:"fixed",top:0,left:0,width:"100%",height:"100%"};var al=c;var ao="";if(j.blocker){O.blocker=al=a(j.blocker);var ar=O.blocker.offset();var at=O.blocker.outerWidth();var an=O.blocker.outerHeight();if(K){T({height:"100%",width:"100%",top:0,left:0},"cssOpt","bg")}O.blockerVars={top:ar.top,left:ar.left,width:at,height:an};var aq=(/msie/.test(ah)?0:x(c.get(0),"borderTopWidth"));var ap=(/msie/.test(ah)?0:x(c.get(0),"borderLeftWidth"));am={position:"absolute",top:ar.top+aq,left:ar.left+ap,width:at,height:an}}else{if(K){c.css({marginLeft:0,marginRight:0});var at=c.width();var an=a(window).height()+"px";if(a(window).height()>=c.outerHeight()){an=c.outerHeight()+"px"}else{at+=20}at+="px";c.css({width:at,height:an,position:"static",overflow:"hidden"});a("html").css({overflow:"hidden"});T({cssOpt:{bg:{position:"absolute",zIndex:j.zIndexStart+1,height:"110%",width:"110%",top:j.marginScrollTop+"px",left:j.marginScrollLeft+"px"},wrapper:{zIndex:j.zIndexStart+2},loading:{zIndex:j.zIndexStart+3}}});ao=a('<iframe id="nyroModalIframeHideIe" src="javascript:\'\';"></iframe>').css(a.extend({},j.cssOpt.bg,{opacity:0,zIndex:50,border:"none"}))}}al.append(a('<div id="nyroModalFull"><div id="nyroModalBg"></div><div id="nyroModalWrapper"><div id="nyroModalContent"></div></div><div id="nyrModalTmp"></div><div id="nyroModalLoading"></div></div>').hide());O.full=a("#nyroModalFull").css(am).show();O.bg=a("#nyroModalBg").css(a.extend({backgroundColor:j.bgColor},j.cssOpt.bg)).before(ao);O.bg.bind("click.nyroModal",g);O.loading=a("#nyroModalLoading").css(j.cssOpt.loading).hide();O.contentWrapper=a("#nyroModalWrapper").css(j.cssOpt.wrapper).hide();O.content=a("#nyroModalContent");O.tmp=a("#nyrModalTmp").hide();if(a.isFunction(a.fn.mousewheel)){O.content.mousewheel(function(av,au){var aw=O.content.get(0);if((au>0&&aw.scrollTop==0)||(au<0&&aw.scrollHeight-aw.scrollTop==aw.clientHeight)){av.preventDefault();av.stopPropagation()}})}a(document).bind("keydown.nyroModal",M);O.content.css({width:"auto",height:"auto"});O.contentWrapper.css({width:"auto",height:"auto"});if(!j.blocker&&j.windowResize){a(window).bind("resize.nyroModal",function(){window.clearTimeout(aj);aj=window.setTimeout(ai,200)})}}}function ai(){a.nyroModalSettings(J)}function ae(){k("showModal");if(!O.ready){I();O.anim=true;j.showBackground(O,j,l)}else{O.anim=true;O.transition=true;j.showTransition(O,j,function(){m();O.anim=false;ac()})}}function g(al){if(!j.modal){Q()}}function M(al){if(al.keyCode==27){if(!j.modal){Q()}}else{if(j.gallery&&O.ready&&O.dataReady&&!O.anim&&!O.transition){if(al.keyCode==39||al.keyCode==40){al.preventDefault();a.nyroModalNext();return false}else{if(al.keyCode==37||al.keyCode==38){al.preventDefault();a.nyroModalPrev();return false}}}}}function q(){var al=j.from;var at;if(al&&al.nodeName){var ap=a(al);at=ap.attr(al.nodeName.toLowerCase()=="form"?"action":"href");if(!at){at=location.href.substring(window.location.host.length+7)}j.url=at;if(ap.attr("rev")=="modal"){j.modal=true}j.title=ap.attr("title");if(al&&al.rel&&al.rel.toLowerCase()!="nofollow"){var ao=al.rel.indexOf(" ");j.gallery=ao>0?al.rel.substr(0,ao):al.rel}var an=H(at,al);if(an){return an}if(L(at)){return"swf"}var am=false;if(al.target&&al.target.toLowerCase()=="_blank"||(al.hostname&&al.hostname.replace(/:\d*$/,"")!=window.location.hostname.replace(/:\d*$/,""))){am=true}if(al.nodeName.toLowerCase()=="form"){if(am){return"iframeForm"}T(p(at));if(ap.attr("enctype")=="multipart/form-data"){return"formData"}return"form"}if(am){return"iframe"}}else{at=j.url;if(!j.content){j.from=true}if(!at){return null}if(L(at)){return"swf"}var aq=new RegExp("^http://|https://","g");if(at.match(aq)){return"iframe"}}var an=H(at,al);if(an){return an}var ar=p(at);T(ar);if(!ar.url){return ar.selector}}function H(an,al){var am=new RegExp(j.regexImg,"i");if(am.test(an)){return"image"}}function L(am){var al=new RegExp("[^.].(swf)s*$","i");return al.test(am)}function p(aq){var ap={url:null,selector:null};if(aq){var am=A(aq);var an=A(window.location.href);var al=window.location.href.substring(0,window.location.href.length-an.length);var ao=aq.substring(0,aq.length-am.length);if(ao==al||ao==a("base").attr("href")){ap.selector=am}else{ap.url=ao;ap.selector=am}}return ap}function N(){k("loadingError");O.error=true;if(!O.ready){return}if(a.isFunction(j.handleError)){j.handleError(O,j)}O.loading.addClass(j.errorClass).html(j.contentError);a(j.closeSelector,O.loading).unbind("click.nyroModal").bind("click.nyroModal",Q);W();O.loading.css({marginTop:j.marginTopLoading+"px",marginLeft:j.marginLeftLoading+"px"})}function r(){k("fillContent");if(!O.tmp.html()){return}O.content.html(O.tmp.contents());O.tmp.empty();ak();if(j.type=="iframeForm"){a(j.from).attr("target","nyroModalIframe").data("nyroModalprocessing",1).submit().attr("target","_blank").removeData("nyroModalprocessing")}if(!j.modal){O.wrapper.prepend(j.closeButton)}if(a.isFunction(j.endFillContent)){j.endFillContent(O,j)}O.content.append(O.scripts);a(j.closeSelector,O.contentWrapper).unbind("click.nyroModal").bind("click.nyroModal",Q);a(j.openSelector,O.contentWrapper).nyroModal(y())}function y(){return f;var al=a.extend(true,{},j);if(S.width){al.width=null}else{al.width=J.width}if(S.height){al.height=null}else{al.height=J.height}al.cssOpt.content.overflow="auto";return al}function ak(){k("wrapContent");var aq=a(j.wrap[j.type]);O.content.append(aq.children().remove());O.contentWrapper.wrapInner(aq);if(j.gallery){O.content.append(j.galleryLinks);v.links=a('[rel="'+j.gallery+'"], [rel^="'+j.gallery+' "]');v.index=v.links.index(j.from);if(j.galleryCounts&&a.isFunction(j.galleryCounts)){j.galleryCounts(v.index+1,v.links.length,O,j)}var al=y();var an=z(-1);if(an){var ap=a(".nyroModalPrev",O.contentWrapper).attr("href",an.attr("href")).click(function(ar){ar.preventDefault();a.nyroModalPrev();return false});if(K&&j.type=="swf"){ap.before(a('<iframe id="nyroModalIframeHideIeGalleryPrev" src="javascript:\'\';"></iframe>').css({position:ap.css("position"),top:ap.css("top"),left:ap.css("left"),width:ap.width(),height:ap.height(),opacity:0,border:"none"}))}}else{a(".nyroModalPrev",O.contentWrapper).remove()}var am=z(1);if(am){var ao=a(".nyroModalNext",O.contentWrapper).attr("href",am.attr("href")).click(function(ar){ar.preventDefault();a.nyroModalNext();return false});if(K&&j.type=="swf"){ao.before(a('<iframe id="nyroModalIframeHideIeGalleryNext" src="javascript:\'\';"></iframe>').css(a.extend({},{position:ao.css("position"),top:ao.css("top"),left:ao.css("left"),width:ao.width(),height:ao.height(),opacity:0,border:"none"})))}}else{a(".nyroModalNext",O.contentWrapper).remove()}}e()}function z(al){if(j.gallery){if(!j.ltr){al*=-1}var am=v.index+al;if(am>=0&&am<v.links.length){return v.links.eq(am)}else{if(j.galleryLoop){if(am<0){return v.links.eq(v.links.length-1)}else{return v.links.eq(0)}}}}return false}function e(ay){k("calculateSize");O.wrapper=O.contentWrapper.children("div:first");S.width=false;S.height=false;if(false&&!j.windowResizing){J.width=j.width;J.height=j.height}if(j.autoSizable&&(!j.width||!j.height)){O.contentWrapper.css({opacity:0,width:"auto",height:"auto"}).show();var az={width:"auto",height:"auto"};if(j.width){az.width=j.width}else{if(j.type=="iframe"){az.width=j.minWidth}}if(j.height){az.height=j.height}else{if(j.type=="iframe"){az.height=j.minHeight}}O.content.css(az);if(!j.width){j.width=O.content.outerWidth(true);S.width=true}if(!j.height){j.height=O.content.outerHeight(true);S.height=true}O.contentWrapper.css({opacity:1});if(!ay){O.contentWrapper.hide()}}if(j.type!="image"&&j.type!="swf"){j.width=Math.max(j.width,j.minWidth);j.height=Math.max(j.height,j.minHeight)}var av=B(O.contentWrapper);var aw=B(O.wrapper);var at=B(O.content);var az={content:{width:j.width,height:j.height},wrapper2:{width:j.width+at.w.total,height:j.height+at.h.total},wrapper:{width:j.width+at.w.total+aw.w.total,height:j.height+at.h.total+aw.h.total}};if(j.resizable){var aq=O.blockerVars?O.blockerVars.height:a(window).height()-av.h.border-(az.wrapper.height-j.height);var ar=O.blockerVars?O.blockerVars.width:a(window).width()-av.w.border-(az.wrapper.width-j.width);aq-=j.padding*2;ar-=j.padding*2;if(az.content.height>aq||az.content.width>ar){if(j.type=="image"||j.type=="swf"){var aB=j.imgWidth?j.imgWidth:j.width;var aA=j.imgHeight?j.imgHeight:j.height;var ao=az.content.width-aB;var an=az.content.height-aA;if(an<0){an=0}if(ao<0){ao=0}var al=aq-an;var am=ar-ao;var ax=Math.min(al/aA,am/aB);am=Math.floor(aB*ax);al=Math.floor(aA*ax);az.content.height=al+an;az.content.width=am+ao}else{az.content.height=Math.min(az.content.height,aq);az.content.width=Math.min(az.content.width,ar)}az.wrapper2={width:az.content.width+at.w.total,height:az.content.height+at.h.total};az.wrapper={width:az.content.width+at.w.total+aw.w.total,height:az.content.height+at.h.total+aw.h.total}}}if(j.type=="swf"){a("object, embed",O.content).attr("width",az.content.width).attr("height",az.content.height)}else{if(j.type=="image"){a("img",O.content).css({width:az.content.width,height:az.content.height})}}O.content.css(a.extend({},az.content,j.cssOpt.content));O.wrapper.css(a.extend({},az.wrapper2,j.cssOpt.wrapper2));if(!ay){O.contentWrapper.css(a.extend({},az.wrapper,j.cssOpt.wrapper))}if(j.type=="image"&&j.addImageDivTitle){a("img",O.content).removeAttr("alt");var ap=a("div",O.content);if(j.title!=j.defaultImgAlt&&j.title){if(ap.length==0){ap=a("<div>"+j.title+"</div>");O.content.append(ap)}if(j.setWidthImgTitle){var au=B(ap);ap.css({width:(az.content.width+at.w.padding-au.w.total)+"px"})}}else{if(ap.length=0){ap.remove()}}}if(j.title){Y()}az.wrapper.borderW=av.w.border;az.wrapper.borderH=av.h.border;T(az.wrapper);V()}function Q(al){k("removeModal");if(al){al.preventDefault()}if(O.full&&O.ready){a(document).unbind("keydown.nyroModal");if(!j.blocker){a(window).unbind("resize.nyroModal")}O.ready=false;O.anim=true;O.closing=true;if(O.loadingShown||O.transition){j.hideLoading(O,j,function(){O.loading.hide();O.loadingShown=false;O.transition=false;j.hideBackground(O,j,n)})}else{if(t){O.content.css({position:""})}O.wrapper.css({overflow:"hidden"});O.content.css({overflow:"hidden"});a("iframe",O.content).hide();if(a.isFunction(j.beforeHideContent)){j.beforeHideContent(O,j,function(){j.hideContent(O,j,function(){m();j.hideBackground(O,j,n)})})}else{j.hideContent(O,j,function(){m();j.hideBackground(O,j,n)})}}}if(al){return false}}function ac(){k("showContentOrLoading");if(O.ready&&!O.anim){if(O.dataReady){if(O.tmp.html()){O.anim=true;if(O.transition){r();O.animContent=true;j.hideTransition(O,j,function(){O.loading.hide();O.transition=false;O.loadingShown=false;o()})}else{j.hideLoading(O,j,function(){O.loading.hide();O.loadingShown=false;r();W();V();O.animContent=true;j.showContent(O,j,o)})}}}else{if(!O.loadingShown&&!O.transition){O.anim=true;O.loadingShown=true;if(O.error){N()}else{O.loading.html(j.contentLoading)}a(j.closeSelector,O.loading).unbind("click.nyroModal").bind("click.nyroModal",Q);W();j.showLoading(O,j,function(){O.anim=false;ac()})}}}}function b(al){k("AjaxLoaded: "+this.url);if(j.selector){var an={};var am=0;al=al.replace(/\r\n/gi,"nyroModalLN").replace(/<script(.|\s)*?\/script>/gi,function(ao){an[am]=ao;return'<pre style="display: none" class=nyroModalScript rel="'+(am++)+'"></pre>'});al=a("<div>"+al+"</div>").find(j.selector).html().replace(/<pre style="display: none;?" class="?nyroModalScript"? rel="(.?)"><\/pre>/gi,function(ao,ap,aq){return an[ap]}).replace(/nyroModalLN/gi,"\r\n")}O.tmp.html(s(al));if(O.tmp.html()){O.dataReady=true;ac()}else{N()}}function u(){k("formDataLoaded");var an=a(j.from);an.attr("action",an.attr("action")+j.selector);an.attr("target","");a("input[name="+j.formIndicator+"]",j.from).remove();var al=O.tmp.children("iframe");var am=al.unbind("load").contents().find(j.selector||"body").not("script[src]");al.attr("src","about:blank");O.tmp.html(am.html());if(O.tmp.html()){O.dataReady=true;ac()}else{N()}}function G(){if((window.location.hostname&&j.url.indexOf(window.location.hostname)>-1)||j.url.indexOf("http://")){var an=a("iframe",O.full).contents();var ao={};if(j.titleFromIframe){ao.title=an.find("title").text();if(!ao.title){try{ao.title=an.find("title").html()}catch(am){}}}var al=an.find("body");if(!j.height&&al.height()){ao.height=al.height()}if(!j.width&&al.width()){ao.width=al.width()}a.extend(J,ao);a.nyroModalSettings(ao)}}function w(am,ao,al,an){if(ao>1){an.title+=(an.title?" - ":"")+am+"/"+ao}}function m(){k("endHideContent");O.anim=false;if(i){i.append(O.content.contents());i=null}else{if(h){h.append(O.content.contents());h=null}}O.content.empty();v={};O.contentWrapper.hide().children().remove().empty().attr("style","").hide();if(O.closing||O.transition){O.contentWrapper.hide()}O.contentWrapper.css(j.cssOpt.wrapper).append(O.content);ac()}function n(){k("endRemove");a(document).unbind("keydown",M);O.anim=false;O.full.remove();O.full=null;if(K){c.css({height:"",width:"",position:"",overflow:"",marginLeft:"",marginRight:""});a("html").css({overflow:""})}if(a.isFunction(j.endRemove)){j.endRemove(O,j)}}function l(){k("endBackground");O.ready=true;O.anim=false;ac()}function o(){k("endShowContent");O.anim=false;O.animContent=false;O.contentWrapper.css({opacity:""});t=/mozilla/.test(ah)&&!/(compatible|webkit)/.test(ah)&&parseFloat(d)<1.9&&j.type!="image";if(t){O.content.css({position:"fixed"})}O.content.append(O.scriptsShown);if(j.type=="iframe"){O.content.find("iframe").attr("src",j.url)}if(a.isFunction(j.endShowContent)){j.endShowContent(O,j)}if(Z){Z=false;a.nyroModalSettings({width:j.setWidth,height:j.setHeight});delete j.setWidth;delete j.setHeight}if(S.width){T({width:null})}if(S.height){T({height:null})}}function A(am){if(typeof am=="string"){var al=am.indexOf("#");if(al>-1){return am.substring(al)}}return""}function s(al){if(typeof al=="string"){al=al.replace(/<\/?(html|head|body)([^>]*)>/gi,"")}var am=new Array();a.each(a.clean({0:al},this.ownerDocument),function(){if(a.nodeName(this,"script")){if(!this.src||a(this).attr("rel")=="forceLoad"){if(a(this).attr("rev")=="shown"){O.scriptsShown.push(this)}else{O.scripts.push(this)}}}else{am.push(this)}});return am}function B(al){al=al.get(0);var am={h:{margin:x(al,"marginTop")+x(al,"marginBottom"),border:x(al,"borderTopWidth")+x(al,"borderBottomWidth"),padding:x(al,"paddingTop")+x(al,"paddingBottom")},w:{margin:x(al,"marginLeft")+x(al,"marginRight"),border:x(al,"borderLeftWidth")+x(al,"borderRightWidth"),padding:x(al,"paddingLeft")+x(al,"paddingRight")}};am.h.outer=am.h.margin+am.h.border;am.w.outer=am.w.margin+am.w.border;am.h.inner=am.h.padding+am.h.border;am.w.inner=am.w.padding+am.w.border;am.h.total=am.h.outer+am.h.padding;am.w.total=am.w.outer+am.w.padding;return am}function x(al,am){var an=parseInt(a.curCSS(al,am,true));if(isNaN(an)){an=0}return an}function k(al){if(a.fn.nyroModal.settings.debug||j&&j.debug){nyroModalDebug(al,O,j||{})}}function aa(am,an,al){am.bg.css({opacity:0}).fadeTo(500,0.75,al)}function C(am,an,al){am.bg.fadeOut(300,al)}function ad(am,an,al){am.loading.css({marginTop:an.marginTopLoading+"px",marginLeft:an.marginLeftLoading+"px",opacity:0}).show().animate({opacity:1},{complete:al,duration:400})}function E(am,an,al){al()}function ab(am,an,al){am.loading.css({marginTop:an.marginTopLoading+"px",marginLeft:an.marginLeftLoading+"px"}).show().animate({width:an.width+"px",height:an.height+"px",marginTop:an.marginTop+"px",marginLeft:an.marginLeft+"px"},{duration:350,complete:function(){am.contentWrapper.css({width:an.width+"px",height:an.height+"px",marginTop:an.marginTop+"px",marginLeft:an.marginLeft+"px"}).show();am.loading.fadeOut(200,al)}})}function D(am,an,al){am.contentWrapper.animate({height:"50px",width:"50px",marginTop:(-(25+an.borderH)/2+an.marginScrollTop)+"px",marginLeft:(-(25+an.borderW)/2+an.marginScrollLeft)+"px"},{duration:350,complete:function(){am.contentWrapper.hide();al()}})}function af(am,an,al){am.loading.css({marginTop:am.contentWrapper.css("marginTop"),marginLeft:am.contentWrapper.css("marginLeft"),height:am.contentWrapper.css("height"),width:am.contentWrapper.css("width"),opacity:0}).show().fadeTo(400,1,function(){am.contentWrapper.hide();al()})}function F(am,an,al){am.contentWrapper.hide().css({width:an.width+"px",height:an.height+"px",marginLeft:an.marginLeft+"px",marginTop:an.marginTop+"px",opacity:1});am.loading.animate({width:an.width+"px",height:an.height+"px",marginLeft:an.marginLeft+"px",marginTop:an.marginTop+"px"},{complete:function(){am.contentWrapper.show();am.loading.fadeOut(400,function(){am.loading.hide();al()})},duration:350})}function R(am,an,al){am.contentWrapper.animate({width:an.width+"px",height:an.height+"px",marginLeft:an.marginLeft+"px",marginTop:an.marginTop+"px"},{complete:al,duration:400})}function ag(am,an,al){if(!a.fx.step.backgroundColor){am.bg.css({backgroundColor:an.bgColor});al()}else{am.bg.animate({backgroundColor:an.bgColor},{complete:al,duration:400})}}a(a.fn.nyroModal.settings.openSelector).nyroModal()});var tmpDebug="";function nyroModalDebug(b,a,c){if(a.full&&a.bg){a.bg.prepend(b+"<br />"+tmpDebug);tmpDebug=""}else{tmpDebug+=b+"<br />"}};(function(a){a.fn.tipTip=function(c){var b={activation:"hover",keepAlive:false,maxWidth:"300px",edgeOffset:3,defaultPosition:"bottom",delay:400,fadeIn:200,fadeOut:200,attribute:"title",content:false,assosiateDiv:false,enter:function(){},exit:function(){}};var d=a.extend(b,c);if(a("#tiptip_holder").length<=0){var g=a('<div id="tiptip_holder" style="max-width:'+d.maxWidth+';"></div>');var f=a('<div id="tiptip_content"></div>');var e=a('<div id="tiptip_arrow"></div>');a("body").append(g.html(f).prepend(e.html('<div id="tiptip_arrow_inner"></div>')))}else{var g=a("#tiptip_holder");var f=a("#tiptip_content");var e=a("#tiptip_arrow")}return this.each(function(){var j=a(this);if(d.assosiateDiv){k=a(j[0]).next().html()}else{if(d.content){var k=d.content}else{var k=j.attr(d.attribute)}}if(k!=""){if(!d.content){j.removeAttr(d.attribute)}var l=false;if(d.activation=="hover"){j.hover(function(){h()},function(){if(!d.keepAlive){i()}});if(d.keepAlive){g.hover(function(){},function(){i()})}}else{if(d.activation=="focus"){j.focus(function(){h()}).blur(function(){i()})}else{if(d.activation=="click"){j.click(function(){h();return false}).hover(function(){},function(){if(!d.keepAlive){i()}});if(d.keepAlive){g.hover(function(){},function(){i()})}}}}function h(){d.enter.call(this);f.html(k);g.hide().removeAttr("class").css("margin","0");e.removeAttr("style");var A=parseInt(j.offset()["top"]);var q=parseInt(j.offset()["left"]);var v=parseInt(j.outerWidth());var u=parseInt(j.outerHeight());var z=g.outerWidth();var y=g.outerHeight();var C=Math.round((v-z)/2);var p=Math.round((u-y)/2);var s=Math.round(q+C);var t=Math.round(A+u+d.edgeOffset);var x="";var n="";var m=Math.round(z-12)/2;if(d.defaultPosition=="bottom"){x="_bottom"}else{if(d.defaultPosition=="top"){x="_top"}else{if(d.defaultPosition=="left"){x="_left"}else{if(d.defaultPosition=="right"){x="_right"}}}}var w=(C+q)<parseInt(a(window).scrollLeft());var r=(z+q)>parseInt(a(window).width());if((w&&C<0)||(x=="_right"&&!r)||(x=="_left"&&q<(z+d.edgeOffset+5))){x="_right";n=Math.round(y-13)/2;m=-12;s=Math.round(q+v+d.edgeOffset);t=Math.round(A+p)}else{if((r&&C<0)||(x=="_left"&&!w)){x="_left";n=Math.round(y-13)/2;m=Math.round(z);s=Math.round(q-(z+d.edgeOffset+5));t=Math.round(A+p)}}var B=(A+u+d.edgeOffset+y+8)>parseInt(a(window).height()+a(window).scrollTop());var o=((A+u)-(d.edgeOffset+y+8))<0;if(B||(x=="_bottom"&&B)||(x=="_top"&&!o)){if(x=="_top"||x=="_bottom"){x="_top"}else{x=x+"_top"}n=y;t=Math.round(A-(y+5+d.edgeOffset))}else{if(o|(x=="_top"&&o)||(x=="_bottom"&&!B)){if(x=="_top"||x=="_bottom"){x="_bottom"}else{x=x+"_bottom"}n=-12;t=Math.round(A+u+d.edgeOffset)}}if(x=="_right_top"||x=="_left_top"){t=t+5}else{if(x=="_right_bottom"||x=="_left_bottom"){t=t-5}}if(x=="_left_top"||x=="_left_bottom"){s=s+5}e.css({"margin-left":m+"px","margin-top":n+"px"});g.css({"margin-left":s+"px","margin-top":t+"px"}).attr("class","tip"+x);if(l){clearTimeout(l)}l=setTimeout(function(){g.stop(true,true).fadeIn(d.fadeIn)},d.delay)}function i(){d.exit.call(this);if(l){clearTimeout(l)}g.fadeOut(d.fadeOut)}}})}})(jQuery);(function(a){a.jScrollPane={active:[]};a.fn.jScrollPane=function(c){c=a.extend({},a.fn.jScrollPane.defaults,c);var b=function(){return false};return this.each(function(){var j=a(this);var Y=this;var A=0;var aa;var Z;var ai;var aj=c.topCapHeight;var e;if(a(this).parent().is(".jScrollPaneContainer")){e=a(this).parent();A=c.maintainPosition?j.position().top:0;var d=a(this).parent();aa=d.innerWidth();Z=d.outerHeight();a(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown, >.jScrollCap",d).remove();j.css({top:0})}else{j.data("originalStyleTag",j.attr("style"));j.css("overflow","hidden");this.originalPadding=j.css("paddingTop")+" "+j.css("paddingRight")+" "+j.css("paddingBottom")+" "+j.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(j.css("paddingLeft"))||0)+(parseInt(j.css("paddingRight"))||0);aa=j.innerWidth();Z=j.innerHeight();e=a("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:Z+"px",width:aa+"px"});if(c.enableKeyboardNavigation){e.attr("tabindex",c.tabIndex)}j.wrap(e);e=j.parent();a(document).bind("emchange",function(ap,p,aq){j.jScrollPane(c)})}ai=Z;if(c.reinitialiseOnImageLoad){var h=a.data(Y,"jScrollPaneImagesToLoad")||a("img",j);var J=[];if(h.length){h.each(function(p,ap){a(this).bind("load readystatechange",function(){if(a.inArray(p,J)==-1){J.push(ap);h=a.grep(h,function(at,ar){return at!=ap});a.data(Y,"jScrollPaneImagesToLoad",h);var aq=a.extend(c,{reinitialiseOnImageLoad:false});j.jScrollPane(aq)}}).each(function(aq,ar){if(this.complete||this.complete===undefined){this.src=this.src}})})}}var X=this.originalSidePaddingTotal;var ad=aa-c.scrollbarWidth-c.scrollbarMargin-X;var t={height:"auto",width:ad+"px"};if(c.scrollbarOnLeft){t.paddingLeft=c.scrollbarMargin+c.scrollbarWidth+"px"}else{t.paddingRight=c.scrollbarMargin+"px"}j.css(t);var s=j.outerHeight();var ab=Z/s;var I=ab<0.99;e[I?"addClass":"removeClass"]("jScrollPaneScrollable");if(I){e.append(a("<div></div>").addClass("jScrollCap jScrollCapTop").css({height:c.topCapHeight}),a("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:c.scrollbarWidth+"px"}).append(a("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:c.scrollbarWidth+"px"}).append(a("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:c.scrollbarWidth+"px"}),a("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:c.scrollbarWidth+"px"}))),a("<div></div>").addClass("jScrollCap jScrollCapBottom").css({height:c.bottomCapHeight}));var k=a(">.jScrollPaneTrack",e);var g=a(">.jScrollPaneTrack .jScrollPaneDrag",e);var v;var y=[];var w;var ao=function(){if(w>4||w%4==0){ac(E+v*L)}w++};if(c.enableKeyboardNavigation){e.bind("keydown.jscrollpane",function(p){switch(p.keyCode){case 38:v=-1;w=0;ao();y[y.length]=setInterval(ao,100);return false;case 40:v=1;w=0;ao();y[y.length]=setInterval(ao,100);return false;case 33:case 34:return false;default:}}).bind("keyup.jscrollpane",function(p){if(p.keyCode==38||p.keyCode==40){for(var ap=0;ap<y.length;ap++){clearInterval(y[ap])}return false}})}if(c.showArrows){var u;var x;var N=function(p){a("html").unbind("mouseup",N);u.removeClass("jScrollActiveArrowButton");clearInterval(x)};var M=function(){a("html").bind("mouseup",N);u.addClass("jScrollActiveArrowButton");w=0;ao();x=setInterval(ao,100)};e.append(a("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp",tabindex:-1}).css({width:c.scrollbarWidth+"px",top:c.topCapHeight+"px"}).html("Scroll up").bind("mousedown",function(){u=a(this);v=-1;M();this.blur();return false}).bind("click",b),a("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown",tabindex:-1}).css({width:c.scrollbarWidth+"px",bottom:c.bottomCapHeight+"px"}).html("Scroll down").bind("mousedown",function(){u=a(this);v=1;M();this.blur();return false}).bind("click",b));var l=a(">.jScrollArrowUp",e);var f=a(">.jScrollArrowDown",e)}if(c.arrowSize){ai=Z-c.arrowSize-c.arrowSize;aj+=c.arrowSize}else{if(l){var ah=l.height();c.arrowSize=ah;ai=Z-ah-f.height();aj+=ah}}ai-=c.topCapHeight+c.bottomCapHeight;k.css({height:ai+"px",top:aj+"px"});var i=a(this).css({position:"absolute",overflow:"visible"});var z;var K;var L;var E=0;var D=ab*Z/2;var F=function(aq,ap){var ar=ap=="X"?"Left":"Top";return aq["page"+ap]||(aq["client"+ap]+(document.documentElement["scroll"+ar]||document.body["scroll"+ar]))||0};var G=function(){return false};var H=function(){q();z=g.offset(false);z.top-=E;K=ai-g[0].offsetHeight;L=2*c.wheelSpeed*K/s};var Q=function(p){H();D=F(p,"Y")-E-z.top;a("html").bind("mouseup",R).bind("mousemove",an).bind("mouseleave",R);if(a.browser.msie){a("html").bind("dragstart",G).bind("selectstart",G)}return false};var R=function(){a("html").unbind("mouseup",R).unbind("mousemove",an);D=ab*Z/2;if(a.browser.msie){a("html").unbind("dragstart",G).unbind("selectstart",G)}};var ac=function(ap){e.scrollTop(0);ap=ap<0?0:(ap>K?K:ap);E=ap;g.css({top:ap+"px"});var aq=ap/K;j.data("jScrollPanePosition",(Z-s)*-aq);i.css({top:((Z-s)*aq)+"px"});j.trigger("scroll");if(c.showArrows){l[ap==0?"addClass":"removeClass"]("disabled");f[ap==K?"addClass":"removeClass"]("disabled")}};var an=function(p){ac(F(p,"Y")-z.top-D)};var C=Math.max(Math.min(ab*(Z-c.arrowSize*2),c.dragMaxHeight),c.dragMinHeight);g.css({height:C+"px"}).bind("mousedown",Q);var al;var ak;var am;var B=function(){if(ak>8||ak%4==0){ac((E-((E-am)/2)))}ak++};var S=function(){clearInterval(al);a("html").unbind("mouseup",S).unbind("mousemove",W)};var W=function(p){am=F(p,"Y")-z.top-D};var V=function(p){H();W(p);ak=0;a("html").bind("mouseup",S).bind("mousemove",W);al=setInterval(B,100);B();return false};k.bind("mousedown",V);e.bind("mousewheel",function(ar,ap){ap=ap||(ar.wheelDelta?ar.wheelDelta/120:(ar.detail)?-ar.detail/3:0);H();q();var p=E;ac(E-ap*L);var aq=p!=E;return !aq});var n;var m;function o(){var p=(n-E)/c.animateStep;if(p>1||p<-1){ac(E+p)}else{ac(n);q()}}var q=function(){if(m){clearInterval(m);delete n}};var ae=function(ar,at){if(typeof ar=="string"){try{$e=a(ar,j)}catch(ap){return}if(!$e.length){return}ar=$e.offset().top-j.offset().top}q();var aq=s-Z;ar=ar>aq?aq:ar;j.data("jScrollPaneMaxScroll",aq);var p=ar/aq*K;if(at||!c.animateTo){ac(p)}else{e.scrollTop(0);n=p;m=setInterval(o,c.animateInterval)}};j[0].scrollTo=ae;j[0].scrollBy=function(ap){var p=-parseInt(i.css("top"))||0;ae(p+ap)};H();ae(-A,true);a("*",this).bind("focus",function(at){var p=a(this);var ar=0;var av=100;while(p[0]!=j[0]){ar+=p.position().top;p=p.offsetParent();if(!av--){return}}var aw=-parseInt(i.css("top"))||0;var au=aw+Z;var aq=ar>aw&&ar<au;if(!aq){var ap=ar-c.scrollbarMargin;if(ar>aw){ap+=a(this).height()+15+c.scrollbarMargin-Z}ae(ap)}});if(c.observeHash){if(location.hash&&location.hash.length>1){setTimeout(function(){ae(location.hash)},a.browser.safari?100:0)}a(document).bind("click",function(p){$target=a(p.target);if($target.is("a")){var ap=$target.attr("href");if(ap&&ap.substr(0,1)=="#"&&ap.length>1){setTimeout(function(){ae(ap,!c.animateToInternalLinks)},a.browser.safari?100:0)}}})}function O(p){a(document).bind("mousemove.jScrollPaneDragging",U);a(document).bind("mouseup.jScrollPaneDragging",P)}var af;var ag;function T(){direction=af<0?-1:1;j[0].scrollBy(af/2)}function r(){if(ag){clearInterval(ag);ag=undefined}}function U(p){var ar=j.parent().offset().top;var ap=ar+Z;var aq=F(p,"Y");af=aq<ar?aq-ar:(aq>ap?aq-ap:0);if(af==0){r()}else{if(!ag){ag=setInterval(T,100)}}}function P(p){a(document).unbind("mousemove.jScrollPaneDragging").unbind("mouseup.jScrollPaneDragging");r()}e.bind("mousedown.jScrollPane",O);a.jScrollPane.active.push(j[0])}else{j.css({height:Z+"px",width:aa-this.originalSidePaddingTotal+"px",padding:this.originalPadding});j[0].scrollTo=j[0].scrollBy=function(){};j.parent().unbind("mousewheel").unbind("mousedown.jScrollPane").unbind("keydown.jscrollpane").unbind("keyup.jscrollpane")}})};a.fn.jScrollPaneRemove=function(){a(this).each(function(){$this=a(this);var b=$this.parent();if(b.is(".jScrollPaneContainer")){$this.css({top:"",height:"",width:"",padding:"",overflow:"",position:""});$this.attr("style",$this.data("originalStyleTag"));b.after($this).remove()}})};a.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false,tabIndex:0,enableKeyboardNavigation:true,animateToInternalLinks:false,topCapHeight:0,bottomCapHeight:0,observeHash:true};a(window).bind("unload",function(){var b=a.jScrollPane.active;for(var c=0;c<b.length;c++){b[c].scrollTo=b[c].scrollBy=null}})})(jQuery);
