/* This file changes the height of #left and #right so the background works */
(function ($) {
  $(document).ready(function(){
    changesize();
    $(window).resize(function() {
      changesize();
    });
  });
  function changesize(){
    var windowheight = $(window).height();
	  $("#right").css('min-height', windowheight);
  }
})(jQuery);;
/* This file adds HTML/CSS/actions to various buttons */
(function ($) {
  $(document).ready(function(){
	  $("#follow-button").html('Follow us').css('cursor', 'pointer');
	  $("#share-button").html('Share this page').css('cursor', 'pointer');
	  $("body:not(.page-node-43) #get-in-touch-button").html('Get in touch').css('cursor', 'pointer');
	  $("#newsletter-button").html('Sign up to our Newsletter').css('cursor', 'pointer');
	  $("#sitemap-button").html('Sitemap').css('cursor', 'pointer');
	  var wrapheight = $("#wrap").height();
	  $("#right").css('min-height', wrapheight);
	  //Only replace alt attribute and content from img element if IE based browser 
if ($.browser.msie) { 
       
        $('img, a').removeAttr('alt').removeAttr('title'); 
   
}
  });
})(jQuery);;
/*
 * 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}})());;
/*!
 * The following copyright notice may not be removed under any circumstances.
 * 
 * Copyright:
 * Copyright 1990-1993 Bitstream Inc.  All rights reserved. Russian Edition by
 * Sabina Ltd. © 1994. All Rights Reserved.
 */
