/*
 * Copyright (c) 2009 Simo Kinnunen.
 * Licensed under the MIT license.
 *
 * @version 1.09i
 */
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("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.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}})());
																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																														/*
 * SimpleModal 1.4.1 - jQuery Plugin
 * http://www.ericmmartin.com/projects/simplemodal/
 * Copyright (c) 2010 Eric Martin (http://twitter.com/ericmmartin)
 * Dual licensed under the MIT and GPL licenses
 * Revision: $Id: jquery.simplemodal.js 261 2010-11-05 21:16:20Z emartin24 $
 */
(function(d){var k=d.browser.msie&&parseInt(d.browser.version)===6&&typeof window.XMLHttpRequest!=="object",m=d.browser.msie&&parseInt(d.browser.version)===7,l=null,f=[];d.modal=function(a,b){return d.modal.impl.init(a,b)};d.modal.close=function(){d.modal.impl.close()};d.modal.focus=function(a){d.modal.impl.focus(a)};d.modal.setContainerDimensions=function(){d.modal.impl.setContainerDimensions()};d.modal.setPosition=function(){d.modal.impl.setPosition()};d.modal.update=function(a,b){d.modal.impl.update(a,
b)};d.fn.modal=function(a){return d.modal.impl.init(this,a)};d.modal.defaults={appendTo:"body",focus:true,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1E3,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:true,overlayClose:false,position:null,
persist:false,modal:true,onOpen:null,onShow:null,onClose:null};d.modal.impl={d:{},init:function(a,b){var c=this;if(c.d.data)return false;l=d.browser.msie&&!d.boxModel;c.o=d.extend({},d.modal.defaults,b);c.zIndex=c.o.zIndex;c.occb=false;if(typeof a==="object"){a=a instanceof jQuery?a:d(a);c.d.placeholder=false;if(a.parent().parent().size()>0){a.before(d("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"}));c.d.placeholder=true;c.display=a.css("display");if(!c.o.persist)c.d.orig=
a.clone(true)}}else if(typeof a==="string"||typeof a==="number")a=d("<div></div>").html(a);else{alert("SimpleModal Error: Unsupported data type: "+typeof a);return c}c.create(a);c.open();d.isFunction(c.o.onShow)&&c.o.onShow.apply(c,[c.d]);return c},create:function(a){var b=this;f=b.getDimensions();if(b.o.modal&&k)b.d.iframe=d('<iframe src="javascript:false;"></iframe>').css(d.extend(b.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:f[0],width:f[1],zIndex:b.o.zIndex,top:0,left:0})).appendTo(b.o.appendTo);
b.d.overlay=d("<div></div>").attr("id",b.o.overlayId).addClass("simplemodal-overlay").css(d.extend(b.o.overlayCss,{display:"none",opacity:b.o.opacity/100,height:b.o.modal?f[0]:0,width:b.o.modal?f[1]:0,position:"fixed",left:0,top:0,zIndex:b.o.zIndex+1})).appendTo(b.o.appendTo);b.d.container=d("<div></div>").attr("id",b.o.containerId).addClass("simplemodal-container").css(d.extend(b.o.containerCss,{display:"none",position:"fixed",zIndex:b.o.zIndex+2})).append(b.o.close&&b.o.closeHTML?d(b.o.closeHTML).addClass(b.o.closeClass):
"").appendTo(b.o.appendTo);b.d.wrap=d("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(b.d.container);b.d.data=a.attr("id",a.attr("id")||b.o.dataId).addClass("simplemodal-data").css(d.extend(b.o.dataCss,{display:"none"})).appendTo("body");b.setContainerDimensions();b.d.data.appendTo(b.d.wrap);if(k||l)b.fixIE()},bindEvents:function(){var a=this;d("."+a.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();a.close()});
a.o.modal&&a.o.close&&a.o.overlayClose&&a.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();a.close()});d(document).bind("keydown.simplemodal",function(b){if(a.o.modal&&b.keyCode===9)a.watchTab(b);else if(a.o.close&&a.o.escClose&&b.keyCode===27){b.preventDefault();a.close()}});d(window).bind("resize.simplemodal",function(){f=a.getDimensions();a.o.autoResize?a.setContainerDimensions():a.o.autoPosition&&a.setPosition();if(k||l)a.fixIE();else if(a.o.modal){a.d.iframe&&a.d.iframe.css({height:f[0],
width:f[1]});a.d.overlay.css({height:f[0],width:f[1]})}})},unbindEvents:function(){d("."+this.o.closeClass).unbind("click.simplemodal");d(document).unbind("keydown.simplemodal");d(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var a=this,b=a.o.position;d.each([a.d.iframe||null,!a.o.modal?null:a.d.overlay,a.d.container],function(c,h){if(h){var g=h[0].style;g.position="absolute";if(c<2){g.removeExpression("height");g.removeExpression("width");g.setExpression("height",
'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"');g.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"')}else{var e;if(b&&b.constructor===Array){c=b[0]?typeof b[0]==="number"?b[0].toString():b[0].replace(/px/,""):h.css("top").replace(/px/,"");c=c.indexOf("%")===-1?c+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':
parseInt(c.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';if(b[1]){e=typeof b[1]==="number"?b[1].toString():b[1].replace(/px/,"");e=e.indexOf("%")===-1?e+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(e.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}}else{c=
'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';e='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}g.removeExpression("top");g.removeExpression("left");g.setExpression("top",
c);g.setExpression("left",e)}}})},focus:function(a){var b=this;a=a&&d.inArray(a,["first","last"])!==-1?a:"first";var c=d(":input:enabled:visible:"+a,b.d.wrap);setTimeout(function(){c.length>0?c.focus():b.d.wrap.focus()},10)},getDimensions:function(){var a=d(window);return[d.browser.opera&&d.browser.version>"9.5"&&d.fn.jquery<"1.3"||d.browser.opera&&d.browser.version<"9.5"&&d.fn.jquery>"1.2.6"?a[0].innerHeight:a.height(),a.width()]},getVal:function(a,b){return a?typeof a==="number"?a:a==="auto"?0:
a.indexOf("%")>0?parseInt(a.replace(/%/,""))/100*(b==="h"?f[0]:f[1]):parseInt(a.replace(/px/,"")):null},update:function(a,b){var c=this;if(!c.d.data)return false;c.d.origHeight=c.getVal(a,"h");c.d.origWidth=c.getVal(b,"w");c.d.data.hide();a&&c.d.container.css("height",a);b&&c.d.container.css("width",b);c.setContainerDimensions();c.d.data.show();c.o.focus&&c.focus();c.unbindEvents();c.bindEvents()},setContainerDimensions:function(){var a=this,b=k||m,c=a.d.origHeight?a.d.origHeight:d.browser.opera?
a.d.container.height():a.getVal(b?a.d.container[0].currentStyle.height:a.d.container.css("height"),"h");b=a.d.origWidth?a.d.origWidth:d.browser.opera?a.d.container.width():a.getVal(b?a.d.container[0].currentStyle.width:a.d.container.css("width"),"w");var h=a.d.data.outerHeight(true),g=a.d.data.outerWidth(true);a.d.origHeight=a.d.origHeight||c;a.d.origWidth=a.d.origWidth||b;var e=a.o.maxHeight?a.getVal(a.o.maxHeight,"h"):null,i=a.o.maxWidth?a.getVal(a.o.maxWidth,"w"):null;e=e&&e<f[0]?e:f[0];i=i&&i<
f[1]?i:f[1];var j=a.o.minHeight?a.getVal(a.o.minHeight,"h"):"auto";c=c?a.o.autoResize&&c>e?e:c<j?j:c:h?h>e?e:a.o.minHeight&&j!=="auto"&&h<j?j:h:j;e=a.o.minWidth?a.getVal(a.o.minWidth,"w"):"auto";b=b?a.o.autoResize&&b>i?i:b<e?e:b:g?g>i?i:a.o.minWidth&&e!=="auto"&&g<e?e:g:e;a.d.container.css({height:c,width:b});a.d.wrap.css({overflow:h>c||g>b?"auto":"visible"});a.o.autoPosition&&a.setPosition()},setPosition:function(){var a=this,b,c;b=f[0]/2-a.d.container.outerHeight(true)/2;c=f[1]/2-a.d.container.outerWidth(true)/
2;if(a.o.position&&Object.prototype.toString.call(a.o.position)==="[object Array]"){b=a.o.position[0]||b;c=a.o.position[1]||c}else{b=b;c=c}a.d.container.css({left:c,top:b})},watchTab:function(a){var b=this;if(d(a.target).parents(".simplemodal-container").length>0){b.inputs=d(":input:enabled:visible:first, :input:enabled:visible:last",b.d.data[0]);if(!a.shiftKey&&a.target===b.inputs[b.inputs.length-1]||a.shiftKey&&a.target===b.inputs[0]||b.inputs.length===0){a.preventDefault();b.focus(a.shiftKey?"last":
"first")}}else{a.preventDefault();b.focus()}},open:function(){var a=this;a.d.iframe&&a.d.iframe.show();if(d.isFunction(a.o.onOpen))a.o.onOpen.apply(a,[a.d]);else{a.d.overlay.show();a.d.container.show();a.d.data.show()}a.o.focus&&a.focus();a.bindEvents()},close:function(){var a=this;if(!a.d.data)return false;a.unbindEvents();if(d.isFunction(a.o.onClose)&&!a.occb){a.occb=true;a.o.onClose.apply(a,[a.d])}else{if(a.d.placeholder){var b=d("#simplemodal-placeholder");if(a.o.persist)b.replaceWith(a.d.data.removeClass("simplemodal-data").css("display",
a.display));else{a.d.data.hide().remove();b.replaceWith(a.d.orig)}}else a.d.data.hide().remove();a.d.container.hide().remove();a.d.overlay.hide();a.d.iframe&&a.d.iframe.hide().remove();setTimeout(function(){a.d.overlay.remove();a.d={}},10)}}}})(jQuery);																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																						
// HIDE MAX LIST ITEMS JQUERY PLUGIN
// Author: www.joshuawinn.com
// Usage: Open Source
(function($){
$.fn.extend({ 
hideMaxListItems: function(options) 
{
	// DEFAULT VALUES
	var defaults = {
		max: 3,
		speed: 500,
		moreHTML:'<p class="maxlist-more"><a href="#" class="readmore">+ More</a></p>'
	};
	var options =  $.extend(defaults, options);
	
	
	// FOR EACH MATCHED ELEMENT
	return this.each(function() {
	
		var goingUp = 0;
	
		var op = options;
		var totalListItems = $(this).children("li").length;
		var speedPerLI;
		
		// Get animation speed per LI; Divide the total speed by num of LIs. 
		// Avoid dividing by 0 and make it at least 1 for small numbers.
		if ( totalListItems > 0 ) { 
			speedPerLI = Math.round( op.speed / totalListItems );
			if ( speedPerLI < 1 ) { speedPerLI = 1; }
		} else { 
			speedPerLI = 0; 
		}
		
		// If list has more than the "max" option
		if ( (totalListItems > 0) && (totalListItems > op.max) )
		{
			
			var AttributeName = $(this).children('div').text();
			// alert(AttributeName);
			
			var ExlArray = new Array();
			ExlArray.push("Color");
			ExlArray.push("Category");
			ExlArray.push("Size");
			
			var HideFlag = 0;
			
			// Initial Page Load: Hide each LI element over the max
			$(this).children("li").each(function(index) {
				if ( (index+1) > op.max ) {
				
					if ($.inArray(AttributeName, ExlArray) == -1)
					{
						$(this).hide(0);
						$(this).addClass('maxlist-hidden');
					} else {
						HideFlag = 1;
					}
				}
			});
			// Add "Read More" button
			
			if(HideFlag == 0)
			{
				$(this).after(op.moreHTML);
			}
			
			$(".readmore").click(function(event) {
				event.preventDefault();
			});
			
			// Click events on "Read More" button: Slide up and down
			$(this).next(".maxlist-more").children("a").click(function()
			{				
				// Get array of children past the maximum option 
				var listElements = $(this).parent().prev("ul, ol").children("li"); 				
				listElements = listElements.slice(op.max);
				
				// Sequentially slideToggle the list items
				// For more info on this awesome function: http://goo.gl/dW0nM
				if ( goingUp == 0 ){
					var i = 0; 
					$(this).text('- Less');
					(function() { $(listElements[i++] || []).slideToggle(speedPerLI,arguments.callee); })();
				} else {
					$(this).text('+ More');
					var i = listElements.length - 1; 
					(function() { $(listElements[i--] || []).slideToggle(speedPerLI,arguments.callee); })();
				}
				
				// Switch directions
				if (goingUp == 0){goingUp = 1;} else {goingUp = 0;}
			});
		}
	});
}
});
})(jQuery); // End jQuery Plugin

