var C4=C4||{};
if(!(C4.Util&&C4.Util.appendQueryParam)){C4.Util={};
C4.Util.appendQueryParam=function(){}
}if(window.location.href.indexOf("4od/player")!==-1){OAS_listpos=""
}OAS_listpos=OAS_listpos.replace(",x07","");
OAS_listpos=OAS_listpos.replace(",x08","");
var c4oasPrimaryBrandCategory=jQuery('meta[name="primaryBrandCategory"]').attr("content");
if(OAS_sitepage.indexOf("programmes")>-1&&c4oasPrimaryBrandCategory&&c4oasPrimaryBrandCategory!=""){if(window.location.href.indexOf("programmes/tags")>-1){OAS_sitepage=OAS_sitepage.replace(/programmes\/tags/,"programmes")
}else{OAS_listpos=OAS_listpos+",Right1,Right2,Right3,BottomLeft,BottomRight"
}OAS_sitepage=OAS_sitepage.replace(/programmes\//,"programmes/"+c4oasPrimaryBrandCategory.toLowerCase()+"/")
}if(OAS_sitepage.indexOf("programmes/themes")>-1){OAS_listpos=OAS_listpos+",Right1,Right2,Right3,BottomLeft,BottomRight,Bottom1,TopRight"
}if(jQuery("body#catchUp").length>0){OAS_query=C4.Util.appendQueryParam({url:OAS_query,queryParam:"expandable=false"});
OAS_listpos=OAS_listpos+",TopRight";
OAS_listpos=removePosition(OAS_listpos,"Right1");
OAS_listpos=removePosition(OAS_listpos,"x10")
}if(jQuery("body#fourOnDemandLanding").length>0){OAS_listpos=removePosition(OAS_listpos,"x10");
OAS_listpos=OAS_listpos+",Right2,Right3"
}if(document.pageid=="errorPage"){OAS_listpos=removePosition(OAS_listpos,"Top1")
}function removePosition(myStr,mySubstr){myStr=","+myStr+",";
myStr=myStr.split(","+mySubstr+",").join(",");
myStr=myStr.substring(1,myStr.length-1);
return myStr
}if(document.pageid==="embeddedPage"||document.pageid==="4odBrandLanding"){OAS_listpos+=",Frame1,Position2"
}if(jQuery("body#categoryPage").length>0||jQuery("body#fourOnDemandLanding").length>0||jQuery("body#catchup").length>0){OAS_listpos+=",BottomLeft,BottomRight"
}if(jQuery("body#catchup").length>0||jQuery("body#fourOnDemandLanding").length>0){OAS_listpos+=",TopRight"
}if(window.wl10120camp){OAS_query=C4.Util.appendQueryParam({url:OAS_query,queryParam:"wl10120camp="+wl10120camp})
}if(window.wl10121camp){OAS_query=C4.Util.appendQueryParam({url:OAS_query,queryParam:"wl10121camp="+wl10121camp})
}if(window.wl10122camp){OAS_query=C4.Util.appendQueryParam({url:OAS_query,queryParam:"wl10122camp="+wl10122camp})
}if(window.wl10123camp){OAS_query=C4.Util.appendQueryParam({url:OAS_query,queryParam:"wl10123camp="+wl10123camp})
}(function($){if(Identity.getAge()!==null){OAS_query=C4.Util.appendQueryParam({url:OAS_query,queryParam:"age="+Identity.getAge()})
}if(Identity.getGender()!==null){OAS_query=C4.Util.appendQueryParam({url:OAS_query,queryParam:"gender="+Identity.getGender()})
}})(jQuery);