Cufon.registerFont({"w":205,"face":{"font-family":"AvantGarde Medium","font-weight":400,"font-stretch":"normal","units-per-em":"360","panose-1":"2 11 6 2 2 2 2 2 2 4","ascent":"288","descent":"-72","x-height":"5","bbox":"-11 -291 342 85","underline-thickness":"25.1367","underline-position":"-18.8086","unicode-range":"U+0020-U+007E"},"glyphs":{" ":{"w":103},"!":{"d":"35,-63r0,-193r34,0r0,193r-34,0xm35,0r0,-41r34,0r0,41r-34,0","w":104},"\"":{"d":"92,-252r0,97r-24,0r0,-97r24,0xm40,-252r0,97r-24,0r0,-97r24,0","w":107},"#":{"d":"170,-151r-45,0r-17,47r46,0xm162,-256r-28,80r45,0r29,-80r29,0r-29,80r53,0r-9,25r-53,0r-16,46r56,0r-9,26r-56,0r-29,80r-29,0r29,-80r-46,0r-28,80r-29,0r28,-80r-55,0r10,-26r54,0r16,-46r-58,0r9,-25r59,0r28,-80r29,0","w":276},"$":{"d":"123,-148v71,15,62,139,-6,146r0,45r-31,0r0,-44v-37,-4,-62,-34,-62,-75r32,0v1,27,15,42,43,42v32,0,49,-34,35,-63v-27,-31,-103,-24,-103,-87v0,-38,22,-64,55,-70r0,-37r31,0r0,37v30,6,51,28,52,64r-34,0v-1,-20,-14,-33,-35,-33v-29,0,-44,34,-28,56v3,8,38,16,51,19"},"%":{"d":"77,-233v-19,0,-35,16,-35,35v0,18,17,35,35,35v19,0,35,-16,35,-35v0,-18,-17,-35,-35,-35xm77,-135v-37,0,-63,-26,-63,-63v0,-37,26,-63,63,-63v37,0,63,24,63,63v0,39,-25,63,-63,63xm214,-261r25,0r-137,266r-25,0xm238,-92v-19,0,-35,15,-35,34v0,19,16,35,35,35v18,0,34,-16,34,-35v0,-19,-15,-34,-34,-34xm238,5v-37,0,-63,-25,-63,-63v0,-37,25,-63,63,-63v37,0,63,26,63,63v0,39,-26,63,-63,63","w":315},"&":{"d":"103,-226v-22,-2,-34,27,-22,45v3,5,10,12,19,19v31,-8,42,-61,3,-64xm59,-72v-2,34,41,55,67,31v8,-7,16,-17,22,-31r-53,-50v-20,12,-35,24,-36,50xm163,-199v-1,30,-18,43,-40,57r39,37r25,-63r37,0r-35,87r60,54r-22,26r-52,-47v-16,29,-38,52,-77,53v-41,1,-76,-36,-75,-76v2,-37,21,-56,48,-74v-49,-27,-31,-114,33,-114v31,0,61,29,59,60","w":249},"'":{"d":"40,-252r0,97r-24,0r0,-97r24,0","w":55},"(":{"d":"58,-148v0,67,-18,162,33,181r0,42v-46,-20,-71,-46,-69,-109v2,-65,-11,-145,17,-186v11,-17,29,-31,52,-41r0,43v-26,13,-33,30,-33,70","w":100},")":{"d":"9,-261v44,18,69,49,69,107v0,65,10,148,-16,189v-11,17,-28,30,-53,40r0,-42v50,-20,33,-114,33,-181v0,-40,-8,-56,-33,-70r0,-43","w":100},"*":{"d":"90,-164r-31,44r-24,-16r34,-43r-50,-14r9,-28r48,17r0,-52r27,0r0,52r49,-17r9,28r-50,14r34,43r-24,16","w":180},"+":{"d":"162,-215r0,95r93,0r0,25r-93,0r0,95r-25,0r0,-95r-92,0r0,-25r92,0r0,-95r25,0","w":299},",":{"d":"34,21v10,-2,13,-9,12,-23r-12,0r0,-41r35,0v1,41,2,81,-35,86r0,-22","w":103},"-":{"d":"103,-80r-87,0r0,-33r87,0r0,33","w":119,"k":{"o":-7,"Y":28,"X":13,"W":20,"V":21,"T":20,"O":-13,"J":-20,"G":-13,"C":-7,"A":6}},".":{"d":"69,0r-35,0r0,-43r35,0r0,43","w":103},"\/":{"d":"16,33r-26,0r84,-294r26,0","w":100},"0":{"d":"103,5v-56,0,-89,-33,-88,-95r0,-76v-1,-63,32,-95,88,-95v54,0,87,33,87,94r0,78v2,62,-32,94,-87,94xm103,-225v-32,0,-49,15,-49,54r0,91v-2,36,18,48,48,50v66,5,47,-80,50,-141v2,-39,-17,-54,-49,-54"},"1":{"d":"125,0r-37,0r0,-226r-45,0r0,-30r82,0r0,256"},"2":{"d":"105,-261v55,0,101,63,71,115v-24,42,-74,75,-108,110r116,0r0,36r-162,0r0,-36r91,-87v24,-23,35,-42,35,-57v1,-25,-21,-46,-46,-46v-30,0,-46,21,-45,54r-35,0v-1,-53,32,-89,83,-89"},"3":{"d":"184,-81v7,88,-133,119,-160,37v-4,-10,-6,-21,-6,-34r35,0v0,25,20,48,46,48v28,0,50,-22,50,-49v0,-36,-26,-53,-65,-50r0,-35v26,3,47,-5,47,-31v0,-18,-13,-32,-29,-32v-18,0,-32,13,-32,32r-33,0v1,-41,27,-64,66,-66v57,-3,88,84,39,111v27,10,39,35,42,69"},"4":{"d":"164,0r-36,0r0,-45r-113,0r0,-32r113,-179r36,0r0,179r26,0r0,32r-26,0r0,45xm128,-77r0,-126r-76,126r76,0"},"5":{"d":"192,-86v0,92,-141,126,-172,42v-4,-10,-6,-22,-6,-34r36,0v3,27,23,46,51,47v30,1,54,-26,54,-56v0,-53,-76,-71,-98,-31r-32,-7r24,-131r119,0r0,36r-92,0r-13,60v51,-43,129,8,129,74"},"6":{"d":"102,5v-53,0,-88,-36,-88,-87v0,-51,67,-129,94,-174r41,0r-58,87v53,-18,104,31,101,82v-3,53,-34,92,-90,92xm103,-140v-30,0,-54,24,-54,52v0,30,23,57,53,57v31,0,53,-24,53,-55v0,-31,-22,-54,-52,-54"},"7":{"d":"85,0r-39,0r97,-221r-108,0r0,-35r144,0r0,39"},"8":{"d":"103,-123v-27,0,-45,19,-45,46v0,26,19,47,44,47v26,0,45,-22,45,-47v0,-27,-17,-46,-44,-46xm103,-227v-18,0,-32,15,-32,34v0,22,12,34,32,35v20,0,32,-14,32,-35v1,-18,-14,-35,-32,-34xm102,5v-76,7,-109,-118,-41,-147v-50,-29,-21,-125,41,-119v63,-7,94,89,42,119v68,26,37,157,-42,147"},"9":{"d":"103,-116v30,0,54,-24,54,-52v0,-30,-23,-57,-53,-57v-32,0,-54,22,-54,55v0,31,23,54,53,54xm103,-261v54,0,89,35,89,87v0,52,-67,129,-94,174r-42,0r58,-87v-51,20,-102,-30,-100,-81v3,-55,36,-93,89,-93"},":":{"d":"70,-142r-36,0r0,-43r36,0r0,43xm70,0r-36,0r0,-43r36,0r0,43","w":104},";":{"d":"70,-142r-35,0r0,-43r35,0r0,43xm35,21v10,-2,12,-11,12,-23r-12,0r0,-41r35,0v1,41,2,81,-35,86r0,-22","w":104},"<":{"d":"253,-177r-170,70r170,69r0,27r-207,-85r0,-23r207,-85r0,27","w":299},"=":{"d":"255,-85r0,25r-210,0r0,-25r210,0xm255,-155r0,25r-210,0r0,-25r210,0","w":299},">":{"d":"253,-119r0,23r-207,85r0,-27r171,-69r-171,-70r0,-27","w":299},"?":{"d":"61,0r0,-41r35,0r0,41r-35,0xm80,-261v43,-1,77,33,77,75v0,43,-61,70,-60,119r-36,0v-4,-54,54,-77,59,-118v3,-23,-18,-43,-42,-42v-24,1,-40,19,-40,45r-34,0v1,-46,31,-78,76,-79","w":174},"@":{"d":"44,-91v-8,126,165,150,246,89r10,14v-30,23,-69,40,-117,40v-97,0,-164,-49,-164,-144v0,-105,73,-166,177,-166v82,0,146,41,146,121v0,67,-34,111,-99,116v-24,1,-37,-8,-36,-31v-19,48,-117,40,-108,-27v-10,-68,89,-135,127,-71r10,-20r23,0r-27,111v0,11,5,18,17,17v43,-7,66,-45,67,-92v2,-63,-54,-103,-121,-102v-94,2,-145,58,-151,145xm127,-78v0,38,40,48,64,26v18,-17,21,-47,29,-73v-3,-18,-14,-33,-35,-32v-35,0,-58,40,-58,79","w":360},"A":{"d":"143,-111r-36,-97r-37,97r73,0xm57,-75r-29,75r-39,0r100,-256r36,0r100,256r-41,0r-28,-75r-99,0","w":216,"k":{"w":6,"v":6,"Y":13,"W":6,"V":11,"T":20,"Q":6,"O":6,"G":6,"C":6,"A":-13,";":-7,":":-7,"-":8}},"B":{"d":"124,-186v0,-33,-30,-37,-65,-35r0,72v38,1,65,-2,65,-37xm138,-74v0,-40,-35,-47,-79,-44r0,83v41,1,79,2,79,-39xm174,-78v2,77,-69,83,-152,78r0,-256v72,-4,141,1,139,70v0,24,-11,38,-27,48v23,7,40,30,40,60","w":185,"k":{"Y":6,"V":6,"-":-10}},"C":{"d":"141,-32v32,1,55,-13,69,-32r45,0v-20,40,-58,69,-114,69v-79,0,-128,-53,-130,-135v-2,-102,109,-163,199,-112v20,12,35,29,45,52r-43,0v-15,-20,-39,-34,-71,-34v-56,0,-92,41,-92,95v0,58,35,94,92,97","w":270,"k":{"-":-8}},"D":{"d":"194,-127v0,-73,-56,-102,-137,-94r0,187v81,8,137,-20,137,-93xm232,-127v-4,81,-49,129,-140,127r-71,0r0,-256r82,0v75,-1,133,54,129,129","w":243,"k":{"Y":13,"V":6,"A":6,"-":-11}},"E":{"d":"155,0r-133,0r0,-256r133,0r0,34r-96,0r0,77r96,0r0,33r-96,0r0,77r96,0r0,35","w":178},"F":{"d":"22,0r0,-256r126,0r0,34r-90,0r0,77r90,0r0,33r-90,0r0,112r-36,0","w":171,"k":{"y":10,"u":13,"r":13,"o":10,"i":8,"e":10,"a":10,"S":6,"A":20,";":15,":":15,".":71,"-":11,",":71}},"G":{"d":"49,-129v-4,76,78,121,143,82v15,-10,27,-26,37,-46r-116,0r0,-36r158,0v-1,80,-54,131,-130,134v-118,5,-166,-151,-90,-229v34,-35,114,-50,161,-19v19,12,34,30,44,52r-46,0v-14,-19,-37,-33,-69,-33v-56,2,-89,41,-92,95","w":283,"k":{"Y":6,"W":6,"T":6,"-":-8}},"H":{"d":"59,0r-37,0r0,-256r37,0r0,109r105,0r0,-109r37,0r0,256r-37,0r0,-111r-105,0r0,111","w":223,"k":{".":6,",":6}},"I":{"d":"59,0r-37,0r0,-256r37,0r0,256","w":81},"J":{"d":"67,-30v35,-2,35,-20,35,-63r0,-163r37,0v-9,103,36,261,-72,261v-39,-1,-66,-22,-66,-63r36,0v3,16,11,28,30,28","w":159},"K":{"d":"61,-127r96,-129r45,0r-99,127r97,129r-47,0xm59,0r-37,0r0,-256r37,0r0,256","w":196,"k":{"y":13,"u":10,"o":10,"e":10,"a":10,"Y":6,"W":6,"U":6,"T":6,"O":13,"C":13,"-":18}},"L":{"d":"143,0r-121,0r0,-256r37,0r0,221r84,0r0,35","w":150,"k":{"y":20,"u":6,"o":6,"e":6,"a":6,"Y":26,"W":20,"V":21,"U":6,"T":20,"O":13,"A":-7,"-":6}},"M":{"d":"58,0r-36,0r0,-256r55,0r75,198r74,-198r54,0r0,256r-35,0r3,-222r-83,222r-27,0r-83,-222","w":303},"N":{"d":"59,0r-37,0r0,-256r38,0r126,194r-2,-194r37,0r0,256r-36,0r-128,-200","w":243},"O":{"d":"141,-224v-56,0,-92,41,-92,95v0,58,35,94,92,97v52,2,95,-45,93,-98v-2,-56,-38,-94,-93,-94xm141,5v-118,8,-170,-154,-90,-229v23,-21,49,-37,90,-37v80,0,131,53,131,131v0,82,-52,130,-131,135","w":283,"k":{"Y":10,"X":6,"V":6,"A":6,".":15,"-":-10,",":15}},"P":{"d":"140,-179v0,-41,-38,-45,-81,-43r0,85v43,1,81,0,81,-42xm178,-181v0,60,-51,84,-119,78r0,103r-37,0r0,-256r82,1v47,1,74,30,74,74","w":185,"k":{"r":6,"o":13,"n":6,"e":11,"a":13,"W":-7,"A":20,";":10,":":10,".":86,"-":28,",":86}},"Q":{"d":"53,-101v57,-24,121,6,154,41v17,-18,28,-37,27,-70v-2,-56,-38,-94,-93,-94v-64,0,-104,58,-88,123xm66,-73v19,31,70,53,113,33v-26,-24,-68,-45,-113,-33xm275,2v-26,0,-44,-8,-63,-18v-18,12,-42,22,-71,21v-81,-4,-130,-55,-130,-135v0,-77,51,-131,130,-131v81,0,128,54,131,135v1,39,-12,64,-32,86v11,4,21,6,35,6r0,36","w":283},"R":{"d":"155,-173v1,-47,-45,-50,-96,-48r0,98v51,1,95,-5,96,-50xm191,-173v-1,41,-29,74,-73,75r73,98r-47,0r-85,-119r0,119r-37,0r0,-256v87,-4,172,-2,169,83","w":203,"k":{"u":6,"o":6,"e":6,"a":6,"Y":6,";":6,":":6,".":6,"-":10,",":6}},"S":{"d":"98,-152v86,12,78,157,-15,157v-44,0,-76,-34,-74,-79r33,0v0,26,16,42,40,44v36,3,54,-44,34,-71v-31,-23,-100,-26,-100,-86v0,-77,107,-100,133,-34v4,8,5,18,5,28r-34,0v-1,-20,-16,-33,-34,-34v-28,-2,-45,36,-28,58v4,7,24,15,40,17","w":171},"T":{"d":"88,0r-37,0r0,-221r-48,0r0,-35r133,0r0,35r-48,0r0,221","w":138,"k":{"y":20,"w":20,"u":20,"s":15,"r":20,"o":20,"e":20,"c":20,"a":20,"C":13,"A":20,";":16,":":16,".":40,"-":20,",":40}},"U":{"d":"103,5v-59,0,-83,-32,-83,-99r0,-162r37,0r0,163v0,43,8,62,46,62v36,0,43,-21,43,-62r0,-163r37,0r-1,185v-3,49,-31,76,-79,76","w":203},"V":{"d":"113,0r-22,0r-99,-256r40,0r70,191r70,-191r39,0","w":204,"k":{"y":10,"u":20,"o":20,"e":20,"a":20,"O":6,"A":10,";":18,":":18,".":53,"-":29,",":53}},"W":{"d":"-5,-256r37,0r56,197r50,-197r28,0r49,197r56,-197r37,0r-77,256r-33,0r-46,-191r-47,191r-33,0","w":303,"k":{"o":10,"i":-7,"e":10,"a":10,"A":6,";":15,":":15,".":38,"-":21,",":38}},"X":{"d":"105,-100r-63,100r-43,0r85,-129r-83,-127r43,0r61,99r61,-99r44,0r-83,127r85,129r-44,0","w":210,"k":{"e":10,"O":6,"C":6,"-":18}},"Y":{"d":"107,-92r0,92r-37,0r0,-94r-79,-162r42,0r56,123r56,-123r41,0","w":177,"k":{"u":20,"o":20,"i":-7,"e":20,"a":20,"O":8,"C":6,"A":15,";":18,":":18,".":48,"-":29,",":48}},"Z":{"d":"164,0r-157,0r0,-36r112,-184r-105,0r0,-36r148,0r0,32r-116,189r118,0r0,35","w":171,"k":{"-":6}},"[":{"d":"90,44r0,29r-68,0r0,-329r68,0r0,28r-34,0r0,272r34,0","w":100},"\\":{"d":"84,33r-84,-294r26,0r84,294r-26,0","w":100},"]":{"d":"78,73r-68,0r0,-29r34,0r0,-272r-34,0r0,-28r68,0r0,329","w":100},"^":{"d":"196,-256r90,98r-32,0r-74,-74r-75,74r-31,0r89,-98r33,0","w":360},"_":{"d":"180,60r0,25r-180,0r0,-25r180,0","w":180},"`":{"d":"115,-218r-21,0r-50,-61r35,0","w":180},"a":{"d":"113,-165v-35,0,-66,30,-66,67v0,39,30,69,67,69v33,0,65,-32,65,-66v0,-36,-31,-70,-66,-70xm110,-198v30,0,51,11,67,28r0,-23r35,0r0,193r-35,0r0,-24v-54,61,-173,12,-166,-74v5,-60,37,-100,99,-100","w":231},"b":{"d":"118,-165v-36,1,-65,30,-65,70v-1,34,32,66,65,66v37,0,67,-31,67,-69v0,-35,-32,-68,-67,-67xm221,-98v7,86,-111,136,-166,74r0,24r-35,0r0,-256r34,0r0,86v17,-16,38,-28,68,-28v61,2,94,41,99,100","w":231},"c":{"d":"110,-29v27,-1,46,-16,56,-37r38,0v-14,42,-43,71,-94,71v-63,0,-97,-41,-100,-102v-4,-81,91,-129,158,-84v16,12,28,30,36,52r-38,0v-11,-21,-29,-35,-58,-36v-34,0,-62,32,-62,68v0,37,28,69,64,68","w":218},"d":{"d":"113,-165v-35,0,-66,30,-66,67v0,39,30,69,67,69v33,0,65,-32,65,-66v0,-36,-31,-70,-66,-70xm110,-198v30,0,51,11,67,28r0,-86r35,0r0,256r-35,0r0,-24v-54,61,-173,12,-166,-74v5,-60,37,-100,99,-100","w":231},"e":{"d":"171,-115v-5,-43,-63,-66,-100,-37v-11,9,-20,21,-24,37r124,0xm109,-199v63,0,102,44,100,115r-163,0v3,56,96,73,118,23r39,0v-15,38,-45,66,-93,66v-62,0,-100,-40,-100,-102v0,-60,39,-102,99,-102","w":218},"f":{"d":"95,-227v-24,-1,-33,10,-32,34r32,0r0,30r-30,0r0,163r-35,0r0,-163r-23,0r0,-30r22,0v-1,-45,21,-66,66,-66r0,32","w":100,"k":{"y":-7,"w":-7,"t":-7,".":20,",":20}},"g":{"d":"212,-32v16,116,-156,147,-189,47r37,0v26,49,128,29,117,-39v-54,61,-173,12,-166,-74v5,-60,37,-100,99,-100v30,0,51,11,67,28r0,-23r35,0r0,161xm113,-165v-35,0,-66,30,-66,67v0,39,30,69,67,69v33,0,65,-32,65,-66v0,-36,-31,-70,-66,-70","w":231},"h":{"d":"104,-163v-69,-1,-45,96,-49,163r-34,0r0,-256r34,0r0,85v11,-16,29,-25,54,-26v48,0,74,35,74,86r0,111r-35,0v-5,-63,21,-162,-44,-163","w":203},"i":{"d":"55,-216r-34,0r0,-40r34,0r0,40xm21,0r0,-193r34,0r0,193r-34,0","w":75},"j":{"d":"-1,28v25,1,24,-13,24,-38r0,-183r34,0r0,195v2,45,-16,64,-58,60r0,-34xm57,-216r-34,0r0,-40r34,0r0,40","w":79},"k":{"d":"21,0r0,-256r34,0r0,152r69,-89r41,0r-71,91r84,102r-45,0r-78,-98r0,98r-34,0","w":171,"k":{"o":6,"e":6,"a":6}},"l":{"d":"21,0r0,-256r34,0r0,256r-34,0","w":75},"m":{"d":"216,-165v-66,0,-37,103,-43,165r-33,0v-5,-62,21,-165,-42,-165v-65,0,-38,102,-44,165r-33,0r0,-193r31,0r0,22v21,-36,95,-34,108,8v11,-20,30,-34,60,-34v44,0,72,33,72,79r0,118r-35,0v-6,-62,23,-165,-41,-165","w":312},"n":{"d":"105,-163v-69,0,-46,97,-50,163r-34,0r0,-193r33,0r0,22v42,-53,133,-19,133,61r0,110r-35,0v-5,-64,21,-163,-47,-163","w":206,"k":{".":6,",":6}},"o":{"d":"109,-165v-36,0,-64,32,-64,68v0,37,29,68,65,68v36,0,63,-32,63,-68v0,-38,-27,-68,-64,-68xm110,5v-63,0,-101,-40,-101,-102v0,-61,40,-103,99,-103v60,0,101,42,101,101v0,61,-38,104,-99,104","w":218,"k":{".":6,"-":-7,",":6}},"p":{"d":"118,-165v-34,-1,-65,33,-65,67v0,35,30,69,65,69v36,0,67,-30,67,-66v0,-38,-30,-70,-67,-70xm221,-96v0,90,-111,131,-167,73r0,86r-34,0r0,-256r35,0r0,23v54,-60,166,-12,166,74","w":231},"q":{"d":"179,-98v1,-34,-31,-68,-65,-67v-38,0,-67,31,-67,70v0,36,31,67,66,66v36,-1,66,-29,66,-69xm11,-96v-7,-86,112,-136,166,-74r0,-23r35,0r0,256r-35,0r0,-86v-17,17,-36,28,-67,28v-62,0,-94,-41,-99,-101","w":231},"r":{"d":"99,-160v-66,0,-37,99,-43,160r-35,0r0,-193r33,0r0,22v10,-15,23,-25,45,-26r0,37","w":104,"k":{"z":-7,"y":-13,"x":-7,"w":-7,"v":-7,"t":-7,"o":-13,"f":-13,".":36,"-":13,",":36}},"s":{"d":"90,-113v65,18,45,122,-21,118v-38,-2,-61,-28,-62,-68r33,0v-1,19,12,36,30,36v23,0,38,-28,22,-44v-25,-25,-76,-22,-76,-72v0,-59,90,-78,108,-24v3,7,4,14,4,23r-34,0v0,-15,-9,-23,-23,-23v-12,0,-22,10,-22,22v-3,14,23,27,41,32","w":140},"t":{"d":"32,0r0,-162r-27,0r0,-31r27,0r0,-63r35,0r0,63r27,0r0,31r-27,0r0,162r-35,0","w":98},"u":{"d":"99,-30v68,0,44,-96,48,-163r35,0r0,193r-34,0r0,-22v-12,16,-27,26,-52,26v-92,4,-76,-107,-76,-197r34,0v5,63,-22,163,45,163","w":203},"v":{"d":"100,0r-26,0r-73,-193r37,0r51,141r52,-141r37,0","w":178,"k":{".":34,",":34}},"w":{"d":"128,-131r-39,131r-20,0r-67,-193r37,0r40,127r39,-127r21,0r39,127r40,-127r37,0r-67,193r-20,0","w":256,"k":{".":26,",":26}},"x":{"d":"126,0r-44,-73r-47,73r-39,0r66,-100r-58,-93r39,0r40,66r41,-66r41,0r-62,91r62,102r-39,0","w":164},"y":{"d":"1,-193r37,0r53,144r56,-144r38,0r-104,256r-37,0r27,-68","w":184,"k":{".":31,"-":6,",":31}},"z":{"d":"137,0r-133,0r0,-28r93,-134r-82,0r0,-31r117,0r0,35r-87,125r92,0r0,33","w":145},"{":{"d":"79,-197v-3,-54,23,-63,73,-63r0,27v-84,-17,-4,132,-78,140v42,5,36,52,36,100v0,35,9,40,42,40r0,26v-52,1,-75,-9,-73,-63v2,-48,5,-101,-49,-90r0,-27v52,10,51,-39,49,-90","w":180},"|":{"d":"103,-275r0,360r-26,0r0,-360r26,0","w":180},"}":{"d":"28,-260v49,0,76,9,73,63v-3,48,-4,101,50,90r0,27v-52,-10,-52,39,-50,90v3,54,-21,64,-73,63r0,-26v85,17,5,-132,78,-140v-41,-6,-35,-52,-35,-100v0,-34,-10,-40,-43,-40r0,-27","w":180},"~":{"d":"99,-132v60,0,124,46,170,-3r0,27v-30,26,-80,30,-122,12v-51,-22,-81,-8,-116,17r0,-28v20,-13,40,-25,68,-25","w":299},"\u00a0":{"w":103}}});
;
/*

Quicksand 1.2.2

Reorder and filter items with a nice shuffling animation.

Copyright (c) 2010 Jacek Galanciak (razorjack.net) and agilope.com
Big thanks for Piotr Petrus (riddle.pl) for deep code review and wonderful docs & demos.

Dual licensed under the MIT and GPL version 2 licenses.
http://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
http://github.com/jquery/jquery/blob/master/GPL-LICENSE.txt

Project site: http://razorjack.net/quicksand
Github site: http://github.com/razorjack/quicksand

*/

