
function attachClickEventsToTabs(tabClass,paneClass){var iconTabArray=$$('ul.'+tabClass+' li');iconTabArray.each(function(tab){Event.observe(tab,'mouseover',function(eventData){var tabLI=Event.element(eventData);while(tabLI.tagName.toLowerCase()!='li'){tabLI=tabLI.parentNode;}
Element.addClassName(tabLI,'hovered');});Event.observe(tab,'mouseout',function(eventData){var tabLI=Event.element(eventData);while(tabLI.tagName.toLowerCase()!='li'){tabLI=tabLI.parentNode;}
Element.removeClassName(tabLI,'hovered');});if(tab.parentNode.className.indexOf('nonJSTabs')<0){Event.observe(tab,'click',function(eventData){var tabAnchor=Event.element(eventData);while(tabAnchor.tagName.toLowerCase()!='a'){tabAnchor=tabAnchor.parentNode;}
tabAnchor.blur();var moduleWrapperDiv=tabAnchor.parentNode;while(moduleWrapperDiv.id.length<1){moduleWrapperDiv=moduleWrapperDiv.parentNode;}
var iconTabArray=$$('#'+moduleWrapperDiv.id+' ul.'+tabClass+' li');var dataDivArray=$$('#'+moduleWrapperDiv.id+' .'+paneClass);if(iconTabArray.length&&iconTabArray.length==dataDivArray.length){for(var loop=0,max=iconTabArray.length;loop<max;loop++){if(this===iconTabArray[loop]){Element.addClassName(iconTabArray[loop],'selected');Element.removeClassName(dataDivArray[loop],'jsHidden');var heading3Collection=dataDivArray[loop].getElementsByTagName('h3');if(heading3Collection.length){var heading2Collection=iconTabArray[loop].parentNode.parentNode.getElementsByTagName('h2');if(heading2Collection.length){heading2Collection[0].innerHTML=heading3Collection[0].innerHTML;}}}else{Element.removeClassName(iconTabArray[loop],'selected');Element.addClassName(dataDivArray[loop],'jsHidden');}}}
Event.stop(eventData);});}});};function initialiseIconTabs(){attachClickEventsToTabs('iconTabs','assetSliceWrapper');}
function initialiseTopTabs(){attachClickEventsToTabs('topTabs','topTabsPane');}
jQuery(document).ready(initialiseIconTabs);jQuery(document).ready(initialiseTopTabs);var LATEST_NEWS_ANIMATION_TIME=0;var LATEST_NEWS_DISPLAYED_TIME=2500;var LATEST_NEWS_QUEUE_NAME='latestNewsQueue';var LATEST_NEWS_QUEUE_MAP={scope:LATEST_NEWS_QUEUE_NAME};var LATEST_NEWS_FADE_FROM=0.99;var LATEST_NEWS_FADE_TO=0.01;function latestNewsFadeOut(){var theAnchor=$$('#latestBreakingNewsLeft a')[0];if(!theAnchor)theAnchor=$('latestHeadline');if(theAnchor)Effect.Fade(theAnchor,{from:LATEST_NEWS_FADE_FROM,to:LATEST_NEWS_FADE_TO,queue:LATEST_NEWS_QUEUE_MAP,duration:LATEST_NEWS_ANIMATION_TIME,afterFinish:latestNewsFadeIn});};function latestNewsFadeIn(){latestNewsIndex++;var lastIndex=Math.min(9,latestNewsData.length-1);if(latestNewsIndex>lastIndex)latestNewsIndex=0;var theAnchor=$$('#latestBreakingNewsLeft a')[0];if(!theAnchor){theAnchor=$('latestHeadline');}
if(theAnchor){theAnchor.href=latestNewsData[latestNewsIndex].uri;theAnchor.innerHTML=latestNewsData[latestNewsIndex].headline;}
var latestAssetType=$('latestAssetType');if(latestAssetType){latestAssetType.innerHTML=latestNewsData[latestNewsIndex].assetType;}
var latestReadMoreLink=$('latestReadMoreLink');if(latestReadMoreLink){latestReadMoreLink.href=latestNewsData[latestNewsIndex].uri;}
Effect.Appear(theAnchor,{from:LATEST_NEWS_FADE_TO,to:LATEST_NEWS_FADE_FROM,queue:LATEST_NEWS_QUEUE_MAP,duration:LATEST_NEWS_ANIMATION_TIME,afterFinish:startLatestNewsFadeOut});};function startLatestNewsFadeOut(){setTimeout('latestNewsFadeOut();',LATEST_NEWS_DISPLAYED_TIME);};jQuery(document).ready(startLatestNewsFadeOut);powerCarousel=function(sElementId,pImageData){if(arguments.length<2){throw new Error("Incorrect number of minimum parameters supplied when creating a new Power Carousel.");}
if(!$(sElementId)){throw new Error("The id [' + sElementId = '] was not found when creating a new Power Carousel.");}
this.oCarousel=$(sElementId);this.bInitialised=false;this.bAnimationInProgress=false;this.bTransitionInProgress=false;this.bMouseOverPaused=false;this.nCurrentlyDisplayedPowerImage=0;this.nNextPowerImageToDisplay=1;this.nSubmissiveTransitioningImage=null;this.bPausedOverNavigationOnly=false;var UA=navigator.userAgent;this.bSkipFade=(UA.indexOf('Mac')!=-1&&UA.indexOf('Firefox/2')!=-1);var safari2Mac=(UA.indexOf('Mac')!=-1&&UA.indexOf('Version/')==-1&&UA.indexOf('Safari/')!=-1);this.nTransitionTime=1;this.nMouseOverTransitionTime=0;this.nAnimationDelay=3000;this.pImageData=pImageData;this.nMaxOpacityValue=0.99;this.nMinOpacityValue=0.01;if(Prototype.Browser.IE){this.nMaxOpacityValue=1;this.nMinOpacityValue=0;}
if(UA.indexOf('Firefox/3')!=-1&&$('powerImageSummary')){$('powerImageSummary').setStyle({overflow:'visible'});}
this.sPowerImageSelector='.powerImageItem img';this.sPowerImageSummarySelector='.powerImageSummary .summary';this.sPowerImageNavigationThumbClass='powerImageThumb';this.sPowerImageNavigationThumbSelector='.powerImageThumb';this.sCarouselNavigatorSelector='#powerImageNavigatorOuter';this.oAnimationTimer=null;this.oMouseOverTimer=null;this.sQueueName='powerImageQueue';this.oQueueMap={scope:this.sQueueName};};powerCarousel.prototype.initialise=function(){this.pPowerImages=$$(this.sPowerImageSelector);this.pPowerImageSummaries=$$(this.sPowerImageSummarySelector);this.pNavigationThumbs=$$(this.sPowerImageNavigationThumbSelector);this.oCarouselNavigator=$$(this.sCarouselNavigatorSelector)[0];if(this.pPowerImages.length!=this.pImageData.length){throw new Error("The number of power image placeholders "+this.pPowerImages.length+"does not match the amount of data supplied "+this.pImageData.length+".");}else{var pTemporaryImagePreloadArray=[];this.pImageData.each(function(powerImageFilename){var tempImg=new Image();if(safari2Mac){tempImg.onload=this.loadedPowerImage.bindAsEventListener(this);}else{Event.observe(tempImg,'load',this.loadedPowerImage.bindAsEventListener(this));}
tempImg.src=powerImageFilename;pTemporaryImagePreloadArray[pTemporaryImagePreloadArray.length]=tempImg;},this);this.bInitialised=true;}};powerCarousel.prototype.loadedPowerImage=function(eventData){if(this.loadedPowerImageCount==null){this.loadedPowerImageCount=0;}
this.loadedPowerImageCount++;if(this.loadedPowerImageCount==this.pImageData.length){var nImageDataIndex=0;this.pPowerImages.each(function(powerImageNode){powerImageNode.src=this.pImageData[nImageDataIndex++];},this);this.intialiseRollovers();this.startAnimation();}};powerCarousel.prototype.intialiseRollovers=function(){this.pNavigationThumbs.each(function(powerImageThumbNode){powerImageThumbNode.observe('mouseover',this.mouseOverPowerImageThumb.bindAsEventListener(this));},this);if(!this.bPausedOverNavigationOnly){this.oCarousel.observe('mouseover',this.mouseOverCarousel.bindAsEventListener(this));this.oCarousel.observe('mouseout',this.mouseOutCarousel.bindAsEventListener(this));}
this.oCarouselNavigator.observe('mouseover',this.mouseOverCarousel.bindAsEventListener(this));this.oCarouselNavigator.observe('mouseout',this.mouseOutCarousel.bindAsEventListener(this));};powerCarousel.prototype.mouseOverCarousel=function(eventData){if(this.oMouseOverTimer!=null){clearTimeout(this.oMouseOverTimer);this.oMouseOverTimer=null;}
if(this.bAnimationInProgress){this.stopAnimation();}
this.bMouseOverPaused=true;};powerCarousel.prototype.mouseOutCarousel=function(eventData){if(this.oMouseOverTimer!=null){clearTimeout(this.oMouseOverTimer);this.oMouseOverTimer=null;}
this.oMouseOverTimer=setTimeout(this.actualMouseOutCarousel.bind(this),100);};powerCarousel.prototype.actualMouseOutCarousel=function(){this.bMouseOverPaused=false;this.startAnimation();};powerCarousel.prototype.startAnimation=function(){this.bAnimationInProgress=true;this.nMouseOverThumbEventTriggered=null;if(this.oAnimationTimer==null){this.oAnimationTimer=setTimeout(this.showNextItem.bind(this),this.nAnimationDelay);}};powerCarousel.prototype.showNextItem=function(eventData){this.oAnimationTimer=null;this.nNextPowerImageToDisplay=(this.nCurrentlyDisplayedPowerImage+1)%this.pPowerImages.length;this.showPowerImage(this.nNextPowerImageToDisplay);this.showPowerImageSummary(this.nNextPowerImageToDisplay);};powerCarousel.prototype.stopAnimation=function(){if(this.oAnimationTimer!=null){clearTimeout(this.oAnimationTimer);this.oAnimationTimer=null;}
this.bAnimationInProgress=false;};powerCarousel.prototype.mouseOverPowerImageThumb=function(eventData){var oNode=Event.element(eventData);while(!Element.hasClassName(oNode,this.sPowerImageNavigationThumbClass))oNode=oNode.parentNode;var nNodeIndex=parseInt(oNode.id.substring(oNode.id.lastIndexOf('_')+1),10);if(this.nMouseOverThumbEventTriggered!=nNodeIndex){this.nMouseOverThumbEventTriggered=nNodeIndex;if(this.nCurrentlyDisplayedPowerImage!=nNodeIndex||this.bTransitionInProgress){var nFadeFromOpacityValue;var nAppearFromOpacityValue;if(this.bTransitionInProgress){if(this.nCurrentlyDisplayedPowerImage==nNodeIndex){this.nCurrentlyDisplayedPowerImage=this.nSubmissiveTransitioningImage;}
nFadeFromOpacityValue=Element.extend(this.pPowerImages[this.nCurrentlyDisplayedPowerImage].parentNode).getOpacity();nAppearFromOpacityValue=1-nFadeFromOpacityValue;this.cancelEffects();if(this.nSubmissiveTransitioningImage!=nNodeIndex){this.instantFadeSubmissiveImage();this.instantFadeSubmissiveSummary();}}
this.nNextPowerImageToDisplay=nNodeIndex;this.showPowerImage(this.nNextPowerImageToDisplay,nFadeFromOpacityValue,nAppearFromOpacityValue);this.showPowerImageSummary(this.nNextPowerImageToDisplay);}}};powerCarousel.prototype.showPowerImage=function(nNodeIndex,nFadeFromOpacityValue,nAppearFromOpacityValue){var oNodeToFadeFrom=Element.extend(this.pPowerImages[this.nCurrentlyDisplayedPowerImage].parentNode);var oNodeToFadeTo=Element.extend(this.pPowerImages[nNodeIndex].parentNode);if(this.bSkipFade){oNodeToFadeFrom.setStyle({zIndex:2}).hide();oNodeToFadeTo.setStyle({zIndex:3}).show();this.pNavigationThumbs[this.nCurrentlyDisplayedPowerImage].removeClassName('selected');this.pNavigationThumbs[nNodeIndex].addClassName('selected');this.nextItemFullyLoaded();return;}
nFadeFromOpacityValue=nFadeFromOpacityValue||this.nMaxOpacityValue;nAppearFromOpacityValue=nAppearFromOpacityValue||this.nMinOpacityValue;var timeToFade=(this.bMouseOverPaused)?this.nMouseOverTransitionTime:this.nTransitionTime;var bSwappedAt50Percent=false;Effect.Appear(oNodeToFadeTo,{from:nAppearFromOpacityValue,to:this.nMaxOpacityValue,duration:timeToFade,queue:this.oQueueMap});Effect.Fade(oNodeToFadeFrom,{from:nFadeFromOpacityValue,to:this.nMinOpacityValue,duration:timeToFade,queue:this.oQueueMap,beforeStart:function(effectObj){this.nSubmissiveTransitioningImage=nNodeIndex;this.bTransitionInProgress=true;oNodeToFadeFrom.setStyle({zIndex:3}).show();oNodeToFadeTo.setStyle({zIndex:2}).show();}.bind(this),beforeUpdate:function(effectObj){var bAfterHalfwayPoint=effectObj.totalFrames/2<=effectObj.currentFrame;if(bAfterHalfwayPoint&&!bSwappedAt50Percent){bSwappedAt50Percent=true;this.nSubmissiveTransitioningImage=this.nCurrentlyDisplayedPowerImage;this.nCurrentlyDisplayedPowerImage=nNodeIndex;this.pNavigationThumbs[this.nSubmissiveTransitioningImage].removeClassName('selected');this.pNavigationThumbs[this.nCurrentlyDisplayedPowerImage].addClassName('selected');oNodeToFadeFrom.setStyle({zIndex:2});oNodeToFadeTo.setStyle({zIndex:3});}}.bind(this),afterFinish:function(effectObj){this.nSubmissiveTransitioningImage=null;this.bTransitionInProgress=false;this.nextItemFullyLoaded();oNodeToFadeFrom.hide();}.bind(this)});};powerCarousel.prototype.nextItemFullyLoaded=function(){if(!this.bMouseOverPaused){this.startAnimation();}};powerCarousel.prototype.cancelEffects=function(){var queue=Effect.Queues.get(this.sQueueName);queue.each(function(e){e.cancel();});this.bTransitionInProgress=false;};powerCarousel.prototype.instantFadeSubmissiveImage=function(){var oNode=Element.extend(this.pPowerImages[this.nSubmissiveTransitioningImage].parentNode);oNode.setStyle({opacity:this.nMinOpacityValue,zIndex:1});oNode.hide();this.pNavigationThumbs[this.nSubmissiveTransitioningImage].removeClassName('selected');};powerCarousel.prototype.instantFadeSubmissiveSummary=function(){var oNode=this.pPowerImageSummaries[this.nSubmissiveTransitioningImage];oNode.setStyle({opacity:this.nMinOpacityValue,zIndex:1});oNode.hide();};powerCarousel.prototype.showPowerImageSummary=function(nNodeIndex){var oldNode=this.pPowerImageSummaries[this.nCurrentlyDisplayedPowerImage];var newNode=this.pPowerImageSummaries[nNodeIndex];if(this.bSkipFade){oldNode.hide();newNode.show();this.nCurrentlyDisplayedPowerImage=nNodeIndex;return;}
var timeToFade=(this.bMouseOverPaused)?this.nMouseOverTransitionTime:this.nTransitionTime;Effect.Appear(newNode,{from:this.nMinOpacityValue,to:this.nMaxOpacityValue,duration:timeToFade,queue:this.oQueueMap,beforeStart:function(){oldNode.hide();}});};var hoveredPromoImages={'SkyGoHD':'SkyGoHDOver-360-2.png','skyHd':'skyHdOver-360-2.png','joinSky':'joinSkyOver-360-2.png'};var throwAwayImg
function loadPromoImage(container){container=$(container);var selectedPromo=selectRandomElement(['SkyGoHD','skyHd','joinSky']);throwAwayImg=new Image();throwAwayImg.src=IMAGE_BASE_URL+'sky1/promo/'+hoveredPromoImages[selectedPromo];var promo=container.down('.'+selectedPromo);promo.removeClassName('hidden');}
function initQuoteModule(){if(typeof(quoteAssetArray)!='undefined'&&quoteAssetArray.length>0){var quoteAsset=selectRandomElement(quoteAssetArray);$$('#quoteModule .quoteText a')[0].innerHTML=quoteAsset.quote;$$('#quoteModule .quoteByline')[0].innerHTML=quoteAsset.byline;$$('#quoteModule .quoteAsset')[0].innerHTML=quoteAsset.shortHeadline;$$('#quoteModule .quoteLink').each(function(link){link.href=quoteAsset.uri;link.title=quoteAsset.mainHeadline;Element.addClassName(link,'randomQuote')})
$$('#quoteModule .readMoreLink').each(function(link){link.href=quoteAsset.uri;Element.addClassName(link,'randomQuote')})
$$('#quoteModule .quoteContent')[0].removeClassName('jsHidden');}}
jQuery(document).ready(initQuoteModule);jQuery(".rollover").live("mouseover",function(){jQuery(this).closest(".rollover").addClass("hovered");});jQuery(".rollover").live("mouseout",function(){jQuery(this).closest(".rollover").removeClass("hovered");});var Jive=Jive||{};;(function($,undefined){var stack=[];Jive.domNodeToPixels=function(node){var node=jQuery(node);var coord=node.offset();coord.width=node.width();coord.height=node.height();coord.radiusX=coord.width/2;coord.radiusY=coord.height/2;coord.centerX=coord.left+coord.radiusX;coord.centerY=coord.top+coord.radiusY;return coord;};Jive.testViewForObjectOverlap=function(objA,objB){var targetA=Jive.domNodeToPixels(objA);var targetB=Jive.domNodeToPixels(objB);var distanceX=targetA.radiusX+targetB.radiusX;var distanceY=targetA.radiusY+targetB.radiusY;var rv=(Math.abs(targetA.centerX-targetB.centerX)<distanceX)&&(Math.abs(targetA.centerY-targetB.centerY)<distanceY);return rv};$(document).ready(function(){var events={modal:{opened:"ModalOverlayAcrossEntireScreen",closed:"ModalOverlayClosed"}};var selectorPageHogs=".bannerAdWrapper300x250, .bannerAdWrapper300x250Outer, .bannerAdWrapper730x86, #heroHtmlSnippetElement,.htmlSnippetLeft,.htmlSnippetRight, .advert, .obuPlayer, .mpu";var hide=function(target){var hogs=$(selectorPageHogs);stack.push(hogs.filter(":visible").filter(function(){return Jive.testViewForObjectOverlap(this,target)}).hide());};var hideForcibly=function(){var hogs=$(selectorPageHogs);stack.push(hogs.filter(":visible").hide());};var show=function(){$(stack.pop()).show();};$(document).bind(events.modal.opened,function(e,node,force){if(force){hideForcibly(node);}else{hide(node);}});$(document).bind(events.modal.closed,function(e,node){show(node);});$.fn.hideAds=function(){hide(this);};$.fn.showAds=function(){show(this);};});}(jQuery.noConflict()));function getCorrespondingDisplayDivFromHref(theHref){var currentlyDisplayedDiv=$(theHref.slice(theHref.lastIndexOf('#')+1,theHref.lastIndexOf('Link'))+'Wrapper');return currentlyDisplayedDiv;};function skyPlayerModuleCollectionMenuClick(eventData){var link=Event.element(eventData);while(link.tagName.toLowerCase()!='a')link=link.parentNode;var div=link;while(div.tagName.toLowerCase()!='div')div=div.parentNode;var menuItems=$$('#skyPlayerModuleCollection .menubar div.selected');menuItems.each(function(link){if(link==div){return;}
Element.removeClassName(link,'selected');Element.addClassName(getCorrespondingDisplayDivFromHref(link.getElementsByTagName('a')[0].href),'jsHidden');});Element.addClassName(div,'selected');Element.removeClassName(getCorrespondingDisplayDivFromHref(link.href),'jsHidden');if(eventData!=null)Event.stop(eventData);};function setUpSkyPlayerModuleCollection(){var menuItems=$$('#skyPlayerModuleCollection .menubar div a');menuItems.each(function(link){Event.observe(link,'click',skyPlayerModuleCollectionMenuClick);});$$('#sky1SkyPlayerEditorsPickWrapper a').each(function(link){link.href+='/editorspicks';});$$('#sky1SkyPlayerLastChanceToSeeWrapper a').each(function(link){link.href+='/lastchance';});};jQuery(document).ready(setUpSkyPlayerModuleCollection);var coedit=coedit||{};coedit.slicedGalleryControl=function(l_sSelf,l_sElementId)
{if(arguments.length<2)
{throw new Error("Incorrect number of minimum parameters supplied when creating a Sliced Gallery Control.");}
if(document.getElementById(l_sElementId)==undefined)
{throw new Error("Could not find anything with id="+l_sElementId+" when creating a Sliced Gallery Control.");}
this.m_sTargetElement=l_sElementId;this.m_oTargetElement=$(l_sElementId);this.m_sSelf=l_sSelf;this.m_bTransitioning=false;this.m_bPauseButtonPause=false;this.m_bMouseOverPause=false;this.m_nCurrentSelectedImageIndex=0;this.m_nMinWidth=90;this.m_nMinOpacity=0.5;this.m_nMaxWidth=300;this.m_nSteps=15;this.m_nStepAmount=(this.m_nMaxWidth-this.m_nMinWidth)/this.m_nSteps;this.m_nTimeBetweenTransitions=3000;this.m_nTimeBetweenSteps=40;this.m_nLastImageMousedOver=-1;this.decorate();setTimeout(this.m_sSelf+'.masterTimer()',this.m_nTimeBetweenTransitions);};coedit.slicedGalleryControl.prototype.decorate=function()
{var l_pDivWrappers=$$('#'+this.m_sTargetElement+' .slicedImageWrapper');var l_oSelf=this;for(var loop=0,max=l_pDivWrappers.length;loop<max;loop++)
{var l_oDiv=l_pDivWrappers[loop];l_oDiv.getElementsByTagName('img')[0].style.left='0px';if(loop==this.m_nCurrentSelectedImageIndex)
{l_oDiv.style.width=this.m_nMaxWidth+'px';this.setOpacity(l_oDiv,1);}
else
{l_oDiv.style.width=this.m_nMinWidth+'px';this.setOpacity(l_oDiv,this.m_nMinOpacity);l_oDiv.getElementsByTagName('img')[0].style.left=(0-(this.m_nMaxWidth-this.m_nMinWidth)/2)+'px';}
l_oDiv.getElementsByTagName('img')[0].onmouseover=this.userMouseOverSlice.bind(this,loop);}
var l_pSliceWrap=$$('#'+this.m_sTargetElement+' .sliceWrapper');if(l_pSliceWrap.length)
{l_pSliceWrap[0].onmouseover=this.mouseOnGallery.bind(this);l_pSliceWrap[0].onmouseout=this.mouseOffGallery.bind(this);}};coedit.slicedGalleryControl.prototype.mouseOverSlice=function(l_nThisImageIndex)
{if(this.m_bTransitioning==false&&l_nThisImageIndex!=this.m_nCurrentSelectedImageIndex)
{this.m_bTransitioning=true;this.toggleSlice(this.m_nCurrentSelectedImageIndex,l_nThisImageIndex);}};coedit.slicedGalleryControl.prototype.userMouseOverSlice=function(l_nThisImageIndex)
{this.m_nLastImageMousedOver=l_nThisImageIndex;this.mouseOverSlice(l_nThisImageIndex);};coedit.slicedGalleryControl.prototype.mouseOnGallery=function()
{this.m_bMouseOverPause=true;};coedit.slicedGalleryControl.prototype.mouseOffGallery=function()
{this.m_bMouseOverPause=false;this.m_nLastImageMousedOver=-1;};coedit.slicedGalleryControl.prototype.toggleSlice=function(l_nReduceSliceIndex,l_nGrowSliceIndex)
{var l_bContinueReducing=this.reduceSlice(l_nReduceSliceIndex);var l_bContinueGrowing=this.growSlice(l_nGrowSliceIndex);if(l_bContinueReducing||l_bContinueGrowing)
{setTimeout(this.m_sSelf+'.toggleSlice('+l_nReduceSliceIndex+','+l_nGrowSliceIndex+')',this.m_nTimeBetweenSteps);}
else
{this.m_nCurrentSelectedImageIndex=l_nGrowSliceIndex;this.showLinkInfo();this.m_bTransitioning=false;if(this.m_bMouseOverPause&&this.m_nLastImageMousedOver!=-1&&this.m_nLastImageMousedOver!=this.m_nCurrentSelectedImageIndex){this.showNextImage();}}};coedit.slicedGalleryControl.prototype.showLinkInfo=function()
{var l_oLink=$$('#'+this.m_sTargetElement+' .linkedHeadingWrapper a')[0];var l_oLinkData=this.m_pSlicedData[this.m_nCurrentSelectedImageIndex];l_oLink.href=l_oLinkData.linkhref;l_oLink.innerHTML=l_oLinkData.linktext;l_oLink.title='Click for more about: '+l_oLinkData.linktext;};coedit.slicedGalleryControl.prototype.reduceSlice=function(l_nSliceIndex)
{var l_pDivWrappers=$$('#'+this.m_sTargetElement+' .slicedImageWrapper');var l_oDivWrapper=l_pDivWrappers[l_nSliceIndex];var l_nWidth=parseInt(l_oDivWrapper.style.width,10);if(l_nWidth>this.m_nMinWidth)
{l_oDivWrapper.style.width=l_nWidth-this.m_nStepAmount+'px';var l_nStepCount=(this.m_nMaxWidth-parseInt(l_oDivWrapper.style.width,10))/this.m_nStepAmount;var l_nStepOpacity=((1-this.m_nMinOpacity)/this.m_nSteps)*l_nStepCount;this.setOpacity(l_oDivWrapper,1-l_nStepOpacity);l_oDivWrapper.getElementsByTagName('img')[0].style.left=parseInt(l_oDivWrapper.getElementsByTagName('img')[0].style.left,10)-(this.m_nStepAmount/2)+'px';return true;}
else
{l_oDivWrapper.style.width=this.m_nMinWidth+'px';Element.removeClassName(l_oDivWrapper,'selected');this.setOpacity(l_oDivWrapper,this.m_nMinOpacity);l_oDivWrapper.getElementsByTagName('img')[0].style.left=(0-(this.m_nMaxWidth-this.m_nMinWidth)/2)+'px';return false;}};coedit.slicedGalleryControl.prototype.growSlice=function(l_nSliceIndex)
{var l_pDivWrappers=$$('#'+this.m_sTargetElement+' .slicedImageWrapper');var l_oDivWrapper=l_pDivWrappers[l_nSliceIndex];var l_nWidth=parseInt(l_oDivWrapper.style.width,10);if(l_nWidth<this.m_nMaxWidth)
{l_oDivWrapper.style.width=l_nWidth+this.m_nStepAmount+'px';var l_nStepCount=(parseInt(l_oDivWrapper.style.width,10)-this.m_nMinWidth)/this.m_nStepAmount;var l_nStepOpacity=((1-this.m_nMinOpacity)/this.m_nSteps)*l_nStepCount;this.setOpacity(l_oDivWrapper,this.m_nMinOpacity+l_nStepOpacity);l_oDivWrapper.getElementsByTagName('img')[0].style.left=parseInt(l_oDivWrapper.getElementsByTagName('img')[0].style.left,10)+(this.m_nStepAmount/2)+'px';return true;}
else
{l_oDivWrapper.style.width=this.m_nMaxWidth+'px';Element.addClassName(l_oDivWrapper,'selected');this.setOpacity(l_oDivWrapper,1);l_oDivWrapper.getElementsByTagName('img')[0].style.left='0px';return false;}};coedit.slicedGalleryControl.prototype.setOpacity=function(l_oNode,l_nOpacity)
{if(l_oNode!=undefined&&l_nOpacity!=undefined)
{l_oNode.style.opacity=l_nOpacity;l_oNode.style.MozOpacity=l_nOpacity;l_oNode.style.KhtmlOpacity=l_nOpacity;l_oNode.style.filter="alpha(opacity="+l_nOpacity*100+")";}};coedit.slicedGalleryControl.prototype.masterTimer=function()
{if(this.m_bTransitioning==false){if((this.m_bMouseOverPause&&this.m_nLastImageMousedOver!=-1)||(this.m_bPauseButtonPause==false&&this.m_bMouseOverPause==false)){this.showNextImage();}}
setTimeout(this.m_sSelf+'.masterTimer()',this.m_nTimeBetweenTransitions);};coedit.slicedGalleryControl.prototype.showNextImage=function()
{var l_nNextImageIndex=this.m_nCurrentSelectedImageIndex+1;if(this.m_nLastImageMousedOver!=-1){l_nNextImageIndex=this.m_nLastImageMousedOver;}
this.mouseOverSlice((l_nNextImageIndex)%this.m_pSlicedData.length);};(function($){$.fn.imageJukebox=function(){this.each(function(){var module=$(this);if($('body').hasClass('ie')&&$('body').hasClass('skyatlantic')){module.find('a').wrapInner('<span class="ie-filter"/>')}
module.find('a').bind('mouseover',function(){module.find('.hovered').removeClass('hovered');$(this).addClass('hovered');module.find('.current-image img').attr('src',$(this).data('image'));});});return this;}})(jQuery);jQuery(document).ready(function(){jQuery(".image-jukebox").imageJukebox();});function tripleOptionSlotSetup(){var theAnchors=$$('.tripleOptionSlotWrapper .droppable a');theAnchors.each(function(theAnchor){if(theAnchor.className!='skyPlayerLogo'){Event.observe(theAnchor,'mouseover',tripleOptionSlotMouseOver);}});}
function tripleOptionSlotMouseOver(eventData){var selectedAnchor=Event.element(eventData);if(selectedAnchor.tagName.toLowerCase()!='a')return;var parentDroppable=selectedAnchor.parentNode;if(parentDroppable.className=='internalPositioner'){parentDroppable=parentDroppable.parentNode;}
var optionSlotWrapper=Element.extend(parentDroppable.parentNode);var tripleOptionsInner=Element.extend(optionSlotWrapper.parentNode);var optionImageWrapper=tripleOptionsInner.select('.tripleOptionSlotImageWrapper')[0];var theAnchors=optionSlotWrapper.select('.droppable a');theAnchors.each(function(theAnchor){theAnchor.removeClassName('selected');});selectedAnchor.addClassName('selected');var theSelectedIndex=parentDroppable.id.sub(/hotspot.*_/,'')
var theImageAnchors=optionImageWrapper.select('a');theImageAnchors.each(function(theAnchor,loop){if(loop==theSelectedIndex){theAnchor.style.zIndex='5';}else{theAnchor.style.zIndex='1';}});}
jQuery(document).ready(tripleOptionSlotSetup);function selectRandomElement(array){if(array.length==0)return null;var rnd=Math.floor(Math.random()*array.length);return array[rnd];}
var UA=navigator.userAgent;var safari2Mac=(UA.indexOf('Mac')!=-1&&UA.indexOf('Version/')==-1&&UA.indexOf('Safari/')!=-1);if(safari2Mac){var dot1=location.hostname.lastIndexOf(".");var domainPart=location.hostname.substring(0,dot1);var dot2=domainPart.lastIndexOf(".");if(domainPart.substring(dot2+1,dot1)=="co"){domainPart=location.hostname.substring(0,dot2);dot2=domainPart.lastIndexOf(".");}
document.domain=location.hostname.substring(dot2+1);}
(function($,undefined){$(document).ready(function(){var nameCookie=Cookie.get('uifd');var sessionCookie=Cookie.get('skySSO');if(sessionCookie!=null&&nameCookie!=null){var firstName=nameCookie.split(" ")[0];if(firstName.length>20){firstName=firstName.substring(0,20)+'&hellip;';}
$('ul.logged-in li.first').after('<li class="no-separator"><span class="logged-in-greeting">Hi '+firstName+'</span></li>');$('ul.anonymous').hide();$('ul.logged-in').removeClass("hidden");}});})(jQuery.noConflict());;(function($,undefined){var widgetClass=".showing-times-table",days="ul",day="li",dayWithListing="li:has(a)",listingTable="table",listingsRow="table tr:not(.separator)",listingsRowWithSeparator="tr.separator",row="tr",dayLink="ul a",current="current";var render=function(e){var widget=$(this).parents(widgetClass),container=widget.children(days),selectables=container.children(day).filter(dayWithListing),clicked=$(this).closest(day),index=selectables.index(clicked);selectables.removeClass(current).eq(index).addClass(current);$(listingTable,widget).removeClass(current).eq(index).addClass(current);return false;};$(dayLink,widgetClass).attr("href","#").live("click",render);$(listingsRow,widgetClass).live("mouseover",function(){$(this).prevAll(listingsRowWithSeparator).first().next(row).addClass("hover").next(row).addClass("last");});$(listingsRow,widgetClass).live("mouseout",function(){$(this).prevAll(listingsRowWithSeparator).first().next(row).next(row).andSelf().removeClass("hover last");});}(jQuery.noConflict()));;(function($,undefined){$(".jive-selectable-hover .jive-item").live("mouseenter",function(e){var parent=$(this).closest(".jive-selectable-hover");var jive_items=$(".jive-item",parent);var moduleId=$(this).closest(".jive-module").attr("id");$(document).trigger("jive-selectable-hover",[moduleId,jive_items.index(this),this,parent[0],jive_items]);return false;});})(jQuery);;(function($){var hover=true;function handleSelectableHover(e,module,index,item,context,itemList){if(!hover){return false;}
var summary=$(item).find('.summary');var dataSummary=summary.attr('data-summary');if(dataSummary&&dataSummary.length>0){summary.html(dataSummary);}
$(item).addClass("selected");if(undefined!==itemList){itemList.not(function(index){if(this!==item){var elem=$(this);var thisSummary=elem.find('.summary');if(thisSummary){var thisSummaryText=thisSummary.data('summary');var thisSummaryShortLength=thisSummary.data('short-length');if(!!thisSummaryText&&!!thisSummaryShortLength){thisSummary.html(thisSummaryText.substring(0,thisSummaryShortLength).concat('...'));}
elem.removeClass("selected");}}});}}
function handleTabClick(e){handlePaginationClick(e,{pageNumber:0,animate:false});}
function handlePaginationClick(e,options){e.preventDefault();options=options||{animate:true}
$('ul.show-list').addClass('animating');hover=false;var elem=$(e.target),currentPageNumber,pageToShow,url,direction;var resetValues=function(){hover=true;$('ul.show-list').removeClass('animating');}
elem.blur();if(elem&&((elem.hasClass('prev-disabled')===true)||(elem.hasClass('next-disabled')===true))){resetValues();return false;}
if(options.pageNumber==0){pageToShow=0}else{currentPageNumber=$('#currentShows .pagination').data('page-number');direction=elem.hasClass('next')?'down':'up';pageToShow=(direction==='down')?currentPageNumber+1:currentPageNumber-1;if(isNaN(pageToShow)){resetValues();return false;}}
url="/pagination/currentShows/"+pageToShow;var tagName=$('#currentShows .filter-by li.selected a').data('tag');if(tagName!=''){url=url+"/"+tagName}
$.ajax({url:url,dataType:"html",success:function(html){var oldList=$('ul.show-list');var oldListItems=$('li.jive-item',oldList);var newListItems=$(html).find('ul.show-list li.jive-item');var firstNewItem=newListItems.eq(0);var newButtons=$(html).find('.pagination');var oldButtons=$('.pagination');var offset1;var offset2;var newOffset=null;var topPos=null;var completeFunc=null;if(newButtons.length&&newListItems.length&&oldList.length&&oldButtons.length){oldButtons.replaceWith(newButtons);if(direction==='down'){oldList.append(newListItems);oldListItems.removeClass('selected');topPos=$(firstNewItem).position().top;offset2=newOffset=(0-(topPos+oldList.scrollTop()));completeFunc=function(){oldListItems.remove();newOffset=Math.floor($(firstNewItem).position().top)+oldList.scrollTop();oldList.css('top',newOffset);firstNewItem.addClass('selected');resetValues();}}else{oldList.prepend(newListItems);var pos1=$(oldListItems.eq(0)).position();var pos2=$(firstNewItem).position();var oldScrollTop=oldList.scrollTop();offset1=(0-(pos1&&pos1.top+oldScrollTop));oldList.css('top',offset1);oldListItems.removeClass('selected');topPos=pos2&&pos2.top;offset2=topPos+oldList.scrollTop();completeFunc=function(){oldListItems.remove();firstNewItem.addClass('selected');resetValues();}}
if(completeFunc){var timeToAnimate=500
if(!options.animate){timeToAnimate=0}
oldList.animate({top:offset2},timeToAnimate,"easeInOutExpo",completeFunc);}}}});}
$(document).ready(function(i){var showsList=$('ul.show-list');showsList.css('overflow','visible').wrap('<div id="show-list-wrap" />');$(document).bind("jive-selectable-hover",handleSelectableHover);$('#currentShows .pagination a').live('click',function(e){if(!(showsList.hasClass('animating'))){handlePaginationClick(e);}});$('#currentShows .filter-by a.selected').live('click',function(e){e.preventDefault();});$('#currentShows .filter-by a:not(.selected)').live('click',function(e){e.preventDefault();$(this).closest("li").addClass('selected').siblings().removeClass('selected');handleTabClick(e);});});})(jQuery.noConflict());
