// JavaScript Document // this is used for any GLOBAL javascript. In most cases, things should NOT be added here. function unsetNoJavascript () { // remove default state if we have JS: $('body').removeClass('noJavascript'); } /* * 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;E0){E=" "+E}}else{if(B400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||JD){D=J}K.push(J)}if(ID){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?ML:(M<=I&&L<=I)?M>L:Mcufoncanvas{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;}}").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;mO){O=K}if(I>N){N=I}if(K h3', '.col2 .txt h3', '.whatsonCategories .choiceItem .catHeader h3', '.recordList .choiceItem .copy h3', '#widgets .widget .copy > h3', '#widgets .widget .widgetInner h3', '.whatson .choiceItem .Images h3', '.singleRecord .news .choiceItem .copy h3', '.singleRecord .people .choiceItem .copy h3', '#Youmayalsolike h3', '.recordList .sponsor #records h3', '.homepage .crossSell h3', '#widgets .productCrossSell h4', '.calendar caption', '.recordList .product .choiceItem .item .price', '.news .choiceItem .copy .subHeading', '.whatson .choiceItem .copy .itemHeader .subHeading', '.choiceItem subHeading', '.recordList .whatson .choiceItem .copy .date', '.recordList .news .choiceItem .copy .date', '.singleRecord .product .txt .choiceItem .copy .price', '#RelatedExhibitionsandProducts h3', '.singleRecord .product #Gallery h3', '.checkout .paymentForm h3', '.recordList .choiceItem .subHeading.afterTitle', '.singleRecord .choiceItem .subHeading.afterTitle' ); var elementsAmerican = new Array ( '#intro .quote', '.singleRecord .product .leadQuote' ); if (typeof (elementOverride) == 'string' && elementOverride.length > 3) elements = elementOverride.split(','); else if (typeof (elementOverride) == 'object') elements = elementOverride; /* use element array instead of string! tab font color goes skewiff otherwise (weird but true) */ //Cufon.replace(elements,{separate: 'none'}); // force cufon to use 1 cufon element /*if ($('.cufon-alt').html()) Cufon.refresh(elements); else Cufon.replace(elements);*/ // forceHitArea to prevent IE7 bug if ($('.cufon-alt').html()) Cufon.refresh(elements,{forceHitArea:true}); else { Cufon.replace(elementsAmerican, {forceHitArea:true, fontFamily: "american"} ) Cufon.replace(elements, {forceHitArea:true, fontFamily: "Nobel-Bold"} ) }; } $(document).ready(function () { initCufon(); }); /* '.choiceItem h3', '.widgets h3', '.calendar th', '.sponsor .txt h3',*/