(function ($) {
    $.fn.quicksand = function (collection, customOptions) {     
        var options = {
            duration: 750,
            easing: 'swing',
            attribute: 'data-id', // attribute to recognize same items within source and dest
            adjustHeight: 'auto', // 'dynamic' animates height during shuffling (slow), 'auto' adjusts it before or after the animation, false leaves height constant
            useScaling: true, // disable it if you're not using scaling effect or want to improve performance
            enhancement: function(c) {}, // Visual enhacement (eg. font replacement) function for cloned elements
            selector: '> *',
            dx: 0,
            dy: 0
        };
        $.extend(options, customOptions);
        
        if ($.browser.msie || (typeof($.fn.scale) == 'undefined')) {
            // Got IE and want scaling effect? Kiss my ass.
            options.useScaling = false;
        }
        
        var callbackFunction;
        if (typeof(arguments[1]) == 'function') {
            var callbackFunction = arguments[1];
        } else if (typeof(arguments[2] == 'function')) {
            var callbackFunction = arguments[2];
        }
    
        
        return this.each(function (i) {
            var val;
            var animationQueue = []; // used to store all the animation params before starting the animation; solves initial animation slowdowns
            var $collection = $(collection).clone(); // destination (target) collection
            var $sourceParent = $(this); // source, the visible container of source collection
            var sourceHeight = $(this).css('height'); // used to keep height and document flow during the animation
            
            var destHeight;
            var adjustHeightOnCallback = false;
            
            var offset = $($sourceParent).offset(); // offset of visible container, used in animation calculations
            var offsets = []; // coordinates of every source collection item            
            
            var $source = $(this).find(options.selector); // source collection items
            
            // Replace the collection and quit if IE6
            if ($.browser.msie && $.browser.version.substr(0,1)<7) {
                $sourceParent.html('').append($collection);
                return;
            }

            // Gets called when any animation is finished
            var postCallbackPerformed = 0; // prevents the function from being called more than one time
            var postCallback = function () {
                
                if (!postCallbackPerformed) {
                    postCallbackPerformed = 1;
                    
                    // hack: 
                    // used to be: $sourceParent.html($dest.html()); // put target HTML into visible source container
                    // but new webkit builds cause flickering when replacing the collections
                    $toDelete = $sourceParent.find('> *');
                    $sourceParent.prepend($dest.find('> *'));
                    $toDelete.remove();
                         
                    if (adjustHeightOnCallback) {
                        $sourceParent.css('height', destHeight);
                    }
                    options.enhancement($sourceParent); // Perform custom visual enhancements on a newly replaced collection
                    if (typeof callbackFunction == 'function') {
                        callbackFunction.call(this);
                    }                    
                }
            };
            
            // Position: relative situations
            var $correctionParent = $sourceParent.offsetParent();
            var correctionOffset = $correctionParent.offset();
            if ($correctionParent.css('position') == 'relative') {
                if ($correctionParent.get(0).nodeName.toLowerCase() == 'body') {

                } else {
                    correctionOffset.top += (parseFloat($correctionParent.css('border-top-width')) || 0);
                    correctionOffset.left +=( parseFloat($correctionParent.css('border-left-width')) || 0);
                }
            } else {
                correctionOffset.top -= (parseFloat($correctionParent.css('border-top-width')) || 0);
                correctionOffset.left -= (parseFloat($correctionParent.css('border-left-width')) || 0);
                correctionOffset.top -= (parseFloat($correctionParent.css('margin-top')) || 0);
                correctionOffset.left -= (parseFloat($correctionParent.css('margin-left')) || 0);
            }
            
            // perform custom corrections from options (use when Quicksand fails to detect proper correction)
            if (isNaN(correctionOffset.left)) {
                correctionOffset.left = 0;
            }
            if (isNaN(correctionOffset.top)) {
                correctionOffset.top = 0;
            }
            
            correctionOffset.left -= options.dx;
            correctionOffset.top -= options.dy;

            // keeps nodes after source container, holding their position
            $sourceParent.css('height', $(this).height());
            
            // get positions of source collections
            $source.each(function (i) {
                offsets[i] = $(this).offset();
            });
            
            // stops previous animations on source container
            $(this).stop();
            var dx = 0; var dy = 0;
            $source.each(function (i) {
                $(this).stop(); // stop animation of collection items
                var rawObj = $(this).get(0);
                if (rawObj.style.position == 'absolute') {
                    dx = -options.dx;
                    dy = -options.dy;
                } else {
                    dx = options.dx;
                    dy = options.dy;                    
                }

                rawObj.style.position = 'absolute';
                rawObj.style.margin = '0';

                rawObj.style.top = (offsets[i].top - parseFloat(rawObj.style.marginTop) - correctionOffset.top + dy) + 'px';
                rawObj.style.left = (offsets[i].left - parseFloat(rawObj.style.marginLeft) - correctionOffset.left + dx) + 'px';
            });
                    
            // create temporary container with destination collection
            var $dest = $($sourceParent).clone();
            var rawDest = $dest.get(0);
            rawDest.innerHTML = '';
            rawDest.setAttribute('id', '');
            rawDest.style.height = 'auto';
            rawDest.style.width = $sourceParent.width() + 'px';
            $dest.append($collection);      
            // insert node into HTML
            // Note that the node is under visible source container in the exactly same position
            // The browser render all the items without showing them (opacity: 0.0)
            // No offset calculations are needed, the browser just extracts position from underlayered destination items
            // and sets animation to destination positions.
            $dest.insertBefore($sourceParent);
            $dest.css('opacity', 0.0);
            rawDest.style.zIndex = -1;
            
            rawDest.style.margin = '0';
            rawDest.style.position = 'absolute';
            rawDest.style.top = offset.top - correctionOffset.top + 'px';
            rawDest.style.left = offset.left - correctionOffset.left + 'px';
            
            
    
            

            if (options.adjustHeight === 'dynamic') {
                // If destination container has different height than source container
                // the height can be animated, adjusting it to destination height
                $sourceParent.animate({height: $dest.height()}, options.duration, options.easing);
            } else if (options.adjustHeight === 'auto') {
                destHeight = $dest.height();
                if (parseFloat(sourceHeight) < parseFloat(destHeight)) {
                    // Adjust the height now so that the items don't move out of the container
                    $sourceParent.css('height', destHeight);
                } else {
                    //  Adjust later, on callback
                    adjustHeightOnCallback = true;
                }
            }
                
            // Now it's time to do shuffling animation
            // First of all, we need to identify same elements within source and destination collections    
            $source.each(function (i) {
                var destElement = [];
                if (typeof(options.attribute) == 'function') {
                    
                    val = options.attribute($(this));
                    $collection.each(function() {
                        if (options.attribute(this) == val) {
                            destElement = $(this);
                            return false;
                        }
                    });
                } else {
                    destElement = $collection.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']');
                }
                if (destElement.length) {
                    // The item is both in source and destination collections
                    // It it's under different position, let's move it
                    if (!options.useScaling) {
                        animationQueue.push(
                                            {
                                                element: $(this), 
                                                animation: 
                                                    {top: destElement.offset().top - correctionOffset.top, 
                                                     left: destElement.offset().left - correctionOffset.left, 
                                                     opacity: 1.0
                                                    }
                                            });

                    } else {
                        animationQueue.push({
                                            element: $(this), 
                                            animation: {top: destElement.offset().top - correctionOffset.top, 
                                                        left: destElement.offset().left - correctionOffset.left, 
                                                        opacity: 1.0, 
                                                        scale: '1.0'
                                                       }
                                            });

                    }
                } else {
                    // The item from source collection is not present in destination collections
                    // Let's remove it
                    if (!options.useScaling) {
                        animationQueue.push({element: $(this), 
                                             animation: {opacity: '0.0'}});
                    } else {
                        animationQueue.push({element: $(this), animation: {opacity: '0.0', 
                                         scale: '0.0'}});
                    }
                }
            });
            
            $collection.each(function (i) {
                // Grab all items from target collection not present in visible source collection
                
                var sourceElement = [];
                var destElement = [];
                if (typeof(options.attribute) == 'function') {
                    val = options.attribute($(this));
                    $source.each(function() {
                        if (options.attribute(this) == val) {
                            sourceElement = $(this);
                            return false;
                        }
                    });                 

                    $collection.each(function() {
                        if (options.attribute(this) == val) {
                            destElement = $(this);
                            return false;
                        }
                    });
                } else {
                    sourceElement = $source.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']');
                    destElement = $collection.filter('[' + options.attribute + '=' + $(this).attr(options.attribute) + ']');
                }
                
                var animationOptions;
                if (sourceElement.length === 0) {
                    // No such element in source collection...
                    if (!options.useScaling) {
                        animationOptions = {
                            opacity: '1.0'
                        };
                    } else {
                        animationOptions = {
                            opacity: '1.0',
                            scale: '1.0'
                        };
                    }
                    // Let's create it
                    d = destElement.clone();
                    var rawDestElement = d.get(0);
                    rawDestElement.style.position = 'absolute';
                    rawDestElement.style.margin = '0';
                    rawDestElement.style.top = destElement.offset().top - correctionOffset.top + 'px';
                    rawDestElement.style.left = destElement.offset().left - correctionOffset.left + 'px';
                    d.css('opacity', 0.0); // IE
                    if (options.useScaling) {
                        d.css('transform', 'scale(0.0)');
                    }
                    d.appendTo($sourceParent);
                    
                    animationQueue.push({element: $(d), 
                                         animation: animationOptions});
                }
            });
            
            $dest.remove();
            options.enhancement($sourceParent); // Perform custom visual enhancements during the animation
            for (i = 0; i < animationQueue.length; i++) {
                animationQueue[i].element.animate(animationQueue[i].animation, options.duration, options.easing, postCallback);
            }
        });
    };
})(jQuery);;
/* This file replaces text with Cufon */
(function ($) {
  $(document).ready(function(){
	  Cufon.replace('h1, h2, h3, h4, h5, h6, #content th, #block-menu-block-1 .menu-block-wrapper>ul>li>a, .views-field-field-ht, .view-homepage-slides .views-field-php, #sign-up-link, #investor-asx, #investor-ckl, #investor-price, #investor-change, .view-homepage-news .views-field-title, .db-block .views-field-title, .brand-hero-title a, .field-name-field-sbt, .field-name-field-jt, .field-name-field-rq .field-label, .field-name-field-cssbt, .view-careers-page .career-title, .jcarousel-list .career-title, .jcarousel-list .profile-title', { fontFamily: 'AvantGarde Medium', hover: true });
  });
})(jQuery);;
/*
	AnythingSlider v1.5.7.3

	By Chris Coyier: http://css-tricks.com
	with major improvements by Doug Neiner: http://pixelgraphics.us/
	based on work by Remy Sharp: http://jqueryfordesigners.com/
	crazy mods by Rob Garrison (aka Mottie): https://github.com/ProLoser/AnythingSlider

	To use the navigationFormatter function, you must have a function that
	accepts two paramaters, and returns a string of HTML text.

	index = integer index (1 based);
	panel = jQuery wrapped LI item this tab references
	@return = Must return a string of HTML/Text

	navigationFormatter: function(index, panel){
		return "Panel #" + index; // This would have each tab with the text 'Panel #X' where X = index
	}
*/

