var Common=function(){var date=false,dateInterval=false;function buttonRollovers(){glow.dom.get("input.rollover").each(function(){var me=glow.dom.get(this);glow.events.addListener(me,"mouseover",function(){glow.dom.get(this).attr("src",glow.dom.get(this).attr("src").replace(/.gif/,"_rollover.gif"));});glow.events.addListener(me,"mouseout",function(){glow.dom.get(this).attr("src",glow.dom.get(this).attr("src").replace(/_rollover/,""));});});}function fadedFormsFocus(){glow.dom.get("input").each(function(){glow.events.addListener(glow.dom.get(this),"focus",function(){var me=glow.dom.get(this);if(me.hasClass("faded")){me.val("");me.removeClass("faded");}else{if(me.hasClass("invalid")){me.val("");me.removeClass("invalid");}}});});}return{init:function(){buttonRollovers();fadedFormsFocus();this.formValidation();this.trimIplayerTitles();glow.dom.get("body").addClass("js");},checkFlash:function(playerVersion){requiredFlashPlayer=playerVersion;this.installedFlashPlayer=deconcept.SWFObjectUtil.getPlayerVersion();if(requiredFlashPlayer.major<=this.installedFlashPlayer.major&&requiredFlashPlayer.minor<=this.installedFlashPlayer.minor&&requiredFlashPlayer.rev<=this.installedFlashPlayer.rev&&document.documentElement&&document.getElementById){return true;}},checkSimulcast:function(channel,startTime,pid){var channels_urls={"bbcone":"/iplayer/widget/nownext/service/bbc_one/template/json/","bbctwo":"/iplayer/widget/nownext/service/bbc_two/template/json/","bbcthree":"/iplayer/widget/nownext/service/bbc_three/template/json/","bbcfour":"/iplayer/widget/nownext/service/bbc_four/template/json/","bbchd":"/iplayer/widget/nownext/service/bbc_hd/template/json/"};var now_next_url=channels_urls[channel];Common.simulcast=false;var getRef=glow.net.get(now_next_url,{useCache:true,onLoad:function(response){var data=response.json();for(var i=0,len=data["nownext"][1]["service"]["programmes"].length;i<len;i++){var programme=data["nownext"][1]["service"]["programmes"][i]["programme"];var simulcast=data["nownext"][1]["service"]["programmes"][i]["programme"]["simulcast"];if(simulcast&&programme["id"]==pid){var start=Common.parseXsdDate(programme["start"]);var end=Common.parseXsdDate(programme["end"]);start=new Date(start.getTime()+(1000*60*60));end=new Date(end.getTime()+(1000*60*60));if(startTime>=start&&startTime<=end){Common.simulcast=true;}}}},async:false});return Common.simulcast;},formValidation:function(){glow.dom.get("#blq-content form").each(function(){var me=glow.dom.get(this);var inputs=me.get("input.required");if(inputs.length>0){glow.events.addListener(me,"submit",function(){var me=glow.dom.get(this);var inputs=new glow.dom.NodeList();inputs.push(me.get("input.required"));inputs.push(me.get("textarea.required"));var invalid=[];inputs.each(function(){var input=glow.dom.get(this);if(!input.val()&&input.text()==""||input.val().length<1||input.hasClass("faded")){input.val("");input.text("");input.removeClass("faded");invalid.push(input);input.addClass("invalid");}else{input.removeClass("invalid");}});if(invalid.length>0){alert("You have not filled in some required form fields.\n\nPlease ensure all fields highlighted in red are correctly filled in.");return false;}});}});},getDate:function(){return date;},parseXsdDate:function(dateString){var dRegEx=new RegExp(/([0-9]{4})\-([0-9]{2})\-([0-9]{2})T([0-9]{2})\:([0-9]{2})\:([0-9]{2})/);var match=dRegEx.exec(dateString);if(match==null){throw new Error("Date must conform with XML type:  http://www.w3.org/TR/xmlschema-2/#date");}var year=match[1];var month=match[2]-1;var day=match[3];var hour=match[4];var min=match[5];var sec=match[6];return new Date(year,month,day,hour,min,sec);},setDate:function(xsd_date_string){date=this.parseXsdDate(xsd_date_string);if(dateInterval){window.clearInterval(dateInterval);}dateInterval=window.setInterval("Common.updateDate(1)",60000);},trimIplayerTitles:function(){glow.dom.get(".trim-19").each(function(){var me=glow.dom.get(this);if(me.text().length>=14){me.text(me.text().substring(0,14)+" ...");}me.css("visibility","visible");});},updateDate:function(minutes){if(date){date.setMinutes(date.getMinutes()+minutes);}}};}();glow.ready(function(){Common.init();iplayer.episode.updateNowNext();});var iplayer={};iplayer.episode={};iplayer.episode.updateNowNext=function(data){var regex=/^\/([a-z]*)\//;var tld=regex.exec(window.location.pathname)[1];glow.net.get("/"+tld+"/includes/1/sidepromos.sssi",{onLoad:function(response){glow.dom.get("#sidePromos").remove();var newSidePromos=glow.dom.create(response.text());glow.dom.get(".updateAps").prepend(newSidePromos);},onError:function(response){}});};var flickrFeed=function(){var flickrFeedContainer;var flickr_urls={"bbcone":"21713659@N02","bbctwo":"http://api.flickr.com/services/feeds/groups_pool.gne?id=669880@N20&format=json","bbcthree":"http://api.flickr.com/services/feeds/photos_public.gne?id=22034294@N03&format=json","bbcfour":"22571114@N02"};function getData(url){glow.net.loadScript(url);}function getUrl(channel,tags){var url=flickr_urls[channel];if(tags){url+="&tagmode=any&tags="+tags;}return url;}function makeHTML(json){flickrFeedContainer.empty();var newHtmlContent=glow.dom.create("<div id='flickrFeedCarousel'></div>");glow.lang.map(json.items,function(item){var data={"link":item["link"],"title":item["title"],"media":glow.lang.replace(item["media"]["m"],/m\.jpg/,"s.jpg")};var template="<a href='{link}'><img src='{media}' alt='{title}' width='75' height='75' /></a>";var elem=glow.dom.create(glow.lang.interpolate(template,data));newHtmlContent.append(elem);});flickrFeedContainer.append(newHtmlContent);}function makeCarousel(){flickrFeed.carousel=new Carousel("#flickrFeedCarousel",{loop:false,visibleItems:3});flickrFeed.btns={};flickrFeed.btns["prev"]=glow.dom.create("<a href='javascript:flickrFeed.carousel.move(1)' class='prev' title='previous'><span>prev</span></a>");flickrFeed.btns["next"]=glow.dom.create("<a href='javascript:flickrFeed.carousel.move(-1)' class='next'  title='next'><span>next</span></a>");flickrFeedContainer.prepend(flickrFeed.btns["prev"]);flickrFeedContainer.append(flickrFeed.btns["next"]);if(window.external&&(typeof window.XMLHttpRequest=="undefined")){}else{glow.events.addListener(flickrFeed.btns["prev"],"mouseover",function(){flickrFeed.btns["prev"].addClass("active");});glow.events.addListener(flickrFeed.btns["prev"],"mouseout",function(){flickrFeed.btns["prev"].removeClass("active");});glow.events.addListener(flickrFeed.btns["next"],"mouseover",function(){flickrFeed.btns["next"].addClass("active");});glow.events.addListener(flickrFeed.btns["next"],"mouseout",function(){flickrFeed.btns["next"].removeClass("active");});glow.events.addListener(flickrFeed.carousel,"canDoPrevious",function(){flickrFeed.btns["prev"].removeClass("inactive");});glow.events.addListener(flickrFeed.carousel,"canDoNext",function(){flickrFeed.btns["next"].removeClass("inactive");});glow.events.addListener(flickrFeed.carousel,"cantDoPrevious",function(){flickrFeed.btns["prev"].addClass("inactive");});glow.events.addListener(flickrFeed.carousel,"cantDoNext",function(){flickrFeed.btns["next"].addClass("inactive");});}}function parseData(data){try{if(data["items"].length>3){return data;}else{return false;}}catch(e){return false;}}return{init:function(channel,tags){flickrFeedContainer=glow.dom.get("#flickrFeed");if(flickrFeedContainer.length>0){flickrFeedContainer.addClass(channel);getData(getUrl(channel,tags));}},makeCarousel:function(data){var json=parseData(data);if(json){makeHTML(json);makeCarousel();}flickrFeedContainer.css("visibility","visible");}};}();function jsonFlickrFeed(data){flickrFeed.makeCarousel(data);}var TvListingsCarousel=function(){var initiated=false;var updateInterval=false;var baseUrl="/tv/channels_common/1/includes/tv_listings_carousel/tv_listings_carousel_ajax_wrapper.sssi?channel={channel}&channel_region={region}";function makeCarousels(){glow.dom.get(".tv-listings-holder").each(function(i){var me=glow.dom.get(this);if(!me.hasClass("debug")){var classNames=this.className;
var channel=classNames.match(/channel-([^\s]*)/);var region=classNames.match(/region-([^\s]*)/);if(channel&&channel[1]){var data={channel:channel[1],region:""};if(region&&region[1]){data["region"]=region[1];}var url=glow.lang.interpolate(baseUrl,data);var loading=glow.dom.get("#tv_listings_loading");var getRef=glow.net.get(url,{onLoad:function(response){me.empty();var nodes=glow.dom.create(response.text());me.html("");me.append(nodes);makeCarousel(me,i,channel[1]);checkOnNow();shortenTitles();me.get("ul.tv-listings").css("visibility","visible");},onError:function(){loading.remove();me.get("ul.tv-listings").css("visibility","visible");}});}else{me.css("visibility","visible");}}});}function makeCarousel(me,i,channel){var opts;if(channel=="bbcthree"){opts={loop:false,visibleItems:3,vertical:true};}else{opts={loop:false,visibleItems:7};}var carousel=new Carousel(me.get("ul.tv-listings"),opts);carousel.moveTo(2,1,{anim:false});carousel.channel=channel;TvListingsCarousel.carousels.push(carousel);var next=glow.dom.create("<a href='javascript:TvListingsCarousel.carousels["+i+"].move(-1)' class='next'><span>Next</span></a>");var prev=glow.dom.create("<a href='javascript:TvListingsCarousel.carousels["+i+"].move(1)' class='prev'><span>Previous</span></a>");me.append(prev);me.append(next);me.css("visibility","visible");if(window.external&&(typeof window.XMLHttpRequest=="undefined")){}else{glow.events.addListener(prev,"mouseover",function(){glow.dom.get(this).addClass("active");});glow.events.addListener(prev,"mouseout",function(){glow.dom.get(this).removeClass("active");});glow.events.addListener(next,"mouseover",function(){glow.dom.get(this).addClass("active");});glow.events.addListener(next,"mouseout",function(){glow.dom.get(this).removeClass("active");});glow.events.addListener(carousel,"canDoPrevious",function(){this.get(".prev").removeClass("inactive");},me);glow.events.addListener(carousel,"canDoNext",function(){this.get(".next").removeClass("inactive");},me);glow.events.addListener(carousel,"cantDoPrevious",function(){this.get(".prev").addClass("inactive");},me);glow.events.addListener(carousel,"cantDoNext",function(){this.get(".next").addClass("inactive");},me);me.append(glow.dom.create("<div class='tv-listings-holder-btm'></div>"));}if(channel=="bbcthree"){var items=carousel.getItems();items.each(function(){var me=glow.dom.get(this);me.get("img").removeAttr("title");me.get(".title").css("display","none");glow.events.addListener(me,"mouseover",function(){this.get(".title").css("display","block");this.get(".listings_iplayer_cta").css("position","relative");this.get(".listings_iplayer_cta").css("top","-60px");},me);glow.events.addListener(me,"mouseout",function(){this.get(".title").css("display","none");this.get(".listings_iplayer_cta").css("top","0px");},me);});}}function checkOnNow(){for(var i=0,len=TvListingsCarousel.carousels.length;i<len;i++){var thisCarousel=TvListingsCarousel.carousels[i],items=thisCarousel.getItems(),onNow,matchStartDate=/start\-([^\s]+)/,dateNow=Common.getDate();items.each(function(i){var thisItemDateMatch=this.className.match(matchStartDate);if(thisItemDateMatch&&thisItemDateMatch[1]){var nextItemDateMatch=items[i+1].className.match(matchStartDate);var thisItemDate=Common.parseXsdDate(thisItemDateMatch[1]);}if(nextItemDateMatch&&nextItemDateMatch[1]){var nextItemDate=Common.parseXsdDate(nextItemDateMatch[1]);}if(thisItemDate&&nextItemDate&&thisItemDate<dateNow&&dateNow<nextItemDate){highlightOnNow(thisCarousel,i,thisItemDate,this.className.match(/pid\-([^\s]+)/)[1]);}else{if(nextItemDate==undefined&&thisItemDate<dateNow){highlightOnNow(thisCarousel,i,thisItemDate,this.className.match(/pid\-([^\s]+)/)[1]);}else{var thisItem=glow.dom.get(this);if(thisItem.hasClass("onNow")){thisItem.removeClass("onNow");}if(thisItem.get(".onNowMarker")){thisItem.get(".onNowMarker").remove();}}}});}}function highlightOnNow(carousel,item,startTime,pid){var onNow=glow.dom.get(carousel.getItems()[item]);if(!onNow.hasClass("onNow")){if(carousel.getVisibleItemsIndexes().length==4){carousel.moveTo(item,1,{anim:false});}else{carousel.moveTo(item,3,{anim:false});}onNow.addClass("onNow");onNow.get(".thumb").append(glow.dom.create("<div class='onNowMarker'>on now</div>"));}var simulcast=Common.checkSimulcast(carousel.channel,startTime,pid);if(simulcast){highlightSimulcast(carousel,item);}}function highlightSimulcast(carousel,item){carousel.getItems().each(function(){var me=glow.dom.get(this);if(me.get(".watchlive").length>0){me.get(".watchlive").remove();me.get(".listings_iplayer_cta").css("display","block");}});var onNow=glow.dom.get(carousel.getItems()[item]);onNow.append("<a href='/"+carousel.channel+"/watchlive/' class='watchlive'><span class='blq-hide'>Watch live</span></a>");onNow.get(".listings_iplayer_cta").css("display","none");}function shortenTitles(){for(var i=0,len=TvListingsCarousel.carousels.length;i<len;i++){var thisCarousel=TvListingsCarousel.carousels[i],items=thisCarousel.getItems(),titles=items.get(".title");titles.each(function(){var title=glow.dom.get(this);if(title.html().length>25){title.attr("title",title.html());var s_title=title.html().substring(0,25)+"...";title.html(s_title);}});}}return{carousels:[],init:function(){if(initiated){return ;}makeCarousels();updateInterval=window.setInterval("TvListingsCarousel.checkOnNow()",60100);initiated=true;},checkOnNow:function(){checkOnNow();}};}();var utils={};utils.cookie=(function(){return{get:function(cookieName){if(!cookieName){return cookieName;}var _val="",_all=document.cookie,_cookie=_all.indexOf(cookieName+"=");if(_cookie>-1){var _start=_cookie+cookieName.length,_end=_all.indexOf(";",_start);_val=(_end==-1)?_all.substring(_start+1):_all.substring(_start+1,_end);}return _val;},set:function(cookieName,value,opts){if(!cookieName.length){return false;}var date=new Date();date.setTime(date.getTime()+((opts.expires||100)*24*60*60*1000));var expires=date.toGMTString();var cookie=cookieName,val=value||"",domain=opts.domain||"",path=opts.path||"/";document.cookie=cookie+"="+val+"; expires="+expires+"; domain="+domain+"; path="+path;},remove:function(cookieName,opts){var cookie=cookieName,domain=opts.domain||"",path=opts.path||"/";document.cookie=cookie+'=""; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain='+domain+"; path="+path;}};}());utils.Postcoder=(function(){var $=glow.dom.get;var pcLookup={"PST":"postcode","QRY":"result > name","LEA":"lea id","TVR":"bbctv id","WEA":"weather id","CCI":"county_council id","CON":"constituency id","CTY":"county id","DST":"district","EUR":"euro_region id","LAU":"local_authority id","LST":"listings id","NHS":"health_authority id","TWN":"post_town id","RAD":"radio id","WRD":"ward id","WIL":"wil id","MAT":"match_type"};function _processResult(data){var res=new glow.dom.NodeList();switch(data.get("result").length){case 0:res=glow.dom.create("<p>No results found, please try again.</p>");break;case 1:if(data.get("wil").length>1){res=_buildMultiResult.call(this,data,"wil");}break;default:res=_buildMultiResult.call(this,data,"result");}return res;}function _buildMultiResult(data,type){var resultList=glow.dom.create("<ul></ul>");var that=this;data.get(type).each(function(){var place=$(this).get("name").text();if(type=="result"){place+=", "+$(this).get("hint").text();}var listItem=glow.dom.create('<li><a href="#">'+place+"</a></li>");glow.events.addListener(listItem,"click",function(){var opts={};if(this.nodeName=="wil"){opts={wil:$(this).get("id").text()};id=$(this).parent().get("id").text();}else{id=$(this).get("id").text();}utils.Postcoder.call(that,id,opts);return false;},this);resultList.append(listItem);});return resultList;}function Postcoder(location,opts){var location=location,opts=opts||{},wilId=opts.wil||0,that=this;if(opts.panel){this.panel=opts.panel;}if(opts.panelOpts){this.panelOpts=opts.panelOpts;}var response=this.makeRequest(location);if(wilId){response.get("wil").each(function(){if($(this).get("id").text()!=wilId){$(this).remove();}});}var result=_processResult.call(this,response);
if(opts.onDisambiguation){glow.events.addListener(that,"disambiguation",opts.onDisambiguation);}if(opts.onSuccess){glow.events.addListener(that,"success",opts.onSuccess);}if(result.length){glow.events.fire(that,"disambiguation",result);}else{glow.events.fire(that,"success");if(this.panel&&this.panel.length){opts.onConfirm=opts.onConfirm||function(){that.buildCookie(response);window.location.reload(true);};var loc={location:response.get("result > name").text()};panelNode=glow.dom.create(glow.lang.interpolate(this.panel,loc));panelNode.appendTo($(document.body));this.confirmation=new utils.widgets.Dialog(panelNode,this.panelOpts);glow.events.addListener(this.confirmation,"confirm",opts.onConfirm);this.confirmation.show();}else{this.buildCookie(response);}}}Postcoder.prototype={makeRequest:function(location){var responseXml=new glow.dom.NodeList();var url="/cgi-perl/whereilive/query/place.pl?loc="+location+"&customer=postcoder";glow.net.get(url,{onLoad:function(response){responseXml=$(response.xml());},error:function(response){alert("error: "+response.statusText());},async:false});return responseXml;},buildCookie:function(data){var cookieStr="";for(var j in pcLookup){var val="";data.get(pcLookup[j]).each(function(i){if(i){val+=".";}val+=$(this).text();});cookieStr+=j+val+":";}utils.cookie.set("BBCpostcoder",cookieStr,{domain:"bbc.co.uk",expires:100});}};return Postcoder;}());utils.widgets={};utils.widgets.Dialog=(function(){var dom=glow.dom,$=dom.get,events=glow.events,widgets=glow.widgets,lang=glow.lang;function Dialog(content,opts){opts=opts||{};if(opts.template){var customTemplate=true;}var that=this,fullContent=$(content).append(dom.create('<p class="ft"><a class="glow-dialog-cancel button" href="#"><span>Cancel</span></a><a class="glow-dialog-confirm button" href="#"><span>Confirm</span></a></p>'));opts=lang.apply({modal:false,theme:"dark"},opts);events.addListener(fullContent.get(".glow-dialog-cancel"),"click",function(){that.hide();return false;});events.addListener(fullContent.get(".glow-dialog-confirm"),"click",function(){events.fire(that,"confirm");that.hide();return false;});widgets.Panel.call(this,content,opts);if(!customTemplate){this.content.addClass("glow-dialog");}}lang.extend(Dialog,widgets.Panel);return Dialog;}());Localisation=function(){var results,locationConfirmationPanel,locationConfirmationPanelContent='<div class="hpPopup" id="hpPopup_Location"><h2 class="hd hpPopup">Location Change</h2><p>Do you really want to change your location to <strong>{location}</strong>? This will affect all localised modules on your page.</p></div>',locationSelectionPanelContent='<div><h2 class="hd">Set your location</h2><p><label id="localisation_place_label" for="localistaion_place">Set location : </label><input type="text" id="localistaion_place" size="20" name="place" class="faded" onfocus="glow.dom.get(this).removeClass(\'faded\');glow.dom.get(this).val(\'\');" value="Enter UK Postcode or place name" /><a id="localisation_place_btn" href="#" onclick="Localisation.setLocation(glow.dom.get(\'#localistaion_place\').val());">Save</a></p><div id="location_results"></div></div>',locationSelectionPanel;return{init:function(){if(glow.dom.get("#change_region").length<1){return ;}locationSelectionPanel=new glow.widgets.InfoPanel(glow.dom.create(locationSelectionPanelContent),{context:"#change_region",pointerPosition:"r",theme:"dark"});glow.dom.get("#change_region").attr("href","javascript:Localisation.showPanel()");results=glow.dom.get("#location_results");glow.events.addListener("#localistaion_place","keypress",function(e){if(e.keyCode==13){Localisation.setLocation(glow.dom.get(this).val());}});},hidePanel:function(){locationSelectionPanel.hide();},setLocation:function(location){if(location==""||glow.dom.get("#localistaion_place").hasClass("faded")){this.writeResults(glow.dom.create("<p>Please enter a location</p>"));return false;}locationConfirmationPanel=new utils.Postcoder(location,{onDisambiguation:function(data){Localisation.writeResults(data);},onSuccess:function(){Localisation.hidePanel();},panel:locationConfirmationPanelContent,panelOpts:{width:"320px",theme:"dark",modal:true,closeOnMaskClick:false}});},showPanel:function(){locationSelectionPanel.show();},writeResults:function(data){results.empty();results.append(data);if(glow.dom.get(data).get("li").length>0){results.prepend("<p><strong>Multiple Locations Found</strong></p><p>Please refine your location by choosing a place name from the list.</p>");}}};}();glow.onDomReady(function(){setTimeout("Localisation.init()",0);});var EmpEmbed=function(){var config={"sizes":{"large":["512","323"],"small":["256","179"]}};return{embed:function(id,width,height,playlist,emp_config){if(!playlist.match("bbc.co.uk")){playlist="http://"+document.domain+playlist;}var emp=new bbc.Emp();emp.setDomId(id);emp.setPlaylist(playlist);if(emp_config){emp.setConfig(emp_config);}emp.setWidth(width);emp.setHeight(height);emp.write();glow.dom.get("#"+id).get(".emp_loading").remove();glow.dom.get("#"+id).css("visibility","visible");}};}();var questionsAndAnswers=function(){var questions,answers;return{init:function(){questions=glow.dom.get("#questions a");answers=glow.dom.get("#answers div");if(questions.length>0&&answers.length>0){this.showAnswer(questions.slice(0,1));questions.each(function(){glow.events.addListener(glow.dom.get(this),"click",function(){questionsAndAnswers.showAnswer(glow.dom.get(this));return false;});});}loc=window.location.href;if(loc.indexOf("#")>1){lnk=loc.substring(loc.indexOf("#"));questions.each(function(){var me=glow.dom.get(this);if(me.attr("href").match(lnk)){questionsAndAnswers.showAnswer(me);window.scrollTo(0,0);}});}glow.dom.get("#answers").css("visibility","visible");},showAnswer:function(question){questions.removeClass("selected");question.addClass("selected");answers.css("display","none");var href=question.attr("href").substring(question.attr("href").lastIndexOf("#"));glow.dom.get(href).css("display","block");}};}();glow.ready(function(){questionsAndAnswers.init();});var iPlayerTabs=function(){var checkedDOM=false,goodToGo=false;function haveTabs(){if(checkedDOM){return goodToGo;}if(document.getElementById("iPlayer")){goodToGo=true;}checkedDOM=true;return goodToGo;}return{load:function(){if(haveTabs()){glow.dom.get("#iPlayer").css("visibility","hidden");var channel=glow.dom.get("#iPlayer h2 a").attr("rel");var getRef=glow.net.get("/tv/channels_common/1/includes/iplayer_tabs/iplayer_tabs.sssi?channel="+channel,{onLoad:function(response){glow.dom.get("#iPlayer").html(response.text());iPlayerTabs.show("iplayer_tab_mostpopular");glow.dom.get("#iPlayer").css("visibility","visible");},onError:function(response){glow.dom.get("#iPlayer").css("visibility","visible");}});}},show:function(tab){if(haveTabs()){glow.dom.get("#tabnav li a").removeClass("on");glow.dom.get("#"+tab+"_link").addClass("on");glow.dom.get("#iplayerTabs .content").css("display","none");glow.dom.get("#"+tab).css("display","block");}else{return false;}}};}();glow.ready(function(){iPlayerTabs.load();});