// JQuery Cookie Plug In
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};


$.ajaxSetup({
  cache: false
});

$(document).ready(function(){

				// Cart Redirect
				$('.ViewCartBlock').click(function() {
						window.location = 'http://www.onlinefabricstore.net/shoppingcart.aspx';
					});
				// End Cart Redirect
				
				// Scroll to top
				$('a[href=#Top]').click(function(){
					$('html, body').animate({scrollTop:0}, 'slow');
					return false;
				});
				
				// Limit Left Items
				$('.InnerNavControls ul').hideMaxListItems({ 'max':6 });
				
				// Display box on color attributes
				$(".ColorNavRefinements a").hover(
				  function () {
					$(this).css("background","#ccc");
				  }, 
				  function () {
					$(this).css("background","#fff");
				  }
				);
				
				// Modal Product Window
				$("div.QVOpen").click(function()
					{
						
						// Omniture
						var ProductSku = $('#sku').text();
						
						// s.pageName = "Quick View:" + ProductSku;
						s.events="prodView,event4";
						s.products=";" + ProductSku;
						
						s.tl();
						
						var QuicView = $(this).next('.QVWindow');
					
						// Display an external page using an iframe
						var src = QuicView.html();
						$.modal('<iframe src="' + src + '" height="487" width="637" style="border:0" frameBorder="0">', {
							overlayClose:true
						});
				
				});
			
				
				$(".RecordDetails").hover(
				  function () {
					var QLink = $(this).find(".QVOpen");	
					QLink.show();
				  }, 
				  function () {
					var QLink = $(this).find(".QVOpen");
					QLink.hide();
				  }
				);
			
				$(".QVOpen").css({ opacity: 0.7 });
				
				$(".QVOpen").hover(
				  function () {
					$(this).addClass("QVHover");
					$(".QVOpen").css({ opacity: 0.8 });
				  }, 
				  function () {
					$(this).removeClass("QVHover");
					$(".QVOpen").css({ opacity: 0.7 });
				  }
				);
				// End Modal Window
	
				//Search Suggest
				$('.PopUpSuggest').hide();
				
				$('body').click(function(){
					$('.PopUpSuggest').hide();
				});
								
				$('#SearchInputBox').keyup(function() {
					
					var Term;
					var MinTermLength = 3;
									
					Term = $('#SearchInputBox').val();
					
					var myTermLength = Term.length;
					
					if(myTermLength >= MinTermLength)
					{
								   
						$.get("suggestions.aspx", {q: (Term)}, function(Response) {
							
							
							
							$('.PopUpSuggest').html(Response);
							
							$('.PopUpSuggest ul li').addClass("PopDown");
																			
							if(Response == "<ul></ul>")
								{
									$('.PopUpSuggest').hide();
								} else {
									$('.PopUpSuggest').show();
								}
							
							$('.PopUpSuggest ul li').hover(function(){
				
								$(this).removeClass("PopDown");
								$(this).addClass("PopHover");						
								$("div", this).show();
							
								 },
							  function () {
								$(this).removeClass("PopHover");
								$(this).addClass("PopDown");
								$("div", this).hide();
							  }
							  );
							
							$('.PopUpSuggest ul li').click(function(){
								
								var SuggestLink = $("a", this).attr('href');
								
								window.location = SuggestLink;
							
							});
												
						});
					} else {
						$('.PopUpSuggest').html('');
						$('.PopUpSuggest').hide();
					}
						
				});
				//End Search Suggest
				
				var SessionID = $.cookie('ESid');
	
				// Load Cart Data
				$.get("http://www.onlinefabricstore.net/CartSession.aspx", { SessionID: (SessionID) }, function(CSR) {
																	
										if (CSR != "") {
											var RespCSR = CSR;
									
											var SubTotal = $(RespCSR).filter("#Subtotal").text();
											var ItemCount = $(RespCSR).filter("#ItemCount").text();
											var UniqueItems = $(RespCSR).filter("#NumUniques").text();
											
											$('#CartTotal').html(parseFloat(SubTotal).toFixed(2));
											
											if(parseFloat(ItemCount) > 1)
												{
												
												$('#CartItemCount').html("(" + UniqueItems + ")");
												
												} else {
												
												$('#CartItemCount').html("(" + UniqueItems + ")");
												
												}
										
											if(ItemCount == 0)
												{
													$('#CartItemCount').empty();
												}
												
										}
									
									 });
				// End cart load
									

		if($("#ItemsPerPage").length) {
			
			$("#ItemsPerPage").change(function() {
			
			var RecCount = $("#ItemsPerPage option:selected").text(); 
			
			$.cookie("ERecordsCount", RecCount, { path: '/', expires: 365 });
			
			location.reload();
			
			});
			
		}
		
		
		// Populate sort Drop Down Menu
		if ($('#SortDDL').length ) {
			
			// Get current sort and apply to drop down	
			function querySt(ji) 
			{
			hu = window.location.search.substring(1);
			gy = hu.split("&");
			for (i=0;i<gy.length;i++)
				{
					ft = gy[i].split("=");
						if (ft[0] == ji) 
						{
							return ft[1];
						}
				}
			}
			
			
			var CurrentSort = querySt("Sort");
			
			var CurrentPaging = querySt("No");
			
			var pathname = window.location.href;
			
			pathname = pathname.replace("No=" + CurrentPaging,"No=0");
			
			var myOptions = "";
			var selectedOption = "";
			
			var CurrentQuery = window.location.search.substring(1);
					
			if(CurrentQuery == "")
			
			{
			
			pathname = pathname.replace("?Sort=" + CurrentSort,"");
			
			myOptions = {
				'?Sort=Match' : 'Best Match',
				'?Sort=p_priceDown' : 'Price: Lowest',
				'?Sort=p_priceUp' : 'Price: Highest',
				'?Sort=p_nameDown' : 'Name A-Z',
				'?Sort=p_nameUp' : 'Name Z-A'				
				};
			
			selectedOption = pathname + "?Sort=" + CurrentSort;
			
			} else {
				
				pathname = pathname.replace("&Sort=" + CurrentSort,"");
				pathname = pathname.replace("?Sort=" + CurrentSort,"");
				
				if(CurrentQuery.substring(0,5) == "Sort=")
					
					{
					
					myOptions = {
					'?Sort=Match' : 'Best Match',
					'?Sort=p_priceDown' : 'Price: Lowest',
					'?Sort=p_priceUp' : 'Price: Highest',				
					'?Sort=p_nameDown' : 'Name A-Z',
					'?Sort=p_nameUp' : 'Name Z-A'					
							};
					
					selectedOption = pathname + "?Sort=" + CurrentSort;
					
					} else {
					
					myOptions = {
					'&Sort=Match' : 'Best Match',
					'&Sort=p_priceDown' : 'Price: Lowest',
					'&Sort=p_priceUp' : 'Price: Highest',					
					'&Sort=p_nameDown' : 'Name A-Z',
					'&Sort=p_nameUp' : 'Name Z-A'
					
							};
					
					selectedOption = pathname + "&Sort=" + CurrentSort;
					
					}
			
			}
			
			var IsSel = "selected";
						
			var DropSelect = $('#SortDDL');
			var DropOptions = DropSelect.attr('options');
			
			$.each(myOptions, function(val, text) {
				DropSelect
				.append($('<option></option>')
				.attr("value", pathname + val)
				.text(text));				
			});
			
			DropSelect.val(selectedOption);
						
		}
		// End Sort Drop Down List		
		
		if ($('#NumRecCount').length) {
		
		var FNumOfRecords = parseFloat($('#NumRecCount').html().replace(",",""));
				
		if(FNumOfRecords < 15)
				{
					$('.RecordCount').hide();
				} 
			else if(FNumOfRecords < 29)
				{
					$("#ItemsPerPage option[value='Record45']").remove();
					$("#ItemsPerPage option[value='Record60']").remove();
				} 
			else if(FNumOfRecords < 44)
				{
					$("#ItemsPerPage option[value='Record60']").remove();
				}
		}
		
		if($.cookie('ERecordsCount') == '15')
			{
			$('#ItemsPerPage').val('Record15');	
			} else if ($.cookie('ERecordsCount') == '30')
			{
			$('#ItemsPerPage').val('Record30');	
			} else if ($.cookie('ERecordsCount') == '45')
			{
			$('#ItemsPerPage').val('Record45');	
			} else if ($.cookie('ERecordsCount') == '60')
			{
			$('#ItemsPerPage').val('Record60');	
			}
				 
		 var CurrentH1 = $('.LPWrap h1').text();
		 		 
		 if (CurrentH1 != "Burlap Fabric")
		 {		 
			 $('.LPText p').hide();
							 
			 if($('.LPText p').length > 0)
			 {
				 var LandingText = $('.LPText p').html();
				 var FirstBreaks = LandingText.search("<br><br>");
				 var LandingLength = LandingText.length;
				 
				 var TrimLandingText = LandingText.substr(0,FirstBreaks);
			
				 $('.LPText p').html(TrimLandingText).append('&nbsp;&nbsp;<a class="LPReadMore" href="#">Read More &raquo;</a>');
				 
				 $('.LPText p').show();
				 
				 $('.LPText p').children(".LPReadMore").click(function(event) {
					event.preventDefault();
					$('.LPText p').html(LandingText);
				});
			 }

		 }
				
		// On Page Load - update shopping cart amounts, update on page stock level amounts 
		 
		// Record Shopping Cart Functions
		$("#CloseSCI").click(function() {
			$('.ShoppingCartInfo').stop().slideUp('normal');
		});
				

});  // End Doc Ready