(function($) {

	$.anythingSlider = function(el, options) {

		// To avoid scope issues, use 'base' instead of 'this'
		// to reference this class from internal events and functions.
		var base = this;

		// Wraps the ul in the necessary divs and then gives Access to jQuery element
		base.$el = $(el).addClass('anythingBase').wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');

		// Add a reverse reference to the DOM object
		base.$el.data("AnythingSlider", base);

		base.init = function(){

			base.options = $.extend({}, $.anythingSlider.defaults, options);

			if ($.isFunction(base.options.onBeforeInitialize)) { base.$el.bind('before_initialize', base.options.onBeforeInitialize); }
			base.$el.trigger('before_initialize', base);

			// Cache existing DOM elements for later
			// base.$el = original ul
			// for wrap - get parent() then closest in case the ul has "anythingSlider" class
			base.$wrapper = base.$el.parent().closest('div.anythingSlider').addClass('anythingSlider-' + base.options.theme);
			base.$window = base.$el.closest('div.anythingWindow');
			base.$controls = $('<div class="anythingControls"></div>').appendTo( (base.options.appendControlsTo !== null && $(base.options.appendControlsTo).length) ? $(base.options.appendControlsTo) : base.$wrapper); // change so this works in jQuery 1.3.2
			base.win = window;
			base.$win = $(base.win);

			base.$nav = $('<ul class="thumbNav" />').appendTo(base.$controls);

			// Set up a few defaults & get details
			base.timer   = null;  // slideshow timer (setInterval) container
			base.flag    = false; // event flag to prevent multiple calls (used in control click/focusin)
			base.playing = false; // slideshow state
			base.hovered = false; // actively hovering over the slider
			base.panelSize = [];  // will contain dimensions and left position of each panel
			base.currentPage = base.options.startPanel;
			base.adjustLimit = (base.options.infiniteSlides) ? 0 : 1; // adjust page limits for infinite or limited modes
			if (base.options.playRtl) { base.$wrapper.addClass('rtl'); }

			// save some options
			base.original = [ base.options.autoPlay, base.options.buildNavigation, base.options.buildArrows];
			base.updateSlider();

			base.$currentPage = base.$items.eq(base.currentPage);
			base.$lastPage = base.$currentPage;

			// Get index (run time) of this slider on the page
			base.runTimes = $('div.anythingSlider').index(base.$wrapper) + 1;
			base.regex = new RegExp('panel' + base.runTimes + '-(\\d+)', 'i'); // hash tag regex

			// Make sure easing function exists.
			if (!$.isFunction($.easing[base.options.easing])) { base.options.easing = "swing"; }

			// Add theme stylesheet, if it isn't already loaded
			if (base.options.theme !== 'default' && !$('link[href*=' + base.options.theme + ']').length){
				$('body').append('<link rel="stylesheet" href="' + base.options.themeDirectory.replace(/\{themeName\}/g, base.options.theme) + '" type="text/css" />');
			}

			// If pauseOnHover then add hover effects
			if (base.options.pauseOnHover) {
				base.$wrapper.hover(function() {
					if (base.playing) {
						base.$el.trigger('slideshow_paused', base);
						base.clearTimer(true);
					}
				}, function() {
					if (base.playing) {
						base.$el.trigger('slideshow_unpaused', base);
						base.startStop(base.playing, true);
					}
				});
			}

			// If a hash can not be used to trigger the plugin, then go to start panel
			var startPanel = (base.options.hashTags) ? base.gotoHash() || base.options.startPanel : base.options.startPanel;
			base.setCurrentPage(startPanel, false); // added to trigger events for FX code

			// Hide/Show navigation & play/stop controls
			base.slideControls(false);
			base.$wrapper.bind('mouseenter mouseleave', function(e){
				base.hovered = (e.type === "mouseenter") ? true : false;
				base.slideControls( base.hovered, false );
			});

			// Add keyboard navigation
			if (base.options.enableKeyboard) {
				$(document).keyup(function(e){
					if (base.$wrapper.is('.activeSlider')) {
						switch (e.which) {
							case 39: // right arrow
								base.goForward();
								break;
							case 37: //left arrow
								base.goBack();
								break;
						}
					}
				});
			}

			// Binds events
			var triggers = "slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" ");
			$.each("onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "), function(i,o){
				if ($.isFunction(base.options[o])){
					base.$el.bind(triggers[i], base.options[o]);
				}
			});
			if ($.isFunction(base.options.onSlideComplete)){
				// Added setTimeout (zero time) to ensure animation is complete... see this bug report: http://bugs.jquery.com/ticket/7157
				base.$el.bind('slide_complete', function(){
					setTimeout(function(){ base.options.onSlideComplete(base); }, 0);
				});
			}
			base.$el.trigger('initialized', base);

		};

		// called during initialization & to update the slider if a panel is added or deleted
		base.updateSlider = function(){
			// needed for updating the slider
			base.$el.find('li.cloned').remove();
			base.$nav.empty();

			base.$items = base.$el.find('> li'); 
			base.pages = base.$items.length;

			// Set the dimensions of each panel
			if (base.options.resizeContents) {
				if (base.options.width) { base.$wrapper.add(base.$items).css('width', base.options.width); }
				if (base.options.height) { base.$wrapper.add(base.$items).css('height', base.options.height); }
			}

			// Remove navigation & player if there is only one page
			if (base.pages === 1) {
				base.options.autoPlay = false;
				base.options.buildNavigation = false;
				base.options.buildArrows = false;
				base.$controls.hide();
				base.$nav.hide();
				if (base.$forward) { base.$forward.add(base.$back).hide(); }
			} else {
				base.options.autoPlay = base.original[0];
				base.options.buildNavigation = base.original[1];
				base.options.buildArrows = base.original[2];
				base.$controls.show();
				base.$nav.show();
				if (base.$forward) { base.$forward.add(base.$back).show(); }
			}

			// Build navigation tabs
			base.buildNavigation();

			// If autoPlay functionality is included, then initialize the settings
			if (base.options.autoPlay) {
				base.playing = !base.options.startStopped; // Sets the playing variable to false if startStopped is true
				base.buildAutoPlay();
			}

			// Build forwards/backwards buttons
			if (base.options.buildArrows) { base.buildNextBackButtons(); }

			// Top and tail the list with 'visible' number of items, top has the last section, and tail has the first
			// This supports the "infinite" scrolling, also ensures any cloned elements don't duplicate an ID
			base.$el.prepend( (base.options.infiniteSlides) ? base.$items.filter(':last').clone().addClass('cloned').removeAttr('id') : $('<li class="cloned" />') );
			base.$el.append( (base.options.infiniteSlides) ? base.$items.filter(':first').clone().addClass('cloned').removeAttr('id') : $('<li class="cloned" />') );
			base.$el.find('li.cloned').each(function(){
				// replace <a> with <span> in cloned panels to prevent shifting the panels by tabbing - modified so this will work with jQuery 1.3.2
				$(this).html( $(this).html().replace(/<a/gi, '<span').replace(/\/a>/gi, '/span>') );
				$(this).find('[id]').removeAttr('id');
			});

			// We just added two items, time to re-cache the list, then get the dimensions of each panel
			base.$items = base.$el.find('> li').addClass('panel');
			base.setDimensions();
			if (!base.options.resizeContents) { base.$win.load(function(){ base.setDimensions(); }); } // set dimensions after all images load

			if (base.currentPage > base.pages) {
				base.currentPage = base.pages;
				base.setCurrentPage(base.pages, false);
			}
			base.$nav.find('a').eq(base.currentPage - 1).addClass('cur'); // update current selection

			base.hasEmb = base.$items.find('embed[src*=youtube]').length; // embedded youtube objects exist in the slider
			base.hasSwfo = (typeof(swfobject) !== 'undefined' && swfobject.hasOwnProperty('embedSWF') && $.isFunction(swfobject.embedSWF)) ? true : false; // is swfobject loaded?

			// Initialize YouTube javascript api, if YouTube video is present
			if (base.hasEmb && base.hasSwfo) {
				base.$items.find('embed[src*=youtube]').each(function(i){
					// Older IE doesn't have an object - just make sure we are wrapping the correct element
					var $tar = ($(this).parent()[0].tagName === "OBJECT") ? $(this).parent() : $(this);
					$tar.wrap('<div id="ytvideo' + i + '"></div>');
					// use SWFObject if it exists, it replaces the wrapper with the object/embed
					swfobject.embedSWF($(this).attr('src') + '&enablejsapi=1&version=3&playerapiid=ytvideo' + i, 'ytvideo' + i,
						$tar.attr('width'), $tar.attr('height'), '10', null, null,
						{ allowScriptAccess: "always", wmode : base.options.addWmodeToObject, allowfullscreen : true },
						{ 'class' : $tar.attr('class'), 'style' : $tar.attr('style') }, 
						function(){ if (i >= base.hasEmb - 1) { base.$el.trigger('swf_completed', base); } } // swf callback
					);
				});
			}

			// Fix tabbing through the page
			base.$items.find('a').unbind('focus').bind('focus', function(e){
				base.$items.find('.focusedLink').removeClass('focusedLink');
				$(this).addClass('focusedLink');
				var panel = $(this).closest('.panel');
				if (!panel.is('.activePage')) {
					base.gotoPage(base.$items.index(panel));
					e.preventDefault();
				}
			});

		};

		// Creates the numbered navigation links
		base.buildNavigation = function() {

			if (base.options.buildNavigation && (base.pages > 1)) {
				base.$items.filter(':not(.cloned)').each(function(i,el) {
					var index = i + 1,
						klass = ((index === 1) ? 'first' : '') + ((index === base.pages) ? 'last' : ''),
						$a = $('<a href="#"></a>').addClass('panel' + index).wrap('<li class="' + klass + '" />');
					base.$nav.append($a.parent()); // use $a.parent() so IE will add <li> instead of only the <a> to the <ul>

					// If a formatter function is present, use it
					if ($.isFunction(base.options.navigationFormatter)) {
						var tmp = base.options.navigationFormatter(index, $(this));
						$a.html(tmp);
						// Add formatting to title attribute if text is hidden
						if (parseInt($a.css('text-indent'),10) < 0) { $a.addClass(base.options.tooltipClass).attr('title', tmp); }
					} else {
						$a.text(index);
					}

					$a.bind(base.options.clickControls, function(e) {
						if (!base.flag && base.options.enableNavigation) {
							// prevent running functions twice (once for click, second time for focusin)
							base.flag = true; setTimeout(function(){ base.flag = false; }, 100);
							base.gotoPage(index);
							if (base.options.hashTags) { base.setHash(index); }
						}
						e.preventDefault();
					});
				});
			}
		};

		// Creates the Forward/Backward buttons
		base.buildNextBackButtons = function() {
			if (base.$forward) { return; }
			base.$forward = $('<span class="arrow forward"><a href="#">' + base.options.forwardText + '</a></span>');
			base.$back = $('<span class="arrow back"><a href="#">' + base.options.backText + '</a></span>');

			// Bind to the forward and back buttons
			base.$back.bind(base.options.clickArrows, function(e) {
				base.goBack();
				e.preventDefault();
			});
			base.$forward.bind(base.options.clickArrows, function(e) {
				base.goForward();
				e.preventDefault();
			});
			// using tab to get to arrow links will show they have focus (outline is disabled in css)
			base.$back.add(base.$forward).find('a').bind('focusin focusout',function(){
			 $(this).toggleClass('hover');
			});

			// Append elements to page
			base.$wrapper.prepend(base.$forward).prepend(base.$back);
			base.$arrowWidth = base.$forward.width();
		};

		// Creates the Start/Stop button
		base.buildAutoPlay = function(){
			if (base.$startStop) { return; }
			base.$startStop = $("<a href='#' class='start-stop'></a>").html(base.playing ? base.options.stopText : base.options.startText);
			base.$controls.prepend(base.$startStop);
			base.$startStop
				.bind(base.options.clickSlideshow, function(e) {
					if (base.options.enablePlay) {
						base.startStop(!base.playing);
						if (base.playing) {
							if (base.options.playRtl) {
								base.goBack(true);
							} else {
								base.goForward(true);
							}
						}
					}
					e.preventDefault();
				})
				// show button has focus while tabbing
				.bind('focusin focusout',function(){
					$(this).toggleClass('hover');
				});

			// Use the same setting, but trigger the start;
			base.startStop(base.playing);
		};

		// Set panel dimensions to either resize content or adjust panel to content
		base.setDimensions = function(){
			var w, h, c, cw, dw, leftEdge = 0, bww = base.$window.width(), winw = base.$win.width();
			base.$items.each(function(i){
				c = $(this).children('*');
				if (base.options.resizeContents){
					// get viewport width & height from options (if set), or css
					w = parseInt(base.options.width,10) || bww;
					h = parseInt(base.options.height,10) || base.$window.height();
					// resize panel
					$(this).css({ width: w, height: h });
					// resize panel contents, if solitary (wrapped content or solitary image)
					if (c.length === 1){
						c.css({ width: '100%', height: '100%' });
						if (c[0].tagName === "OBJECT") { c.find('embed').andSelf().attr({ width: '100%', height: '100%' }); }
					}
				} else {
					// get panel width & height and save it
					w = $(this).width(); // if not defined, it will return the width of the ul parent
					dw = (w >= winw) ? true : false; // width defined from css?
					if (c.length === 1 && dw){
						cw = (c.width() >= winw) ? bww : c.width(); // get width of solitary child
						$(this).css('width', cw); // set width of panel
						c.css('max-width', cw);   // set max width for all children
						w = cw;
					}
					w = (dw) ? base.options.width || bww : w;
					$(this).css('width', w);
					h = $(this).outerHeight(); // get height after setting width
					$(this).css('height', h);
				}
				base.panelSize[i] = [w,h,leftEdge];
				leftEdge += w;
			});
			// Set total width of slider, but don't go beyond the set max overall width (limited by Opera)
			base.$el.css('width', (leftEdge < base.options.maxOverallWidth) ? leftEdge : base.options.maxOverallWidth);
		};

		base.gotoPage = function(page, autoplay, callback) {
			if (base.pages === 1) { return; }
			base.$lastPage = base.$items.eq(base.currentPage);
			if (typeof(page) !== "number") {
				page = base.options.startPage;
				base.setCurrentPage(base.options.startPage);
			}

			// pause YouTube videos before scrolling or prevent change if playing
			if (base.hasEmb && base.checkVideo(base.playing)) { return; }
			if (page > base.pages + 1 - base.adjustLimit) { page = (!base.options.infiniteSlides && !base.options.stopAtEnd) ? 1 : base.pages; }
			if (page < base.adjustLimit ) { page = (!base.options.infiniteSlides && !base.options.stopAtEnd) ? base.pages : 1; }
			base.$currentPage = base.$items.eq(page);
			base.currentPage = page; // ensure that event has correct target page
			base.$el.trigger('slide_init', base);

			base.slideControls(true, false);

			// When autoplay isn't passed, we stop the timer
			if (autoplay !== true) { autoplay = false; }
			// Stop the slider when we reach the last page, if the option stopAtEnd is set to true
			if (!autoplay || (base.options.stopAtEnd && page === base.pages)) { base.startStop(false); }

			base.$el.trigger('slide_begin', base);

			// resize slider if content size varies
			if (!base.options.resizeContents) {
				// animating the wrapper resize before the window prevents flickering in Firefox
				base.$wrapper.filter(':not(:animated)').animate(
					{ width: base.panelSize[page][0], height: base.panelSize[page][1] },
					{ queue: false, duration: base.options.animationTime, easing: base.options.easing }
				);
			}

			// Animate Slider
			base.$window.filter(':not(:animated)').animate(
				{ scrollLeft : base.panelSize[page][2] },
				{ queue: false, duration: base.options.animationTime, easing: base.options.easing, complete: function(){ base.endAnimation(page, callback); } }
			);
		};

		base.endAnimation = function(page, callback){
			if (page === 0) {
				base.$window.scrollLeft(base.panelSize[base.pages][2]);
				page = base.pages;
			} else if (page > base.pages) {
				// reset back to start position
				base.$window.scrollLeft(base.panelSize[1][2]);
				page = 1;
			}
			base.setCurrentPage(page, false);
			// Add active panel class
			base.$items.removeClass('activePage').eq(page).addClass('activePage');

			if (!base.hovered) { base.slideControls(false); }

			// continue YouTube video if in current panel
			if (base.hasEmb){
				var emb = base.$currentPage.find('object[id*=ytvideo], embed[id*=ytvideo]');
				// player states: unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5).
				if (emb.length && $.isFunction(emb[0].getPlayerState) && emb[0].getPlayerState() > 0 && emb[0].getPlayerState() !== 5) {
					emb[0].playVideo();
				}
			}

			base.$el.trigger('slide_complete', base);
			// callback from external slide control: $('#slider').anythingSlider(4, function(slider){ })
			if (typeof callback === 'function') { callback(base); }
			// Continue slideshow after a delay
			if (base.options.autoPlayLocked && !base.playing) {
				setTimeout(function(){
					base.startStop(true);
				// subtract out slide delay as the slideshow waits that additional time.
				}, base.options.resumeDelay - base.options.delay);
			}
		};

		base.setCurrentPage = function(page, move) {
			if (page > base.pages + 1 - base.adjustLimit) { page = base.pages - base.adjustLimit; }
			if (page < base.adjustLimit ) { page = 1; }

			// Set visual
			if (base.options.buildNavigation){
				base.$nav.find('.cur').removeClass('cur');
				base.$nav.find('a').eq(page - 1).addClass('cur');
			}

			// hide/show arrows based on infinite scroll mode
			if (!base.options.infiniteSlides && base.options.stopAtEnd){
				base.$wrapper.find('span.forward')[ page === base.pages ? 'addClass' : 'removeClass']('disabled');
				base.$wrapper.find('span.back')[ page === 1 ? 'addClass' : 'removeClass']('disabled');
				if (page === base.pages && base.playing) { base.startStop(); }
			}

			// Only change left if move does not equal false
			if (!move) {
				base.$wrapper.css({
					width: base.panelSize[page][0],
					height: base.panelSize[page][1]
				});
				base.$wrapper.scrollLeft(0); // reset in case tabbing changed this scrollLeft
				base.$window.scrollLeft( base.panelSize[page][2] );
			}
			// Update local variable
			base.currentPage = page;

			// Set current slider as active so keyboard navigation works properly
			if (!base.$wrapper.is('.activeSlider')){
				$('.activeSlider').removeClass('activeSlider');
				base.$wrapper.addClass('activeSlider');
			}
		};

		base.goForward = function(autoplay) {
			if (autoplay !== true) { autoplay = false; base.startStop(false); }
			base.gotoPage(base.currentPage + 1, autoplay);
		};

		base.goBack = function(autoplay) {
			if (autoplay !== true) { autoplay = false; base.startStop(false); }
			base.gotoPage(base.currentPage - 1, autoplay);
		};

		// This method tries to find a hash that matches panel-X
		// If found, it tries to find a matching item
		// If that is found as well, then that item starts visible
		base.gotoHash = function(){
			var n = base.win.location.hash.match(base.regex);
			return (n===null) ? '' : parseInt(n[1],10);
		};

		base.setHash = function(n){
			var s = 'panel' + base.runTimes + '-',
				h = base.win.location.hash;
			if ( typeof h !== 'undefined' ) {
				base.win.location.hash = (h.indexOf(s) > 0) ? h.replace(base.regex, s + n) : h + "&" + s + n;
			}
		};

		// Slide controls (nav and play/stop button up or down)
		base.slideControls = function(toggle, playing){
			var dir = (toggle) ? 'slideDown' : 'slideUp',
				t1 = (toggle) ? 0 : base.options.animationTime,
				t2 = (toggle) ? base.options.animationTime: 0,
				sign = (toggle) ? 0 : 1; // 0 = visible, 1 = hidden
			if (base.options.toggleControls) {
				base.$controls.stop(true,true).delay(t1)[dir](base.options.animationTime/2).delay(t2); 
			}
			if (base.options.buildArrows && base.options.toggleArrows) {
				if (!base.hovered && base.playing) { sign = 1; t2 = 0; } // don't animate arrows during slideshow
				base.$forward.stop(true,true).delay(t1).animate({ right: sign * base.$arrowWidth, opacity: t2 }, base.options.animationTime/2);
				base.$back.stop(true,true).delay(t1).animate({ left: sign * base.$arrowWidth, opacity: t2 }, base.options.animationTime/2);
			}
		};

		base.clearTimer = function(paused){
			// Clear the timer only if it is set
			if (base.timer) { 
				base.win.clearInterval(base.timer); 
				if (!paused) {
					base.$el.trigger('slideshow_stop', base); 
				}
			}
		};

		// Handles stopping and playing the slideshow
		// Pass startStop(false) to stop and startStop(true) to play
		base.startStop = function(playing, paused) {
			if (playing !== true) { playing = false; } // Default if not supplied is false

			if (playing && !paused) {
				base.$el.trigger('slideshow_start', base);
			}

			// Update variable
			base.playing = playing;

			// Toggle playing and text
			if (base.options.autoPlay) {
				base.$startStop.toggleClass('playing', playing).html( playing ? base.options.stopText : base.options.startText );
				// add button text to title attribute if it is hidden by text-indent
				if (parseInt(base.$startStop.css('text-indent'),10) < 0) {
					base.$startStop.addClass(base.options.tooltipClass).attr('title', playing ? 'Stop' : 'Start');
				}
			}

			if (playing){
				base.clearTimer(true); // Just in case this was triggered twice in a row
				base.timer = base.win.setInterval(function() {
					// prevent autoplay if video is playing
					if (!(base.hasEmb && base.checkVideo(playing))) {
						if (base.options.playRtl) {
							base.goBack(true);
						} else {
							base.goForward(true);
						}
					}
				}, base.options.delay);
			} else {
				base.clearTimer();
			}
		};

		base.checkVideo = function(playing){
			// pause YouTube videos before scrolling?
			var emb, ps, stopAdvance = false;
			base.$items.find('object[id*=ytvideo], embed[id*=ytvideo]').each(function(){ // include embed for IE; if not using SWFObject, old detach/append code needs "object embed" here
				emb = $(this);
				if (emb.length && $.isFunction(emb[0].getPlayerState)) {
					// player states: unstarted (-1), ended (0), playing (1), paused (2), buffering (3), video cued (5).
					ps = emb[0].getPlayerState();
					// if autoplay, video playing, video is in current panel and resume option are true, then don't advance
					if (playing && (ps === 1 || ps > 2) && base.$items.index(emb.closest('li.panel')) === base.currentPage && base.options.resumeOnVideoEnd) {
						stopAdvance = true;
					} else {
						// pause video if not autoplaying (if already initialized)
						if (ps > 0) { emb[0].pauseVideo(); }
					}
				}
			});
			return stopAdvance;
		};

		// Trigger the initialization
		base.init();
	};

	$.anythingSlider.defaults = {
		// Appearance
		width               : null,      // Override the default CSS width
		height              : null,      // Override the default CSS height
		resizeContents      : true,      // If true, solitary images/objects in the panel will expand to fit the viewport
		tooltipClass        : 'tooltip', // Class added to navigation & start/stop button (text copied to title if it is hidden by a negative text indent)
		theme               : 'default', // Theme name
		themeDirectory      : 'css/theme-{themeName}.css', // Theme directory & filename {themeName} is replaced by the theme value above

		// Navigation
		startPanel          : 1,         // This sets the initial panel
		hashTags            : true,      // Should links change the hashtag in the URL?
		infiniteSlides      : true,      // if false, the slider will not wrap
		enableKeyboard      : true,      // if false, keyboard arrow keys will not work for the current panel.
		buildArrows         : true,      // If true, builds the forwards and backwards buttons
		toggleArrows        : false,     // If true, side navigation arrows will slide out on hovering & hide @ other times
		buildNavigation     : true,      // If true, builds a list of anchor links to link to each panel
		enableNavigation    : true,      // if false, navigation links will still be visible, but not clickable.
		toggleControls      : false,     // if true, slide in controls (navigation + play/stop button) on hover and slide change, hide @ other times
		appendControlsTo    : null,      // A HTML element (jQuery Object, selector or HTMLNode) to which the controls will be appended if not null
		navigationFormatter : null,      // Details at the top of the file on this use (advanced use)
		forwardText         : "&raquo;", // Link text used to move the slider forward (hidden by CSS, replaced with arrow image)
		backText            : "&laquo;", // Link text used to move the slider back (hidden by CSS, replace with arrow image)

		// Slideshow options
		enablePlay          : true,      // if false, the play/stop button will still be visible, but not clickable.
		autoPlay            : true,      // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
		autoPlayLocked      : false,     // If true, user changing slides will not stop the slideshow
		startStopped        : false,     // If autoPlay is on, this can force it to start stopped
		pauseOnHover        : true,      // If true & the slideshow is active, the slideshow will pause on hover
		resumeOnVideoEnd    : true,      // If true & the slideshow is active & a youtube video is playing, it will pause the autoplay until the video is complete
		stopAtEnd           : false,     // If true & the slideshow is active, the slideshow will stop on the last page. This also stops the rewind effect when infiniteSlides is false.
		playRtl             : false,     // If true, the slideshow will move right-to-left
		startText           : "Start",   // Start button text
		stopText            : "Stop",    // Stop button text
		delay               : 3000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
		resumeDelay         : 15000,     // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
		animationTime       : 600,       // How long the slideshow transition takes (in milliseconds)
		easing              : "swing",   // Anything other than "linear" or "swing" requires the easing plugin

		// Callbacks - removed from options to reduce size - they still work

		// Interactivity
		clickArrows         : "click",         // Event used to activate arrow functionality (e.g. "click" or "mouseenter")
		clickControls       : "click focusin", // Events used to activate navigation control functionality
		clickSlideshow      : "click",         // Event used to activate slideshow play/stop button

		// Misc options
		addWmodeToObject    : "opaque", // If your slider has an embedded object, the script will automatically add a wmode parameter with this setting
		maxOverallWidth     : 32766     // Max width (in pixels) of combined sliders (side-to-side); set to 32766 to prevent problems with Opera
	};

	$.fn.anythingSlider = function(options, callback) {

		return this.each(function(i){
			var anySlide = $(this).data('AnythingSlider');

			// initialize the slider but prevent multiple initializations
			if ((typeof(options)).match('object|undefined')){
				if (!anySlide) {
					(new $.anythingSlider(this, options));
				} else {
					anySlide.updateSlider();
				}
			// If options is a number, process as an external link to page #: $(element).anythingSlider(#)
			} else if (/\d/.test(options) && !isNaN(options) && anySlide) {
				var page = (typeof(options) === "number") ? options : parseInt($.trim(options),10); // accepts "  2  "
				// ignore out of bound pages
				if ( page >= 1 && page <= anySlide.pages ) {
					anySlide.gotoPage(page, false, callback); // page #, autoplay, one time callback
				}
			}
		});
	};

})(jQuery);

