var iplayer={};iplayer.extendModule=function(b,a){if(!b||!a){throw ('Error extending module, required parameters not avaialable. Module name = "'+b+'"')}if(typeof(b)==="string"){b=b.toLowerCase()}this[b]=a};iplayer.extendObject=function(a,c){if(!(typeof(a)==="object"&&typeof(c)==="object")){return}for(var b in c){a[b]=c[b]}};iplayer.extendConfig=function(b){if(!(typeof(b)==="object")){return}try{iplayer.extendObject(iplayer.config,b)}catch(a){if(console&&console.log&&console.dir){console.log("Error extending the config");console.dir(a)}else{throw ("Error extending the config")}}};iplayer.environment=function(){var e=navigator,c=e.userAgent.toLowerCase(),b=/windows/.test(c),d={},a,f=/opera\/([\d.]+)/;if(d.opera=/opera/.test(c)){a=parseFloat(c.match(f)[1])}if(d.wii=/nintendo wii/.test(c)){a=parseFloat(c.match(f)[1])}if(d.msie=/msie/.test(c)&&!d.opera){a=parseFloat(c.match(/msie ([\d.]+)/)[1])}if(d.firefox=/firefox/.test(c)){a=parseFloat(c.match(/firefox\/([\d.]+)/)[1])}if(d.netscape=/netscape/.test(c)){a=parseFloat(c.match(/netscape\/([\d.]+)/)[1])}if(d.safari=/safari/.test(c)){a=parseFloat(c.match(/safari\/([\d.]+)/)[1])}d.iphone=((/(iphone|ipod)/.test(c))&&window.orientation);d.version=a;return{os:{win:b,winXP:b&&(/nt 5\./.test(c)),winVista:b&&(/nt 6\./.test(c)),mac:/mac/.test(c),linux:/linux/.test(c),unix:/x11/.test(c)},browser:d,pluginMimeTypeExists:function(g){return(e.mimeTypes&&e.mimeTypes[g])?!!(e.mimeTypes[g].enabledPlugin):false}}}();iplayer.sage={};iplayer.sage.site={IPLAYER:"iplayer",CBBC:"cbbc",CBEEBIES:"cbeebies"};iplayer.sage.trackEvent=function(){var a=iplayer.user,c=(arguments.length>1),b=(c?arguments[0]:""),d=arguments[(c?1:0)];sageTrack_ev("775","d003","3","","uu:"+a.getBBCuid()+",ver:1,pg:"+a.getPGmode()+",lab:"+((a.getLabsEnabled())?1:0)+",ste:"+b+",cgr:1,"+d)};iplayer.getString=function(d,c){var e=iplayer.localisation[d];if(!e){return""}if(!c){return e}for(var b=0,a=c.length;b<a;b++){e=e.replace("%"+(b+1),c[b])}return e};(function(){var a=/^[a-z0-9\.-]+:[a-z]+:[a-z0-9]+_[0-9]+_[0-9]+$/i;iplayer.convertIdToURL=function(d){if(!d||!a.test(d)){return false}var b=iplayer.config,c=d.split(":");return"http://"+c[0]+"."+b.episodeImgHost+b.episodeImgPath+c[1]+"/"+c[2]+".jpg"}})();iplayer.config={cookie:{name:"BBCiPlayer",expires:90,key:{region:"region",localRadio:"lr",accessibility:"ac-labs",labs:"labs",lastPlayed:"lp",narrowBand:"lba",empSize:"empsize",cbbc_lastPlayed:"cbbc_lp",cbeebies_lastPlayed:"cbeebies_lp",bigscreen_wiiToolbar:"wii",bigscreen_hdMode:"bighd",bigscreen_tipsSeen:"bigtips"},_validKeys:{},session:{name:"BBCiPlayerSession",key:{eventEmpSize:"event_empsize",mediaFilter:"filter",narrowBandVideo:"nbv",bigscreen_ps3FirmwareDismissed:"ps3"}}},episodeImgHost:"",choicestream:{url:"http://api.choicestream.com/instr/api?json=",enabled:false},lastPlayed:{maxStored:10},minimumEmbedFlashVersion:9,minimumEmbedAudioFlashVersion:7,minimumWiiEmbedFlashVersion:7,video:{flashVersionsRequired:{major:"9",minor:"0",release:"115",full:"9.0.115"}},audio:{flashVersionsRequired:{mp3:{major:"7",minor:"0",release:"0",full:"7.0.0"},aac:{major:"9",minor:"0",release:"115",full:"9.0.115"}}},root:function(){return(/^[^:]+:\/\/[^\/]+(\/[^\/]+)/).exec(window.location.href)[1]+"/"}(),siteRoot:function(){var a=(/^[^:]+:\/\/[^\/]+(\/[^\/]+)\/([^\/]+)/).exec(window.location.href);return(a&&a.length>1)?a[1]+"/"+a[2]+"/":""}()};iplayer.config.episodeImgPath=iplayer.config.root+"images/";(function(){var a=iplayer.config.cookie;iplayer.extendObject(a._validKeys,a.key)})();iplayer.extendConfig({kdx:{authToken:"iplayer_live | www.bbc.co.uk, *.iplayer.bbc.co.uk | urn:kid:bbc_iplayer_live:",authSignature:"o+JtR5xUaVS1hzkjS/J7HpqDhcFwjEKP+0Yq0OGA51Ap5Lbg4PU29BhNQfe8gdlJWr2StkIG5nweF6Oz2lDDDtZ3Fz/jDYUbQ/vq3mZMHW8axwGeb5NWLJ3QC553j11dNtc+OjU1icyi00kH/dKIOmRRtvWygIGnHzs1hWJD8sI="},emp:{configXmlUrl:"/emp/iplayer/config.xml",simulcastNowNextInterval:1},helpBaseURL:"http://iplayerhelp.external.bbc.co.uk/help/"});iplayer.locale="en";iplayer.localisation={aboutToGoToIplayer:"You are about to go to the main BBC iPlayer site",airDownloadLoading:"Loading",best:"Best",bestFullScreen:"best full-screen video quality",better:"Better",cancel:"Cancel",cannotDownloadRightNowServersBusy:"BBC iPlayer cannot download %1 right now. Our servers seem to be a bit busy - please try again later.",cbbcInterstitialHtml:'<p>You are currently in iPlayer for CBBC. This service has been specially designed for the CBBC audience in mind.</p><p>If your child is using the main BBC iPlayer don\'t forget about <a href="/guidance/">Parental Guidance Lock</a>, which allows you to password protect specific guidance labelled programmes.</p><div class="wrapper"><p id="stayOnIplayer"><a href="/iplayer/cbbc/"><span class="blq-hide">Stay on iPlayer for CBBC</span></a></p><p id="iplayer"><a href="/iplayer/"><span class="blq-hide">Go to main BBC iPlayer site</span></a></p></div>',cbbcLastPlayedInitialHtml:'<div class="content"><img src="/iplayer/cbbc/img/last_played_hello.jpg" width="178" height="100" alt="" /><h3>Welcome to iPlayer for CBBC</h3><p>Watch CBBC your way.</p><p>Check out the most popular shows or pick out your favourites via the CBBC Shows A-Z button at the top of the page.</p><p>iPlayer for CBBC will even remember the last 5 shows that you have watched. Brilliant!</p></div>',cbeebiesInterstitialHtml:'<p>You are currently in CBeebies iPlayer. This service has been specially designed with the young CBeebies audience in mind.</p><p>If your child is using the main BBC iPlayer don\'t forget about <a href="/guidance/">Parental Guidance Lock</a>, which allows you to password protect specific guidance labelled shows.</p><div class="wrapper"><p id="stayOnIplayer"><a href="/iplayer/cbeebies/"><span class="blq-hide">Stay on CBeebies iPlayer</span></a></p><p id="iplayer"><a href="/iplayer/"><span class="blq-hide">Go to main BBC iPlayer site</span></a></p></div>',cbeebiesLastPlayedInitialHtml:'<div class="content"><img src="/iplayer/cbeebies/img/last_played_hello.jpg" alt="" width="178" height="100" /><h3>Welcome to CBeebies iPlayer</h3><p>Catch up with CBeebies TV and Radio shows from the past 7 days.</p><p>Select from the most popular shows or choose your favourites via the CBeebies Shows A-Z button.</p><p>CBeebies iPlayer will also remember the last 3 shows that you have watched.</p><p>We hope that you enjoy it!</p></div>',clear:"Clear",clickHere:"Click here",clickToPlay:"Click to play",clickToViewRss:"Click to view RSS feed for",close:"Close",computerWMVDownloadPrompt:'<p>Prefer to play your BBC iPlayer downloads in Windows Media Player or Windows Media Centre? If so, this option is for you.</p><p>Simply download the programme to your desktop or directly to your Windows Media Player library, then play it in Windows Media Player or Windows Media Centre.</p><p>You can also use this option to stream programmes to your TV via a compatible Windows Media Extender device (<a href="%1">see list of supported Home Media Hubs</a>).</p><p>You have up to 30 days to watch any programmes downloaded to your computer before they expire. Remember to delete expired programmes from your computer to free up space.</p>',currentFlashVersionUnableToPlayH264:"Your current version of Flash player is unable to play %1, which is presented in high quality H.264.",currentlyListening:"You are currently listening to",download:"Download",downloadFlashPlayerNow:'<a href="%1">Download the Flash player now</a>.',downloadUnavailable:"Download unavailable",drmCouldNotRetrieveLicence:"The licence could not be retrieved to play %1.",drmLicenceExpired:'%1 has expired and is unfortunately no longer available for download. <a href="%2">Why?</a>',drmSorryWithdrawn:"We are sorry but %1 has been withdrawn and is no longer available for download.",gigabytes:"Gigabytes",hide:"Hide",hideInformation:"Hide information",high:"High",how:"How?",inThisWindow:"in this window",installFFWMP:"install the Windows Media Player Firefox Plugin",installFlash:"install Flash",installFlashToPlay:"You need to install Flash to play",installFlashToWatch:"You need to install Flash to watch",installReal:"install Real Player",installWMP:"install Windows Media Player",insufficientBandwidthHD:"Insufficient bandwidth (3.5Mbps required) to stream this HD programme.",insufficientBandwidthSD:"Insufficient bandwidth to stream this programme.",isUnavailable:"is unavailable at this time.",large:"Large",lastPlayed:"Last Played",licenceDeliveryError:"Licence delivery error",likeTheseRecommendations:"Like these recommendations?",mediaDownloadIsNotAvailable:"Media download is not available for %1.",mediaPlayerDownloadPrompt:'<p>You can now play BBC iPlayer programmes on a range of portable media players from these manufacturers:</p><div class="highlight">%1</div><p><a href="%2">See the full list here</a></p><p><strong>%3</strong></p><p><a href="%4">Full instructions here</a>.</p>',mediaPlayerDownloadSaveCopy:"To use, save this file to your computer and then copy it to your portable device.",mediaPlayerDownloadSavePlayFirstCopy:"To use, save this file to your computer, play the first few seconds in Windows Media Player and then copy it to your portable device.",medium:"Medium",megabytes:"Megabytes",more:"more",moreDownloads:"More downloads",normal:"Normal",notAvailable:"Not available",notAvailableOnline:"Not available online",off:"Off",offAir:"is currently off air",offAirPrefix:"",on:"On",parentalGuidanceLock:"Parental Guidance Lock",pleaseFirst:"please first",pleaseUpgradeFlashToPlaybackItem:'Please <a href="%1">upgrade the Flash player now</a> to playback this item successfully.',pleaseWait:"Please wait",pleaseWaitAcquireInfoDownload:"Please wait while we acquire information for your download.",portableDevices:"Portable devices",programmeInformation:"Programme information",radio:"Radio",resizeVideoPlayer:"Resize video player",scrollLeft:"Scroll Left",scrollRight:"Scroll Right",setVideoQuality:"Set video quality",show:"Show",showMoreEpisodes:"Show more episodes",showMoreSuffix:"more",showTab:"Show",small:"Small",softwareUpgradeRequired:"Software upgrade required",sorry:"Sorry,",standardFullScreen:"standard full-screen video quality",tab:"tab",thankYouForYourFeedback:"Thank you for your feedback",toPlay:"To play",toPlayLower:"to play",today:"Today",tryDiagnostics:"Try our diagnostics page.",tryDownloadingInstead:"You can try downloading this programme instead - see the Download options below.",tryDownloadingOrDiagnostics:"Try downloading instead, or see our diagnostics page.",tv:"TV",updateWMPIndividualise:'We need to update your Windows Media Player software to let you play this programme.</p><p>Click <a href="%1">here</a> to visit the Microsoft website then hit the <strong>Upgrade</strong> button in the web page and follow the instructions.</p><p>If this does not help, please click <a href="%2">here</a> for information on settings you may have to change.',upgradeFlashPlayerNow:'<a href="%1">Upgrade the Flash player now</a>.',upgradeFlashToPlay:"You need to upgrade Flash to version 9.0.115 or higher to play",upgradeFlashToWatch:"You need to upgrade Flash to version 9.0.115 or higher to watch",upgradeFromKdxHtml:'<h1>Upgrade to BBC iPlayer Desktop</h1><div class="left-col"><p><strong>We detected that you are currently using BBC iPlayer Download Manager.</strong> This service has now been replaced by the new BBC iPlayer Desktop. You will still be able to enjoy your favourite BBC television programmes offline for up to thirty days.</p><p>BBC iPlayer Desktop benefits include:</p><ul><li>Improved ease of use</li><li>Better video quality</li><li>Easily installed</li><li>Download programmes directly from BBC iPlayer website without the need to use peer to peer technology</li><li>Many new features to be added in the coming months</li><li>Works on Mac and Linux computers, in addition to Windows</li></ul><p id="install-button"></p><p>We recommend after installing the new BBC iPlayer Desktop you uninstall the BBC iPlayer Download Manager software to free up disk space on your computer (provided you have finished watching any remaining programmes).</p></div><div class="common-questions"><h2>Common questions</h2><h3>Already have unwatched programmes in your BBC iPlayer Download Manager?</h3><p>Don\'t worry, you can still continue to watch these for up to thirty days.</p><h3>How do I uninstall the Download Manager?</h3><div class="uninstall"><div class="col"><h4>Windows XP</h4><ol><li>On Windows XP In the Start Menu go to the Control Panel Click on Add/Remove Programs.</li><li>Navigate to BBC iPlayer Download Manager and select Change/Remove.</li><li>When asked to confirm the removal of the program, click Next.</li></ol><p>When the Download Manager is uninstalled, any downloaded programmes you\'ve stored will be deleted as well. Kontiki will now be removed, unless you have another program that uses it, such as 4oD or Sky Player, in which case removing the Download Manager will not remove Kontiki.</p></div><div class="col"><h4>Windows Vista</h4><ol><li>On Windows Vista In the Start Menu go to the Control Panel Click on Programs.</li><li>Click on BBC iPlayer Download Manager and select Uninstall/Change.</li><li>When asked to confirm the removal of the program, click Next.</li></ol><p>When the Download Manager is uninstalled, any downloaded programmes you\'ve stored will be deleted as well. Kontiki will now be removed, unless you have another program that uses it, such as 4oD or Sky Player, in which case removing the Download Manager will not remove Kontiki.</p></div></div><div class="left-col"><h3>Using screen readers and other assistive technologies?</h3><p>Our new BBC iPlayer Desktop uses Adobe AIR technology which is incompatible with screen readers. If you prefer the accessibility support of Windows Media Player, alternative download formats are available. Simply select the "Windows Media Player" format from the "More downloads" menu.</p></div></div>',upgradeWMPVersion:'To download BBC iPlayer programmes please upgrade your version of Windows Media Player. Click <a href="%1">here</a> to get the latest version from Microsoft.',useLowBandwidth:"Use lower bandwidth version",useNormalVersion:"Use normal version",videoQuality:"Video quality",videoSize:"%1 video size",whereAvailable:"(where available)",yellowBarMessage:'<p id="yellow-bar-graphic">Did you see a yellow bar at the top of the page?<p><p>Click the bar and select "Run ActiveX Control", then click the Download button again when the page has reloaded.</p><p>You will only have to do this once to start downloading BBC programmes.</p><p>For further help <a href="%1">click here</a>.</p>',yellowBarTitle:"Click the yellow bar at the top of this page",yesterday:"Yesterday",yourPreference:"Your preference"};iplayer.extendConfig({lastPlayed:{maxStored:10,maxDisplayed:10},air:{flashVersionsRequired:{mac:{major:"9",minor:"0",release:"115",full:"9.0.115"},linux:{major:"10",minor:"0",release:"15",full:"10.0.15"},win:{major:"9",minor:"0",release:"115",full:"9.0.115"}},electraVersion:"1.0"},semp:{flashVersionsRequired:{mp3:{major:"7",minor:"0",release:"0",full:"7.0.0"},aac:{major:"9",minor:"0",release:"115",full:"9.0.115"}}},mediaSelector:{assetRequestUrl:"/mediaselector/4/js/download/",bitrateSway:60,bitrate:{computerWMV:850,mediaPlayer:528},guidanceUrl:"/iplayer/mediaselector/3/safesearch/"},wmrm:{licenceIssuerUrl:"/iplayer/drm/wmvmobile/licencedelivery.asmx"}});iplayer.config.choicestream.enabled=true;iplayer.cookie=function(){var p={expires:90,delimiter:"(:|=)",key_delimiter:"=",domain:".bbc.co.uk",path:iplayer.config.root.replace(/\/$/,"")};function h(q){return !!(typeof(q)==="string"&&q.length>0)}function o(q){return !!(typeof(q)!=="undefined")}function e(r,q){return(o(r)&&o(r[q]))?r[q]:p[q]}function d(q){return e(q,"expires")}function m(q,r){return e(q,(r?"delimiter":"key_delimiter"))}function n(q){return e(q,"domain")}function k(q){return e(q,"path")}function f(q,r){if(!o(r)){var r="="}return new RegExp("^\\s*"+q+r)}function b(t){var s="",q=document.cookie.split(";"),u=0,r=q.length,w,v=f(t);for(;u<r;u++){w=q[u];if(v.test(w)){s=w.replace(v,"");break}}return unescape(s)}function l(s,u,x){var y=b(s).split("&"),v=f(u,m(x,true)),t=0,q=y.length,w={};for(;t<q;t++){if(v.test(y[t])){w.key=y[t];y.splice(t,1);break}}if(y.length>0){w.cookie=y.join("&")}return w}function a(q,s,u,v){var t=l(q,s,v);if(t.key){t.key=t.key.replace((new RegExp("("+m(v,true)+").*$")),"$1"+u)}else{t.key=s+m(v)+u}return t.key+(t.cookie?"&"+t.cookie:"")}function c(q,s,u){var t=l(q,s,u);return t.cookie}function g(A,y,s,u){if(!y){y=""}y=y.split("&");for(var w=0,v=y.length;w<v;w++){y[w]=escape(y[w])}y=y.join("&");var q=[A+"="+y,"domain="+n(s),"path="+k(s)];if(o(s)||u){var x=(u)?d(s):s.expires;if(o(x)){if(typeof(x)==="number"||(h(x)&&(/^-?\d+$/.test(x)))){var z=new Date();z.setTime(z.getTime()+(1000*60*60*24*x));x=z.toGMTString()}q.push("expires="+x)}}return q.join(";")+";"}return{get:function(q,t,s){if(h(q)){if(h(t)){var u=l(q,t,s);if(u.key){return u.key.replace(f(t,m(s,true)),"")}}else{return b(q)}}return""},remove:function(){var r=arguments,q=r.length,t,s=r[0],v,u={};if(q>1){if(q===2){if(typeof(r[1])==="string"){v=r[1]}else{u=r[1]}}else{v=r[1];u=r[2]}}if(o(v)){document.cookie=g(s,c(s,v,u),u,true)}else{if(!o(u.expires)){u.expires=-1}document.cookie=g(s,"0",u)}},set:function(){var q=arguments,s=q[0],u,v,t,r;switch(q.length){case 2:v=q[1];r=v;break;case 3:if(typeof(q[2])==="string"){u=q[1];v=q[2];r=a(s,u,v)}else{v=q[1];t=q[2];r=v}break;case 4:u=q[1];v=q[2];t=q[3];r=a(s,u,v,t);break}var w=((s===iplayer.config.cookie.name)&&(!t||!t.expires))?true:false;document.cookie=g(s,r,t,w)},enabled:function(){var u="iplayerCookieCheck",q="test",s=false,r;this.set(u,q);r=this.get(u);if(r===q){s=true}this.remove(u);this.enabled=function(){return s};return s}}}();(function(){try{var g=iplayer.cookie,k=iplayer.config.cookie,b=g.get(k.name),l,h=[];if(!(b&&b.length>0)){return}for(l in k._validKeys){h[h.length]=k._validKeys[l]}var d=b.match(new RegExp("(^|&)("+h.join("|")+")=[^&]+","ig"));if(!d){g.remove(k.name);return}for(var c=0,a=d.length;c<a;c++){if(d[c].charAt(0)==="&"){d[c]=d[c].substr(1)}}if(b!=d.join("&")){g.set(k.name,d.join("&"))}}catch(f){if(console&&console.log&&console.dir){console.log("Error trying to clean cookie");console.dir(f)}}})();var $=glow.dom.get,anim=glow.anim,dom=glow.dom,events=glow.events,net=glow.net,tweens=glow.tweens,widgets=glow.widgets;iplayer.pollnode=function(){var b=/\*$/,d=[],c;function e(){var h=false;for(var k=0,g=d.length;k<g;k++){var m=d[k];if(!m.working){continue}var l=document.getElementById(m.nodeId+((m.seqMode>=0)?m.seqMode:""));if(l&&(m.quickMode||f(l))){if(m.seqMode<0){d[k].working=false;m.callback(l);continue}d[k--].seqMode++;m.callback(l)}h=true}if(h){return}a()}function f(g){while(!g.nextSibling){g=g.parentNode;if(!g){return false}}return true}function a(){if(!c){return}window.clearInterval(c);c=null}events.addListener(window,"load",function(){e();a()});return{add:function(k,h,g){d[d.length]={nodeId:k.replace(b,""),seqMode:(b.test(k))?0:-1,callback:h,quickMode:g,working:true};if(!c){c=window.setInterval(e,10)}}}}();iplayer.user=function(){var g=iplayer.cookie,f=iplayer.config,e=f.cookie,a=e.session,c,d;function h(l,m){return g.get(l,m)}function b(){if(!d){d=(window.glow&&glow.embed)?glow.embed.Flash.version():window.deconcept?deconcept.SWFObjectUtil.getPlayerVersion():{major:0};if(d.rev){d.release=d.rev}}return d}function k(q){if(!q.hasOwnProperty("major")||!q.hasOwnProperty("minor")||!q.hasOwnProperty("release")){throw"Cannot check users flash version, required version info is missing required properties"}var s=b(),o=s.major,m=s.minor,p=s.release,n=q.major,l=q.minor,t=q.release,r=(o<n)||(o==n&&m<l)||(o==n&&m==l&&p<t);return !r}return{getBBCuid:function(){if(c){return c}c=h("BBC-UID");c=(c!="")?c.substr(0,64):"";return c},getPGmode:function(){var m=h("BBCPGstat");if(m!=""){var l=/^(\d):/.exec(m);if(l){return(1+Number(l[1]))}}return 0},getLabsEnabled:function(){return(h(e.name,e.key.labs)=="1")},getEmpSizeInfo:function(){var l=h(e.name,e.key.empSize);return{sz:(l||"small"),psz:((l=="")?0:1)}},getNarrowBandAudioMode:function(){return(h(e.name,e.key.narrowBand)=="1")},setNarrowBandVideoMode:function(l){g.set(a.name,a.key.narrowBandVideo,l)},getNarrowBandVideoMode:function(){return(h(a.name,a.key.narrowBandVideo)=="1")},flashAACAudioSupported:function(){hasRequiredVersion=k(f.audio.flashVersionsRequired.aac);iplayer.user.flashAACAudioSupported=function(){return hasRequiredVersion};return hasRequiredVersion},flashmp3AudioSupported:function(){hasRequiredVersion=k(f.audio.flashVersionsRequired.mp3);iplayer.user.flashmp3AudioSupported=function(){return hasRequiredVersion};return hasRequiredVersion},flashVideoSupported:function(){hasRequiredVersion=k(f.video.flashVersionsRequired);iplayer.user.flashVideoSupported=function(){return hasRequiredVersion};return hasRequiredVersion},hasFlash:function(){var l=!(b().major==0);iplayer.user.hasFlash=function(){return l};return l},getFlashVersion:b}}();iplayer.sage.actionkeys=function(){var c=[["iPlayer","homepage",null,["desc","mid","bu","me","ei","po","typ","pe","ch","eid","tab","cid","src"]],["iPlayer","recommendations_click",null,["desc","eid","mid","ei","rsy"]],["iPlayer","playback",null,["desc","eid","mid","ei","bu","g1","cr","to","avl"]],["iPlayer","event",window.location.pathname,["desc","eid","mid","ei","to"]],["iPlayer","elektra","iplayer/install",["desc","eid","mid","ei","to"]],["cbeebies","cbeebies_homepage","iplayer/cbeebies",["desc","eid","mid","bu","ei","po","typ","to"]],["cbeebies","cbeebies_playback","iplayer/cbeebies/episode",["desc","eid","mid","bu","ei","to","mid1","po"]],["cbbc","cbbc_homepage","iplayer/cbbc",["desc","eid","mid","bu","ei","po","typ","to"]],["cbbc","cbbc_playback","iplayer/cbbc/episode",["desc","eid","mid","bu","ei","to","mid1","po"]]],a=c.length;function e(g){for(var f=0;f<a;f++){if(c[f][1]===g){return f}}}function b(f){return(isNaN(parseInt(f))?e(f):f)}function d(f,g){return c[b(f)][g]}return{getIndex:e,getKeys:function(f){return d(f,3)},getSrc:function(f){return d(f,2)},getSite:function(f){return d(f,0)}}}();iplayer.sage.actioncache=function(){var k=iplayer.cookie,g=iplayer.sage.actionkeys,d="BBCiPlayerSageCache",c=2000,f=2,l;function h(p){var t=p.shift(),o=g.getSite(t),u=g.getKeys(t),n=g.getSrc(t),v=(n?"src:"+n+",":""),r=0,q=u.length;for(;r<q;r++){var s=p[r];if(s!=null){v+=u[r]+":"+s+","}}iplayer.sage.trackEvent(o,v.replace(/,$/,""))}function m(o,r){var q="";for(var n=r,p=o.length;n<p;n++){q+="["+e(o[n])+"],"}q=q.replace(/,$/,"");return(q=="")?q:"["+q+"]"}function e(o){var n=o.shift(),p=String(n)+",";for(var r=0,q=o.length;r<q;r++){p+=((typeof o[r]=="string")?'"'+o[r]+'"':o[r])+","}return p.replace(/,$/,"")}function b(){if(l){return}l=setInterval(a,c)}function a(){if(!window.sageTrack_detail){return}var q=k.get(d);if(q!=""){var n=iplayer.sage.actioncacheeval(q);if(n.length){var p=(n.length>f)?f:n.length;for(var o=0;o<p;o++){h(n[o])}k.set(d,m(n,p));return}}clearInterval(l);l=false}b();return{add:function(o,n){n.unshift(g.getIndex(o));var p=k.get(d);p=(p=="")?"[[":p.replace(/]$/,",[");k.set(d,p+e(n)+"]]");b()}}}();iplayer.sage.actioncacheeval=function(data){return eval(data)};iplayer.sage.actiontrack=function(){var o=iplayer.cookie,l,g,m,e=[],n,k,h=false,b=/^\??sage-actiontrack-debug/.test(window.location.search);function f(r){var q=r.nodeName.toLowerCase(),s="<"+q;if(r.id){s+=' id="'+r.id+'"'}if(r.className){s+=' class="'+r.className+'"'}if((q!="img")&&r.href){s+=' href="'+r.href+'"'}return s+">"}function a(q){if(!b){return}if(!k||n.closed){c(q);return}k.value=q.replace(/, $/,"")+"\r\n====\r\n"+k.value}function d(r){if(!b){return}var q=""+(n&&!n.closed?"click "+n.getClicks()+", ":"");i=0,j=m.length;for(;i<j;i++){if(r[i]==null){continue}q+=m[i]+": "+r[i]+(i===0&&j>1?"\n":", ")}a(q)}function c(q){if(!n||n.closed){window.setTimeout(function(){if(n&&!n.closed){return}n=window.open("","actiontrackdebug","width=520,height=770,toolbar=0,location=0,directories=0,status=1,menubar=0");n.document.write(["<html>","<head>","<title>Sage Debugger</title>",'<script type="text/javascript">',"var clicks = 0;","function getClicks(){","return ++clicks;","}","window.setInterval(function() {","if(window.opener","&& !opener.closed","&& (opener.iplayer !== undefined)","&& (opener.iplayer.sage !== undefined)","&& (opener.iplayer.sage.actiontrack !== undefined)) ","{","opener.iplayer.sage.actiontrack.setDebugWindowRef(window);","}","},500);","<\/script>","</head>","<body>","<h1>Sage debugger</h1>",'<input id="sage-console-clear" type="button" value="Clear" />','<input id="sage-console-track-clicks" type="Checkbox" />','<label for="sage-console-track-clicks">Track all clicks</label>','<textarea id="actiontrack-console" cols="60" rows="40"></textarea>',"</body>","</html>"].join(""));k=null;iplayer.sage.actiontrack.setDebugWindowRef(n);if(q){a(q)}},1000)}}function p(w){var v="",t=w.source;while(t&&(t.nodeName.toLowerCase()!="body")){v+=f(t);t=t.parentNode}if(h){a(v)}for(var r=0,q=e.length;r<q;r++){var u=e[r];if(u[0].test(v)){var s=u[1](u[0].exec(v));d(s);iplayer.sage.actioncache.add(g,s);break}}}return{setActionList:function(r,q){g=r;e=q;m=iplayer.sage.actionkeys.getKeys(r)},setDebugWindowRef:function(q){if(n&&!n.closed&&k){return}b=true;n=q;k=n.document.getElementById("actiontrack-console");n.document.getElementById("sage-console-clear").onclick=function(){k.value="";n.clicks=0};var r=n.document.getElementById("sage-console-track-clicks");r.onclick=function(){h=!!this.checked};h=!!r.checked},init:function(r){function q(t,s){return Math.floor(Math.random()*(s-t+1))+t}if((q(1,100)>r)&&(!b)){return}events.addListener(document,"click",p);if(b){events.addListener(window,"load",function(){c()})}}}}();iplayer.pagedecorators=function(){var a=iplayer.pollnode,g=iplayer.cookie,k=iplayer.config.cookie.session,c=k.name,d=k.key.mediaFilter;function e(m){var l=g.get(c,d);if(l!=""){m.each(function(){$(this).attr("href",$(this).attr("href")+"/"+l)})}}function b(){function l(m){g.set(c,d,m)}events.addListener($("#filter-tv"),"click",function(){l("tv")});events.addListener($("#filter-radio"),"click",function(){l("radio")});events.addListener($("#filter-both"),"click",function(){l("")})}function f(n){if(n.source==this){return}var l=n.source;function m(o){return(o.nodeName.toLowerCase()=="a")}while(l&&(!m(l))){l=l.parentNode}if(l&&(m(l))&&(l.className!="nopop")){n.preventDefault();h(l.href)}}function h(l){try{var n=window.open(l,"aod","width=693,height=525,toolbar=no,personalbar=no,location=no,directories=no,statusbar=no,menubar=no,status=no,resizable=yes,left=60,screenX=60,top=100,screenY=100");n.focus()}catch(m){}}a.add("service-filter",function(l){if($(l).hasClass("ignore")){return}b()});a.add("national-local-radio",function(l){events.addListener(l,"click",f)});a.add("blq-local-nav",function(){e($("#blq-local-nav #categories a","#blq-local-nav #atoz a"))});a.add("bip-play",function(){e($("#bip-play div.detail dd ul li a"))})}();iplayer.matchsticks=function(){var a,f,e=-1,k=70,g,h=window.location.href,d=iplayer.environment.browser;function c(m){if(!a){return}a.style.height=(m)?m+"px":""}function l(){if(window.innerHeight){return window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){return document.documentElement.clientHeight}else{if(document.body){return document.body.clientHeight}}}}function b(){if(d.msie&&(d.version<7)){return}if(g){c();return}window.setTimeout(b,50);if(!f){function m(n){return document.getElementById(n)}f=m("bip-main");if(!f){return}a=m("blq-container-inner")}if(f.offsetHeight>e){e=f.offsetHeight;c();c(Math.max(0,a.offsetHeight-k,l()-k))}}if((/\/iplayer\/(.{2}\/)?episode\/[a-z0-9]{4,12}\//.test(h))||(/\/iplayer\/(.{2}\/)?console\//.test(h))){return}b();events.addListener(window,"load",function(){g=true})}();iplayer.carousel=function(a){this.container=$(a);this.window=this.container.get("div.carousel-window");var c=this.container[0].parentNode,b=/tab-content/.test(c.className);if(b){c.style.display="block"}this.pageWidth=this.window.width();this.currentPos=0;this.newPos=0;this.currentPane=1;this.content=this.window.get("ul.carousel-content");this.items=this.window.get("> ul > li");this.items.each(function(d){this.num=d});this.panesLoaded=[1];this.seeking=false;this.animate=!iplayer.environment.browser.wii;if(this.items.length>0){this.itemsPerPane=Math.floor(this.pageWidth/this.items.width());this.numPanes=Math.ceil(this.items.length/this.itemsPerPane)}if(b){c.style.display=""}if(this.items.length>this.itemsPerPane){this.init()}iplayer.rollover.add(this.window[0])};iplayer.carousel.prototype={move:function(b,c){var a=this,e=a.content[0];function d(){a.seeking=false;a.prevControl.remove();a.nextControl.remove();if(a.currentPane>1){a.prevControl.appendTo(a.prevControlHolder);a.prevControlHolder.css("display","block")}if(a.currentPane<a.numPanes){a.nextControl.appendTo(a.nextControlHolder);a.nextControlHolder.css("display","block")}if(c){a.preload(a.currentPane+1)}}if(this.animate){var f=anim.css(e,0.75,{left:{to:this.newPos}},{tween:tweens.easeBoth()});f.start();events.addListener(f,"complete",d);return}e.style.left=this.newPos+"px";d()},seekNext:function(){if(this.seeking||(this.currentPane==this.numPanes)){return false}this.seeking=true;this.currentPane++;this.currentPos=this.newPos=this.currentPos-this.pageWidth;this.move(this.newPos,true)},seekPrev:function(){if((this.seeking)||(this.currentPane==1)){return false}this.seeking=true;this.currentPane--;this.currentPos=this.newPos=this.currentPos+this.pageWidth;this.move(this.newPos)},preload:function(c){if(c>this.numPanes){return}for(var e=0,d=this.panesLoaded.length;e<d;e++){if(this.panesLoaded[e]==c){return}}var b=this.itemsPerPane*(c-1),a=(this.itemsPerPane*c);if(a>this.items.length){a=this.items.length}this.items.slice(b,a).each(function(){var f=$(this).get("img")[0],g=iplayer.convertIdToURL(f.id);if(!g){return}f.src=g});this.panesLoaded.push(c)},init:function(){var b=this,a=iplayer.localisation,d=this.container;this.prevControlHolder=d.get("div.prev");this.nextControlHolder=d.get("div.next");this.prevControlHolder[0].style.width="19px";this.prevControl=dom.create('<a href="" id="control-prev" class="control"><span>'+a.scrollLeft+"</span></a>");this.nextControl=dom.create('<a href="" id="control-next" class="control"><span>'+a.scrollRight+"</span></a>");this.nextControl.appendTo(this.nextControlHolder);events.addListener(this.prevControl,"click",function(f){f.preventDefault();b.seekPrev()});events.addListener(this.nextControl,"click",function(f){f.preventDefault();b.seekNext()});function c(e){while(e.parent()&&!e.parent().hasClass("carousel-content")){e=e.parent()}return e}events.addListener(this.window,"keyup",function(h){var g=$(h.source);g=c(g);var f=Math.floor(g[0].num/b.itemsPerPane)+1;if(f>b.currentPane){b.seekNext()}else{if(f<b.currentPane){b.seekPrev()}}});this.preload(2)}};iplayer.pollnode.add("highlights-tv",function(a){new iplayer.carousel(a)});iplayer.pollnode.add("highlights-radio",function(a){new iplayer.carousel(a)});iplayer.pollnode.add("bip-play-morelikethis-crsl",function(a){new iplayer.carousel(a)});iplayer.pollnode.add("bip-play-seriesstack-crsl",function(a){new iplayer.carousel(a)});iplayer.pollnode.add("bip-play-recommendations-crsl",function(a){new iplayer.carousel(a)});iplayer.pollnode.add("event-carousel",function(a){new iplayer.carousel(a)});iplayer.rollover=function(){var f=/(^| )episode($| )/,h=/overlay($| )/,g;function e(m){var l=6;while(l--){if(!m){return}if((m.nodeName.toLowerCase()=="li")&&(f.test(m.className))){return m}m=m.parentNode}return}function d(n,m){var l=n.className+"";l=l.replace(h,"");if(m){l+=" overlay"}n.className=l}function c(m){var l=e(m.source);if(!l){return}d(l,true)}function b(m){var l=e(m.source);if(!l){return}d(l)}function k(n){var l=e(n.source);if(!l){return}var m=l.getElementsByTagName("a");if(m.length){window.location.href=m[0].href}}function a(m){var l=e(m.source);if(!l){return}if(!g){d(l,true)}else{if(g!=l){d(g);d(l,true)}}g=l}return{add:function(l){events.addListener(l,"mouseover",c);events.addListener(l,"mouseout",b);events.addListener(l,"click",k);events.addListener(l,"keyup",a)}}}();