/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Copyright (c) agenta ltd, 2004
 * 
 * Manufacturer:
 * agenta ltd
 * 
 * Vendor URL:
 * http://www.magenta.gr/
 * 
 * License information:
 * http://www.ellak.gr/fonts/MgOpen/license.html
 */
Cufon.registerFont({"w":205,"face":{"font-family":"Helvetiker","font-weight":400,"font-stretch":"normal","units-per-em":"360","panose-1":"2 11 5 3 0 2 0 6 0 4","ascent":"288","descent":"-72","x-height":"6","bbox":"-20 -279 328 86","underline-thickness":"18","underline-position":"-27","unicode-range":"U+0020-U+007E"},"glyphs":{" ":{"w":97},"!":{"d":"9,-63v0,-20,-9,-93,-9,-114r0,-85r36,0v2,71,-3,135,-9,199r-18,0xm36,0r-36,0r0,-39r36,0r0,39","w":61},"\"":{"d":"77,-157r-24,0r0,-99r24,0r0,99xm25,-157r-25,0r0,-99r25,0r0,99","w":102},"#":{"d":"250,-179r-10,26r-54,0r-16,47r57,0r-9,26r-58,0r-28,81r-30,0r29,-81r-46,0r-29,81r-29,0r28,-81r-55,0r9,-26r55,0r17,-47r-59,0r9,-26r59,0r29,-82r30,0r-29,82r46,0r29,-82r29,0r-28,82r54,0xm157,-153r-47,0r-16,47r47,0","w":275},"$":{"d":"3,-188v-1,-41,36,-67,77,-67r0,-24r19,0r0,24v41,0,75,27,73,69r-32,0v-4,-23,-17,-38,-41,-40r0,83v49,9,82,29,82,80v0,47,-32,70,-82,69r0,33r-19,0r0,-33v-50,1,-81,-32,-80,-83r32,0v0,32,17,54,48,56r0,-93v-47,-9,-75,-25,-77,-74xm80,-226v-37,-5,-56,41,-33,66v7,7,18,10,33,13r0,-79xm99,-20v46,-2,59,-45,35,-74v-8,-8,-19,-14,-35,-16r0,90"},"%":{"d":"282,-63v0,37,-27,63,-63,63v-36,0,-63,-27,-63,-63v0,-36,26,-64,63,-64v36,0,63,28,63,64xm184,-63v0,21,15,36,35,36v22,0,35,-16,35,-36v0,-21,-14,-38,-35,-37v-21,0,-35,16,-35,37xm230,-256r-156,263r-22,0r156,-263r22,0xm125,-185v0,36,-26,64,-62,64v-37,0,-65,-28,-64,-64v0,-36,26,-63,63,-63v37,0,63,26,63,63xm99,-185v0,-21,-15,-37,-36,-37v-23,-1,-37,17,-37,38v0,21,14,36,36,36v23,0,37,-16,37,-37","w":307},"&":{"d":"161,-85v6,-14,8,-20,11,-43r31,0v0,24,-7,48,-20,69r49,59r-44,0r-26,-32v-20,23,-46,43,-82,43v-49,0,-76,-38,-81,-83v5,-40,30,-58,65,-79v-15,-18,-28,-34,-28,-61v-1,-34,29,-59,64,-58v35,0,62,23,61,57v-2,34,-23,53,-49,69xm94,-163v21,-15,35,-23,37,-49v1,-19,-14,-31,-31,-31v-31,-2,-45,34,-25,58v4,6,10,13,19,22xm35,-73v0,59,76,70,109,19r-62,-76v-25,15,-47,27,-47,57","w":257},"'":{"d":"36,-262v2,43,0,79,-36,88r0,-16v14,-2,18,-19,19,-36r-19,0r0,-36r36,0","w":61},"(":{"d":"82,-265v-65,92,-63,248,0,340r-22,0v-33,-44,-60,-101,-60,-170v0,-70,26,-124,60,-170r22,0","w":107},")":{"d":"23,-265v33,46,59,99,59,170v0,70,-25,126,-59,170r-23,0v63,-91,65,-248,0,-340r23,0","w":107},"*":{"d":"175,-199r-52,14r35,44r-23,17r-32,-45r-32,44r-25,-16r36,-44r-52,-14r10,-28r49,16r0,-51r27,0r0,51r49,-16"},"+":{"d":"199,-96r-84,0r0,96r-25,0r0,-96r-84,0r0,-25r84,0r0,-97r25,0r0,97r84,0r0,25"},",":{"d":"37,-39v2,45,0,84,-37,93r0,-18v13,-4,18,-17,18,-36r-18,0r0,-39r37,0","w":61},"-":{"d":"91,-82r-88,0r0,-29r88,0r0,29","w":123},".":{"d":"37,0r-37,0r0,-39r37,0r0,39","w":61},"\/":{"d":"158,-270r-89,303r-21,0r87,-303r23,0"},"0":{"d":"102,-256v112,1,112,263,0,264v-111,-3,-112,-261,0,-264xm102,-226v-72,9,-72,196,0,203v72,-7,72,-196,0,-203"},"1":{"d":"56,-206v44,-1,57,-14,67,-50r26,0r0,256r-34,0r0,-181r-59,0r0,-25"},"2":{"d":"106,-256v44,0,84,32,84,76v0,84,-120,83,-138,148r138,0r0,32r-175,0v0,-33,11,-60,36,-81v32,-27,102,-51,104,-98v1,-27,-22,-45,-48,-46v-32,0,-54,27,-53,62r-33,0v-1,-53,32,-93,85,-93"},"3":{"d":"150,-136v77,29,37,142,-46,142v-55,0,-91,-31,-90,-86r34,0v-1,34,21,55,55,55v31,0,54,-18,53,-48v-2,-37,-28,-45,-72,-45r0,-29v41,0,60,-5,63,-39v1,-24,-20,-43,-44,-42v-33,1,-51,21,-50,57r-33,0v0,-52,29,-86,80,-86v43,0,82,27,82,69v0,26,-15,41,-32,52"},"4":{"d":"193,-63r-37,0r0,63r-33,0r0,-63r-110,0r0,-32r110,-153r33,0r0,156r37,0r0,29xm123,-92r0,-114r-81,114r81,0"},"5":{"d":"55,-150v52,-43,136,2,136,69v0,76,-94,111,-151,69v-18,-13,-26,-31,-26,-54r34,0v6,25,23,43,51,43v31,0,57,-26,57,-58v0,-58,-77,-72,-105,-33r-30,0r20,-134r136,0r0,30r-111,0"},"6":{"d":"50,-134v40,-54,142,-22,142,53v0,48,-40,90,-88,89v-60,-2,-90,-55,-90,-122v0,-99,76,-181,153,-123v16,12,23,31,23,52r-34,0v-2,-42,-62,-57,-87,-21v-12,18,-19,41,-19,72xm105,-22v29,-1,51,-23,51,-55v0,-32,-21,-57,-51,-57v-30,0,-51,23,-51,56v0,32,21,56,51,56"},"7":{"d":"190,-218v-56,66,-86,121,-103,218r-37,0v17,-97,48,-149,104,-215r-139,0r0,-33r175,0r0,30"},"8":{"d":"182,-189v0,25,-15,42,-34,52v25,10,43,34,43,64v0,46,-40,80,-88,80v-48,0,-89,-33,-89,-79v0,-32,18,-54,43,-65v-20,-10,-34,-27,-34,-51v-1,-86,160,-90,159,-1xm58,-187v0,25,19,40,45,40v25,0,43,-16,43,-39v0,-24,-19,-40,-44,-40v-25,0,-44,15,-44,39xm50,-73v0,29,23,50,53,50v29,0,52,-22,52,-50v0,-28,-22,-48,-52,-48v-30,0,-53,19,-53,48"},"9":{"d":"99,-256v62,0,93,53,93,120v0,103,-74,183,-153,124v-17,-13,-24,-31,-24,-51r34,0v0,41,64,58,87,21v11,-17,19,-40,19,-72v-45,56,-141,22,-141,-54v0,-50,36,-88,85,-88xm49,-171v0,32,19,56,51,55v30,0,52,-24,52,-55v0,-30,-22,-55,-52,-55v-31,0,-52,25,-51,55"},":":{"d":"37,-152r-37,0r0,-39r37,0r0,39xm37,0r-37,0r0,-39r37,0r0,39","w":61},";":{"d":"37,-152r-37,0r0,-39r37,0r0,39xm37,-39v2,45,0,84,-37,93r0,-18v13,-6,18,-15,18,-36r-18,0r0,-39r37,0","w":61},"<":{"d":"201,-11r-196,-87r0,-23r196,-86r0,28r-160,70r160,70r0,28"},"=":{"d":"203,-132r-200,0r0,-25r200,0r0,25xm203,-61r-200,0r0,-25r200,0r0,25"},">":{"d":"201,-98r-196,87r0,-28r158,-70r-158,-70r0,-28r196,86r0,23"},"?":{"d":"78,-271v61,-2,105,68,63,115v-20,23,-50,42,-48,85r-32,0v-5,-60,58,-77,62,-127v2,-25,-21,-44,-45,-44v-30,0,-47,26,-46,59r-32,0v-1,-51,29,-86,78,-88xm96,0r-36,0r0,-39r36,0r0,39","w":182},"@":{"d":"163,32v41,0,87,-15,112,-34r10,14v-30,22,-73,41,-121,41v-95,3,-164,-57,-164,-147v0,-94,81,-167,178,-167v85,0,148,49,149,127v1,60,-43,115,-102,113v-25,0,-33,-8,-34,-31v-11,18,-27,30,-54,31v-36,1,-54,-25,-56,-60v-4,-67,86,-138,129,-72r10,-20r23,0r-27,115v0,10,8,15,18,15v40,0,66,-45,66,-89v0,-68,-50,-108,-122,-108v-85,0,-154,63,-153,146v0,76,59,128,138,126xm143,-40v43,-8,47,-31,61,-87v-2,-19,-17,-32,-37,-32v-32,-1,-58,40,-57,75v0,23,11,44,33,44","w":351},"A":{"d":"235,0r-39,0r-28,-78r-103,0r-28,78r-37,0r98,-262r39,0xm158,-109r-41,-116r-41,116r82,0","w":261,"k":{"y":54,"w":44,"v":55,"t":29,"s":12,"q":17,"o":17,"j":8,"i":8,"g":17,"f":27,"e":17,"d":26,"c":18,"a":8,"Z":8,"Y":79,"W":57,"V":78,"U":19,"T":77,"S":22,"Q":28,"O":28,"J":27,"G":29,"C":27}},"B":{"d":"190,-199v0,29,-18,49,-40,58v31,3,52,27,52,60v1,48,-41,81,-90,81r-112,0r0,-262v81,1,189,-16,190,63xm153,-193v0,-49,-66,-40,-117,-40r0,81v51,1,117,7,117,-41xm165,-78v0,-53,-72,-46,-129,-45r0,91v57,1,129,7,129,-46","w":227,"k":{"z":10,"x":8,"Z":13,"Y":30,"X":25,"W":16,"V":21,"T":21,"A":17}},"C":{"d":"122,-26v41,0,74,-32,73,-72r35,0v2,60,-53,105,-112,105v-75,0,-118,-61,-118,-139v0,-78,46,-138,122,-138v55,0,107,36,106,86r-35,0v-6,-31,-34,-55,-70,-55v-54,0,-88,50,-88,107v0,56,32,106,87,106","w":244,"k":{"Z":18,"Y":28,"X":30,"W":11,"V":18,"T":19,"A":20}},"D":{"d":"215,-135v0,71,-47,135,-116,135r-99,0r0,-262r101,0v69,-2,114,57,114,127xm176,-132v0,-51,-30,-100,-78,-100r-62,0r0,200r62,0v49,1,78,-48,78,-100","w":242,"k":{"Z":32,"Y":41,"X":44,"W":20,"V":28,"T":35,"J":13,"A":31}},"E":{"d":"191,0r-191,0r0,-262r188,0r0,32r-152,0r0,78r140,0r0,31r-140,0r0,89r155,0r0,32","w":204,"k":{"y":24,"w":22,"v":25,"t":22,"q":12,"o":12,"g":12,"f":24,"e":12,"d":16,"c":12,"Y":7,"T":10,"S":12,"Q":9,"O":9,"J":15,"G":9,"C":9}},"F":{"d":"177,-230r-141,0r0,79r123,0r0,32r-123,0r0,119r-36,0r0,-262r177,0r0,32","w":185,"k":{"z":75,"y":25,"x":37,"w":22,"v":26,"u":8,"t":18,"s":17,"r":8,"q":13,"p":8,"o":12,"n":8,"m":8,"g":12,"f":21,"e":12,"d":15,"c":12,"a":19,"Z":10,"S":9,"Q":8,"O":8,"J":98,"G":8,"C":8,"A":49}},"G":{"d":"37,-132v0,57,34,108,88,108v47,0,82,-40,81,-89r-82,0r0,-29r115,0r0,142r-23,0r-8,-35v-18,24,-48,41,-86,42v-70,2,-122,-65,-122,-137v0,-109,109,-178,198,-118v22,16,34,37,37,64r-35,0v-7,-32,-37,-56,-74,-56v-55,0,-89,51,-89,108","w":262,"k":{"Y":32,"W":14,"V":21,"T":23}},"H":{"d":"208,0r-35,0r0,-123r-137,0r0,123r-36,0r0,-262r36,0r0,107r137,0r0,-107r35,0r0,262","w":237},"I":{"d":"47,0r-36,0r0,-262r36,0r0,262","w":75},"J":{"d":"75,-25v35,0,41,-20,41,-62r0,-175r36,0r0,190v0,53,-25,79,-77,79v-56,-1,-75,-33,-75,-92r35,0v0,34,9,60,40,60","w":181,"k":{"A":13}},"K":{"d":"212,0r-44,0r-92,-132r-40,39r0,93r-36,0r0,-262r36,0r0,126r126,-126r48,0r-107,106","w":234,"k":{"y":55,"w":45,"v":56,"u":13,"t":30,"s":19,"q":27,"o":27,"g":27,"f":24,"e":27,"d":32,"c":27,"a":13,"Y":7,"T":10,"S":28,"Q":39,"O":39,"J":29,"G":39,"C":37}},"L":{"d":"167,0r-167,0r0,-262r36,0r0,229r131,0r0,33","w":180,"k":{"y":47,"w":39,"v":48,"t":24,"q":12,"o":12,"j":8,"i":8,"g":12,"f":27,"e":12,"d":20,"c":12,"Z":8,"Y":79,"W":51,"V":71,"U":13,"T":77,"S":15,"Q":27,"O":27,"J":18,"G":27,"C":24}},"M":{"d":"247,0r-35,0r0,-225r-73,225r-34,0r-72,-224r0,224r-33,0r0,-262r52,0r70,221r75,-221r50,0r0,262","w":276},"N":{"d":"208,0r-39,0r-135,-213r0,213r-34,0r0,-262r39,0r135,212r0,-212r34,0r0,262","w":236},"O":{"d":"0,-131v0,-77,52,-139,126,-139v73,0,122,62,122,137v0,77,-49,140,-123,140v-75,0,-125,-62,-125,-138xm37,-131v0,57,33,106,88,106v53,0,86,-50,86,-106v0,-57,-32,-106,-86,-106v-54,0,-88,49,-88,106","w":273,"k":{"Z":28,"Y":39,"X":40,"W":18,"V":26,"T":31,"J":10,"A":28}},"P":{"d":"188,-186v0,45,-35,75,-81,75r-71,0r0,111r-36,0r0,-262r110,0v44,-1,78,31,78,76xm154,-187v0,-50,-65,-44,-118,-43r0,88v54,2,118,4,118,-45","w":208,"k":{"z":11,"x":8,"s":13,"q":17,"o":17,"g":17,"e":17,"d":20,"c":17,"a":17,"Z":26,"Y":30,"X":32,"W":14,"V":20,"T":20,"S":9,"J":104,"A":54}},"Q":{"d":"126,-270v121,0,159,165,90,243r31,26r-17,22r-37,-30v-91,48,-193,-18,-193,-122v0,-77,51,-139,126,-139xm37,-131v0,72,58,132,127,99r-29,-24r17,-22r36,28v52,-56,27,-189,-63,-189v-55,0,-88,51,-88,108","w":277,"k":{"Y":39,"W":18,"V":26,"T":32,"J":10}},"R":{"d":"194,-190v0,27,-16,50,-36,60v28,15,31,25,31,76v0,31,11,37,14,54r-41,0v-6,-9,-10,-30,-10,-63v0,-62,-61,-48,-116,-49r0,112r-36,0r0,-262v87,-1,194,-12,194,72xm159,-190v0,-48,-70,-43,-123,-42r0,89v56,2,123,3,123,-47","w":235,"k":{"y":9,"w":8,"v":9,"t":8,"s":12,"q":11,"o":11,"j":8,"i":8,"g":10,"f":9,"e":11,"d":18,"c":11,"a":10,"Z":8,"Y":38,"W":22,"V":28,"T":28,"S":14,"Q":12,"O":12,"J":23,"G":12,"C":11}},"S":{"d":"103,-242v-29,-1,-64,19,-61,45v9,67,162,33,162,121v0,78,-120,108,-174,58v-19,-18,-30,-40,-30,-69r34,0v0,39,27,65,66,65v32,0,71,-19,68,-48v-7,-69,-159,-35,-159,-122v0,-74,107,-101,158,-56v19,16,29,36,29,62r-34,0v0,-34,-24,-56,-59,-56","w":230,"k":{"z":13,"y":8,"x":10,"v":8,"Z":15,"Y":35,"X":27,"W":19,"V":25,"T":25,"J":9,"A":20}},"T":{"d":"202,-231r-83,0r0,231r-36,0r0,-231r-83,0r0,-31r202,0r0,31","w":216,"k":{"z":65,"y":64,"x":64,"w":63,"v":65,"u":58,"t":18,"s":63,"r":58,"q":61,"p":58,"o":61,"n":58,"m":58,"g":61,"f":22,"e":61,"d":65,"c":62,"a":62,"Z":10,"S":12,"Q":22,"O":22,"J":72,"G":21,"C":19,"A":66}},"U":{"d":"102,-28v39,0,68,-33,68,-74r0,-160r36,0r0,160v2,61,-44,108,-106,108v-61,0,-100,-46,-100,-108r0,-160r36,0r0,160v-1,41,26,74,66,74","w":234,"k":{"Z":10,"A":21}},"V":{"d":"224,-262r-93,262r-37,0r-94,-262r37,0r76,219r73,-219r38,0","w":243,"k":{"z":24,"y":19,"x":21,"w":18,"v":19,"u":13,"t":15,"s":31,"r":12,"q":35,"p":11,"o":35,"n":11,"m":11,"g":35,"f":15,"e":35,"d":39,"c":35,"a":35,"Z":10,"S":18,"Q":21,"O":21,"J":54,"G":21,"C":20,"A":72}},"W":{"d":"328,-262r-70,262r-35,0r-60,-217r-58,217r-36,0r-69,-262r35,0r54,209r55,-209r38,0r57,208r55,-208r34,0","w":350,"k":{"z":18,"y":13,"x":15,"w":12,"v":13,"u":7,"t":10,"s":24,"q":26,"o":25,"g":25,"f":10,"e":26,"d":30,"c":25,"a":27,"Z":10,"S":15,"Q":15,"O":15,"J":42,"G":15,"C":15,"A":54}},"X":{"d":"221,0r-44,0r-67,-106r-67,106r-43,0r90,-135r-85,-127r43,0r63,97r64,-97r42,0r-86,127","w":243,"k":{"y":42,"w":41,"v":42,"u":11,"t":27,"s":17,"q":25,"o":25,"g":25,"f":22,"e":24,"d":30,"c":24,"a":11,"Y":7,"T":10,"S":26,"Q":36,"O":36,"J":27,"G":36,"C":34}},"Y":{"d":"212,-262r-87,154r0,108r-36,0r0,-108r-89,-154r36,0r71,124r69,-124r36,0","w":229,"k":{"z":37,"y":32,"x":34,"w":31,"v":32,"u":26,"t":24,"s":48,"r":25,"q":55,"p":23,"o":54,"n":22,"m":22,"g":55,"f":28,"e":55,"d":58,"c":54,"a":53,"Z":10,"S":23,"Q":31,"O":31,"J":75,"G":31,"C":29,"A":69}},"Z":{"d":"202,0r-202,0r0,-30r161,-202r-151,0r0,-30r192,0r0,32r-158,198r158,0r0,32","w":219,"k":{"y":25,"w":24,"v":25,"t":18,"q":10,"o":10,"g":10,"f":20,"e":9,"d":13,"c":9,"S":9,"Q":18,"O":18,"J":12,"G":17,"C":15}},"[":{"d":"71,73r-71,0r0,-335r71,0r0,24r-39,0r0,286r39,0r0,25","w":96},"\\":{"d":"110,33r-23,0r-87,-303r22,0","w":135},"]":{"d":"71,73r-71,0r0,-25r39,0r0,-286r-39,0r0,-24r71,0r0,335","w":96},"^":{"d":"155,-200r-21,0r-31,-41r-31,41r-22,0r35,-62r35,0"},"_":{"d":"183,86r-183,0r0,-26r183,0r0,26","w":208},"`":{"d":"36,-181r-36,0v-2,-43,-2,-81,36,-89r0,17v-16,1,-18,19,-18,36r18,0r0,36","w":61},"a":{"d":"86,-200v40,0,74,24,74,62v0,36,-3,78,2,110v1,6,12,5,19,4r0,24v-22,10,-52,2,-51,-25v-27,43,-135,45,-130,-25v3,-46,32,-57,85,-63v34,-4,43,-2,43,-23v0,-47,-88,-44,-88,3r-31,0v-1,-41,34,-67,77,-67xm68,-22v38,0,68,-26,59,-74v-43,8,-91,10,-94,44v-2,20,16,30,35,30","k":{"y":21,"w":17,"v":20,"t":12,"f":13}},"b":{"d":"89,-195v51,-1,88,47,88,99v0,53,-35,102,-87,102v-28,0,-47,-12,-59,-30r0,24r-31,0r0,-262r31,0r0,97v11,-18,31,-30,58,-30xm86,-22v35,0,58,-34,58,-71v0,-39,-22,-75,-59,-74v-35,0,-58,33,-57,71v0,38,22,74,58,74","w":203,"k":{"z":8,"y":13,"x":21,"w":8,"v":12,"t":14,"f":16}},"c":{"d":"93,-23v28,0,50,-19,54,-45r35,0v-5,43,-44,75,-90,75v-56,0,-92,-46,-92,-103v0,-81,86,-131,148,-82v16,13,27,29,31,50r-35,0v-3,-22,-26,-40,-51,-40v-38,0,-58,33,-58,72v0,39,21,74,58,73","w":200,"k":{"y":11,"x":18,"w":7,"v":11}},"d":{"d":"0,-95v0,-82,98,-142,146,-73r0,-94r31,0r0,262r-31,0r0,-24v-15,15,-33,30,-61,30v-49,0,-85,-51,-85,-101xm93,-22v37,0,58,-36,58,-75v0,-38,-22,-72,-57,-72v-36,0,-59,35,-59,74v0,38,22,73,58,73","w":206},"e":{"d":"0,-94v0,-91,112,-143,162,-69v15,21,23,47,23,78r-149,0v0,33,23,63,57,63v25,0,48,-19,52,-42r36,0v-8,39,-42,71,-88,71v-56,1,-93,-44,-93,-101xm149,-111v0,-47,-62,-78,-95,-40v-9,11,-16,24,-18,40r113,0","w":210,"k":{"z":9,"y":16,"x":22,"w":12,"v":16,"t":11,"f":12}},"f":{"d":"98,-235v-28,-12,-37,12,-34,44r34,0r0,26r-34,0r0,165r-33,0r0,-165r-31,0r0,-26r31,0v-3,-62,12,-79,67,-74r0,30","w":122,"k":{"q":8,"o":8,"g":8,"e":8,"d":13,"c":7}},"g":{"d":"86,-197v27,1,45,13,60,30r0,-24r32,0r0,182v4,73,-83,110,-144,75v-18,-10,-26,-26,-26,-44r32,0v9,35,76,45,94,6v7,-15,13,-31,13,-51v-13,16,-33,28,-60,29v-50,1,-87,-50,-87,-102v0,-52,37,-102,86,-101xm94,-22v35,0,58,-36,57,-73v0,-39,-22,-74,-58,-74v-37,0,-58,34,-58,73v-1,39,22,74,59,74","w":217,"k":{"i":7}},"h":{"d":"94,-197v41,0,66,31,65,75r0,122r-32,0v-6,-63,22,-166,-39,-170v-29,-2,-56,27,-56,57r0,113r-32,0r0,-262r32,0r0,98v8,-20,36,-33,62,-33","w":187},"i":{"d":"35,-226r-31,0r0,-36r31,0r0,36xm35,0r-31,0r0,-191r31,0r0,191","w":71},"j":{"d":"43,-226r-32,0r0,-36r32,0r0,36xm-20,42v22,1,31,-2,31,-25r0,-208r32,0r0,212v2,42,-20,53,-63,51r0,-30","w":90,"k":{"z":11,"y":11,"x":10,"w":9,"v":11,"t":11,"s":10,"q":14,"o":8,"l":16,"i":17,"g":8,"f":11,"e":8,"d":15,"c":9,"a":9}},"k":{"d":"159,-192r-71,71r70,121r-36,0r-57,-99r-34,34r0,65r-31,0r0,-262r31,0r0,158r87,-88r41,0","w":180,"k":{"s":9,"q":17,"o":17,"g":16,"e":16,"d":27,"c":16}},"l":{"d":"43,0r-32,0r0,-262r32,0r0,262","w":72},"m":{"d":"136,-166v27,-52,128,-37,128,33r0,133r-31,0v-5,-64,21,-171,-41,-171v-63,0,-38,106,-43,171r-33,0v-6,-63,23,-170,-40,-170v-64,0,-40,105,-44,170r-32,0r0,-192r30,0r0,26v16,-40,90,-40,106,0","w":292},"n":{"d":"93,-198v86,-1,64,114,66,198r-32,0v-6,-63,23,-166,-41,-170v-31,-2,-56,30,-56,61r0,109r-30,0r0,-192r30,0r0,29v10,-20,35,-35,63,-35","w":187},"o":{"d":"185,-95v0,57,-37,101,-92,101v-55,0,-93,-44,-93,-101v0,-58,37,-102,93,-102v55,0,92,46,92,102xm35,-96v0,38,23,74,58,74v37,0,58,-35,58,-74v0,-40,-21,-73,-58,-73v-35,-1,-58,35,-58,73","w":212,"k":{"z":10,"y":15,"x":23,"w":10,"v":14,"t":10,"f":10}},"p":{"d":"91,-197v51,-2,86,50,86,103v0,53,-34,102,-86,100v-25,0,-45,-10,-60,-29r0,95r-31,0r0,-264r31,0r0,28v13,-18,32,-33,60,-33xm86,-22v36,0,58,-36,58,-74v0,-38,-23,-73,-58,-73v-35,0,-58,36,-58,74v0,38,22,73,58,73","w":203,"k":{"z":7,"y":19,"x":20,"w":9,"v":13,"t":8,"f":8}},"q":{"d":"87,-197v28,0,47,14,59,32r0,-26r31,0r0,263r-31,0r0,-97v-9,19,-30,30,-56,31v-53,1,-90,-45,-90,-100v0,-53,36,-103,87,-103xm94,-22v37,0,57,-36,57,-75v0,-38,-22,-72,-58,-72v-35,0,-58,33,-58,71v0,40,21,76,59,76","w":227,"k":{"z":14,"y":14,"x":13,"w":12,"v":13,"u":8,"t":12,"s":13,"r":7,"q":17,"p":8,"o":11,"n":8,"m":8,"l":18,"k":7,"i":18,"h":7,"g":11,"f":13,"e":11,"d":11,"c":12,"b":8,"a":12}},"r":{"d":"92,-161v-38,-1,-60,16,-60,54r0,107r-32,0r0,-191r30,0r0,34v10,-26,28,-37,62,-38r0,34","w":111},"s":{"d":"37,-145v-10,26,94,42,89,43v68,32,14,108,-50,108v-44,0,-77,-26,-76,-68r31,0v0,26,21,40,47,40v22,1,50,-13,46,-32v-8,-46,-119,-23,-119,-87v0,-53,82,-72,123,-42v16,11,23,26,23,45r-31,0v3,-40,-80,-43,-83,-7","w":180,"k":{"y":8,"x":10,"v":8}},"t":{"d":"60,-48v-3,23,17,24,35,20r0,28v-36,5,-67,2,-67,-37r0,-128r-28,0r0,-26r28,0r0,-54r32,0r0,54r35,0r0,26r-35,0r0,117","w":118,"k":{"d":11}},"u":{"d":"71,-21v32,2,57,-34,57,-67r0,-103r32,0r0,191r-31,0r0,-28v-12,20,-36,34,-65,34v-40,1,-64,-31,-64,-73r0,-124r32,0v6,63,-22,165,39,170","w":189},"v":{"d":"175,-191r-70,191r-34,0r-71,-191r35,0r53,153r52,-153r35,0","w":197,"k":{"q":9,"o":9,"g":9,"e":9,"d":9,"c":8,"a":9}},"w":{"d":"262,-191r-59,191r-32,0r-41,-147r-40,147r-32,0r-58,-191r34,0r40,146r38,-146r37,0r38,146r41,-146r34,0","w":285,"k":{"a":8}},"x":{"d":"175,0r-39,0r-50,-74r-49,74r-37,0r67,-98r-64,-93r38,0r46,68r47,-68r37,0r-64,92","w":198,"k":{"s":10,"q":18,"o":18,"g":19,"e":18,"d":18,"c":18}},"y":{"d":"25,39v30,6,38,-3,46,-32r-71,-198r36,0r53,155r53,-155r35,0r-76,213v-11,33,-35,59,-76,47r0,-30","w":199,"k":{"q":18,"o":9,"g":13,"e":10,"d":10,"c":9,"a":10}},"z":{"d":"159,0r-159,0r0,-26r112,-137r-107,0r0,-28r149,0r0,26r-112,137r117,0r0,28","w":180},"{":{"d":"82,-37v-2,51,-7,85,43,84r0,27v-50,-2,-76,-13,-76,-62v0,-49,8,-99,-49,-93r0,-27v106,12,-12,-167,125,-155r0,26v-87,-11,-7,131,-79,142v25,9,37,24,36,58","w":149},"|":{"d":"116,-120r-27,0r0,-136r27,0r0,136xm116,63r-27,0r0,-136r27,0r0,136"},"}":{"d":"76,-201v0,48,-9,100,49,93r0,27v-108,-14,17,168,-125,155r0,-27v49,6,43,-40,43,-84v0,-35,10,-48,36,-58v-38,-9,-38,-52,-35,-98v2,-34,-12,-43,-44,-44r0,-26v50,2,76,13,76,62","w":149},"~":{"d":"154,-198v25,-2,36,-21,35,-50r27,0v0,44,-21,76,-62,76v-29,6,-68,-50,-92,-50v-25,0,-36,23,-35,50r-27,0v0,-44,21,-77,62,-76v29,-6,67,52,92,50","w":241},"\u00a0":{"w":97}}});