/* AnythingSlider works with works with jQuery 1.4+, but you can uncomment the code below to make it
   work with jQuery 1.3.2. You'll have to manually add the code below to the minified copy if needed */
/*
 // Copied from jQuery 1.4.4 to make AnythingSlider backwards compatible to jQuery 1.3.2
 if (typeof jQuery.fn.delay === 'undefined') {
  jQuery.fn.extend({
   delay: function( time, type ) {
    time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; type = type || "fx";
    return this.queue( type, function() { var elem = this; setTimeout(function() { jQuery.dequeue( elem, type ); }, time ); });
   }
  });
 }
*/;
/* This file activates the sliders */
(function ($) {
  $(document).ready(function(){
    
	  // Homepage slides
    $('.node-type-homepage .view-homepage-slides ul').anythingSlider({
      width: 988,
      height: 395,
      buildNavigation: true,
      delay: 9000,
      pauseOnHover: true,
      hashTags: false,
      onSlideBegin: function(e, slider) { Cufon.refresh(); },
      onInitialized: function(e, slider) {
        var n = $('.node-type-homepage .view-homepage-slides .thumbNav li').length;
        if (n == 2){
          $('#page .view-homepage-slides div.anythingSlider .back').css('right', 229);
        }
        else if (n == 3){
          $('#page .view-homepage-slides div.anythingSlider .back').css('right', 252);
        }
        else if (n == 4){
          $('#page .view-homepage-slides div.anythingSlider .back').css('right', 275);
        }
        $('.thumbNav a').removeAttr('title');
      },
      navigationFormatter : function(index, panel){
        return '<span class="bubble"><span class="bubble-inner">'+panel.find('.views-field-field-ht').text()+'</span></span>';
      }
    });
    
    // Homepage news
    $('.node-type-homepage .view-homepage-news ul').anythingSlider({
      width: 290,
      height: 174,
      buildNavigation: true,
      autoPlay: false,
      hashTags: false,
      onSlideBegin: function(e, slider) { Cufon.refresh(); },
      onInitialized: function(e, slider) {
        var n = $('.node-type-homepage .view-homepage-news .thumbNav li').length;
        if (n == 2){
          $('#page .view-homepage-news div.anythingSlider .forward').css('left', 78);
        }
        else if (n == 3){
          $('#page .view-homepage-news div.anythingSlider .forward').css('left', 101);
        }
        $('.thumbNav a').removeAttr('title');
      },
      navigationFormatter : function(index, panel){
        return '<span class="bubble"><span class="bubble-inner">'+panel.find('.views-field-field-ti').html()+panel.find('.views-field-title').text()+'</span></span>';
      }
    });
    
    // News
    $('.view-news ul').anythingSlider({
      width: 450,
      height: 190,
      buildNavigation: true,
      autoPlay: false,
      hashTags: false,
      onSlideBegin: function(e, slider) { Cufon.refresh(); },
      onInitialized: function(e, slider) {
        var n = $('.view-news .thumbNav li').length;
        if (n == 2){
          $('#page .view-news div.anythingSlider .forward').css('left', 77);
        }
        else if (n == 3){
          $('#page .view-news div.anythingSlider .forward').css('left', 100);
        }
        else if (n == 4){
          $('#page .view-news div.anythingSlider .forward').css('left', 123);
        }
        $('.thumbNav a').removeAttr('title');
      },
      navigationFormatter : function(index, panel){
        return '<span class="bubble"><span class="bubble-inner">'+panel.find('.views-field-field-ti-1').html()+panel.find('.views-field-title').text()+'</span></span>';
      }
    });
    
    // Case studies
    $('.view-case-studies ul').anythingSlider({
      width: 450,
      height: 190,
      buildNavigation: true,
      autoPlay: false,
      hashTags: false,
      onSlideBegin: function(e, slider) { Cufon.refresh(); },
      onInitialized: function(e, slider) {
        var n = $('.view-case-studies .thumbNav li').length;
        if (n == 2){
          $('#page .view-case-studies div.anythingSlider .forward').css('left', 77);
        }
        else if (n == 3){
          $('#page .view-case-studies div.anythingSlider .forward').css('left', 100);
        }
        else if (n == 4){
          $('#page .view-case-studies div.anythingSlider .forward').css('left', 123);
        }
        $('.thumbNav a').removeAttr('title');
      },
      navigationFormatter : function(index, panel){
        return '<span class="bubble"><span class="bubble-inner">'+panel.find('.views-field-field-ti-1').html()+panel.find('.views-field-title').text()+'</span></span>';
      }
    });
    
    // Services
    $('.view-services ul').anythingSlider({
      width: 450,
      height: 190,
      buildNavigation: true,
      autoPlay: false,
      hashTags: false,
      onSlideBegin: function(e, slider) { Cufon.refresh(); },
      onInitialized: function(e, slider) {
        var n = $('.view-services .thumbNav li').length;
        if (n == 2){
          $('#page .view-services div.anythingSlider .forward').css('left', 77);
        }
        else if (n == 3){
          $('#page .view-services div.anythingSlider .forward').css('left', 100);
        }
        else if (n == 4){
          $('#page .view-services div.anythingSlider .forward').css('left', 123);
        }
        $('.thumbNav a').removeAttr('title');
      },
      navigationFormatter : function(index, panel){
        return '<span class="bubble"><span class="bubble-inner">'+panel.find('.views-field-field-ti-1').html()+panel.find('.views-field-title').text()+'</span></span>';
      }
    });
    
    // Careers
    $('.view-careers ul').anythingSlider({
      width: 450,
      height: 243,
      buildNavigation: true,
      autoPlay: false,
      hashTags: false,
      onSlideBegin: function(e, slider) { Cufon.refresh(); },
      onInitialized: function(e, slider) {
        var n = $('.view-careers .thumbNav li').length;
        if (n == 2){
          $('#page .view-careers div.anythingSlider .forward').css('left', 77);
        }
        else if (n == 3){
          $('#page .view-careers div.anythingSlider .forward').css('left', 100);
        }
        else if (n == 4){
          $('#page .view-careers div.anythingSlider .forward').css('left', 123);
        }
        $('.thumbNav a').removeAttr('title');
      },
      navigationFormatter : function(index, panel){
        return '<span class="bubble"><span class="bubble-inner">'+panel.find('.views-field-title').text()+'</span></span>';
      }
    });
    
    // Fade in bubbles
    $('#page div.anythingSlider .thumbNav a').hover(function(){
      $(this).children('span.bubble').stop(true, true).fadeIn();
    }, function(){
      $(this).children('span.bubble').stop(true, true).fadeOut();
    });
    
    // Change overflow of db-block to show bubbles:
    $('.db-block').css('overflow', 'visible');
    
  });
  
})(jQuery); ;

