Events=EventDispatcher=function(){var a={};return{addEventListener:function(c,b){if(!a[c]){a[c]=[]}a[c].push(b);return this},removeEventListener:function(e,d){for(var c=0,b=a[e].length;c<b;c+=1){if(a[e][c]==d){a[e].splice(c,1)}}return this},dispatchEvent:function(f){var d=[];for(var e=1,b=arguments.length;e<b;e+=1){d.push(arguments[e])}if(a[f]){for(var c=0,b=a[f].length;c<b;c+=1){a[f][c].apply(this,d)}}return this}}}();ApplicationConstants=function(){};ApplicationConstants.START_UP="START UP";ApplicationConstants.UPDATE_CURRENT_VIEW="UPDATE CURRENT VIEW";ApplicationConstants.HIDE_ALL_VIEWS="HIDE ALL VIEWS";ApplicationConstants.CURRENT_ITEM_UPDATE="CURRENT ITEM UPDATE";ApplicationConstants.CURRENT_ITEM_UPDATED="CURRENT ITEM UPDATED";ApplicationConstants.LAUNCH_URL="LAUNCH URL";ApplicationConstants.LOAD_TAB="LOAD TAB";ApplicationConstants.STOP_SLIDESHOW="STOP SLIDESHOW";var Debug=function(){this.trace=function(a){}};de=new Debug();function trace(a){de.trace(a)}if(!window.Delegate){window.Delegate={}}Delegate.create=function(b,c){if(arguments.length>2){var a=[];for(var d=2;d<arguments.length;++d){a.push(arguments[d])}return function(){return c.apply(b,a)}}else{return function(){return c.call(b)}}};var DestinationsVO=function(b,a){this.win=b;this.url=a};var NavigationConfigVO=function(b,c,a){this.tab=b;this.win=c;this.url=a};var ConfigProxy=new function ConfigProxy(){var a=this;this.currentItem=1;ConfigProxy.getInstance=function(){return a};this.toString=function(){return"[object ConfigProxy]"};this.getCountry=function(){return country};this.setCountry=function(b){if(typeof(b)=="string"){country=b}};this.getLanguage=function(){return language};this.setLanguage=function(b){if(typeof(b)=="string"){language=b}};this.getLanguageCountry=function(){return language+"_"+country};this.getCurrentItem=function(){return this.currentItem};this.setCurrentItem=function(b){if(typeof(b)=="number"){this.currentItem=b}};return ConfigProxy};var DestinationsProxy=new function DestinationsProxy(){var a=this;var c=false;this.data=null;DestinationsProxy.getInstance=function(){if(c==false){a.initialize();c=true}return a};this.toString=function(){return"[object DestinationsProxy]"};var b=new Array();this.initialize=function(){};this.getUrlInfoById=function(d){return assets[d]};return DestinationsProxy};var SlideshowController=function(){var b=this;var d=1;var a=0;var e=2;var c=0;var g;var f=$("#heroItems li").length;this.initialize=function(){$(this).bind("START_APP",this.startup);$(this).bind("STOP_SLIDESHOW",this.stopSlideshow)};this.startup=function(i,h){$.event.trigger("LOAD_TAB",{tab:firstTabToLoad});if(f==1){return}c=timers[firstTabToLoad-1];g=window.setTimeout(b.nextSlide,c*1000);d=firstTabToLoad};this.stopSlideshow=function(){clearTimeout(g)};this.nextSlide=function(){d++;if(d==(f+1)){a++;d=1;if(a==e){$.event.trigger("LOAD_TAB",{tab:d});$.event.trigger("STOP_SLIDESHOW");return}}c=timers[d-1];if(c==0){$.event.trigger("LOAD_TAB",{tab:d});$.event.trigger("STOP_SLIDESHOW");return}g=window.setTimeout(b.nextSlide,c*1000);$.event.trigger("LOAD_TAB",{tab:d})}};var ConfigurationController=function(){var a=null;this.initialize=function(){a=this.getProxy();this.readAndSetMeta();$(this).bind("UPDATE_CURRENT_VIEW",this.updateCurrentItem)};this.updateCurrentItem=function(c,b){a.setCurrentItem(b.selected);$.event.trigger("CURRENT_ITEM_UPDATED",{currentItem:a.getCurrentItem()})};this.getProxy=function(){return ConfigProxy.getInstance()};this.readAndSetMeta=function(){var b=get_param("c");var c=get_param("l");if(b==null||c==null){a.setCountry($("meta[name=DCSext.pCC]").attr("content"));a.setLanguage($("meta[name=DCSext.pLL]").attr("content"))}else{a.setCountry(b);a.setLanguage(c)}}};var LaunchURLController=function(){var b=null;var a=null;this.initialize=function(){b=this.configProxy();a=this.destinationsProxy();Events.addEventListener(ApplicationConstants.LAUNCH_URL,this.launchURL)};this.launchURL=function(){var f=b.getCurrentItem();var d=a.getUrlInfoById(f);var c=d.destinationURL;if(c==undefined){return}var e=d.destinationTarget;if(e=="_blank"){window.open(c)}else{document.location.href=c}};this.configProxy=function(){return ConfigProxy.getInstance()};this.destinationsProxy=function(){return DestinationsProxy.getInstance()}};function get_param(b){b=b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var a="[\\?&]"+b+"=([^&#]*)";var d=new RegExp(a);var c=d.exec(window.location.href);if(c==null){return null}else{return c[1]}}function getFlashMovieObject(a){if(window.document[a]){return window.document[a]}if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[a]){return document.embeds[a]}}else{return document.getElementById(a)}}function extractUrl(a){return a.replace(/"/g,"").replace(/url\(|\)$/ig,"")}var NavigationMediator=function(){var c=$("#heroItems li").length;var b;var a=$("#heroItems li");this.initialize=function(d){this.setClickRoutine();$(this).bind("CURRENT_ITEM_UPDATE",this.updateActiveThumbnail);$(this).bind("START_APP",this.startup);$(this).bind("LOAD_TAB",this.loadTab);$(this).bind("TOOL_TIP_POSITION",this.setupToolTipsPosition)};this.loadTab=function(g,f){var d=f.tab;$.event.trigger("HIDE_ALL_VIEWS");$.event.trigger("CURRENT_ITEM_UPDATE",{currentItem:d});$.event.trigger("UPDATE_CURRENT_VIEW",{selected:d})};this.setClickRoutine=function(){$("#heroItems li").bind("click",this.clickAction,false)};this.clickAction=function(){var d=$("#heroItems li").index(this)+1;$.event.trigger("STOP_SLIDESHOW");$.event.trigger("HIDE_ALL_VIEWS");$.event.trigger("CURRENT_ITEM_UPDATE",{currentItem:d});$.event.trigger("UPDATE_CURRENT_VIEW",{selected:d})};this.updateActiveThumbnail=function(f,d){$("#heroItems li").removeClass("active");$("#heroItems li").eq((d.currentItem)-1).addClass("active")};this.startup=function(){if(ifOnlyOneItemHideNav){return}$("#heroControllerBackground").fadeTo(1000,0.5);$("#heroController").fadeIn(1000)};this.setupToolTipsPosition=function(f,d){$("#heroController").addClass("heroAlign"+d.tooltipsPosition)}};var TooltipMediator=function(){this.initialize=function(d){$("li[title]").qtip({style:{classes:"ui-tooltip-ups"},position:{at:a(d),my:b(d),viewport:$(window),adjust:{x:Number(c(d)),y:-6}}})};function b(d){switch(d){case"left":return"bottom left";case"right":return"bottom right";case"center":return"bottom center"}}function a(d){switch(d){case"left":return"top left";case"right":return"top right";case"center":return"top center"}}function c(d){switch(d){case"right":return"-10";case"left":return"10";case"center":return"0"}}};var StageMediator=function(){var c;var b;var a=$("#heroItems li");this.initialize=function(d){$(this).bind("HIDE_ALL_VIEWS",this.hideAllViews);$(this).bind("UPDATE_CURRENT_VIEW",this.displayCurrentView);c=$("#heroGallery div.heroWrapper").length};this.displayCurrentView=function(i,d){var h=d.selected;$("#heroGallery div.heroWrapper:eq("+(h-1)+")").fadeIn(1000);var g=$("#heroGallery div.heroWrapper:eq("+(h-1)+") div").hasClass("heroFlash");if(g&&$.browser.msie){var f=getFlashMovieObject("flash"+h);f.Rewind();f.Play()}};this.hideAllViews=function(){for(var d=1;d<c;d++){$("#heroGallery div.heroWrapper").hide()}}};var Globals=(function(){var b="GB";var c="en";var a="en_GB";return{getCountry:function(){return b},setCountry:function(d){if(typeof(d)=="string"){b=d}},getLanguage:function(){return c},setLanguage:function(d){if(typeof(d)=="string"){c=d}},getLanguageCountry:function(){return c+"_"+b}}})();var tooltipsPosition="right";var firstTabToLoad=1;var ifOnlyOneItemHideNav=false;$(document).ready(function(){navigation=new NavigationMediator();tooltips=new TooltipMediator();stage=new StageMediator();cc=new ConfigurationController();slideshow=new SlideshowController();navigation.initialize(tooltipsPosition);cc.initialize();tooltips.initialize(tooltipsPosition);stage.initialize();slideshow.initialize();$.event.trigger("TOOL_TIP_POSITION",{tooltipsPosition:tooltipsPosition});var d=$("#heroGallery div.heroWrapper:eq(0) div").hasClass("heroImageOverlay");if(d){var c=$("#heroGallery div.heroWrapper:eq(0) .heroImageOverlay").css("backgroundImage");$.imgpreload(extractUrl(c),b)}else{var e=$("#heroGallery div.heroWrapper:eq(0) img").attr("src");if(e){setTimeout(function(){a(e)},300)}else{setTimeout(b,1000)}}function a(f){$.imgpreload(extractUrl(f),b)}function b(){$("#placeholder").fadeOut(500,function(){if($.browser.msie){var f=$("#heroMediaContainer").height();$("#heroMediaContainer").css("height",f)}$.event.trigger("START_APP",{tab:firstTabToLoad})})}});var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var a;var b;var c;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(c){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(c){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a="WIN 2,0,0,11"}catch(c){a=-1}}return a}function GetSwfVer(){var g=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var a=navigator.plugins["Shockwave Flash"+f].description;var e=a.split(" ");var c=e[2].split(".");var h=c[0];var b=c[1];var d=e[3];if(d==""){d=e[4]}if(d[0]=="d"){d=d.substring(1)}else{if(d[0]=="r"){d=d.substring(1);if(d.indexOf("d")>0){d=d.substring(0,d.indexOf("d"))}}}var g=h+"."+b+"."+d}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){g=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){g=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){g=2}else{if(isIE&&isWin&&!isOpera){g=ControlVersion()}}}}}return g}function DetectFlashVer(f,d,c){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var e=versionArray[0];var a=versionArray[1];var b=versionArray[2];if(e>parseFloat(f)){return true}else{if(e==parseFloat(f)){if(a>parseFloat(d)){return true}else{if(a==parseFloat(d)){if(b>=parseFloat(c)){return true}}}}}return false}}}function AC_AddExtension(b,a){if(b.indexOf("?")!=-1){return b.replace(/\?/,a+"?")}else{return b+a}}function AC_Generateobj(e,d,a){var c="";if(isIE&&isWin&&!isOpera){c+="<object ";for(var b in e){c+=b+'="'+e[b]+'" '}c+=">";for(var b in d){c+='<param name="'+b+'" value="'+d[b]+'" /> '}c+="</object>"}else{c+="<embed ";for(var b in a){c+=b+'="'+a[b]+'" '}c+="> </embed>"}document.write(c)}function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_SW_RunContent(){var a=AC_GetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_GetArgs(b,e,g,d,h){var a=new Object();a.embedAttrs=new Object();a.params=new Object();a.objAttrs=new Object();for(var c=0;c<b.length;c=c+2){var f=b[c].toLowerCase();switch(f){case"classid":break;case"pluginspage":a.embedAttrs[b[c]]=b[c+1];break;case"src":case"movie":b[c+1]=AC_AddExtension(b[c+1],e);a.embedAttrs.src=b[c+1];a.params[g]=b[c+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":a.objAttrs[b[c]]=b[c+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":a.embedAttrs[b[c]]=a.objAttrs[b[c]]=b[c+1];break;default:a.embedAttrs[b[c]]=a.params[b[c]]=b[c+1]}}a.objAttrs.classid=d;if(h){a.embedAttrs.type=h}return a}function isFlashSupported(){var b=9;var a=0;var c=31;return DetectFlashVer(b,a,c)}var width=710;var height=400;var flashDetected=isFlashSupported();function updateUserPreference(){var a=$(".RIF_Panel:not(.RIF_Collapsed)").attr("id");$.ajax({type:"POST",url:"/homepage/userpref",data:"openModule="+a})}function addSWF(e,d,a,b,c,f){AC_FL_RunContent("width",d,"height",a,"src",e,"quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","align","middle","play","true","loop","true","scale","exactfit","wmode","transparent","devicefont","false","id",b,"bgcolor","#ffffff","name",c,"menu","false","allowFullScreen","false","allowScriptAccess","always","flashVars",f,"base","/media/","movie","/media/flash/swfs/"+e,"salign","")}function addNoSWF(b,a,c){document.write("<a href="+b+"><img src="+a+' width="710" height="400" id="null" border="0" alt='+c+"></a>			")};