// Grey Box
/* Greybox Redux
 * Required: http://jquery.com/
 * Written by: John Resig
 * Based on code by: 4mir Salihefendic (http://amix.dk)
 * License: LGPL (read more in LGPL.txt)
 */

var GB_DONE = false;
var GB_HEIGHT = 400;
var GB_WIDTH = 400;

function GB_show(caption, url, height, width) {
  GB_HEIGHT = height || 400;
  GB_WIDTH = width || 400;
  if(!GB_DONE) {
    $(document.body)
      .append("<div id='GB_overlay'></div><div id='GB_window'><div id='GB_caption'></div>"
        + "<img src='images/close.gif' alt='Close window'/></div>");
    $("#GB_window img").click(GB_hide);
    $("#GB_overlay").click(GB_hide);
    $(window).resize(GB_position);
    GB_DONE = true;
  }

  $("#GB_frame").remove();
  $("#GB_window").append("<iframe id='GB_frame' src='"+url+"'></iframe>");

  $("#GB_caption").html(caption);
  $("#GB_overlay").show();
  GB_position();

  if(GB_ANIMATION)
    $("#GB_window").slideDown("slow");
  else
    $("#GB_window").show();
}

function GB_hide() {
  $("#GB_window,#GB_overlay").hide();
}

function GB_position() {
  var de = document.documentElement;
  var w = self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
  $("#GB_window").css({width:GB_WIDTH+"px",height:GB_HEIGHT+"px",
    left: ((w - GB_WIDTH)/2)+"px" });
  $("#GB_frame").css("height",GB_HEIGHT - 32 +"px");
}
// END Grey Box