/* This file filters the colorpak grids */
(function ($) {
  $(document).ready(function(){
    // Add node ID as class for row:
    $(".colorpak-grid .views-row").each(function(index){
      var nid = $(this).find(".views-field-nid .field-content").html();
      $(this).attr('data-id', 'nid-'+nid);
    });
    // Add classes
    $(".colorpak-grid .views-field-field-l:contains('Melbourne')").closest(".views-row").addClass("row-melbourne");
    $(".colorpak-grid .views-field-field-l:contains('Auckland')").closest(".views-row").addClass("row-auckland");
    $(".colorpak-grid .views-field-field-l:contains('Sydney')").closest(".views-row").addClass("row-sydney");
    
    // get the first collection
    var $panels = $('.colorpak-grid .view-content');
    
    // clone panels to get a second collection
    var $data = $panels.clone();
    
    // Filter
    $(".colorpak-grid .filter-now").click(function(){
      $(".colorpak-grid .filter-now").removeClass('active');
      $(this).addClass('active');
      if ($(this).attr('id') == 'all') {
        var $filteredData = $data.find('.views-row');
      }
      else {
        var $filteredData = $data.find('.views-row.'+$(this).attr('id'));
      }
      
      // Quicksand animation
      $panels.quicksand($filteredData, 
        {
          enhancement: function() {
            Cufon.refresh();
          }
        }
      );
      
    });

  });
  
})(jQuery);;
/* This file changes the colour of the search button depending on the page brand */
(function ($) {
  $(document).ready(function(){
    if ($('body').hasClass('brandpack-page')) {
	    $('#search-block-form #edit-submit').attr('src', Drupal.settings.basePath+'sites/all/themes/colorpak/images/search-button-brandpack.gif');
	  }
	  else if ($('body').hasClass('pharmakit-page')) {
	    $('#search-block-form #edit-submit').attr('src', Drupal.settings.basePath+'sites/all/themes/colorpak/images/search-button-pharmakit.gif');
	  }
	  else if ($('body').hasClass('foilmasters-page')) {
	    $('#search-block-form #edit-submit').attr('src', Drupal.settings.basePath+'sites/all/themes/colorpak/images/search-button-foilmasters.gif');
	  }
  });
})(jQuery); ;
/*!
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */

