﻿(function(a){a.fn.hoverIntent=function(j,k){var b={sensitivity:7,interval:100,timeout:0};b=a.extend(b,k?{over:j,out:k}:j);var d,e,f,g,c=function(a){d=a.pageX;e=a.pageY},i=function(j,h){h.hoverIntent_t=clearTimeout(h.hoverIntent_t);if(Math.abs(f-d)+Math.abs(g-e)<b.sensitivity){a(h).unbind("mousemove",c);h.hoverIntent_s=1;return b.over.apply(h,[j])}else{f=d;g=e;h.hoverIntent_t=setTimeout(function(){i(j,h)},b.interval)}},l=function(c,a){a.hoverIntent_t=clearTimeout(a.hoverIntent_t);a.hoverIntent_s=0;return b.out.apply(a,[c])},h=function(h){var e=jQuery.extend({},h),d=this;if(d.hoverIntent_t)d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if(h.type=="mouseenter"){f=e.pageX;g=e.pageY;a(d).bind("mousemove",c);if(d.hoverIntent_s!=1)d.hoverIntent_t=setTimeout(function(){i(e,d)},b.interval)}else{a(d).unbind("mousemove",c);if(d.hoverIntent_s==1)d.hoverIntent_t=setTimeout(function(){l(e,d)},b.timeout)}};return this.bind("mouseenter",h).bind("mouseleave",h)}})(jQuery);(function(a){a.fn.carousel=function(b){b=a.extend({btnPrev:null,btnNext:null,speed:200,easing:null,circular:true,visible:5,start:0,scroll:1,beforeStart:null,afterEnd:null,variableWidth:true,debug:false},b||{});return this.each(function(){var i=false,o=a(this),d=a("ul",o),f=a("li",d),p=f.size(),c=b.visible;d.prepend(f.slice(p-c-1+1).clone()).append(f.slice(0,c).clone());curr=b.start+c;var e=a("li",d),g=e.size(),n=a(".carousel_wrapper",o),m=n.outerWidth()/2,k=0;a(window).load(function(){b.debug&&console.log("Loaded");e.each(function(){k+=f.outerWidth(true)});d.css({width:k,position:"absolute"});n.css({position:"relative"});l(curr)});function l(a){if(!i){if(a==b.start+c)curr=a;else if(a<b.start+c){curr=g-c-1;d.css({left:j(curr+1)})}else if(a>=g-c+1){curr=a==g-c+1?c+1:c+b.scroll;d.css({left:j(curr-1)})}else curr=a;b.debug&&console.log("going to "+curr);e.removeClass("current");h().addClass("current");var f=j(curr);b.debug&&console.log("moved by "+f);b.beforeStart&&b.beforeStart.call(this,h());i=true;d.animate({left:f},b.speed,b.easing,function(){b.afterEnd&&b.afterEnd.call(this,h());i=false})}return false}b.btnPrev&&a(b.btnPrev).click(function(){return l(curr-b.scroll)});b.btnNext&&a(b.btnNext).click(function(){return l(curr+b.scroll)});function h(){return e.slice(curr).slice(0,b.scroll)}function j(f){var c=e.slice(f).slice(0,1),d=c.position(),a=c.outerWidth(true)/2;b.debug&&console.log("wrapper center :"+m+", left: "+d.left+", total width: "+k+", item center: "+a);return-(d.left+a-m)}})}})(jQuery);var Cufon=function(){var a=function(){return a.replace.apply(null,arguments)},h=a.DOM={ready:function(){var b=false,d={loaded:1,complete:1},c=[],a=function(){if(b)return;b=true;for(var a;a=c.shift();a());};if(document.addEventListener){document.addEventListener("DOMContentLoaded",a,false);window.addEventListener("pageshow",a,false)}!window.opera&&document.readyState&&(function(){d[document.readyState]?a():setTimeout(arguments.callee,10)})();document.readyState&&document.createStyleSheet&&(function(){try{document.body.doScroll("left");a()}catch(b){setTimeout(arguments.callee,1)}})();e(window,"load",a);return function(d){if(!arguments.length)a();else b?d():c.push(d)}}(),root:function(){return document.documentElement||document.body}},b=a.CSS={Size:function(b,a){this.value=parseFloat(b);this.unit=String(b).match(/[a-z%]*$/)[0]||"px";this.convert=function(b){return b/a*this.value};this.convertFrom=function(b){return b/this.value*a};this.toString=function(){return this.value+this.unit}},addClass:function(a,c){var b=a.className;a.className=b+(b&&" ")+c;return a},color:c(function(b){var a={};a.color=b.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(d,b,c){a.opacity=parseFloat(c);return"rgb("+b+")"});return a}),fontStretch:c(function(a){return typeof a=="number"?a:/%$/.test(a)?parseFloat(a)/100:({"ultra-condensed":.5,"extra-condensed":.625,condensed:.75,"semi-condensed":.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2})[a]||1}),getStyle:function(a){var b=document.defaultView;return b&&b.getComputedStyle?new i(b.getComputedStyle(a,null)):a.currentStyle?new i(a.currentStyle):new i(a.style)},gradient:c(function(b){for(var f={id:b,type:b.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},e=b.substr(b.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig),a=0,d=e.length,c;a<d;++a){c=e[a].split("=",2).reverse();f.stops.push([c[1]||a/(d-1),c[0]])}return f}),quotedList:c(function(d){var b=[],c=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,a;while(a=c.exec(d))b.push(a[3]||a[1]);return b}),recognizesMedia:c(function(e){var a=document.createElement("style"),c,b,d;a.type="text/css";a.media=e;try{a.appendChild(document.createTextNode("/**/"))}catch(g){}b=f("head")[0];b.insertBefore(a,b.firstChild);c=a.sheet||a.styleSheet;d=c&&!c.disabled;b.removeChild(a);return d}),removeClass:function(a,c){var b=RegExp("(?:^|\\s+)"+c+"(?=\\s|$)","g");a.className=a.className.replace(b,"");return a},supports:function(b,c){var a=document.createElement("span").style;if(a[b]===undefined)return false;a[b]=c;return a[b]===c},textAlign:function(a,d,b,c){if(d.get("textAlign")=="right"){if(b>0)a=" "+a}else if(b<c-1)a+=" ";return a},textShadow:c(function(e){if(e=="none")return null;var c=[],b={},a,d=0,f=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(a=f.exec(e))if(a[0]==","){c.push(b);b={};d=0}else if(a[1])b.color=a[1];else b[(["offX","offY","blur"])[d++]]=a[2];c.push(b);return c}),textTransform:function(){var a={uppercase:function(a){return a.toUpperCase()},lowercase:function(a){return a.toLowerCase()},capitalize:function(a){return a.replace(/\b./g,function(a){return a.toUpperCase()})}};return function(c,d){var b=a[d.get("textTransform")];return b?b(c):c}}(),whiteSpace:function(){var c={inline:1,"inline-block":1,"run-in":1},a=/^\s+/,b=/\s+$/;return function(d,g,f,e){if(e)if(e.nodeName.toLowerCase()=="br")d=d.replace(a,"");if(c[g.get("display")])return d;if(!f.previousSibling)d=d.replace(a,"");if(!f.nextSibling)d=d.replace(b,"");return d}}()};b.ready=function(){var a=!b.recognizesMedia("all"),c=false,e=[],j=function(){a=true;for(var b;b=e.shift();b());},k=f("link"),l=f("style");function d(a){return a.disabled||g(a.sheet,a.media||"screen")}function g(d,h){if(!b.recognizesMedia(h||"all"))return true;if(!d||d.disabled)return false;try{var e=d.cssRules,a;if(e)a:for(var c=0,f=e.length;a=e[c],c<f;++c)switch(a.type){case 2:break;case 3:if(!g(a.styleSheet,a.media.mediaText))return false;break;default:break a}}catch(i){}return true}function i(){if(document.createStyleSheet)return true;for(var b,a=0;b=k[a];++a)if(b.rel.toLowerCase()=="stylesheet"&&!d(b))return false;for(a=0;b=l[a];++a)if(!d(b))return false;return true}h.ready(function(){if(!c)c=b.getStyle(document.body).isUsable();if(a||c&&i())j();else setTimeout(arguments.callee,10)});return function(b){if(a)b();else e.push(b)}}();function x(b){var a=this.face=b.face,c={" ":1," ":1,"　":1};this.glyphs=b.glyphs;this.w=b.w;this.baseSize=parseInt(a["units-per-em"],10);this.family=a["font-family"].toLowerCase();this.weight=a["font-weight"];this.style=a["font-style"]||"normal";this.viewBox=function(){var c=a.bbox.split(/\s+/),b={minX:parseInt(c[0],10),minY:parseInt(c[1],10),maxX:parseInt(c[2],10),maxY:parseInt(c[3],10)};b.width=b.maxX-b.minX;b.height=b.maxY-b.minY;b.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return b}();this.ascent=-parseInt(a.ascent,10);this.descent=-parseInt(a.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(k,l,i){var m=this.glyphs,b,f,g,d=[],e=0,j=-1,h=-1,a;while(a=k[++j]){b=m[a]||this.missingGlyph;if(!b)continue;if(f){e-=g=f[a]||0;d[h]-=g}e+=d[++h]=~~(b.w||this.w)+l+(c[a]?i:0);f=b.k}d.total=e;return d}}function s(){var a={},b={oblique:"italic",italic:"oblique"};this.add=function(b){(a[b.style]||(a[b.style]={}))[b.weight]=b};this.get=function(k,c){var e=a[k]||a[b[k]]||a.normal||a.italic||a.oblique;if(!e)return null;c=({normal:400,bold:700})[c]||parseInt(c,10);if(e[c])return e[c];var i=({1:1,99:0})[c%100],j=[],h,f;if(i===undefined)i=c>400;if(c==500)c=400;for(var d in e){if(!g(e,d))continue;d=parseInt(d,10);if(!h||d<h)h=d;if(!f||d>f)f=d;j.push(d)}if(c<h)c=h;if(c>f)c=f;j.sort(function(b,a){return i?b>=c&&a>=c?b<a:b>a:b<=c&&a<=c?b>a:b<a?-1:1});return e[j[0]]}}function w(){function f(a,b){return a.contains?a.contains(b):a.compareDocumentPosition(b)&16}function b(b){var a=b.relatedTarget;if(!a||f(this,a))return;c(this,b.type=="mouseover")}function d(a){c(this,a.type=="mouseenter")}function c(b,c){setTimeout(function(){var d=l.get(b).options;a.replace(b,c?n(d,d.hover):d,true)},10)}this.attach=function(a){if(a.onmouseenter===undefined){e(a,"mouseover",b);e(a,"mouseout",b)}else{e(a,"mouseenter",d);e(a,"mouseleave",d)}}}function z(){var b=[],c={};function d(f){for(var d=[],e,a=0;e=f[a];++a)d[a]=b[c[e]];return d}this.add=function(d,a){c[d]=b.push(a)-1};this.repeat=function(){for(var e=arguments.length?d(arguments):b,c,f=0;c=e[f++];)a.replace(c[0],c[1],true)}}function p(){var a={},b=0;function c(a){return a.cufid||(a.cufid=++b)}this.get=function(d){var b=c(d);return a[b]||(a[b]={})}}function i(c){var a={},d={};this.extend=function(b){for(var c in b)if(g(b,c))a[c]=b[c];return this};this.get=function(b){return a[b]!=undefined?a[b]:c[b]};this.getSize=function(a,c){return d[a]||(d[a]=new b.Size(this.get(a),c))};this.isUsable=function(){return!!c}}function e(a,b,c){if(a.addEventListener)a.addEventListener(b,c,false);else a.attachEvent&&a.attachEvent("on"+b,function(){return c.call(a,window.event)})}function A(a,b){var c=l.get(a);if(c.options)return a;b.hover&&b.hoverables[a.nodeName.toLowerCase()]&&q.attach(a);c.options=b;return a}function c(b){var a={};return function(c){if(!g(a,c))a[c]=b.apply(null,arguments);return a[c]}}function r(g,c){for(var f=b.quotedList(c.get("fontFamily").toLowerCase()),a,e=0;a=f[e];++e)if(d[a])return d[a].get(c.get("fontStyle"),c.get("fontWeight"));return null}function f(a){return document.getElementsByTagName(a)}function g(b,a){return b.hasOwnProperty(a)}function n(){for(var d={},a,b,c=0,e=arguments.length;a=arguments[c],c<e;++c)for(b in a)if(g(a,b))d[b]=a[b];return d}function u(n,d,j,h,o,m){var g=document.createDocumentFragment(),f;if(d==="")return g;var l=h.separate,c=d.split(v[l]),i=l=="words";if(i&&y){/^\s/.test(d)&&c.unshift("");/\s$/.test(d)&&c.push("")}for(var a=0,e=c.length;a<e;++a){f=k[h.engine](n,i?b.textAlign(c[a],j,a,e):c[a],j,h,o,m,a<e-1);f&&g.appendChild(f)}return g}function t(c,e){var j=c.nodeName.toLowerCase();if(e.ignore[j])return;var m=!e.textless[j],f=b.getStyle(A(c,e)).extend(e),g=r(c,f),a,i,h,d,n,l;if(!g)return;for(a=c.firstChild;a;a=h){i=a.nodeType;h=a.nextSibling;if(m&&i==3){if(d){d.appendData(a.data);c.removeChild(a)}else d=a;if(h)continue}if(d){c.replaceChild(u(g,b.whiteSpace(d.data,f,d,l),f,e,a,c),d);d=null}if(i==1){if(a.firstChild)if(a.nodeName.toLowerCase()=="cufon")k[e.engine](g,null,f,e,a,c);else arguments.callee(a,e);l=a}}}var y=" ".split(/\s+/).length==0,l=new p,q=new w,j=new z,m=false,k={},d={},o={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)}||f,separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"},v={words:/\s/.test(" ")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};a.now=function(){h.ready();return a};a.refresh=function(){j.repeat.apply(j,arguments);return a};a.registerEngine=function(c,b){if(!b)return a;k[c]=b;return a.set("engine",c)};a.registerFont=function(e){if(!e)return a;var c=new x(e),b=c.family;if(!d[b])d[b]=new s;d[b].add(c);return a.set("fontFamily",'"'+b+'"')};a.replace=function(d,c,e){c=n(o,c);if(!c.engine)return a;if(!m){b.addClass(h.root(),"cufon-active cufon-loading");b.ready(function(){b.addClass(b.removeClass(h.root(),"cufon-loading"),"cufon-ready")});m=true}if(c.hover)c.forceHitArea=true;if(c.autoDetect)delete c.fontFamily;if(typeof c.textShadow=="string")c.textShadow=b.textShadow(c.textShadow);if(typeof c.color=="string"&&/^-/.test(c.color))c.textGradient=b.gradient(c.color);else delete c.textGradient;!e&&j.add(d,arguments);if(d.nodeType||typeof d=="string")d=[d];b.ready(function(){for(var b=0,f=d.length;b<f;++b){var e=d[b];if(typeof e=="string")a.replace(c.selector(e),c,true);else t(e,c)}});return a};a.set=function(b,c){o[b]=c;return a};return a}();Cufon.registerEngine("vml",function(){var c=document.namespaces;if(!c)return;c.add("cvml","urn:schemas-microsoft-com:vml");c=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize)return;b=null;var f=(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:'+(f?"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 g(c,b){return a(c,/(?:em|ex|%)$|^[a-z-]+$/i.test(b)?"1em":b)}function a(a,b){if(b==="0")return 0;if(/px$/i.test(b))return parseFloat(b);var e=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b.replace("%","em");var c=a.style.pixelLeft;a.style.left=e;a.runtimeStyle.left=d;return c}function e(g,c,f,e){var d="computed"+e,b=c[d];if(isNaN(b)){b=c.get(e);c[d]=b=b=="normal"?0:~~f.convertFrom(a(g,b))}return b}var d={};function h(h){var e=h.id;if(!d[e]){var b=h.stops,a=document.createElement("cvml:fill"),f=[];a.type="gradient";a.angle=180;a.focus="0";a.method="sigma";a.color=b[0][1];for(var c=1,g=b.length-1;c<g;++c)f.push(b[c][0]*100+"% "+b[c][1]);a.colors=f.join(",");a.color2=b[g][1];d[e]=a}return d[e]}return function(m,q,c,o,C,u,db){var D=q===null;if(D)q=C.alt;var r=m.viewBox,k=c.computedFontSize||(c.computedFontSize=new Cufon.CSS.Size(g(u,c.get("fontSize"))+"px",m.baseSize)),i,l;if(D){i=C;l=C.firstChild}else{i=document.createElement("cufon");i.className="cufon cufon-vml";i.alt=q;l=document.createElement("cufoncanvas");i.appendChild(l);if(o.printable){var W=document.createElement("cufontext");W.appendChild(document.createTextNode(q));i.appendChild(W)}!db&&i.appendChild(document.createElement("cvml:shape"))}var n=i.style,E=l.style,N=k.convert(r.height),v=Math.ceil(N),bb=v/N,Q=bb*Cufon.CSS.fontStretch(c.get("fontStretch")),H=r.minX,S=r.minY;E.height=v;E.top=Math.round(k.convert(S-m.ascent));E.left=Math.round(k.convert(H));n.height=k.convert(m.height)+"px";var Y=c.get("color"),y=Cufon.CSS.textTransform(q,c).split(""),s=m.spacing(y,e(u,c,k,"letterSpacing"),e(u,c,k,"wordSpacing"));if(!s.length)return null;var M=s.total,V=-H+M+(r.width-s[s.length-1]),X=k.convert(V*Q),U=Math.round(X),P=V+","+r.height,O,Z="r"+P+"ns",T=o.textGradient&&h(o.textGradient),ab=m.glyphs,R=0,B=o.textShadow,J=-1,I=0,cb;while(cb=y[++J]){var A=ab[y[J]]||m.missingGlyph,b;if(!A)continue;if(D){b=l.childNodes[I];while(b.firstChild)b.removeChild(b.firstChild)}else{b=document.createElement("cvml:shape");l.appendChild(b)}b.stroked="f";b.coordsize=P;b.coordorigin=O=H-R+","+S;b.path=(A.d?"m"+A.d+"xe":"")+"m"+O+Z;b.fillcolor=Y;T&&b.appendChild(T.cloneNode(false));var K=b.style;K.width=U;K.height=v;if(B){var F=B[0],w=B[1],L=Cufon.CSS.color(F.color),x,j=document.createElement("cvml:shadow");j.on="t";j.color=L.color;j.offset=F.offX+","+F.offY;if(w){x=Cufon.CSS.color(w.color);j.type="double";j.color2=x.color;j.offset2=w.offX+","+w.offY}j.opacity=L.opacity||x&&x.opacity||1;b.appendChild(j)}R+=s[I++]}var d=b.nextSibling,G,z;if(o.forceHitArea){if(!d){d=document.createElement("cvml:rect");d.stroked="f";d.className="cufon-vml-cover";G=document.createElement("cvml:fill");G.opacity=0;d.appendChild(G);l.appendChild(d)}z=d.style;z.width=U;z.height=v}else d&&l.removeChild(d);n.width=Math.max(Math.ceil(k.convert(M*Q)),0);if(f){var t=c.computedYAdjust;if(t===undefined){var p=c.get("lineHeight");if(p=="normal")p="1em";else if(!isNaN(p))p+="em";c.computedYAdjust=t=.5*(a(u,p)-parseFloat(n.height))}if(t){n.marginTop=Math.ceil(t)+"px";n.marginBottom=t+"px"}}return i}}());Cufon.registerEngine("canvas",function(){var a=document.createElement("canvas");if(!a||!a.getContext||!a.getContext.apply)return;a=null;var b=Cufon.CSS.supports("display","inline-block"),f=!b&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId)),c=document.createElement("style");c.type="text/css";c.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(f?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(b?"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(c);function e(i,g){var e=0,d=0,b=[],h=/([mrvxe])([^a-z]*)/g,f;a:for(var c=0;f=h.exec(i);++c){var a=f[2].split(",");switch(f[1]){case"v":b[c]={m:"bezierCurveTo",a:[e+~~a[0],d+~~a[1],e+~~a[2],d+~~a[3],e+=~~a[4],d+=~~a[5]]};break;case"r":b[c]={m:"lineTo",a:[e+=~~a[0],d+=~~a[1]]};break;case"m":b[c]={m:"moveTo",a:[e=~~a[0],d=~~a[1]]};break;case"x":b[c]={m:"closePath"};break;case"e":break a}g[b[c].m].apply(g,b[c].a)}return b}function d(d,c){for(var a=0,e=d.length;a<e;++a){var b=d[a];c[b.m].apply(c,b.a)}}return function(i,r,l,A,v){var F=r===null;if(F)r=v.getAttribute("alt");var g=i.viewBox,c=l.getSize("fontSize",i.baseSize),k=0,u=0,y=0,m=0,n=A.textShadow,G=[];if(n)for(var f=n.length;f--;){var w=n[f],q=c.convertFrom(parseFloat(w.offX)),p=c.convertFrom(parseFloat(w.offY));G[f]=[q,p];if(p<k)k=p;if(q>u)u=q;if(p>y)y=p;if(q<m)m=q}var B=Cufon.CSS.textTransform(r,l).split(""),o=i.spacing(B,~~c.convertFrom(parseFloat(l.get("letterSpacing"))||0),~~c.convertFrom(parseFloat(l.get("wordSpacing"))||0));if(!o.length)return null;var P=o.total;u+=g.width-o[o.length-1];m+=g.minX;var h,j;if(F){h=v;j=v.firstChild}else{h=document.createElement("cufon");h.className="cufon cufon-canvas";h.setAttribute("alt",r);j=document.createElement("canvas");h.appendChild(j);if(A.printable){var M=document.createElement("cufontext");M.appendChild(document.createTextNode(r));h.appendChild(M)}}var s=h.style,t=j.style,x=c.convert(g.height),R=Math.ceil(x),H=R/x,D=H*Cufon.CSS.fontStretch(l.get("fontStretch")),E=P*D,K=Math.ceil(c.convert(E+u-m)),I=Math.ceil(c.convert(g.height-k+y));j.width=K;j.height=I;t.width=K+"px";t.height=I+"px";k+=g.minY;t.top=Math.round(c.convert(k-i.ascent))+"px";t.left=Math.round(c.convert(m))+"px";var L=Math.max(Math.ceil(c.convert(E)),0)+"px";if(b){s.width=L;s.height=c.convert(i.height)+"px"}else{s.paddingLeft=L;s.paddingBottom=c.convert(i.height)-1+"px"}var a=j.getContext("2d"),C=x/g.height;a.scale(C,C*H);a.translate(-m,-k);a.save();function N(){var g=i.glyphs,b,c=-1,f=-1,h;a.scale(D,1);while(h=B[++c]){var b=g[B[c]]||i.missingGlyph;if(!b)continue;if(b.d){a.beginPath();if(b.code)d(b.code,a);else b.code=e("m"+b.d,a);a.fill()}a.translate(o[++f],0)}a.restore()}if(n)for(var f=n.length;f--;){var w=n[f];a.save();a.fillStyle=w.color;a.translate.apply(a,G[f]);N()}var J=A.textGradient;if(J){for(var O=J.stops,z=a.createLinearGradient(0,g.minY,0,g.maxY),f=0,Q=O.length;f<Q;++f)z.addColorStop.apply(z,O[f]);a.fillStyle=z}else a.fillStyle=l.get("color");N();return h}}());(function(a){a.fn.superfish=function(i){var b=a.fn.superfish,c=b.c,h=a(['<span class="',c.arrowClass,'"> &#187;</span>'].join("")),d=function(){var b=a(this),c=e(b);clearTimeout(c.sfTimer);b.showSuperfishUl().siblings().hideSuperfishUl()},f=function(){var f=a(this),g=e(f),c=b.op;clearTimeout(g.sfTimer);g.sfTimer=setTimeout(function(){c.retainPath=a.inArray(f[0],c.$path)>-1;f.hideSuperfishUl();c.$path.length&&f.parents(["li.",c.hoverClass].join("")).length<1&&d.call(c.$path)},c.delay)},e=function(d){var a=d.parents(["ul.",c.menuClass,":first"].join(""))[0];b.op=b.o[a.serial];return a},g=function(a){a.addClass(c.anchorClass).append(h.clone())};return this.each(function(){var j=this.serial=b.o.length,e=a.extend({},b.defaults,i);e.$path=a("li."+e.pathClass,this).slice(0,e.pathLevels).each(function(){a(this).addClass([e.hoverClass,c.bcClass].join(" ")).filter("li:has(ul)").removeClass(e.pathClass)});b.o[j]=b.op=e;a("li:has(ul)",this)[a.fn.hoverIntent&&!e.disableHI?"hoverIntent":"hover"](d,f).each(function(){e.autoArrows&&g(a(">a:first-child",this))}).not("."+c.bcClass).hideSuperfishUl();var h=a("a",this);h.each(function(b){var a=h.eq(b).parents("li");h.eq(b).focus(function(){d.call(a)}).blur(function(){f.call(a)})});e.onInit.call(this)}).each(function(){var d=[c.menuClass];b.op.dropShadows&&!(a.browser.msie&&a.browser.version<7)&&d.push(c.shadowClass);a(this).addClass(d.join(" "))})};var b=a.fn.superfish;b.o=[];b.op={};b.IE7fix=function(){var c=b.op;a.browser.msie&&a.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined&&this.toggleClass(b.c.shadowClass+"-off")};b.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};b.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};a.fn.extend({hideSuperfishUl:function(){var c=b.op,e=c.retainPath===true?c.$path:"";c.retainPath=false;var d=a(["li.",c.hoverClass].join(""),this).add(this).not(e).removeClass(c.hoverClass).find(">ul").hide().css("visibility","hidden");c.onHide.call(d);return this},showSuperfishUl:function(){var c=b.op,d=b.c.shadowClass+"-off",a=this.addClass(c.hoverClass).find(">ul:hidden").css("visibility","visible");b.IE7fix.call(a);c.onBeforeShow.call(a);a.animate(c.animation,c.speed,function(){b.IE7fix.call(a);c.onShow.call(a)});return this}})})(jQuery);$(function(){if($(".product-info").size()>0){$("#tabs > a").click(function(){if(!$(this).hasClass("selected")){$("#pages > div ").toggleClass("selected");$("#tabs > a ").toggleClass("selected")}});var a=$("#Image_Name");$("#other-images .details > a").click(function(){var b=$("span[id^=thumbnailsView_Image_Name]",$(this).parent()).html();a.html(b)});$(".product-list .details").hover(function(){$(this).addClass("itemHover")},function(){$(this).removeClass("itemHover")});Cufon.replace("#packs-list lh")}});function toggleDisplay(b,a){if(document.getElementById(b).style.display=="none"){document.getElementById(b).style.display="block";document.getElementById(a).className+="exp"}else{document.getElementById(b).style.display="none";document.getElementById(a).className=document.getElementById(a).className.replace("exp","")}}function toggleAll(g,j,h,k){var f=document.getElementById(g),a=f.getElementsByTagName("div"),e=f.getElementsByTagName("h3"),d=document.getElementById(j),c=document.getElementById(h),b=k;if(d&&c)if(b=="True"){for(i=0;i<a.length;i++){ctrlHeadline=e[i];ctrlContent=a[i];if(ctrlContent!=null){ctrlContent.style.display="block";if(ctrlHeadline!=null&&ctrlHeadline.className.indexOf("exp")==-1)ctrlHeadline.className+="exp"}}b="False"}else{for(i=0;i<a.length;i++){ctrlHeadline=e[i];ctrlContent=a[i];if(ctrlContent!=null){ctrlContent.style.display="none";if(ctrlHeadline!=null)ctrlHeadline.className=ctrlHeadline.className.replace("exp","")}}b="True"}if(d)d.style.display="block";if(c)c.style.display="none"}if(typeof window.console!=="object"||typeof window.console.emulated==="undefined"){if(typeof window.console!=="object"||!(typeof window.console.log==="function"||typeof window.console.log==="object")){window.console={};window.console.log=window.console.debug=window.console.warn=window.console.trace=function(){};window.console.error=function(){for(var b="An error has occured. More information will be available in the console log.",a=0;a<arguments.length;++a){if(typeof arguments[a]!=="string")break;b+="\n"+arguments[a]}if(typeof Error!=="undefined")throw new Error(b);else throw b;}}else{if(typeof window.console.debug==="undefined")window.console.debug=function(){for(var b=["console.debug:"],a=0;a<arguments.length;a++)b.push(arguments[a]);window.console.log.apply(window.console,b)};if(typeof window.console.warn==="undefined")window.console.warn=function(){for(var b=["console.warn:"],a=0;a<arguments.length;a++)b.push(arguments[a]);window.console.log.apply(window.console,b)};if(typeof window.console.error==="undefined")window.console.error=function(){for(var b=["console.error"],a=0;a<arguments.length;a++)b.push(arguments[a]);window.console.log.apply(window.console,b)};if(typeof window.console.trace==="undefined")window.console.trace=function(){window.console.error.apply(window.console,["console.trace does not exist"])}}window.console.emulated=true}(function(a){if(!(a.History||false)){a.History={options:{debug:false},state:"",$window:null,$iframe:null,handlers:{generic:[],specific:{}},extractHash:function(b){return b.replace(/^[^#]*#/,"").replace(/^#+|#+$/,"")},getState:function(){var b=a.History;return b.state},setState:function(c){var b=a.History;c=b.extractHash(c);b.state=c;return b.state},getHash:function(){var b=a.History,c=b.extractHash(window.location.hash||location.hash);return c},setHash:function(b){var c=a.History;b=c.extractHash(b);if(typeof window.location.hash!=="undefined"){if(window.location.hash!==b)window.location.hash=b}else if(location.hash!==b)location.hash=b;return b},go:function(c){var b=a.History;c=b.extractHash(c);var e=b.getHash(),d=b.getState();if(c!==e)b.setHash(c);else{c!==d&&b.setState(c);b.trigger()}return true},hashchange:function(){var b=a.History,c=b.getHash();b.go(c);return true},bind:function(d,b){var c=a.History;if(b){if(typeof c.handlers.specific[d]==="undefined")c.handlers.specific[d]=[];c.handlers.specific[d].push(b)}else{b=d;c.handlers.generic.push(b)}return true},trigger:function(c){var f=a.History;if(typeof c==="undefined")c=f.getState();var b,g,e,d;if(typeof f.handlers.specific[c]!=="undefined"){d=f.handlers.specific[c];for(b=0,g=d.length;b<g;++b){e=d[b];e(c)}}d=f.handlers.generic;for(b=0,g=d.length;b<g;++b){e=d[b];e(c)}return true},construct:function(){var b=a.History;a(document).ready(function(){b.domReady()});return true},configure:function(c){var b=a.History;b.options=a.extend(b.options,c);return true},domReadied:false,domReady:function(){var b=a.History;if(b.domRedied)return;b.domRedied=true;b.$window=a(window);b.$window.bind("hashchange",this.hashchange);setTimeout(b.hashchangeLoader,200);return true},nativeSupport:function(c){c=c||a.browser;var h=c.version,g=parseInt(h,10),f=h.split(/[^0-9]/g),d=parseInt(f[0],10),e=parseInt(f[1],10),i=parseInt(f[2],10),b=false;if((c.msie||false)&&g>=8)b=true;else if((c.webkit||false)&&g>=528)b=true;else if(c.mozilla||false){if(d>1)b=true;else if(d===1)if(e>9)b=true;else if(e===9)if(i>=2)b=true}else if(c.opera||false)if(d>10)b=true;else if(d===10)if(e>=60)b=true;return b},hashchangeLoader:function(){var b=a.History,e=b.nativeSupport();if(!e){var d;if(a.browser.msie){b.$iframe=a('<iframe id="jquery-history-iframe" style="display: none;"></$iframe>').prependTo(document.body)[0];b.$iframe.contentWindow.document.open();b.$iframe.contentWindow.document.close();var c=false;d=function(){var e=b.getHash(),d=b.getState(),a=b.extractHash(b.$iframe.contentWindow.document.location.hash);if(d!==e){if(!c){b.$iframe.contentWindow.document.open();b.$iframe.contentWindow.document.close();b.$iframe.contentWindow.document.location.hash=e}c=false;b.$window.trigger("hashchange")}else if(d!==a){c=true;b.setHash(a)}}}else d=function(){var c=b.getHash(),a=b.getState();a!==c&&b.$window.trigger("hashchange")};setInterval(d,200)}else{var f=b.getHash();f&&b.$window.trigger("hashchange")}return true}};a.History.construct()}else window.console.warn("$.History has already been defined...")})(jQuery);(function(a){a.fn.example=function(d,e){var b=a.isFunction(d),c=a.extend({},e,{example:d});return this.each(function(){var e=a(this);if(a.metadata)var d=a.extend({},a.fn.example.defaults,e.metadata(),c);else var d=a.extend({},a.fn.example.defaults,c);if(!a.fn.example.boundClassNames[d.className]){a(window).unload(function(){a("."+d.className).val("")});a("form").submit(function(){a(this).find("."+d.className).val("")});a.fn.example.boundClassNames[d.className]=true}!e.attr("defaultValue")&&(b||e.val()==d.example)&&e.val("");if(e.val()==""&&this!=document.activeElement){e.addClass(d.className);e.val(b?d.example.call(this):d.example)}e.focus(function(){if(a(this).is("."+d.className)){a(this).val("");a(this).removeClass(d.className)}});e.change(function(){a(this).is("."+d.className)&&a(this).removeClass(d.className)});e.blur(function(){if(a(this).val()==""){a(this).addClass(d.className);a(this).val(b?d.example.call(this):d.example)}})})};a.fn.example.defaults={className:"example"};a.fn.example.boundClassNames=[]})(jQuery);var cache=jQuery.ajaxSettings.cache;jQuery.ajaxSettings.cache=true;jQuery.getScript("//connect.facebook.net/en_US/all.js",function(){FB.init({xfbml:true})});jQuery.ajaxSettings.cache=cache;$(document).ready(function(){var c=$("body#facebook").size()>0;if(!c){$.superfish&&$("ul.sf-menu").superfish({autoArrows:false});var b=$("#benefits").size()>0,a=b?$("#content").html():"";$("#panels .panel").hover(function(){$(this).addClass("pnHover")},function(){$(this).removeClass("pnHover")}).click(function(){if(b)a=$(".contentWrapper",this).html()});b&&$.History.bind(function(b){if(b.length>0){a=$("#lvBenefits_text_"+b).html();$("#content").html(a)}});$.example&&$("#queryText").example(function(){return $(this).attr("title")});$("ul.packs li a").each(function(a){$(this).addClass(a==0?"first":"").hover(function(){$(this).addClass("pkHover")},function(){$(this).removeClass("pkHover")}).wrapInner("<span />")});function d(){$('#packs-gallery li a:not([href^="javascript"])').each(function(){var a=$(this);a.attr("rel",a.attr("href")).attr("href","javascript:void(0);")})}$("#packs-gallery").carousel({btnNext:".next-slide",btnPrev:".prev-slide",start:0,speed:500,beforeStart:function(){Cufon.refresh()},afterEnd:function(a){d();var b=$("a",a);b.attr("href",b.attr("rel"));$("#summary").html($(".summary",a).html())}})}Cufon.replace("h1, #packs-gallery .link, #packs-list lh");$("#QLD").hover(function(){$("#mapContainer").css("backgroundPosition","0 -1911px")},function(){$("#mapContainer").css("backgroundPosition","0 0")});$("#NSW").hover(function(){$("#mapContainer").css("backgroundPosition","0 -637px")},function(){$("#mapContainer").css("backgroundPosition","0 0")});$("#VIC").hover(function(){$("#mapContainer").css("backgroundPosition","-691px -1274px")},function(){$("#mapContainer").css("backgroundPosition","0 0")});$("#TAS").hover(function(){$("#mapContainer").css("backgroundPosition","-691px -637px")},function(){$("#mapContainer").css("backgroundPosition","0 0")});$("#SA").hover(function(){$("#mapContainer").css("backgroundPosition","-691px 0")},function(){$("#mapContainer").css("backgroundPosition","0 0")});$("#NT").hover(function(){$("#mapContainer").css("backgroundPosition","0 -1274px")},function(){$("#mapContainer").css("backgroundPosition","0 0")});$("#WA").hover(function(){$("#mapContainer").css("backgroundPosition","-691px -1911px")},function(){$("#mapContainer").css("backgroundPosition","0 0")});$.browser.msie&&$updateColumns()});!$.browser.msie&&$(window).load($updateColumns);function $updateColumns(){var a=$(".categories .category"),b=0,e=$(".categories").width();a.each(function(){b+=$(this).outerWidth(true)});var d=(e-b)/a.length,c=d/2;a.each(function(){var a=$(this);a.css("left",c+"px");c+=a.outerWidth(true)+d})}