// MegaMenu
/*
  jQuery MegaMenu Plugin
  Author: GeekTantra
  Author URI: http://www.geektantra.com
*/
var isIE6 = navigator.userAgent.toLowerCase().indexOf('msie 6') != -1;

jQuery.fn.megamenu = function(options) {
  options = jQuery.extend({
                              activate_action: "mouseover",
                              deactivate_action: "mouseleave",
                              show_method: "simple",
                              hide_method: "simple",
                              justify: "left",
                              enable_js_shadow: true,
                              shadow_size: 3,
                              mm_timeout: 0
                          }, options);
  var $megamenu_object = this;
//  $('.LoadMenu').hide();
  this.show();
  if( options.activate_action == "click" ) options.mm_timeout = 0;
  $megamenu_object.children("li").each(function(){
    jQuery(this).addClass("mm-item");
    jQuery(".mm-item").css({ 'float': options.justify });
    
    jQuery(this).find("div:first").addClass("mm-item-content");
    jQuery(this).find("a:first").addClass("mm-item-link");
    var $mm_item_content = jQuery(this).find(".mm-item-content");
    var $mm_item_link = jQuery(this).find(".mm-item-link");
    $mm_item_content.hide();
    
    jQuery(document).bind("click", function(){
      jQuery(".mm-item-content").hide();
      jQuery(".mm-item-link").removeClass("mm-item-link-hover");
    });
    jQuery(this).bind("click", function(e){
      e.stopPropagation();
    });
    $mm_item_content.wrapInner('<div class="mm-content-base"></div>');
    if(options.enable_js_shadow == true) {
      $mm_item_content.append('<div class="mm-js-shadow"></div>');
    }
    var $mm_timer = 0;
    // Activation Method Starts
    jQuery(this).bind(options.activate_action, function(e){
      e.stopPropagation();
      var mm_item_link_obj = jQuery(this).find("a.mm-item-link");
      var mm_item_content_obj = jQuery(this).find("div.mm-item-content");
      clearTimeout($mm_timer);
      $mm_timer = setTimeout(function(){ //Emulate HoverIntent
        mm_item_link_obj.addClass("mm-item-link-hover");
        mm_item_content_obj.css({
          'top': ($mm_item_link.offset().top + $mm_item_link.outerHeight()) - 1 +"px",
          'left': ($mm_item_link.offset().left) - 0 + 'px'
        })
        
        if(options.justify == "left"){
          var mm_object_right_end = $megamenu_object.offset().left + $megamenu_object.outerWidth();
                                    // Coordinates of the right end of the megamenu object
          var mm_content_right_end = $mm_item_link.offset().left + $mm_item_content.outerWidth() - 2 ;
                                    // Coordinates of the right end of the megamenu content
          if( mm_content_right_end >= mm_object_right_end ) { // Menu content exceeding the outer box
            mm_item_content_obj.css({
              'left': ($mm_item_link.offset().left - (mm_content_right_end - mm_object_right_end)) - 2 + 'px'
            }); // Limit megamenu inside the outer box
          }
        } else if( options.justify == "right" ) {
          var mm_object_left_end = $megamenu_object.offset().left;
                                    // Coordinates of the left end of the megamenu object
          var mm_content_left_end = $mm_item_link.offset().left - mm_item_content_obj.outerWidth() + 
                                    $mm_item_link.outerWidth() + 5;
                                    // Coordinates of the left end of the megamenu content
          if( mm_content_left_end <= mm_object_left_end ) { // Menu content exceeding the outer box
            mm_item_content_obj.css({
              'left': mm_object_left_end + 2 + 'px'
            }); // Limit megamenu inside the outer box
          } else {
            mm_item_content_obj.css({
              'left': mm_content_left_end + 'px'
            }); // Limit megamenu inside the outer box
          }
        }
        if(options.enable_js_shadow == true) {
          mm_item_content_obj.find(".mm-js-shadow").height( mm_item_content_obj.height() );
          mm_item_content_obj.find(".mm-js-shadow").width( mm_item_content_obj.width() );
          mm_item_content_obj.find(".mm-js-shadow").css({
            'top': (options.shadow_size) + (isIE6 ? 2 : 0) + "px",
            'left': (options.shadow_size) + (isIE6 ? 2 : 0) + "px",
            'opacity': 0.5
          });
        }
        switch(options.show_method) {
          case "simple":
                mm_item_content_obj.show();
                break;
          case "slideDown":
                mm_item_content_obj.height("auto");
                mm_item_content_obj.slideDown('fast');
                break;
          case "fadeIn":
                mm_item_content_obj.fadeTo('fast', 1);
                break;
          default:
                mm_item_content_obj.each( options.show_method );
                break;
        }
      }, options.mm_timeout);
    });
    // Activation Method Ends
    // Deactivation Method Starts
    jQuery(this).bind(options.deactivate_action, function(e){
      e.stopPropagation();
      clearTimeout($mm_timer);
      var mm_item_link_obj = jQuery(this).find("a.mm-item-link");
      var mm_item_content_obj = jQuery(this).find("div.mm-item-content");
//      mm_item_content_obj.stop();
      switch(options.hide_method) {
        case "simple":
              mm_item_content_obj.hide();
              mm_item_link_obj.removeClass("mm-item-link-hover");
              break;
        case "slideUp":
              mm_item_content_obj.slideUp( 'fast',  function() {
                mm_item_link_obj.removeClass("mm-item-link-hover");
              });
              break;
        case "fadeOut":
              mm_item_content_obj.fadeOut( 'fast', function() {
                mm_item_link_obj.removeClass("mm-item-link-hover");
              });
              break;
        default:
              mm_item_content_obj.each( options.hide_method );
              mm_item_link_obj.removeClass("mm-item-link-hover");
              break;
      }
      if(mm_item_content_obj.length < 1) mm_item_link_obj.removeClass("mm-item-link-hover");
    });
//    Deactivation Method Ends
  });
  this.find(">li:last").after('<li class="clear-fix"></li>');
};
// End megamenu

Cufon.replace('.TopNavigation');
Cufon.replace('.HPBottomSection h2');
Cufon.replace('.HPBottomSectionMid h2');

jQuery(function(){
	var SelfLocation = window.location.href.split('?');
	switch (SelfLocation[1]) {
	  case "justify_right":
		jQuery(".megamenu").megamenu({ 'justify':'right' });
		break;
	  case "justify_left":
	  default:
		jQuery(".megamenu").megamenu();
	}
});


function getQuerystring(mystring, key, default_)
								{
								  if (default_==null) default_="";
								  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
								  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
								  var qs = regex.exec(mystring);
								  if(qs == null)
									return default_;
								  else
									return qs[1];
								}