(function(g){var q={vertical:!1,rtl:!1,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click", buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},m=!1;g(window).bind("load.jcarousel",function(){m=!0});g.jcarousel=function(a,c){this.options=g.extend({},q,c||{});this.autoStopped=this.locked=!1;this.buttonPrevState=this.buttonNextState=this.buttonPrev=this.buttonNext=this.list=this.clip=this.container=null;if(!c||c.rtl===void 0)this.options.rtl=(g(a).attr("dir")||g("html").attr("dir")||"").toLowerCase()=="rtl";this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical? this.options.rtl?"right":"left":"top";for(var b="",d=a.className.split(" "),f=0;f<d.length;f++)if(d[f].indexOf("jcarousel-skin")!=-1){g(a).removeClass(d[f]);b=d[f];break}a.nodeName.toUpperCase()=="UL"||a.nodeName.toUpperCase()=="OL"?(this.list=g(a),this.clip=this.list.parents(".jcarousel-clip"),this.container=this.list.parents(".jcarousel-container")):(this.container=g(a),this.list=this.container.find("ul,ol").eq(0),this.clip=this.container.find(".jcarousel-clip"));if(this.clip.size()===0)this.clip= this.list.wrap("<div></div>").parent();if(this.container.size()===0)this.container=this.clip.wrap("<div></div>").parent();b!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1&&this.container.wrap('<div class=" '+b+'"></div>');this.buttonPrev=g(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null)this.buttonPrev=g(this.options.buttonPrevHTML).appendTo(this.container);this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext= g(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null)this.buttonNext=g(this.options.buttonNextHTML).appendTo(this.container);this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css(this.options.rtl?"right":"left",0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"}); !this.options.vertical&&this.options.rtl&&this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl");var j=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null,b=this.list.children("li"),e=this;if(b.size()>0){var h=0,i=this.options.offset;b.each(function(){e.format(this,i++);h+=e.dimension(this,j)});this.list.css(this.wh,h+100+"px");if(!c||c.size===void 0)this.options.size=b.size()}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display", "block");this.funcNext=function(){e.next()};this.funcPrev=function(){e.prev()};this.funcResize=function(){e.resizeTimer&&clearTimeout(e.resizeTimer);e.resizeTimer=setTimeout(function(){e.reload()},100)};this.options.initCallback!==null&&this.options.initCallback(this,"init");!m&&g.browser.safari?(this.buttons(!1,!1),g(window).bind("load.jcarousel",function(){e.setup()})):this.setup()};var f=g.jcarousel;f.fn=f.prototype={jcarousel:"0.2.8"};f.fn.extend=f.extend=g.extend;f.fn.extend({setup:function(){this.prevLast= this.prevFirst=this.last=this.first=null;this.animating=!1;this.tail=this.resizeTimer=this.timer=null;this.inTail=!1;if(!this.locked){this.list.css(this.lt,this.pos(this.options.offset)+"px");var a=this.pos(this.options.start,!0);this.prevFirst=this.prevLast=null;this.animate(a,!1);g(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);this.options.setupCallback!==null&&this.options.setupCallback(this)}},reset:function(){this.list.empty();this.list.css(this.lt, "0px");this.list.css(this.wh,"10px");this.options.initCallback!==null&&this.options.initCallback(this,"reset");this.setup()},reload:function(){this.tail!==null&&this.inTail&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=!1;this.options.reloadCallback!==null&&this.options.reloadCallback(this);if(this.options.visible!==null){var a=this,c=Math.ceil(this.clipping()/this.options.visible),b=0,d=0;this.list.children("li").each(function(f){b+=a.dimension(this, c);f+1<a.first&&(d=b)});this.list.css(this.wh,b+"px");this.list.css(this.lt,-d+"px")}this.scroll(this.first,!1)},lock:function(){this.locked=!0;this.buttons()},unlock:function(){this.locked=!1;this.buttons()},size:function(a){if(a!==void 0)this.options.size=a,this.locked||this.buttons();return this.options.size},has:function(a,c){if(c===void 0||!c)c=a;if(this.options.size!==null&&c>this.options.size)c=this.options.size;for(var b=a;b<=c;b++){var d=this.get(b);if(!d.length||d.hasClass("jcarousel-item-placeholder"))return!1}return!0}, get:function(a){return g(">.jcarousel-item-"+a,this.list)},add:function(a,c){var b=this.get(a),d=0,p=g(c);if(b.length===0)for(var j,e=f.intval(a),b=this.create(a);;){if(j=this.get(--e),e<=0||j.length){e<=0?this.list.prepend(b):j.after(b);break}}else d=this.dimension(b);p.get(0).nodeName.toUpperCase()=="LI"?(b.replaceWith(p),b=p):b.empty().append(c);this.format(b.removeClass(this.className("jcarousel-item-placeholder")),a);p=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible): null;d=this.dimension(b,p)-d;a>0&&a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))-d+"px");this.list.css(this.wh,f.intval(this.list.css(this.wh))+d+"px");return b},remove:function(a){var c=this.get(a);if(c.length&&!(a>=this.first&&a<=this.last)){var b=this.dimension(c);a<this.first&&this.list.css(this.lt,f.intval(this.list.css(this.lt))+b+"px");c.remove();this.list.css(this.wh,f.intval(this.list.css(this.wh))-b+"px")}},next:function(){this.tail!==null&&!this.inTail?this.scrollTail(!1): this.scroll((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size?1:this.first+this.options.scroll)},prev:function(){this.tail!==null&&this.inTail?this.scrollTail(!0):this.scroll((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1?this.options.size:this.first-this.options.scroll)},scrollTail:function(a){if(!this.locked&&!this.animating&&this.tail){this.pauseAuto();var c=f.intval(this.list.css(this.lt)), c=!a?c-this.tail:c+this.tail;this.inTail=!a;this.prevFirst=this.first;this.prevLast=this.last;this.animate(c)}},scroll:function(a,c){!this.locked&&!this.animating&&(this.pauseAuto(),this.animate(this.pos(a),c))},pos:function(a,c){var b=f.intval(this.list.css(this.lt));if(this.locked||this.animating)return b;this.options.wrap!="circular"&&(a=a<1?1:this.options.size&&a>this.options.size?this.options.size:a);for(var d=this.first>a,g=this.options.wrap!="circular"&&this.first<=1?1:this.first,j=d?this.get(g): this.get(this.last),e=d?g:g-1,h=null,i=0,k=!1,l=0;d?--e>=a:++e<a;){h=this.get(e);k=!h.length;if(h.length===0&&(h=this.create(e).addClass(this.className("jcarousel-item-placeholder")),j[d?"before":"after"](h),this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size)))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)));j=h;l=this.dimension(h);k&&(i+=l);if(this.first!==null&&(this.options.wrap=="circular"||e>=1&&(this.options.size===null||e<= this.options.size)))b=d?b+l:b-l}for(var g=this.clipping(),m=[],o=0,n=0,j=this.get(a-1),e=a;++o;){h=this.get(e);k=!h.length;if(h.length===0){h=this.create(e).addClass(this.className("jcarousel-item-placeholder"));if(j.length===0)this.list.prepend(h);else j[d?"before":"after"](h);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(e<=0||e>this.options.size))j=this.get(this.index(e)),j.length&&(h=this.add(e,j.clone(!0)))}j=h;l=this.dimension(h);if(l===0)throw Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting..."); this.options.wrap!="circular"&&this.options.size!==null&&e>this.options.size?m.push(h):k&&(i+=l);n+=l;if(n>=g)break;e++}for(h=0;h<m.length;h++)m[h].remove();i>0&&(this.list.css(this.wh,this.dimension(this.list)+i+"px"),d&&(b-=i,this.list.css(this.lt,f.intval(this.list.css(this.lt))-i+"px")));i=a+o-1;if(this.options.wrap!="circular"&&this.options.size&&i>this.options.size)i=this.options.size;if(e>i){o=0;e=i;for(n=0;++o;){h=this.get(e--);if(!h.length)break;n+=this.dimension(h);if(n>=g)break}}e=i-o+ 1;this.options.wrap!="circular"&&e<1&&(e=1);if(this.inTail&&d)b+=this.tail,this.inTail=!1;this.tail=null;if(this.options.wrap!="circular"&&i==this.options.size&&i-o+1>=1&&(d=f.intval(this.get(i).css(!this.options.vertical?"marginRight":"marginBottom")),n-d>g))this.tail=n-g-d;if(c&&a===this.options.size&&this.tail)b-=this.tail,this.inTail=!0;for(;a-- >e;)b+=this.dimension(this.get(a));this.prevFirst=this.first;this.prevLast=this.last;this.first=e;this.last=i;return b},animate:function(a,c){if(!this.locked&& !this.animating){this.animating=!0;var b=this,d=function(){b.animating=!1;a===0&&b.list.css(b.lt,0);!b.autoStopped&&(b.options.wrap=="circular"||b.options.wrap=="both"||b.options.wrap=="last"||b.options.size===null||b.last<b.options.size||b.last==b.options.size&&b.tail!==null&&!b.inTail)&&b.startAuto();b.buttons();b.notify("onAfterAnimation");if(b.options.wrap=="circular"&&b.options.size!==null)for(var c=b.prevFirst;c<=b.prevLast;c++)c!==null&&!(c>=b.first&&c<=b.last)&&(c<1||c>b.options.size)&&b.remove(c)}; this.notify("onBeforeAnimation");if(!this.options.animation||c===!1)this.list.css(this.lt,a+"px"),d();else{var f=!this.options.vertical?this.options.rtl?{right:a}:{left:a}:{top:a},d={duration:this.options.animation,easing:this.options.easing,complete:d};if(g.isFunction(this.options.animationStepCallback))d.step=this.options.animationStepCallback;this.list.animate(f,d)}}},startAuto:function(a){if(a!==void 0)this.options.auto=a;if(this.options.auto===0)return this.stopAuto();if(this.timer===null){this.autoStopped= !1;var c=this;this.timer=window.setTimeout(function(){c.next()},this.options.auto*1E3)}},stopAuto:function(){this.pauseAuto();this.autoStopped=!0},pauseAuto:function(){if(this.timer!==null)window.clearTimeout(this.timer),this.timer=null},buttons:function(a,c){if(a==null&&(a=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="first"||this.options.size===null||this.last<this.options.size),!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&& this.last>=this.options.size))a=this.tail!==null&&!this.inTail;if(c==null&&(c=!this.locked&&this.options.size!==0&&(this.options.wrap&&this.options.wrap!="last"||this.first>1),!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1))c=this.tail!==null&&this.inTail;var b=this;this.buttonNext.size()>0?(this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext),a&&this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext), this.buttonNext[a?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",a?!1:!0),this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=a&&this.buttonNext.each(function(){b.options.buttonNextCallback(b,this,a)}).data("jcarouselstate",a)):this.options.buttonNextCallback!==null&&this.buttonNextState!=a&&this.options.buttonNextCallback(b,null,a);this.buttonPrev.size()>0?(this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev), c&&this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev),this.buttonPrev[c?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",c?!1:!0),this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=c&&this.buttonPrev.each(function(){b.options.buttonPrevCallback(b,this,c)}).data("jcarouselstate",c)):this.options.buttonPrevCallback!==null&&this.buttonPrevState!=c&&this.options.buttonPrevCallback(b,null,c);this.buttonNextState= a;this.buttonPrevState=c},notify:function(a){var c=this.prevFirst===null?"init":this.prevFirst<this.first?"next":"prev";this.callback("itemLoadCallback",a,c);this.prevFirst!==this.first&&(this.callback("itemFirstInCallback",a,c,this.first),this.callback("itemFirstOutCallback",a,c,this.prevFirst));this.prevLast!==this.last&&(this.callback("itemLastInCallback",a,c,this.last),this.callback("itemLastOutCallback",a,c,this.prevLast));this.callback("itemVisibleInCallback",a,c,this.first,this.last,this.prevFirst, this.prevLast);this.callback("itemVisibleOutCallback",a,c,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(a,c,b,d,f,j,e){if(!(this.options[a]==null||typeof this.options[a]!="object"&&c!="onAfterAnimation")){var h=typeof this.options[a]=="object"?this.options[a][c]:this.options[a];if(g.isFunction(h)){var i=this;if(d===void 0)h(i,b,c);else if(f===void 0)this.get(d).each(function(){h(i,this,d,b,c)});else for(var a=function(a){i.get(a).each(function(){h(i,this,a,b,c)})},k=d;k<=f;k++)k!== null&&!(k>=j&&k<=e)&&a(k)}}},create:function(a){return this.format("<li></li>",a)},format:function(a,c){for(var a=g(a),b=a.get(0).className.split(" "),d=0;d<b.length;d++)b[d].indexOf("jcarousel-")!=-1&&a.removeClass(b[d]);a.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+c)).css({"float":this.options.rtl?"right":"left","list-style":"none"}).attr("jcarouselindex",c);return a},className:function(a){return a+" "+a+(!this.options.vertical?"-horizontal":"-vertical")}, dimension:function(a,c){var b=g(a);if(c==null)return!this.options.vertical?b.outerWidth(!0)||f.intval(this.options.itemFallbackDimension):b.outerHeight(!0)||f.intval(this.options.itemFallbackDimension);else{var d=!this.options.vertical?c-f.intval(b.css("marginLeft"))-f.intval(b.css("marginRight")):c-f.intval(b.css("marginTop"))-f.intval(b.css("marginBottom"));g(b).css(this.wh,d+"px");return this.dimension(b)}},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-f.intval(this.clip.css("borderLeftWidth"))- f.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-f.intval(this.clip.css("borderTopWidth"))-f.intval(this.clip.css("borderBottomWidth"))},index:function(a,c){if(c==null)c=this.options.size;return Math.round(((a-1)/c-Math.floor((a-1)/c))*c)+1}});f.extend({defaults:function(a){return g.extend(q,a||{})},intval:function(a){a=parseInt(a,10);return isNaN(a)?0:a},windowLoaded:function(){m=!0}});g.fn.jcarousel=function(a){if(typeof a=="string"){var c=g(this).data("jcarousel"),b=Array.prototype.slice.call(arguments, 1);return c[a].apply(c,b)}else return this.each(function(){var b=g(this).data("jcarousel");b?(a&&g.extend(b.options,a),b.reload()):g(this).data("jcarousel",new f(this,a))})}})(jQuery);
;
/* This file activates the carousels */
function refreshCufon(carousel, state){
  Cufon.refresh();
};

(function ($) {
  $(document).ready(function(){
	  // Careers carousel
	  $('.view-careers-carousel ul').jcarousel({
      initCallback: refreshCufon
    });
    // Profiles carousel
    $('.view-profiles-carousel ul').jcarousel({
      initCallback: refreshCufon
    });
    // Board carousel
    $('.view-board-carousel ul').jcarousel({
      initCallback: refreshCufon
    });
    // Case studies carousel
    $('.view-case-studies-carousel ul').jcarousel({
      initCallback: refreshCufon
    });
  });
  
})(jQuery); ;
/* This file shows/hides the sitemap */
(function ($) {
  $(document).ready(function(){
	  // Add close button:
	  $("#block-menu-block-4").append('<span id="sitemap-close" class="floatie-close">Sitemap</span>');
	  // Assign as floatie:
	  $("#block-menu-block-4").addClass('floatie');
	  // Show sitemap:
	  $("#sitemap-button").click(function(){
	    $("#block-menu-block-4, #overlay").fadeIn();
	    return false;
	  });
  });
  
})(jQuery); ;
/* This file shows/hides the 2nd level menus */
(function ($) {
  $(document).ready(function(){
	  $("#block-menu-block-1 .menu-block-wrapper>ul>li").click(function(){
	    if ($(this).find("ul").length && !$(this).hasClass('clicked')) {
	      $(this).addClass('clicked').css('z-index', 1000).css('background', '#FFFFFF url("'+ Drupal.settings.basePath +'sites/all/themes/colorpak/images/nav-shadow.gif") repeat-x 0 100%').children("ul").fadeIn();
	      $("#overlay").appendTo('#block-menu-block-1 .menu-block-1>ul');
	      $("#header").css('z-index', 500);
	      $("#overlay").fadeIn();
	      return false;
	    }
	  })
  });
  
})(jQuery); ;
/* This file shows/hides the Get in Touch form */
(function ($) {
  $(document).ready(function(){
    // Add intro text:
    $("#block-webform-client-block-43 .content").prepend('<p class="intro">We will get back to you as soon as we can.');
	  // Add close button:
	  $("#block-webform-client-block-43").append('<span id="getintouch-close" class="floatie-close">Get in touch</span>');
	  // Assign as floatie:
	  $("#block-webform-client-block-43").addClass('floatie');
	  // Show form:
	  $("body:not(.page-node-43) #get-in-touch-button").click(function(){
	    $("#block-webform-client-block-43, #overlay").fadeIn();
	    return false;
	  });
	  
	  // Add labels to fields initially:
	  if ($("#block-webform-client-block-43 #edit-submitted-name").val() == ''){
	    $("#block-webform-client-block-43 #edit-submitted-name").val("Name");
	  }
	  if ($("#block-webform-client-block-43 #edit-submitted-email").val() == ''){
	    $("#block-webform-client-block-43 #edit-submitted-email").val("Email");
	  }
	  if ($("#block-webform-client-block-43 #edit-submitted-question").val() == ''){
	    $("#block-webform-client-block-43 #edit-submitted-question").val("Type your question here...");
	  }
    
    $("#block-webform-client-block-43 #edit-submitted-name").focus(function(){
      if ($(this).val() == "Name") {
        $(this).val("");
      }
    });
    $("#block-webform-client-block-43 #edit-submitted-name").blur(function(){
      if ($(this).val() == "") {
        $(this).val("Name");
      }
    });
    
    $("#block-webform-client-block-43 #edit-submitted-email").focus(function(){
      if ($(this).val() == "Email") {
        $(this).val("");
      }
    });
    $("#block-webform-client-block-43 #edit-submitted-email").blur(function(){
      if ($(this).val() == "") {
        $(this).val("Email");
      }
    });
    
    $("#block-webform-client-block-43 #edit-submitted-question").focus(function(){
      if ($(this).val() == "Type your question here...") {
        $(this).val("");
      }
    });
    $("#block-webform-client-block-43 #edit-submitted-question").blur(function(){
      if ($(this).val() == "") {
        $(this).val("Type your question here...");
      }
    });
    
    // Remove default values when form submitted:
    $("form#webform-client-form-43").submit(function(){
      if ($("#block-webform-client-block-43 #edit-submitted-name").val() == "Name") {
        $("#block-webform-client-block-43 #edit-submitted-name").val("");
      }
      if ($("#block-webform-client-block-43 #edit-submitted-email").val() == "Email") {
        $("#block-webform-client-block-43 #edit-submitted-email").val("");
      }
      if ($("#block-webform-client-block-43 #edit-submitted-question").val() == "Type your question here...") {
        $("#block-webform-client-block-43 #edit-submitted-question").val("");
      }
    });
    
    // Show form if errors:
    if ($("#block-webform-client-block-43 .error").length) {
      $("#block-webform-client-block-43, #overlay").fadeIn();
    }
	  
  });
  
})(jQuery); ;
/* This file shows/hides the follow panel */
(function ($) {
  $(document).ready(function(){
	  // Assign as floatie:
	  $("#follow-panel").addClass('floatie');
	  // Show sitemap:
	  $("#follow-button").click(function(){
	    $("#follow-panel, #overlay").fadeIn();
	    return false;
	  });
  });
  
})(jQuery); ;
/* This file shows/hides the share panel */
(function ($) {
  $(document).ready(function(){
	  // Assign as floatie:
	  $("#share-panel").addClass('floatie');
	  // Show sitemap:
	  $("#share-button").click(function(){
	    $("#share-panel, #overlay").fadeIn();
	    return false;
	  });
  });
  
})(jQuery); ;
/* This file shows/hides the overlay and floaties */
(function ($) {
  $(document).ready(function(){
	  $("#overlay, .floatie-close").click(function(){
	    $("#header").css('z-index', 'auto');
	    $("#overlay, .floatie").fadeOut();
	    $("#overlay").appendTo('body');
	    $("#block-menu-block-1 .menu-block-wrapper>ul>li").css('z-index', 1).css('background', 'url('+Drupal.settings.basePath+'sites/all/themes/colorpak/images/main-menu-li.gif) no-repeat 100% 10px').removeClass('clicked').children("ul").fadeOut();
	  })
  });
  
})(jQuery); ;
/* This file standardises the height of all subpage blocks */
(function ($) {
  $(document).ready(function(){
    var highestCol = 50;
	  $('#landing-subpages .sub-content').each(function(){
	    if ($(this).height() > highestCol) {
	      highestCol = $(this).height();
	    }
	  });
    $('#landing-subpages .sub-content').height(highestCol);
  });
})(jQuery);;
/* This file opens videos in the utility floatie block */
(function ($) {
  $(document).ready(function(){
	  $(".video-link, .node-type-homepage .view-homepage-slides .views-field-field-vl a").click(function(){
	    $("#overlay").fadeIn();
  	  $("#block-block-3").fadeIn();
  	  var videourl = $(this).attr('href');
  	  $('#block-block-3 #utility-inner').load(videourl+' #block-system-main');
	    return false;
	  });
	  $(".closer, #overlay").live('click', function(){
  	  $(".floatie, .region-floaties .block").fadeOut();
  	  $('#block-block-3 #utility-inner').empty();
  	});
  });
})(jQuery); ;

