SOCIALIZUS PROJECT IS A NEW SOCIAL NETWORK FOR SOCIALISING AND PARTYING WITH YOUR COMMUNITIES
Chargement Évènements

« Tous les Évènements

  • Cet évènement est passé

Authentic Durham Smythe Jersey

août 17, 2018 @ 8:00 - 5:00

// 0){for(var e=0;
e<this["implements"].length;
e++){if(!this.instanceOf(this["implements"][e])){throw new Error("Interface not fully implemented")
}}}}j.prototype=h;
j.constructor=j;
j.extend=arguments.callee;
return j
}
})();
EventDispatcher=Class.extend({buildListenerChain:function(){if(!this.listenerChain){this.listenerChain={}
}},addEventListener:function(d,c){if(!c instanceof Function){throw {message:"Listener isn't a function"}
}this.buildListenerChain();
if(!this.listenerChain[d]){this.listenerChain[d]=[c]
}else{this.listenerChain[d].push(c)
}},hasEventListener:function(b){if(this.listenerChain){return(typeof this.listenerChain[b]!="undefined")
}else{return false
}},removeEventListener:function(d,f){if(!this.hasEventListener(d)){return false
}for(var e=0;
e<this.listenerChain[d].length;
e++){if(this.listenerChain[d][e]==f){this.listenerChain[d].splice(e,1)
}}},dispatchEvent:function(h,f){this.buildListenerChain();
if(!this.hasEventListener(h)){return false
}for(var e=0;
e<this.listenerChain[h].length;
e++){var g=this.listenerChain[h][e];
if(g.call){g.call(this,f)
}}}});
PDKComponent=Class.extend({_generateExportedMarkup:function(){return'


},write:function(){document.write(this._generateExportedMarkup(this.id));
try{var d=document.getElementById(this.id);
return this._bindElement(d)
}catch(c){}},bind:function(g){try{var h=document.getElementById(g);
h.innerHTML=this._generateExportedMarkup();
var f=document.getElementById(this.id);
return this._bindElement(f)
}catch(e){}},_bindElement:function(b){return this.container=b
},init:function(){},doPluginStuff:function(){this.pluginManager=new PlugInManager(this.controller);
for(prop in this){if(!prop.toLowerCase().match(/plugin|wrapper/)){continue
}var q=this[prop];
if(typeof q!= »string »){continue
}var A;
if(prop.toLowerCase().indexOf(« plugin »)==0){A=prop.substr(6)
}else{if(prop.toLowerCase().indexOf(« wrapper »)==0){A=prop.substr(7)
}}var s;
var r=Number.MAX_VALUE;
var D;
var u;
var y;
var x;
var v=new Object();
var B=q.split(« | »);
for(var w=0;
w<B.length;
w++){var z=B[w];
if(z.indexOf("=")==-1){continue
}var C=[z.substr(0,z.indexOf("=")),z.substr(z.indexOf("=")+1)];
var t=C[0];
var i=C[1];
i=unescape(i);
switch(t.toLowerCase()){case"type":s=i;
break;
case"priority":r=parseInt(i);
break;
case"url":D=i;
break;
case"suburl":u=i;
break;
case"runtime":y=i;
break;
case"videolayer":x=i;
break;
default:v[t]=i;
break
}}if(!D){return null
}this.pluginManager.addPlugIn(A,s,r,D,u,v,null,y,x)
}this.pluginManager.ready()
},ready:function(){this.controller.registerFunction("getComponentSize",this,this.getComponentSize);
this.controller.registerFunction("addChild",this,this.addChild);
var b=this;
tpTime("Component.ready until doPluginStuff timeout");
setTimeout(function(){tpTimeEnd("Component.ready until doPluginStuff timeout");
b.doPluginStuff()
},0)
},getComponentSize:function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight,id:this.id}
},addChild:function(b){if(this.pluginLayer){this.pluginLayer.appendChild(b)
}else{if(this.container){this.container.appendChild(b)
}}},addPlugIn:function(k,p,i,j,l,m,n){if(!this.plugins){this.plugins=new Array()
}var o={id:k,type:p,priority:i,url:j,subUrl:l,vars:m,plugIn:n};
this.pluginManager.addPlugIn(o)
}});
oldController=EventDispatcher.extend({init:function(){this.functions=new Object();
this.objects=new Object();
this.pluginQueue=new Array();
this.pluginScopes=new Array();
this.waitingForPlugIn=false
},trace:function(h,e,g){var f=$pdk.debug.trace(h,this.widgetId,e,g)||new Date();
this.dispatchEvent("OnPdkTrace",{message:h,timestamp:(f.valueOf()),controllerId:this.widgetId,className:e,level:g})
},dispatchEvent:function(c,d){this._super(c,{type:c,data:d})
},doDispatchEvent:function(b){this.dispatchEvent(b.type,b.data)
},removeEventListener:function(d,c){this._super(d,c)
},addEventListener:function(d,c){this._super(d,c)
},loadPlugIn:function(c,d){c.controller=d;
this.pluginQueue.push(c);
this.pluginScopes.push(d.componentId);
if(this.waitingForPlugIn){return
}this.loadNextPlugIn()
},loadNextPlugIn:function(){if(this._pluginTimeout){clearTimeout(this._pluginTimeout);
this._pluginTimeout=undefined
}this.currentPlugIn=this.pluginQueue.shift();
if(!this.queuedControllers){this.queuedControllers=[]
}if(this.currentPlugIn){this.waitingForPlugIn=true;
tpDebug("Trying to load plugin at "+this.currentPlugIn.url);
var f=document.getElementsByTagName("head")[0];
var j=document.createElement("script");
j.type="text/javascript";
j.onerror=function(){h.loadNextPlugIn()
};
j.src=this.currentPlugIn.url;
var h=this;
f.appendChild(j);
this._pluginTimeout=setTimeout(function(){h.loadNextPlugIn()
},5000)
}else{var i=0;
var g=this.queuedControllers.length;
for(;
i<g;
i++){this.queuedControllers[i].dispatchEvent("OnPlugInsComplete",null,this.pluginScopes)
}this.dispatchEvent("OnPlugInsComplete",null,this.pluginScopes);
if(tpController){tpController.ready()
}var i=0;
for(;
i<g;
i++){this.queuedControllers[i].initializePlayback()
}var h=this;
setTimeout(function(){h.initializePlayback()
},1)
}},addChild:function(c,d){return this.callFunction("addChild",[c],d)
},plugInLoaded:function(h,g){if(!this.queuedControllers){this.queuedControllers=[]
}var e=false;
for(var f in this.queuedControllers){if(this.currentPlugIn.controller.id==f.id){e=true;
break
}}if(e){this.queuedControllers.push(this.currentPlugIn.controller)
}h.initialize({controller:this.currentPlugIn.controller,vars:this.currentPlugIn.vars,priority:this.currentPlugIn.priority});
if(g){this.addChild(g,[this.currentPlugIn.controller.componentId])
}this.dispatchEvent("OnPlugInLoaded",h,[this.currentPlugIn.controller.componentId]);
this.waitingForPlugIn=false;
this.loadNextPlugIn()
},clickPlayButton:function(b){return this.callFunction("clickPlayButton",[],b)
},clickPlayButtonNative:function(b){return this.callFunction("clickPlayButtonNative",[],b)
},doParsePlaylist:function(e,f,d){return this.callFunction("doParsePlaylist",[e,f],d)
},firstRange:function(c,d){this.callFunction("firstRange",[c],d)
},getCurrentRange:function(b){this.callFunction("getCurrentRange",[],b)
},getRelease:function(e,f,d){return this.callFunction("getRelease",[e,f],d)
},getSubtitleLanguage:function(d,c){this.callFunction("getSubtitleLanguage",[d],c)
},getSubtitleStyle:function(b){this.callFunction("getSubtitleStyle",[],b)
},loadRelease:function(e,d,f){e=this.modRelease(e);
return this.callFunction("loadRelease",[e,d],f)
},loadReleaseURL:function(e,d,f){return this.callFunction("loadReleaseURL",[e,d],f)
},loadReleaseURLNative:function(e,d,f){return this.callFunction("loadReleaseURLNative",[e,d],f)
},parseRelease:function(h,f,e,g){return this.callFunction("parseRelease",[h,f,e],g)
},loadJSON:function(f,g,e,h){return this.callFunction("loadJSON",[f,g,e],h)
},supportsFullScreen:function(b){return this.callFunction("supportsFullScreen",[],b)
},supportsFastForward:function(b){return this.callFunction("supportsFastForward",[],b)
},supportsSeek:function(b){return this.callFunction("supportsSeek",[],b)
},supportsMute:function(b){return this.callFunction("supportsMute",[],b)
},supportsVolume:function(b){return this.callFunction("supportsVolume",[],b)
},mute:function(c,d){return this.callFunction("mute",[c],d)
},setVolume:function(c,d){return this.callFunction("setVolume",[c],d)
},setPlaybackRate:function(c,d){return this.callFunction("setPlaybackRate",[c],d)
},nextClip:function(b){return this.callFunction("nextClip",[],b)
},nextRange:function(c,d){this.callFunction("nextRange",[c],d)
},tryWritePlayer:function(b){return this.callFunction("tryWritePlayer",[],b)
},pause:function(f,e,d){return this.callFunction("pause",[f,d],e)
},pauseNative:function(c,d){return this.callFunction("pauseNative",[c],d)
},playNext:function(f,e,d){return this.callFunction("playNext",[f,e],d)
},playPrevious:function(c,d){this.callFunction("playPrevious",[c],d)
},sendError:function(d,c){this.callFunction("sendError",[d],c)
},previousClip:function(b){return this.callFunction("previousClip",[],b)
},previousRange:function(c,d){this.callFunction("previousRange",[c],d)
},refreshReleaseModel:function(r,j,p,o,q,l,k,n,m){if(p){p.globalDataType=this.getDataTypeName("Sort")
}if(o){o.globalDataType=this.getDataTypeName("Range")
}return this.callFunction("refreshReleaseModel",[r,j,p,o,q,l,n,m],k)
},setAudioTrackByIndex:function(d,c){this.callFunction("setAudioTrackByIndex",[d],c)
},setAudioTrackByLanguage:function(c,d){this.callFunction("setAudioTrackByLanguage",[c],d)
},seekToPercentage:function(d,c){return this.callFunction("seekToPercentage",[d],c)
},seekToPosition:function(d,c){return this.callFunction("seekToPosition",[d],c)
},playPlaylist:function(c,d){return this.callFunction("playPlaylist",[c],d)
},setRelease:function(e,d,f){e=this.modRelease(e);
return this.callFunction("setRelease",[e,d],f)
},setReleaseURL:function(e,d,f){return this.callFunction("setReleaseURL",[e,d],f)
},setReleaseURLNative:function(e,d,f){return this.callFunction("setReleaseURLNative",[e,d],f)
},setShowSubtitles:function(d,c){this.callFunction("setShowSubtitles",[d],c)
},setSmil:function(d,c){this.callFunction("setSmil",[d],c)
},setSubtitleLanguage:function(c,d){this.callFunction("setSubtitleLanguage",[c],d)
},setSubtitleStyle:function(c,d){this.callFunction("setSubtitleStyle",[c],d)
},setToken:function(e,f,d){this.callFunction("setToken",[e,f],d)
},showFullScreen:function(c,d){return this.callFunction("showFullScreen",[c],d)
},endRelease:function(b){return this.callFunction("endRelease",[],b)
},getMediaArea:function(){var b=null;
return this.callFunction("getMediaArea",[],b)
},setMediaArea:function(c,d){this.callFunction("setMediaArea",[c],d)
},getOverlayArea:function(g,f,h,e){return this.callFunction("getOverlayArea",[g,f,h],e)
},getContentArea:function(b){return this.callFunction("getOverlayArea",[],b)
},setOverlayArea:function(c,d){this.callFunction("setOverlayArea",[c],d)
},getReleaseState:function(){return this.callFunction("getReleaseState",[])
},getTimeSinceLastAd:function(b){return this.callFunction("getTimeSinceLastAd",[],b)
},injectPlaylist:function(c,d){return this.callFunction("injectPlaylist",[c],d)
},insertPlaylist:function(c,d){return this.callFunction("insertPlaylist",[c],d)
},insertClip:function(c,d){return this.callFunction("insertClip",[c],d)
},registerAdPlugIn:function(c){var d=null;
return this.callFunction("registerAdPlugIn",[c],d)
},registerClipWrapperPlugIn:function(c){var d=null;
return this.callFunction("registerClipWrapperPlugIn",[c],d)
},registerMetadataUrlPlugIn:function(f,e,d){return this.callFunction("registerMetadataUrlPlugIn",[f,e],d)
},registerURLPlugIn:function(g,h,f){var e=null;
return this.callFunction("registerURLPlugIn",[g,h,f],e)
},setAds:function(c,d){return this.callFunction("setAds",[c],d)
},addPlayerCard:function(o,k,i,l,j,m,p,n){this.callFunction("addPlayerCard",[o,k,i,l,j,m,p,n],n)
},showPlayerCard:function(f,h,g,i,j){return this.callFunction("showPlayerCard",[f,h,g,i],j)
},hidePlayerCard:function(e,f,d){this.callFunction("hidePlayerCard",[e,f],d)
},showMenuCard:function(d,c){return this.callFunction("showMenuCard",[d],c)
},checkIfEndCardExists:function(b){return this.callFunction("checkIfEndCardExists",[],b)
},setClip:function(c){var d=null;
return this.callFunction("setClip",[c],d)
},setMetadataUrl:function(d,c){return this.callFunction("setMetadataUrl",[d],c)
},setPlayerLayoutUrl:function(d,c){return this.callFunction("setPlayerLayoutUrl",[d],c)
},setPlayerLayoutXml:function(d,c){return this.callFunction("setPlayerLayoutXml",[d],c)
},setClipWrapper:function(d,c){return this.callFunction("setClipWrapper",[d],c)
},wrapClip:function(f,d,e){return this.callFunction("wrapClip",[f,d],e)
},initializePlayback:function(b){return this.callFunction("initializePlayback",[],b)
},getPlaybackRate:function(){return this.callFunction("getPlaybackRate",[],scope)
},endMedia:function(d,c){return this.callFunction("endMedia",[d,c])
},getVideoProxy:function(b){return this.callFunction("getVideoProxy",[],b)
},isFlashPlayer:function(c){var d=this.callFunction("isFlashPlayer",[],c);
if(d===undefined){return true
}else{return d
}},isStandbyMode:function(){return this.callFunction("isStandbyMode",[])
},isPrefetch:function(){return this.callFunction("isPrefetch",[])
},markOffset:function(f,e,d){return this.callFunction("markOffset",[f,e,d])
},resetRelease:function(b){return this.callFunction("resetRelease",[],b)
},updateMediaTime:function(d,c){this.callFunction("updateMediaTime",[d],c)
},updateClip:function(c,d){this.callFunction("updateClip",[c],d)
},updatePlaylist:function(c,d){this.callFunction("updatePlaylist",[c],d)
},writePlayer:function(d,e,f){return this.callFunction("writePlayer",[d,e],f)
},setShowControls:function(d,f,e){this.callFunction("setShowControls",[d,f],e)
},getDataTypeName:function(b){switch(b){case"AdPattern":return"com.theplatform.pdk.data::AdPattern";
case"Banner":return"com.theplatform.pdk.data::Banner";
case"BaseClip":return"com.theplatform.pdk.data::BaseClip";
case"CallInfo":return"com.theplatform.pdk.communication::CallInfo";
case"CategoryInfo":return"com.theplatform.pdk.data::CategoryInfo";
case"Clip":return"com.theplatform.pdk.data::Clip";
case"CommInfo":return"com.theplatform.pdk.communication::CommInfo";
case"CustomData":return"com.theplatform.pdk.data::CustomData";
case"CustomValue":return"com.theplatform.pdk.data::CustomValue";
case"DispatchInfo":return"com.theplatform.pdk.communication::DispatchInfo";
case"FunctionInfo":return"com.theplatform.pdk.communication::FunctionInfo";
case"HandlerInfo":return"com.theplatform.pdk.communication::HandlerInfo";
case"HyperLink":return"com.theplatform.pdk.data::HyperLink";
case"MediaClick":return"com.theplatform.pdk.data::MediaClick";
case"MediaFile":return"com.theplatform.pdk.data::MediaFile";
case"MessageInfo":return"com.theplatform.pdk.communication::MessageInfo";
case"MetricInfo":return"com.theplatform.pdk.data::MetricInfo";
case"Overlay":return"com.theplatform.pdk.data::Overlay";
case"PdkEvent":return"com.theplatform.pdk.events::PdkEvent";
case"ProviderInfo":return"com.theplatform.pdk.data::ProviderInfo";
case"Range":return"com.theplatform.pdk.data::Range";
case"Rating":return"com.theplatform.pdk.data::Rating";
case"Release":return"com.theplatform.pdk.data::Release";
case"ReleaseInfo":return"com.theplatform.pdk.data::ReleaseInfo";
case"ScopeInfo":return"com.theplatform.pdk.communication::ScopeInfo";
case"Sort":return"com.theplatform.pdk.data::Sort";
case"Subtitles":return"com.theplatform.pdk.data::Subtitles";
case"TrackingUrl":return"com.theplatform.pdk.data::TrackingUrl";
case"BandwidthPreferences":return"com.theplatform.pdk.data::BandwidthPreferences";
case"Annotation":return"com.theplatform.pdk.data::Annotation"
}},ready:function(){this.isHTML5Loading=false;
this.checkMessageQueue()
},callFunction:function(f,h,j,i){if(j==null&&this.scopes!=undefined){j=this.scopes.concat()
}var g=this.functions[f];
if(g){return this.functions[f].apply(this.objects[f],h)
}else{if(tpController&&!i){return tpController.callFunction(f,h,j)
}else{return null
}}},doCallFunction:function(b){this.callFunction(b.name,b.args,b.scope)
},registerFunction:function(e,f,g){var h=this.functions[e]===undefined;
this.functions[e]=g;
this.objects[e]=f;
if(tpController){tpController.registerFunction(e,function(){return g.apply(f,arguments)
},(this.scopes?this.scopes.concat():undefined),h)
}},modRelease:function(d){if(d){d.globalDataType=this.getDataTypeName("Release");
if(d.categories){d.categories=this.modCategories(d.categories)
}if(d.thumbnails){for(var c=0;
c<d.thumbnails.length;
c++){d.thumbnails[c].globalDataType=this.getDataTypeName("MediaFile");
if(d.thumbnails[c].customValues){d.thumbnails[c].customValues=this.modCustomValues(d.thumbnails[c].customValues)
}}}if(d.customValues){d.customValues=this.modCustomValues(d.customValues)
}if(d.metrics){for(var c=0;
c<d.metrics.length;
c++){d.metrics[c].globalDataType=this.getDataTypeName("MetricInfo")
}}if(d.provider){d.provider.globalDataType=this.getDataTypeName("ProviderInfo");
if(d.provider.customValues){d.provider.customValues=this.modCustomValues(d.provider.customValues)
}}if(d.ratings){for(var c=0;
c<d.ratings.length;
c++){d.ratings[c].globalDataType=this.getDataTypeName("Rating")
}}if(d.URL){d.url=d.URL
}d.mediaPID=d.mediaPid?d.mediaPid:"";
delete d.mediaPid
}return d
},modCustomValues:function(d){for(var c=0;
c<d.length;
c++){d[c].globalDataType=this.getDataTypeName("CustomValue")
}return d
},modCategories:function(d){for(var c=0;
c<d.length;
c++){d[c].globalDataType=this.getDataTypeName("CategoryInfo")
}return d
},modClip:function(d){if(d){d.globalDataType=this.getDataTypeName("Clip");
var c=d.baseClip;
if(!c){c=new Object()
}if(d.banners){c.banners=d.banners
}if(d.overlays){c.overlays=d.overlays
}d.baseClip=this.modBaseClip(c);
if(d.chapter){d.chapter.globalDataType=this.getDataTypeName("Chapter")
}}return d
},modBaseClip:function(c){if(!c){c=new Object()
}c.globalDataType=this.getDataTypeName("BaseClip");
if(c.moreInfo){c.moreInfo.globalDataType=this.getDataTypeName("HyperLink");
if(c.moreInfo.clickTrackingUrls){c.moreInfo.clickTrackingUrls=this.modTracking(c.moreInfo.clickTrackingUrls)
}}if(c.banners){for(var d=0;
d<c.banners.length;
d++){c.banners[d].globalDataType=this.getDataTypeName("Banner");
if(c.banners[d].clickTrackingUrls){c.banners[d].clickTrackingUrls=this.modTracking(c.banners[d].clickTrackingUrls)
}}}if(c.overlays){for(var d=0;
d<c.overlays.length;
d++){c.overlays[d].globalDataType=this.getDataTypeName("Overlay");
if(c.overlays[d].clickTrackingUrls){c.overlays[d].clickTrackingUrls=this.modTracking(c.overlays[d].clickTrackingUrls)
}}}if(c.availableSubtitles){for(var d=0;
d<c.availableSubtitles;
d++){c.availableSubtitles[d].globalDataType=this.getDataTypeName("Subtitles")
}}if(c.categories){c.categories=this.modCategories(c.categories)
}if(c.adPattern){c.adPattern.globalDataType=this.getDataTypeName("AdPattern")
}if(c.trackingURLs){c.trackingURLs=this.modTracking(c.trackingURLs)
}if(c.contentCustomData){c.contentCustomData.globalDataType=this.getDataTypeName("CustomData")
}if(c.ownerCustomData){c.ownerCustomData.globalDataType=this.getDataTypeName("CustomData")
}if(c.outletCustomData){c.outletCustomData.globalDataType=this.getDataTypeName("CustomData")
}return c
},modTracking:function(d){for(var c=0;
c<d.length;
c++){d.globalDataType=this.getDataTypeName("TrackingUrl")
}return d
}});
if(window.tpController===undefined){tpController=new oldController()
}else{var tempController=tpController;
tpController=new oldController();
for(var prop in tempController){tpController[prop]=tempController[prop]
}if(window["$pdk"]!==undefined){$pdk.controller=tpController
}}ComponentController=oldController.extend({init:function(f,e,d){this.id=f;
this.component=e;
this.widgetId=this.component&&this.component.widgetId?this.component.widgetId:this.id;
if(typeof(d)==="object"){this.scopes=[f].concat(d)
}else{if(typeof(d)==="string"){this.scopes=[f,d]
}else{this.scopes=[f,"default"]
}}this._super()
},getComponentSize:function(b){return this.callFunction("getComponentSize",[],b)
},dispatchEvent:function(c,d){if(this.scopes&&this.scopes.length){tpController.dispatchEvent(c,d,this.scopes.concat(),this.widgetId)
}else{tpController.dispatchEvent(c,d,null,this.widgetId)
}},removeEventListener:function(d,c){if(this.scopes&&this.scopes.length){tpController.removeEventListener(d,c,this.scopes.concat())
}else{tpController.removeEventListener(d,c)
}},addEventListener:function(d,c){if(this.scopes&&this.scopes.length){tpController.addEventListener(d,c,this.scopes.concat())
}else{tpController.addEventListener(d,c)
}},getProperty:function(c){var d=this.component[c];
if(d===undefined){d=this.component[c.toLowerCase()]
}return d
},setProperty:function(d,c){this.component[d]=c
}});
function printStackTrace(){var i=[];
var r=false;
try{q.dont.exist+=0
}catch(o){if(o.stack){var e=o.stack.split("\n");
for(var q=0,p=e.length;
q<p;
q++){if(e[q].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){i.push(e[q])
}}i.shift();
r=true
}else{if(window.opera&&o.message){var e=o.message.split("\n");
for(var q=0,p=e.length;
q<p;
q++){if(e[q].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){var m=e[q];
if(e[q+1]){m+="at"+e[q+1];
q++
}i.push(m)
}}i.shift();
r=true
}}}if(!r){var s=arguments.callee.caller;
while(s){var n=s.toString();
var t=n.substring(n.indexOf("function")+8,n.indexOf("("))||"anonymous";
i.push(t);
s=s.caller
}}output(i)
}function output(b){alert(b.join("\n\n"))
}ViewController=ComponentController.extend({init:function(d,f,e){this._super(f,e)
},instantiateCard:function(b){return this.callFunction("instantiateCard",[b])
},showCard:function(l,j,i,g,k,h){this.callFunction("showCard",[l,j,i,g,k,h])
},hideCard:function(d,c){this.callFunction("hideCard",[d,c])
},getCard:function(d,c){return this.callFunction("getCard",[d,c])
},getCurrentCard:function(b){return this.callFunction("getCurrentCard",[b])
}});
PlayerController=ViewController.extend({init:function(c,d){this._super("player",c,d)
},getCurrentPlaylist:function(){return this.callFunction("getCurrentPlaylist",[])
},getMainPlaylist:function(){return this.callFunction("getMainPlaylist",[])
},getReleaseState:function(){return this.callFunction("getReleaseState",[])
},getMuteState:function(){return this.callFunction("getMuteState",[])
},getFullScreenState:function(){return this.callFunction("getFullScreenState",[])
},registerPlaylistPlugIn:function(c,d){var d=null;
return this.callFunction("registerPlaylistPlugIn",[c],d)
},playlistReplaced:function(c,d){return this.callFunction("playlistReplaced",[c],d)
},loadLayer:function(d,f,e){return this.callFunction("loadLayer",[d,f,e])
},hasLayer:function(d,c){return this.callFunction("hasLayer",[d,c])
},callLayerFunction:function(f,e,d){return this.callFunction("callLayerFunction",[f,e,d])
}});
if($pdk.bootloaderVersion!==null&&typeof($pdk.bootloaderVersion)==="object"){if("5"!=$pdk.bootloaderVersion.major||"8"!=$pdk.bootloaderVersion.minor||"6"!=$pdk.bootloaderVersion.revision){alert("Error: Bootloader Version and PDK-JS Version do not match.\n\nSomething is seriously wrong.")
}}ComponentTypes=new Object();
ComponentTypes.CATEGORY_LIST="categoryList";
ComponentTypes.CATEGORY_MODEL="categoryModel";
ComponentTypes.CLIP_INFO="clipInfo";
ComponentTypes.COMM_MANAGER="commManager";
ComponentTypes.HEADER="header";
ComponentTypes.JAVASCRIPT="javascript";
ComponentTypes.NAVIGATION="navigation";
ComponentTypes.PLAYER="player";
ComponentTypes.RELEASE_LIST="releaseList";
ComponentTypes.RELEASE_MODEL="releaseModel";
ComponentTypes.SEARCH="search";
ComponentTypes.EXTERNAL="external";
ComponentTypes.LOCAL_ALL="localAll";
ComponentTypes.GLOBAL_ALL="globalAll";
Rectangle=Class.extend({init:function(e,g,h,f){this._x=e?e:0;
this._y=g?g:0;
this._width=h?h:0;
this._height=f?f:0;
this._top=this._y;
this._bottom=this._y+this._height;
this._left=this._x;
this._right=this._x+this._width
},clone:function(){return new Rectangle(this._x,this._y,this._width,this._height)
},x:function(b){if(b!=undefined){if(b<0){b=0
}this._x=b;
this._left=b;
this._right=b+this._width
}return this._x
},y:function(b){if(b!=undefined){if(b<0){b=0
}this._y=b;
this._top=b;
this._bottom=b+this._height
}return this._y
},width:function(b){if(b!=undefined){if(b<0){b=0
}this._width=b;
this._right=b+this._x
}return this._width
},height:function(b){if(b!=undefined){if(b<0){b=0
}this._height=b;
this._bottom=b+this._y
}return this._height
},top:function(b){if(b!=undefined){if(b<0){b=0
}if(b<this._y){this._height=0
}else{this._height=this._bottom-b
}this._top=this._y=b
}return this._top
},left:function(b){if(b!=undefined){if(b<0){b=0
}if(b<this._x){this._width=0
}else{this._width=this._right-b
}this._left=this._x=b
}return this._left
},bottom:function(b){if(b!=undefined){if(b<0){b=0
}if(b<this._y){this._bottom=this._y=b;
this._height=0
}else{this._bottom=b;
this._height=b-this._y
}}return this._bottom
},right:function(b){if(b!=undefined){if(b<0){b=0
}if(b<this._x){this._right=this._x=b;
this._width=0
}else{this._right=b;
this._width=b-this._x
}}return this._right
}});
var PlayerEvent=new Object();
PlayerEvent.OnUpdateOverlays="OnUpdateOverlays";
PlayerEvent.OnCheckAdFailed="OnCheckAdFailed";
PlayerEvent.OnStandbyRelease="OnStandbyRelease";
PlayerEvent.OnMediaAreaChanged="OnMediaAreaChanged";
PlayerEvent.onContentAreaChanged="onContentAreaChanged";
PlayerEvent.OnOverlayAreaChanged="OnOverlayAreaChanged";
PlayerEvent.OnReleaseStop="OnReleaseStop";
PlayerEvent.OnBandwidthPreferencesSet="OnBandwidthPreferencesSet";
PlayerEvent.OnFormShown="OnFormShown";
PlayerEvent.OnFlashFullScreen="OnPlayerFullScreen";
PlayerEvent.OnExternalFullScreen="OnExternalFullScreen";
PlayerEvent.OnPlayerPause="OnPlayerPause";
PlayerEvent.OnPlayerUnPause="OnPlayerUnPause";
PlayerEvent.OnNetConnectionClosed="OnNetConnectionClosed";
PlayerEvent.OnTrackActivated="OnTrackActivated";
PlayerEvent.OnPlugInsAboveControlsChanged="OnPlugInsAboveControlsChanged";
PlayerEvent.OnDebug="OnDebug";
PlayerEvent.OnVideoSized="OnVideoSized";
PlayerEvent.OnRelatedContentIdsReceived="OnRelatedContentIdsReceived";
$pdk.ns("$pdk.managers");
$pdk.managers.TrackingUrl={TRIGGER_TYPE_PERCENTAGE:0,TRIGGER_TYPE_MILLISECONDS:1,TRIGGER_TYPE_EVENT:2,EVENT_MUTE:0,EVENT_PAUSE:1,EVENT_REPLAY:2,EVENT_FULL_SCREEN:3,EVENT_STOP:4,EVENT_START:5,EVENT_UNPAUSE:6,EVENT_CLOSE:7,EVENT_UNMUTE:8,EVENT_ACCEPTINVITATION:9,EVENT_CLICK:10,EVENT_COMPLETE:11,EVENT_VIEWABILITY:12};
$pdk.managers.TrackingUrlManager=$pdk.extend(function(){},{_controller:null,_trackingURLs:null,_trackingURLMap:{},_trackingClipMap:{},_eventTracking:null,_urlQueue:[],_contentClipIndexesByClipId:{},_contentClipBoundaries:[],_videoViewCumulativeTimes:[0,5,10,15,30,60,120,180,300],_playlistHasSsa:false,_handleMediaCompleteFired:false,CHAPTER_INDEX_DELIMITER:"_||_",constructor:function(d,e){this._controller=d;
this._container=e;
this.init();
var f=this;
window.addEventListener("scroll",function(a){f.checkViewability()
});
window.addEventListener("resize",function(a){f.checkViewability()
});
window.addEventListener("focus",function(a){f.checkViewability()
});
window.addEventListener("blur",function(a){f.checkViewability()
})
},init:function(){var b=this;
this._eventTracking=new $pdk.managers.EventTracking(this._controller);
this._eventTracking.addEventListener("OnSendUrl",function(a){b.trackEvent(a)
});
this._controller.addEventListener("OnReleaseStart",function(a){b.handleReleaseStart(a)
});
this._controller.addEventListener("OnMediaLoadStart",function(a){b.handleMediaLoadStart(a)
});
this._controller.addEventListener("OnMediaClick",function(a){b.handleMediaClick(a)
});
this._controller.addEventListener("OnMediaStart",function(a){b.handleMediaStart(a)
});
this._controller.addEventListener("OnMediaEnd",function(a){b.handleMediaEnd(a)
});
this._controller.addEventListener("OnMediaComplete",function(a){b.handleMediaComplete(a)
});
this._controller.addEventListener("OnReleaseEnd",function(a){b.handleReleaseEnd(a)
})
},handleViewableImpression:function(){if(this._clip&&this._isAd&&this._trackingURLs){for(var b=0;
b0){if((this._trackingURLs[b].triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_EVENT)&&(this._trackingURLs[b].triggerValue===$pdk.managers.TrackingUrl.EVENT_VIEWABILITY)){this.trackProgress(this._trackingURLs[b])
}}}}this._viewabilityFired=true
},handleMediaClick:function(h){try{var g=this._clip.baseClip.moreInfo.clickTrackingUrls;
if(g){var e=0;
var f=g.length;
for(;
e0){this.gatherContentClipInfo(b.data.clips)
}},determineIfPlaylistHasSsa:function(f){var d=f.metaTags;
if(d){for(var e=0;
e<d.length;
e++){if(d[e].name==="manifestServiceUrl"){this._playlistHasSsa=true;
break
}}}},gatherContentClipInfo:function(g){this._contentClipIndexesByClipId={};
this._contentClipBoundaries=[];
var j=0;
for(var f=0;
f<g.length;
f++){var h=g[f];
if(!h.baseClip.isAd){this._contentClipIndexesByClipId[h.id]=j;
if(!this._contentClipIndexesByClipId.firstContentClipId){this._contentClipIndexesByClipId.firstContentClipId=h.id
}j++;
var i={startTime:h.startTime,endTime:h.endTime};
this._contentClipBoundaries.push(i)
}}this._contentClipIndexesByClipId.numberOfContentClips=j
},handleMediaLoadStart:function(c){this._clip=c.data;
this._isAd=c.data.baseClip.isAd;
this._trackingURLs=this.getTrackingURLs(this._clip);
this.handlePossibleBreakStartAndEndFromEmptyAdBreak();
var d=function(a,b){return a==b
};
if(d(this._clip.id,this._contentClipIndexesByClipId.firstContentClipId)){this._isPrerollTracking=false
}},handlePossibleBreakStartAndEndFromEmptyAdBreak:function(){if(this._clip&&!this._isAd&&this._trackingURLs){this.fireEmptyAdBreakStartBreakEndBeacons()
}},isLastContentClip:function(b){return(b&&!b.baseClip.isAd&&this._contentClipIndexesByClipId[b.id]==this._contentClipIndexesByClipId.numberOfContentClips-1)
},fireEmptyAdBreakStartBreakEndBeacons:function(){for(var c=0;
c0&&this.matchUrlToClip(d)){if(d.triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_EVENT){if(d.triggerValue===$pdk.managers.TrackingUrl.EVENT_START){this.removeEmptyAdBreakDelimiter(d);
this.trackProgress(d)
}else{if(d.triggerValue===$pdk.managers.TrackingUrl.EVENT_COMPLETE&&this._handleMediaCompleteFired){this.removeEmptyAdBreakDelimiter(d);
this.trackProgress(d)
}}if(this.isVideoViewTracking(d.URL)){this.startVideoViewTracking(d)
}}}}},matchUrlToClip:function(i){var n=this._contentClipIndexesByClipId[this._clip.id];
var m=this.CHAPTER_INDEX_DELIMITER+n+this.CHAPTER_INDEX_DELIMITER;
var j=i.URL.indexOf(m);
var k=j>-1;
var l=i.URL.indexOf(this.CHAPTER_INDEX_DELIMITER+ »POSTROLL »+this.CHAPTER_INDEX_DELIMITER);
var h=l>-1;
if(h){i.triggerValue=$pdk.managers.TrackingUrl.EVENT_COMPLETE
}else{i.triggerValue=$pdk.managers.TrackingUrl.EVENT_START
}return k
},removeEmptyAdBreakDelimiter:function(d){var c=d.URL.indexOf(this.CHAPTER_INDEX_DELIMITER);
d.URL=d.URL.substr(0,c)
},isVideoViewTracking:function(f){var g=this.getQueryString(« cn »,f);
if(!g||g!= »videoView »){return false
}var h=this.getQueryString(« init »,f);
if(!h||h!= »1″){return false
}var e=(f.indexOf(« :// »)>-1)?f.split(« / »)[2]:f.split(« / »)[0];
e=e.split(« : »)[0];
return e.indexOf(« fwmrm.net »)>-1
},getQueryString:function(g,e){var h=new RegExp(« [?&] »+g+ »=([^&#]*) », »i »);
var f=h.exec(e);
return f?f[1]:null
},replaceQueryParameter:function(l,n,j,m){var i=new RegExp(« [?] »+l+ »=([^&#]*) », »i »);
var k=new RegExp(« [?&] »+l+ »=([^&#]*) », »i »);
var h=n.match(i)? »? »: »& »;
return n.replace(k,h+j+ »= »+m)
},startVideoViewTracking:function(d){if(!this._onVideoViewMediaPlayingListener){var c=this;
this._videoViewTime={url:this.replaceQueryParameter(« init »,d.URL, »init », »0″),cumulativeSeconds:0,lastTime:0,lastSent:this._videoViewCumulativeTimes[0],lastCumulativeSent:0,nextToSend:this._videoViewCumulativeTimes[1]};
this._onVideoViewSeekListener=function(a){c.handleVideoViewSeek(a)
};
this._controller.addEventListener(« OnMediaSeek »,this._onVideoViewSeekListener);
this._onVideoViewMediaPlayingListener=function(a){c.handleVideoViewMediaPlaying(a)
};
this._controller.addEventListener(« OnMediaPlaying »,this._onVideoViewMediaPlayingListener)
}},endVideoViewTracking:function(){if(this._onVideoViewMediaPlayingListener){this._controller.removeEventListener(« OnMediaPlaying »,this._onVideoViewMediaPlayingListener);
this._controller.removeEventListener(« OnMediaSeek »,this._onVideoViewSeekListener);
this._onVideoViewMediaPlayingListener=null;
this._onVideoViewSeekListener=null;
this._videoViewTime={}
}},handleVideoViewSeek:function(b){if(!this._isAd){this._videoViewTime.lastTime=0
}},handleVideoViewMediaPlaying:function(c){if(this._isAd){return
}if(this._videoViewTime.lastTime&&this.isValidMediaPlaying(c.data.currentTime,this._videoViewTime.lastTime,c.data.mediaTime)){this._videoViewTime.cumulativeSeconds+=(c.data.currentTime-this._videoViewTime.lastTime)/1000;
if(this._videoViewTime.cumulativeSeconds>=this._videoViewTime.lastCumulativeSent+this._videoViewTime.nextToSend){this.sendNextVideoView(this._videoViewTime.nextToSend);
this._videoViewTime.lastSent=this._videoViewTime.nextToSend;
this._videoViewTime.lastCumulativeSent+=this._videoViewTime.nextToSend;
var d=this._videoViewCumulativeTimes.indexOf(this._videoViewTime.lastSent);
this._videoViewTime.nextToSend=d<this._videoViewCumulativeTimes.length-1?this._videoViewCumulativeTimes[d+1]:this._videoViewCumulativeTimes[d]
}}this._videoViewTime.lastTime=c.data.currentTime
},isValidMediaPlaying:function(e,g,f){var h=false;
if(!this.isFromScrubberDrag(e,g)){if(($pdk.isSafari||$pdk.isIOS)&&this._playlistHasSsa){h=this.isWithinContentClipBoundaries(f)
}else{h=true
}}return h
},isFromScrubberDrag:function(d,f){var e=d-f;
return e750
},isWithinContentClipBoundaries:function(c){for(var d=0;
d=this._contentClipBoundaries[d].startTime&&c0)&&(f-this._viewabilityStartTime>2000)){this.handleViewableImpression()
}},startViewableTimer:function(){this._viewabilityStartTime=Date.now();
var b=this;
setTimeout(function(){b.checkViewability()
},2000)
},stopViewableTimer:function(){this._viewabilityStartTime=0
},isViewable:function(){var l=this._container;
var o=0;
var j=0,k=0;
var m=this._container;
while(m){j+=m.offsetLeft;
k+=m.offsetTop;
m=m.offsetParent
}var p=Math.min(0,(window.scrollX+window.innerWidth-j-l.offsetWidth)/l.offsetWidth);
var n=Math.min(0,(window.scrollY+window.innerHeight-k-l.offsetHeight)/l.offsetHeight);
var e=1+p+n;
return document.hasFocus()&&(e>=0.5)
},getTrackingURLs:function(j){var g=j.baseClip.isAd;
var h=g?j.baseClip.releaseID:j.id;
var k=this;
var l=function(){return g&&k._trackingClipMap[h].baseClip===j.baseClip
};
var i=function(){return !g&&k._trackingClipMap[h]
};
if(this._trackingClipMap[h]&&(l()||i())){tpDebug(« Use existing Clip’s trackingURLs », »TrackingUrlMgr »,tpConsts.INFO);
return this._trackingURLMap[h]
}this._trackingClipMap[h]=j;
this._trackingURLMap[h]=j.baseClip.trackingURLs;
return this._trackingURLMap[h]
},resetTrackingURLs:function(){this._trackingClipMap={};
this._trackingURLMap={}
},doTracking:function(i){if(!this._trackingURLs){return
}var k;
var l;
var j;
if(!i){i={};
i.percentComplete=100;
i.currentTime=1000000;
j=5
}else{j=100000/(!this._isAd&&i.durationAggregate?i.durationAggregate:i.duration)
}l=(!this._isAd&&i.currentTimeAggregate)?i.currentTimeAggregate:i.currentTime;
k=(!this._isAd&&i.percentCompleteAggregate)?i.percentCompleteAggregate:i.percentComplete;
var g;
for(var h=0;
h0&&!this._eventTracking.trackingUrlIsTaggedForSpecificClip(g)){if((g.triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_PERCENTAGE)&&(k>=g.triggerValue)&&(k=g.triggerValue&&l<(g.triggerValue+5000)){this.trackProgress(g)
}else{if(g.triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_EVENT&&g.triggerValue==$pdk.managers.TrackingUrl.EVENT_COMPLETE&&k==100){this.trackBreakEnd(g)
}}}}}},trackBreakEnd:function(b){this.trackProgress(b);
if(this._isPrerollTracking&&this.isVideoViewTracking(b.URL)){this.startVideoViewTracking(b)
}},trackProgress:function(b){b.hasFired=true;
this.sendUrl(b.URL)
},trackEvent:function(b){this.sendUrl(b.data)
},sendUrl:function(b){this._urlQueue.push(b);
if(!this._urlQueueWaiting){this.sendNextUrl()
}},sendNextUrl:function(){var f=this._urlQueue.shift();
if(!f||this.urlWasNotDefined(f)){return
}if(f.indexOf("ord=")===-1){var g=100000+Math.floor(Math.random()*900001);
f+=(f.indexOf("?")===-1?"?":"&");
f+="ord="+g
}f+=(f.indexOf("?")===-1?"?":"&");
f+="source=pdk";
this._urlQueueWaiting=true;
var h=new Image();
var e=this;
h.onload=function(a){e.completeHandler(a)
};
h.onerror=function(a){e.completeHandler(a)
};
h.src=f+"&"
},urlWasNotDefined:function(b){return b==="undefined"
},completeHandler:function(b){tpDebug("Tracking url sent: "+(b.target).src,"TrackingUrlMgr",tpConsts.INFO);
this._urlQueueWaiting=false;
this.sendNextUrl()
}});
$pdk.ns("$pdk.managers");
$pdk.managers.EventTracking=$pdk.extend(EventDispatcher,{_controller:null,_urls:null,constructor:function(b){this._controller=b;
this.init()
},init:function(){var b=this;
this._controller.addEventListener("OnMediaStart",function(a){b.onMediaStart(a)
})
},onMediaStart:function(c){var d=c.data;
if(d.baseClip.trackingURLs){this.setup(d.baseClip.trackingURLs)
}if(d.baseClip.impressionUrls){this.trackImpression(d)
}},trackImpression:function(h){var g=h.baseClip;
var e=g.impressionUrls;
if(g.impressionUrls&&g.impressionUrls.length){for(var f=0;
f<g.impressionUrls.length;
f++){this.dispatchEvent("OnSendUrl",{type:"OnSendUrl",data:g.impressionUrls[f]})
}g.impressionUrls=[];
this._controller.updateClip(h)
}},setup:function(e){this._urls=[];
if(this._listeners){this.removeListeners()
}this._listeners={};
var f;
for(var h=0;
h<e.length;
h++){f=e[h];
if(f.triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_EVENT){this.doSetup(f)
}}if(this._urls[$pdk.managers.TrackingUrl.EVENT_START]){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_START])
}if(this._urls.length){var g=this;
this._listeners.OnMediaEnd=function(a){g.onMediaEnd(a)
};
this._controller.addEventListener("OnMediaEnd",this._listeners.OnMediaEnd)
}},doSetup:function(d){if(this.trackingUrlIsTaggedForSpecificClip(d)){return
}var c=this;
switch(d.triggerValue){case $pdk.managers.TrackingUrl.EVENT_START:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_START,d);
break;
case $pdk.managers.TrackingUrl.EVENT_STOP:break;
case $pdk.managers.TrackingUrl.EVENT_PAUSE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_PAUSE,d);
this._listeners.OnMediaPause=function(a){c.onMediaPause(a)
};
this._controller.addEventListener("OnMediaPause",this._listeners.OnMediaPause);
break;
case $pdk.managers.TrackingUrl.EVENT_UNPAUSE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_UNPAUSE,d);
this._listeners.OnMediaUnpause=function(a){c.onMediaUnpause(a)
};
this._controller.addEventListener("OnMediaUnpause",this._listeners.OnMediaUnpause);
break;
case $pdk.managers.TrackingUrl.EVENT_REPLAY:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_REPLAY,d);
this._listeners.OnMediaSeek=function(a){c.onMediaSeek(a)
};
this._controller.addEventListener("OnMediaSeek",this._listeners.OnMediaSeek);
break;
case $pdk.managers.TrackingUrl.EVENT_MUTE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_MUTE,d);
this._listeners.OnMute=function(a){c.onMute(a)
};
this._controller.addEventListener("OnMute",this._listeners.OnMute);
break;
case $pdk.managers.TrackingUrl.EVENT_UNMUTE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_UNMUTE,d);
this._listeners.OnUnMute=function(a){c.onUnMute(a)
};
this._controller.addEventListener("OnMute",this._listeners.OnUnMute);
break;
case $pdk.managers.TrackingUrl.EVENT_FULL_SCREEN:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_FULL_SCREEN,d);
this._listeners.OnShowFullScreen=function(a){c.onShowFullScreen(a)
};
this._controller.addEventListener("OnShowFullScreen",this._listeners.OnShowFullScreen);
break;
case $pdk.managers.TrackingUrl.EVENT_CLICK:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_CLICK,d);
this._listeners.OnMediaClick=function(a){c.onMediaClick(a)
};
this._controller.addEventListener("OnMediaClick",this._listeners.OnMediaClick);
break;
case $pdk.managers.TrackingUrl.EVENT_COMPLETE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_COMPLETE,d);
this._listeners.OnMediaComplete=function(a){c.onMediaComplete(a)
};
this._controller.addEventListener("OnMediaComplete",this._listeners.OnMediaComplete);
break
}},trackingUrlIsTaggedForSpecificClip:function(b){return typeof b.URL==="string"&&b.URL.match(/_\|\|_\d+_\|\|_/)!==null
},removeListeners:function(){this._controller.removeEventListener("OnMediaEnd",this._listeners.OnMediaEnd);
this._controller.removeEventListener("OnMediaPause",this._listeners.OnMediaPause);
this._controller.removeEventListener("OnMediaUnpause",this._listeners.OnMediaUnpause);
this._controller.removeEventListener("OnMediaSeek",this._listeners.OnMediaSeek);
this._controller.removeEventListener("OnMute",this._listeners.OnMute);
this._controller.removeEventListener("OnMute",this._listeners.OnUnMute);
this._controller.removeEventListener("OnShowFullScreen",this._listeners.OnShowFullScreen);
this._controller.removeEventListener("OnMediaClick",this._listeners.OnMediaClick);
this._controller.removeEventListener("OnMediaComplete",this._listeners.OnMediaComplete)
},addUrlToEvent:function(c,d){if(!this._urls[c]){this._urls[c]=[]
}this._urls[c].push(d)
},onReleaseStop:function(b){if(this._urls[$pdk.managers.TrackingUrl.EVENT_STOP]&&this._urls[$pdk.managers.TrackingUrl.EVENT_STOP].length){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_STOP])
}},onMediaEnd:function(b){this.cleanup()
},onMediaPause:function(b){this._controller.removeEventListener("OnMediaPause",this._listeners.OnMediaPause);
this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_PAUSE])
},onMediaUnpause:function(b){this._controller.removeEventListener("OnMediaUnpause",this._listeners.OnMediaUnpause);
this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_UNPAUSE])
},onMediaSeek:function(f){var d=f.data;
var e=d.end;
if(e.currentTime<=3000){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_REPLAY])
}},onMute:function(b){if(b.data){this._controller.removeEventListener("OnMute",this._listeners.OnMute);
this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_MUTE])
}},onUnMute:function(b){if(!b.data){this._controller.removeEventListener("OnMute",this._listeners.OnUnMute);
this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_UNMUTE])
}},onShowFullScreen:function(c){var d=c.data;
if(d){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_FULL_SCREEN])
}},onMediaClick:function(b){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_CLICK])
},onMediaComplete:function(b){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_COMPLETE])
},cleanup:function(){this.removeListeners()
},destroy:function(){this.cleanup()
},sendTrackingEvent:function(f){if(!f){return
}var e;
for(var d=0;
d-1&&navigator.userAgent.indexOf(« AppleWebKit »)>-1&&navigator.userAgent.toLowerCase().indexOf(« chrome »)===-1);
var n=this._pbm.video;
var l=this._pbm.videoEngine;
var m=n.parentNode.parentNode;
if(m.webkitRequestFullScreen&&!j){tpDebug(« WebKit fullscreen API is apparently supported »);
if((document.webkitIsFullScreen||m.webkitDisplayingFullscreen)&&!p){document.webkitCancelFullScreen()
}else{if(p){try{this.handlerFired=false;
if(!this.fsChangeHandler){this.fsChangeHandler=function(){o._isFullScreen=((document.webkitIsFullScreen&&o._requestedFullScreen)||n.webkitDisplayingFullscreen||m.webkitDisplayingFullscreen)==true;
tpDebug(« got webkitfullscreenchange event, isFullscreen is « +o._isFullScreen);
if(!o._isFullScreen){m.removeEventListener(« webkitfullscreenchange »,this.fsChangeHandler)
}if(o._requestedFullScreen){if(!o._isFullScreen){o._requestedFullScreen=false
}o.sendEvt()
}}
}var o=this;
this._requestedFullScreen=true;
m.removeEventListener(« webkitfullscreenchange »,this.fsChangeHandler);
m.addEventListener(« webkitfullscreenchange »,this.fsChangeHandler);
setTimeout(this.fsChangeHandler,3000);
m.webkitRequestFullScreen();
o.sendEvt()
}catch(k){this._requestedFullScreen=false;
m.removeChild(blocker);
tpDebug(« Switching to full screen from Javascript is not supported in this browser unless it’s initiated by a user click. »,this.controller.id, »FullScreenManager », »error »);
return
}}}return
}else{if(m.mozRequestFullScreen){tpDebug(« Moz fullscreen API is apparently supported »);
if(document.mozFullScreen&&!p){try{document.mozCancelFullScreen()
}finally{if(document.mozFullScreen){tpDebug(« Couldn’t exit with mozCancelFullScreen. Trying DOM manipulation… »);
var e=m.parentNode;
e.removeChild(m);
e.appendChild(m);
tpDebug(« Done trying DOM manipulation »);
document.removeEventListener(« mozfullscreenchange »,this.callback);
this.callback=undefined;
this.sendEvt()
}}}else{if(p){try{this._requestedFullScreen=true;
m.mozRequestFullScreen()
}catch(k){tpDebug(« Switching to full screen from Javascript is not supported in this browser unless it’s initiated by a user click. »,this.controller.id, »FullScreenManager », »error »);
return
}this.sendEvt();
var o=this;
document.removeEventListener(« mozfullscreenchange »,this.callback);
this.callback=function(){o._isFullScreen=document.mozFullScreen&&o._requestedFullScreen;
if(!o._isFullScreen){document.removeEventListener(« mozfullscreenchange »,o.callback);
o.callback=undefined
}if(o._requestedFullScreen){if(!o._isFullScreen){o._requestedFullScreen=false
}o.sendEvt()
}};
document.addEventListener(« mozfullscreenchange »,this.callback)
}}return
}}if(!this._isIFrame&&m.msRequestFullscreen){tpDebug(« MS fullscreen API is apparently supported »);
if((document.msFullscreenElement)&&!p){document.msExitFullscreen()
}else{if(p){try{this.handlerFired=false;
var o=this;
if(!this.fsChangeHandler){this.fsChangeHandler=function(){o._isFullScreen=(document.msFullscreenElement!=null);
tpDebug(« got msfullscreenchange event, isFullscreen is « +o._isFullScreen);
if(!o._isFullScreen){document.removeEventListener(« MSFullscreenChange »,o.fsChangeHandler)
}if(o._requestedFullScreen){if(!o._isFullScreen){o._requestedFullScreen=false
}o.sendEvt()
}}
}this._requestedFullScreen=true;
document.removeEventListener(« MSFullscreenChange »,this.fsChangeHandler);
document.addEventListener(« MSFullscreenChange »,this.fsChangeHandler);
setTimeout(this.fsChangeHandler,3000);
m.msRequestFullscreen();
o.sendEvt()
}catch(k){m.removeChild(blocker);
tpDebug(« Switching to full screen from Javascript is not supported in this browser unless it’s initiated by a user click. »,this.controller.id, »FullScreenManager », »error »);
return
}}}return
}else{if(this._enableFullWindow||($pdk.isIE&&this._isIFrame)){tpDebug(« No fullscreen API available, using full window »);
if(!this.playerContainerStyle){this.playerContainerStyle={}
}this._isFullWindow=false;
if(p){this.playerContainerStyle.position=m.style.position;
this.playerContainerStyle.top=m.style.top;
this.playerContainerStyle.left=m.style.left;
this.playerContainerStyle.bottom=m.style.bottom;
this.playerContainerStyle.right=m.style.right;
this.playerContainerStyle.marginTop=m.style.marginTop;
this.playerContainerStyle.marginLeft=m.style.marginLeft;
this.playerContainerStyle.marginBottom=m.style.marginBottom;
this.playerContainerStyle.marginRight=m.style.marginRight;
this.playerContainerStyle.zIndex=$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.zIndex;
this.playerContainerStyle.overflowX=$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowX;
this.playerContainerStyle.overflowY=$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowY;
$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.zIndex=10000;
m.style.position= »fixed »;
m.style.top= »0px »;
m.style.left= »0px »;
m.style.bottom= »0px »;
m.style.right= »0px »;
m.style.marginTop= »0px »;
m.style.marginLeft= »0px »;
m.style.marginBottom= »0px »;
m.style.marginRight= »0px »;
$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowX= »visible »;
$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowY= »visible »;
this._isFullWindow=true
}else{m.style.position=this.playerContainerStyle.position;
m.style.top=this.playerContainerStyle.top;
m.style.left=this.playerContainerStyle.left;
m.style.bottom=this.playerContainerStyle.bottom;
m.style.right=this.playerContainerStyle.right;
m.style.marginTop=this.playerContainerStyle.marginTop;
m.style.marginLeft=this.playerContainerStyle.marginLeft;
m.style.marginBottom=this.playerContainerStyle.marginBottom;
m.style.marginRight=this.playerContainerStyle.marginRight;
m.style.zIndex=this.playerContainerStyle.zIndex;
$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.zIndex=this.playerContainerStyle.zIndex;
$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowX=this.playerContainerStyle.overflowX;
$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowY=this.playerContainerStyle.overflowY
}if(this._isIFrame){if(p){$pdk.controller.requestIFrameFullWindow()
}else{$pdk.controller.cancelIFrameFullWindow()
}this._isFullWindow=p
}this._isFullScreen=p;
var o=this;
setTimeout(function(){o.sendEvt()
},10);
return
}else{try{tpDebug(« Trying to set VideoEngine fullscreen to « +p);
if(!this.changeListener){var o=this;
this.changeListener=function(a){o.fullscreenChange(a)
};
this._pbm.videoEngine.addEventListener(« FULLSCREEN »,this.changeListener)
}this._requestedFullScreen=p;
l.setFullScreen(p)
}catch(k){tpDebug(« VideoEngine won’t support fullscreen »);
return
}}}this.sendEvt()
},sendEvt:function(){tpDebug(« FullScreen is now: »+this._isFullScreen);
this._controller.dispatchEvent(« OnShowFullScreen »,this._isFullScreen)
},getFullScreenState:function(){var b;
if(tpIsAndroid()||this._pbm.video.webkitDisplayingFullscreen||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||this._isFullWindow){b=true
}else{b=false
}if(b!=this._isFullScreen){this._isFullScreen=b;
this.sendEvt()
}return this._isFullScreen
}});
$pdk.ns(« $pdk.plugin »);
$pdk.plugin.MetadataUrlManager=$pdk.extend(function(){},{constructor:function(b){this._plugins=[];
this._currentQueue=[];
this._context={complete:false,found:false};
this._controller=b;
this._controller.registerFunction(« registerMetadataUrlPlugIn »,this,this.registerMetadataUrlPlugIn);
this._controller.registerFunction(« setMetadataUrl »,this,this.setMetadataUrl);
this._controller.registerFunction(« setUrl »,this,this.setUrl)
},setUrl:function(f,e,d){this._context={releaseUrl:f,isPreview:e,callback:d,complete:false,found:false};
this._currentQueue=this._plugins.concat();
if(this._currentQueue.length===0){d(f);
return true
}else{if(!this._processNextPlugin()){d(f);
return true
}else{return false
}}},setMetadataUrl:function(b){if(this._currentQueue.length===0){if(!this._context.complete){this._context.releaseUrl=b;
this._context.callback(b);
this._context.complete=true
}}else{this._context.releaseUrl=b;
if(!this._processNextPlugin()){this._context.callback(this._context.releaseUrl);
this._context.complete=true
}}},registerMetadataUrlPlugIn:function(c,d){if(typeof(c.rewriteMetadataUrl)!== »function »){throw new Error(‘Attempt to register MetadataUrlPlugIn with non-conforming interface (plugin method « rewriteMetadataUrl » does not exist or is not a real method)’)
}else{if(c.rewriteMetadataUrl.length!==2){throw new Error(‘Attempt to register MetadataUrlPlugIn with non-conforming interface (« rewriteMetadataUrl » method does not take 2 parameters)’)
}}this._plugins.push({plugin:c,priority:Number(d)});
this._plugins=this._sortPluginsByPriority(this._plugins)
},_processNextPlugin:function(){var c=false,d;
while(!c&&this._currentQueue.length>0){d=this._currentQueue.shift();
c=d.plugin.rewriteMetadataUrl(this._context.releaseUrl,this._context.isPreview)
}this._context.found=c?true:this._context.found;
return c
},_sortPluginsByPriority:function(b){return b.sort(function(a,e){return a.priority-e.priority
})
}});
AdManager=Class.extend({adPatternInfo:{cookieName: » »,cookiePrefix: »tpPdk »,adPolicy:0,mediaCount:0,chapterCount:0},countedRelease:false,init:function(d){this.controller=d;
d.registerFunction(« setAds »,this,this.setAds);
d.registerFunction(« registerAdPlugIn »,this,this.registerAdPlugIn);
d.registerFunction(« getTimeSinceLastAd »,this,this.getTimeSinceLastAd);
this.defaultAdPattern=d.getProperty(« adPattern »);
this.timeSinceLastAd=0;
this.plugins=new Array();
var c=this;
this.getAdPolicy(d.component.releaseUrl);
this.controller.addEventListener(« OnMediaStart »,function(a){c.onMediaStart.apply(c,[a])
});
this.controller.addEventListener(« OnReleaseStart »,function(a){c.onReleaseStart.apply(c,[a])
})
},setAds:function(b){if(b&&(tpIsIOS()||tpIsAndroid()&&this.controller.isPrefetch())){b.isAd=true
}if(!b||(b.clips&&b.clips.length===0)){this.controller.dispatchEvent(« __internal__AdLoadFailure »)
}this.controller.insertPlaylist(b)
},registerAdPlugIn:function(f,e,h){this.plugins.push({adPlugIn:f,adType:e,priority:h});
function g(a,b){if(a.priorityb.priority){return 1
}else{return 0
}}}this.plugins.sort(g)
},getTimeSinceLastAd:function(){return this.timeSinceLastAd
},isAd:function(c){if(c.baseClip.isAd){return true
}else{var d=this.adPlugInsIsAd(c);
c.baseClip.isAd=d;
return d
}},checkAd:function(d){tpDebug(« We have « +this.plugins.length+ » ad plugins to check »);
for(var e=0;
e<this.plugins.length;
e++){var f=this.plugins[e].adPlugIn.checkAd.apply(this.plugins[e].adPlugIn,[d]);
if(f){return true
}}return false
},adPlugInsIsAd:function(c){for(var d=0;
d1){this.adPatternInfo.mediaCount=q[0];
this.adPatternInfo.chapterCount=q[1]
}if(isNaN(this.adPatternInfo.chapterCount)){this.adPatternInfo.chapterCount=0
}var l=r;
if(!n&&!this.adPatternInfo.mediaCount){this.adPatternInfo.mediaCount=0;
l=j
}if(n&&!this.adPatternInfo.chapterCount){this.adPatternInfo.chapterCount=0;
l=j
}var m=(n?this.adPatternInfo.chapterCount:this.adPatternInfo.mediaCount);
if(m<l){return false
}}if(n){this.adPatternInfo.chapterCount=0
}else{this.adPatternInfo.mediaCount=0
}return true
},setCookie:function(h,k,g,i){var j=new Date();
j.setTime(j.getTime()+(g*3600*1000));
var l=escape(k)+((g==null)?"":"; expires="+j.toUTCString())+((i==null)?"":"; path="+i);
document.cookie=h+"="+l
},getCookie:function(e){var h=document.cookie;
var g=h.indexOf(" "+e+"=");
if(g==-1){g=h.indexOf(e+"=")
}if(g==-1){h=null
}else{g=h.indexOf("=",g)+1;
var f=h.indexOf(";",g);
if(f==-1){f=h.length
}h=unescape(h.substring(g,f))
}return h
}});
/*!
* Bowser – a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2014
*/
!function(d,c){$pdk._browserCheck=d(c())
}(function(b){return function(p){if(!p||p.length==0){return false
}var a,l,r,o,m,q,i;
for(var n=0;
n

=r))&&(!hasOS||(hasOS&&b[o.toLowerCase()]))&&(!hasOSversion||(hasOSversion&&parseFloat(b.osversion)>=m))&&(!q||(q&&b.device==i))){return true
}}return false
}
},function(){var d=true;
function e(x){function t(g){var h=x.match(g);
return(h&&h.length>1&&h[1])|| » »
}var b=t(/(ipod|iphone|ipad)/i).toLowerCase(),c=/like android/i.test(x),w=!c&&/android/i.test(x),s=/CrOS/.test(x),v=t(/edge\/(\d+(\.\d+)?)/i),y=t(/version\/(\d+(\.\d+)?)/i),q=/tablet/i.test(x),z=!q&&/[^-]mobi/i.test(x),a;
if(/opera|opr/i.test(x)){a={name: »Opera »,opera:d,version:y||t(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}
}else{if(/windows phone/i.test(x)){a={name: »Windows Phone »,windowsphone:d};
if(v){a.msedge=d;
a.version=v
}else{a.msie=d;
a.version=t(/iemobile\/(\d+(\.\d+)?)/i)
}}else{if(/msie|trident/i.test(x)){a={name: »Internet Explorer »,msie:d,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}
}else{if(s){a={name: »Chrome »,chromeBook:d,chrome:d,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}
}else{if(/chrome.+? edge/i.test(x)){a={name: »Microsoft Edge »,msedge:d,version:v}
}else{if(/chrome|crios|crmo/i.test(x)){a={name: »Chrome »,chrome:d,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}
}else{if(b){a={name:b== »iphone »? »iPhone »:b== »ipad »? »iPad »: »iPod »};
if(y){a.version=y
}}else{if(/firefox|iceweasel/i.test(x)){a={name: »Firefox »,firefox:d,version:t(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)};
if(/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(x)){a.firefoxos=d
}}else{if(/silk/i.test(x)){a={name: »Amazon Silk »,silk:d,version:t(/silk\/(\d+(\.\d+)?)/i)}
}else{if(w){a={name: »Android »,version:y}
}else{if(/blackberry|\bbb\d+/i.test(x)||/rim\stablet/i.test(x)){a={name: »BlackBerry »,blackberry:d,version:y||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}
}else{if(/safari/i.test(x)){a={name: »Safari »,safari:d,version:y}
}else{a={}
}}}}}}}}}}}}if(!a.msedge&&/(apple)?webkit/i.test(x)){a.name=a.name|| »Webkit »;
a.webkit=d;
if(!a.version&&y){a.version=y
}}else{if(!a.opera&&/gecko\//i.test(x)){a.name=a.name|| »Gecko »;
a.gecko=d;
a.version=a.version||t(/gecko\/(\d+(\.\d+)?)/i)
}}if(!a.msedge&&(w||a.silk)){a.android=d
}else{if(b){a[b]=d;
a.ios=d
}}var u= » »;
if(a.windowsphone){u=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i)
}else{if(b){u=t(/os (\d+([_\s]\d+)*) like mac os x/i);
u=u.replace(/[_\s]/g, ». »)
}else{if(w){u=t(/android[ \/-](\d+(\.\d+)*)/i)
}else{if(a.webos){u=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i)
}else{if(a.blackberry){u=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i)
}else{if(a.bada){u=t(/bada\/(\d+(\.\d+)*)/i)
}else{if(a.tizen){u=t(/tizen[\/\s](\d+(\.\d+)*)/i)
}}}}}}}if(u){a.osversion=u
}var r=u.split(« . »)[0];
if(q||b== »ipad »||(w&&(r==3||(r==4&&!z)))||a.silk){a.tablet=d
}else{if(z||b== »iphone »||b== »ipod »||w||a.blackberry||a.webos||a.bada){a.mobile=d
}}a.device=(a.tablet||a.mobile)?d:false;
return a
}var f=e(typeof navigator!== »undefined »?navigator.userAgent: » »);
f._detect=e;
return f
});
tpCategoryList=PDKComponent.extend({_generateExportedMarkup:function(){return’


},init:function(f,d,e){this.width=d;
this.height=e;
this.id=f;
this.pretty=!navigator.userAgent.match(/MSIE 8/)&&!navigator.userAgent.match(/MSIE 7/)&&!navigator.userAgent.match(/MSIE 6/);
this.ALL={id: » »,value: »all »,order: »1″,title: »All »,fullTitle: »All »};
this.MOST_POPULAR={id: » »,value: »mostPopular »,order: »2″,title: »Most Popular »,fullTitle: »MostPopular »};
this.FAVORITES={id: » »,value: »favorites »,order: »3″,title: »Favorites »,fullTitle: »Favorites »};
this.TOP_RATED={id: » »,value: »topRated »,order: »4″,title: »Top Rated »,fullTitle: »TopRated »};
this.RELATED={id: » »,value: »related »,order: »5″,title: »Related Items »,fullTitle: »Related »};
if($pdk._isDevMode){this.pretty=false
}this.controller=new ComponentController(f);
this.deferredController=$pdk.shell.Registry.getInstance().getShells().get(f)._deferredController;
this.eventQueue=[]
},initialize:function(){var b=this;
if(this.scopes){this.controller.scopes=[this.id].concat(this.scopes.split(« , »))
}else{this.controller.scopes=[this.id, »default »]
}if(this.allChoiceLabel){this.ALL.title=this.allChoiceLabel
}if(this.mostPopularChoiceLabel){this.MOST_POPULAR.title=this.mostPopularChoiceLabel
}if(this.favoritesChoiceLabel){this.FAVORITES.title=this.favoritesChoiceLabel
}if(this.topRatedChoiceLabel){this.TOP_RATED.title=this.topRatedChoiceLabel
}if(this.relatedChoiceLabel){this.RELATED.title=this.relatedChoiceLabel
}this.controller.addEventListener(« OnRefreshCategoryModel »,function(){b.handleCategoryModelRefreshed.apply(b,arguments)
});
this.deferredController.addEventListener(« OnRefreshCategoryModel »,function(){b.handleCategoryModelRefreshed.apply(b,arguments)
});
this.controller.addEventListener(« OnRefreshReleaseModel »,function(){b.handleReleaseModelRefreshed.apply(b,arguments)
});
this.deferredController.addEventListener(« OnRefreshReleaseModel »,function(){b.handleReleaseModelRefreshed.apply(b,arguments)
});
this.currentIndex=-1
},write:function(c){if(this.autoLoad===undefined){this.autoLoad=true
}if(c){this.container=c
}else{document.write(‘

‘);
this.container=document.getElementById(this.id);
this.container.style.width=this.width;
this.container.style.height=this.height
}this.style=document.createElement(« style »);
var d=document.getElementsByTagName(« head »)[0];
this.style.setAttribute(« type », »text/css »);
d.appendChild(this.style);
this.initialize()
},_bindElement:function(b){if(this.autoLoad==null){this.autoLoad=true
}this.container=b;
this.container.style.width=this.width;
this.container.style.height=this.height;
tpController.ready();
return this.container
},categoryUrlsAreEqual:function(d,e,f){d=d.replace(/(.*)\?.*/, »$1″);
e=e.replace(/(.*)\?.*/, »$1″);
return d===e||d.indexOf(f)>=0
},setTileSelected:function(f){var e=-1;
this.currentCategory=f;
if(!this.sortedEntries){return
}for(var h=0;
h=0||b.indexOf(« ?sort=updated%7Cdesc »)>=0){return true
}else{return false
}},handleReleaseModelRefreshed:function(b){if(b.data.category){this.setTileSelected(b.data.category)
}else{if(b.data.search){this.setTileSelected(null)
}else{if(b.data.requestUrl&&this.isMostPopularRequest(b.data.requestUrl)){this.setTileSelected(this.mostPopularChoiceLabel)
}else{this.setTileSelected(this.allChoiceLabel)
}}}},handleCategoryModelRefreshed:function(L){if(this.paging){this.eventQueue.push(L);
return
}this.loading=false;
$pdk.jQuery(this.loadingIndicator).stop();
$pdk.jQuery(this.loadingIndicator).remove();
var W=L.data;
var h=(this.feed&&this.feed.search!==W.search?true:false);
var J;
var V;
var H;
var a;
if(this.feed&&this.feed.range&&W&&W.range){if(W.entries.length>0){this.paging=true
}if(this.feed.range.startIndexW.range.startIndex){this.animateForward=false
}}}else{this.animateForward=false
}this.feed=W;
this.loadedTiles=[];
this.numTiles=W.entries.length;
if(!this.currentPage||h||!this.pretty){this.refresh();
this.currentPage=null;
this.previousPage=null
}var X=-1;
var N=-1;
var Q=0;
if(this.hasoverlay== »true »){var O=document.createElement(« div »);
O.className= »tpCategoryListOverlay »;
this.container.appendChild(O);
Q=O.clientHeight
}var D=document.createElement(« ul »);
if(this.flow== »horizontal »){D.className= »tpMenu »
}else{D.className= »tpList »
}this.container.appendChild(D);
$pdk.jQuery(D).css(« margin-top »,parseInt($pdk.jQuery(D).css(« margin-top »))+Q);
D.ontouchstart=function(b){this.startX=b.changedTouches[0].pageX;
this.startY=b.changedTouches[0].pageY
};
D.ontouchend=function(b){if(this.startX&&((this.startX-b.changedTouches[0].pageX)>100)){$pdk.controller.nextRange()
}else{if(this.startX&&((b.changedTouches[0].pageX-this.startX)>100)){$pdk.controller.previousRange()
}}};
this.items=[];
var i,E,a,w,F,R,U,H,M;
var T=($pdk.jQuery(D).innerWidth());
var G=($pdk.jQuery(D).innerHeight());
var P={};
for(var I=0;
I<W.entries.length;
I++){P[W.entries[I].id]=W.entries[I]
}this.sortedEntries=[];
for(var I=0;
I<W.entries.length;
I++){if(P[W.entries[I].parentId]){}else{this.sortedEntries.push(W.entries[I])
}}this.sortedEntries.sort(function(b,c){if(parseInt(b.order,10)==parseInt(c.order,10)){if(b.titlec.title){return 1
}else{return 0
}}}else{return parseInt(b.order,10)-parseInt(c.order,10)
}});
if(this.allChoiceIndex>0){this.sortedEntries.splice(this.allChoiceIndex-1,0,this.ALL)
}if(this.mostPopularChoiceIndex>0){this.sortedEntries.splice(this.mostPopularChoiceIndex-1,0,this.MOST_POPULAR)
}if(this.favoritesChoiceIndex>0){this.sortedEntries.splice(this.favoritesChoiceIndex-1,0,this.FAVORITES)
}if(this.topRatedChoiceIndex>0){this.sortedEntries.splice(this.topRatedChoiceIndex-1,0,this.TOP_RATED)
}for(var I=0;
I$pdk.jQuery(D).offset().top+$pdk.jQuery(D).innerHeight()){this.items.pop();
D.removeChild(i);
break
}else{if($pdk.jQuery(i).offset().left+$pdk.jQuery(i).width()>$pdk.jQuery(D).offset().left+$pdk.jQuery(D).innerWidth()){this.items.pop();
D.removeChild(i);
break;
if(!this.more){}}}}var K=this;
setTimeout(function(){K.doInitialLoad(W)
},1);
if(this.style&&!this.createdColorizationStyles){this.createdColorizationStyles=true;
var S= » »;
if(this.itembackgroundcolor){S+= »# »+this.id+ ».tpCategoryList>ul .tpCategory, ul# »+this.id+ ».tpCategoryList .tpCategory { background-color: # »+this.itembackgroundcolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList>ul .tpCategory .tpMetadata, ul# »+this.id+ ».tpCategoryList .tpCategory { background-color: # »+this.itembackgroundcolor.substr(2)+ »; } »
}if(this.itemframecolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategory a { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpShine { background-color: # »+this.itemframecolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpShine { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList ul { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList ol { border-color: # »+this.itemframecolor.substr(2)+ »; } »
}if(this.textframecolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpMetadata { border-color: # »+this.textframecolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategory a .tpMetadata .tpGroup { border-color: # »+this.textframecolor.substr(2)+ »; } »
}if(this.textframeselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected .tpMetadata { border-color: # »+this.textframeselectedcolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected a .tpMetadata .tpGroup { border-color: # »+this.textframeselectedcolor.substr(2)+ »; } »
}if(this.textcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory a { color: # »+this.textcolor.substr(2)+ »; } »
}if(this.thumbnailframecolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpThumbnail { border-color: # »+this.thumbnailframecolor.substr(2)+ »; } »
}if(this.thumbnailbackgroundcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpThumbnail { background-color: # »+this.thumbnailbackgroundcolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpThumbnail img { background-color: # »+this.thumbnailbackgroundcolor.substr(2)+ »; } »
}if(this.thumbnailpaddingcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpThumbnail { background-color: # »+this.thumbnailpaddingcolor.substr(2)+ »; } »
}if(this.framecolor){}if(this.texthighlighthovercolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover .tpShine { background-color: # »+this.texthighlighthovercolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover .tpShine { border-color: # »+this.texthighlighthovercolor.substr(2)+ »; } »
}if(this.texthovercolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover a { color: # »+this.texthovercolor.substr(2)+ »; } »
}if(this.texthighlighthovercolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover a .tpMetadata .tpGroup { border-color: # »+this.texthighlighthovercolor.substr(2)+ » !important; } »
}if(this.thumbnailhighlighthovercolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover a .tpThumbnail { border-color: # »+this.thumbnailhighlighthovercolor.substr(2)+ » !important; } »
}if(this.itemshineselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected .tpShine { background-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected .tpShine { border-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »
}if(this.textselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected a { color: # »+this.textselectedcolor.substr(2)+ »; } »
}if(this.texthighlightselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected a .tpMetadata .tpGroup { border-color: # »+this.texthighlightselectedcolor.substr(2)+ » !important; } »
}if(this.thumbnailhighlightselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected a .tpThumbnail { border-color: # »+this.thumbnailhighlightselectedcolor.substr(2)+ » !important; } »
}if(this.itemshineselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected:hover .tpShine { background-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »;
S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected:hover .tpShine { border-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »
}if(this.textselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected:hover a { color: # »+this.textselectedcolor.substr(2)+ »; } »
}if(this.backgroundcolor&&this.itembackgroundcolor&&this.framecolor){S+= ».tpCategoryList ::-webkit-scrollbar { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
S+= ».tpCategoryList ::-webkit-scrollbar-track { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
S+= ».tpCategoryList ::-webkit-scrollbar-thumb { background-color: # »+this.itembackgroundcolor.substr(2)+ »; border-color: # »+this.framecolor.substr(2)+ »}\n »;
S+= ».tpCategoryList ::-moz-scrollbar { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
S+= ».tpCategoryList ::-moz-scrollbar-track { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
S+= ».tpCategoryList ::-moz-scrollbar-thumb { background-color: # »+this.itembackgroundcolor.substr(2)+ »; border-color: # »+this.framecolor.substr(2)+ »}\n »
}if(this.style.styleSheet){this.style.styleSheet.cssText=S
}else{this.style.appendChild(document.createTextNode(S))
}}if(this.currentCategory){this.currentIndex=this.setTileSelected(this.currentCategory)
}},doInitialLoad:function(b){},disable:function(){if(tpIsIPhone()||tpIsAndroid()){return
}if(!this.blocker){this.blocker=document.createElement(« div »);
this.blocker.style.width= »100% »;
this.blocker.style.height= »100% »;
this.blocker.style.position= »absolute »;
this.blocker.style.top= »0″;
this.blocker.style.left= »0″;
this.blocker.style.background= »black »;
this.blocker.style.opacity= »0.75″;
this.blocker.style.filter= »alpha(opacity=75) »;
this.blocker.innerHTML= » « ;
this.blocker.style.zIndex= »500″;
this.container.appendChild(this.blocker)
}this.blocker.style.display= » »;
var b=this.container.childNodes;
for(child in b){if(child.style){child.style.opacity= »0.75″;
child.style.filter= »alpha(opacity=75) »
}}},enable:function(){tpDebug(« Doing enable »);
try{if(this.blocker){this.blocker.style.display= »none »
}var c=this.container.childNodes;
for(child in c){if(child.style){child.style.opacity= » »;
child.style.filter= » »
}}}catch(d){tpDebug(« enabled() threw an error with « +d.message+ » on « +d.lineNumber)
}},output:function(c){var d= » »;
for(prop in c){d+=prop+ »: « +c[prop]+ »\n »
}alert(d)
}});
CategoryList=tpCategoryList;
$pdk.ns(« $pdk.classes »);
$pdk.classes.ChallengeDataWrapper=$pdk.extend(function(){},{constructor:function(e,f){this.controller=e;
this.cd=this.challengeData(f);
tpDebug(« challengeDataWrapper constructed », »ChallengeDataWrapper »,e.id,tpConsts.DEBUG);
var d=this;
e.addEventListener(« OnSetToken »,function(a){d.onSetToken(a)
});
e.addEventListener(« OnMediaLoadStart »,function(a){d.onMediaLoadStart(a)
});
e.addEventListener(« OnReleaseStart »,function(a){d.onReleaseStart(a)
});
e.addEventListener(« OnReleaseEnd »,function(a){d.onReleaseEnd(a)
});
e.addEventListener(« OnPlugInsComplete »,function(a){d.onPluginsComplete(a)
});
e.registerFunction(« setLicenseServer »,this,this.setLicenseServer);
e.registerFunction(« setFairPlayCertUrl »,this,this.setFairPlayCertUrl);
e.registerFunction(« getChallengeData »,this,this._getChallengeData);
e.registerFunction(« setChallengeData »,this,this._setChallengeData);
this.currentClipProtected=false;
this.currentClipLicensed=false
},setLicenseServer:function(c,d){this.cd.setLicenseServer(c,d)
},setFairPlayCertUrl:function(b){this.cd.setFairPlayCertUrl(b)
},setClip:function(b){this.currentClip=b;
this.cd.setMediaData(b.baseClip.security);
this.cd.flush()
},preloadClip:function(b){return this.cd.preload(b)
},_getChallengeData:function(){return this.cd.cd
},_setChallengeData:function(){if(this.currentClip){this.cd.flush()
}},onSetToken:function(b){if(b.data.type== »urn:theplatform:auth:token »){this.cd.setToken(b.data.token)
}},onPluginsComplete:function(f){var d=this._getLicenseServers(this.controller.component);
for(var e=0;
e<d.length;
e++){this.setLicenseServer(d[e].security,d[e].url)
}this.setFairPlayCertUrl(this._getFairPlayCertUrl(this.controller.component))
},onMediaLoadStart:function(g){var f=g.data;
var h=f.baseClip.security;
var e=(f.isAd===false||f.baseClip.isAd===false);
if(e||h){this.currentClip=f;
this.cd.setMediaData(h)
}},onReleaseStart:function(j){this.currentClipLicensed=false;
this.currentClipProtected=false;
var g=j.data;
var e=g.mediaPID;
var h=g.accountID;
var i=g.releasePID;
this.cd.setMediaData(null,i,e,h)
},onReleaseEnd:function(b){this.cd.clearMediaData()
},mediaProtected:function(){if(!this.currentClipProtected){this.currentClipProtected=true;
this.controller.dispatchEvent("OnMediaProtected",this.currentClip)
}},mediaLicense:function(){if(!this.currentClipLicensed){this.currentClipLicensed=true;
this.controller.dispatchEvent("OnMediaLicense",this.currentClip)
}},licenseError:function(c){if(!this.currentClip){return
}var d={location:this.controller.id,context:null,clip:this.currentClip,endRelease:true,message:c.message,friendlyMessage:c.details,security:c.security,keySystem:c.keySystem,globalDataType:"com.theplatform.pdk.data::LicenseError"};
tpDebug("There was a security error acquiring a "+c.keySystem+" license for clip: "+this.currentClip.URL+" :: "+c.details,"ChallengeDataWrapper",this.controller.id,tpConsts.WARN);
this.currentClip=null;
this.controller.sendError(d)
},_getLicenseServers:function(f){var e=[];
for(var g in f){if(g.indexOf("licenseserver")===0){var h=f[g].split("|");
e.push({security:h[0],url:h[1]})
}}return e
},_getFairPlayCertUrl:function(d){var e;
for(var f in d){if(f.indexOf("fairplaycerturl")===0){e=d[f]
}}return e
},challengeData:function(b){return new $pdk.classes.ChallengeData(b,this,this.controller.getProperty("mpx"))
}});
$pdk.classes.ChallengeData=$pdk.extend(function(){},{constructor:function(j,h,i){this.videoEngine=j;
this.wrapper=h;
this.mpx=i;
var g={widevine:"//widevine.entitlement."+i+"/wv/web/ModularDrm?form=json&schema=1.0&token=&account=http://access.auth. »+i+ »/data/Account/ »,fairplay: »//fairplay.entitlement. »+i+ »/fpls/web/FairPlay?form=json&schema=1.0&token=&account=http://access.auth. »+i+ »/data/Account/ »,playready: »//playready.entitlement.next. »+i+ »/playready/rightsmanager.asmx?form=json&schema=1.0&auth=&account=http://access.auth. »+i+ »/data/Account/&releasePid= »};
this.cd={licenseServers:g,token: » »,security: » »,releasePid: » »,mediaId: » »,accountId: » »,event:{}};
var f=this;
this.videoEngine.addEventListener(« MEDIA_PROTECTED »,function(a){f.onMediaProtected(a)
});
this.videoEngine.addEventListener(« MEDIA_LICENSE »,function(a){f.onMediaLicense(a)
});
this.videoEngine.addEventListener(« LICENSE_ERROR »,function(a){f.onLicenseError(a)
})
},onMediaProtected:function(b){this.wrapper.mediaProtected(b);
this.cd.event=b.event;
this.flush()
},onMediaLicense:function(b){this.wrapper.mediaLicense(b)
},onLicenseError:function(b){this.wrapper.licenseError(b)
},setLicenseServer:function(c,d){if(c){if(d!=undefined){this.cd.licenseServers[c.toLowerCase()]=d.replace(«  »,this.mpx)
}else{delete this.cd.licenseServers[c.toLowerCase()]
}}},preload:function(b){if(this.cd&&this.cd.token){this.setMediaData(b.baseClip.security);
this.flush();
return true
}return false
},setFairPlayCertUrl:function(b){if(b!=undefined){this.cd.fairPlayCertUrl=b
}},setToken:function(b){this.cd.token=b
},setMediaData:function(j,i,f,h){if(j){var g=j;
if(g.toLowerCase()=== »commonencryption »){g=this._handleCommonEncryption(g)
}this.cd.security=g
}if(i){this.cd.releasePid=i
}if(f){this.cd.mediaId=f
}if(h){this.cd.accountId=h
}},_handleCommonEncryption:function(b){if($pdk.isChrome||$pdk.isFirefox){return »widevine »
}else{if($pdk.isIE||$pdk.isEdge){return »playReady »
}else{return b
}}},clearMediaData:function(){this.cd.security= » »;
this.cd.releasePid= » »;
this.cd.mediaId= » »;
this.cd.accountId= » »;
this.cd.event={}
},flush:function(){this.videoEngine.setChallengeData(this.cd)
}});
ClipWrapperManager=Class.extend({init:function(b){this.controller=b;
this.initialize()
},initialize:function(){this.controller.registerFunction(« registerClipWrapperPlugIn »,this,this.registerCWPlugin);
this.controller.registerFunction(« setClipWrapper »,this,this.setClipWrapper)
},registerCWPlugin:function(k,g){if(!g){g=0
}if(!this.plugIns){this.plugIns=new Array()
}var i={plugin:k,priority:g};
var l=false;
for(var h=0;
h<this.plugIns.length;
h++){var j=this.plugIns[h];
if(i.priority<=j.priority){this.plugIns.splice(h,0,i);
l=true;
break
}}if(!l){this.plugIns.push(i)
}},processClip:function(f){if(this.currentClip){throw"the clipWrapperManager did not complete wrapping one clip before another was started"
}if(f.isWrappingClip||!this.plugIns){return false
}if(f.wasWrapped){f.wasWrapped=false;
return false
}var i=false;
var h={clip:f};
this.currentClip=f;
for(var g=0;
g<this.plugIns.length;
g++){var j=this.plugIns[g];
if(j.plugin.wrapClip(h)){i=true;
break
}}if(!i){this.currentClip=null
}return i
},setClipWrapper:function(b){if(this.currentClip){this.currentClip.wasWrapped=true;
this.currentClip=null;
this.controller.wrapClip(b.preRolls,b.postRolls)
}}});
ControlsManager=EventDispatcher.extend({init:function(e,d,f){this.controller=e;
this._controllerDeferred=d;
this.controlsManager=f;
this.releaseStarted=false;
this._buildListeners()
},initialize:function(i,p){this.successCallback=i;
this.errorCallback=p;
var k=this.controller.getProperty("skinUrl");
if(k&&(k.indexOf(location.hostname)!=-1||k.indexOf("http")!=-1)){this.skinUrl=k
}else{this.skinUrl=k?$pdk.scriptRoot+k:$pdk.scriptRoot+"/../../pdk/skins/cinematic/cinematic.json"
}this.parentNode=document.getElementById(this.controller.id+".controls");
this.isPreview=true;
var l=this;
this.endCardID=this.controller.getProperty("endCard");
var o=this.controller.getProperty("layoutUrl");
var n=this.controller.getProperty("layout");
var j=this.controller.getProperty("useNativeControls")=="true";
var m=this.controller.getProperty("useDefaultPlayOverlay")=="true"||this.controller.getProperty("showControlsBeforeVideo")=="false";
if(m&&!j){setTimeout(function(){p(false,j)
},1)
}if(!j){setTimeout(function(){l.parseMetaLayout(o,n)
},1)
}else{setTimeout(function(){p(false,true)
},1)
}},_buildListeners:function(){this.listeners={};
var b=this;
this.listeners.end=function(a){b.onMediaEnd(a)
};
this.listeners.fullscreen=function(a){b.onShowFullScreen(a)
};
this.listeners.getlanguage=function(a){b.onGetSubtitleLanguage(a)
};
this.listeners.loadStart=function(a){b.onMediaLoadStart(a)
};
this.listeners.loading=function(a){b.onMediaLoading(a)
};
this.listeners.loadrelease=function(a){b.onLoadRelease(a)
};
this.listeners.loadreleaseurl=function(a){b.onLoadRelease(a)
};
this.listeners.mute=function(a){b.onMute(a)
};
this.listeners.paused=function(a){b.onMediaPause(a)
};
this.listeners.playing=function(a){b.onMediaPlaying(a)
};
this.listeners.releaseend=function(a){b.onReleaseEnd(a)
};
this.listeners.releasestart=function(a){b.onReleaseStart(a)
};
this.listeners.resize=function(a){b.onResize(a)
};
this.listeners.seek=function(a){b.onMediaSeek(a)
};
this.listeners.setreleaseurl=function(a){b.onSetReleaseURL(a)
};
this.listeners.showcard=function(a){b.onShowCard(a)
};
this.listeners.hidecard=function(a){b.onHideCard(a)
};
this.listeners.showplayoverlay=function(a){b.onShowPlayOverlay(a)
};
this.listeners.start=function(a){b.onMediaStart(a)
};
this.listeners.unpaused=function(a){b.onMediaUnpause(a)
};
this.listeners.volumechange=function(a){b.onVolumeChange(a)
};
this.listeners.onPlaybackRateChanged=function(a){b.onPlaybackRateChanged(a)
};
this.listeners.noSkipChanged=function(a){b.onNoSkipChanged(a)
};
this.listeners.setShowControls=function(a,d){b.setShowControls(a,d)
};
this.listeners.setPlayerLayoutUrl=function(a){b.setPlayerLayoutUrl(a)
};
this.listeners.setPlayerLayoutXml=function(a){b.setPlayerLayoutXml(a)
};
this.listeners.adLoadFailure=function(){b.onAdLoadFailure()
};
this.listeners.textTracksAvailable=function(a){b.onTextTracksAvailable(a)
};
this.listeners.clearcurrentrelease=function(a){b.onClearCurrentRelease(a)
};
this._controllerDeferred.addEventListener("OnGetSubtitleLanguage",this.listeners.getlanguage);
this._controllerDeferred.addEventListener("OnLoadRelease",this.listeners.loadrelease);
this._controllerDeferred.addEventListener("OnLoadReleaseUrl",this.listeners.loadreleaseurl);
this._controllerDeferred.addEventListener("OnMediaEnd",this.listeners.end);
this._controllerDeferred.addEventListener("OnMediaLoadStart",this.listeners.loadStart);
this._controllerDeferred.addEventListener("OnMediaLoading",this.listeners.loading);
this._controllerDeferred.addEventListener("OnMediaPause",this.listeners.paused);
this._controllerDeferred.addEventListener("OnMediaPlaying",this.listeners.playing);
this._controllerDeferred.addEventListener("OnMediaSeek",this.listeners.seek);
this._controllerDeferred.addEventListener("OnMediaStart",this.listeners.start);
this._controllerDeferred.addEventListener("OnMediaUnpause",this.listeners.unpaused);
this._controllerDeferred.addEventListener("OnMute",this.listeners.mute);
this._controllerDeferred.addEventListener("OnReleaseEnd",this.listeners.releaseend);
this._controllerDeferred.addEventListener("OnClearCurrentRelease",this.listeners.clearcurrentrelease);
this._controllerDeferred.addEventListener("OnReleaseStart",this.listeners.releasestart);
this._controllerDeferred.addEventListener("OnResize",this.listeners.resize);
this._controllerDeferred.addEventListener("OnSetReleaseUrl",this.listeners.setreleaseurl);
this._controllerDeferred.addEventListener("OnShowCard",this.listeners.showcard);
this._controllerDeferred.addEventListener("OnHideCard",this.listeners.hidecard);
this._controllerDeferred.addEventListener("OnShowFullScreen",this.listeners.fullscreen);
this._controllerDeferred.addEventListener("OnShowPlayOverlay",this.listeners.showplayoverlay);
this._controllerDeferred.addEventListener("OnVolumeChange",this.listeners.volumechange);
this._controllerDeferred.addEventListener("OnPlaybackRateChanged",this.listeners.onPlaybackRateChanged);
this._controllerDeferred.addEventListener("OnNoSkipChanged",this.listeners.noSkipChanged);
this._controllerDeferred.addEventListener("__internal__AdLoadFailure",this.listeners.adLoadFailure);
this._controllerDeferred.registerFunction("setShowControls",this,this.listeners.setShowControls);
this._controllerDeferred.registerFunction("setPlayerLayoutUrl",this,this.listeners.setPlayerLayoutUrl);
this._controllerDeferred.registerFunction("setPlayerLayoutXml",this,this.listeners.setPlayerLayoutXml);
this._controllerDeferred.addEventListener("OnTextTracksAvailable",this.listeners.textTracksAvailable)
},addListeners:function(){var b=this;
this.controller.addEventListener("OnGetSubtitleLanguage",this.listeners.getlanguage);
this.controller.addEventListener("OnLoadRelease",this.listeners.loadrelease);
this.controller.addEventListener("OnLoadReleaseUrl",this.listeners.loadreleaseurl);
this.controller.addEventListener("OnMediaEnd",this.listeners.end);
this.controller.addEventListener("OnMediaLoadStart",this.listeners.loadStart);
this.controller.addEventListener("OnMediaLoading",this.listeners.loading);
this.controller.addEventListener("OnMediaPause",this.listeners.paused);
this.controller.addEventListener("OnMediaPlaying",this.listeners.playing);
this.controller.addEventListener("OnMediaSeek",this.listeners.seek);
this.controller.addEventListener("OnMediaStart",this.listeners.start);
this.controller.addEventListener("OnMediaUnpause",this.listeners.unpaused);
this.controller.addEventListener("OnMute",this.listeners.mute);
this.controller.addEventListener("OnReleaseEnd",this.listeners.releaseend);
this.controller.addEventListener("OnClearCurrentRelease",this.listeners.clearcurrentrelease);
this.controller.addEventListener("OnReleaseStart",this.listeners.releasestart);
this.controller.addEventListener("OnResize",this.listeners.resize);
this.controller.addEventListener("OnSetReleaseUrl",this.listeners.setreleaseurl);
this.controller.addEventListener("OnShowCard",this.listeners.showcard);
this.controller.addEventListener("OnHideCard",this.listeners.hidecard);
this.controller.addEventListener("OnShowFullScreen",this.listeners.fullscreen);
this.controller.addEventListener("OnShowPlayOverlay",this.listeners.showplayoverlay);
this.controller.addEventListener("OnVolumeChange",this.listeners.volumechange);
this.controller.addEventListener("OnPlaybackRateChanged",this.listeners.onPlaybackRateChanged);
this.controller.addEventListener("OnNoSkipChanged",this.listeners.noSkipChanged);
this.controller.addEventListener("__internal__AdLoadFailure",this.listeners.adLoadFailure);
this.controller.registerFunction("setShowControls",this,this.listeners.setShowControls);
this.controller.registerFunction("setPlayerLayoutUrl",this,this.listeners.setPlayerLayoutUrl);
this.controller.registerFunction("setPlayerLayoutXml",this,this.listeners.setPlayerLayoutXml);
this.controller.addEventListener("OnTextTracksAvailable",this.listeners.textTracksAvailable)
},setPlayerLayoutUrl:function(b){this.controlsManager.setPlayerLayoutUrl(b)
},setPlayerLayoutXml:function(b){this.controlsManager.setPlayerLayoutXml(b)
},onNoSkipChanged:function(c){var d=c.data;
if(d.baseClip.isAd&&!d.baseClip.noSkip){this.controlsManager.enableNext(true);
this.enableNextOnControlsChanged=true
}},onTextTracksAvailable:function(d){var c=this.clip.baseClip.isAd?[]:d.data.entries;
this.setAvailableLanguages(c)
},setAvailableLanguages:function(f){var e=[];
for(var d=0;
d0){var e=j.data.captions;
var i=[];
for(var g=0;
g<e.length;
g++){var h=e[g].lang?e[g].lang:e[g].language;
if(h){i.push({language:h})
}}this.setAvailableLanguages(i)
}},onShowPlayOverlay:function(b){if(!this.releaseStarted){this.controlsManager.releaseStarted(false);
tpDebug("onShowPlayOverlay Setting isPreview "+b.data);
this.controlsManager.setIsPreview(b.data);
this.isPreview=b.data
}},onHideCard:function(c){var d=c.data;
this.controlsManager.cardShowing(false,d.card,d.deck)
},onShowCard:function(f){var d=f.data;
this.controlsManager.cardShowing(true,d.card,d.deck);
if($pdk.isSafari){var e=this.controller.id.toString();
document.getElementById(e).querySelector(".tpCards").style.visibility="visible";
setTimeout(function(){document.getElementById(e).querySelector(".tpCards").style.visibility="hidden"
},1)
}},onReleaseStart:function(i){var h=i.data;
if(!h){return
}this.release=h;
this.releaseStarted=true;
this.releaseLength=h.chapters.aggregateLength;
var j=[];
this.adCounts=[];
this.adIndex=0;
this.currentChapter=0;
var l;
for(var k=0;
k-1?l.adIndex:l.contentIndex))
}var e=this.getNumberOfPostRollClips(h);
if(e>0){this.adCounts.push(e)
}for(k=1;
k0){this.controlsManager.setClipTitle(h.clips[0].title)
}tpDebug(« Setting isPreview false »);
this.controlsManager.setIsPreview(false);
this.isPreview=false
},getNumberOfPostRollClips:function(e){var d=0;
if(e.baseClips[e.baseClips.length-1].isAd){d=1;
for(var f=e.baseClips.length-2;
f>=0;
f–){if(e.baseClips[f].isAd){d++
}else{break
}}}return d
},onClearCurrentRelease:function(b){this.onReleaseEnd(b);
this.controlsManager.releaseCleared()
},onReleaseEnd:function(b){this.controlsManager.clearImageTracks();
this.releaseStarted=false;
this.controlsManager.setSubtitleLanguages([]);
this.controlsManager.setPercentLoaded(0);
this.controlsManager.setClipTitle(«  »);
this.setTimes(0,1,0,0);
this.controlsManager.setIsAd(false);
this.controlsManager.releaseStarted(false);
this.controlsManager.pause();
this.controlsManager.hasCC(false);
this.controlsManager.setChapterPoints([]);
this.currentChapters=[]
},onAdLoadFailure:function(){this.setCurrentChapter();
if(this.adIndex===0){this.adCounts[this.currentChapter]–
}else{this.adIndex++
}},onMediaLoadStart:function(i){var k=i.data;
var e=0;
this.controlsManager.mediaNoSkip(k.baseClip.noSkip);
this.controlsManager.setIsAd(k.baseClip.isAd);
this.controlsManager.isAd(k.baseClip.isAd);
this.controlsManager.setClipTitle(k.title);
var l=this.controller.getCurrentPlaylist();
var h=this.controller.getMainPlaylist();
this.setCurrentChapter();
if(k.baseClip.isAd){this.adIndex++
}if(l.playlistID!=h.playlistID){var j=this.differentPlaylists(l,this.lastCurrentPlaylist);
this.lastCurrentPlaylist=l;
if(j&&this.adCounts[this.currentChapter]>=1&&l.clips.length&&l.clips[0].baseClip.isAd){e=this.countFetchedAds(l,h);
if(e>0){this.adCounts[this.currentChapter]+=e-1
}}}if(k.chapter&&k.chapter.chapters){this.setTimes(k.chapter.aggregateStartTime+k.offset,k.chapter.chapters.aggregateLength,this.adIndex,this.adCounts[this.currentChapter]);
if(!k.baseClip.isAd&&!k.baseClip.noSkip){this.controlsManager.setChapterPoints(!this.currentChapters?[]:this.currentChapters)
}else{this.controlsManager.setChapterPoints([])
}}else{if(k.baseClip.isAd){if(k.endTime>0){this.setTimes(k.startTime,k.endTime,this.adIndex,this.adCounts[this.currentChapter])
}else{this.setTimes(0,k.length,this.adIndex,this.adCounts[this.currentChapter])
}}else{if(k.baseClip.trueLength>0){this.setTimes(k.startTime+k.offset,k.baseClip.trueLength,0,0)
}else{this.setTimes(k.startTime+k.offset,this.releaseLength,0,0)
}}this.controlsManager.setChapterPoints([])
}if(k.baseClip.availableImageTracks&&typeof(k.baseClip.availableImageTracks)&&k.baseClip.availableImageTracks.length>0&&!k.baseClip.isAd){this.controlsManager.setAvailableImageTracks(k.baseClip.availableImageTracks)
}if(k.baseClip.isAd){this.controlsManager.setPercentLoaded(0)
}if(!k.baseClip||k.baseClip.isAd||!k.baseClip.URL||k.baseClip.URL!==this.previousBaseClipURL){this.controlsManager.syncState()
}if(k.baseClip){this.previousBaseClipURL=k.baseClip.URL
}},onMediaStart:function(f){tpDebug(« Setting isPreview false »);
this.controlsManager.setIsPreview(false);
this.isPreview=false;
this.lastSeek=undefined;
this.clip=f.data;
var d=f.data;
this.setAvailableLanguages(d.baseClip.isAd?[]:d.baseClip.availableTextTracks);
this.controlsManager.setIsAd(d.baseClip.isAd);
var e=this.controller.supportsFullScreen();
this.controlsManager.supportsFullScreen(e);
this.controlsManager.supportsFastForward(this.controller.supportsFastForward());
this.controlsManager.mediaStarted();
this.controlsManager.mediaNoSkip(d.baseClip.noSkip);
this.controlsManager.isAd(d.baseClip.isAd);
this.controlsManager.setClipTitle(d.title);
if(!d.baseClip.isAd&&!d.baseClip.noSkip){this.controlsManager.setChapterPoints(!this.currentChapters?[]:this.currentChapters)
}},countFetchedAds:function(i,g){var j,k;
var h=0;
var l;
for(j=0;
j<i.clips.length;
j++){l=true;
for(k=0;
k<g.clips.length;
k++){if(i.clips[j].id===g.clips[k].id){l=false;
break
}}if(l){h++
}}return h
},differentPlaylists:function(f,d){if((f&&!d)||(!f&&d)){return true
}if(f.playlistID!=d.playlistID){return true
}if(f.clips.length!=d.clips.length){return true
}for(var e=0;
ed.end.mediaTime&&c.startTime<d.end.mediaTime)
},onMediaSeek:function(b){this.isPlaying=false;
if(!this.seekWithinChapter(b.data,this.clip)){this.lastSeek=b.data
}if(b.data.end.durationAggregate){this.setTimes(b.data.end.currentTimeAggregate,b.data.end.durationAggregate,0,0)
}else{if(b.data.clip.chapter){this.setTimes(b.data.end.currentTimeAggregate,b.data.clip.chapter.chapters.aggregateLength,0,0)
}else{this.setTimes(b.data.end.currentTimeAggregate,this.releaseLength,0,0)
}}},setCurrentChapter:function(){if(this.lastSeek&&this.release){var e=this.lastSeek.end.mediaTime;
var f=this.release.chapters.chapters;
for(var d=0;
df[d].startTime&&e0){this.setTimes(0,0,this.adIndex,this.adCounts[this.currentChapter])
}this.isPlaying=false;
var e=this;
this.controlsManager.clearImageTracks();
if(this.enableNextOnControlsChanged){this.controlsManager.enableNext(false);
this.enableNextOnControlsChanged=false
}},onMediaPlaying:function(b){if(!this.releaseStarted){this.releaseStarted=true;
this.controlsManager.releaseStarted(false);
this.controlsManager.releaseStarted(this.releaseStarted)
}this.controlsManager.setIsPreview(false);
if(!this.isPlaying){this.isPlaying=true;
this.controlsManager.play()
}if(b.data.currentTimeAggregate!==undefined){if(b.data.durationAggregate>0){this.setTimes(b.data.currentTimeAggregate,b.data.durationAggregate,this.adIndex,this.adCounts[this.currentChapter])
}else{this.setTimes(b.data.currentTimeAggregate,this.releaseLength,this.adIndex,this.adCounts[this.currentChapter])
}}else{if(b.data.duration>0){this.setTimes(b.data.currentTime,b.data.duration,this.adIndex,this.adCounts[this.currentChapter])
}else{this.setTimes(b.data.currentTime,this.releaseLength,this.adIndex,this.adCounts[this.currentChapter])
}}},onMediaPause:function(b){this.isPlaying=false;
this.controlsManager.pause()
},onMediaUnpause:function(b){this.isPlaying=true;
this.controlsManager.play()
},onMute:function(b){this.controlsManager.mute(b.data)
},onVolumeChange:function(b){this.controlsManager.setVolume(b.data/100)
},onPlaybackRateChanged:function(b){this.controlsManager.setPlaybackRate(b.data.rate)
},onShowFullScreen:function(b){this.controlsManager.setIsFullScreen(b.data);
this.controlsManager.setFullScreen(b.data)
},onGetSubtitleLanguage:function(d){var c=d.data.langCode;
this.controlsManager.setSubtitleLanguage(c)
},onResize:function(b){this.controlsManager.setSize(b.data.width+ »px »,b.data.height+ »px »)
},setShowControls:function(d,c){this.controller.dispatchEvent(« OnShowControls »,{visible:d,regionId:c})
}});
var tpJsonContexts=new Object();
function tpRegisterJsonContext(c){var d=(((1+Math.random())*65536)|0).toString(16).substring(1);
tpJsonContexts[d]=c;
return d
}function tpJSONLoaderCallback(c,d){tpJsonContexts[d](c)
}JSONLoader=Class.extend({init:function(){},load:function(r,j,q,l,n,m){if(!q){q= »callback »
}if(!n){n= »context »
}if(!l){l= »tpJSONLoaderCallback »
}var p=tpRegisterJsonContext(function(){j(arguments[0],r)
});
if(r.indexOf(« ? »)>=0){r+= »& »+q+ »= »+l+ »& »+n+ »= »+p
}else{r+= »? »+q+ »= »+l+ »& »+n+ »= »+p
}var o=document.getElementsByTagName(« head »)[0];
var k=document.createElement(« script »);
k.type= »text/javascript »;
k.src=r;
k.onerror=function(a){tpDebug(« Failed to load « +k.src);
if(typeof(m)=== »function »){m(a)
}};
o.appendChild(k)
}});
OverlayManager=Class.extend({init:function(e,d){this.controller=e;
this.playerElement=d;
var f=this;
this.controller.registerFunction(« getOverlayArea »,this,this.getOverlayArea);
this.controller.registerFunction(« setOverlayArea »,this,this.setOverlayArea);
this.controller.addEventListener(« OnMediaAreaChanged »,function(a){f.mediaAreaChanged(a)
})
},getBrowserOffset:function(){if(this.controller.component.videoengineruntime&&this.controller.component.videoengineruntime=== »silverlight »){return 38
}if(navigator.userAgent.toLowerCase().indexOf(« chrome »)>-1){return 32
}if(navigator.userAgent.toLowerCase().indexOf(« msie »)>-1){return 42
}if(tpIsIOS()){return 54
}if(navigator.userAgent.toLowerCase().indexOf(« safari »)>-1){return 24
}if(navigator.userAgent.toLowerCase().indexOf(« firefox »)>-1){return 28
}return 35
},setOverlayArea:function(b){if(b.width>0&&b.height>0){this.useNativeDefaults=false;
this.overlayArea=b;
this.controller.dispatchEvent(« OnOverlayAreaChanged »,this.getOverlayArea())
}},getOverlayArea:function(i,g,j){if(this.overlayArea&&!j){if(g){this.controller.dispatchEvent(« OnOverlayAreaChanged »,this.overlayArea)
}return this.overlayArea
}var f={};
var h=!this.useNativeDefaults?this.getBrowserOffset():0;
f.height=this.playerElement.clientHeight-h;
f.width=this.playerElement.clientWidth;
f.top=this.playerElement.clientTop;
f.left=this.playerElement.clientLeft;
f.bottom=f.top+f.height;
f.right=f.left+f.width;
f.topLeft={x:f.left,y:f.top};
f.bottomRight={x:f.right,y:f.bottom};
f.size={x:f.width,y:f.height};
f.x=f.left;
f.y=f.top;
if(i){f.x+=$pdk.jQuery(this.playerElement).offset().left;
f.y+=$pdk.jQuery(this.playerElement).offset().top
}if(g){this.controller.dispatchEvent(« OnOverlayAreaChanged »,f)
}if(j){this.overlayArea=f
}return f
},mediaAreaChanged:function(b){}});
var PdkEvent=new Object();
PdkEvent.OnPlayerLoaded= »OnPlayerLoaded »;
PdkEvent.OnResetPlayer= »OnResetPlayer »;
PdkEvent.OnPlugInLoaded= »OnPlugInLoaded »;
PdkEvent.OnPlugInsComplete= »OnPlugInsComplete »;
PdkEvent.OnMediaLoadStart= »OnMediaLoadStart »;
PdkEvent.OnMediaPlay= »OnMediaPlay »;
PdkEvent.OnMediaClick= »OnMediaClick »;
PdkEvent.OnMediaBuffer= »OnMediaBuffer »;
PdkEvent.OnMediaBufferStart= »OnMediaBufferStart »;
PdkEvent.OnMediaBufferComplete= »OnMediaBufferComplete »;
PdkEvent.OnRenditionSwitched= »OnRenditionSwitched »;
PdkEvent.OnMediaEnd= »OnMediaEnd »;
PdkEvent.OnMediaError= »OnMediaError »;
PdkEvent.OnMediaComplete= »OnMediaComplete »;
PdkEvent.OnMediaLoading= »OnMediaLoading »;
PdkEvent.OnMediaPause= »OnMediaPause »;
PdkEvent.OnMediaTime= »OnMediaTime »;
PdkEvent.OnMediaPlaying= »OnMediaPlaying »;
PdkEvent.OnMediaStart= »OnMediaStart »;
PdkEvent.OnMediaUnpause= »OnMediaUnpause »;
PdkEvent.OnReleaseEnd= »OnReleaseEnd »;
PdkEvent.OnReleaseStart= »OnReleaseStart »;
PdkEvent.OnReleaseSelected= »OnReleaseSelected »;
PdkEvent.OnMediaSeek= »OnMediaSeek »;
PdkEvent.OnMute= »OnMute »;
PdkEvent.OnSetVolume= »OnSetVolume »;
PdkEvent.OnPlaybackRateChanged= »OnPlaybackRateChanged »;
PdkEvent.OnSetRelease= »OnSetRelease »;
PdkEvent.OnSetReleaseUrl= »OnSetReleaseUrl »;
PdkEvent.OnLoadRelease= »OnLoadRelease »;
PdkEvent.OnLoadReleaseUrl= »OnLoadReleaseUrl »;
PdkEvent.OnSetSmil= »OnSetSmil »;
PdkEvent.OnLoadSmil= »OnLoadSmil »;
PdkEvent.OnShowFullScreen= »OnShowFullScreen »;
PdkEvent.OnShowPlayOverlay= »OnShowPlayOverlay »;
PdkEvent.OnShowPreviewImageOverlay= »OnShowPreviewImageOverlay »;
PdkEvent.OnShowControls= »OnShowControls »;
PdkEvent.OnStreamSwitched= »OnStreamSwitched »;
PdkEvent.OnMediaCuePoint= »OnMediaCuePoint »;
PdkEvent.OnGetSubtitleLanguage= »OnGetSubtitleLanguage »;
PdkEvent.OnRefreshCategoryModel= »OnRefreshCategoryModel »;
PdkEvent.OnRefreshReleaseModel= »OnRefreshReleaseModel »;
PdkEvent.OnLoadReleaseModel= »OnLoadReleaseModel »;
PdkEvent.OnRefreshReleaseModelStarted= »OnRefreshReleaseModelStarted »;
PdkEvent.OnCategorySelected= »OnCategorySelected »;
PlaybackManager=Class.extend({init:function(k,p){this.player=k;
this.controller=p;
var j={fontFamily: »Calibri, Helvetica, Arial »,fontColor: »white »,textAlign: »left »,textAlignVertical: »top »};
var q={fontFamily: »Calibri, Helvetica, Arial »,fontColor: »white »,fontEdge: »dropshadow »,textAlign: »center »,textAlignVertical: »bottom »};
var m= »tp_subtitles_settings »;
var n=this;
var l=n.controller.getOverlayArea();
this.plugins=new Array();
n.subtitlesLoader=new $pdk.queue.deferred.loader.Subtitles(n.controller,l,document.getElementById(n.controller.id+ ».subtitles »),m,6,j,q,true,n.controller.getProperty(« enableDynamicSubtitleFonts »)|| »true »);
this.subtitlesSettingsManagerLoader=new $pdk.queue.deferred.loader.SubtitlesSettingsManager(this.controller,m);
this.veSubtitlesManager=new $pdk.classes.VideoEngineSubtitlesManager(this.controller,this.player.videoEngine);
this.replacePlaylistManager=new $pdk.classes.ReplacePlaylistManager();
var n=this;
p.addEventListener(« OnLoadReleaseUrl »,function(){n.handleLoadReleaseUrl.apply(n,arguments)
});
this.mediaSeekHandler=function(){n.handleMediaSeek.apply(n,arguments)
};
p.addEventListener(« OnMediaSeek »,this.mediaSeekHandler);
this.mediaStartHandler=function(){n.handleMediaStart.apply(n,arguments)
};
p.addEventListener(« OnMediaStart »,this.mediaStartHandler);
this.mediaLoadStartHandler=function(){n.handleMediaLoadStart.apply(n,arguments)
};
p.addEventListener(« OnMediaLoadStart »,this.mediaLoadStartHandler);
this.releaseSelectedHandler=function(){n.handleReleaseSelected.apply(n,arguments)
};
p.addEventListener(« OnReleaseSelected »,this.releaseSelectedHandler);
this.releaseStartedHandler=function(){n.handleReleaseStarted.apply(n,arguments)
};
p.addEventListener(« OnReleaseStart »,this.releaseStartedHandler);
this.internalLoadReleaseUrlHandler=function(){n.handleInternalLoadReleaseUrl.apply(n,arguments)
};
p.addEventListener(« __internal__OnLoadReleaseUrl »,this.internalLoadReleaseUrlHandler);
this._metadataUrlManager=new $pdk.plugin.MetadataUrlManager(this.controller);
this.urlManager=new UrlManager(this.controller);
var r=this.controller.getProperty(« useNativeControls »)== »true »;
var o=this.controller.getProperty(« useDefaultPlayOverlay »)== »true »||this.controller.getProperty(« showControlsBeforeVideo »)== »false »;
if(o||r){setTimeout(function(){n.controlsLoaded=true;
n.player.controlsLoaded(false,r)
},1)
}if(!r){this.controlsLoader=new $pdk.queue.deferred.loader.ControlsLoader(this.controller,document.getElementById(this.controller.id).parentElement.id,function(){n.controlsLoaded=true;
n.player.controlsLoaded(true,false);
if(n.controlsLoadedCallback){n.controlsLoadedCallback()
}},function(a,b){n.controlsLoaded=true;
n.player.controlsLoaded(a,b)
})
}this.releaseUrl=this.player.releaseUrl;
this.tokenManager=new TokenManager(this.controller);
this.overlayManager=new OverlayManager(this.controller,this.player.container);
this.standbyManager=new StandbyManager(this.controller,this);
this.plugins=new Array();
this.pluginsComplete=false;
p.addEventListener(« OnPlugInsComplete »,function(){n.pluginsComplete=true
});
p.registerFunction(« setRelease »,this,this.setRelease);
p.registerFunction(« setReleaseURL »,this,this.setReleaseURL);
p.registerFunction(« tryWritePlayer »,this,this.tryWritePlayer);
p.registerFunction(« pause »,this,this.pause);
p.registerFunction(« endRelease »,this,this.endRelease);
p.registerFunction(« endCurrentRelease »,this,this.endRelease);
p.registerFunction(« clearCurrentRelease »,this,this.clearCurrentRelease);
p.registerFunction(« resetRelease »,this,this.resetRelease);
p.registerFunction(« getCurrentRelease »,this,this.getCurrentRelease);
p.registerFunction(« getCurrentPlaylist »,this,this.getCurrentPlaylist);
p.registerFunction(« getMainPlaylist »,this,this.getMainPlaylist);
p.registerFunction(« injectPlaylist »,this,this.injectPlaylist);
p.registerFunction(« insertPlaylist »,this,this.insertPlaylist);
p.registerFunction(« playlistReplaced »,this,this.playlistReplaced);
p.registerFunction(« wrapClip »,this,this.wrapClip);
p.registerFunction(« insertClip »,this,this.insertClip);
p.registerFunction(« mute »,this,this.doMute);
p.registerFunction(« setVolume »,this,this.setVolume);
p.registerFunction(« setSmil »,this,this.setSmil);
p.registerFunction(« updateMediaTime »,this,this.updateMediaTime);
p.registerFunction(« updateClip »,this,this.updateClip);
p.registerFunction(« updatePlaylist »,this,this.updatePlaylist);
p.registerFunction(« endMedia »,this,this.endMedia);
p.registerFunction(« sendError »,this,this.sendError);
p.registerFunction(« getMuteState »,this,this.getMuteState);
p.registerFunction(« getVolume »,this,this.getVolume);
p.registerFunction(« registerPlaylistPlugIn »,this,this.registerPlaylistPlugIn);
p.registerFunction(« markOffset »,this,this.markOffset);
p.registerFunction(« playPlaylist »,this,this.playPlaylist);
p.registerFunction(« loadReleaseURL »,this,this.loadReleaseURL);
p.registerFunction(« loadRelease »,this,this.loadRelease);
p.registerFunction(« nextClip »,this,this.nextClipExternal);
p.registerFunction(« previousClip »,this,this.previousClip);
p.registerFunction(« nextRelease »,this,this.advanceToNextRelease);
var n=this;
p.registerFunction(« initializePlayback »,this,this.initializePlayback);
this.adManager=new AdManager(p);
this.clipWrapperManager=new ClipWrapperManager(p);
this.challengeData=new $pdk.classes.ChallengeDataWrapper(this.controller,this.player.videoEngine);
this.trackingManager=new $pdk.managers.TrackingUrlManager(p,k.player);
this.fullScreenManager=new FullScreenManager(p,this,k.enableFullWindow);
this.advanceClipFromExternalCall=false;
com.theplatform.pdk.SelectorExported={getInstance:function(a){this._scopes=a.split(« , »);
return this
},parseClip:function(a){return p.callFunction(« createClipFromBaseClip »,[a],this._scopes)
},parsePlaylist:function(b,a){return p.callFunction(« doParsePlaylist »,[b,a],this._scopes)
}}
},preloadContent:function(){var f=this.getFirstContentClip(this.playlist);
var h=this.getFirstClipWithMatchingURL(f.URL,this.playlist);
if(h&&!(tpIsIOS()||tpIsAndroid())){var g=h.startTime+h.offset;
var e=this.player.createMediaFileFromClip(h);
if(h.baseClip.security){if(this._clipIsKnownSecurityEncoding(h)&&this.challengeData&&this.challengeData.preloadClip(f)){this.videoEngine.preload(e,g)
}}else{this.videoEngine.preload(e,g)
}}},_clipIsKnownSecurityEncoding:function(c){var d=c.baseClip.security.toLowerCase();
return d=== »playready »||d=== »widevine »||d=== »fairplay »||d=== »commonencryption »
},getFirstContentClip:function(c){var d=function(a){return !a.baseClip.isAd
};
return this.findFirstInPlaylistByCondition(d,c)
},getFirstClipWithMatchingURL:function(d,f){var e=function(a){return a.URL===d
};
return this.findFirstInPlaylistByCondition(e,f)
},findFirstInPlaylistByCondition:function(f,g){if(g&&g.clips){for(var e=0;
e<g.clips.length;
e++){var h=g.clips[e];
if(f(h)){return h
}}}return null
},isDashMedia:function(b){return b.baseClip.type==="application/dash+xml"
},registerPlaylistPlugIn:function(e,d){this.plugins.push({playlistPlugIn:e,priority:d});
function f(a,b){if(a.priorityb.priority){return 1
}else{return 0
}}}this.plugins.sort(f)
},handleReleaseSelected:function(b){if(b.originator.controlId!=this.controller.componentId&&b.originator.controlId.indexOf(« player »)<0){this.currentReleaseList=b.originator.controlId
}this.tryingToAdvance=false
},handleReleaseStarted:function(b){this.fastForwardSupported=undefined;
this.releaseCleared=false
},initializePlayback:function(){this.pluginsComplete=true;
if(this.waitReleaseCall){if(this.waitReleaseCall.url){this.setReleaseURL(this.waitReleaseCall.url,this.waitReleaseCall.replaceDefault)
}else{if(this.waitReleaseCall.release){this.setRelease(this.waitReleaseCall.release,this.waitReleaseCall.replaceDefault)
}}this.waitReleaseCall=null
}else{if(this.waitSmil){this.setSmil(this.waitSmil);
this.waitSmil=null
}}},handleMediaStart:function(c){var d=c.data;
d.offset=0;
this.clipStarted=true;
this.wasError=false;
this.updateClip(d)
},handleInternalLoadReleaseUrl:function(b){if(b.data&&b.data.captions){if(this.shouldStripVTT(b.data.captions)){this.stripMetadataVTT(b.data)
}}this.controller.dispatchEvent("OnLoadReleaseUrl",b.data)
},handleMediaLoadStart:function(b){if(this.shouldStripVTT(b.data.baseClip.availableSubtitles)){tpDebug("calling stripVTT(clip)");
this.stripVTT(b.data)
}},handleLoadReleaseUrl:function(b){this.tryingToAdvance=false;
if(this.releaseProcess&&this.playlist){this.endRelease();
this.destroyReleaseProcess(this.releaseProcess);
this.releaseProcess=undefined;
this.playlist=undefined
}if(!this.currentRelease||this.currentRelease.pid!=b.data.pid){this.currentRelease=this.convertRawRelease(b.data)
}else{this.appendRawDataToRelease(this.currentRelease,b.data)
}if((tpIsIOS()||tpIsAndroid())&&this.isPrefetch()){release.url=this.releaseUrl;
this.setRelease(release)
}},convertRawRelease:function(b){if(b.pubDate){b.airdate=new Date(b.pubDate)
}return b
},appendRawDataToRelease:function(d,c){if(c.captions){d.captions=c.captions
}if(c.categories){d.categories=c.categories
}if(c.chapters){d.chapters=c.chapters
}if(c.copyright){d.copyright=c.copyright
}if(c.provider){d.provider=c.provider
}if(c.customValues){d.customValues=c.customValues
}if(c.mediaPID){d.mediaPID=c.mediaPID
}else{if(c.mediaPid){d.mediaPID=c.mediaPid
}}},isPrefetch:function(){return this.controller.isPrefetch()
},getCurrentRelease:function(){return this.currentRelease
},getCurrentPlaylist:function(){if(this.releaseProcess){return this.releaseProcess.getCurrentPlaylist()
}},getMainPlaylist:function(){return this.playlist
},getChapterFromOffset:function(c,h){if(h<=c.aggregateLength){for(var f=0;
f=h){g.offset=h-g.aggregateStartTime;
return g
}}}if(c.chapters.length==1){return c.chapters[0]
}return null
},markOffset:function(h,g,f){if(f===undefined){f=true
}var j=this.getChapterFromOffset(h.chapters,g);
var i;
if(!j||j.contentIndex==h.currentIndex){}else{h.currentIndex=j.contentIndex
}i=h.clips[h.currentIndex];
if(j){i.offset=j.offset;
if(j.adIndex>=0&&f){h.currentIndex=j.adIndex
}}else{if(g=0? »& »: »? »
},dispatchReleaseError:function(c,d){if(c){this.error=c;
this.controller.showPlayerCard(« forms », »tpErrorCard »,null,{title:this.error.title,message:this.error.description,exception:this.error.exception,responseCode:this.error.responseCode,playNext:true})
}this.controller.dispatchEvent(« OnReleaseError »,{url:d,title:c.title,description:c.description,exception:c.exception,responseCode:c.responseCode,alternateSrc:c.alternateSrc})
},setSmil:function(b){if(!this.pluginsComplete){this.waitSmil=b;
return
}if(this.isNoSkipPlaying()){return
}this.currentRelease=null;
this.tryingToAdvance=false;
this.controller.callFunction(« setSmilGwt »,[b])
},pause:function(c,d){if(this.video){this.player.pauseUserInitiated=!!d;
if(c){this.doPauseVideo(d)
}else{this.doUnPauseVideo(d)
}}},doPauseVideo:function(b){if(this.currentClip&&this.currentClip.streamType=== »empty »){if(!this.isNoopClip(this.currentClip)){this.controller.getVideoProxy().pause()
}this.controller.dispatchEvent(« OnPlayerPause »,{userInitiated:b})
}else{if(this.videoEngine.isPaused()==false){this.videoEngine.pause();
this.controller.dispatchEvent(« OnPlayerPause »,{userInitiated:b})
}}},doUnPauseVideo:function(b){this.play();
this.controller.dispatchEvent(« OnPlayerUnPause »,{userInitiated:b});
if(this.clipStarted){this.player.onPlay()
}},play:function(){if(this.isNoopClip(this.currentClip)){return
}if(this.currentClip&&this.currentClip.streamType=== »empty »){this.controller.getVideoProxy().play()
}else{tpDebug(« PBM calling play! »);
this.videoEngine.play()
}},setVolume:function(b){this.videoEngine.setVolume(b/100);
this.controller.dispatchEvent(« OnVolumeChange »,b);
this._volumeAsInteger=b
},getVolume:function(){return this._volumeAsInteger
},doMute:function(b){if(this._isMuted==undefined){this._isMuted=false
}if(this.pdkMuteStateChanged(b)||this.videoTagMuteStateChanged(b)){if(this.videoTagMuteStateChanged(b)&&this.usingNativeControls()){this._isMuted=this.videoEngine.isMuted()
}else{this._isMuted=b
}if(!this._isMuted&&this._volumeAsInteger&&this._volumeAsInteger>=0){this.videoEngine.setVolume(this._volumeAsInteger/100)
}else{if(this._isMuted){this._volumeAsInteger=this.videoEngine.getVolume()*100;
this.videoEngine.setVolume(0)
}}this.videoEngine.mute(this._isMuted)
}},usingNativeControls:function(){var b=this.controller.getProperty(« useNativeControls »)== »true »;
return b||($pdk.isIOS&&this.videoEngine.isFullScreen())
},pdkMuteStateChanged:function(b){return this._isMuted!==b
},videoTagMuteStateChanged:function(b){return this.videoEngine.isMuted()!==b
},getMuteState:function(){return this._isMuted
},stripM3U:function(i){var g=0;
var h=0;
var j;
var f=false;
for(;
g0&&g0){var e=0;
for(e;
e<f.length;
e++){if(this._isVTTCaption(f[e])){d=true;
break
}}}return d
},shouldStripVTT:function(b){if(this.hasVTT(b)&&(!this._usingHTML5Context()||!this._browserSupportsVTT())){return true
}return false
},_usingHTML5Context:function(){return this.videoEngine.getRuntime()=="HTML5"
},_browserSupportsVTT:function(){return $pdk._browserCheck([{browser:"chrome",version:31,device:false},{browser:"chrome",version:39,os:"ios"},{browser:"safari",version:7.1},{browser:"ipad",osversion:8},{browser:"iphone",osversion:8},{browser:"ipod",osversion:8},{browser:"chrome",version:39,os:"android"},{browser:"android",version:4.4}])
},stripMetadataVTT:function(d){var e=d.captions;
var f=this._stripVTTFromAvailable(e);
if(f){d.captions=f
}else{d.captions=[]
}},stripVTT:function(d){var e=this._stripVTTFromAvailable(d.baseClip.availableSubtitles);
if(e){d.baseClip.availableSubtitles=e
}var f=this._stripVTTFromAvailable(d.baseClip.availableTextTracks);
if(f){d.baseClip.availableTextTracks=f
}if(e||f){this.updateClip(d)
}},_stripVTTFromAvailable:function(f){if(!f||f.length==0){return null
}var e=0,d=[];
for(e;
e<f.length;
e++){if(!this._isVTTCaption(f[e])){d.push(f[e])
}}return(d.length==f.length)?null:d
},_isVTTCaption:function(d){var c="text/vtt";
return((d.MIMEType==c)||(d.type==c))
},replacePlaylist:function(b){return this.replacePlaylistManager.replacePlaylist(this.plugins,b)
},playPlaylist:function(f){this.releaseSetInProcess=false;
if(this.releaseProcess){this.controller.dispatchEvent("OnReleaseEnd",this.playlist);
this.destroyReleaseProcess(this.releaseProcess);
this.releaseProcess=undefined;
var e=this;
setTimeout(function(){e.playPlaylist(f)
},1);
return
}var d=this.replacePlaylist(f);
if(!d){this.doPlayPlaylist(f)
}},blockedByDrm:function(h){var j=false;
if(h){var f=this.getFirstContentClip(h);
var i=f.baseClip.security;
var g={};
if(i){g.security=[i.toLowerCase()]
}j=this.player.videoEngine.blockedByDrm(g)
}return j
},protectedByDrm:function(f){var e=this.getFirstContentClip(f);
var d=e.baseClip.security.toLowerCase();
return d==="widevine"||d==="fairplay"||d==="playready"||d==="commonencryption"
},contentIsHttps:function(c){var d=this.getFirstContentClip(c);
return d&&d.URL.indexOf("https")===0
},_isWidevineInChrome:function(f){var e=this.getFirstContentClip(f);
var d=e.baseClip.security.toLowerCase();
return $pdk.isChrome&&(d==="widevine"||d==="commonencryption")
},doPlayPlaylist:function(h){if(!h||h.isError){this.dispatchReleaseError({title:h.baseClips[0].title,description:h.baseClips[0].description,exception:h.baseClips[0].contentCustomData.exception,responseCode:h.baseClips[0].contentCustomData.responseCode,alternateSrc:h.baseClips[0].URL},this.releaseUrl);
return
}if(this.protectedByDrm(h)){var g=typeof navigator.requestMediaKeySystemAccess==="function";
if(this._isWidevineInChrome(h)&&!g){var j=this.contentIsHttps(h);
if(j){tpDebug("Chrome requires SSL site delivery for Widevine support.","ChallengeDataWrapper",this.controller.id,tpConsts.ERROR);
this.dispatchReleaseError({title:"SSL Exception",description:"Chrome requires SSL site delivery for Widevine support."},this.releaseUrl);
return
}}}if(this.blockedByDrm(h)){this.dispatchReleaseError({title:"Security Error",description:"This protected content cannot be played on the current system."},this.releaseUrl);
return
}var i=h.metaTags;
if(i){var f=0;
for(;
f<i.length;
f++){if(i[f].name==="manifestServiceUrl"){this.playlistHasSSA=true
}}}if($pdk.isAndroid&&!$pdk.isAndroid44plus&&!this.playlistHasSSA){this.stripM3U(h)
}this.releaseProcess=this.createReleaseProcess();
this.playlist=h;
if(!(this.isPrefetch()&&(tpIsIOS()||tpIsAndroid()))){tpDebug("selector: playing current release");
if(this.currentRelease){this.mergeReleaseWithPlaylist(this.currentRelease,h);
h.release=this.currentRelease;
h.release.mediaPID=h.mediaPID
}else{h.release=this.getReleaseFromPlaylist(h)
}this.controller.dispatchEvent("OnReleaseStart",h);
this.releaseProcess.setPlaylist(h)
}else{this.player.videoEngine.load(this.player.createMediaFileFromClip(this.playlist.baseClips[0]),0);
this.player.currentURL=this.playlist.baseClips[0].URL
}},mergeReleaseWithPlaylist:function(e,f){var d=this.getReleaseFromPlaylist(f);
if(!e){e={globalDataType:"com.theplatform.pdk.data::Release"}
}if(!e.title){e.title=d.title
}if(!e.author){e.author=d.author
}if(!e.duration){e.duration=d.duration
}if(!e.length){e.length=d.length
}if(!e.bitrate){e.bitrate=d.bitrate
}if(!e.description){e.description=d.description
}if(!e.categories){e.categories=d.categories
}if(!e.copyright){e.copyright=d.copyright
}if(!e.countries){e.countries=d.countries
}if(!e.keywords){e.keywords=d.keywords
}if(!e.link){e.link=d.link
}if(!e.pid){e.pid=d.pid
}if(!e.provider){e.provider=d.provider
}if(!e.ratings){e.ratings=d.ratings
}if(!e.text){e.text=d.text
}if(!e.chapters){e.chapters=d.chapters
}if(!e.url){e.url=d.url
}if(!e.mediaPID){e.mediaPID=d.mediaPID
}if(!e.airdate){e.airdate=d.airdate
}},getReleaseFromPlaylist:function(i){if(i.release){return i.release
}var g;
var l=0;
var h=i.baseClips.length;
var j;
var k;
for(;
l0){var k=j.baseClip.failOverClips[0];
var l=com.theplatform.pdk.SelectorExported.parseClip(k);
if(j.baseClip.failOverClips.length>1){var h=j.baseClip.failOverClips;
h.splice(0,1);
l.baseClip.failOverClips=h
}else{l.baseClip.failOverClips=[]
}var i=$.extend(true,{},j);
i.URL=l.URL;
i.baseClip=l.baseClip;
i.id=l.id;
this.player.doMediaLoadStart(i)
}else{this.controller.dispatchEvent(« OnMediaError »,g);
this.mediaErrorAction(g)
}},mediaErrorAction:function(b){if(b&&b.globalDataType== »com.theplatform.pdk.data::LicenseError »){this.error={title: »Security Error »,description: »This protected content cannot be played on the current system. »,exception:b.friendlyMessage,responseCode:null,alternateSrc:b.clip.URL};
this.endRelease();
this.controller.showPlayerCard(« forms », »tpErrorCard »,null,{title:this.error.title,message:this.error.description,playNext:true})
}else{if(b&&b.endRelease){this.wasError=true;
this.endRelease();
this.advanceToNextRelease(false,true)
}else{if(this.releaseProcess){this.wasError=true;
this.advanceClipFromExternalCall=false;
this._doGetNextClip()
}}}},handleMediaSeek:function(h){var i=h.data;
tpDebug(« Got OnMediaSeek »);
if(!this.currentClip){tpDebug(« PBM ignoring seek »);
return
}var e=i.end.mediaTime;
tpDebug(« Seek time is: »+e);
if(e>=this.currentClip.endTime||e1){this.endMedia()
}else{tpDebug(« Continuing to play because we don’t know the duration »)
}}}else{if(e300){var j=this;
tpDebug(« targetTime is « +e+ », need to seek to « +this.currentClip.startTime);
setTimeout(function(){j.controller.seekToPosition(j.currentClip.startTime)
},1)
}else{tpDebug(« seekObj was within clip boundaries: « +this.currentClip.startTime+ »<"+i.end.mediaTime+"0?y.URL.substr(0,y.URL.indexOf(« ? »)):y.URL;
var x=true;
for(var w=0;
w0?q.URL.substr(0,q.URL.indexOf(« ? »)):q.URL;
x=z!=p;
break
}u=x?this.adManager.checkAd(y):false;
if(y.isExternal&&y.clipIndex===0){var r=this;
setTimeout(function(){r.preloadContent()
},100)
}y.hasPlayed=true;
this.updateClip(y);
this.lastAdClip=y;
tpDebug(« CheckAd returns « +u)
}var i=false;
if(this.currentClip){i=y.clipIndex0?this.currentClip.startTime:this.currentClip.currentMediaTime;
this.releaseProcess.injectPlaylist(c,d)
}},updateMediaTime:function(b){if(this.releaseProcess){this.releaseProcess.updateMediaTime(b)
}},updateClip:function(b){if(this.releaseProcess){this.releaseProcess.updateClip(b)
}},updatePlaylist:function(b){if(this.releaseProcess){this.releaseProcess.updatePlaylist(b)
}},endMedia:function(d,f){if(!d){d=this.currentClip
}d.offset=0;
if(this.releaseProcess){this.releaseProcess.updateClip(d);
if(d&&d.mediaLength-1000<=d.currentMediaTime){var e=d
}this.doEndMedia(d);
if(e){this.controller.dispatchEvent("OnMediaComplete",e)
}if(!f){tpDebug("Media ended for clip with url: "+d.baseClip.URL+" and index "+d.clipIndex+" , PBM calling nextClip()");
this.advanceClipFromExternalCall=false;
this._doGetNextClip()
}}},doEndMedia:function(b){this.currentClip=null;
if(!this.wasError){tpDebug("doEndMedia dispatching OnMediaEnd for clip:"+b.baseClip.URL);
this.controller.dispatchEvent("OnMediaEnd",b)
}this.wasError=false
},wrapClip:function(c,d){this.releaseProcess.wrapClip(c,d)
},executeCurrentRelease:function(){},isNoopClip:function(b){if(!b){return false
}return((b.URL==""||b.isExternal)&&b.baseClip.isAd&&b.streamType=="empty")
},isProxyClip:function(b){if(!b){return false
}return(!(b.URL==""||b.isExternal)&&b.baseClip.isAd&&b.streamType=="empty")
}});
tpPlayer=PDKComponent.extend({_generateExportedMarkup:function(){var b="";
b+='

‘;
b+=’

‘;
b+=’

‘;
b+=’

‘;
b+=’

‘;
b+=’

‘;
b+=’

‘;
b+= »

« ;
b+=’

‘;
b+=’

‘;
return b
},init:function(r,q,j,o,m){var l=this;
this._liveStallTimeout=0;
this._attemptedRecoveryTimeout=0;
this.id=r;
this._resizeTimout=0;
this._tryResizeAttempts=0;
this.pluginsComplete=false;
this.videoEngine=m;
this.stayInFullScreen=true;
if(o===undefined){o=r
}this.widgetId=o;
this.controller=new PlayerController(r,this,o);
var p=$pdk.scriptRoot;
var k=document.createElement(« a »);
k.href=$pdk.scriptRoot;
var p=k.hostname.toLowerCase();
var n= »theplatform.com »;
switch(p){case »pdk.theplatform.com »:n= »theplatform.com »;
break;
case »pdk.preview.theplatform.com »:n= »preview.theplatform.com »;
break;
case »pdk.sandbox.theplatform.com »:n= »theplatform.com »;
break;
case »pdk.test.corp.theplatform.com »:n= »test.corp.theplatform.com »;
break;
case »pdk.theplatform.eu »:n= »theplatform.eu »;
break
}if(!this.controller.getProperty(« pauseOnClick »)){this.controller.setProperty(« pauseOnClick », »true »)
}this.pauseOnClick=(this.controller.getProperty(« pauseOnClick »)!== »false »);
if(!this.controller.getProperty(« mpx »)){this.controller.setProperty(« mpx »,n)
}if(tpIsIOS()||tpIsAndroid()){this.stayInFullScreen=false
}this.unloaded=true;
this.controller.addEventListener(« OnMediaAreaChanged »,function(){l.handleOnMediaAreaChanged.apply(l,arguments)
});
this.controller.addEventListener(« OnOverlayAreaChanged »,function(){l.handleOnOverlayAreaChanged.apply(l,arguments)
});
this.controller.addEventListener(« OnRenditionSwitched »,function(){});
this.controller.addEventListener(« OnMediaCuePoint »,function(){})
},setProperty:function(d,c){if(this.controller){this.controller.setProperty(d,c)
}},getProperty:function(b){if(this.controller){return this.controller.getProperty(b)
}else{return null
}},attach:function(b){this.initialize();
this.video=document.getElementById(b);
this.ready()
},setSeekHandler:function(){if(this.seekHandler){this.seekHandler.destroy()
}this.seekHandler=new SeekHandler(this.videoEngine);
var b=this;
this.userSeekedListener=function(a){b.userSeeked(a)
};
this.seekErrorListener=function(a){b.seekFailed(a)
};
this.seekHandler.addEventListener(SeekEvents.USERSEEKED,this.userSeekedListener);
this.seekHandler.addEventListener(SeekEvents.SEEKFAILED,this.seekErrorListener)
},seekFailed:function(b){this.onError(b)
},userSeeked:function(b){if(this.currentClip.baseClip.noSkip&&!tpIsIOS()){this.seekHandler.doSeek(this.currentClip.startTime/1000)
}else{if(this.currentClip.baseClip.noSkip&&tpIsIOS()){}else{tpDebug(« got userSeeked: showing controls »);
this.showControls(true);
this.onSeeked()
}}},progSeeked:function(b){tpDebug(« progSeeked fired »);
this.onSeeked()
},resetVideoElement:function(){var b=document.createElement(« div »);
b.setAttribute(« id »,this.video.getAttribute(« id »));
b.setAttribute(« class »,this.video.getAttribute(« class »));
b.setAttribute(« style »,this.video.getAttribute(« style »));
b.setAttribute(« x-webkit-airplay », »allow »);
this.video.parentNode.replaceChild(b,this.video);
this.video=b;
this.videoEngine.setParentElement(this.video);
if(this.videoengineruntime&&this.videoengineruntime.toLowerCase()=== »flash »){this.videoEngine.setRuntime(« FLASH »)
}else{this.videoEngine.setRuntime(« HTML5″)
}this.startedPlaying=false;
this.currentClip=undefined;
this.attachListeners();
return{video:this.video,videoEngine:this.videoEngine}
},createContainer:function(p){var n=this.framecolor?this.framecolor: »#000000″;
var i=this.backgroundcolor?this.backgroundcolor: »#ffffff »;
this.bdcolor=n.replace(« 0x », »# »);
this.bgcolor=i.replace(« 0x », »# »);
var j= » »;
j+= »

‘;
j+=’

‘;
j+=’

‘;
j+=’

‘;
j+=’

‘;
j+=’

‘;
j+=’

‘;
j+=’

‘;
j+=’

‘;
j+=’

‘;
j+= »

« ;
if(p){p.innerHTML=j
}else{document.write(j)
}this.container=document.getElementById(this.id);
this.pluginLayer=document.getElementById(this.id+ ».plugins »);
this.player=document.getElementById(this.id+ ».player »);
this.controlBlocker=document.getElementById(this.id+ ».controlBlocker »);
var m=this;
var k=function(a){if(m.videoEngine.isPaused()&&(!m._hideNativeControls)){if(!tpIsIOS()&&!tpIsAndroid()){m.controller.pause(false)
}return true
}if(!m.clipStarted){return false
}var b=m.videoClicked(a);
if(b){if(!a){var a=window.event
}a.cancelBubble=true;
if(a.stopPropagation){a.stopPropagation()
}if(a.preventDefault){a.preventDefault()
}return false
}return true
};
anchor=document.createElement(« a »);
anchor.style.width= »100% »;
anchor.style.height= »100% »;
anchor.style.background= »transparent »;
anchor.style.display= »block »;
if(tpIsIOS()){anchor.ontouchend=k
}else{anchor.onclick=k
}this.controlBlocker.appendChild(anchor);
this.videoClickAnchor=anchor;
this.blocker=document.getElementById(this.id+ ».blocker »);
var o=this.backgroundcolor;
if(o){idx=o.indexOf(« 0x »);
if(idx!==-1){o=o.substring(idx+2);
o= »# »+o
}this.blocker.style.backgroundColor=o
}else{this.blocker.style.backgroundColor= »black »
}this.blocker.style.position= »absolute »;
this.blocker.top=0;
this.blocker.left=0;
this.blocker.style.display= » »;
this.blocker.style.overflow= »hidden »;
this.blocker.style.height= »100% »;
this.blocker.style.width= »100% »;
this.blocker.style.display= »none »;
this.controlsLayer=document.getElementById(this.id+ ».controls »);
this.controlsLayer.className= »tpControls controlsLayer »;
this.controlsLayer.style.backgroundColor= »transparent »;
this.controlsLayer.style.cssFloat= »left »;
this.controlsLayer.style[« float »]= »left »;
this.controlsLayer.style.left= »0px »;
this.controlsLayer.style.top= »0px »;
this.controlBlocker.style.position= »absolute »;
this.controlBlocker.style.display= »none »;
this.blocker.top=0;
this.blocker.left=0;
this.controlBlocker.style.backgroundColor= »transparent »;
this.controlBlocker.style.height= »100% »;
this.controlBlocker.style.width= »100% »;
this.controlBlocker.style.overflow= »hidden »;
this.player.style.width= »100% »;
this.player.style.height= »100% »;
this.player.style.position= »absolute »;
this.player.style.overflow= »hidden »;
this.pluginLayer.style.width= »100% »;
this.pluginLayer.style.position= »absolute »;
this.controlsLayer.style.width= »100% »;
this.controlsLayer.style.height= »100% »;
this.container.className= »player »;
if($pdk._phase1Controllers===null||typeof($pdk._phase1Controllers)!== »object »){$pdk._phase1Controllers={}
}var l=document.getElementById(this.controller.id).parentElement.id;
this.controller.componentId=l;
$pdk._phase1Controllers[l]=this.controller;
return p
},isStandbyMode:function(){return this.standbyMode||(tpIsAndroid&&!tpIsChrome())
},isPrefetch:function(){return !this.standbyMode&&(tpIsIOS()||tpIsAndroid())
},isFlashPlayer:function(){return false
},writePlayer:function(){if(!this.iOSEnabled){tpDebug(« writePlayer: Capturing play tap for mobile devices. »);
this.ignoreErrors=true;
this.videoEngine.capturePlayTapForMobile();
this.iOSEnabled=true
}},createVideo:function(){if(this.video){this.destroyVideo()
}this.video=document.createElement(« div »);
this._hideNativeControls=this.controller.getProperty(« overrideNativeControls »)== »true »||(this.controller.getProperty(« skinUrl »)!=null&&this.controller.getProperty(« skinUrl »).indexOf(« .swf »)==-1);
this._useDefaultPlayOverlay=this.controller.getProperty(« useDefaultPlayOverlay »);
if(this._useDefaultPlayOverlay===undefined){this._useDefaultPlayOverlay=false;
this.controller.setProperty(« useDefaultPlayOverlay »,this._useDefaultPlayOverlay.toString())
}else{this._useDefaultPlayOverlay=this._useDefaultPlayOverlay== »true »
}this._showControlsBeforeVideo=this.controller.getProperty(« showControlsBeforeVideo »);
var b=this.controller.getProperty(« mute »);
this._startMuted=b&&b.toLowerCase()=== »true »?true:false;
if(this._showControlsBeforeVideo===undefined){this._showControlsBeforeVideo=true;
this.controller.setProperty(« showControlsBeforeVideo »,this._showControlsBeforeVideo.toString())
}else{this._showControlsBeforeVideo=this._showControlsBeforeVideo== »true »
}this.video.id=this.id+ ».content »;
this.video.style.width= »100% »;
this.video.style.height= »100% »;
if(this.backgroundcolor){this.video.style.backgroundColor= »# »+this.backgroundcolor.substr(2)
}this.player.appendChild(this.video);
this.videoLayer=this.controller.getProperty(« videoLayer »);
if(!this.videoLayer){this.videoLayer= »test-context »
}this.videoEngine.setParentElement(this.video);
if(tpIsAndroid()){tpDebug(« showing controls »);
this.showControls(true)
}if(this._hideNativeControls){this.showControls(false)
}},getInitialMuteState:function(){return this._startMuted
},getVideoProxy:function(){return new $pdk.connection.VideoProxy(this.videoEngine)
},loadLayer:function(d,f,e){if(this.videoEngine){return this.videoEngine.loadLayer(d,f,e)
}else{tpDebug(« Trying to call loadLayer without a VideoEngine »)
}},hasLayer:function(d,c){if(this.videoEngine){return this.videoEngine.hasLayer(d,c)
}else{tpDebug(« Trying to call hasLayer without a VideoEngine »)
}},callLayerFunction:function(f,d,e){if(this.videoEngine){return this.videoEngine.callLayerFunction(f,d,e)
}else{tpDebug(« Trying to call callLayerFunction without a VideoEngine »)
}},setAudioTrackByIndex:function(b){this.videoEngine.setAudioTrackByIndex(b);
if(this.videoEngine.getAudioTrackByIndex(b)){this.currentPreferredLanguage=this.videoEngine.getAudioTrackByIndex(b).language
}},supportsFastForward:function(){return this.videoEngine.isPlaybackRateSupported()
},setPlaybackRate:function(d){var c=this.videoEngine.setPlaybackRate(d);
if(c){this.pbRate=c;
this.dispatchOnPlaybackRateChanged(c)
}},getPlaybackRate:function(){var b=this.videoEngine.getPlaybackRate();
if(b>-1){this.pbRate.rate=b;
this.dispatchOnPlaybackRateChanged(this.pbRate)
}},pbRate:{rate:1,previousRate:1},dispatchOnPlaybackRateChanged:function(b){this.controller.dispatchEvent(« OnPlaybackRateChanged »,b)
},setAudioTrackByLanguage:function(b){this.videoEngine.setAudioTrackByLanguage(b);
this.currentPreferredLanguage=b
},getCurrentAudioTrack:function(){return this.videoEngine.getCurrentAudioTrack()
},getPauseState:function(){return this.paused
},getCurrentPosition:function(){return this.currentTimeObject
},destroyVideo:function(){if(this.video){this.videoEngine.unload();
this.player.removeChild(this.video);
this.video=null
}},videoClicked:function(g){if(this.currentClip){if(!tpIsIOS()&&!tpIsAndroid()&&!this.isPausedWithClickThrough(this.currentClip)&&this.pauseOnClick===true){this.controller.pause(!this.getPauseState(),true)
}if(this.clipHasClickThroughUrl(this.currentClip)){if($pdk.isSafari&&!$pdk.isIOS&&this.playlistHasSSA){window.open(this.currentClip.baseClip.moreInfo.href, »newwindow », »width= »+window.innerWidth+ », height= »+window.innerHeight+ » ,resizable=yes, scrollbars=yes, location=yes »)
}else{window.open(this.currentClip.baseClip.moreInfo.href, »_blank »)
}}var h=$(this.container).parent().offset();
var e=g.pageX-h.left;
var f=g.pageY-h.top;
this.controller.dispatchEvent(« OnMediaClick »,{ctrlKey:g.ctrlKey,shiftKey:g.shiftKey,localX:e,localY:f,stageX:g.pageX,stageY:g.pageY,position:this.currentClip.currentMediaTime});
return false
}return false
},isPausedWithClickThrough:function(d){var f=this.clipHasClickThroughUrl(d);
var e=this.getPauseState();
return f&&e
},clipHasClickThroughUrl:function(b){return b.baseClip.moreInfo&&b.baseClip.moreInfo.href
},attachListeners:function(){if(!this.listeners){this.listeners=new Object()
}var b=this;
this.videoEngine.addEventListener(« LAYER_LOADED »,this.listeners.layerLoaded=function(a){tpDebug(« Video tag dispatched « +a.type+ » with « +a.data)
},false);
this.videoEngine.addEventListener(« MEDIA_LOAD_START »,this.listeners.loadstart=function(a){tpDebug(« Video tag dispatched « +a.type+ » with « +a.media.url)
},false);
this.videoEngine.addEventListener(« MEDIA_START »,this.listeners.start=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onMediaStart(a)
},false);
this.videoEngine.addEventListener(« MEDIA_SEEKED »,this.listeners.seeked=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onSeeked(a)
},false);
if(tpIsIOS()){this.videoEngine.addEventListener(« MEDIA_SEEKING »,this.listeners.seeking=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onSeeking(a)
},false)
}this.videoEngine.addEventListener(« MEDIA_END »,this.listeners.ended=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onEnded(a)
},false);
this.videoEngine.addEventListener(« MEDIA_UNPAUSED »,this.listeners.unpause=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onPlay(a)
},false);
this.videoEngine.addEventListener(« MEDIA_PAUSED »,this.listeners.pause=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onPause(a)
},false);
this.videoEngine.addEventListener(« MUTE »,this.listeners.mute=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onMuteChange(a)
},false);
this.videoEngine.addEventListener(« MEDIA_PLAYING »,this.listeners.playing=function(a){},false);
this.videoEngine.addEventListener(« MEDIA_LOADING »,this.listeners.progress=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onProgress(a)
},false);
this.videoEngine.addEventListener(« MEDIA_ERROR »,this.listeners.error=function(a){tpDebug(« Video tag dispatched « +a.type);
if(a.data){tpDebug( » details: « +a.data.details);
tpDebug( » errorId: « +a.data.errorId)
}b.onError(a)
},false);
this.videoEngine.addEventListener(« PLAYBACK_ERROR »,this.listeners.playbackerror=function(a){tpDebug(« Video tag dispatched « +a.type);
b.onPlaybackError(a)
},false);
this.videoEngine.addEventListener(« MEDIA_UNLOADED »,this.listeners.unloaded=function(a){tpDebug(« Video tag dispatched « +a.type);
b.unloaded=true
},false);
this.videoEngine.addEventListener(« INITIAL_AUDIO_TRACK »,this.listeners.initialAudioTrackSwitched=function(a){b.onInitialAudioTrackSwitched(a)
},false);
this.videoEngine.addEventListener(« AUDIO_TRACK_SWITCHED »,this.listeners.audioTrackSwitched=function(a){b.onAudioTrackSwitched(a)
},false);
this.videoEngine.addEventListener(« RESIZE »,this.listeners.resize=function(a){b.onResize(a)
},false);
this.videoEngine.addEventListener(« MEDIA_BUFFER_START »,this.listeners.mediaBufferStart=function(a){b.onMediaBufferStart(a)
},false);
this.videoEngine.addEventListener(« MEDIA_BUFFER_COMPLETE »,this.listeners.mediaBufferComplete=function(a){b.onMediaBufferComplete(a)
},false);
this.videoEngine.addEventListener(« RENDITION_SWITCHED »,this.listeners.renditionSwitched=function(a){b.onRenditionSwitched(a)
},false);
this.videoEngine.addEventListener(« MEDIA_CUE_POINT »,this.listeners.mediaCuePoint=function(a){b.onMediaCuePoint(a)
},false);
this.videoEngine.addEventListener(« SEEK_ABORTED »,this.listeners.seekAborted=function(a){b.onSeekAborted(a)
},false);
this.videoEngine.addEventListener(« LIVE »,this.listeners.liveEvent=function(a){b._isLive=a.isLive;
b._windowDuration=a.windowDuration
},false)
},removeListeners:function(){this.videoEngine.removeEventListener(« MEDIA_LOAD_START »,this.listeners.loadstart);
this.videoEngine.removeEventListener(« MEDIA_START »,this.listeners.start);
this.videoEngine.removeEventListener(« MEDIA_SEEKED »,this.listeners.seeked);
this.videoEngine.removeEventListener(« MEDIA_END »,this.listeners.ended);
this.videoEngine.removeEventListener(« MEDIA_UNPAUSED »,this.listeners.unpause);
this.videoEngine.removeEventListener(« MEDIA_PAUSED »,this.listeners.pause);
this.videoEngine.removeEventListener(« MEDIA_ERROR »,this.listeners.error);
this.videoEngine.removeEventListener(« PLAYBACK_ERROR »,this.listeners.playbackerror);
this.videoEngine.removeEventListener(« MEDIA_UNLOADED »,this.listeners.unloaded);
this.videoEngine.removeEventListener(« MEDIA_PLAYING »,this.listeners.playing);
this.videoEngine.removeEventListener(« MEDIA_LOADING »,this.listeners.progress);
this.videoEngine.removeEventListener(« MUTE »,this.listeners.mute);
this.videoEngine.removeEventListener(« INITIAL_AUDIO_TRACK »,this.listeners.initialAudioTrackSwitched);
this.videoEngine.removeEventListener(« AUDIO_TRACK_SWITCHED »,this.listeners.audioTrackSwitched);
this.videoEngine.removeEventListener(« MEDIA_BUFFER_START »,this.listeners.mediaBufferStart);
this.videoEngine.removeEventListener(« MEDIA_BUFFER_COMPLETE »,this.listeners.mediaBufferComplete);
this.videoEngine.removeEventListener(« RENDITION_SWITCHED »,this.listeners.renditionSwitched);
this.videoEngine.removeEventListener(« MEDIA_CUE_POINT »,this.listeners.mediaCuePoint);
this.videoEngine.removeEventListener(« SEEK_ABORTED »,this.listeners.seekAborted);
this.videoEngine.removeEventListener(« LIVE »,this.listeners.liveEvent)
},videoCannotUnmute:function(){return $pdk.isIOS&&!$pdk.isSafari11Plus
},_bindElement:function(e){this.createContainer(e);
this.createVideo();
this.attachListeners();
var f=this;
var d=function(){f.onResize()
};
if(window.attachEvent){window.attachEvent(« onresize »,d)
}else{window.addEventListener(« resize »,d);
window.addEventListener(« orientationchange »,d)
}this.ready()
},write:function(e){this.createContainer(e);
this.createVideo();
this.attachListeners();
var f=this;
var d=function(){f.onResize()
};
if(window.attachEvent){window.attachEvent(« onresize »,d)
}else{window.addEventListener(« resize »,d)
}this.initialize();
this.ready()
},initialize:function(){if(this.scopes){this.controller.scopes=[this.controller.componentId].concat(this.scopes.split(« , »))
}else{this.controller.scopes=[this.controller.componentId, »default »]
}this.standbyMode=this.standbymode;
if(this.standbyMode=== »true »||tpIsAndroid()){this.controller.setProperty(« standbyMode »,true);
this.standbyMode=true
}else{if(this.standbyMode=== »prefetch »){this.controller.setProperty(« standbyMode », »prefetch »);
this.prefetch=true;
this.standbyMode=false
}else{if(tpIsIOS()||tpIsAndroid()){this.controller.setProperty(« standbyMode »,true);
this.standbyMode=true
}else{this.controller.setProperty(« standbyMode »,false);
this.standbyMode=false
}}}var e=this;
this.controller.addEventListener(« OnPluginsComplete »,function(){e.pluginsComplete=true;
e.controller.removeEventListener(« OnPluginsComplete »,this)
});
this.enableFullWindow=false;
var f=false;
try{f=window.self!==window.top
}catch(d){f=true
}this._isIFrame=f;
if(this.controller.getProperty(« enablefullwindow »)=== »true »){this.enableFullWindow=true&&(!f||$pdk.queue._externalControllerListener)
}else{if(this.controller.getProperty(« enablefullwindow »)!== »false »){if($pdk.isIE){this.enableFullWindow=true&&(!f||$pdk.queue._externalControllerListener)
}}}this.playbackManager=new PlaybackManager(this,this.controller);
this.controller.registerFunction(« getMediaArea »,this,this.getMediaArea);
this.controller.registerFunction(« setMediaArea »,this,this.setMediaArea);
this.controller.registerFunction(« getContentArea »,this,this.getContentArea);
this.controller.registerFunction(« writePlayer »,this,this.writePlayer);
this.controller.registerFunction(« isPrefetch »,this,this.isPrefetch);
this.controller.registerFunction(« isStandbyMode »,this,this.isStandbyMode);
this.controller.registerFunction(« isFlashPlayer »,this,this.isFlashPlayer);
this.controller.registerFunction(« supportsFullScreen »,this,this.supportsFullScreen);
this.controller.registerFunction(« supportsSeek »,this,this.supportsSeek);
this.controller.registerFunction(« supportsMute »,this,this.supportsMute);
this.controller.registerFunction(« supportsVolume »,this,this.supportsVolume);
this.controller.registerFunction(« getVideoProxy »,this,this.getVideoProxy);
this.controller.registerFunction(« loadLayer »,this,this.loadLayer);
this.controller.registerFunction(« hasLayer »,this,this.hasLayer);
this.controller.registerFunction(« callLayerFunction »,this,this.callLayerFunction);
this.controller.registerFunction(« setAudioTrackByIndex »,this,this.setAudioTrackByIndex);
this.controller.registerFunction(« setAudioTrackByLanguage »,this,this.setAudioTrackByLanguage);
this.controller.registerFunction(« getCurrentAudioTrack »,this,this.getCurrentAudioTrack);
this.controller.registerFunction(« getPauseState »,this,this.getPauseState);
this.controller.registerFunction(« getCurrentPosition »,this,this.getCurrentPosition);
this.controller.registerFunction(« setPlaybackRate »,this,this.setPlaybackRate);
this.controller.registerFunction(« getPlaybackRate »,this,this.getPlaybackRate);
this.controller.registerFunction(« supportsFastForward »,this,this.supportsFastForward)
},ready:function(){this._super();
this.playbackManager.video=this.video;
this.playbackManager.videoEngine=this.videoEngine;
if(this.layout||this.layoutUrl){this.controls=document.createElement(« div »);
this.controls.className= »controlLayoutArea »;
this.controls.style.height= »40px »;
this.controls.style.width= »100% »;
this.controls.style.background= »#555555″
}this.video.style.padding= »0″;
this.video.style.margin= »0″;
var f=this.controller.getProperty(« endCard »);
if(self.CardMediator&&f== »HelloWorldEndCard »){this.cardHolder=new oldCardMediator(f,this.controller)
}if(this.controller.getProperty(« overlayImageURL »)){var g=this;
setTimeout(function(){g.controller.addPlayerCard(« overlays », »tpOverlayCard », »

« , »urn:theplatform:pdk:area:overlay »,{},{show:function(a){$pdk.jQuery(a.card).find(« img »)[0].src=a.player.overlayimageurl
},hide:function(){}});
g.controller.showPlayerCard(« overlays », »tpOverlayCard »)
},1)
}var g=this;
if(!this.applyVideoEngineSettingsInterval){this.applyVideoEngineSettingsInterval=setInterval(function(){g.applyVideoEngineSettings();
clearInterval(g.applyVideoEngineSettingsInterval)
},50)
}this.controller.addEventListener(« OnPlayerLoaded »,function(){g.handlePlayerLoaded.apply(g,arguments)
});
this.controller.addEventListener(« OnShowFullScreen »,function(){g.onShowFullScreen.apply(g,arguments)
});
this.controller.addEventListener(« OnMediaPlaying »,function(){g.showVideo();
g.showBlocker(false)
});
this.controller.addEventListener(« OnSetRelease »,function(){g.handleSetRelease.apply(g,arguments)
});
this.controller.addEventListener(« OnReleaseSelected »,function(){g.handleSetRelease.apply(g,arguments)
});
this.controller.addEventListener(« OnSetReleaseUrl »,function(){g.handleSetReleaseUrl.apply(g,arguments)
});
this.controller.addEventListener(« OnLoadReleaseUrl »,function(){g.handleLoadRelease.apply(g,arguments)
});
this.controller.addEventListener(« OnMediaLoadStart »,function(){});
this.controller.addEventListener(« OnMediaStart »,function(a){g.showVideo();
if(a.data.streamType== »empty »){g.showControlBlocker(false)
}else{if(!g._hideNativeControls){if(a.data.baseClip.isAd){g.showControlBlocker(true)
}else{g.showControlBlocker(false)
}}else{g.showControlBlocker(true)
}}});
this.controller.addEventListener(« OnReleaseStart »,function(){g.handleReleaseStart.apply(g,arguments)
});
this.controller.addEventListener(« OnReleaseEnd »,function(){g.handleReleaseEnd.apply(g,arguments)
});
this.controller.addEventListener(« OnMediaEnd »,function(){g.handleMediaEnd.apply(g,arguments)
});
this.controller.addEventListener(« OnClearCurrentRelease »,function(){g.handleClearCurrentRelease.apply(g,arguments)
});
this.controller.addEventListener(« OnShowControls »,function(){g.onShowControls.apply(g,arguments)
});
this.controller.registerFunction(« seekToPosition »,this,this.seekToPosition);
this.controller.registerFunction(« seekToPercentage »,this,this.seekToPercentage);
if(this.pluginsComplete===false){var h=g;
var e=function(){if(h.pluginsComplete){return
}h.pluginsComplete=true;
h.controller.removeEventListener(« OnPlugInsComplete »,e);
h.controller.dispatchEvent(« OnPlayerLoaded »,[h.id]);
h.dispatchPlayerReady()
};
this.controller.addEventListener(« OnPlugInsComplete »,e);
return
}else{this.controller.dispatchEvent(« OnPlayerLoaded »,[this.id]);
this.dispatchPlayerReady()
}},dispatchPlayerReady:function(){this.controller.dispatchEvent(« OnPlayerReady »,{id:this.controller.widgetId,customer:this.controller.getProperty(« customer »),version: »CTS PSDK – Web « +$pdk.version.major+ ». »+$pdk.version.minor+ ». »+$pdk.version.revision,releaseUrl:this.controller.getProperty(« releaseurl »)})
},handleShowPlayOverlay:function(b){if(b.data){if(this.videoEngine&&this.videoEngine.isFullScreen()){if(!this.stayInFullScreen){tpDebug(« Exiting fullscreen »);
this.controller.showFullScreen(false)
}}}},onShowControls:function(b){this.controller.getOverlayArea()
},handlePlayerLoaded:function(b){if(!this.releaseUrl){return
}if(this.autoPlay&&(!(tpIsIOS()||tpIsAndroid())||$pdk.canAutoplayMobile())){this.controller.dispatchEvent(« OnReleaseSelected »,{releaseUrl:this.releaseUrl,userInitiated:false});
tpDebug(« Autoplaying releaseUrl: »+this.releaseUrl);
this.controller.setReleaseURL(this.releaseUrl)
}else{this.controller.loadReleaseURL(this.releaseUrl)
}},handleMediaEnd:function(b){},onShowFullScreen:function(b){if(b.data){this.container.style.backgroundColor=this.bgcolor
}else{this.container.style.backgroundColor= » »
}this.onResize()
},supportsFullScreen:function(){try{var d=!(this.playlistHasSSA&&this.currentClip&&this.currentClip.baseClip.isAd&&tpIsIOS())&&this.allowfullscreen=== »true »&&(this.videoEngine.isFullScreenSupported()||typeof(this.container.webkitRequestFullScreen)=== »function »||typeof(this.container.mozRequestFullScreen)=== »function »||(typeof(this.container.msRequestFullScreen)=== »function »&&!this._isIFrame)||this.enableFullWindow);
return !!d
}catch(c){return false
}},supportsSeek:function(){return this.videoEngine.isSeekSupported()
},supportsMute:function(){return this.videoEngine.isMuteSupported()
},supportsVolume:function(){return this.videoEngine.isSetVolumeSupported()
},seekToPosition:function(b){this.doSeek(b)
},controlsLoaded:function(c,d){if(!c){if(d){this._hideNativeControls=this.controller.getProperty(« overrideNativeControls »)== »true »;
this.videoEngine.setUseNativeControls(!this._hideNativeControls)
}}},doSeek:function(g){if(g==0){g=1
}if(this.currentClip&&(!this._lastSeekTime||Date.now()-this._lastSeekTime>500)){var f=this._filterSeek(g);
this._lastSeekTime=Date.now();
var e=this;
this.seekTimeObject=this.createCurrentTimeObject();
if($pdk.isAndroid&&!$pdk.isAndroid44plus&&this.currentClip.URL.toLowerCase().indexOf(« m3u »)!==-1){tpDebug(« Ignoring seek for m3u on legacy android »);
if(!this.isPaused&&!this.videoEngine.isPaused()){this.controller.dispatchEvent(« OnMediaPlaying »,this.seekTimeObject)
}}else{if(!this.currentClip.chapter||!this.currentClip.chapter.chapters.isAggregate){this.isSeeking=true;
setTimeout(function(){e.videoEngine.seek(f)
},1)
}else{if(this.currentClip.chapter.startTimef){this.isSeeking=true;
setTimeout(function(){e.videoEngine.seek(f)
},1)
}else{clearInterval(this.timeUpdateTimer);
var h={globalDataType: »com.theplatform.pdk.data::SeekObject »};
h.end=this.createCurrentTimeObject(f);
if(h.end!=undefined&&this.seekTimeObject!=undefined&&h.end.currentTime!=this.seekTimeObject.currentTime){h.start=this.seekTimeObject
}h.clip=this.currentClip;
this.controller.dispatchEvent(« OnMediaSeek »,h);
return
}}}}},_filterSeek:function(c){var d=c;
if(!this._isLiveDash()){d=this.getClipTime(c);
if(d>=this.currentClip.mediaLength){d=this.currentClip.mediaLength-100
}if(d<0){d=0
}}return d
},getClipTime:function(g){var j=this.playlist.chapters.chapters;
var i=0;
for(var c=0;
cg){i=h.startTime+(g-h.aggregateStartTime);
break
}}return i
},seekToPercentage:function(d){if(!this.currentClip){return
}d=isNaN(d)?0:d;
d=d100?100:d;
var f=this.videoEngine.getTotalTime();
if(this.currentClip.chapter&&this.currentClip.chapter.chapters){f=this.currentClip.chapter.chapters.aggregateLength
}if(isNaN(f)&&this.currentClip){return this.doSeek(this.currentClip.baseClip.trueLength*(d/100))
}else{if(!isNaN(f)){var e=f*(d/100);
return this.doSeek(e)
}else{this.delaySeekPercentage=d;
return false
}}},createMediaFileFromClip:function(b){return{url:b.URL,isAd:b.baseClip.isAd,mimeType:b.streamType== »empty »? »empty »:b.baseClip.type,isExternal:this.playbackManager.isNoopClip(b)}
},handleLoadRelease:function(d){clearTimeout(this.nextClipTimerId);
this.clipEnded=false;
var e=d.data;
this.currentReleaseUrl=e.url;
if(!this.stayInFullScreen){try{this.controller.showFullScreen(false)
}catch(f){}}if(tpIsIOS()){this.hideVideo()
}},handleSetRelease:function(c){var d=c.data;
this.currentReleaseUrl=d.url;
this.releaseSet=true;
clearTimeout(this.nextClipTimerId);
tpDebug(« handleSetRelease setting release with url « +d.url)
},handleSetReleaseUrl:function(c){var d=c.data;
tpDebug(« handleSetReleaseUrl setting release url to « +d);
clearInterval(this.timeUpdateTimer);
this.currentReleaseUrl=d
},handleReleaseStart:function(d){this.newRelease=true;
this.usesNativeControls=this.controller.getProperty(« useNativeControls »)== »true »;
this.currentVideoTime=0;
this.wasPaused=false;
this.percentLoaded=0;
this._dispatchInitialAudioTrack=true;
this.playlist=d.data;
var f=this.playlist.metaTags;
if(f){var e=0;
for(;
e<f.length;
e++){if(f[e].name==="manifestServiceUrl"){this.playlistHasSSA=true
}}}},doMediaLoadStart:function(g){tpDebug("doMediaLoadStart called for for url "+g.URL);
this.clipEnded=false;
this.startedPlaying=false;
this.percentLoaded=0;
if(this.currentClip){this.previousClipUrl=this.currentClip.baseClip.URL
}clearTimeout(this.nextClipTimerId);
clearInterval(this.timeUpdateTimer);
this.jumpTime=undefined;
this.needsJump=false;
this.startedBuffer=false;
tpDebug("handleMediaLoadStart fired, newRelease="+this.newRelease);
this.wasPaused=(this.currentClip&&this.currentClip.streamType!="empty"&&!this.currentClip.baseClip.isAd)&&this.paused&&this.newRelease==false;
this.currentClip=g;
if(this.currentClip.baseClip.expression){this._isLive=this.currentClip.baseClip.expression.toLowerCase()==="nonstop"
}this.clipEndedDueToSeek=false;
if(g.URL.toLowerCase().indexOf("mp3")==-1){this.videoEngine.setPoster("")
}this.removeListeners();
this.attachListeners();
if(!this.videoCannotUnmute()){this.controller.mute(this._startMuted)
}if((this.currentURL!=g.URL||this.newRelease||this.hasError)&&g.streamType!=="empty"){this.isSeeking=false;
this.suppressPause=true;
var h=this;
var e=g.startTime+g.offset;
var f=function(){h.videoEngine.removeEventListener("MEDIA_UNLOADED",f);
h.hasError=false;
h.ignoreErrors=false;
h.isComplete=false;
h.newRelease=false;
tpDebug("Starting clip #"+g.clipIndex+" with src:"+g.URL+" at offset:"+(e));
setTimeout(function(){if(g.streamType!=="empty"){h.unloaded=false;
h.loading=true;
tpDebug("Doing ve.load() for "+g.URL+" to offset "+e);
var a=h.createMediaFileFromClip(g);
h.videoEngine.load(a,e);
h.loading=false;
h.releaseSet=false
}else{h.showBlocker(false)
}if(!h.wasPaused||g.baseClip.noSkip){tpDebug("Calling play again because it was paused");
h.videoEngine.play()
}},1);
h.clipEnded=false;
h.currentURL=g.URL;
if(g.baseClip.noSkip&&g.streamType!=="empty"){h.showControls(false)
}else{tpDebug("showing controls");
h.showControls(true)
}setTimeout(function(){tpDebug("Firing OnMediaLoadStart");
tpTimeEnd("Time from setReleaseUrl until OnMediaLoadStart");
h.controller.dispatchEvent("OnMediaLoadStart",g)
},1)
};
this.isComplete=false;
f();
return
}else{if(this.playbackManager.isNoopClip(g)||this.playbackManager.isProxyClip(g)){tpDebug("NoOp case");
this.isSeeking=false;
var h=this;
var f=function(){h.videoEngine.removeEventListener("MEDIA_UNLOADED",f);
if(g.baseClip.noSkip===true){h.showControls(false)
}setTimeout(function(){h.unloaded=false;
tpDebug("Firing OnMediaLoadStart");
tpTimeEnd("Time from setReleaseUrl until OnMediaLoadStart");
h.controller.dispatchEvent("OnMediaLoadStart",g);
h.showBlocker(false)
},1)
};
this.videoEngine.load(this.createMediaFileFromClip(g));
this.showControlBlocker(false);
f();
return
}else{if(!this.clipEnded){this.clipEnded=true;
this.suppressPause=true
}}}this.newRelease=false;
tpDebug("Starting clip #"+g.clipIndex+" with src:"+g.URL+" at offset:"+(g.startTime+g.offset));
if(g.streamType!=="empty"){this.videoEngine.load(this.createMediaFileFromClip(g),g.startTime+g.offset)
}else{this.showBlocker(false)
}this.clipEnded=false;
this.currentURL=g.URL;
var h=this;
if(g.baseClip.noSkip){h.showControls(false)
}else{tpDebug("showing controls");
h.showControls(true)
}setTimeout(function(){tpDebug("Firing OnMediaLoadStart");
h.controller.dispatchEvent("OnMediaLoadStart",g)
},1)
},handleReleaseEnd:function(j){var f=j.data;
var g=this;
this.clipEnded=true;
if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
}this.videoEngine.unload();
this.showBlocker(true);
var h;
if(f){h=f.releaseURL
}function i(){if(!this.stayInFullScreen){tpDebug("Exiting fullscreen");
g.controller.showFullScreen(false)
}if(h&&h===g.currentReleaseUrl){g.controller.loadReleaseURL(g.currentReleaseUrl)
}}this.nextClipTimerId=setTimeout(function(){i()
},1000);
this.hideVideo();
this.currentClip=null
},handleClearCurrentRelease:function(){clearTimeout(this.nextClipTimerId)
},showControls:function(b){this.showControlBlocker(!b)
},onResize:function(){var b=this;
if(!this._tryResize()){if(this._resizeTimout<=0&&this._tryResizeAttempts<100){this._resizeTimout=setTimeout(function(){b._resizeTimout=0;
b.onResize()
},100)
}else{tpDebug("Gave up trying to resize after attemps:"+this._tryResizeAttempts);
this._tryResizeAttempts=0
}}},_tryResize:function(){if(this.container){if(this._containerWidth!==this.container.offsetWidth||this._containerHeight!==this.container.offsetHeight){this._tryResizeAttempts=0;
this._containerWidth=this.container.offsetWidth;
this._containerHeight=this.container.offsetHeight;
this.controller.dispatchEvent("OnResize",{width:this._containerWidth,height:this._containerHeight});
this.controller.dispatchEvent("OnPlayerComponentAreaChanged",{width:this._containerWidth,height:this._containerHeight});
var b=this.controller.getOverlayArea(false,false,true);
this.controller.dispatchEvent("OnOverlayAreaChanged",b);
this.controller.dispatchEvent("OnContentAreaChanged",this.controller.getContentArea());
this.updateMediaArea();
tpDebug(" MediaArea width/height is "+this._mediaArea.width+"/"+this._mediaArea.height);
if(b.width<=0||b.height0){this.loadPoster(this.currentReleaseUrl)
}if(!this.videoEngine.isPaused()){tpDebug(« In onMediaStart but ve.isPaused is false »);
this.suppressPause=false;
this.setTimer()
}else{this.startedPlaying=false;
tpTimeEnd(« Time from setReleaseUrl until OnMediaStart »);
tpTimeEnd(« Time from page load to OnMediaStart »);
this.controller.dispatchEvent(« OnMediaStart »,this.currentClip)
}this.videoEngine.setUseNativeControls(!this._hideNativeControls)
},onMediaBufferStart:function(b){this.controller.dispatchEvent(« OnMediaBufferStart »,this.currentClip)
},onMediaBufferComplete:function(b){this.controller.dispatchEvent(« OnMediaBufferComplete »,this.currentClip)
},onRenditionSwitched:function(b){this.controller.dispatchEvent(« OnRenditionSwitched »,b.event)
},onMediaCuePoint:function(b){this.controller.dispatchEvent(« OnMediaCuePoint »,b.event)
},onPlay:function(c){if(!this.currentClip||this.currentClip.streamType== »empty »){return
}if(!this._hideNativeControls&&this.currentClip.baseClip.isAd){this.showControlBlocker(true)
}if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
}if(this.pausedLiveUpdateTimer){clearInterval(this.pausedLiveUpdateTimer)
}var d=this;
this.suppressPause=false;
if(this.paused){if(this.currentClip.baseClip.isAd&&tpIsIOS()){this.showControls(false)
}this.paused=false;
if(!this.suppressPause){this.controller.dispatchEvent(« OnMediaUnpause »,{globalDataType: »com.theplatform.pdk.data::MediaPause »,clip:this.currentClip,userInitiated:!!this.pauseUserInitiated})
}else{this.suppressPause=false
}this.pauseUserInitiated=false
}tpDebug(« onPlay calling setTimer »);
this.setTimer()
},onPlaying:function(b){if(!this.currentClip){return
}if(this.needsJump){}else{if(this.currentClip&&this.currentClip.baseClip.isAd==false){this.showVideo()
}else{if(this.currentClip&&this.currentClip.streamType== »empty »){this.showVideo()
}}}},onPause:function(c){if(this.ignorePause()){tpDebug(« Ignoring native pause event suppressPause: »+this.suppressPause);
if(this.clipStarted&&!this.isSeeking&&this.suppressPause){this.videoEngine.play();
this.suppressPause=false
}return
}this.paused=true;
if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
}if(this._isLive&&this._windowDuration){var d=this;
this.pausedLiveUpdateTimer=setInterval(function(){d.onTimeUpdateWhilePaused()
},500)
}tpDebug(« Dispatching OnMediaPause »);
this.controller.dispatchEvent(« OnMediaPause »,{globalDataType: »com.theplatform.pdk.data::MediaPause »,clip:this.currentClip,userInitiated:!!this.pauseUserInitiated});
this.pauseUserInitiated=false
},ignorePause:function(){var c=Math.abs(this.videoEngine.getCurrentTime()-this.currentClip.endTime)0&&c&&!this._isLive;
return !this.currentClip||d||this.suppressPause
},onMuteChange:function(b){this._startMuted=b.isMute;
this.controller.dispatchEvent(« OnMute »,b.isMute)
},onVolumeChange:function(b){this.controller.dispatchEvent(« OnVolumeChange »,b.volume)
},onSeeked:function(i){if(!this.isSeeking&&(!tpIsIPhone()&&tpIsIOS())&&!this.videoEngine.isFullScreen()&&!this.videoEngine.isPaused()){tpDebug(« this is a bogus seek, ignoring »);
return
}this.isSeeking=false;
if(!this.currentClip||this.currentClip.streamType== »empty »||this.currentClip.baseClip.noSkip){tpDebug(« Ignoring seek! »);
return
}if(!this.seekTimeObject&&this.currentTimeObject&&this.currentTimeObject.currentTime!=this.videoEngine.getTotalTime()){this.seekTimeObject=this.cloneTimeObject(this.currentTimeObject)
}var j={globalDataType: »com.theplatform.pdk.data::SeekObject »};
j.end=this.createCurrentTimeObject();
if(j.end!=undefined&&this.seekTimeObject!=undefined&&j.end.currentTime!=this.seekTimeObject.currentTime){j.start=this.seekTimeObject
}else{var d=this.previousTime;
var h=j.end.duration;
j.start={globalDataType: »com.theplatform.pdk.data::TimeObject »,mediaTime:d,currentTime:d,currentTimeAggregate:d,duration:j.end.duration,durationAggregate:j.end.durationAggregate,percentComplete:(d/h)*100,percentCompleteAggregate:(d/h)*100,isAggregate:false,isLive:this._isLive,windowDuration:this._windowDuration}
}j.clip=this.currentClip;
j.clip.currentMediaTime=j.end.mediaTime;
j.clip.mediaTime=j.end.mediaTime;
var e=j.clip.mediaTime;
this.controller.dispatchEvent(« OnMediaSeek »,j);
this.seekTimeObject=undefined;
if(!this.paused){this.videoEngine.play()
}},onSeekAborted:function(b){this.isSeeking=false;
tpDebug(b.description)
},onSeeking:function(b){if(this.playlistHasSSA&&tpIsIOS()&&this.videoEngine.isFullScreen()&&!this.currentClip.baseClip.noSkip){clearInterval(this.timeUpdateTimer)
}},onProgress:function(f){if(!this.currentClip||this.currentClip.streamType== »empty »){return
}if(!this.startedBuffer){this.startedBuffer=true;
this.controller.dispatchEvent(« OnMediaBuffering »,this.currentClip)
}var d=f.percentLoaded;
var e=d*this.videoEngine.getTotalTime();
if(d>=1){clearInterval(this.progressUpdateTimer)
}this.controller.dispatchEvent(« OnMediaLoading »,{ratioLoaded:d,isLoadComplete:d>=1,globalDataType: »com.theplatform.pdk.data::LoadMediaData »,loadedMilliseconds:-1,bytesLoaded:-1,bytesTotal:-1})
},onEnded:function(c){if(c){tpDebug(« MEDIA_END event for « +c.media.url+ » with clipIndex: « +this.currentClip?this.currentClip.clipIndex: »none, currentClip is null »);
if(this.currentClip&&c.media.url!==this.currentClip.URL){tpDebug(« This was a stale onEnded event, we’ll ignore it »);
return
}}if(!this.currentClip||this.currentClip.streamType== »empty »||this.clipEnded===true){return
}if(this.currentClip.baseClip.isAd){this.currentClip.hasPlayed=true;
this.playbackManager.updateClip(this.currentClip)
}tpDebug(« onEnded called for for url « +this.currentClip.URL);
tpDebug(« Clearing timeUpdateTimer »);
if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
}this.jumpTime=undefined;
this.needsJump=false;
this.currentVideoTime=undefined;
var d=this.videoEngine.getCurrentTime();
tpDebug(« Dispatching OnMediaEnd at « +d+ » for src: »+this.currentClip.URL);
if(this.startedPlaying&&!this.clipEnded){tpDebug(« Calling endMedia() »);
this.endMedia()
}else{tpDebug(« Never started Playing or clipEnded is already true », »tpPlayer »);
if(!this.releaseSet&&!this.loading){this.playbackManager.nextClip()
}}this.releaseSet=false
},onInitialAudioTrackSwitched:function(b){if(this._dispatchInitialAudioTrack===true){this.onAudioTrackSwitched(b);
this._dispatchInitialAudioTrack=false
}},onAudioTrackSwitched:function(h){tpDebug(« audioTrackSwitched from VE new: »+h.newAudioTrackIndex, »tpPlayer »);
var f=this.videoEngine.getAudioTrackByIndex(h.newAudioTrackIndex);
var g=this.videoEngine.getAudioTrackByIndex(h.oldAudioTrackIndex);
if(f){f.globalDataType= »com.theplatform.com.data::AudioTrack »
}if(g){g.globalDataType= »com.theplatform.com.data::AudioTrack »
}var e={oldAudioTrack:g,newAudioTrack:f};
if(this.startedPlaying){this.controller.dispatchEvent(« OnAudioTrackSwitched »,e)
}else{this.standbySwitchedAudio=e
}},endMedia:function(){this.clipEnded=true;
this.playbackManager.endMedia(this.currentClip);
if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
}if(this.pausedLiveUpdateTimer){clearInterval(this.pausedLiveUpdateTimer)
}},onTimeUpdateWhilePaused:function(){if(this.fellOutOfDvrWindow()){tpDebug(« We fell out of the DVR window, ending current release. »);
this.endMedia()
}},fellOutOfDvrWindow:function(){return this._windowDuration<(this._windowDuration-this.videoEngine.getCurrentTime())
},onTimeUpdate:function(i){if(this.currentClip===undefined||this.currentClip===null){return
}if(this.isSeeking){if(this._isLiveDash()){this._incrementLiveStallTimeout()
}tpDebug("We're still seeking so we'll suppress onTimeUpdate");
return
}if(this.clipEnded){tpDebug("onTimeUpdate fired somehow even though clipEnded is true");
clearInterval(this.timeUpdateTimer);
return
}if(this.currentClip&&!this.startedPlaying){this.startedPlaying=true;
var e=tpGetPid(this.currentReleaseUrl);
this.currentClip.releasePID=e;
var l=this.videoEngine.getTotalTime();
if(isNaN(l)||l<=0){l=this.currentClip.mediaLength
}this.currentClip.trueLength=Math.floor(l);
this.currentClip.baseClip.loadTime=0;
this.currentClip.currentMediaTime=Math.floor(l);
this.currentClip.mediaTime=this.currentClip.currentMediaTime;
this.currentClip.mediaLength=Math.round(l);
if(!this.currentClip.baseClip.isAd&&(!this.currentClip.chapter||!this.currentClip.chapter.chapters.isAggregate)){this.currentClip.endTime=this.currentClip.length=this.currentClip.mediaLength;
if(this.currentClip.chapter){this.currentClip.chapter.chapters.aggregateLength=this.currentClip.chapter.endTime=this.currentClip.mediaLength;
this.playlist.chapters.chapters[0].length=this.playlist.chapters.aggregateLength=this.currentClip.mediaLength
}}this.previousTime=this.currentClip.currentMediaTime;
tpDebug("Player dispatching OnMediaStart paused="+this.videoEngine.isPaused()+" for clip with index "+this.currentClip.clipIndex+" and url "+this.currentClip.URL+" with VE at offset "+this.videoEngine.getCurrentTime());
this.suppressPause=false;
this.startedPlaying=true;
tpTimeEnd("Time from setReleaseUrl until OnMediaStart");
tpTimeEnd("Time from page load to OnMediaStart");
this.controller.dispatchEvent("OnMediaStart",this.currentClip);
if(this.standbySwitchedAudio){this.controller.dispatchEvent("OnAudioTrackSwitched",this.standbySwitchedAudio);
this.standbySwitchedAudio=null
}}if(this.jumpTime){}else{if(this.delaySeek){if(this.doSeek(this.delaySeek)){this.delaySeek=undefined;
this.delaySeekPercentage=undefined
}}else{if(this.delaySeekPercentage){if(this.seekToPercentage(this.delaySeekPercentage)){this.delaySeekPercentage=undefined
}}else{if(this.currentVideoTime&&Math.abs(this.currentVideoTime-(this.videoEngine.getCurrentTime()))<250){}else{if(!this.clipEnded){var h=true;
if(!this.videoEngine.isPaused()){this.showBlocker(false)
}else{if(this.blockerShowing===true){this.showBlocker(false)
}}var l=this.videoEngine.getTotalTime();
if(isNaN(l)||l0&&Math.abs(this.currentClip.currentMediaTime-this.currentClip.endTime)<1000){this.onEnded();
return
}else{if(this.videoEngine.getCurrentTime()===0){return
}}var j=this.currentTimeObject;
this.currentTimeObject=this.createCurrentTimeObject();
if(this.currentClip){this.controller.updateMediaTime(this.currentClip.currentMediaTime)
}if(this.percentLoaded<1&&this.percentLoaded!=this.videoEngine.getPercentLoaded()){this.percentLoaded=this.videoEngine.getPercentLoaded();
this.onProgress({percentLoaded:this.percentLoaded})
}if(this._shouldDispatchOnMediaPlaying(j)){if(this._isLiveDashStalledWhilePlaying(j)){this._incrementLiveStallTimeout();
return
}if(!this.contentAreaSet){this.getContentArea();
this.contentAreaSet=true
}this.controller.dispatchEvent("OnMediaPlaying",this.currentTimeObject);
this._liveStallTimeout=0;
this._attemptedRecoveryTimeout=0
}this.showVideo();
this.showBlocker(false);
var k=this.videoEngine.getCurrentTime();
if(this.currentVideoTime){k=this.currentVideoTime
}this.currentVideoTime=undefined;
if(this._shouldEndClip(k,l)){this.currentVideoTime=this.videoEngine.getCurrentTime();
if(this.currentClip.baseClip.isAd){this.currentClip.hasPlayed=true
}this.playbackManager.updateClip(this.currentClip);
tpDebug("Calling onEnded() at "+this.videoEngine.getCurrentTime());
this.onEnded()
}this.previousTime=k
}}}}}},_shouldDispatchOnMediaPlaying:function(e){var f=this._isLive&&!this._isPaused;
var d=e==null||(e.currentTime!==this.currentTimeObject.currentTime);
return f||d
},_isLiveDash:function(){return this._isDash()&&this._isLive
},_isDash:function(){return this.currentClip.baseClip.type==="application/dash+xml"||this.currentClip.baseClip.type==="video/vnd.mpeg.dash.mpd"
},_isCurrentTimeLessThanPreviousTime:function(b){return this.currentTimeObject.currentTimeb){this._attemptToRecoverStalledLiveDash();
this._incrementAttemptedRecoveryTimeout()
}},_attemptToRecoverStalledLiveDash:function(){tpDebug(« Live stream stalled, attempting a seek to recover. »);
this.videoEngine.seek(this.videoEngine.getCurrentTime()-1000);
this._liveStallTimeout=0
},_incrementAttemptedRecoveryTimeout:function(){var b=3;
this._attemptedRecoveryTimeout++;
if(this._attemptedRecoveryTimeout>b){tpDebug(« Ending live stream after « +b+ » stall recovery attempts. »);
this.endMedia()
}},_shouldEndClip:function(h,e){var f=this.playlistHasSSA&&this.usesNativeControls&&h>this.currentClip.endTime+500;
if(f){return false
}var g=(this.currentClip&&this.currentClip.endTime&&this.currentClip.endTime>0&&(!this.playlistHasSSA?(Math.abs(h-this.currentClip.endTime)this.currentClip.endTime):h>this.currentClip.endTime)&&Math.abs(h-e)>1000);
return g
},createCurrentTimeObject:function(p){if(!this.video){return undefined
}var o=Math.round(p===undefined?this.videoEngine.getCurrentTime():p);
var t=this.currentClip.chapter;
var n=false;
if(t&&!this.currentClip.baseClip.isAd&&(ot.endTime)){var r=0;
var m=this.playlist.chapters.chapters.length;
for(;
r=d.startTime&&o=d.endTime&&o0){var s={globalDataType: »com.theplatform.pdk.data::TimeObject »};
s.mediaTime=o;
s.currentTime=o-this.currentClip.startTime;
s.currentTimeAggregate=s.currentTime;
s.duration=this.currentClip.length;
s.durationAggregate=s.duration;
s.percentComplete=(s.currentTime/s.duration)*100;
s.percentCompleteAggregate=s.percentComplete,s.isAggregate=false,s.isLive=this._isLive,s.windowDuration=this._windowDuration;
return s
}else{var i=Math.round(this.videoEngine.getTotalTime());
return{globalDataType: »com.theplatform.pdk.data::TimeObject »,mediaTime:o,currentTime:o,currentTimeAggregate:o,duration:i,durationAggregate:i,percentComplete:(o/i)*100,percentCompleteAggregate:(o/i)*100,isAggregate:false,isLive:this._isLive,windowDuration:this._windowDuration}
}}},cloneTimeObject:function(b){return b?{globalDataType: »com.theplatform.pdk.data::TimeObject »,mediaTime:b.mediaTime,currentTime:b.currentTime,currentTimeAggregate:b.currentTimeAggregate,duration:b.duration,durationAggregate:b.durationAggregate,percentComplete:b.percentComplete,percentCompleteAggregate:b.percentCompleteAggregate,isAggregate:b.isAggregate,isLive:b.isLive,windowDuration:this._windowDuration}:undefined
},onPlaybackError:function(b){if(this.ignoreErrors||!this.currentClip||this.currentClip.streamType== »empty »){tpDebug(« Ignoring playback error »);
return
}tpDebug(« Got a playback error from the video engine, the call to play media must not have orginated from a user click. »);
if(this.currentReleaseUrl){tpDebug(« Calling loadReleaseUrl for « +this.currentReleaseUrl);
this.controller.loadReleaseURL(this.currentReleaseUrl)
}else{tpDebug(« We don’t have a releaseurl to load »)
}},onError:function(b){if(this.ignoreErrors||!this.currentClip||this.currentClip.streamType== »empty »){return
}this.doError(b)
},doError:function(d){clearTimeout(this.nextClipTimerId);
this.showControls(false);
this.showBlocker(true);
if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
}this.hasError=true;
var c={location:this.id,context:d?d.context:undefined,raw:d?d.raw:undefined,clip:this.currentClip,endRelease:!this.currentClip.baseClip.isAd||(this.playlistHasSSA&&this.urlEqualsContentClip(this.playlist,this.currentClip.URL)),message:d&&d.details?d.details: »The media cannot be played »,friendlyMessage: »The media cannot be played »,globalDataType: »com.theplatform.pdk.data::PlaybackError »};
if(this.currentClip.baseClip.isAd){this.currentClip.hasPlayed=true;
this.playbackManager.updateClip(this.currentClip)
}this.suppressPause=false;
this.controller.sendError(c)
},urlEqualsContentClip:function(h,c){for(var f=0;
f<h.clips.length;
f++){var g=h.clips[f];
if(!g.isAd){return g.URL==c
}}return true
},showVideo:function(){if(this.isShowing){return
}this.player.style.visibility="";
this.isShowing=true
},hideVideo:function(){if(this.isShowing===false){return
}this.player.style.visibility="hidden";
this.isShowing=false
},applyVideoEngineSettings:function(){var h=["limitRenditionsByPlayerSize","maxBufferDuration","startupRendition","withCredentials"];
var j=[];
for(var g=0;
g0){this.videoEngine.applySettings(j)
}},loadPoster:function(c){if(!c){return
}if(!this.standby){this.standby=document.getElementById(this.id+ ».standby »)
}var d=c.split(« ? »)[0]+ »?format=poster&width= »+this.standby.offsetWidth+ »&height= »+this.standby.offsetHeight;
this.videoEngine.setPoster(d)
},simulateClick:function(e){tpDebug(« simulateClick »);
var f=document.createElement(« a »);
f.id= »clickSimulator »;
f.href= »# »;
document.body.appendChild(f);
f.addEventListener(« click »,function(b){b.preventDefault();
e()
},false);
var a;
if(document.createEvent){a=document.createEvent(« MouseEvents »);
if(a.initMouseEvent){a.initMouseEvent(« click »,true,true,window,0,0,0,0,0,false,false,false,false,0,null);
f.dispatchEvent(a)
}}document.body.removeChild(f)
},setMediaArea:function(c){if(c.width>0&&c.height>0){this._mediaArea=c;
this.video.style.top=c.y+ »px »;
this.video.style.left=c.x+ »px »;
this.video.style.width=c.width+ »px »;
this.video.style.height=c.height+ »px »;
this.video.style.position= »absolute »;
this.blocker.style.top=c.y+ »px »;
this.blocker.style.left=c.x+ »px »;
this.blocker.style.width=c.width+ »px »;
this.blocker.style.height=c.height+ »px »;
this.blocker.style.position= »absolute »;
this.controller.dispatchEvent(« OnMediaAreaChanged »,this.getMediaArea());
var d=this;
setTimeout(function(){d.getContentArea()
},300)
}},updateMediaArea:function(){var b={top:0,left:0,x:0,y:0,width:this.player.offsetWidth,height:this.player.offsetHeight};
if(!this._mediaArea||b.width!=this._mediaArea.width||b.height!=this._mediaArea.height){this._mediaArea=b;
this.controller.dispatchEvent(« OnMediaAreaChanged »,this._mediaArea)
}},getContentArea:function(q){var y=0;
var p=0;
try{if(this.currentClip){y=this.currentClip.baseClip.width;
p=this.currentClip.baseClip.height
}if(this.contentAreaSet||y===0||p===0){var z=this.videoEngine.getVideoWidth();
var w=this.videoEngine.getVideoHeight();
if(z>0&&w>0){y=z;
p=w
}}}catch(t){return{x:0,y:0,width:0,height:0}
}if(!this._mediaArea){this.updateMediaArea()
}var e=y/p;
var u=this._mediaArea.width/this._mediaArea.height;
var r=0;
var s=0;
var v;
var o;
if(e>=u){v=this._mediaArea.width;
o=Math.round(this._mediaArea.width/e);
s=Math.abs(Math.round(this._mediaArea.y+Math.round(this._mediaArea.height-o)/2))
}else{v=Math.round(this._mediaArea.height*e);
o=this._mediaArea.height;
r=Math.abs(Math.round(this._mediaArea.x+Math.round(this._mediaArea.width-v)/2))
}var x={x:r,y:s,width:v,height:o};
if(!q){this.controller.dispatchEvent(« OnContentAreaChanged »,x)
}return x
},getMediaArea:function(){if(!this._mediaArea){this.updateMediaArea()
}return this._mediaArea
},getComponentSize:function(){return tpGetComponentSize(this.container)
},showControlBlocker:function(b){this.controlBlockerShowing=b;
b?this.controlBlocker.style.display= » »:this.controlBlocker.style.display= »none »
},showBlocker:function(b){this.blockerShowing=b;
b?this.blocker.style.display= » »:this.blocker.style.display= »none »
},handleOnMediaAreaChanged:function(b){if(b.data.height==0){tpDebug(« setting video height to: »+b.data.height, »tpPlayer »)
}this.blocker.style.top=b.data.y+ »px »;
this.blocker.style.left=b.data.x+ »px »;
this.blocker.style.width=b.data.width+ »px »;
this.blocker.style.height=b.data.height+ »px »;
this.blocker.style.position= »absolute »
},handleOnOverlayAreaChanged:function(b){if(this.videoengineruntime=== »silverlight »){this.controlBlocker.style.width=b.data.width+ »px »;
this.controlBlocker.style.height=b.data.height+ »px »
}}});
if(typeof(Player)=== »undefined »){Player=tpPlayer
}PlugInManager=Class.extend({init:function(b){this.controller=b;
this.plugins=new Array()
},addPlugIn:function(s,l,k,t,o,n,m,q,r){if((t.indexOf(« .swf »)<0)){var p={id:s,type:l,priority:k,url:t,subUrl:o,vars:n,plugIn:m};
this.plugins.push(p)
}},ready:function(){var c=this;
if(!this.plugins||this.plugins.length===0){setTimeout(function(){tpTimeEnd("Time it took from $pdk.onload until OnPluginsComplete");
c.controller.dispatchEvent("OnPlugInsComplete",null);
c.controller.initializePlayback()
},1);
return
}for(var d=0;
d<this.plugins.length;
d++){tpController.loadPlugIn(this.plugins[d],this.controller)
}}});
tpReleaseList=PDKComponent.extend({_generateExportedMarkup:function(){return'


},init:function(g,h,f){this.width=h;
this.height=f;
this.id=g;
this.pretty=!navigator.userAgent.match(/MSIE 8/)&&!navigator.userAgent.match(/MSIE 7/)&&!navigator.userAgent.match(/MSIE 6/);
if($pdk._isDevMode){this.pretty=false
}this.controller=new ComponentController(g);
var e=$pdk.shell.Registry.getInstance().getShells().get(g);
this.deferredController=e?e._deferredController:null;
this.hasAutoPlayed=false;
this.hasAutoLoaded=false;
this.eventQueue=[];
this.playing=false
},initialize:function(){var b=this;
if(this.scopes){this.controller.scopes=[this.id].concat(this.scopes.split(« , »))
}else{this.controller.scopes=[this.id, »default »]
}if(this.deferredController){this.deferredController.addEventListener(« OnRefreshReleaseModelStarted »,function(){b.handleRefreshStarted.apply(b,arguments)
});
this.deferredController.addEventListener(« OnRefreshReleaseModel »,function(){b.handleReleaseModelRefreshed.apply(b,arguments)
});
this.deferredController.addEventListener(« OnLoadRelease »,function(){b.handleLoadRelease.apply(b,arguments)
});
this.deferredController.addEventListener(« OnLoadReleaseUrl »,function(){b.handleLoadRelease.apply(b,arguments)
});
this.deferredController.addEventListener(« OnFetchReleaseData »,function(){b.handleLoadRelease.apply(b,arguments)
})
}this.controller.addEventListener(« OnRefreshReleaseModelStarted »,function(){b.handleRefreshStarted.apply(b,arguments)
});
this.controller.addEventListener(« OnRefreshReleaseModel »,function(){b.handleReleaseModelRefreshed.apply(b,arguments)
});
this.controller.addEventListener(« OnSetReleaseUrl »,function(){b.handleSetReleaseUrl.apply(b,arguments)
});
this.controller.addEventListener(« OnReleaseSelected »,function(){b.handleOnReleaseSelected.apply(b,arguments)
});
this.controller.addEventListener(« OnLoadRelease »,function(){b.handleLoadRelease.apply(b,arguments)
});
this.controller.addEventListener(« OnLoadReleaseUrl »,function(){b.handleLoadRelease.apply(b,arguments)
});
this.controller.addEventListener(« OnFetchReleaseData »,function(){b.handleLoadRelease.apply(b,arguments)
});
this.controller.addEventListener(« OnReleaseStart »,function(){b.handleReleaseStart.apply(b,arguments)
});
this.controller.addEventListener(« OnReleaseEnd »,function(){b.handleReleaseEnd.apply(b,arguments)
});
this.controller.addEventListener(« OnMediaStart »,function(){b.handleMediaStart.apply(b,arguments)
});
this.controller.addEventListener(« OnMediaEnd »,function(){b.handleMediaEnd.apply(b,arguments)
});
this.controller.registerFunction(« playNext »,this,this.playNext);
this.controller.registerFunction(« playPrevious »,this,this.playPrevious);
this.currentIndex=-1;
this.createdThumbnailStyles=false;
if(this.showtitle===undefined){this.showtitle=true
}if(this.showdescription===undefined){this.showdescription=true
}if(this.showlength===undefined){this.showlength=true
}if(this.showthumbnail===undefined){this.showthumbnail=true
}if(this.defaultthumbnailheight===undefined){this.defaultthumbnailheight=100
}if(this.thumbnailwidth===undefined){this.thumbnailwidth=160
}if(this.thumbnailheight===undefined){this.thumbnailheight=90
}if(this.showtitle=== »false »){this.showtitle=false
}if(this.showdescription=== »false »){this.showdescription=false
}if(this.showlength=== »false »){this.showlength=false
}if(this.showthumbnail=== »false »){this.showthumbnail=false
}this.showTitle=this.showtitle;
this.showDescription=this.showdescription;
this.showLength=this.showlength;
this.showThumbnail=this.showthumbnail;
this.thumbnailWidth=this.thumbnailwidth;
this.thumbnailHeight=this.thumbnailheight;
this.defaultThumbnailHeight=this.defaultthumbnailheight
},write:function(c){if(this.autoLoad===undefined){this.autoLoad=true
}if(this.autoPlay===undefined&&(!(tpIsAndroid()||tpIsIOS())||$pdk.canAutoplayMobile())){this.autoPlay=true
}else{if((tpIsAndroid()||tpIsIOS())&&!$pdk.canAutoplayMobile()){this.autoPlay=false;
if(this.autoLoad==false){this.autoLoad=true
}}}if(this.playAll===undefined){this.playAll=true
}if(!this.columns){this.columns=2
}else{this.columns=parseInt(this.columns)
}if(!this.rows&&this.itemsPerPage!==undefined){this.rows=this.itemsPerPage/this.columns
}else{if(!this.rows){this.rows=2
}}if(tpIsIOS()){}if(c){this.container=c
}else{document.write(‘

‘);
this.container=document.getElementById(this.id);
this.container.style.width=this.width;
this.container.style.height=this.height
}this.style=document.createElement(« style »);
var d=document.getElementsByTagName(« head »)[0];
this.style.setAttribute(« type », »text/css »);
d.appendChild(this.style);
this.initialize()
},_bindElement:function(b){if(this.autoLoad==null){this.autoLoad=true
}if(this.autoPlay===undefined&&(!(tpIsAndroid()||tpIsIOS())||$pdk.canAutoplayMobile())){this.autoPlay=true
}else{if((tpIsAndroid()||tpIsIOS())&&!$pdk.canAutoplayMobile()){this.autoPlay=false
}}if(this.playAll==null){this.playAll=true
}this.container=b;
this.container.style.width=this.width;
this.container.style.height=this.height;
tpController.ready();
return this.container
},handleReleaseStart:function(d){var f;
for(var e=0;
e0){d=d.substring(0,c)
}this.currentReleaseUrl=d
},handleReleaseEnd:function(b){this.currentClip=undefined;
this.enable()
},getCurrentIndex:function(){var e=-1;
var d=this.currentReleaseUrl;
for(var f=0;
f0){this.currentIndex–
}else{if(this.currentIndex==0&&e){this.currentIndex=this.feed.entries.length-1
}}var f=this.feed.entries[this.currentIndex];
if(!f){return
}if(this.autoPlay){this.controller.dispatchEvent(« OnReleaseSelected »,{releaseUrl:f.url,userInitiated:false});
this.controller.setRelease(f,true);
return
}else{var d=this.currentClip;
if(!this.playing||!d||!(d.noSkip||(d.baseClip&&d.baseClip.noSkip))){this.controller.dispatchEvent(« OnReleaseSelected »,{releaseUrl:f.url,userInitiated:false});
this.controller.setRelease(f,true)
}}},handleLoadRelease:function(b){this.doSelectTile(b.data.id,b.data.url)
},releaseUrlsAreEqual:function(d,e,f){d=d?d.replace(/(.*)\?.*/, »$1″):null;
e=e?e.replace(/(.*)\?.*/, »$1″):null;
return d===e||(d!=null?d.indexOf(f)>=0:false)
},doSelectTile:function(c,d){this.setCurrentReleaseUrl(d);
if(!this.feed){this.currentMediaId=c;
this.currentReleaseUrl=d;
this.currentIndex=-1;
return
}this.currentIndex=-1;
if(c){this.currentIndex=this.setTileSelectedMediaId(c)
}if(this.currentIndex==-1){this.currentIndex=this.setTileSelectedReleasePid(d)
}},setTileSelected:function(b){},setTileSelectedMediaId:function(h){var g=-1;
if(h.indexOf(« / »)>=0){h=h.split(« / »).pop()
}var j;
for(var f=0;
f=0){j=j.split(« / »).pop()
}if(h==j){g=f;
var i=this.items[f];
if(i!==undefined){i.className= »tpRelease tpReleaseSelected »
}}else{var i=this.items[f];
if(i!==undefined){i.className= »tpRelease »
}}}return g
},setTileSelectedReleasePid:function(e){var f=-1;
for(var h=0;
h0){this.paging=true
}if(this.feed.range.startIndexan.range.startIndex){this.animateForward=false
}}}else{this.animateForward=false
}this.feed=an;
this.loadedTiles=[];
this.numTiles=an.entries.length;
if(!this.currentPage||T||!this.pretty){this.refresh();
this.currentPage=null;
this.previousPage=null
}var at=-1;
var w=-1;
var aa=0;
if(this.hasoverlay== »true »){var au=document.createElement(« div »);
au.className= »tpReleaseListOverlay »;
this.container.appendChild(au);
aa=au.clientHeight
}var af=document.createElement(« ul »);
af.className= »tpGrid »;
this.container.appendChild(af);
$pdk.jQuery(af).css(« margin-top »,parseInt($pdk.jQuery(af).css(« margin-top »))+aa);
af.ontouchstart=function(b){this.startX=b.changedTouches[0].pageX;
this.startY=b.changedTouches[0].pageY
};
af.ontouchend=function(b){if(this.startX&&((this.startX-b.changedTouches[0].pageX)>100)){$pdk.controller.nextRange()
}else{if(this.startX&&((b.changedTouches[0].pageX-this.startX)>100)){$pdk.controller.previousRange()
}}};
this.items=[];
var ac,ar,h,O,S,Q,am,ag,Z,aj,aq;
var V=($pdk.jQuery(af).innerWidth())/this.columns;
var P=($pdk.jQuery(af).innerHeight())/this.rows;
var W,ab,ae,ak;
var U=16/9;
if(this.allowscrolling== »true »){$(af).append( »

  • « );
    P=parseInt(this.thumbnailheight)+parseInt($(af).find(« .tpRelease »).css(« margin-top »))+parseInt($(af).find(« .tpRelease »).css(« margin-bottom »))+parseInt($(af).find(« .tpRelease »).css(« padding-top »))+parseInt($(af).find(« .tpRelease »).css(« padding-bottom »))+parseInt($(af).find(« .tpRelease »).css(« border-top-width »))+parseInt($(af).find(« .tpRelease »).css(« border-bottom-width »))+parseInt($(af).find(« a »).css(« margin-top »))+parseInt($(af).find(« a »).css(« margin-bottom »))+parseInt($(af).find(« a »).css(« border-top-width »))+parseInt($(af).find(« a »).css(« border-bottom-width »))+parseInt($(af).find(« a »).css(« padding-top »))+parseInt($(af).find(« a »).css(« padding-bottom »))+parseInt($(af).find(« .tpThumbnail »).css(« margin-top »))+parseInt($(af).find(« .tpThumbnail »).css(« margin-bottom »))+parseInt($(af).find(« .tpThumbnail »).css(« border-top-width »))+parseInt($(af).find(« .tpThumbnail »).css(« border-bottom-width »))+parseInt($(af).find(« .tpThumbnail »).css(« padding-top »))+parseInt($(af).find(« .tpThumbnail »).css(« padding-bottom »))+parseInt($(af).find(« .tpThumbnail img »).css(« margin-top »))+parseInt($(af).find(« .tpThumbnail img »).css(« margin-bottom »))+parseInt($(af).find(« .tpThumbnail img »).css(« border-top-width »))+parseInt($(af).find(« .tpThumbnail img »).css(« border-bottom-width »))+parseInt($(af).find(« .tpThumbnail img »).css(« padding-top »))+parseInt($(af).find(« .tpThumbnail img »).css(« padding-bottom »));
    $(af).children().first().remove();
    V-=10;
    $pdk.jQuery(af).css(« overflow-y », »auto »)
    }if(this.thumbnailwidth&&this.thumbnailheight){U=this.thumbnailwidth/this.thumbnailheight
    }for(var R=0;
    R0){Z.innerHTML+=’ (‘+tpMillisToStr(ah)+ ») »
    }}if(this.showDescription){aj=document.createElement(« p »);
    aj.innerHTML=an.entries[R].description;
    ag.appendChild(aj)
    }if(this.showThumbnail){aq=document.createElement(« img »);
    aq.style.display= »none »;
    aq.style.visibility= »hidden »;
    aq.tile=ac;
    aq.onload=aq.onerror=function(g){this.style.display= » »;
    this.style.visibility= »visible »;
    var f=$pdk.jQuery(S).width();
    var b=$pdk.jQuery(S).height();
    var n=parseInt($pdk.jQuery(this).css(« margin-left »));
    var o=parseInt($pdk.jQuery(this).css(« margin-right »));
    var p=parseInt($pdk.jQuery(this).css(« margin-top »));
    var d=parseInt($pdk.jQuery(this).css(« margin-bottom »));
    n=(n?n:0);
    o=(n?n:0);
    p=(n?n:0);
    d=(n?n:0);
    var c=f-n-o;
    var j=b-p-d;
    if(g!==true){tpScaleImage(this,c,j);
    var e=this.newWidth;
    var l=this.newHeight;
    if(!e){e=c
    }if(!l){l=j
    }}else{e=0;
    l=0;
    this.style.display= »none »
    }var m=(j-l)/2;
    var k=(c-e)/2;
    if(e<c){this.style.paddingLeft=Math.floor(k)+"px";
    this.style.paddingRight=Math.floor(k)+"px"
    }else{if(lul .tpRelease a, ul# »+this.id+ ».tpReleaseList .tpRelease a { background-color: # »+this.itembackgroundcolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList>ul .tpRelease a .tpMetadata, ul# »+this.id+ ».tpReleaseList .tpRelease a .tpMetadata { background-color: # »+this.itembackgroundcolor.substr(2)+ »; } »
    }if(this.itemframecolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease a { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpShine { background-color: # »+this.itemframecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpShine { border-color: # »+this.itemframecolor.substr(2)+ »; } »
    }if(this.textframecolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpMetadata { border-color: # »+this.textframecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease a .tpMetadata .tpGroup { border-color: # »+this.textframecolor.substr(2)+ »; } »
    }if(this.textcolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease a { color: # »+this.textcolor.substr(2)+ »; } »
    }if(this.thumbnailframecolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpThumbnail { border-color: # »+this.thumbnailframecolor.substr(2)+ »; } »
    }if(this.thumbnailbackgroundcolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpThumbnail { background-color: # »+this.thumbnailbackgroundcolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpThumbnail img { background-color: # »+this.thumbnailbackgroundcolor.substr(2)+ »; } »
    }if(this.thumbnailpaddingcolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpThumbnail { background-color: # »+this.thumbnailpaddingcolor.substr(2)+ »; } »
    }if(this.framecolor){i+= »# »+this.id+ ».tpReleaseList { border-color: # »+this.framecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList ul { border-color: # »+this.framecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList ol { border-color: # »+this.framecolor.substr(2)+ »; } »
    }if(this.texthighlighthovercolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover .tpShine { background-color: # »+this.texthighlighthovercolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover .tpShine { border-color: # »+this.texthighlighthovercolor.substr(2)+ »; } »
    }if(this.texthovercolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover a { color: # »+this.texthovercolor.substr(2)+ »; } »
    }if(this.texthighlighthovercolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover a .tpMetadata .tpGroup { border-color: # »+this.texthighlighthovercolor.substr(2)+ » !important; } »
    }if(this.thumbnailhighlighthovercolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover a .tpThumbnail { border-color: # »+this.thumbnailhighlighthovercolor.substr(2)+ » !important; } »
    }if(this.itemshineselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected .tpShine { background-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected .tpShine { border-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »
    }if(this.textselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected a { color: # »+this.textselectedcolor.substr(2)+ »; } »
    }if(this.texthighlightselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected a .tpMetadata .tpGroup { border-color: # »+this.texthighlightselectedcolor.substr(2)+ » !important; } »
    }if(this.thumbnailhighlightselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected a .tpThumbnail { border-color: # »+this.thumbnailhighlightselectedcolor.substr(2)+ » !important; } »
    }if(this.itemshineselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected:hover .tpShine { background-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected:hover .tpShine { border-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »
    }if(this.textselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected:hover a { color: # »+this.textselectedcolor.substr(2)+ »; } »
    }if(this.backgroundcolor&&this.itembackgroundcolor&&this.framecolor){i+= ».tpReleaseList ::-webkit-scrollbar { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-webkit-scrollbar-track { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-webkit-scrollbar-thumb { background-color: # »+this.itembackgroundcolor.substr(2)+ »; border-color: # »+this.framecolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-moz-scrollbar { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-moz-scrollbar-track { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-moz-scrollbar-thumb { background-color: # »+this.itembackgroundcolor.substr(2)+ »; border-color: # »+this.framecolor.substr(2)+ »}\n »
    }if(this.style.styleSheet){this.style.styleSheet.cssText=i
    }else{this.style.appendChild(document.createTextNode(i))
    }}if(this.currentReleaseUrl||this.currentMediaId){this.doSelectTile(this.currentMediaId,this.currentReleaseUrl)
    }var Y=this.currentClip;
    if(Y&&(Y.baseClip&&(Y.baseClip.noSkip))){this.disable()
    }else{if(this.blocker){this.enable()
    }}},handleTileLoaded:function(f){var d=this;
    this.loadedTiles.push(f);
    if(this.loadedTiles.length==this.numTiles){if(!this.pretty){$pdk.jQuery(this.container).find(« .tpRelease »).css(« display », » »);
    $pdk.jQuery(d.previousPage).remove()
    }else{if(this.previousPage){this.paging=true;
    var e=$pdk.jQuery(this.currentPage).width();
    if(this.animateForward){$pdk.jQuery(this.container).find(« .tpRelease »).css(« display », » »).css(« -webkit-filter », »blur(1px) »).css(« filter », »blur(2px) »);
    $pdk.jQuery(this.container).find(« .tpGrid .tpRelease »).animate({left: »-= »+e},600,function(){$pdk.jQuery(d.previousPage).remove();
    d.paging=false;
    $pdk.jQuery(d.container).find(« .tpRelease »).css(« -webkit-filter », » »).css(« filter », » »);
    if(d.eventQueue&&d.eventQueue.length){d.handleReleaseModelRefreshed(d.eventQueue.shift())
    }})
    }else{$pdk.jQuery(this.container).find(« .tpRelease »).css(« display », » »).css(« -webkit-filter », »blur(1px) »).css(« filter », »blur(2px) »);
    $pdk.jQuery(this.container).find(« .tpGrid .tpRelease »).animate({left: »+= »+e},600,function(){$pdk.jQuery(d.previousPage).remove();
    d.paging=false;
    $pdk.jQuery(d.container).find(« .tpRelease »).css(« -webkit-filter », » »).css(« filter », » »);
    if(d.eventQueue&&d.eventQueue.length){d.handleReleaseModelRefreshed(d.eventQueue.shift())
    }})
    }}else{$pdk.jQuery(this.container).find(« .tpRelease »).fadeIn(400,function(){d.paging=false
    })
    }}if(this.showDescription){setTimeout(function(a){for(var b=0;
    b<d.loadedTiles.length;
    b++){tpEllipsis($pdk.jQuery(d.loadedTiles[b]).find(".tpGroup")[0],$pdk.jQuery(d.loadedTiles[b]).find(".tpGroup p")[0])
    }},1)
    }}},doInitialLoad:function(b){if(!b.entries||b.entries.length<=0){return
    }tpDebug("doInitialLoad called");
    if(!this.currentReleaseUrl&&this.autoPlay&&!this.hasAutoPlayed){tpDebug("doInitialLoad firing OnReleaseSelected");
    this.controller.dispatchEvent("OnReleaseSelected",{releaseUrl:b.entries[0].url,userInitiated:false});
    this.controller.setRelease(b.entries[0],false);
    this.wasSetByReleaseList=true
    }else{if(!this.currentReleaseUrl&&this.autoLoad&&!this.hasAutoLoaded){this.hasAutoLoaded=true;
    this.controller.loadRelease(b.entries[0],false);
    this.wasSetByReleaseList=true
    }}},handleMediaStart:function(c){this.playing=true;
    var d=c.data;
    if(d.baseClip&&(d.baseClip.noSkip)){this.disable()
    }else{if(this.blocker){this.enable()
    }}this.currentClip=d
    },disable:function(){if(tpIsIPhone()||tpIsAndroid()){return
    }if(!this.blocker){this.blocker=document.createElement("div");
    this.blocker.style.width="100%";
    this.blocker.style.height="100%";
    this.blocker.style.position="absolute";
    this.blocker.style.top="0";
    this.blocker.style.left="0";
    this.blocker.style.background="#"+this.backgroundcolor.substr(2);
    this.blocker.style.opacity="0.75";
    this.blocker.style.filter="alpha(opacity=75)";
    this.blocker.innerHTML=" ";
    this.blocker.style.zIndex="500";
    this.container.appendChild(this.blocker)
    }this.blocker.style.display="";
    var b=this.container.childNodes;
    for(child in b){if(child.style){child.style.opacity="0.75";
    child.style.filter="alpha(opacity=75)"
    }}},enable:function(){tpDebug("Doing enable");
    try{if(this.blocker){this.blocker.style.display="none"
    }var c=this.container.childNodes;
    for(child in c){if(child.style){child.style.opacity="";
    child.style.filter=""
    }}}catch(d){tpDebug("enabled() threw an error with "+d.message+" on "+d.lineNumber)
    }},handleMediaEnd:function(b){this.playing=false;
    tpDebug("Enabling releaseList");
    this.enable()
    },output:function(c){var d="";
    for(prop in c){d+=prop+": "+c[prop]+"\n"
    }alert(d)
    }});
    ReleaseList=tpReleaseList;
    $pdk.ns("$pdk.classes");
    $pdk.classes.ReplacePlaylistManager=$pdk.extend(function(){},{constructor:function(){},replacePlaylist:function(f,g){var h=false;
    for(var e=0;
    e<f.length;
    e++){if(f[e].playlistPlugIn.replacePlaylist&&f[e].playlistPlugIn.replacePlaylist.apply(f[e].playlistPlugIn,[g])){h=true
    }}return h
    }});
    var SeekEvents={USERSEEKED:"userseeked",PROGRAMATICALLYSEEKED:"programaticallyseeked",SEEKFAILED:"seekfailed"};
    var SeekStates={PAUSED:"paused",PLAYING:"playing",USERSEEKING:"userseeking",PROGRAMATICALLYSEEKING:"programaticallyseeking",ERROR:"error"};
    SeekHandler=EventDispatcher.extend({init:function(d){this.videoEngine=d;
    this.seekInterval=350;
    this.seekState=this.videoEngine.isPaused()?SeekStates.PAUSED:SeekStates.PLAYING;
    var c=this;
    if(!tpIsIOS()){}else{}this.videoEngine.addEventListener("MEDIA_SEEKED",function(a){c.onSeeked(a)
    });
    this.lastTime=this.videoEngine.getCurrentTime()/1000
    },stopTimer:function(){clearInterval(this.seekTimer)
    },startTimer:function(){var b=this;
    this.lastTime=0;
    this.seekTimer=setInterval(function(){b.onTimer()
    },this.seekInterval)
    },onSeeked:function(c){tpDebug("got seeked event from "+this.lastTime+" to"+this.videoEngine.getCurrentTime());
    this.lastTime=this.video.getCurrentTime()/1000;
    if(false&&this.seeking&&Math.abs(this.videoEngine.getCurrentTime()/1000-this.seekingTo)=3
    },checkSeekable:function(b){return false
    },checkBuffered:function(b){return false
    },destroy:function(){this.buildListenerChain();
    this.removeProgressListeners();
    clearInterval(this.seekTimer)
    }});
    StandbyManager=Class.extend({init:function(e,f){this.controller=e;
    this.pbm=f;
    var h=this;
    this.controller.registerFunction(« showMenuCard »,this,this.showMenuCard);
    this.controller.registerFunction(« checkIfEndCardExists »,this,this.checkIfEndCardExists);
    this.controller.addEventListener(« OnLoadReleaseUrl »,function(a){if(!h.formVisible){h.controller.dispatchEvent(« OnShowPlayOverlay »,true)
    }else{}h.controller.dispatchEvent(« OnShowPreviewImageOverlay »,false)
    });
    this.controller.addEventListener(« OnMediaEnd »,function(a){h.playing=false
    });
    this.controller.addEventListener(« OnMediaStart »,function(a){h.playing=true
    });
    this.controller.addEventListener(« OnReleaseEnd »,function(a){h.playing=false
    });
    this.controller.addEventListener(« OnClearCurrentRelease »,function(a){tpDebug(« StandbyManager got « +a.type);
    h.controller.dispatchEvent(« OnShowPreviewImageOverlay »,false);
    h.controller.dispatchEvent(« OnShowPlayOverlay »,false);
    h.setStandby(false)
    });
    this.controller.addEventListener(« OnReleaseError »,function(a){tpDebug(« StandbyManager got « +a.type);
    h.setStandby(false)
    });
    this.controller.addEventListener(« OnShowCard »,function(a){tpDebug(« StandbyManager got « +a.type);
    if(a.data.deck== »forms »){h.formVisible=true
    }});
    this.controller.addEventListener(« OnHideCard »,function(a){tpDebug(« StandbyManager got « +a.type);
    if(a.data.deck== »forms »){h.formVisible=false
    }});
    this.controller.addEventListener(« OnSetReleaseUrl »,function(a){h.setStandby(false)
    });
    this.controller.addEventListener(« OnSetRelease »,function(a){h.setStandby(false)
    });
    this.controller.addEventListener(« OnResetPlayer »,function(a){h.setStandby(false)
    });
    var g=this.controller.getProperty(« endCard »);
    if(g){this.endCardID=g
    }else{this.endCardID= »forms:tpMenuCard »
    }},showMenuCard:function(b){if(b){this.controller.showPlayerCard(« forms », »tpMenuCard »)
    }else{this.controller.hidePlayerCard(« forms »)
    }},setStandby:function(c,d){if(c){this.doStartStandby(d)
    }else{this.doRemoveStandby()
    }},checkIfEndCardExists:function(c){var d=this.controller.getProperty(« endCard »);
    if(d){this.endCardID=d
    }else{this.endCardID= »tpMenuCard »
    }return true
    },doStartStandby:function(j){tpDebug(« doing startStandby »);
    if(this.playing==true){return
    }this.isStandBy=true;
    var k=this.controller.getProperty(« endCard »);
    if(k){this.endCardID=k
    }if(!j){tpDebug(« dispatching OnShowPlayOverlay true »);
    this.controller.dispatchEvent(« OnShowPlayOverlay »,!this.formVisible)
    }else{tpDebug(« call to show card »);
    var l=false;
    if(this.endCardID.indexOf(« : »)!=-1){var o=this.endCardID.split(« : »);
    var i=o[0];
    var p=o[1];
    this.controller.showPlayerCard(i,p);
    l=(i!== »forms »)
    }else{this.controller.showPlayerCard(« forms »,this.endCardID)
    }if(tpIsIOS()){this.controller.showFullScreen(false)
    }this.controller.dispatchEvent(« OnShowPlayOverlay »,l)
    }var n;
    var m=this;
    this.playingListener=function(a){m.controller.removeEventListener(« OnMediaPlaying »,m.playingListener);
    if(m.isStandBy){tpDebug(« playingListener hiding overlay »);
    m.isStandBy=false
    }};
    this.controller.addEventListener(« OnMediaPlaying »,this.playingListener,true)
    },doRemoveStandby:function(){if(this.isStandby){this.isStandby=false;
    this.controller.dispatchEvent(« OnShowPlayOverlay »,false)
    }}});
    TokenManager=Class.extend({init:function(e){this.controller=e;
    this.pluginsLoaded=false;
    this.waitTokens={};
    var f=this;
    var d=this.controller.getProperty(« token »);
    if(d){this.setToken(d, »urn:theplatform:auth:token »)
    }this.controller.registerFunction(« setToken »,this,this.setToken);
    this.plugInsCompleteHandler=function(a){f.plugInsComplete.apply(f,arguments)
    };
    this.controller.addEventListener(« OnPlugInsComplete »,this.plugInsCompleteHandler)
    },plugInsComplete:function(c){this.controller.removeEventListener(« OnPlugInsComplete »,this.plugInsCompleteHandler);
    this.pluginsLoaded=true;
    for(var d in this.waitTokens){this._doSetToken(this.waitTokens[d])
    }},setToken:function(d,f){if(!f){f= »urn:theplatform:auth:token »
    }var e={token:d,type:f,globalDataType: »com.theplatform.pdk.data::TokenInfo »};
    if(this.pluginsLoaded){this._doSetToken(e)
    }else{this.waitTokens[f]=e
    }},_doSetToken:function(b){this.controller.dispatchEvent(« OnSetToken »,b)
    }});
    UrlManager=Class.extend({init:function(b){this.controller=b;
    this.plugins=[];
    this._currentQueue=[];
    this.totalUrlPluginsRegistered=0;
    this.totalUrlPluginsLoaded=0;
    this.controller.registerFunction(« registerURLPlugIn »,this,this.registerURLPlugIn);
    this.controller.registerFunction(« setClip »,this,this.setClip)
    },checkClip:function(d,c){this._context={clip:d,callback:c,complete:false,found:false};
    this._currentQueue=this.plugins.concat();
    if(this._currentQueue.length===0){c(d);
    return true
    }else{if(!this._processNextPlugin()){c(d)
    }return false
    }},_processNextPlugin:function(){var c=false,d;
    while(!c&&this._currentQueue.length>0){d=this._currentQueue.shift();
    c=d.component.rewriteURL(this._context.clip)
    }this._context.found=c?true:this._context.found;
    return this._context.found
    },registerURLPlugIn:function(d,f,e){e=parseInt(e);
    this.plugins.push({component:d,urlType:f,priority:(isNaN(e)?1000:e)});
    this.totalUrlPluginsRegistered++;
    this.plugins.sort(this.compare)
    },setClip:function(b){if(this._currentQueue.length===0){if(!this._context.complete){this._context.clip=b;
    this._context.callback(b);
    this._context.complete=true
    }}else{this._context.clip=b;
    if(!this._processNextPlugin()){this.setClip(b)
    }}},compare:function(a,b){return a.priority-b.priority
    }});
    function tpIsAndroid(){if(navigator.userAgent.match(/iPhone/i)){return false
    }else{if(navigator.userAgent.match(/Android/i)){return true
    }else{return false
    }}}function tpIsChrome(){if(navigator.userAgent.toLowerCase().match(/chrome/i)){return true
    }else{return false
    }}function tpIsAndroidLegacy(){if(!navigator.userAgent.match(/Android/i)){return false
    }else{if(navigator.userAgent.toLowerCase().indexOf(« android 1. »)!=-1){return true
    }else{if(navigator.userAgent.toLowerCase().indexOf(« android 2. »)!=-1){return true
    }else{if(navigator.userAgent.toLowerCase().indexOf(« android 3.0 »)!=-1){return true
    }else{if(navigator.userAgent.toLowerCase().indexOf(« silk »)!=-1){return true
    }else{return false
    }}}}}}function tpIsIOS(){if(navigator.userAgent.match(/iPad/i)){return true
    }if(navigator.userAgent.match(/iPhone/i)){return true
    }else{return false
    }}function tpIsIPhone(){if(navigator.userAgent.match(/iPhone/i)){return true
    }else{return false
    }}function tpGetPid(d){var f=d;
    if(f&&f.indexOf(« pid= »)==-1){f=f.substring(f.lastIndexOf(« / »)+1);
    var e=f.indexOf(« ? »);
    if(e>0){f=f.substring(0,e)
    }}else{if(f){f=f.substring(f.indexOf(« pid= »)+4);
    var e=f.indexOf(« & »);
    if(e>0){f=f.substring(0,e)
    }}}return f
    }tpControllerClass=$pdk.queue.Controller;
    function tpScaleImage(p,l,k){var r=parseInt(p.naturalWidth);
    var j=parseInt(p.naturalHeight);
    var q=j/r;
    p.originalHeight=j;
    p.originalWidth=j;
    var m=k/l;
    var n=l/r;
    var o=k/j;
    if((n-o)>0){p.height=(k);
    p.style.width= »auto »;
    p.newHeight=k;
    p.newWidth=k/q
    }else{if((n-o)-1)
    }function tpIsWebKit(){return(navigator.userAgent.toLowerCase().indexOf(« webkit »)>-1)
    }function tpIsSafari(){return(navigator.userAgent.toLowerCase().indexOf(« safari »)>-1)
    }function tpIsFirefox(){return(navigator.userAgent.toLowerCase().indexOf(« firefox »)>-1)
    }function tpParseXml(d){var e=null;
    if(window.DOMParser){var f=new DOMParser();
    e=f.parseFromString(d, »text/xml »)
    }else{e=new ActiveXObject(« Microsoft.XMLDOM »);
    e.async= »false »;
    e.loadXML(d)
    }tpRemoveWhiteSpace(e);
    return e
    }function tpRemoveWhiteSpace(e){var f=/\S/;
    for(var h=0;
    h<e.childNodes.length;
    h++){var g=e.childNodes[h];
    if(g.nodeType==3&&(!(f.test(g.nodeValue)))){e.removeChild(g);
    h–
    }else{if(g.nodeType==1){tpRemoveWhiteSpace(g)
    }}}}function tpRemoveComments(e){for(var d=0;
    d0){f=g.substr(0,g.indexOf(« ms »))
    }else{var h=g.split(« : »);
    while(h.length>0){var e=h.shift();
    if(h.length==2){f+=((e)*1000*60*60)
    }if(h.length==1){f+=((e)*1000*60)
    }if(h.length==0){if(e.indexOf(« . »)){f+=((e)*1000)
    }else{f+=(e)*1000
    }}}}}return f
    }function tpSendUrl(d){var c=document.createElement(« img »);
    c.src=d;
    c.style.display= »none »;
    c.width=1;
    c.height=1;
    c.left=-1111;
    c.src=d;
    document.body.appendChild(c);
    tpDebug(« sent tracking/impressiong to « +d);
    document.body.removeChild(c)
    }function tpGetIEVersion(){var f=9999;
    if(navigator.appName== »Microsoft Internet Explorer »){var e=navigator.userAgent;
    var d=new RegExp(« MSIE ([0-9]{1,}[.0-9]{0,}) »);
    if(d.exec(e)!=null){f=parseFloat(RegExp.$1)
    }}return f
    }function tpGetComponentSize(e){var h=false;
    var g=e.style.height;
    var f=e.style.width;
    if(g=== »100% »&&e.style.width=== »100% »||(!g&&!f)){h=true
    }if(h&&e.parentNode&&(e.offsetHeight==0&&e.offsetWidth==0)){return tpGetComponentSize(e.parentNode)
    }else{if(!h){g=g.replace(« px », » »);
    f=f.replace(« px », » »);
    return{width:parseInt(f),height:parseInt(g)}
    }}return{width:e.offsetWidth,height:e.offsetHeight}
    }function tpGetScriptPath(e){if(e===undefined&&tpScriptPath!==undefined){return tpScriptPath
    }var f=document.getElementsByTagName(« script »);
    var g;
    if(e!==undefined){for(var h=0;
    h=0){g=f[h].src;
    break
    }}}else{g=f[f.length-1].src
    }if(!g){g=f[f.length-1].src
    }if(g.indexOf(« / »)==-1){return » »
    }g=g.substring(0,g.lastIndexOf(« / »));
    return g
    }function tpMillisToStr(k){var l=k/1000;
    var h=Math.floor(l/(60*60));
    l=l-(h*(60*60));
    var g=Math.floor(l/60);
    var j=Math.floor(l)%60;
    var i= » »;
    if(h>0){i=h.toString()+ »: »;
    if(g<10){i+="0"
    }}i+=g+":";
    if(j=o.scrollHeight;
    var m;
    var q;
    while(!u){m=$pdk.jQuery(o).height();
    q=o.scrollHeight;
    if(tpIsFirefox()){q=0;
    $pdk.jQuery(o).children().each(function(a){q+=$pdk.jQuery(o).children().eq(a).outerHeight()
    })
    }if((n-s)m){i.innerHTML= » »;
    v=false
    }u=true
    }else{if(m>=q){s=r;
    r=Math.floor((r+n)/2);
    i.innerHTML=p.substr(0,r)+ »… »;
    v=p.substr(r-1,2).match(/^[a-zA-Z]+$/)
    }else{if(m100){break
    }}if(i.innerHTML.substr(0,r).match(/[\W]+$/)){i.innerHTML=i.innerHTML.substr(0,r).replace(/[\W]+$/g, » »)+ »… »
    }if(v){i.innerHTML=p.substr(0,r);
    i.innerHTML=i.innerHTML.replace(/[\W]+[\w]+$/g, » »);
    i.innerHTML+= »… »
    }}function tpCreateColorizedStateStyles(u,o,s,w,t,A,q){var z=document.createElement(« canvas »);
    var r=this;
    if(z.getContext&&z.getContext(« 2d »)){var v=$pdk.jQuery(u).css(« background-image »);
    var y= » »;
    if(v&&v!== »none »){if(v.indexOf(‘url(« ‘)==0||v.indexOf(« url(‘ »)==0){v=v.substr(5,v.length-7)
    }else{if(v.indexOf(« url(« )==0){v=v.substr(4,v.length-5)
    }}var x=new Image();
    x.onload=function(){var a=document.createElement(« canvas »);
    var c=a.getContext(« 2d »);
    a.style.borderColor= »# »+t.substr(2);
    var b=$pdk.jQuery(a).css(« border-color »);
    b=b.substr(4,b.length-5).split(« , « );
    a.width=this.width;
    a.height=this.height;
    c.drawImage(this,0,0,this.width,this.height);
    tpColorize(c,b[0],b[1],b[2]);
    y=o.replace(/\{url\}/g, »url(« +a.toDataURL()+ ») »).replace(/\{state\}/g, »:hover »);
    if(A.styleSheet){A.styleSheet.cssText=y+A.styleSheet.cssText
    }else{A.insertBefore(document.createTextNode(y),A.firstChild)
    }};
    x.src=v;
    var p=new Image();
    p.onload=function(){var a=document.createElement(« canvas »);
    var c=a.getContext(« 2d »);
    a.style.borderColor= »# »+w.substr(2);
    var b=$pdk.jQuery(a).css(« border-color »);
    b=b.substr(4,b.length-5).split(« , « );
    a.width=this.width;
    a.height=this.height;
    c.drawImage(this,0,0,this.width,this.height);
    tpColorize(c,b[0],b[1],b[2]);
    y=o.replace(/\{url\}/g, »url(« +a.toDataURL()+ ») »).replace(/\{state\}/g,(q?q: »:active »));
    if(A.styleSheet){A.styleSheet.cssText+=y
    }else{A.appendChild(document.createTextNode(y))
    }};
    p.src=v;
    var B=new Image();
    B.onload=function(){var a=document.createElement(« canvas »);
    var c=a.getContext(« 2d »);
    a.style.borderColor= »# »+s.substr(2);
    var b=$pdk.jQuery(a).css(« border-color »);
    b=b.substr(4,b.length-5).split(« , « );
    a.width=this.width;
    a.height=this.height;
    c.drawImage(this,0,0,this.width,this.height);
    tpColorize(c,b[0],b[1],b[2]);
    y=o.replace(/\{url\}/g, »url(« +a.toDataURL()+ ») »).replace(/\{state\}/g, » »);
    if(A.styleSheet){A.styleSheet.cssText+=y
    }else{A.appendChild(document.createTextNode(y))
    }};
    B.src=v
    }}}function tpColorize(V,R,K,g){var G={r:R,g:K,b:g};
    function Q(e,f,j){var e=e/360,f=f/100,j=j/100,a,c,d;
    if(f==0){a=c=d=j
    }else{O=e*6;
    P=Math.floor(O);
    h=j*(1-f);
    i=j*(1-f*(O-P));
    s=j*(1-f*(1-(O-P)));
    if(P==0){a=j;
    c=s;
    d=h
    }else{if(P==1){a=i;
    c=j;
    d=h
    }else{if(P==2){a=h;
    c=j;
    d=s
    }else{if(P==3){a=h;
    c=i;
    d=j
    }else{if(P==4){a=s;
    c=h;
    d=j
    }else{a=j;
    c=h;
    d=i
    }}}}}}return{r:Math.round(a*255),g:Math.round(c*255),b:Math.round(d*255)}
    }function S(c,m,l){c=c/255;
    m=m/255;
    l=l/255;
    var e=Math.min(c,m,l),d=Math.max(c,m,l),f=d-e,n={};
    n.v=d;
    if(f==0){n.h=0;
    n.s=0
    }else{n.s=f/d;
    var k=(((d-c)/6)+(f/2))/f;
    var a=(((d-m)/6)+(f/2))/f;
    var j=(((d-l)/6)+(f/2))/f;
    if(c==d){n.h=j-a
    }else{if(m==d){n.h=(1/3)+k-j
    }else{if(l==d){n.h=(2/3)+a-k
    }}}if(n.h1){n.h-=1
    }}return{h:(n.h*360),s:(n.s*100),v:(n.v*100)}
    }var L;
    if(V.hasOwnProperty(« canvas »)||V.canvas){L=V
    }if(V.hasOwnProperty(« width »)||V.width){L=V.getContext(« 2d »)
    }if(!L){console.error(« Trying to colorize non-canvas »);
    return
    }var M=L.getImageData(0,0,L.canvas.width,L.canvas.height);
    var v=S(G.r,G.g,G.b);
    var J=v.h/360;
    var I=v.s/100;
    var O=J*6;
    var P=Math.floor(O);
    var U=v.v*2.55;
    for(var b=0;
    b0){for(var d=0;
    d0){var e=this.getVideoEngineTextTrackToShow();
    this.log(« loadCaptions for « +this.currentVESidecarTextTracks.length+ » sidecar tracks »);
    if(e){this.log(« \ttextTrackToShow: « +e.language+ », « +e.mimeType+ », « +e.embedded);
    var d;
    for(var f=0;
    f0&&d.height>0){this.ve.setCaptionsOverlayArea(d)
    }},setCaptionsMediaArea:function(c){var d=c.data;
    if(d.height>0&&d.width>0){this.ve.setCaptionsMediaArea(d)
    }},recalculateCaptionsContainer:function(){var b=this.controller.getMediaArea();
    if(b.height>0&&b.width>0){this.ve.setCaptionsMediaArea(b)
    }},showSelectedLanguage:function(){this.log(« showSelectedLanguage: « +this.selectedTextTrackLanguage);
    var b=this.getVideoEngineTextTrackToShow();
    if(b){this.log(« \tcalling removeVisibleOverlayCuePointsGwt then showCaptions »);
    this.controller.callFunction(« removeVisibleOverlayCuePointsGwt »);
    this.ve.showCaptions(b)
    }else{this.log(« \tcalling hideCaptions »);
    this.ve.hideCaptions(false)
    }},getVideoEngineTextTrackToShow:function(){var b=this.controller.callFunction(« getTextTrackByLanguageGwt »,[this.selectedTextTrackLanguage]);
    return b&&this.isVideoEngineTextTrack(b)?b:null
    },textTrackForLanguageIsOverlay:function(b){return !this.getVideoEngineTextTrackToShow(b)
    },continueShowingOverlayTextTrack:function(b){return b&&this.textTrackForLanguageIsOverlay(b)
    },wasShowingVideoEngineTextTrack:function(b){return b&&b!= »none »
    },nowShowingVideoEngineTextTrack:function(b){return b&&b.language
    },iosFullscreenChange:function(c){this.log(« fullscreenChange »);
    if(!c.data&&this.currentVETextTracks&&this.currentVETextTracks.length>0){this.log(« NOT fullscreen and iOS, so update selected language if necessary »);
    var d=this.ve.getShowingCaptions();
    if(this.nowShowingVideoEngineTextTrack(d)){this.controller.setSubtitleLanguage(d.language)
    }else{if(this.continueShowingOverlayTextTrack(this.selectedTextTrackLanguage)){}else{if(this.wasShowingVideoEngineTextTrack(this.selectedTextTrackLanguage)){this.controller.setSubtitleLanguage(« none »)
    }}}}},iosOnMediaLoadStart:function(b){this.log(« iosOnMediaLoadStart: just show/hide on first clip »);
    if(this.isFirstClip(b.data)){this.showHideOnFirstClip(b.data)
    }},nativeControlsOnMediaStart:function(c){this.log(« iosOnMediaStart »);
    var d=c.data;
    if(d.baseClip.isAd){this.log(« Is ad, but doing nothing here for now. Should be hidden already. »)
    }else{this.hideCaptionsWhenPlaying(false);
    if(this.lastSelectedTextTracks){this.log(« not an ad and have last selected subtitles, so showing them »);
    this.ve.showCaptions(this.lastSelectedTextTracks);
    this.selectedTextTrackLanguage=this.lastSelectedTextTracks.language;
    this.lastSelectedTextTracks=undefined
    }else{this.log(« not an ad and no lastSelected, so nothing to do »)
    }}},nativeControlsOnMediaEnd:function(c){this.log(« iosOnMediaEnd »);
    var d=c.data;
    if(this.contentClipToAdClip(d)){this.log(« next clip is ad, so hiding »);
    this.lastSelectedTextTracks=this.ve.getShowingCaptions();
    this.ve.hideCaptions(false);
    this.hideCaptionsWhenPlaying(true)
    }else{this.log(« next clip is NOT an ad, so doing nothing »)
    }},hideCaptionsWhenPlaying:function(b){if(b){this.controller.addEventListener(« OnMediaPlaying »,this.mediaPlayingHandler)
    }else{this.controller.removeEventListener(« OnMediaPlaying »,this.mediaPlayingHandler)
    }},isFirstClip:function(b){if(this._firstClipIsNext){this._firstClipIsNext=false;
    return true
    }else{return false
    }},showHideOnFirstClip:function(l){this.log(« showHideOnFirstClip »);
    var h=l.baseClip.isAd;
    if(this.currentVESidecarTextTracks&&this.currentVESidecarTextTracks.length>0){var j;
    for(var n=0;
    n<this.currentVESidecarTextTracks.length;
    n++){var m=this.currentVESidecarTextTracks[n];
    if(m.show){j=m;
    break
    }}if(j&&!h){this.log("showingSidecarTextTracks and is not an ad, so show them");
    this.ve.showCaptions(j)
    }else{this.log("showingSidecarSubtitles: "+(j?j.language:"no showingSidecarSubtitles object")+", isAd:"+h);
    var k=this.ve.getShowingCaptions();
    if(k&&k.embedded){this.ve.showCaptions(k)
    }else{this.ve.hideCaptions(false)
    }if(h){this.log("storing lastSelectedTextTracks");
    var i=j?j:k;
    this.lastSelectedTextTracks=i;
    this.hideCaptionsWhenPlaying(true)
    }}}},contentClipToAdClip:function(j){var f=false;
    if(!j.baseClip.isAd){var i=false;
    for(var g=0;
    g<this.playlist.clips.length;
    g++){var h=this.playlist.clips[g];
    if(i){if(h.baseClip.isAd){f=true
    }else{this.log("next clip not an ad")
    }break
    }if(h.clipIndex==j.clipIndex&&h.URL==j.URL){i=true
    }}}return f
    },nativeControlsOnReleaseStart:function(g){this.log("iosOnReleaseStart");
    this.playlist=g.data;
    this._firstClipIsNext=true;
    var f;
    for(var e=0;
    e<this.playlist.baseClips.length;
    e++){var h=this.playlist.baseClips[e];
    if(!h.isAd){f=h.availableTextTracks;
    break
    }}this.setCaptions(f);
    if(!this.currentVETextTracks||this.currentVETextTracks.length<1){this.ve.hideCaptions(true)
    }else{this.loadCaptions()
    }},log:function(b){tpDebug("vesm: "+b)
    }});
    XMLLoader=Class.extend({init:function(b){this._requestContentType=b
    },load:function(r,k,p){var l;
    if(typeof XDomainRequest!=="undefined"&&r.indexOf(document.domain)// 0){for(var e=0;
    e<this["implements"].length;
    e++){if(!this.instanceOf(this["implements"][e])){throw new Error("Interface not fully implemented")
    }}}}j.prototype=h;
    j.constructor=j;
    j.extend=arguments.callee;
    return j
    }
    })();
    EventDispatcher=Class.extend({buildListenerChain:function(){if(!this.listenerChain){this.listenerChain={}
    }},addEventListener:function(d,c){if(!c instanceof Function){throw {message:"Listener isn't a function"}
    }this.buildListenerChain();
    if(!this.listenerChain[d]){this.listenerChain[d]=[c]
    }else{this.listenerChain[d].push(c)
    }},hasEventListener:function(b){if(this.listenerChain){return(typeof this.listenerChain[b]!="undefined")
    }else{return false
    }},removeEventListener:function(d,f){if(!this.hasEventListener(d)){return false
    }for(var e=0;
    e<this.listenerChain[d].length;
    e++){if(this.listenerChain[d][e]==f){this.listenerChain[d].splice(e,1)
    }}},dispatchEvent:function(h,f){this.buildListenerChain();
    if(!this.hasEventListener(h)){return false
    }for(var e=0;
    e<this.listenerChain[h].length;
    e++){var g=this.listenerChain[h][e];
    if(g.call){g.call(this,f)
    }}}});
    PDKComponent=Class.extend({_generateExportedMarkup:function(){return'


    },write:function(){document.write(this._generateExportedMarkup(this.id));
    try{var d=document.getElementById(this.id);
    return this._bindElement(d)
    }catch(c){}},bind:function(g){try{var h=document.getElementById(g);
    h.innerHTML=this._generateExportedMarkup();
    var f=document.getElementById(this.id);
    return this._bindElement(f)
    }catch(e){}},_bindElement:function(b){return this.container=b
    },init:function(){},doPluginStuff:function(){this.pluginManager=new PlugInManager(this.controller);
    for(prop in this){if(!prop.toLowerCase().match(/plugin|wrapper/)){continue
    }var q=this[prop];
    if(typeof q!= »string »){continue
    }var A;
    if(prop.toLowerCase().indexOf(« plugin »)==0){A=prop.substr(6)
    }else{if(prop.toLowerCase().indexOf(« wrapper »)==0){A=prop.substr(7)
    }}var s;
    var r=Number.MAX_VALUE;
    var D;
    var u;
    var y;
    var x;
    var v=new Object();
    var B=q.split(« | »);
    for(var w=0;
    w<B.length;
    w++){var z=B[w];
    if(z.indexOf("=")==-1){continue
    }var C=[z.substr(0,z.indexOf("=")),z.substr(z.indexOf("=")+1)];
    var t=C[0];
    var i=C[1];
    i=unescape(i);
    switch(t.toLowerCase()){case"type":s=i;
    break;
    case"priority":r=parseInt(i);
    break;
    case"url":D=i;
    break;
    case"suburl":u=i;
    break;
    case"runtime":y=i;
    break;
    case"videolayer":x=i;
    break;
    default:v[t]=i;
    break
    }}if(!D){return null
    }this.pluginManager.addPlugIn(A,s,r,D,u,v,null,y,x)
    }this.pluginManager.ready()
    },ready:function(){this.controller.registerFunction("getComponentSize",this,this.getComponentSize);
    this.controller.registerFunction("addChild",this,this.addChild);
    var b=this;
    tpTime("Component.ready until doPluginStuff timeout");
    setTimeout(function(){tpTimeEnd("Component.ready until doPluginStuff timeout");
    b.doPluginStuff()
    },0)
    },getComponentSize:function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight,id:this.id}
    },addChild:function(b){if(this.pluginLayer){this.pluginLayer.appendChild(b)
    }else{if(this.container){this.container.appendChild(b)
    }}},addPlugIn:function(k,p,i,j,l,m,n){if(!this.plugins){this.plugins=new Array()
    }var o={id:k,type:p,priority:i,url:j,subUrl:l,vars:m,plugIn:n};
    this.pluginManager.addPlugIn(o)
    }});
    oldController=EventDispatcher.extend({init:function(){this.functions=new Object();
    this.objects=new Object();
    this.pluginQueue=new Array();
    this.pluginScopes=new Array();
    this.waitingForPlugIn=false
    },trace:function(h,e,g){var f=$pdk.debug.trace(h,this.widgetId,e,g)||new Date();
    this.dispatchEvent("OnPdkTrace",{message:h,timestamp:(f.valueOf()),controllerId:this.widgetId,className:e,level:g})
    },dispatchEvent:function(c,d){this._super(c,{type:c,data:d})
    },doDispatchEvent:function(b){this.dispatchEvent(b.type,b.data)
    },removeEventListener:function(d,c){this._super(d,c)
    },addEventListener:function(d,c){this._super(d,c)
    },loadPlugIn:function(c,d){c.controller=d;
    this.pluginQueue.push(c);
    this.pluginScopes.push(d.componentId);
    if(this.waitingForPlugIn){return
    }this.loadNextPlugIn()
    },loadNextPlugIn:function(){if(this._pluginTimeout){clearTimeout(this._pluginTimeout);
    this._pluginTimeout=undefined
    }this.currentPlugIn=this.pluginQueue.shift();
    if(!this.queuedControllers){this.queuedControllers=[]
    }if(this.currentPlugIn){this.waitingForPlugIn=true;
    tpDebug("Trying to load plugin at "+this.currentPlugIn.url);
    var f=document.getElementsByTagName("head")[0];
    var j=document.createElement("script");
    j.type="text/javascript";
    j.onerror=function(){h.loadNextPlugIn()
    };
    j.src=this.currentPlugIn.url;
    var h=this;
    f.appendChild(j);
    this._pluginTimeout=setTimeout(function(){h.loadNextPlugIn()
    },5000)
    }else{var i=0;
    var g=this.queuedControllers.length;
    for(;
    i<g;
    i++){this.queuedControllers[i].dispatchEvent("OnPlugInsComplete",null,this.pluginScopes)
    }this.dispatchEvent("OnPlugInsComplete",null,this.pluginScopes);
    if(tpController){tpController.ready()
    }var i=0;
    for(;
    i<g;
    i++){this.queuedControllers[i].initializePlayback()
    }var h=this;
    setTimeout(function(){h.initializePlayback()
    },1)
    }},addChild:function(c,d){return this.callFunction("addChild",[c],d)
    },plugInLoaded:function(h,g){if(!this.queuedControllers){this.queuedControllers=[]
    }var e=false;
    for(var f in this.queuedControllers){if(this.currentPlugIn.controller.id==f.id){e=true;
    break
    }}if(e){this.queuedControllers.push(this.currentPlugIn.controller)
    }h.initialize({controller:this.currentPlugIn.controller,vars:this.currentPlugIn.vars,priority:this.currentPlugIn.priority});
    if(g){this.addChild(g,[this.currentPlugIn.controller.componentId])
    }this.dispatchEvent("OnPlugInLoaded",h,[this.currentPlugIn.controller.componentId]);
    this.waitingForPlugIn=false;
    this.loadNextPlugIn()
    },clickPlayButton:function(b){return this.callFunction("clickPlayButton",[],b)
    },clickPlayButtonNative:function(b){return this.callFunction("clickPlayButtonNative",[],b)
    },doParsePlaylist:function(e,f,d){return this.callFunction("doParsePlaylist",[e,f],d)
    },firstRange:function(c,d){this.callFunction("firstRange",[c],d)
    },getCurrentRange:function(b){this.callFunction("getCurrentRange",[],b)
    },getRelease:function(e,f,d){return this.callFunction("getRelease",[e,f],d)
    },getSubtitleLanguage:function(d,c){this.callFunction("getSubtitleLanguage",[d],c)
    },getSubtitleStyle:function(b){this.callFunction("getSubtitleStyle",[],b)
    },loadRelease:function(e,d,f){e=this.modRelease(e);
    return this.callFunction("loadRelease",[e,d],f)
    },loadReleaseURL:function(e,d,f){return this.callFunction("loadReleaseURL",[e,d],f)
    },loadReleaseURLNative:function(e,d,f){return this.callFunction("loadReleaseURLNative",[e,d],f)
    },parseRelease:function(h,f,e,g){return this.callFunction("parseRelease",[h,f,e],g)
    },loadJSON:function(f,g,e,h){return this.callFunction("loadJSON",[f,g,e],h)
    },supportsFullScreen:function(b){return this.callFunction("supportsFullScreen",[],b)
    },supportsFastForward:function(b){return this.callFunction("supportsFastForward",[],b)
    },supportsSeek:function(b){return this.callFunction("supportsSeek",[],b)
    },supportsMute:function(b){return this.callFunction("supportsMute",[],b)
    },supportsVolume:function(b){return this.callFunction("supportsVolume",[],b)
    },mute:function(c,d){return this.callFunction("mute",[c],d)
    },setVolume:function(c,d){return this.callFunction("setVolume",[c],d)
    },setPlaybackRate:function(c,d){return this.callFunction("setPlaybackRate",[c],d)
    },nextClip:function(b){return this.callFunction("nextClip",[],b)
    },nextRange:function(c,d){this.callFunction("nextRange",[c],d)
    },tryWritePlayer:function(b){return this.callFunction("tryWritePlayer",[],b)
    },pause:function(f,e,d){return this.callFunction("pause",[f,d],e)
    },pauseNative:function(c,d){return this.callFunction("pauseNative",[c],d)
    },playNext:function(f,e,d){return this.callFunction("playNext",[f,e],d)
    },playPrevious:function(c,d){this.callFunction("playPrevious",[c],d)
    },sendError:function(d,c){this.callFunction("sendError",[d],c)
    },previousClip:function(b){return this.callFunction("previousClip",[],b)
    },previousRange:function(c,d){this.callFunction("previousRange",[c],d)
    },refreshReleaseModel:function(r,j,p,o,q,l,k,n,m){if(p){p.globalDataType=this.getDataTypeName("Sort")
    }if(o){o.globalDataType=this.getDataTypeName("Range")
    }return this.callFunction("refreshReleaseModel",[r,j,p,o,q,l,n,m],k)
    },setAudioTrackByIndex:function(d,c){this.callFunction("setAudioTrackByIndex",[d],c)
    },setAudioTrackByLanguage:function(c,d){this.callFunction("setAudioTrackByLanguage",[c],d)
    },seekToPercentage:function(d,c){return this.callFunction("seekToPercentage",[d],c)
    },seekToPosition:function(d,c){return this.callFunction("seekToPosition",[d],c)
    },playPlaylist:function(c,d){return this.callFunction("playPlaylist",[c],d)
    },setRelease:function(e,d,f){e=this.modRelease(e);
    return this.callFunction("setRelease",[e,d],f)
    },setReleaseURL:function(e,d,f){return this.callFunction("setReleaseURL",[e,d],f)
    },setReleaseURLNative:function(e,d,f){return this.callFunction("setReleaseURLNative",[e,d],f)
    },setShowSubtitles:function(d,c){this.callFunction("setShowSubtitles",[d],c)
    },setSmil:function(d,c){this.callFunction("setSmil",[d],c)
    },setSubtitleLanguage:function(c,d){this.callFunction("setSubtitleLanguage",[c],d)
    },setSubtitleStyle:function(c,d){this.callFunction("setSubtitleStyle",[c],d)
    },setToken:function(e,f,d){this.callFunction("setToken",[e,f],d)
    },showFullScreen:function(c,d){return this.callFunction("showFullScreen",[c],d)
    },endRelease:function(b){return this.callFunction("endRelease",[],b)
    },getMediaArea:function(){var b=null;
    return this.callFunction("getMediaArea",[],b)
    },setMediaArea:function(c,d){this.callFunction("setMediaArea",[c],d)
    },getOverlayArea:function(g,f,h,e){return this.callFunction("getOverlayArea",[g,f,h],e)
    },getContentArea:function(b){return this.callFunction("getOverlayArea",[],b)
    },setOverlayArea:function(c,d){this.callFunction("setOverlayArea",[c],d)
    },getReleaseState:function(){return this.callFunction("getReleaseState",[])
    },getTimeSinceLastAd:function(b){return this.callFunction("getTimeSinceLastAd",[],b)
    },injectPlaylist:function(c,d){return this.callFunction("injectPlaylist",[c],d)
    },insertPlaylist:function(c,d){return this.callFunction("insertPlaylist",[c],d)
    },insertClip:function(c,d){return this.callFunction("insertClip",[c],d)
    },registerAdPlugIn:function(c){var d=null;
    return this.callFunction("registerAdPlugIn",[c],d)
    },registerClipWrapperPlugIn:function(c){var d=null;
    return this.callFunction("registerClipWrapperPlugIn",[c],d)
    },registerMetadataUrlPlugIn:function(f,e,d){return this.callFunction("registerMetadataUrlPlugIn",[f,e],d)
    },registerURLPlugIn:function(g,h,f){var e=null;
    return this.callFunction("registerURLPlugIn",[g,h,f],e)
    },setAds:function(c,d){return this.callFunction("setAds",[c],d)
    },addPlayerCard:function(o,k,i,l,j,m,p,n){this.callFunction("addPlayerCard",[o,k,i,l,j,m,p,n],n)
    },showPlayerCard:function(f,h,g,i,j){return this.callFunction("showPlayerCard",[f,h,g,i],j)
    },hidePlayerCard:function(e,f,d){this.callFunction("hidePlayerCard",[e,f],d)
    },showMenuCard:function(d,c){return this.callFunction("showMenuCard",[d],c)
    },checkIfEndCardExists:function(b){return this.callFunction("checkIfEndCardExists",[],b)
    },setClip:function(c){var d=null;
    return this.callFunction("setClip",[c],d)
    },setMetadataUrl:function(d,c){return this.callFunction("setMetadataUrl",[d],c)
    },setPlayerLayoutUrl:function(d,c){return this.callFunction("setPlayerLayoutUrl",[d],c)
    },setPlayerLayoutXml:function(d,c){return this.callFunction("setPlayerLayoutXml",[d],c)
    },setClipWrapper:function(d,c){return this.callFunction("setClipWrapper",[d],c)
    },wrapClip:function(f,d,e){return this.callFunction("wrapClip",[f,d],e)
    },initializePlayback:function(b){return this.callFunction("initializePlayback",[],b)
    },getPlaybackRate:function(){return this.callFunction("getPlaybackRate",[],scope)
    },endMedia:function(d,c){return this.callFunction("endMedia",[d,c])
    },getVideoProxy:function(b){return this.callFunction("getVideoProxy",[],b)
    },isFlashPlayer:function(c){var d=this.callFunction("isFlashPlayer",[],c);
    if(d===undefined){return true
    }else{return d
    }},isStandbyMode:function(){return this.callFunction("isStandbyMode",[])
    },isPrefetch:function(){return this.callFunction("isPrefetch",[])
    },markOffset:function(f,e,d){return this.callFunction("markOffset",[f,e,d])
    },resetRelease:function(b){return this.callFunction("resetRelease",[],b)
    },updateMediaTime:function(d,c){this.callFunction("updateMediaTime",[d],c)
    },updateClip:function(c,d){this.callFunction("updateClip",[c],d)
    },updatePlaylist:function(c,d){this.callFunction("updatePlaylist",[c],d)
    },writePlayer:function(d,e,f){return this.callFunction("writePlayer",[d,e],f)
    },setShowControls:function(d,f,e){this.callFunction("setShowControls",[d,f],e)
    },getDataTypeName:function(b){switch(b){case"AdPattern":return"com.theplatform.pdk.data::AdPattern";
    case"Banner":return"com.theplatform.pdk.data::Banner";
    case"BaseClip":return"com.theplatform.pdk.data::BaseClip";
    case"CallInfo":return"com.theplatform.pdk.communication::CallInfo";
    case"CategoryInfo":return"com.theplatform.pdk.data::CategoryInfo";
    case"Clip":return"com.theplatform.pdk.data::Clip";
    case"CommInfo":return"com.theplatform.pdk.communication::CommInfo";
    case"CustomData":return"com.theplatform.pdk.data::CustomData";
    case"CustomValue":return"com.theplatform.pdk.data::CustomValue";
    case"DispatchInfo":return"com.theplatform.pdk.communication::DispatchInfo";
    case"FunctionInfo":return"com.theplatform.pdk.communication::FunctionInfo";
    case"HandlerInfo":return"com.theplatform.pdk.communication::HandlerInfo";
    case"HyperLink":return"com.theplatform.pdk.data::HyperLink";
    case"MediaClick":return"com.theplatform.pdk.data::MediaClick";
    case"MediaFile":return"com.theplatform.pdk.data::MediaFile";
    case"MessageInfo":return"com.theplatform.pdk.communication::MessageInfo";
    case"MetricInfo":return"com.theplatform.pdk.data::MetricInfo";
    case"Overlay":return"com.theplatform.pdk.data::Overlay";
    case"PdkEvent":return"com.theplatform.pdk.events::PdkEvent";
    case"ProviderInfo":return"com.theplatform.pdk.data::ProviderInfo";
    case"Range":return"com.theplatform.pdk.data::Range";
    case"Rating":return"com.theplatform.pdk.data::Rating";
    case"Release":return"com.theplatform.pdk.data::Release";
    case"ReleaseInfo":return"com.theplatform.pdk.data::ReleaseInfo";
    case"ScopeInfo":return"com.theplatform.pdk.communication::ScopeInfo";
    case"Sort":return"com.theplatform.pdk.data::Sort";
    case"Subtitles":return"com.theplatform.pdk.data::Subtitles";
    case"TrackingUrl":return"com.theplatform.pdk.data::TrackingUrl";
    case"BandwidthPreferences":return"com.theplatform.pdk.data::BandwidthPreferences";
    case"Annotation":return"com.theplatform.pdk.data::Annotation"
    }},ready:function(){this.isHTML5Loading=false;
    this.checkMessageQueue()
    },callFunction:function(f,h,j,i){if(j==null&&this.scopes!=undefined){j=this.scopes.concat()
    }var g=this.functions[f];
    if(g){return this.functions[f].apply(this.objects[f],h)
    }else{if(tpController&&!i){return tpController.callFunction(f,h,j)
    }else{return null
    }}},doCallFunction:function(b){this.callFunction(b.name,b.args,b.scope)
    },registerFunction:function(e,f,g){var h=this.functions[e]===undefined;
    this.functions[e]=g;
    this.objects[e]=f;
    if(tpController){tpController.registerFunction(e,function(){return g.apply(f,arguments)
    },(this.scopes?this.scopes.concat():undefined),h)
    }},modRelease:function(d){if(d){d.globalDataType=this.getDataTypeName("Release");
    if(d.categories){d.categories=this.modCategories(d.categories)
    }if(d.thumbnails){for(var c=0;
    c<d.thumbnails.length;
    c++){d.thumbnails[c].globalDataType=this.getDataTypeName("MediaFile");
    if(d.thumbnails[c].customValues){d.thumbnails[c].customValues=this.modCustomValues(d.thumbnails[c].customValues)
    }}}if(d.customValues){d.customValues=this.modCustomValues(d.customValues)
    }if(d.metrics){for(var c=0;
    c<d.metrics.length;
    c++){d.metrics[c].globalDataType=this.getDataTypeName("MetricInfo")
    }}if(d.provider){d.provider.globalDataType=this.getDataTypeName("ProviderInfo");
    if(d.provider.customValues){d.provider.customValues=this.modCustomValues(d.provider.customValues)
    }}if(d.ratings){for(var c=0;
    c<d.ratings.length;
    c++){d.ratings[c].globalDataType=this.getDataTypeName("Rating")
    }}if(d.URL){d.url=d.URL
    }d.mediaPID=d.mediaPid?d.mediaPid:"";
    delete d.mediaPid
    }return d
    },modCustomValues:function(d){for(var c=0;
    c<d.length;
    c++){d[c].globalDataType=this.getDataTypeName("CustomValue")
    }return d
    },modCategories:function(d){for(var c=0;
    c<d.length;
    c++){d[c].globalDataType=this.getDataTypeName("CategoryInfo")
    }return d
    },modClip:function(d){if(d){d.globalDataType=this.getDataTypeName("Clip");
    var c=d.baseClip;
    if(!c){c=new Object()
    }if(d.banners){c.banners=d.banners
    }if(d.overlays){c.overlays=d.overlays
    }d.baseClip=this.modBaseClip(c);
    if(d.chapter){d.chapter.globalDataType=this.getDataTypeName("Chapter")
    }}return d
    },modBaseClip:function(c){if(!c){c=new Object()
    }c.globalDataType=this.getDataTypeName("BaseClip");
    if(c.moreInfo){c.moreInfo.globalDataType=this.getDataTypeName("HyperLink");
    if(c.moreInfo.clickTrackingUrls){c.moreInfo.clickTrackingUrls=this.modTracking(c.moreInfo.clickTrackingUrls)
    }}if(c.banners){for(var d=0;
    d<c.banners.length;
    d++){c.banners[d].globalDataType=this.getDataTypeName("Banner");
    if(c.banners[d].clickTrackingUrls){c.banners[d].clickTrackingUrls=this.modTracking(c.banners[d].clickTrackingUrls)
    }}}if(c.overlays){for(var d=0;
    d<c.overlays.length;
    d++){c.overlays[d].globalDataType=this.getDataTypeName("Overlay");
    if(c.overlays[d].clickTrackingUrls){c.overlays[d].clickTrackingUrls=this.modTracking(c.overlays[d].clickTrackingUrls)
    }}}if(c.availableSubtitles){for(var d=0;
    d<c.availableSubtitles;
    d++){c.availableSubtitles[d].globalDataType=this.getDataTypeName("Subtitles")
    }}if(c.categories){c.categories=this.modCategories(c.categories)
    }if(c.adPattern){c.adPattern.globalDataType=this.getDataTypeName("AdPattern")
    }if(c.trackingURLs){c.trackingURLs=this.modTracking(c.trackingURLs)
    }if(c.contentCustomData){c.contentCustomData.globalDataType=this.getDataTypeName("CustomData")
    }if(c.ownerCustomData){c.ownerCustomData.globalDataType=this.getDataTypeName("CustomData")
    }if(c.outletCustomData){c.outletCustomData.globalDataType=this.getDataTypeName("CustomData")
    }return c
    },modTracking:function(d){for(var c=0;
    c<d.length;
    c++){d.globalDataType=this.getDataTypeName("TrackingUrl")
    }return d
    }});
    if(window.tpController===undefined){tpController=new oldController()
    }else{var tempController=tpController;
    tpController=new oldController();
    for(var prop in tempController){tpController[prop]=tempController[prop]
    }if(window["$pdk"]!==undefined){$pdk.controller=tpController
    }}ComponentController=oldController.extend({init:function(f,e,d){this.id=f;
    this.component=e;
    this.widgetId=this.component&&this.component.widgetId?this.component.widgetId:this.id;
    if(typeof(d)==="object"){this.scopes=[f].concat(d)
    }else{if(typeof(d)==="string"){this.scopes=[f,d]
    }else{this.scopes=[f,"default"]
    }}this._super()
    },getComponentSize:function(b){return this.callFunction("getComponentSize",[],b)
    },dispatchEvent:function(c,d){if(this.scopes&&this.scopes.length){tpController.dispatchEvent(c,d,this.scopes.concat(),this.widgetId)
    }else{tpController.dispatchEvent(c,d,null,this.widgetId)
    }},removeEventListener:function(d,c){if(this.scopes&&this.scopes.length){tpController.removeEventListener(d,c,this.scopes.concat())
    }else{tpController.removeEventListener(d,c)
    }},addEventListener:function(d,c){if(this.scopes&&this.scopes.length){tpController.addEventListener(d,c,this.scopes.concat())
    }else{tpController.addEventListener(d,c)
    }},getProperty:function(c){var d=this.component[c];
    if(d===undefined){d=this.component[c.toLowerCase()]
    }return d
    },setProperty:function(d,c){this.component[d]=c
    }});
    function printStackTrace(){var i=[];
    var r=false;
    try{q.dont.exist+=0
    }catch(o){if(o.stack){var e=o.stack.split("\n");
    for(var q=0,p=e.length;
    q<p;
    q++){if(e[q].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){i.push(e[q])
    }}i.shift();
    r=true
    }else{if(window.opera&&o.message){var e=o.message.split("\n");
    for(var q=0,p=e.length;
    q<p;
    q++){if(e[q].match(/^\s*[A-Za-z0-9\-_\$]+\(/)){var m=e[q];
    if(e[q+1]){m+="at"+e[q+1];
    q++
    }i.push(m)
    }}i.shift();
    r=true
    }}}if(!r){var s=arguments.callee.caller;
    while(s){var n=s.toString();
    var t=n.substring(n.indexOf("function")+8,n.indexOf("("))||"anonymous";
    i.push(t);
    s=s.caller
    }}output(i)
    }function output(b){alert(b.join("\n\n"))
    }ViewController=ComponentController.extend({init:function(d,f,e){this._super(f,e)
    },instantiateCard:function(b){return this.callFunction("instantiateCard",[b])
    },showCard:function(l,j,i,g,k,h){this.callFunction("showCard",[l,j,i,g,k,h])
    },hideCard:function(d,c){this.callFunction("hideCard",[d,c])
    },getCard:function(d,c){return this.callFunction("getCard",[d,c])
    },getCurrentCard:function(b){return this.callFunction("getCurrentCard",[b])
    }});
    PlayerController=ViewController.extend({init:function(c,d){this._super("player",c,d)
    },getCurrentPlaylist:function(){return this.callFunction("getCurrentPlaylist",[])
    },getMainPlaylist:function(){return this.callFunction("getMainPlaylist",[])
    },getReleaseState:function(){return this.callFunction("getReleaseState",[])
    },getMuteState:function(){return this.callFunction("getMuteState",[])
    },getFullScreenState:function(){return this.callFunction("getFullScreenState",[])
    },registerPlaylistPlugIn:function(c,d){var d=null;
    return this.callFunction("registerPlaylistPlugIn",[c],d)
    },playlistReplaced:function(c,d){return this.callFunction("playlistReplaced",[c],d)
    },loadLayer:function(d,f,e){return this.callFunction("loadLayer",[d,f,e])
    },hasLayer:function(d,c){return this.callFunction("hasLayer",[d,c])
    },callLayerFunction:function(f,e,d){return this.callFunction("callLayerFunction",[f,e,d])
    }});
    if($pdk.bootloaderVersion!==null&&typeof($pdk.bootloaderVersion)==="object"){if("5"!=$pdk.bootloaderVersion.major||"8"!=$pdk.bootloaderVersion.minor||"6"!=$pdk.bootloaderVersion.revision){alert("Error: Bootloader Version and PDK-JS Version do not match.\n\nSomething is seriously wrong.")
    }}ComponentTypes=new Object();
    ComponentTypes.CATEGORY_LIST="categoryList";
    ComponentTypes.CATEGORY_MODEL="categoryModel";
    ComponentTypes.CLIP_INFO="clipInfo";
    ComponentTypes.COMM_MANAGER="commManager";
    ComponentTypes.HEADER="header";
    ComponentTypes.JAVASCRIPT="javascript";
    ComponentTypes.NAVIGATION="navigation";
    ComponentTypes.PLAYER="player";
    ComponentTypes.RELEASE_LIST="releaseList";
    ComponentTypes.RELEASE_MODEL="releaseModel";
    ComponentTypes.SEARCH="search";
    ComponentTypes.EXTERNAL="external";
    ComponentTypes.LOCAL_ALL="localAll";
    ComponentTypes.GLOBAL_ALL="globalAll";
    Rectangle=Class.extend({init:function(e,g,h,f){this._x=e?e:0;
    this._y=g?g:0;
    this._width=h?h:0;
    this._height=f?f:0;
    this._top=this._y;
    this._bottom=this._y+this._height;
    this._left=this._x;
    this._right=this._x+this._width
    },clone:function(){return new Rectangle(this._x,this._y,this._width,this._height)
    },x:function(b){if(b!=undefined){if(b<0){b=0
    }this._x=b;
    this._left=b;
    this._right=b+this._width
    }return this._x
    },y:function(b){if(b!=undefined){if(b<0){b=0
    }this._y=b;
    this._top=b;
    this._bottom=b+this._height
    }return this._y
    },width:function(b){if(b!=undefined){if(b<0){b=0
    }this._width=b;
    this._right=b+this._x
    }return this._width
    },height:function(b){if(b!=undefined){if(b<0){b=0
    }this._height=b;
    this._bottom=b+this._y
    }return this._height
    },top:function(b){if(b!=undefined){if(b<0){b=0
    }if(b<this._y){this._height=0
    }else{this._height=this._bottom-b
    }this._top=this._y=b
    }return this._top
    },left:function(b){if(b!=undefined){if(b<0){b=0
    }if(b<this._x){this._width=0
    }else{this._width=this._right-b
    }this._left=this._x=b
    }return this._left
    },bottom:function(b){if(b!=undefined){if(b<0){b=0
    }if(b<this._y){this._bottom=this._y=b;
    this._height=0
    }else{this._bottom=b;
    this._height=b-this._y
    }}return this._bottom
    },right:function(b){if(b!=undefined){if(b<0){b=0
    }if(b<this._x){this._right=this._x=b;
    this._width=0
    }else{this._right=b;
    this._width=b-this._x
    }}return this._right
    }});
    var PlayerEvent=new Object();
    PlayerEvent.OnUpdateOverlays="OnUpdateOverlays";
    PlayerEvent.OnCheckAdFailed="OnCheckAdFailed";
    PlayerEvent.OnStandbyRelease="OnStandbyRelease";
    PlayerEvent.OnMediaAreaChanged="OnMediaAreaChanged";
    PlayerEvent.onContentAreaChanged="onContentAreaChanged";
    PlayerEvent.OnOverlayAreaChanged="OnOverlayAreaChanged";
    PlayerEvent.OnReleaseStop="OnReleaseStop";
    PlayerEvent.OnBandwidthPreferencesSet="OnBandwidthPreferencesSet";
    PlayerEvent.OnFormShown="OnFormShown";
    PlayerEvent.OnFlashFullScreen="OnPlayerFullScreen";
    PlayerEvent.OnExternalFullScreen="OnExternalFullScreen";
    PlayerEvent.OnPlayerPause="OnPlayerPause";
    PlayerEvent.OnPlayerUnPause="OnPlayerUnPause";
    PlayerEvent.OnNetConnectionClosed="OnNetConnectionClosed";
    PlayerEvent.OnTrackActivated="OnTrackActivated";
    PlayerEvent.OnPlugInsAboveControlsChanged="OnPlugInsAboveControlsChanged";
    PlayerEvent.OnDebug="OnDebug";
    PlayerEvent.OnVideoSized="OnVideoSized";
    PlayerEvent.OnRelatedContentIdsReceived="OnRelatedContentIdsReceived";
    $pdk.ns("$pdk.managers");
    $pdk.managers.TrackingUrl={TRIGGER_TYPE_PERCENTAGE:0,TRIGGER_TYPE_MILLISECONDS:1,TRIGGER_TYPE_EVENT:2,EVENT_MUTE:0,EVENT_PAUSE:1,EVENT_REPLAY:2,EVENT_FULL_SCREEN:3,EVENT_STOP:4,EVENT_START:5,EVENT_UNPAUSE:6,EVENT_CLOSE:7,EVENT_UNMUTE:8,EVENT_ACCEPTINVITATION:9,EVENT_CLICK:10,EVENT_COMPLETE:11,EVENT_VIEWABILITY:12};
    $pdk.managers.TrackingUrlManager=$pdk.extend(function(){},{_controller:null,_trackingURLs:null,_trackingURLMap:{},_trackingClipMap:{},_eventTracking:null,_urlQueue:[],_contentClipIndexesByClipId:{},_contentClipBoundaries:[],_videoViewCumulativeTimes:[0,5,10,15,30,60,120,180,300],_playlistHasSsa:false,_handleMediaCompleteFired:false,CHAPTER_INDEX_DELIMITER:"_||_",constructor:function(d,e){this._controller=d;
    this._container=e;
    this.init();
    var f=this;
    window.addEventListener("scroll",function(a){f.checkViewability()
    });
    window.addEventListener("resize",function(a){f.checkViewability()
    });
    window.addEventListener("focus",function(a){f.checkViewability()
    });
    window.addEventListener("blur",function(a){f.checkViewability()
    })
    },init:function(){var b=this;
    this._eventTracking=new $pdk.managers.EventTracking(this._controller);
    this._eventTracking.addEventListener("OnSendUrl",function(a){b.trackEvent(a)
    });
    this._controller.addEventListener("OnReleaseStart",function(a){b.handleReleaseStart(a)
    });
    this._controller.addEventListener("OnMediaLoadStart",function(a){b.handleMediaLoadStart(a)
    });
    this._controller.addEventListener("OnMediaClick",function(a){b.handleMediaClick(a)
    });
    this._controller.addEventListener("OnMediaStart",function(a){b.handleMediaStart(a)
    });
    this._controller.addEventListener("OnMediaEnd",function(a){b.handleMediaEnd(a)
    });
    this._controller.addEventListener("OnMediaComplete",function(a){b.handleMediaComplete(a)
    });
    this._controller.addEventListener("OnReleaseEnd",function(a){b.handleReleaseEnd(a)
    })
    },handleViewableImpression:function(){if(this._clip&&this._isAd&&this._trackingURLs){for(var b=0;
    b0){if((this._trackingURLs[b].triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_EVENT)&&(this._trackingURLs[b].triggerValue===$pdk.managers.TrackingUrl.EVENT_VIEWABILITY)){this.trackProgress(this._trackingURLs[b])
    }}}}this._viewabilityFired=true
    },handleMediaClick:function(h){try{var g=this._clip.baseClip.moreInfo.clickTrackingUrls;
    if(g){var e=0;
    var f=g.length;
    for(;
    e0){this.gatherContentClipInfo(b.data.clips)
    }},determineIfPlaylistHasSsa:function(f){var d=f.metaTags;
    if(d){for(var e=0;
    e<d.length;
    e++){if(d[e].name==="manifestServiceUrl"){this._playlistHasSsa=true;
    break
    }}}},gatherContentClipInfo:function(g){this._contentClipIndexesByClipId={};
    this._contentClipBoundaries=[];
    var j=0;
    for(var f=0;
    f<g.length;
    f++){var h=g[f];
    if(!h.baseClip.isAd){this._contentClipIndexesByClipId[h.id]=j;
    if(!this._contentClipIndexesByClipId.firstContentClipId){this._contentClipIndexesByClipId.firstContentClipId=h.id
    }j++;
    var i={startTime:h.startTime,endTime:h.endTime};
    this._contentClipBoundaries.push(i)
    }}this._contentClipIndexesByClipId.numberOfContentClips=j
    },handleMediaLoadStart:function(c){this._clip=c.data;
    this._isAd=c.data.baseClip.isAd;
    this._trackingURLs=this.getTrackingURLs(this._clip);
    this.handlePossibleBreakStartAndEndFromEmptyAdBreak();
    var d=function(a,b){return a==b
    };
    if(d(this._clip.id,this._contentClipIndexesByClipId.firstContentClipId)){this._isPrerollTracking=false
    }},handlePossibleBreakStartAndEndFromEmptyAdBreak:function(){if(this._clip&&!this._isAd&&this._trackingURLs){this.fireEmptyAdBreakStartBreakEndBeacons()
    }},isLastContentClip:function(b){return(b&&!b.baseClip.isAd&&this._contentClipIndexesByClipId[b.id]==this._contentClipIndexesByClipId.numberOfContentClips-1)
    },fireEmptyAdBreakStartBreakEndBeacons:function(){for(var c=0;
    c0&&this.matchUrlToClip(d)){if(d.triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_EVENT){if(d.triggerValue===$pdk.managers.TrackingUrl.EVENT_START){this.removeEmptyAdBreakDelimiter(d);
    this.trackProgress(d)
    }else{if(d.triggerValue===$pdk.managers.TrackingUrl.EVENT_COMPLETE&&this._handleMediaCompleteFired){this.removeEmptyAdBreakDelimiter(d);
    this.trackProgress(d)
    }}if(this.isVideoViewTracking(d.URL)){this.startVideoViewTracking(d)
    }}}}},matchUrlToClip:function(i){var n=this._contentClipIndexesByClipId[this._clip.id];
    var m=this.CHAPTER_INDEX_DELIMITER+n+this.CHAPTER_INDEX_DELIMITER;
    var j=i.URL.indexOf(m);
    var k=j>-1;
    var l=i.URL.indexOf(this.CHAPTER_INDEX_DELIMITER+ »POSTROLL »+this.CHAPTER_INDEX_DELIMITER);
    var h=l>-1;
    if(h){i.triggerValue=$pdk.managers.TrackingUrl.EVENT_COMPLETE
    }else{i.triggerValue=$pdk.managers.TrackingUrl.EVENT_START
    }return k
    },removeEmptyAdBreakDelimiter:function(d){var c=d.URL.indexOf(this.CHAPTER_INDEX_DELIMITER);
    d.URL=d.URL.substr(0,c)
    },isVideoViewTracking:function(f){var g=this.getQueryString(« cn »,f);
    if(!g||g!= »videoView »){return false
    }var h=this.getQueryString(« init »,f);
    if(!h||h!= »1″){return false
    }var e=(f.indexOf(« :// »)>-1)?f.split(« / »)[2]:f.split(« / »)[0];
    e=e.split(« : »)[0];
    return e.indexOf(« fwmrm.net »)>-1
    },getQueryString:function(g,e){var h=new RegExp(« [?&] »+g+ »=([^&#]*) », »i »);
    var f=h.exec(e);
    return f?f[1]:null
    },replaceQueryParameter:function(l,n,j,m){var i=new RegExp(« [?] »+l+ »=([^&#]*) », »i »);
    var k=new RegExp(« [?&] »+l+ »=([^&#]*) », »i »);
    var h=n.match(i)? »? »: »& »;
    return n.replace(k,h+j+ »= »+m)
    },startVideoViewTracking:function(d){if(!this._onVideoViewMediaPlayingListener){var c=this;
    this._videoViewTime={url:this.replaceQueryParameter(« init »,d.URL, »init », »0″),cumulativeSeconds:0,lastTime:0,lastSent:this._videoViewCumulativeTimes[0],lastCumulativeSent:0,nextToSend:this._videoViewCumulativeTimes[1]};
    this._onVideoViewSeekListener=function(a){c.handleVideoViewSeek(a)
    };
    this._controller.addEventListener(« OnMediaSeek »,this._onVideoViewSeekListener);
    this._onVideoViewMediaPlayingListener=function(a){c.handleVideoViewMediaPlaying(a)
    };
    this._controller.addEventListener(« OnMediaPlaying »,this._onVideoViewMediaPlayingListener)
    }},endVideoViewTracking:function(){if(this._onVideoViewMediaPlayingListener){this._controller.removeEventListener(« OnMediaPlaying »,this._onVideoViewMediaPlayingListener);
    this._controller.removeEventListener(« OnMediaSeek »,this._onVideoViewSeekListener);
    this._onVideoViewMediaPlayingListener=null;
    this._onVideoViewSeekListener=null;
    this._videoViewTime={}
    }},handleVideoViewSeek:function(b){if(!this._isAd){this._videoViewTime.lastTime=0
    }},handleVideoViewMediaPlaying:function(c){if(this._isAd){return
    }if(this._videoViewTime.lastTime&&this.isValidMediaPlaying(c.data.currentTime,this._videoViewTime.lastTime,c.data.mediaTime)){this._videoViewTime.cumulativeSeconds+=(c.data.currentTime-this._videoViewTime.lastTime)/1000;
    if(this._videoViewTime.cumulativeSeconds>=this._videoViewTime.lastCumulativeSent+this._videoViewTime.nextToSend){this.sendNextVideoView(this._videoViewTime.nextToSend);
    this._videoViewTime.lastSent=this._videoViewTime.nextToSend;
    this._videoViewTime.lastCumulativeSent+=this._videoViewTime.nextToSend;
    var d=this._videoViewCumulativeTimes.indexOf(this._videoViewTime.lastSent);
    this._videoViewTime.nextToSend=d<this._videoViewCumulativeTimes.length-1?this._videoViewCumulativeTimes[d+1]:this._videoViewCumulativeTimes[d]
    }}this._videoViewTime.lastTime=c.data.currentTime
    },isValidMediaPlaying:function(e,g,f){var h=false;
    if(!this.isFromScrubberDrag(e,g)){if(($pdk.isSafari||$pdk.isIOS)&&this._playlistHasSsa){h=this.isWithinContentClipBoundaries(f)
    }else{h=true
    }}return h
    },isFromScrubberDrag:function(d,f){var e=d-f;
    return e750
    },isWithinContentClipBoundaries:function(c){for(var d=0;
    d=this._contentClipBoundaries[d].startTime&&c0)&&(f-this._viewabilityStartTime>2000)){this.handleViewableImpression()
    }},startViewableTimer:function(){this._viewabilityStartTime=Date.now();
    var b=this;
    setTimeout(function(){b.checkViewability()
    },2000)
    },stopViewableTimer:function(){this._viewabilityStartTime=0
    },isViewable:function(){var l=this._container;
    var o=0;
    var j=0,k=0;
    var m=this._container;
    while(m){j+=m.offsetLeft;
    k+=m.offsetTop;
    m=m.offsetParent
    }var p=Math.min(0,(window.scrollX+window.innerWidth-j-l.offsetWidth)/l.offsetWidth);
    var n=Math.min(0,(window.scrollY+window.innerHeight-k-l.offsetHeight)/l.offsetHeight);
    var e=1+p+n;
    return document.hasFocus()&&(e>=0.5)
    },getTrackingURLs:function(j){var g=j.baseClip.isAd;
    var h=g?j.baseClip.releaseID:j.id;
    var k=this;
    var l=function(){return g&&k._trackingClipMap[h].baseClip===j.baseClip
    };
    var i=function(){return !g&&k._trackingClipMap[h]
    };
    if(this._trackingClipMap[h]&&(l()||i())){tpDebug(« Use existing Clip’s trackingURLs », »TrackingUrlMgr »,tpConsts.INFO);
    return this._trackingURLMap[h]
    }this._trackingClipMap[h]=j;
    this._trackingURLMap[h]=j.baseClip.trackingURLs;
    return this._trackingURLMap[h]
    },resetTrackingURLs:function(){this._trackingClipMap={};
    this._trackingURLMap={}
    },doTracking:function(i){if(!this._trackingURLs){return
    }var k;
    var l;
    var j;
    if(!i){i={};
    i.percentComplete=100;
    i.currentTime=1000000;
    j=5
    }else{j=100000/(!this._isAd&&i.durationAggregate?i.durationAggregate:i.duration)
    }l=(!this._isAd&&i.currentTimeAggregate)?i.currentTimeAggregate:i.currentTime;
    k=(!this._isAd&&i.percentCompleteAggregate)?i.percentCompleteAggregate:i.percentComplete;
    var g;
    for(var h=0;
    h0&&!this._eventTracking.trackingUrlIsTaggedForSpecificClip(g)){if((g.triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_PERCENTAGE)&&(k>=g.triggerValue)&&(k=g.triggerValue&&l<(g.triggerValue+5000)){this.trackProgress(g)
    }else{if(g.triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_EVENT&&g.triggerValue==$pdk.managers.TrackingUrl.EVENT_COMPLETE&&k==100){this.trackBreakEnd(g)
    }}}}}},trackBreakEnd:function(b){this.trackProgress(b);
    if(this._isPrerollTracking&&this.isVideoViewTracking(b.URL)){this.startVideoViewTracking(b)
    }},trackProgress:function(b){b.hasFired=true;
    this.sendUrl(b.URL)
    },trackEvent:function(b){this.sendUrl(b.data)
    },sendUrl:function(b){this._urlQueue.push(b);
    if(!this._urlQueueWaiting){this.sendNextUrl()
    }},sendNextUrl:function(){var f=this._urlQueue.shift();
    if(!f||this.urlWasNotDefined(f)){return
    }if(f.indexOf("ord=")===-1){var g=100000+Math.floor(Math.random()*900001);
    f+=(f.indexOf("?")===-1?"?":"&");
    f+="ord="+g
    }f+=(f.indexOf("?")===-1?"?":"&");
    f+="source=pdk";
    this._urlQueueWaiting=true;
    var h=new Image();
    var e=this;
    h.onload=function(a){e.completeHandler(a)
    };
    h.onerror=function(a){e.completeHandler(a)
    };
    h.src=f+"&"
    },urlWasNotDefined:function(b){return b==="undefined"
    },completeHandler:function(b){tpDebug("Tracking url sent: "+(b.target).src,"TrackingUrlMgr",tpConsts.INFO);
    this._urlQueueWaiting=false;
    this.sendNextUrl()
    }});
    $pdk.ns("$pdk.managers");
    $pdk.managers.EventTracking=$pdk.extend(EventDispatcher,{_controller:null,_urls:null,constructor:function(b){this._controller=b;
    this.init()
    },init:function(){var b=this;
    this._controller.addEventListener("OnMediaStart",function(a){b.onMediaStart(a)
    })
    },onMediaStart:function(c){var d=c.data;
    if(d.baseClip.trackingURLs){this.setup(d.baseClip.trackingURLs)
    }if(d.baseClip.impressionUrls){this.trackImpression(d)
    }},trackImpression:function(h){var g=h.baseClip;
    var e=g.impressionUrls;
    if(g.impressionUrls&&g.impressionUrls.length){for(var f=0;
    f<g.impressionUrls.length;
    f++){this.dispatchEvent("OnSendUrl",{type:"OnSendUrl",data:g.impressionUrls[f]})
    }g.impressionUrls=[];
    this._controller.updateClip(h)
    }},setup:function(e){this._urls=[];
    if(this._listeners){this.removeListeners()
    }this._listeners={};
    var f;
    for(var h=0;
    h<e.length;
    h++){f=e[h];
    if(f.triggerType==$pdk.managers.TrackingUrl.TRIGGER_TYPE_EVENT){this.doSetup(f)
    }}if(this._urls[$pdk.managers.TrackingUrl.EVENT_START]){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_START])
    }if(this._urls.length){var g=this;
    this._listeners.OnMediaEnd=function(a){g.onMediaEnd(a)
    };
    this._controller.addEventListener("OnMediaEnd",this._listeners.OnMediaEnd)
    }},doSetup:function(d){if(this.trackingUrlIsTaggedForSpecificClip(d)){return
    }var c=this;
    switch(d.triggerValue){case $pdk.managers.TrackingUrl.EVENT_START:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_START,d);
    break;
    case $pdk.managers.TrackingUrl.EVENT_STOP:break;
    case $pdk.managers.TrackingUrl.EVENT_PAUSE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_PAUSE,d);
    this._listeners.OnMediaPause=function(a){c.onMediaPause(a)
    };
    this._controller.addEventListener("OnMediaPause",this._listeners.OnMediaPause);
    break;
    case $pdk.managers.TrackingUrl.EVENT_UNPAUSE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_UNPAUSE,d);
    this._listeners.OnMediaUnpause=function(a){c.onMediaUnpause(a)
    };
    this._controller.addEventListener("OnMediaUnpause",this._listeners.OnMediaUnpause);
    break;
    case $pdk.managers.TrackingUrl.EVENT_REPLAY:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_REPLAY,d);
    this._listeners.OnMediaSeek=function(a){c.onMediaSeek(a)
    };
    this._controller.addEventListener("OnMediaSeek",this._listeners.OnMediaSeek);
    break;
    case $pdk.managers.TrackingUrl.EVENT_MUTE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_MUTE,d);
    this._listeners.OnMute=function(a){c.onMute(a)
    };
    this._controller.addEventListener("OnMute",this._listeners.OnMute);
    break;
    case $pdk.managers.TrackingUrl.EVENT_UNMUTE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_UNMUTE,d);
    this._listeners.OnUnMute=function(a){c.onUnMute(a)
    };
    this._controller.addEventListener("OnMute",this._listeners.OnUnMute);
    break;
    case $pdk.managers.TrackingUrl.EVENT_FULL_SCREEN:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_FULL_SCREEN,d);
    this._listeners.OnShowFullScreen=function(a){c.onShowFullScreen(a)
    };
    this._controller.addEventListener("OnShowFullScreen",this._listeners.OnShowFullScreen);
    break;
    case $pdk.managers.TrackingUrl.EVENT_CLICK:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_CLICK,d);
    this._listeners.OnMediaClick=function(a){c.onMediaClick(a)
    };
    this._controller.addEventListener("OnMediaClick",this._listeners.OnMediaClick);
    break;
    case $pdk.managers.TrackingUrl.EVENT_COMPLETE:this.addUrlToEvent($pdk.managers.TrackingUrl.EVENT_COMPLETE,d);
    this._listeners.OnMediaComplete=function(a){c.onMediaComplete(a)
    };
    this._controller.addEventListener("OnMediaComplete",this._listeners.OnMediaComplete);
    break
    }},trackingUrlIsTaggedForSpecificClip:function(b){return typeof b.URL==="string"&&b.URL.match(/_\|\|_\d+_\|\|_/)!==null
    },removeListeners:function(){this._controller.removeEventListener("OnMediaEnd",this._listeners.OnMediaEnd);
    this._controller.removeEventListener("OnMediaPause",this._listeners.OnMediaPause);
    this._controller.removeEventListener("OnMediaUnpause",this._listeners.OnMediaUnpause);
    this._controller.removeEventListener("OnMediaSeek",this._listeners.OnMediaSeek);
    this._controller.removeEventListener("OnMute",this._listeners.OnMute);
    this._controller.removeEventListener("OnMute",this._listeners.OnUnMute);
    this._controller.removeEventListener("OnShowFullScreen",this._listeners.OnShowFullScreen);
    this._controller.removeEventListener("OnMediaClick",this._listeners.OnMediaClick);
    this._controller.removeEventListener("OnMediaComplete",this._listeners.OnMediaComplete)
    },addUrlToEvent:function(c,d){if(!this._urls[c]){this._urls[c]=[]
    }this._urls[c].push(d)
    },onReleaseStop:function(b){if(this._urls[$pdk.managers.TrackingUrl.EVENT_STOP]&&this._urls[$pdk.managers.TrackingUrl.EVENT_STOP].length){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_STOP])
    }},onMediaEnd:function(b){this.cleanup()
    },onMediaPause:function(b){this._controller.removeEventListener("OnMediaPause",this._listeners.OnMediaPause);
    this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_PAUSE])
    },onMediaUnpause:function(b){this._controller.removeEventListener("OnMediaUnpause",this._listeners.OnMediaUnpause);
    this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_UNPAUSE])
    },onMediaSeek:function(f){var d=f.data;
    var e=d.end;
    if(e.currentTime<=3000){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_REPLAY])
    }},onMute:function(b){if(b.data){this._controller.removeEventListener("OnMute",this._listeners.OnMute);
    this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_MUTE])
    }},onUnMute:function(b){if(!b.data){this._controller.removeEventListener("OnMute",this._listeners.OnUnMute);
    this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_UNMUTE])
    }},onShowFullScreen:function(c){var d=c.data;
    if(d){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_FULL_SCREEN])
    }},onMediaClick:function(b){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_CLICK])
    },onMediaComplete:function(b){this.sendTrackingEvent(this._urls[$pdk.managers.TrackingUrl.EVENT_COMPLETE])
    },cleanup:function(){this.removeListeners()
    },destroy:function(){this.cleanup()
    },sendTrackingEvent:function(f){if(!f){return
    }var e;
    for(var d=0;
    d-1&&navigator.userAgent.indexOf(« AppleWebKit »)>-1&&navigator.userAgent.toLowerCase().indexOf(« chrome »)===-1);
    var n=this._pbm.video;
    var l=this._pbm.videoEngine;
    var m=n.parentNode.parentNode;
    if(m.webkitRequestFullScreen&&!j){tpDebug(« WebKit fullscreen API is apparently supported »);
    if((document.webkitIsFullScreen||m.webkitDisplayingFullscreen)&&!p){document.webkitCancelFullScreen()
    }else{if(p){try{this.handlerFired=false;
    if(!this.fsChangeHandler){this.fsChangeHandler=function(){o._isFullScreen=((document.webkitIsFullScreen&&o._requestedFullScreen)||n.webkitDisplayingFullscreen||m.webkitDisplayingFullscreen)==true;
    tpDebug(« got webkitfullscreenchange event, isFullscreen is « +o._isFullScreen);
    if(!o._isFullScreen){m.removeEventListener(« webkitfullscreenchange »,this.fsChangeHandler)
    }if(o._requestedFullScreen){if(!o._isFullScreen){o._requestedFullScreen=false
    }o.sendEvt()
    }}
    }var o=this;
    this._requestedFullScreen=true;
    m.removeEventListener(« webkitfullscreenchange »,this.fsChangeHandler);
    m.addEventListener(« webkitfullscreenchange »,this.fsChangeHandler);
    setTimeout(this.fsChangeHandler,3000);
    m.webkitRequestFullScreen();
    o.sendEvt()
    }catch(k){this._requestedFullScreen=false;
    m.removeChild(blocker);
    tpDebug(« Switching to full screen from Javascript is not supported in this browser unless it’s initiated by a user click. »,this.controller.id, »FullScreenManager », »error »);
    return
    }}}return
    }else{if(m.mozRequestFullScreen){tpDebug(« Moz fullscreen API is apparently supported »);
    if(document.mozFullScreen&&!p){try{document.mozCancelFullScreen()
    }finally{if(document.mozFullScreen){tpDebug(« Couldn’t exit with mozCancelFullScreen. Trying DOM manipulation… »);
    var e=m.parentNode;
    e.removeChild(m);
    e.appendChild(m);
    tpDebug(« Done trying DOM manipulation »);
    document.removeEventListener(« mozfullscreenchange »,this.callback);
    this.callback=undefined;
    this.sendEvt()
    }}}else{if(p){try{this._requestedFullScreen=true;
    m.mozRequestFullScreen()
    }catch(k){tpDebug(« Switching to full screen from Javascript is not supported in this browser unless it’s initiated by a user click. »,this.controller.id, »FullScreenManager », »error »);
    return
    }this.sendEvt();
    var o=this;
    document.removeEventListener(« mozfullscreenchange »,this.callback);
    this.callback=function(){o._isFullScreen=document.mozFullScreen&&o._requestedFullScreen;
    if(!o._isFullScreen){document.removeEventListener(« mozfullscreenchange »,o.callback);
    o.callback=undefined
    }if(o._requestedFullScreen){if(!o._isFullScreen){o._requestedFullScreen=false
    }o.sendEvt()
    }};
    document.addEventListener(« mozfullscreenchange »,this.callback)
    }}return
    }}if(!this._isIFrame&&m.msRequestFullscreen){tpDebug(« MS fullscreen API is apparently supported »);
    if((document.msFullscreenElement)&&!p){document.msExitFullscreen()
    }else{if(p){try{this.handlerFired=false;
    var o=this;
    if(!this.fsChangeHandler){this.fsChangeHandler=function(){o._isFullScreen=(document.msFullscreenElement!=null);
    tpDebug(« got msfullscreenchange event, isFullscreen is « +o._isFullScreen);
    if(!o._isFullScreen){document.removeEventListener(« MSFullscreenChange »,o.fsChangeHandler)
    }if(o._requestedFullScreen){if(!o._isFullScreen){o._requestedFullScreen=false
    }o.sendEvt()
    }}
    }this._requestedFullScreen=true;
    document.removeEventListener(« MSFullscreenChange »,this.fsChangeHandler);
    document.addEventListener(« MSFullscreenChange »,this.fsChangeHandler);
    setTimeout(this.fsChangeHandler,3000);
    m.msRequestFullscreen();
    o.sendEvt()
    }catch(k){m.removeChild(blocker);
    tpDebug(« Switching to full screen from Javascript is not supported in this browser unless it’s initiated by a user click. »,this.controller.id, »FullScreenManager », »error »);
    return
    }}}return
    }else{if(this._enableFullWindow||($pdk.isIE&&this._isIFrame)){tpDebug(« No fullscreen API available, using full window »);
    if(!this.playerContainerStyle){this.playerContainerStyle={}
    }this._isFullWindow=false;
    if(p){this.playerContainerStyle.position=m.style.position;
    this.playerContainerStyle.top=m.style.top;
    this.playerContainerStyle.left=m.style.left;
    this.playerContainerStyle.bottom=m.style.bottom;
    this.playerContainerStyle.right=m.style.right;
    this.playerContainerStyle.marginTop=m.style.marginTop;
    this.playerContainerStyle.marginLeft=m.style.marginLeft;
    this.playerContainerStyle.marginBottom=m.style.marginBottom;
    this.playerContainerStyle.marginRight=m.style.marginRight;
    this.playerContainerStyle.zIndex=$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.zIndex;
    this.playerContainerStyle.overflowX=$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowX;
    this.playerContainerStyle.overflowY=$pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowY;
    $pdk.jQuery(m).parents(« .tpPlayer »)[0].style.zIndex=10000;
    m.style.position= »fixed »;
    m.style.top= »0px »;
    m.style.left= »0px »;
    m.style.bottom= »0px »;
    m.style.right= »0px »;
    m.style.marginTop= »0px »;
    m.style.marginLeft= »0px »;
    m.style.marginBottom= »0px »;
    m.style.marginRight= »0px »;
    $pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowX= »visible »;
    $pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowY= »visible »;
    this._isFullWindow=true
    }else{m.style.position=this.playerContainerStyle.position;
    m.style.top=this.playerContainerStyle.top;
    m.style.left=this.playerContainerStyle.left;
    m.style.bottom=this.playerContainerStyle.bottom;
    m.style.right=this.playerContainerStyle.right;
    m.style.marginTop=this.playerContainerStyle.marginTop;
    m.style.marginLeft=this.playerContainerStyle.marginLeft;
    m.style.marginBottom=this.playerContainerStyle.marginBottom;
    m.style.marginRight=this.playerContainerStyle.marginRight;
    m.style.zIndex=this.playerContainerStyle.zIndex;
    $pdk.jQuery(m).parents(« .tpPlayer »)[0].style.zIndex=this.playerContainerStyle.zIndex;
    $pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowX=this.playerContainerStyle.overflowX;
    $pdk.jQuery(m).parents(« .tpPlayer »)[0].style.overflowY=this.playerContainerStyle.overflowY
    }if(this._isIFrame){if(p){$pdk.controller.requestIFrameFullWindow()
    }else{$pdk.controller.cancelIFrameFullWindow()
    }this._isFullWindow=p
    }this._isFullScreen=p;
    var o=this;
    setTimeout(function(){o.sendEvt()
    },10);
    return
    }else{try{tpDebug(« Trying to set VideoEngine fullscreen to « +p);
    if(!this.changeListener){var o=this;
    this.changeListener=function(a){o.fullscreenChange(a)
    };
    this._pbm.videoEngine.addEventListener(« FULLSCREEN »,this.changeListener)
    }this._requestedFullScreen=p;
    l.setFullScreen(p)
    }catch(k){tpDebug(« VideoEngine won’t support fullscreen »);
    return
    }}}this.sendEvt()
    },sendEvt:function(){tpDebug(« FullScreen is now: »+this._isFullScreen);
    this._controller.dispatchEvent(« OnShowFullScreen »,this._isFullScreen)
    },getFullScreenState:function(){var b;
    if(tpIsAndroid()||this._pbm.video.webkitDisplayingFullscreen||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||this._isFullWindow){b=true
    }else{b=false
    }if(b!=this._isFullScreen){this._isFullScreen=b;
    this.sendEvt()
    }return this._isFullScreen
    }});
    $pdk.ns(« $pdk.plugin »);
    $pdk.plugin.MetadataUrlManager=$pdk.extend(function(){},{constructor:function(b){this._plugins=[];
    this._currentQueue=[];
    this._context={complete:false,found:false};
    this._controller=b;
    this._controller.registerFunction(« registerMetadataUrlPlugIn »,this,this.registerMetadataUrlPlugIn);
    this._controller.registerFunction(« setMetadataUrl »,this,this.setMetadataUrl);
    this._controller.registerFunction(« setUrl »,this,this.setUrl)
    },setUrl:function(f,e,d){this._context={releaseUrl:f,isPreview:e,callback:d,complete:false,found:false};
    this._currentQueue=this._plugins.concat();
    if(this._currentQueue.length===0){d(f);
    return true
    }else{if(!this._processNextPlugin()){d(f);
    return true
    }else{return false
    }}},setMetadataUrl:function(b){if(this._currentQueue.length===0){if(!this._context.complete){this._context.releaseUrl=b;
    this._context.callback(b);
    this._context.complete=true
    }}else{this._context.releaseUrl=b;
    if(!this._processNextPlugin()){this._context.callback(this._context.releaseUrl);
    this._context.complete=true
    }}},registerMetadataUrlPlugIn:function(c,d){if(typeof(c.rewriteMetadataUrl)!== »function »){throw new Error(‘Attempt to register MetadataUrlPlugIn with non-conforming interface (plugin method « rewriteMetadataUrl » does not exist or is not a real method)’)
    }else{if(c.rewriteMetadataUrl.length!==2){throw new Error(‘Attempt to register MetadataUrlPlugIn with non-conforming interface (« rewriteMetadataUrl » method does not take 2 parameters)’)
    }}this._plugins.push({plugin:c,priority:Number(d)});
    this._plugins=this._sortPluginsByPriority(this._plugins)
    },_processNextPlugin:function(){var c=false,d;
    while(!c&&this._currentQueue.length>0){d=this._currentQueue.shift();
    c=d.plugin.rewriteMetadataUrl(this._context.releaseUrl,this._context.isPreview)
    }this._context.found=c?true:this._context.found;
    return c
    },_sortPluginsByPriority:function(b){return b.sort(function(a,e){return a.priority-e.priority
    })
    }});
    AdManager=Class.extend({adPatternInfo:{cookieName: » »,cookiePrefix: »tpPdk »,adPolicy:0,mediaCount:0,chapterCount:0},countedRelease:false,init:function(d){this.controller=d;
    d.registerFunction(« setAds »,this,this.setAds);
    d.registerFunction(« registerAdPlugIn »,this,this.registerAdPlugIn);
    d.registerFunction(« getTimeSinceLastAd »,this,this.getTimeSinceLastAd);
    this.defaultAdPattern=d.getProperty(« adPattern »);
    this.timeSinceLastAd=0;
    this.plugins=new Array();
    var c=this;
    this.getAdPolicy(d.component.releaseUrl);
    this.controller.addEventListener(« OnMediaStart »,function(a){c.onMediaStart.apply(c,[a])
    });
    this.controller.addEventListener(« OnReleaseStart »,function(a){c.onReleaseStart.apply(c,[a])
    })
    },setAds:function(b){if(b&&(tpIsIOS()||tpIsAndroid()&&this.controller.isPrefetch())){b.isAd=true
    }if(!b||(b.clips&&b.clips.length===0)){this.controller.dispatchEvent(« __internal__AdLoadFailure »)
    }this.controller.insertPlaylist(b)
    },registerAdPlugIn:function(f,e,h){this.plugins.push({adPlugIn:f,adType:e,priority:h});
    function g(a,b){if(a.priorityb.priority){return 1
    }else{return 0
    }}}this.plugins.sort(g)
    },getTimeSinceLastAd:function(){return this.timeSinceLastAd
    },isAd:function(c){if(c.baseClip.isAd){return true
    }else{var d=this.adPlugInsIsAd(c);
    c.baseClip.isAd=d;
    return d
    }},checkAd:function(d){tpDebug(« We have « +this.plugins.length+ » ad plugins to check »);
    for(var e=0;
    e<this.plugins.length;
    e++){var f=this.plugins[e].adPlugIn.checkAd.apply(this.plugins[e].adPlugIn,[d]);
    if(f){return true
    }}return false
    },adPlugInsIsAd:function(c){for(var d=0;
    d1){this.adPatternInfo.mediaCount=q[0];
    this.adPatternInfo.chapterCount=q[1]
    }if(isNaN(this.adPatternInfo.chapterCount)){this.adPatternInfo.chapterCount=0
    }var l=r;
    if(!n&&!this.adPatternInfo.mediaCount){this.adPatternInfo.mediaCount=0;
    l=j
    }if(n&&!this.adPatternInfo.chapterCount){this.adPatternInfo.chapterCount=0;
    l=j
    }var m=(n?this.adPatternInfo.chapterCount:this.adPatternInfo.mediaCount);
    if(m<l){return false
    }}if(n){this.adPatternInfo.chapterCount=0
    }else{this.adPatternInfo.mediaCount=0
    }return true
    },setCookie:function(h,k,g,i){var j=new Date();
    j.setTime(j.getTime()+(g*3600*1000));
    var l=escape(k)+((g==null)?"":"; expires="+j.toUTCString())+((i==null)?"":"; path="+i);
    document.cookie=h+"="+l
    },getCookie:function(e){var h=document.cookie;
    var g=h.indexOf(" "+e+"=");
    if(g==-1){g=h.indexOf(e+"=")
    }if(g==-1){h=null
    }else{g=h.indexOf("=",g)+1;
    var f=h.indexOf(";",g);
    if(f==-1){f=h.length
    }h=unescape(h.substring(g,f))
    }return h
    }});
    /*!
    * Bowser – a browser detector
    * https://github.com/ded/bowser
    * MIT License | (c) Dustin Diaz 2014
    */
    !function(d,c){$pdk._browserCheck=d(c())
    }(function(b){return function(p){if(!p||p.length==0){return false
    }var a,l,r,o,m,q,i;
    for(var n=0;
    n

    =r))&&(!hasOS||(hasOS&&b[o.toLowerCase()]))&&(!hasOSversion||(hasOSversion&&parseFloat(b.osversion)>=m))&&(!q||(q&&b.device==i))){return true
    }}return false
    }
    },function(){var d=true;
    function e(x){function t(g){var h=x.match(g);
    return(h&&h.length>1&&h[1])|| » »
    }var b=t(/(ipod|iphone|ipad)/i).toLowerCase(),c=/like android/i.test(x),w=!c&&/android/i.test(x),s=/CrOS/.test(x),v=t(/edge\/(\d+(\.\d+)?)/i),y=t(/version\/(\d+(\.\d+)?)/i),q=/tablet/i.test(x),z=!q&&/[^-]mobi/i.test(x),a;
    if(/opera|opr/i.test(x)){a={name: »Opera »,opera:d,version:y||t(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}
    }else{if(/windows phone/i.test(x)){a={name: »Windows Phone »,windowsphone:d};
    if(v){a.msedge=d;
    a.version=v
    }else{a.msie=d;
    a.version=t(/iemobile\/(\d+(\.\d+)?)/i)
    }}else{if(/msie|trident/i.test(x)){a={name: »Internet Explorer »,msie:d,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}
    }else{if(s){a={name: »Chrome »,chromeBook:d,chrome:d,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}
    }else{if(/chrome.+? edge/i.test(x)){a={name: »Microsoft Edge »,msedge:d,version:v}
    }else{if(/chrome|crios|crmo/i.test(x)){a={name: »Chrome »,chrome:d,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}
    }else{if(b){a={name:b== »iphone »? »iPhone »:b== »ipad »? »iPad »: »iPod »};
    if(y){a.version=y
    }}else{if(/firefox|iceweasel/i.test(x)){a={name: »Firefox »,firefox:d,version:t(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)};
    if(/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(x)){a.firefoxos=d
    }}else{if(/silk/i.test(x)){a={name: »Amazon Silk »,silk:d,version:t(/silk\/(\d+(\.\d+)?)/i)}
    }else{if(w){a={name: »Android »,version:y}
    }else{if(/blackberry|\bbb\d+/i.test(x)||/rim\stablet/i.test(x)){a={name: »BlackBerry »,blackberry:d,version:y||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}
    }else{if(/safari/i.test(x)){a={name: »Safari »,safari:d,version:y}
    }else{a={}
    }}}}}}}}}}}}if(!a.msedge&&/(apple)?webkit/i.test(x)){a.name=a.name|| »Webkit »;
    a.webkit=d;
    if(!a.version&&y){a.version=y
    }}else{if(!a.opera&&/gecko\//i.test(x)){a.name=a.name|| »Gecko »;
    a.gecko=d;
    a.version=a.version||t(/gecko\/(\d+(\.\d+)?)/i)
    }}if(!a.msedge&&(w||a.silk)){a.android=d
    }else{if(b){a[b]=d;
    a.ios=d
    }}var u= » »;
    if(a.windowsphone){u=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i)
    }else{if(b){u=t(/os (\d+([_\s]\d+)*) like mac os x/i);
    u=u.replace(/[_\s]/g, ». »)
    }else{if(w){u=t(/android[ \/-](\d+(\.\d+)*)/i)
    }else{if(a.webos){u=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i)
    }else{if(a.blackberry){u=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i)
    }else{if(a.bada){u=t(/bada\/(\d+(\.\d+)*)/i)
    }else{if(a.tizen){u=t(/tizen[\/\s](\d+(\.\d+)*)/i)
    }}}}}}}if(u){a.osversion=u
    }var r=u.split(« . »)[0];
    if(q||b== »ipad »||(w&&(r==3||(r==4&&!z)))||a.silk){a.tablet=d
    }else{if(z||b== »iphone »||b== »ipod »||w||a.blackberry||a.webos||a.bada){a.mobile=d
    }}a.device=(a.tablet||a.mobile)?d:false;
    return a
    }var f=e(typeof navigator!== »undefined »?navigator.userAgent: » »);
    f._detect=e;
    return f
    });
    tpCategoryList=PDKComponent.extend({_generateExportedMarkup:function(){return’


    },init:function(f,d,e){this.width=d;
    this.height=e;
    this.id=f;
    this.pretty=!navigator.userAgent.match(/MSIE 8/)&&!navigator.userAgent.match(/MSIE 7/)&&!navigator.userAgent.match(/MSIE 6/);
    this.ALL={id: » »,value: »all »,order: »1″,title: »All »,fullTitle: »All »};
    this.MOST_POPULAR={id: » »,value: »mostPopular »,order: »2″,title: »Most Popular »,fullTitle: »MostPopular »};
    this.FAVORITES={id: » »,value: »favorites »,order: »3″,title: »Favorites »,fullTitle: »Favorites »};
    this.TOP_RATED={id: » »,value: »topRated »,order: »4″,title: »Top Rated »,fullTitle: »TopRated »};
    this.RELATED={id: » »,value: »related »,order: »5″,title: »Related Items »,fullTitle: »Related »};
    if($pdk._isDevMode){this.pretty=false
    }this.controller=new ComponentController(f);
    this.deferredController=$pdk.shell.Registry.getInstance().getShells().get(f)._deferredController;
    this.eventQueue=[]
    },initialize:function(){var b=this;
    if(this.scopes){this.controller.scopes=[this.id].concat(this.scopes.split(« , »))
    }else{this.controller.scopes=[this.id, »default »]
    }if(this.allChoiceLabel){this.ALL.title=this.allChoiceLabel
    }if(this.mostPopularChoiceLabel){this.MOST_POPULAR.title=this.mostPopularChoiceLabel
    }if(this.favoritesChoiceLabel){this.FAVORITES.title=this.favoritesChoiceLabel
    }if(this.topRatedChoiceLabel){this.TOP_RATED.title=this.topRatedChoiceLabel
    }if(this.relatedChoiceLabel){this.RELATED.title=this.relatedChoiceLabel
    }this.controller.addEventListener(« OnRefreshCategoryModel »,function(){b.handleCategoryModelRefreshed.apply(b,arguments)
    });
    this.deferredController.addEventListener(« OnRefreshCategoryModel »,function(){b.handleCategoryModelRefreshed.apply(b,arguments)
    });
    this.controller.addEventListener(« OnRefreshReleaseModel »,function(){b.handleReleaseModelRefreshed.apply(b,arguments)
    });
    this.deferredController.addEventListener(« OnRefreshReleaseModel »,function(){b.handleReleaseModelRefreshed.apply(b,arguments)
    });
    this.currentIndex=-1
    },write:function(c){if(this.autoLoad===undefined){this.autoLoad=true
    }if(c){this.container=c
    }else{document.write(‘

    ‘);
    this.container=document.getElementById(this.id);
    this.container.style.width=this.width;
    this.container.style.height=this.height
    }this.style=document.createElement(« style »);
    var d=document.getElementsByTagName(« head »)[0];
    this.style.setAttribute(« type », »text/css »);
    d.appendChild(this.style);
    this.initialize()
    },_bindElement:function(b){if(this.autoLoad==null){this.autoLoad=true
    }this.container=b;
    this.container.style.width=this.width;
    this.container.style.height=this.height;
    tpController.ready();
    return this.container
    },categoryUrlsAreEqual:function(d,e,f){d=d.replace(/(.*)\?.*/, »$1″);
    e=e.replace(/(.*)\?.*/, »$1″);
    return d===e||d.indexOf(f)>=0
    },setTileSelected:function(f){var e=-1;
    this.currentCategory=f;
    if(!this.sortedEntries){return
    }for(var h=0;
    h=0||b.indexOf(« ?sort=updated%7Cdesc »)>=0){return true
    }else{return false
    }},handleReleaseModelRefreshed:function(b){if(b.data.category){this.setTileSelected(b.data.category)
    }else{if(b.data.search){this.setTileSelected(null)
    }else{if(b.data.requestUrl&&this.isMostPopularRequest(b.data.requestUrl)){this.setTileSelected(this.mostPopularChoiceLabel)
    }else{this.setTileSelected(this.allChoiceLabel)
    }}}},handleCategoryModelRefreshed:function(L){if(this.paging){this.eventQueue.push(L);
    return
    }this.loading=false;
    $pdk.jQuery(this.loadingIndicator).stop();
    $pdk.jQuery(this.loadingIndicator).remove();
    var W=L.data;
    var h=(this.feed&&this.feed.search!==W.search?true:false);
    var J;
    var V;
    var H;
    var a;
    if(this.feed&&this.feed.range&&W&&W.range){if(W.entries.length>0){this.paging=true
    }if(this.feed.range.startIndexW.range.startIndex){this.animateForward=false
    }}}else{this.animateForward=false
    }this.feed=W;
    this.loadedTiles=[];
    this.numTiles=W.entries.length;
    if(!this.currentPage||h||!this.pretty){this.refresh();
    this.currentPage=null;
    this.previousPage=null
    }var X=-1;
    var N=-1;
    var Q=0;
    if(this.hasoverlay== »true »){var O=document.createElement(« div »);
    O.className= »tpCategoryListOverlay »;
    this.container.appendChild(O);
    Q=O.clientHeight
    }var D=document.createElement(« ul »);
    if(this.flow== »horizontal »){D.className= »tpMenu »
    }else{D.className= »tpList »
    }this.container.appendChild(D);
    $pdk.jQuery(D).css(« margin-top »,parseInt($pdk.jQuery(D).css(« margin-top »))+Q);
    D.ontouchstart=function(b){this.startX=b.changedTouches[0].pageX;
    this.startY=b.changedTouches[0].pageY
    };
    D.ontouchend=function(b){if(this.startX&&((this.startX-b.changedTouches[0].pageX)>100)){$pdk.controller.nextRange()
    }else{if(this.startX&&((b.changedTouches[0].pageX-this.startX)>100)){$pdk.controller.previousRange()
    }}};
    this.items=[];
    var i,E,a,w,F,R,U,H,M;
    var T=($pdk.jQuery(D).innerWidth());
    var G=($pdk.jQuery(D).innerHeight());
    var P={};
    for(var I=0;
    I<W.entries.length;
    I++){P[W.entries[I].id]=W.entries[I]
    }this.sortedEntries=[];
    for(var I=0;
    I<W.entries.length;
    I++){if(P[W.entries[I].parentId]){}else{this.sortedEntries.push(W.entries[I])
    }}this.sortedEntries.sort(function(b,c){if(parseInt(b.order,10)==parseInt(c.order,10)){if(b.titlec.title){return 1
    }else{return 0
    }}}else{return parseInt(b.order,10)-parseInt(c.order,10)
    }});
    if(this.allChoiceIndex>0){this.sortedEntries.splice(this.allChoiceIndex-1,0,this.ALL)
    }if(this.mostPopularChoiceIndex>0){this.sortedEntries.splice(this.mostPopularChoiceIndex-1,0,this.MOST_POPULAR)
    }if(this.favoritesChoiceIndex>0){this.sortedEntries.splice(this.favoritesChoiceIndex-1,0,this.FAVORITES)
    }if(this.topRatedChoiceIndex>0){this.sortedEntries.splice(this.topRatedChoiceIndex-1,0,this.TOP_RATED)
    }for(var I=0;
    I$pdk.jQuery(D).offset().top+$pdk.jQuery(D).innerHeight()){this.items.pop();
    D.removeChild(i);
    break
    }else{if($pdk.jQuery(i).offset().left+$pdk.jQuery(i).width()>$pdk.jQuery(D).offset().left+$pdk.jQuery(D).innerWidth()){this.items.pop();
    D.removeChild(i);
    break;
    if(!this.more){}}}}var K=this;
    setTimeout(function(){K.doInitialLoad(W)
    },1);
    if(this.style&&!this.createdColorizationStyles){this.createdColorizationStyles=true;
    var S= » »;
    if(this.itembackgroundcolor){S+= »# »+this.id+ ».tpCategoryList>ul .tpCategory, ul# »+this.id+ ».tpCategoryList .tpCategory { background-color: # »+this.itembackgroundcolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList>ul .tpCategory .tpMetadata, ul# »+this.id+ ».tpCategoryList .tpCategory { background-color: # »+this.itembackgroundcolor.substr(2)+ »; } »
    }if(this.itemframecolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategory a { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpShine { background-color: # »+this.itemframecolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpShine { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList ul { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList ol { border-color: # »+this.itemframecolor.substr(2)+ »; } »
    }if(this.textframecolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpMetadata { border-color: # »+this.textframecolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategory a .tpMetadata .tpGroup { border-color: # »+this.textframecolor.substr(2)+ »; } »
    }if(this.textframeselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected .tpMetadata { border-color: # »+this.textframeselectedcolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected a .tpMetadata .tpGroup { border-color: # »+this.textframeselectedcolor.substr(2)+ »; } »
    }if(this.textcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory a { color: # »+this.textcolor.substr(2)+ »; } »
    }if(this.thumbnailframecolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpThumbnail { border-color: # »+this.thumbnailframecolor.substr(2)+ »; } »
    }if(this.thumbnailbackgroundcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpThumbnail { background-color: # »+this.thumbnailbackgroundcolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpThumbnail img { background-color: # »+this.thumbnailbackgroundcolor.substr(2)+ »; } »
    }if(this.thumbnailpaddingcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory .tpThumbnail { background-color: # »+this.thumbnailpaddingcolor.substr(2)+ »; } »
    }if(this.framecolor){}if(this.texthighlighthovercolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover .tpShine { background-color: # »+this.texthighlighthovercolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover .tpShine { border-color: # »+this.texthighlighthovercolor.substr(2)+ »; } »
    }if(this.texthovercolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover a { color: # »+this.texthovercolor.substr(2)+ »; } »
    }if(this.texthighlighthovercolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover a .tpMetadata .tpGroup { border-color: # »+this.texthighlighthovercolor.substr(2)+ » !important; } »
    }if(this.thumbnailhighlighthovercolor){S+= »# »+this.id+ ».tpCategoryList .tpCategory:hover a .tpThumbnail { border-color: # »+this.thumbnailhighlighthovercolor.substr(2)+ » !important; } »
    }if(this.itemshineselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected .tpShine { background-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected .tpShine { border-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »
    }if(this.textselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected a { color: # »+this.textselectedcolor.substr(2)+ »; } »
    }if(this.texthighlightselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected a .tpMetadata .tpGroup { border-color: # »+this.texthighlightselectedcolor.substr(2)+ » !important; } »
    }if(this.thumbnailhighlightselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected a .tpThumbnail { border-color: # »+this.thumbnailhighlightselectedcolor.substr(2)+ » !important; } »
    }if(this.itemshineselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected:hover .tpShine { background-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »;
    S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected:hover .tpShine { border-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »
    }if(this.textselectedcolor){S+= »# »+this.id+ ».tpCategoryList .tpCategorySelected:hover a { color: # »+this.textselectedcolor.substr(2)+ »; } »
    }if(this.backgroundcolor&&this.itembackgroundcolor&&this.framecolor){S+= ».tpCategoryList ::-webkit-scrollbar { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    S+= ».tpCategoryList ::-webkit-scrollbar-track { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    S+= ».tpCategoryList ::-webkit-scrollbar-thumb { background-color: # »+this.itembackgroundcolor.substr(2)+ »; border-color: # »+this.framecolor.substr(2)+ »}\n »;
    S+= ».tpCategoryList ::-moz-scrollbar { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    S+= ».tpCategoryList ::-moz-scrollbar-track { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    S+= ».tpCategoryList ::-moz-scrollbar-thumb { background-color: # »+this.itembackgroundcolor.substr(2)+ »; border-color: # »+this.framecolor.substr(2)+ »}\n »
    }if(this.style.styleSheet){this.style.styleSheet.cssText=S
    }else{this.style.appendChild(document.createTextNode(S))
    }}if(this.currentCategory){this.currentIndex=this.setTileSelected(this.currentCategory)
    }},doInitialLoad:function(b){},disable:function(){if(tpIsIPhone()||tpIsAndroid()){return
    }if(!this.blocker){this.blocker=document.createElement(« div »);
    this.blocker.style.width= »100% »;
    this.blocker.style.height= »100% »;
    this.blocker.style.position= »absolute »;
    this.blocker.style.top= »0″;
    this.blocker.style.left= »0″;
    this.blocker.style.background= »black »;
    this.blocker.style.opacity= »0.75″;
    this.blocker.style.filter= »alpha(opacity=75) »;
    this.blocker.innerHTML= » « ;
    this.blocker.style.zIndex= »500″;
    this.container.appendChild(this.blocker)
    }this.blocker.style.display= » »;
    var b=this.container.childNodes;
    for(child in b){if(child.style){child.style.opacity= »0.75″;
    child.style.filter= »alpha(opacity=75) »
    }}},enable:function(){tpDebug(« Doing enable »);
    try{if(this.blocker){this.blocker.style.display= »none »
    }var c=this.container.childNodes;
    for(child in c){if(child.style){child.style.opacity= » »;
    child.style.filter= » »
    }}}catch(d){tpDebug(« enabled() threw an error with « +d.message+ » on « +d.lineNumber)
    }},output:function(c){var d= » »;
    for(prop in c){d+=prop+ »: « +c[prop]+ »\n »
    }alert(d)
    }});
    CategoryList=tpCategoryList;
    $pdk.ns(« $pdk.classes »);
    $pdk.classes.ChallengeDataWrapper=$pdk.extend(function(){},{constructor:function(e,f){this.controller=e;
    this.cd=this.challengeData(f);
    tpDebug(« challengeDataWrapper constructed », »ChallengeDataWrapper »,e.id,tpConsts.DEBUG);
    var d=this;
    e.addEventListener(« OnSetToken »,function(a){d.onSetToken(a)
    });
    e.addEventListener(« OnMediaLoadStart »,function(a){d.onMediaLoadStart(a)
    });
    e.addEventListener(« OnReleaseStart »,function(a){d.onReleaseStart(a)
    });
    e.addEventListener(« OnReleaseEnd »,function(a){d.onReleaseEnd(a)
    });
    e.addEventListener(« OnPlugInsComplete »,function(a){d.onPluginsComplete(a)
    });
    e.registerFunction(« setLicenseServer »,this,this.setLicenseServer);
    e.registerFunction(« setFairPlayCertUrl »,this,this.setFairPlayCertUrl);
    e.registerFunction(« getChallengeData »,this,this._getChallengeData);
    e.registerFunction(« setChallengeData »,this,this._setChallengeData);
    this.currentClipProtected=false;
    this.currentClipLicensed=false
    },setLicenseServer:function(c,d){this.cd.setLicenseServer(c,d)
    },setFairPlayCertUrl:function(b){this.cd.setFairPlayCertUrl(b)
    },setClip:function(b){this.currentClip=b;
    this.cd.setMediaData(b.baseClip.security);
    this.cd.flush()
    },preloadClip:function(b){return this.cd.preload(b)
    },_getChallengeData:function(){return this.cd.cd
    },_setChallengeData:function(){if(this.currentClip){this.cd.flush()
    }},onSetToken:function(b){if(b.data.type== »urn:theplatform:auth:token »){this.cd.setToken(b.data.token)
    }},onPluginsComplete:function(f){var d=this._getLicenseServers(this.controller.component);
    for(var e=0;
    e<d.length;
    e++){this.setLicenseServer(d[e].security,d[e].url)
    }this.setFairPlayCertUrl(this._getFairPlayCertUrl(this.controller.component))
    },onMediaLoadStart:function(g){var f=g.data;
    var h=f.baseClip.security;
    var e=(f.isAd===false||f.baseClip.isAd===false);
    if(e||h){this.currentClip=f;
    this.cd.setMediaData(h)
    }},onReleaseStart:function(j){this.currentClipLicensed=false;
    this.currentClipProtected=false;
    var g=j.data;
    var e=g.mediaPID;
    var h=g.accountID;
    var i=g.releasePID;
    this.cd.setMediaData(null,i,e,h)
    },onReleaseEnd:function(b){this.cd.clearMediaData()
    },mediaProtected:function(){if(!this.currentClipProtected){this.currentClipProtected=true;
    this.controller.dispatchEvent("OnMediaProtected",this.currentClip)
    }},mediaLicense:function(){if(!this.currentClipLicensed){this.currentClipLicensed=true;
    this.controller.dispatchEvent("OnMediaLicense",this.currentClip)
    }},licenseError:function(c){if(!this.currentClip){return
    }var d={location:this.controller.id,context:null,clip:this.currentClip,endRelease:true,message:c.message,friendlyMessage:c.details,security:c.security,keySystem:c.keySystem,globalDataType:"com.theplatform.pdk.data::LicenseError"};
    tpDebug("There was a security error acquiring a "+c.keySystem+" license for clip: "+this.currentClip.URL+" :: "+c.details,"ChallengeDataWrapper",this.controller.id,tpConsts.WARN);
    this.currentClip=null;
    this.controller.sendError(d)
    },_getLicenseServers:function(f){var e=[];
    for(var g in f){if(g.indexOf("licenseserver")===0){var h=f[g].split("|");
    e.push({security:h[0],url:h[1]})
    }}return e
    },_getFairPlayCertUrl:function(d){var e;
    for(var f in d){if(f.indexOf("fairplaycerturl")===0){e=d[f]
    }}return e
    },challengeData:function(b){return new $pdk.classes.ChallengeData(b,this,this.controller.getProperty("mpx"))
    }});
    $pdk.classes.ChallengeData=$pdk.extend(function(){},{constructor:function(j,h,i){this.videoEngine=j;
    this.wrapper=h;
    this.mpx=i;
    var g={widevine:"//widevine.entitlement."+i+"/wv/web/ModularDrm?form=json&schema=1.0&token=&account=http://access.auth. »+i+ »/data/Account/ »,fairplay: »//fairplay.entitlement. »+i+ »/fpls/web/FairPlay?form=json&schema=1.0&token=&account=http://access.auth. »+i+ »/data/Account/ »,playready: »//playready.entitlement.next. »+i+ »/playready/rightsmanager.asmx?form=json&schema=1.0&auth=&account=http://access.auth. »+i+ »/data/Account/&releasePid= »};
    this.cd={licenseServers:g,token: » »,security: » »,releasePid: » »,mediaId: » »,accountId: » »,event:{}};
    var f=this;
    this.videoEngine.addEventListener(« MEDIA_PROTECTED »,function(a){f.onMediaProtected(a)
    });
    this.videoEngine.addEventListener(« MEDIA_LICENSE »,function(a){f.onMediaLicense(a)
    });
    this.videoEngine.addEventListener(« LICENSE_ERROR »,function(a){f.onLicenseError(a)
    })
    },onMediaProtected:function(b){this.wrapper.mediaProtected(b);
    this.cd.event=b.event;
    this.flush()
    },onMediaLicense:function(b){this.wrapper.mediaLicense(b)
    },onLicenseError:function(b){this.wrapper.licenseError(b)
    },setLicenseServer:function(c,d){if(c){if(d!=undefined){this.cd.licenseServers[c.toLowerCase()]=d.replace(«  »,this.mpx)
    }else{delete this.cd.licenseServers[c.toLowerCase()]
    }}},preload:function(b){if(this.cd&&this.cd.token){this.setMediaData(b.baseClip.security);
    this.flush();
    return true
    }return false
    },setFairPlayCertUrl:function(b){if(b!=undefined){this.cd.fairPlayCertUrl=b
    }},setToken:function(b){this.cd.token=b
    },setMediaData:function(j,i,f,h){if(j){var g=j;
    if(g.toLowerCase()=== »commonencryption »){g=this._handleCommonEncryption(g)
    }this.cd.security=g
    }if(i){this.cd.releasePid=i
    }if(f){this.cd.mediaId=f
    }if(h){this.cd.accountId=h
    }},_handleCommonEncryption:function(b){if($pdk.isChrome||$pdk.isFirefox){return »widevine »
    }else{if($pdk.isIE||$pdk.isEdge){return »playReady »
    }else{return b
    }}},clearMediaData:function(){this.cd.security= » »;
    this.cd.releasePid= » »;
    this.cd.mediaId= » »;
    this.cd.accountId= » »;
    this.cd.event={}
    },flush:function(){this.videoEngine.setChallengeData(this.cd)
    }});
    ClipWrapperManager=Class.extend({init:function(b){this.controller=b;
    this.initialize()
    },initialize:function(){this.controller.registerFunction(« registerClipWrapperPlugIn »,this,this.registerCWPlugin);
    this.controller.registerFunction(« setClipWrapper »,this,this.setClipWrapper)
    },registerCWPlugin:function(k,g){if(!g){g=0
    }if(!this.plugIns){this.plugIns=new Array()
    }var i={plugin:k,priority:g};
    var l=false;
    for(var h=0;
    h<this.plugIns.length;
    h++){var j=this.plugIns[h];
    if(i.priority<=j.priority){this.plugIns.splice(h,0,i);
    l=true;
    break
    }}if(!l){this.plugIns.push(i)
    }},processClip:function(f){if(this.currentClip){throw"the clipWrapperManager did not complete wrapping one clip before another was started"
    }if(f.isWrappingClip||!this.plugIns){return false
    }if(f.wasWrapped){f.wasWrapped=false;
    return false
    }var i=false;
    var h={clip:f};
    this.currentClip=f;
    for(var g=0;
    g<this.plugIns.length;
    g++){var j=this.plugIns[g];
    if(j.plugin.wrapClip(h)){i=true;
    break
    }}if(!i){this.currentClip=null
    }return i
    },setClipWrapper:function(b){if(this.currentClip){this.currentClip.wasWrapped=true;
    this.currentClip=null;
    this.controller.wrapClip(b.preRolls,b.postRolls)
    }}});
    ControlsManager=EventDispatcher.extend({init:function(e,d,f){this.controller=e;
    this._controllerDeferred=d;
    this.controlsManager=f;
    this.releaseStarted=false;
    this._buildListeners()
    },initialize:function(i,p){this.successCallback=i;
    this.errorCallback=p;
    var k=this.controller.getProperty("skinUrl");
    if(k&&(k.indexOf(location.hostname)!=-1||k.indexOf("http")!=-1)){this.skinUrl=k
    }else{this.skinUrl=k?$pdk.scriptRoot+k:$pdk.scriptRoot+"/../../pdk/skins/cinematic/cinematic.json"
    }this.parentNode=document.getElementById(this.controller.id+".controls");
    this.isPreview=true;
    var l=this;
    this.endCardID=this.controller.getProperty("endCard");
    var o=this.controller.getProperty("layoutUrl");
    var n=this.controller.getProperty("layout");
    var j=this.controller.getProperty("useNativeControls")=="true";
    var m=this.controller.getProperty("useDefaultPlayOverlay")=="true"||this.controller.getProperty("showControlsBeforeVideo")=="false";
    if(m&&!j){setTimeout(function(){p(false,j)
    },1)
    }if(!j){setTimeout(function(){l.parseMetaLayout(o,n)
    },1)
    }else{setTimeout(function(){p(false,true)
    },1)
    }},_buildListeners:function(){this.listeners={};
    var b=this;
    this.listeners.end=function(a){b.onMediaEnd(a)
    };
    this.listeners.fullscreen=function(a){b.onShowFullScreen(a)
    };
    this.listeners.getlanguage=function(a){b.onGetSubtitleLanguage(a)
    };
    this.listeners.loadStart=function(a){b.onMediaLoadStart(a)
    };
    this.listeners.loading=function(a){b.onMediaLoading(a)
    };
    this.listeners.loadrelease=function(a){b.onLoadRelease(a)
    };
    this.listeners.loadreleaseurl=function(a){b.onLoadRelease(a)
    };
    this.listeners.mute=function(a){b.onMute(a)
    };
    this.listeners.paused=function(a){b.onMediaPause(a)
    };
    this.listeners.playing=function(a){b.onMediaPlaying(a)
    };
    this.listeners.releaseend=function(a){b.onReleaseEnd(a)
    };
    this.listeners.releasestart=function(a){b.onReleaseStart(a)
    };
    this.listeners.resize=function(a){b.onResize(a)
    };
    this.listeners.seek=function(a){b.onMediaSeek(a)
    };
    this.listeners.setreleaseurl=function(a){b.onSetReleaseURL(a)
    };
    this.listeners.showcard=function(a){b.onShowCard(a)
    };
    this.listeners.hidecard=function(a){b.onHideCard(a)
    };
    this.listeners.showplayoverlay=function(a){b.onShowPlayOverlay(a)
    };
    this.listeners.start=function(a){b.onMediaStart(a)
    };
    this.listeners.unpaused=function(a){b.onMediaUnpause(a)
    };
    this.listeners.volumechange=function(a){b.onVolumeChange(a)
    };
    this.listeners.onPlaybackRateChanged=function(a){b.onPlaybackRateChanged(a)
    };
    this.listeners.noSkipChanged=function(a){b.onNoSkipChanged(a)
    };
    this.listeners.setShowControls=function(a,d){b.setShowControls(a,d)
    };
    this.listeners.setPlayerLayoutUrl=function(a){b.setPlayerLayoutUrl(a)
    };
    this.listeners.setPlayerLayoutXml=function(a){b.setPlayerLayoutXml(a)
    };
    this.listeners.adLoadFailure=function(){b.onAdLoadFailure()
    };
    this.listeners.textTracksAvailable=function(a){b.onTextTracksAvailable(a)
    };
    this.listeners.clearcurrentrelease=function(a){b.onClearCurrentRelease(a)
    };
    this._controllerDeferred.addEventListener("OnGetSubtitleLanguage",this.listeners.getlanguage);
    this._controllerDeferred.addEventListener("OnLoadRelease",this.listeners.loadrelease);
    this._controllerDeferred.addEventListener("OnLoadReleaseUrl",this.listeners.loadreleaseurl);
    this._controllerDeferred.addEventListener("OnMediaEnd",this.listeners.end);
    this._controllerDeferred.addEventListener("OnMediaLoadStart",this.listeners.loadStart);
    this._controllerDeferred.addEventListener("OnMediaLoading",this.listeners.loading);
    this._controllerDeferred.addEventListener("OnMediaPause",this.listeners.paused);
    this._controllerDeferred.addEventListener("OnMediaPlaying",this.listeners.playing);
    this._controllerDeferred.addEventListener("OnMediaSeek",this.listeners.seek);
    this._controllerDeferred.addEventListener("OnMediaStart",this.listeners.start);
    this._controllerDeferred.addEventListener("OnMediaUnpause",this.listeners.unpaused);
    this._controllerDeferred.addEventListener("OnMute",this.listeners.mute);
    this._controllerDeferred.addEventListener("OnReleaseEnd",this.listeners.releaseend);
    this._controllerDeferred.addEventListener("OnClearCurrentRelease",this.listeners.clearcurrentrelease);
    this._controllerDeferred.addEventListener("OnReleaseStart",this.listeners.releasestart);
    this._controllerDeferred.addEventListener("OnResize",this.listeners.resize);
    this._controllerDeferred.addEventListener("OnSetReleaseUrl",this.listeners.setreleaseurl);
    this._controllerDeferred.addEventListener("OnShowCard",this.listeners.showcard);
    this._controllerDeferred.addEventListener("OnHideCard",this.listeners.hidecard);
    this._controllerDeferred.addEventListener("OnShowFullScreen",this.listeners.fullscreen);
    this._controllerDeferred.addEventListener("OnShowPlayOverlay",this.listeners.showplayoverlay);
    this._controllerDeferred.addEventListener("OnVolumeChange",this.listeners.volumechange);
    this._controllerDeferred.addEventListener("OnPlaybackRateChanged",this.listeners.onPlaybackRateChanged);
    this._controllerDeferred.addEventListener("OnNoSkipChanged",this.listeners.noSkipChanged);
    this._controllerDeferred.addEventListener("__internal__AdLoadFailure",this.listeners.adLoadFailure);
    this._controllerDeferred.registerFunction("setShowControls",this,this.listeners.setShowControls);
    this._controllerDeferred.registerFunction("setPlayerLayoutUrl",this,this.listeners.setPlayerLayoutUrl);
    this._controllerDeferred.registerFunction("setPlayerLayoutXml",this,this.listeners.setPlayerLayoutXml);
    this._controllerDeferred.addEventListener("OnTextTracksAvailable",this.listeners.textTracksAvailable)
    },addListeners:function(){var b=this;
    this.controller.addEventListener("OnGetSubtitleLanguage",this.listeners.getlanguage);
    this.controller.addEventListener("OnLoadRelease",this.listeners.loadrelease);
    this.controller.addEventListener("OnLoadReleaseUrl",this.listeners.loadreleaseurl);
    this.controller.addEventListener("OnMediaEnd",this.listeners.end);
    this.controller.addEventListener("OnMediaLoadStart",this.listeners.loadStart);
    this.controller.addEventListener("OnMediaLoading",this.listeners.loading);
    this.controller.addEventListener("OnMediaPause",this.listeners.paused);
    this.controller.addEventListener("OnMediaPlaying",this.listeners.playing);
    this.controller.addEventListener("OnMediaSeek",this.listeners.seek);
    this.controller.addEventListener("OnMediaStart",this.listeners.start);
    this.controller.addEventListener("OnMediaUnpause",this.listeners.unpaused);
    this.controller.addEventListener("OnMute",this.listeners.mute);
    this.controller.addEventListener("OnReleaseEnd",this.listeners.releaseend);
    this.controller.addEventListener("OnClearCurrentRelease",this.listeners.clearcurrentrelease);
    this.controller.addEventListener("OnReleaseStart",this.listeners.releasestart);
    this.controller.addEventListener("OnResize",this.listeners.resize);
    this.controller.addEventListener("OnSetReleaseUrl",this.listeners.setreleaseurl);
    this.controller.addEventListener("OnShowCard",this.listeners.showcard);
    this.controller.addEventListener("OnHideCard",this.listeners.hidecard);
    this.controller.addEventListener("OnShowFullScreen",this.listeners.fullscreen);
    this.controller.addEventListener("OnShowPlayOverlay",this.listeners.showplayoverlay);
    this.controller.addEventListener("OnVolumeChange",this.listeners.volumechange);
    this.controller.addEventListener("OnPlaybackRateChanged",this.listeners.onPlaybackRateChanged);
    this.controller.addEventListener("OnNoSkipChanged",this.listeners.noSkipChanged);
    this.controller.addEventListener("__internal__AdLoadFailure",this.listeners.adLoadFailure);
    this.controller.registerFunction("setShowControls",this,this.listeners.setShowControls);
    this.controller.registerFunction("setPlayerLayoutUrl",this,this.listeners.setPlayerLayoutUrl);
    this.controller.registerFunction("setPlayerLayoutXml",this,this.listeners.setPlayerLayoutXml);
    this.controller.addEventListener("OnTextTracksAvailable",this.listeners.textTracksAvailable)
    },setPlayerLayoutUrl:function(b){this.controlsManager.setPlayerLayoutUrl(b)
    },setPlayerLayoutXml:function(b){this.controlsManager.setPlayerLayoutXml(b)
    },onNoSkipChanged:function(c){var d=c.data;
    if(d.baseClip.isAd&&!d.baseClip.noSkip){this.controlsManager.enableNext(true);
    this.enableNextOnControlsChanged=true
    }},onTextTracksAvailable:function(d){var c=this.clip.baseClip.isAd?[]:d.data.entries;
    this.setAvailableLanguages(c)
    },setAvailableLanguages:function(f){var e=[];
    for(var d=0;
    d0){var e=j.data.captions;
    var i=[];
    for(var g=0;
    g<e.length;
    g++){var h=e[g].lang?e[g].lang:e[g].language;
    if(h){i.push({language:h})
    }}this.setAvailableLanguages(i)
    }},onShowPlayOverlay:function(b){if(!this.releaseStarted){this.controlsManager.releaseStarted(false);
    tpDebug("onShowPlayOverlay Setting isPreview "+b.data);
    this.controlsManager.setIsPreview(b.data);
    this.isPreview=b.data
    }},onHideCard:function(c){var d=c.data;
    this.controlsManager.cardShowing(false,d.card,d.deck)
    },onShowCard:function(f){var d=f.data;
    this.controlsManager.cardShowing(true,d.card,d.deck);
    if($pdk.isSafari){var e=this.controller.id.toString();
    document.getElementById(e).querySelector(".tpCards").style.visibility="visible";
    setTimeout(function(){document.getElementById(e).querySelector(".tpCards").style.visibility="hidden"
    },1)
    }},onReleaseStart:function(i){var h=i.data;
    if(!h){return
    }this.release=h;
    this.releaseStarted=true;
    this.releaseLength=h.chapters.aggregateLength;
    var j=[];
    this.adCounts=[];
    this.adIndex=0;
    this.currentChapter=0;
    var l;
    for(var k=0;
    k-1?l.adIndex:l.contentIndex))
    }var e=this.getNumberOfPostRollClips(h);
    if(e>0){this.adCounts.push(e)
    }for(k=1;
    k0){this.controlsManager.setClipTitle(h.clips[0].title)
    }tpDebug(« Setting isPreview false »);
    this.controlsManager.setIsPreview(false);
    this.isPreview=false
    },getNumberOfPostRollClips:function(e){var d=0;
    if(e.baseClips[e.baseClips.length-1].isAd){d=1;
    for(var f=e.baseClips.length-2;
    f>=0;
    f–){if(e.baseClips[f].isAd){d++
    }else{break
    }}}return d
    },onClearCurrentRelease:function(b){this.onReleaseEnd(b);
    this.controlsManager.releaseCleared()
    },onReleaseEnd:function(b){this.controlsManager.clearImageTracks();
    this.releaseStarted=false;
    this.controlsManager.setSubtitleLanguages([]);
    this.controlsManager.setPercentLoaded(0);
    this.controlsManager.setClipTitle(«  »);
    this.setTimes(0,1,0,0);
    this.controlsManager.setIsAd(false);
    this.controlsManager.releaseStarted(false);
    this.controlsManager.pause();
    this.controlsManager.hasCC(false);
    this.controlsManager.setChapterPoints([]);
    this.currentChapters=[]
    },onAdLoadFailure:function(){this.setCurrentChapter();
    if(this.adIndex===0){this.adCounts[this.currentChapter]–
    }else{this.adIndex++
    }},onMediaLoadStart:function(i){var k=i.data;
    var e=0;
    this.controlsManager.mediaNoSkip(k.baseClip.noSkip);
    this.controlsManager.setIsAd(k.baseClip.isAd);
    this.controlsManager.isAd(k.baseClip.isAd);
    this.controlsManager.setClipTitle(k.title);
    var l=this.controller.getCurrentPlaylist();
    var h=this.controller.getMainPlaylist();
    this.setCurrentChapter();
    if(k.baseClip.isAd){this.adIndex++
    }if(l.playlistID!=h.playlistID){var j=this.differentPlaylists(l,this.lastCurrentPlaylist);
    this.lastCurrentPlaylist=l;
    if(j&&this.adCounts[this.currentChapter]>=1&&l.clips.length&&l.clips[0].baseClip.isAd){e=this.countFetchedAds(l,h);
    if(e>0){this.adCounts[this.currentChapter]+=e-1
    }}}if(k.chapter&&k.chapter.chapters){this.setTimes(k.chapter.aggregateStartTime+k.offset,k.chapter.chapters.aggregateLength,this.adIndex,this.adCounts[this.currentChapter]);
    if(!k.baseClip.isAd&&!k.baseClip.noSkip){this.controlsManager.setChapterPoints(!this.currentChapters?[]:this.currentChapters)
    }else{this.controlsManager.setChapterPoints([])
    }}else{if(k.baseClip.isAd){if(k.endTime>0){this.setTimes(k.startTime,k.endTime,this.adIndex,this.adCounts[this.currentChapter])
    }else{this.setTimes(0,k.length,this.adIndex,this.adCounts[this.currentChapter])
    }}else{if(k.baseClip.trueLength>0){this.setTimes(k.startTime+k.offset,k.baseClip.trueLength,0,0)
    }else{this.setTimes(k.startTime+k.offset,this.releaseLength,0,0)
    }}this.controlsManager.setChapterPoints([])
    }if(k.baseClip.availableImageTracks&&typeof(k.baseClip.availableImageTracks)&&k.baseClip.availableImageTracks.length>0&&!k.baseClip.isAd){this.controlsManager.setAvailableImageTracks(k.baseClip.availableImageTracks)
    }if(k.baseClip.isAd){this.controlsManager.setPercentLoaded(0)
    }if(!k.baseClip||k.baseClip.isAd||!k.baseClip.URL||k.baseClip.URL!==this.previousBaseClipURL){this.controlsManager.syncState()
    }if(k.baseClip){this.previousBaseClipURL=k.baseClip.URL
    }},onMediaStart:function(f){tpDebug(« Setting isPreview false »);
    this.controlsManager.setIsPreview(false);
    this.isPreview=false;
    this.lastSeek=undefined;
    this.clip=f.data;
    var d=f.data;
    this.setAvailableLanguages(d.baseClip.isAd?[]:d.baseClip.availableTextTracks);
    this.controlsManager.setIsAd(d.baseClip.isAd);
    var e=this.controller.supportsFullScreen();
    this.controlsManager.supportsFullScreen(e);
    this.controlsManager.supportsFastForward(this.controller.supportsFastForward());
    this.controlsManager.mediaStarted();
    this.controlsManager.mediaNoSkip(d.baseClip.noSkip);
    this.controlsManager.isAd(d.baseClip.isAd);
    this.controlsManager.setClipTitle(d.title);
    if(!d.baseClip.isAd&&!d.baseClip.noSkip){this.controlsManager.setChapterPoints(!this.currentChapters?[]:this.currentChapters)
    }},countFetchedAds:function(i,g){var j,k;
    var h=0;
    var l;
    for(j=0;
    j<i.clips.length;
    j++){l=true;
    for(k=0;
    k<g.clips.length;
    k++){if(i.clips[j].id===g.clips[k].id){l=false;
    break
    }}if(l){h++
    }}return h
    },differentPlaylists:function(f,d){if((f&&!d)||(!f&&d)){return true
    }if(f.playlistID!=d.playlistID){return true
    }if(f.clips.length!=d.clips.length){return true
    }for(var e=0;
    ed.end.mediaTime&&c.startTime<d.end.mediaTime)
    },onMediaSeek:function(b){this.isPlaying=false;
    if(!this.seekWithinChapter(b.data,this.clip)){this.lastSeek=b.data
    }if(b.data.end.durationAggregate){this.setTimes(b.data.end.currentTimeAggregate,b.data.end.durationAggregate,0,0)
    }else{if(b.data.clip.chapter){this.setTimes(b.data.end.currentTimeAggregate,b.data.clip.chapter.chapters.aggregateLength,0,0)
    }else{this.setTimes(b.data.end.currentTimeAggregate,this.releaseLength,0,0)
    }}},setCurrentChapter:function(){if(this.lastSeek&&this.release){var e=this.lastSeek.end.mediaTime;
    var f=this.release.chapters.chapters;
    for(var d=0;
    df[d].startTime&&e0){this.setTimes(0,0,this.adIndex,this.adCounts[this.currentChapter])
    }this.isPlaying=false;
    var e=this;
    this.controlsManager.clearImageTracks();
    if(this.enableNextOnControlsChanged){this.controlsManager.enableNext(false);
    this.enableNextOnControlsChanged=false
    }},onMediaPlaying:function(b){if(!this.releaseStarted){this.releaseStarted=true;
    this.controlsManager.releaseStarted(false);
    this.controlsManager.releaseStarted(this.releaseStarted)
    }this.controlsManager.setIsPreview(false);
    if(!this.isPlaying){this.isPlaying=true;
    this.controlsManager.play()
    }if(b.data.currentTimeAggregate!==undefined){if(b.data.durationAggregate>0){this.setTimes(b.data.currentTimeAggregate,b.data.durationAggregate,this.adIndex,this.adCounts[this.currentChapter])
    }else{this.setTimes(b.data.currentTimeAggregate,this.releaseLength,this.adIndex,this.adCounts[this.currentChapter])
    }}else{if(b.data.duration>0){this.setTimes(b.data.currentTime,b.data.duration,this.adIndex,this.adCounts[this.currentChapter])
    }else{this.setTimes(b.data.currentTime,this.releaseLength,this.adIndex,this.adCounts[this.currentChapter])
    }}},onMediaPause:function(b){this.isPlaying=false;
    this.controlsManager.pause()
    },onMediaUnpause:function(b){this.isPlaying=true;
    this.controlsManager.play()
    },onMute:function(b){this.controlsManager.mute(b.data)
    },onVolumeChange:function(b){this.controlsManager.setVolume(b.data/100)
    },onPlaybackRateChanged:function(b){this.controlsManager.setPlaybackRate(b.data.rate)
    },onShowFullScreen:function(b){this.controlsManager.setIsFullScreen(b.data);
    this.controlsManager.setFullScreen(b.data)
    },onGetSubtitleLanguage:function(d){var c=d.data.langCode;
    this.controlsManager.setSubtitleLanguage(c)
    },onResize:function(b){this.controlsManager.setSize(b.data.width+ »px »,b.data.height+ »px »)
    },setShowControls:function(d,c){this.controller.dispatchEvent(« OnShowControls »,{visible:d,regionId:c})
    }});
    var tpJsonContexts=new Object();
    function tpRegisterJsonContext(c){var d=(((1+Math.random())*65536)|0).toString(16).substring(1);
    tpJsonContexts[d]=c;
    return d
    }function tpJSONLoaderCallback(c,d){tpJsonContexts[d](c)
    }JSONLoader=Class.extend({init:function(){},load:function(r,j,q,l,n,m){if(!q){q= »callback »
    }if(!n){n= »context »
    }if(!l){l= »tpJSONLoaderCallback »
    }var p=tpRegisterJsonContext(function(){j(arguments[0],r)
    });
    if(r.indexOf(« ? »)>=0){r+= »& »+q+ »= »+l+ »& »+n+ »= »+p
    }else{r+= »? »+q+ »= »+l+ »& »+n+ »= »+p
    }var o=document.getElementsByTagName(« head »)[0];
    var k=document.createElement(« script »);
    k.type= »text/javascript »;
    k.src=r;
    k.onerror=function(a){tpDebug(« Failed to load « +k.src);
    if(typeof(m)=== »function »){m(a)
    }};
    o.appendChild(k)
    }});
    OverlayManager=Class.extend({init:function(e,d){this.controller=e;
    this.playerElement=d;
    var f=this;
    this.controller.registerFunction(« getOverlayArea »,this,this.getOverlayArea);
    this.controller.registerFunction(« setOverlayArea »,this,this.setOverlayArea);
    this.controller.addEventListener(« OnMediaAreaChanged »,function(a){f.mediaAreaChanged(a)
    })
    },getBrowserOffset:function(){if(this.controller.component.videoengineruntime&&this.controller.component.videoengineruntime=== »silverlight »){return 38
    }if(navigator.userAgent.toLowerCase().indexOf(« chrome »)>-1){return 32
    }if(navigator.userAgent.toLowerCase().indexOf(« msie »)>-1){return 42
    }if(tpIsIOS()){return 54
    }if(navigator.userAgent.toLowerCase().indexOf(« safari »)>-1){return 24
    }if(navigator.userAgent.toLowerCase().indexOf(« firefox »)>-1){return 28
    }return 35
    },setOverlayArea:function(b){if(b.width>0&&b.height>0){this.useNativeDefaults=false;
    this.overlayArea=b;
    this.controller.dispatchEvent(« OnOverlayAreaChanged »,this.getOverlayArea())
    }},getOverlayArea:function(i,g,j){if(this.overlayArea&&!j){if(g){this.controller.dispatchEvent(« OnOverlayAreaChanged »,this.overlayArea)
    }return this.overlayArea
    }var f={};
    var h=!this.useNativeDefaults?this.getBrowserOffset():0;
    f.height=this.playerElement.clientHeight-h;
    f.width=this.playerElement.clientWidth;
    f.top=this.playerElement.clientTop;
    f.left=this.playerElement.clientLeft;
    f.bottom=f.top+f.height;
    f.right=f.left+f.width;
    f.topLeft={x:f.left,y:f.top};
    f.bottomRight={x:f.right,y:f.bottom};
    f.size={x:f.width,y:f.height};
    f.x=f.left;
    f.y=f.top;
    if(i){f.x+=$pdk.jQuery(this.playerElement).offset().left;
    f.y+=$pdk.jQuery(this.playerElement).offset().top
    }if(g){this.controller.dispatchEvent(« OnOverlayAreaChanged »,f)
    }if(j){this.overlayArea=f
    }return f
    },mediaAreaChanged:function(b){}});
    var PdkEvent=new Object();
    PdkEvent.OnPlayerLoaded= »OnPlayerLoaded »;
    PdkEvent.OnResetPlayer= »OnResetPlayer »;
    PdkEvent.OnPlugInLoaded= »OnPlugInLoaded »;
    PdkEvent.OnPlugInsComplete= »OnPlugInsComplete »;
    PdkEvent.OnMediaLoadStart= »OnMediaLoadStart »;
    PdkEvent.OnMediaPlay= »OnMediaPlay »;
    PdkEvent.OnMediaClick= »OnMediaClick »;
    PdkEvent.OnMediaBuffer= »OnMediaBuffer »;
    PdkEvent.OnMediaBufferStart= »OnMediaBufferStart »;
    PdkEvent.OnMediaBufferComplete= »OnMediaBufferComplete »;
    PdkEvent.OnRenditionSwitched= »OnRenditionSwitched »;
    PdkEvent.OnMediaEnd= »OnMediaEnd »;
    PdkEvent.OnMediaError= »OnMediaError »;
    PdkEvent.OnMediaComplete= »OnMediaComplete »;
    PdkEvent.OnMediaLoading= »OnMediaLoading »;
    PdkEvent.OnMediaPause= »OnMediaPause »;
    PdkEvent.OnMediaTime= »OnMediaTime »;
    PdkEvent.OnMediaPlaying= »OnMediaPlaying »;
    PdkEvent.OnMediaStart= »OnMediaStart »;
    PdkEvent.OnMediaUnpause= »OnMediaUnpause »;
    PdkEvent.OnReleaseEnd= »OnReleaseEnd »;
    PdkEvent.OnReleaseStart= »OnReleaseStart »;
    PdkEvent.OnReleaseSelected= »OnReleaseSelected »;
    PdkEvent.OnMediaSeek= »OnMediaSeek »;
    PdkEvent.OnMute= »OnMute »;
    PdkEvent.OnSetVolume= »OnSetVolume »;
    PdkEvent.OnPlaybackRateChanged= »OnPlaybackRateChanged »;
    PdkEvent.OnSetRelease= »OnSetRelease »;
    PdkEvent.OnSetReleaseUrl= »OnSetReleaseUrl »;
    PdkEvent.OnLoadRelease= »OnLoadRelease »;
    PdkEvent.OnLoadReleaseUrl= »OnLoadReleaseUrl »;
    PdkEvent.OnSetSmil= »OnSetSmil »;
    PdkEvent.OnLoadSmil= »OnLoadSmil »;
    PdkEvent.OnShowFullScreen= »OnShowFullScreen »;
    PdkEvent.OnShowPlayOverlay= »OnShowPlayOverlay »;
    PdkEvent.OnShowPreviewImageOverlay= »OnShowPreviewImageOverlay »;
    PdkEvent.OnShowControls= »OnShowControls »;
    PdkEvent.OnStreamSwitched= »OnStreamSwitched »;
    PdkEvent.OnMediaCuePoint= »OnMediaCuePoint »;
    PdkEvent.OnGetSubtitleLanguage= »OnGetSubtitleLanguage »;
    PdkEvent.OnRefreshCategoryModel= »OnRefreshCategoryModel »;
    PdkEvent.OnRefreshReleaseModel= »OnRefreshReleaseModel »;
    PdkEvent.OnLoadReleaseModel= »OnLoadReleaseModel »;
    PdkEvent.OnRefreshReleaseModelStarted= »OnRefreshReleaseModelStarted »;
    PdkEvent.OnCategorySelected= »OnCategorySelected »;
    PlaybackManager=Class.extend({init:function(k,p){this.player=k;
    this.controller=p;
    var j={fontFamily: »Calibri, Helvetica, Arial »,fontColor: »white »,textAlign: »left »,textAlignVertical: »top »};
    var q={fontFamily: »Calibri, Helvetica, Arial »,fontColor: »white »,fontEdge: »dropshadow »,textAlign: »center »,textAlignVertical: »bottom »};
    var m= »tp_subtitles_settings »;
    var n=this;
    var l=n.controller.getOverlayArea();
    this.plugins=new Array();
    n.subtitlesLoader=new $pdk.queue.deferred.loader.Subtitles(n.controller,l,document.getElementById(n.controller.id+ ».subtitles »),m,6,j,q,true,n.controller.getProperty(« enableDynamicSubtitleFonts »)|| »true »);
    this.subtitlesSettingsManagerLoader=new $pdk.queue.deferred.loader.SubtitlesSettingsManager(this.controller,m);
    this.veSubtitlesManager=new $pdk.classes.VideoEngineSubtitlesManager(this.controller,this.player.videoEngine);
    this.replacePlaylistManager=new $pdk.classes.ReplacePlaylistManager();
    var n=this;
    p.addEventListener(« OnLoadReleaseUrl »,function(){n.handleLoadReleaseUrl.apply(n,arguments)
    });
    this.mediaSeekHandler=function(){n.handleMediaSeek.apply(n,arguments)
    };
    p.addEventListener(« OnMediaSeek »,this.mediaSeekHandler);
    this.mediaStartHandler=function(){n.handleMediaStart.apply(n,arguments)
    };
    p.addEventListener(« OnMediaStart »,this.mediaStartHandler);
    this.mediaLoadStartHandler=function(){n.handleMediaLoadStart.apply(n,arguments)
    };
    p.addEventListener(« OnMediaLoadStart »,this.mediaLoadStartHandler);
    this.releaseSelectedHandler=function(){n.handleReleaseSelected.apply(n,arguments)
    };
    p.addEventListener(« OnReleaseSelected »,this.releaseSelectedHandler);
    this.releaseStartedHandler=function(){n.handleReleaseStarted.apply(n,arguments)
    };
    p.addEventListener(« OnReleaseStart »,this.releaseStartedHandler);
    this.internalLoadReleaseUrlHandler=function(){n.handleInternalLoadReleaseUrl.apply(n,arguments)
    };
    p.addEventListener(« __internal__OnLoadReleaseUrl »,this.internalLoadReleaseUrlHandler);
    this._metadataUrlManager=new $pdk.plugin.MetadataUrlManager(this.controller);
    this.urlManager=new UrlManager(this.controller);
    var r=this.controller.getProperty(« useNativeControls »)== »true »;
    var o=this.controller.getProperty(« useDefaultPlayOverlay »)== »true »||this.controller.getProperty(« showControlsBeforeVideo »)== »false »;
    if(o||r){setTimeout(function(){n.controlsLoaded=true;
    n.player.controlsLoaded(false,r)
    },1)
    }if(!r){this.controlsLoader=new $pdk.queue.deferred.loader.ControlsLoader(this.controller,document.getElementById(this.controller.id).parentElement.id,function(){n.controlsLoaded=true;
    n.player.controlsLoaded(true,false);
    if(n.controlsLoadedCallback){n.controlsLoadedCallback()
    }},function(a,b){n.controlsLoaded=true;
    n.player.controlsLoaded(a,b)
    })
    }this.releaseUrl=this.player.releaseUrl;
    this.tokenManager=new TokenManager(this.controller);
    this.overlayManager=new OverlayManager(this.controller,this.player.container);
    this.standbyManager=new StandbyManager(this.controller,this);
    this.plugins=new Array();
    this.pluginsComplete=false;
    p.addEventListener(« OnPlugInsComplete »,function(){n.pluginsComplete=true
    });
    p.registerFunction(« setRelease »,this,this.setRelease);
    p.registerFunction(« setReleaseURL »,this,this.setReleaseURL);
    p.registerFunction(« tryWritePlayer »,this,this.tryWritePlayer);
    p.registerFunction(« pause »,this,this.pause);
    p.registerFunction(« endRelease »,this,this.endRelease);
    p.registerFunction(« endCurrentRelease »,this,this.endRelease);
    p.registerFunction(« clearCurrentRelease »,this,this.clearCurrentRelease);
    p.registerFunction(« resetRelease »,this,this.resetRelease);
    p.registerFunction(« getCurrentRelease »,this,this.getCurrentRelease);
    p.registerFunction(« getCurrentPlaylist »,this,this.getCurrentPlaylist);
    p.registerFunction(« getMainPlaylist »,this,this.getMainPlaylist);
    p.registerFunction(« injectPlaylist »,this,this.injectPlaylist);
    p.registerFunction(« insertPlaylist »,this,this.insertPlaylist);
    p.registerFunction(« playlistReplaced »,this,this.playlistReplaced);
    p.registerFunction(« wrapClip »,this,this.wrapClip);
    p.registerFunction(« insertClip »,this,this.insertClip);
    p.registerFunction(« mute »,this,this.doMute);
    p.registerFunction(« setVolume »,this,this.setVolume);
    p.registerFunction(« setSmil »,this,this.setSmil);
    p.registerFunction(« updateMediaTime »,this,this.updateMediaTime);
    p.registerFunction(« updateClip »,this,this.updateClip);
    p.registerFunction(« updatePlaylist »,this,this.updatePlaylist);
    p.registerFunction(« endMedia »,this,this.endMedia);
    p.registerFunction(« sendError »,this,this.sendError);
    p.registerFunction(« getMuteState »,this,this.getMuteState);
    p.registerFunction(« getVolume »,this,this.getVolume);
    p.registerFunction(« registerPlaylistPlugIn »,this,this.registerPlaylistPlugIn);
    p.registerFunction(« markOffset »,this,this.markOffset);
    p.registerFunction(« playPlaylist »,this,this.playPlaylist);
    p.registerFunction(« loadReleaseURL »,this,this.loadReleaseURL);
    p.registerFunction(« loadRelease »,this,this.loadRelease);
    p.registerFunction(« nextClip »,this,this.nextClipExternal);
    p.registerFunction(« previousClip »,this,this.previousClip);
    p.registerFunction(« nextRelease »,this,this.advanceToNextRelease);
    var n=this;
    p.registerFunction(« initializePlayback »,this,this.initializePlayback);
    this.adManager=new AdManager(p);
    this.clipWrapperManager=new ClipWrapperManager(p);
    this.challengeData=new $pdk.classes.ChallengeDataWrapper(this.controller,this.player.videoEngine);
    this.trackingManager=new $pdk.managers.TrackingUrlManager(p,k.player);
    this.fullScreenManager=new FullScreenManager(p,this,k.enableFullWindow);
    this.advanceClipFromExternalCall=false;
    com.theplatform.pdk.SelectorExported={getInstance:function(a){this._scopes=a.split(« , »);
    return this
    },parseClip:function(a){return p.callFunction(« createClipFromBaseClip »,[a],this._scopes)
    },parsePlaylist:function(b,a){return p.callFunction(« doParsePlaylist »,[b,a],this._scopes)
    }}
    },preloadContent:function(){var f=this.getFirstContentClip(this.playlist);
    var h=this.getFirstClipWithMatchingURL(f.URL,this.playlist);
    if(h&&!(tpIsIOS()||tpIsAndroid())){var g=h.startTime+h.offset;
    var e=this.player.createMediaFileFromClip(h);
    if(h.baseClip.security){if(this._clipIsKnownSecurityEncoding(h)&&this.challengeData&&this.challengeData.preloadClip(f)){this.videoEngine.preload(e,g)
    }}else{this.videoEngine.preload(e,g)
    }}},_clipIsKnownSecurityEncoding:function(c){var d=c.baseClip.security.toLowerCase();
    return d=== »playready »||d=== »widevine »||d=== »fairplay »||d=== »commonencryption »
    },getFirstContentClip:function(c){var d=function(a){return !a.baseClip.isAd
    };
    return this.findFirstInPlaylistByCondition(d,c)
    },getFirstClipWithMatchingURL:function(d,f){var e=function(a){return a.URL===d
    };
    return this.findFirstInPlaylistByCondition(e,f)
    },findFirstInPlaylistByCondition:function(f,g){if(g&&g.clips){for(var e=0;
    e<g.clips.length;
    e++){var h=g.clips[e];
    if(f(h)){return h
    }}}return null
    },isDashMedia:function(b){return b.baseClip.type==="application/dash+xml"
    },registerPlaylistPlugIn:function(e,d){this.plugins.push({playlistPlugIn:e,priority:d});
    function f(a,b){if(a.priorityb.priority){return 1
    }else{return 0
    }}}this.plugins.sort(f)
    },handleReleaseSelected:function(b){if(b.originator.controlId!=this.controller.componentId&&b.originator.controlId.indexOf(« player »)<0){this.currentReleaseList=b.originator.controlId
    }this.tryingToAdvance=false
    },handleReleaseStarted:function(b){this.fastForwardSupported=undefined;
    this.releaseCleared=false
    },initializePlayback:function(){this.pluginsComplete=true;
    if(this.waitReleaseCall){if(this.waitReleaseCall.url){this.setReleaseURL(this.waitReleaseCall.url,this.waitReleaseCall.replaceDefault)
    }else{if(this.waitReleaseCall.release){this.setRelease(this.waitReleaseCall.release,this.waitReleaseCall.replaceDefault)
    }}this.waitReleaseCall=null
    }else{if(this.waitSmil){this.setSmil(this.waitSmil);
    this.waitSmil=null
    }}},handleMediaStart:function(c){var d=c.data;
    d.offset=0;
    this.clipStarted=true;
    this.wasError=false;
    this.updateClip(d)
    },handleInternalLoadReleaseUrl:function(b){if(b.data&&b.data.captions){if(this.shouldStripVTT(b.data.captions)){this.stripMetadataVTT(b.data)
    }}this.controller.dispatchEvent("OnLoadReleaseUrl",b.data)
    },handleMediaLoadStart:function(b){if(this.shouldStripVTT(b.data.baseClip.availableSubtitles)){tpDebug("calling stripVTT(clip)");
    this.stripVTT(b.data)
    }},handleLoadReleaseUrl:function(b){this.tryingToAdvance=false;
    if(this.releaseProcess&&this.playlist){this.endRelease();
    this.destroyReleaseProcess(this.releaseProcess);
    this.releaseProcess=undefined;
    this.playlist=undefined
    }if(!this.currentRelease||this.currentRelease.pid!=b.data.pid){this.currentRelease=this.convertRawRelease(b.data)
    }else{this.appendRawDataToRelease(this.currentRelease,b.data)
    }if((tpIsIOS()||tpIsAndroid())&&this.isPrefetch()){release.url=this.releaseUrl;
    this.setRelease(release)
    }},convertRawRelease:function(b){if(b.pubDate){b.airdate=new Date(b.pubDate)
    }return b
    },appendRawDataToRelease:function(d,c){if(c.captions){d.captions=c.captions
    }if(c.categories){d.categories=c.categories
    }if(c.chapters){d.chapters=c.chapters
    }if(c.copyright){d.copyright=c.copyright
    }if(c.provider){d.provider=c.provider
    }if(c.customValues){d.customValues=c.customValues
    }if(c.mediaPID){d.mediaPID=c.mediaPID
    }else{if(c.mediaPid){d.mediaPID=c.mediaPid
    }}},isPrefetch:function(){return this.controller.isPrefetch()
    },getCurrentRelease:function(){return this.currentRelease
    },getCurrentPlaylist:function(){if(this.releaseProcess){return this.releaseProcess.getCurrentPlaylist()
    }},getMainPlaylist:function(){return this.playlist
    },getChapterFromOffset:function(c,h){if(h<=c.aggregateLength){for(var f=0;
    f=h){g.offset=h-g.aggregateStartTime;
    return g
    }}}if(c.chapters.length==1){return c.chapters[0]
    }return null
    },markOffset:function(h,g,f){if(f===undefined){f=true
    }var j=this.getChapterFromOffset(h.chapters,g);
    var i;
    if(!j||j.contentIndex==h.currentIndex){}else{h.currentIndex=j.contentIndex
    }i=h.clips[h.currentIndex];
    if(j){i.offset=j.offset;
    if(j.adIndex>=0&&f){h.currentIndex=j.adIndex
    }}else{if(g=0? »& »: »? »
    },dispatchReleaseError:function(c,d){if(c){this.error=c;
    this.controller.showPlayerCard(« forms », »tpErrorCard »,null,{title:this.error.title,message:this.error.description,exception:this.error.exception,responseCode:this.error.responseCode,playNext:true})
    }this.controller.dispatchEvent(« OnReleaseError »,{url:d,title:c.title,description:c.description,exception:c.exception,responseCode:c.responseCode,alternateSrc:c.alternateSrc})
    },setSmil:function(b){if(!this.pluginsComplete){this.waitSmil=b;
    return
    }if(this.isNoSkipPlaying()){return
    }this.currentRelease=null;
    this.tryingToAdvance=false;
    this.controller.callFunction(« setSmilGwt »,[b])
    },pause:function(c,d){if(this.video){this.player.pauseUserInitiated=!!d;
    if(c){this.doPauseVideo(d)
    }else{this.doUnPauseVideo(d)
    }}},doPauseVideo:function(b){if(this.currentClip&&this.currentClip.streamType=== »empty »){if(!this.isNoopClip(this.currentClip)){this.controller.getVideoProxy().pause()
    }this.controller.dispatchEvent(« OnPlayerPause »,{userInitiated:b})
    }else{if(this.videoEngine.isPaused()==false){this.videoEngine.pause();
    this.controller.dispatchEvent(« OnPlayerPause »,{userInitiated:b})
    }}},doUnPauseVideo:function(b){this.play();
    this.controller.dispatchEvent(« OnPlayerUnPause »,{userInitiated:b});
    if(this.clipStarted){this.player.onPlay()
    }},play:function(){if(this.isNoopClip(this.currentClip)){return
    }if(this.currentClip&&this.currentClip.streamType=== »empty »){this.controller.getVideoProxy().play()
    }else{tpDebug(« PBM calling play! »);
    this.videoEngine.play()
    }},setVolume:function(b){this.videoEngine.setVolume(b/100);
    this.controller.dispatchEvent(« OnVolumeChange »,b);
    this._volumeAsInteger=b
    },getVolume:function(){return this._volumeAsInteger
    },doMute:function(b){if(this._isMuted==undefined){this._isMuted=false
    }if(this.pdkMuteStateChanged(b)||this.videoTagMuteStateChanged(b)){if(this.videoTagMuteStateChanged(b)&&this.usingNativeControls()){this._isMuted=this.videoEngine.isMuted()
    }else{this._isMuted=b
    }if(!this._isMuted&&this._volumeAsInteger&&this._volumeAsInteger>=0){this.videoEngine.setVolume(this._volumeAsInteger/100)
    }else{if(this._isMuted){this._volumeAsInteger=this.videoEngine.getVolume()*100;
    this.videoEngine.setVolume(0)
    }}this.videoEngine.mute(this._isMuted)
    }},usingNativeControls:function(){var b=this.controller.getProperty(« useNativeControls »)== »true »;
    return b||($pdk.isIOS&&this.videoEngine.isFullScreen())
    },pdkMuteStateChanged:function(b){return this._isMuted!==b
    },videoTagMuteStateChanged:function(b){return this.videoEngine.isMuted()!==b
    },getMuteState:function(){return this._isMuted
    },stripM3U:function(i){var g=0;
    var h=0;
    var j;
    var f=false;
    for(;
    g0&&g0){var e=0;
    for(e;
    e<f.length;
    e++){if(this._isVTTCaption(f[e])){d=true;
    break
    }}}return d
    },shouldStripVTT:function(b){if(this.hasVTT(b)&&(!this._usingHTML5Context()||!this._browserSupportsVTT())){return true
    }return false
    },_usingHTML5Context:function(){return this.videoEngine.getRuntime()=="HTML5"
    },_browserSupportsVTT:function(){return $pdk._browserCheck([{browser:"chrome",version:31,device:false},{browser:"chrome",version:39,os:"ios"},{browser:"safari",version:7.1},{browser:"ipad",osversion:8},{browser:"iphone",osversion:8},{browser:"ipod",osversion:8},{browser:"chrome",version:39,os:"android"},{browser:"android",version:4.4}])
    },stripMetadataVTT:function(d){var e=d.captions;
    var f=this._stripVTTFromAvailable(e);
    if(f){d.captions=f
    }else{d.captions=[]
    }},stripVTT:function(d){var e=this._stripVTTFromAvailable(d.baseClip.availableSubtitles);
    if(e){d.baseClip.availableSubtitles=e
    }var f=this._stripVTTFromAvailable(d.baseClip.availableTextTracks);
    if(f){d.baseClip.availableTextTracks=f
    }if(e||f){this.updateClip(d)
    }},_stripVTTFromAvailable:function(f){if(!f||f.length==0){return null
    }var e=0,d=[];
    for(e;
    e<f.length;
    e++){if(!this._isVTTCaption(f[e])){d.push(f[e])
    }}return(d.length==f.length)?null:d
    },_isVTTCaption:function(d){var c="text/vtt";
    return((d.MIMEType==c)||(d.type==c))
    },replacePlaylist:function(b){return this.replacePlaylistManager.replacePlaylist(this.plugins,b)
    },playPlaylist:function(f){this.releaseSetInProcess=false;
    if(this.releaseProcess){this.controller.dispatchEvent("OnReleaseEnd",this.playlist);
    this.destroyReleaseProcess(this.releaseProcess);
    this.releaseProcess=undefined;
    var e=this;
    setTimeout(function(){e.playPlaylist(f)
    },1);
    return
    }var d=this.replacePlaylist(f);
    if(!d){this.doPlayPlaylist(f)
    }},blockedByDrm:function(h){var j=false;
    if(h){var f=this.getFirstContentClip(h);
    var i=f.baseClip.security;
    var g={};
    if(i){g.security=[i.toLowerCase()]
    }j=this.player.videoEngine.blockedByDrm(g)
    }return j
    },protectedByDrm:function(f){var e=this.getFirstContentClip(f);
    var d=e.baseClip.security.toLowerCase();
    return d==="widevine"||d==="fairplay"||d==="playready"||d==="commonencryption"
    },contentIsHttps:function(c){var d=this.getFirstContentClip(c);
    return d&&d.URL.indexOf("https")===0
    },_isWidevineInChrome:function(f){var e=this.getFirstContentClip(f);
    var d=e.baseClip.security.toLowerCase();
    return $pdk.isChrome&&(d==="widevine"||d==="commonencryption")
    },doPlayPlaylist:function(h){if(!h||h.isError){this.dispatchReleaseError({title:h.baseClips[0].title,description:h.baseClips[0].description,exception:h.baseClips[0].contentCustomData.exception,responseCode:h.baseClips[0].contentCustomData.responseCode,alternateSrc:h.baseClips[0].URL},this.releaseUrl);
    return
    }if(this.protectedByDrm(h)){var g=typeof navigator.requestMediaKeySystemAccess==="function";
    if(this._isWidevineInChrome(h)&&!g){var j=this.contentIsHttps(h);
    if(j){tpDebug("Chrome requires SSL site delivery for Widevine support.","ChallengeDataWrapper",this.controller.id,tpConsts.ERROR);
    this.dispatchReleaseError({title:"SSL Exception",description:"Chrome requires SSL site delivery for Widevine support."},this.releaseUrl);
    return
    }}}if(this.blockedByDrm(h)){this.dispatchReleaseError({title:"Security Error",description:"This protected content cannot be played on the current system."},this.releaseUrl);
    return
    }var i=h.metaTags;
    if(i){var f=0;
    for(;
    f<i.length;
    f++){if(i[f].name==="manifestServiceUrl"){this.playlistHasSSA=true
    }}}if($pdk.isAndroid&&!$pdk.isAndroid44plus&&!this.playlistHasSSA){this.stripM3U(h)
    }this.releaseProcess=this.createReleaseProcess();
    this.playlist=h;
    if(!(this.isPrefetch()&&(tpIsIOS()||tpIsAndroid()))){tpDebug("selector: playing current release");
    if(this.currentRelease){this.mergeReleaseWithPlaylist(this.currentRelease,h);
    h.release=this.currentRelease;
    h.release.mediaPID=h.mediaPID
    }else{h.release=this.getReleaseFromPlaylist(h)
    }this.controller.dispatchEvent("OnReleaseStart",h);
    this.releaseProcess.setPlaylist(h)
    }else{this.player.videoEngine.load(this.player.createMediaFileFromClip(this.playlist.baseClips[0]),0);
    this.player.currentURL=this.playlist.baseClips[0].URL
    }},mergeReleaseWithPlaylist:function(e,f){var d=this.getReleaseFromPlaylist(f);
    if(!e){e={globalDataType:"com.theplatform.pdk.data::Release"}
    }if(!e.title){e.title=d.title
    }if(!e.author){e.author=d.author
    }if(!e.duration){e.duration=d.duration
    }if(!e.length){e.length=d.length
    }if(!e.bitrate){e.bitrate=d.bitrate
    }if(!e.description){e.description=d.description
    }if(!e.categories){e.categories=d.categories
    }if(!e.copyright){e.copyright=d.copyright
    }if(!e.countries){e.countries=d.countries
    }if(!e.keywords){e.keywords=d.keywords
    }if(!e.link){e.link=d.link
    }if(!e.pid){e.pid=d.pid
    }if(!e.provider){e.provider=d.provider
    }if(!e.ratings){e.ratings=d.ratings
    }if(!e.text){e.text=d.text
    }if(!e.chapters){e.chapters=d.chapters
    }if(!e.url){e.url=d.url
    }if(!e.mediaPID){e.mediaPID=d.mediaPID
    }if(!e.airdate){e.airdate=d.airdate
    }},getReleaseFromPlaylist:function(i){if(i.release){return i.release
    }var g;
    var l=0;
    var h=i.baseClips.length;
    var j;
    var k;
    for(;
    l0){var k=j.baseClip.failOverClips[0];
    var l=com.theplatform.pdk.SelectorExported.parseClip(k);
    if(j.baseClip.failOverClips.length>1){var h=j.baseClip.failOverClips;
    h.splice(0,1);
    l.baseClip.failOverClips=h
    }else{l.baseClip.failOverClips=[]
    }var i=$.extend(true,{},j);
    i.URL=l.URL;
    i.baseClip=l.baseClip;
    i.id=l.id;
    this.player.doMediaLoadStart(i)
    }else{this.controller.dispatchEvent(« OnMediaError »,g);
    this.mediaErrorAction(g)
    }},mediaErrorAction:function(b){if(b&&b.globalDataType== »com.theplatform.pdk.data::LicenseError »){this.error={title: »Security Error »,description: »This protected content cannot be played on the current system. »,exception:b.friendlyMessage,responseCode:null,alternateSrc:b.clip.URL};
    this.endRelease();
    this.controller.showPlayerCard(« forms », »tpErrorCard »,null,{title:this.error.title,message:this.error.description,playNext:true})
    }else{if(b&&b.endRelease){this.wasError=true;
    this.endRelease();
    this.advanceToNextRelease(false,true)
    }else{if(this.releaseProcess){this.wasError=true;
    this.advanceClipFromExternalCall=false;
    this._doGetNextClip()
    }}}},handleMediaSeek:function(h){var i=h.data;
    tpDebug(« Got OnMediaSeek »);
    if(!this.currentClip){tpDebug(« PBM ignoring seek »);
    return
    }var e=i.end.mediaTime;
    tpDebug(« Seek time is: »+e);
    if(e>=this.currentClip.endTime||e1){this.endMedia()
    }else{tpDebug(« Continuing to play because we don’t know the duration »)
    }}}else{if(e300){var j=this;
    tpDebug(« targetTime is « +e+ », need to seek to « +this.currentClip.startTime);
    setTimeout(function(){j.controller.seekToPosition(j.currentClip.startTime)
    },1)
    }else{tpDebug(« seekObj was within clip boundaries: « +this.currentClip.startTime+ »<"+i.end.mediaTime+"0?y.URL.substr(0,y.URL.indexOf(« ? »)):y.URL;
    var x=true;
    for(var w=0;
    w0?q.URL.substr(0,q.URL.indexOf(« ? »)):q.URL;
    x=z!=p;
    break
    }u=x?this.adManager.checkAd(y):false;
    if(y.isExternal&&y.clipIndex===0){var r=this;
    setTimeout(function(){r.preloadContent()
    },100)
    }y.hasPlayed=true;
    this.updateClip(y);
    this.lastAdClip=y;
    tpDebug(« CheckAd returns « +u)
    }var i=false;
    if(this.currentClip){i=y.clipIndex0?this.currentClip.startTime:this.currentClip.currentMediaTime;
    this.releaseProcess.injectPlaylist(c,d)
    }},updateMediaTime:function(b){if(this.releaseProcess){this.releaseProcess.updateMediaTime(b)
    }},updateClip:function(b){if(this.releaseProcess){this.releaseProcess.updateClip(b)
    }},updatePlaylist:function(b){if(this.releaseProcess){this.releaseProcess.updatePlaylist(b)
    }},endMedia:function(d,f){if(!d){d=this.currentClip
    }d.offset=0;
    if(this.releaseProcess){this.releaseProcess.updateClip(d);
    if(d&&d.mediaLength-1000<=d.currentMediaTime){var e=d
    }this.doEndMedia(d);
    if(e){this.controller.dispatchEvent("OnMediaComplete",e)
    }if(!f){tpDebug("Media ended for clip with url: "+d.baseClip.URL+" and index "+d.clipIndex+" , PBM calling nextClip()");
    this.advanceClipFromExternalCall=false;
    this._doGetNextClip()
    }}},doEndMedia:function(b){this.currentClip=null;
    if(!this.wasError){tpDebug("doEndMedia dispatching OnMediaEnd for clip:"+b.baseClip.URL);
    this.controller.dispatchEvent("OnMediaEnd",b)
    }this.wasError=false
    },wrapClip:function(c,d){this.releaseProcess.wrapClip(c,d)
    },executeCurrentRelease:function(){},isNoopClip:function(b){if(!b){return false
    }return((b.URL==""||b.isExternal)&&b.baseClip.isAd&&b.streamType=="empty")
    },isProxyClip:function(b){if(!b){return false
    }return(!(b.URL==""||b.isExternal)&&b.baseClip.isAd&&b.streamType=="empty")
    }});
    tpPlayer=PDKComponent.extend({_generateExportedMarkup:function(){var b="";
    b+='

    ‘;
    b+=’

    ‘;
    b+=’

    ‘;
    b+=’

    ‘;
    b+=’

    ‘;
    b+=’

    ‘;
    b+=’

    ‘;
    b+= »

    « ;
    b+=’

    ‘;
    b+=’

    ‘;
    return b
    },init:function(r,q,j,o,m){var l=this;
    this._liveStallTimeout=0;
    this._attemptedRecoveryTimeout=0;
    this.id=r;
    this._resizeTimout=0;
    this._tryResizeAttempts=0;
    this.pluginsComplete=false;
    this.videoEngine=m;
    this.stayInFullScreen=true;
    if(o===undefined){o=r
    }this.widgetId=o;
    this.controller=new PlayerController(r,this,o);
    var p=$pdk.scriptRoot;
    var k=document.createElement(« a »);
    k.href=$pdk.scriptRoot;
    var p=k.hostname.toLowerCase();
    var n= »theplatform.com »;
    switch(p){case »pdk.theplatform.com »:n= »theplatform.com »;
    break;
    case »pdk.preview.theplatform.com »:n= »preview.theplatform.com »;
    break;
    case »pdk.sandbox.theplatform.com »:n= »theplatform.com »;
    break;
    case »pdk.test.corp.theplatform.com »:n= »test.corp.theplatform.com »;
    break;
    case »pdk.theplatform.eu »:n= »theplatform.eu »;
    break
    }if(!this.controller.getProperty(« pauseOnClick »)){this.controller.setProperty(« pauseOnClick », »true »)
    }this.pauseOnClick=(this.controller.getProperty(« pauseOnClick »)!== »false »);
    if(!this.controller.getProperty(« mpx »)){this.controller.setProperty(« mpx »,n)
    }if(tpIsIOS()||tpIsAndroid()){this.stayInFullScreen=false
    }this.unloaded=true;
    this.controller.addEventListener(« OnMediaAreaChanged »,function(){l.handleOnMediaAreaChanged.apply(l,arguments)
    });
    this.controller.addEventListener(« OnOverlayAreaChanged »,function(){l.handleOnOverlayAreaChanged.apply(l,arguments)
    });
    this.controller.addEventListener(« OnRenditionSwitched »,function(){});
    this.controller.addEventListener(« OnMediaCuePoint »,function(){})
    },setProperty:function(d,c){if(this.controller){this.controller.setProperty(d,c)
    }},getProperty:function(b){if(this.controller){return this.controller.getProperty(b)
    }else{return null
    }},attach:function(b){this.initialize();
    this.video=document.getElementById(b);
    this.ready()
    },setSeekHandler:function(){if(this.seekHandler){this.seekHandler.destroy()
    }this.seekHandler=new SeekHandler(this.videoEngine);
    var b=this;
    this.userSeekedListener=function(a){b.userSeeked(a)
    };
    this.seekErrorListener=function(a){b.seekFailed(a)
    };
    this.seekHandler.addEventListener(SeekEvents.USERSEEKED,this.userSeekedListener);
    this.seekHandler.addEventListener(SeekEvents.SEEKFAILED,this.seekErrorListener)
    },seekFailed:function(b){this.onError(b)
    },userSeeked:function(b){if(this.currentClip.baseClip.noSkip&&!tpIsIOS()){this.seekHandler.doSeek(this.currentClip.startTime/1000)
    }else{if(this.currentClip.baseClip.noSkip&&tpIsIOS()){}else{tpDebug(« got userSeeked: showing controls »);
    this.showControls(true);
    this.onSeeked()
    }}},progSeeked:function(b){tpDebug(« progSeeked fired »);
    this.onSeeked()
    },resetVideoElement:function(){var b=document.createElement(« div »);
    b.setAttribute(« id »,this.video.getAttribute(« id »));
    b.setAttribute(« class »,this.video.getAttribute(« class »));
    b.setAttribute(« style »,this.video.getAttribute(« style »));
    b.setAttribute(« x-webkit-airplay », »allow »);
    this.video.parentNode.replaceChild(b,this.video);
    this.video=b;
    this.videoEngine.setParentElement(this.video);
    if(this.videoengineruntime&&this.videoengineruntime.toLowerCase()=== »flash »){this.videoEngine.setRuntime(« FLASH »)
    }else{this.videoEngine.setRuntime(« HTML5″)
    }this.startedPlaying=false;
    this.currentClip=undefined;
    this.attachListeners();
    return{video:this.video,videoEngine:this.videoEngine}
    },createContainer:function(p){var n=this.framecolor?this.framecolor: »#000000″;
    var i=this.backgroundcolor?this.backgroundcolor: »#ffffff »;
    this.bdcolor=n.replace(« 0x », »# »);
    this.bgcolor=i.replace(« 0x », »# »);
    var j= » »;
    j+= »

    ‘;
    j+=’

    ‘;
    j+=’

    ‘;
    j+=’

    ‘;
    j+=’

    ‘;
    j+=’

    ‘;
    j+=’

    ‘;
    j+=’

    ‘;
    j+=’

    ‘;
    j+=’

    ‘;
    j+= »

    « ;
    if(p){p.innerHTML=j
    }else{document.write(j)
    }this.container=document.getElementById(this.id);
    this.pluginLayer=document.getElementById(this.id+ ».plugins »);
    this.player=document.getElementById(this.id+ ».player »);
    this.controlBlocker=document.getElementById(this.id+ ».controlBlocker »);
    var m=this;
    var k=function(a){if(m.videoEngine.isPaused()&&(!m._hideNativeControls)){if(!tpIsIOS()&&!tpIsAndroid()){m.controller.pause(false)
    }return true
    }if(!m.clipStarted){return false
    }var b=m.videoClicked(a);
    if(b){if(!a){var a=window.event
    }a.cancelBubble=true;
    if(a.stopPropagation){a.stopPropagation()
    }if(a.preventDefault){a.preventDefault()
    }return false
    }return true
    };
    anchor=document.createElement(« a »);
    anchor.style.width= »100% »;
    anchor.style.height= »100% »;
    anchor.style.background= »transparent »;
    anchor.style.display= »block »;
    if(tpIsIOS()){anchor.ontouchend=k
    }else{anchor.onclick=k
    }this.controlBlocker.appendChild(anchor);
    this.videoClickAnchor=anchor;
    this.blocker=document.getElementById(this.id+ ».blocker »);
    var o=this.backgroundcolor;
    if(o){idx=o.indexOf(« 0x »);
    if(idx!==-1){o=o.substring(idx+2);
    o= »# »+o
    }this.blocker.style.backgroundColor=o
    }else{this.blocker.style.backgroundColor= »black »
    }this.blocker.style.position= »absolute »;
    this.blocker.top=0;
    this.blocker.left=0;
    this.blocker.style.display= » »;
    this.blocker.style.overflow= »hidden »;
    this.blocker.style.height= »100% »;
    this.blocker.style.width= »100% »;
    this.blocker.style.display= »none »;
    this.controlsLayer=document.getElementById(this.id+ ».controls »);
    this.controlsLayer.className= »tpControls controlsLayer »;
    this.controlsLayer.style.backgroundColor= »transparent »;
    this.controlsLayer.style.cssFloat= »left »;
    this.controlsLayer.style[« float »]= »left »;
    this.controlsLayer.style.left= »0px »;
    this.controlsLayer.style.top= »0px »;
    this.controlBlocker.style.position= »absolute »;
    this.controlBlocker.style.display= »none »;
    this.blocker.top=0;
    this.blocker.left=0;
    this.controlBlocker.style.backgroundColor= »transparent »;
    this.controlBlocker.style.height= »100% »;
    this.controlBlocker.style.width= »100% »;
    this.controlBlocker.style.overflow= »hidden »;
    this.player.style.width= »100% »;
    this.player.style.height= »100% »;
    this.player.style.position= »absolute »;
    this.player.style.overflow= »hidden »;
    this.pluginLayer.style.width= »100% »;
    this.pluginLayer.style.position= »absolute »;
    this.controlsLayer.style.width= »100% »;
    this.controlsLayer.style.height= »100% »;
    this.container.className= »player »;
    if($pdk._phase1Controllers===null||typeof($pdk._phase1Controllers)!== »object »){$pdk._phase1Controllers={}
    }var l=document.getElementById(this.controller.id).parentElement.id;
    this.controller.componentId=l;
    $pdk._phase1Controllers[l]=this.controller;
    return p
    },isStandbyMode:function(){return this.standbyMode||(tpIsAndroid&&!tpIsChrome())
    },isPrefetch:function(){return !this.standbyMode&&(tpIsIOS()||tpIsAndroid())
    },isFlashPlayer:function(){return false
    },writePlayer:function(){if(!this.iOSEnabled){tpDebug(« writePlayer: Capturing play tap for mobile devices. »);
    this.ignoreErrors=true;
    this.videoEngine.capturePlayTapForMobile();
    this.iOSEnabled=true
    }},createVideo:function(){if(this.video){this.destroyVideo()
    }this.video=document.createElement(« div »);
    this._hideNativeControls=this.controller.getProperty(« overrideNativeControls »)== »true »||(this.controller.getProperty(« skinUrl »)!=null&&this.controller.getProperty(« skinUrl »).indexOf(« .swf »)==-1);
    this._useDefaultPlayOverlay=this.controller.getProperty(« useDefaultPlayOverlay »);
    if(this._useDefaultPlayOverlay===undefined){this._useDefaultPlayOverlay=false;
    this.controller.setProperty(« useDefaultPlayOverlay »,this._useDefaultPlayOverlay.toString())
    }else{this._useDefaultPlayOverlay=this._useDefaultPlayOverlay== »true »
    }this._showControlsBeforeVideo=this.controller.getProperty(« showControlsBeforeVideo »);
    var b=this.controller.getProperty(« mute »);
    this._startMuted=b&&b.toLowerCase()=== »true »?true:false;
    if(this._showControlsBeforeVideo===undefined){this._showControlsBeforeVideo=true;
    this.controller.setProperty(« showControlsBeforeVideo »,this._showControlsBeforeVideo.toString())
    }else{this._showControlsBeforeVideo=this._showControlsBeforeVideo== »true »
    }this.video.id=this.id+ ».content »;
    this.video.style.width= »100% »;
    this.video.style.height= »100% »;
    if(this.backgroundcolor){this.video.style.backgroundColor= »# »+this.backgroundcolor.substr(2)
    }this.player.appendChild(this.video);
    this.videoLayer=this.controller.getProperty(« videoLayer »);
    if(!this.videoLayer){this.videoLayer= »test-context »
    }this.videoEngine.setParentElement(this.video);
    if(tpIsAndroid()){tpDebug(« showing controls »);
    this.showControls(true)
    }if(this._hideNativeControls){this.showControls(false)
    }},getInitialMuteState:function(){return this._startMuted
    },getVideoProxy:function(){return new $pdk.connection.VideoProxy(this.videoEngine)
    },loadLayer:function(d,f,e){if(this.videoEngine){return this.videoEngine.loadLayer(d,f,e)
    }else{tpDebug(« Trying to call loadLayer without a VideoEngine »)
    }},hasLayer:function(d,c){if(this.videoEngine){return this.videoEngine.hasLayer(d,c)
    }else{tpDebug(« Trying to call hasLayer without a VideoEngine »)
    }},callLayerFunction:function(f,d,e){if(this.videoEngine){return this.videoEngine.callLayerFunction(f,d,e)
    }else{tpDebug(« Trying to call callLayerFunction without a VideoEngine »)
    }},setAudioTrackByIndex:function(b){this.videoEngine.setAudioTrackByIndex(b);
    if(this.videoEngine.getAudioTrackByIndex(b)){this.currentPreferredLanguage=this.videoEngine.getAudioTrackByIndex(b).language
    }},supportsFastForward:function(){return this.videoEngine.isPlaybackRateSupported()
    },setPlaybackRate:function(d){var c=this.videoEngine.setPlaybackRate(d);
    if(c){this.pbRate=c;
    this.dispatchOnPlaybackRateChanged(c)
    }},getPlaybackRate:function(){var b=this.videoEngine.getPlaybackRate();
    if(b>-1){this.pbRate.rate=b;
    this.dispatchOnPlaybackRateChanged(this.pbRate)
    }},pbRate:{rate:1,previousRate:1},dispatchOnPlaybackRateChanged:function(b){this.controller.dispatchEvent(« OnPlaybackRateChanged »,b)
    },setAudioTrackByLanguage:function(b){this.videoEngine.setAudioTrackByLanguage(b);
    this.currentPreferredLanguage=b
    },getCurrentAudioTrack:function(){return this.videoEngine.getCurrentAudioTrack()
    },getPauseState:function(){return this.paused
    },getCurrentPosition:function(){return this.currentTimeObject
    },destroyVideo:function(){if(this.video){this.videoEngine.unload();
    this.player.removeChild(this.video);
    this.video=null
    }},videoClicked:function(g){if(this.currentClip){if(!tpIsIOS()&&!tpIsAndroid()&&!this.isPausedWithClickThrough(this.currentClip)&&this.pauseOnClick===true){this.controller.pause(!this.getPauseState(),true)
    }if(this.clipHasClickThroughUrl(this.currentClip)){if($pdk.isSafari&&!$pdk.isIOS&&this.playlistHasSSA){window.open(this.currentClip.baseClip.moreInfo.href, »newwindow », »width= »+window.innerWidth+ », height= »+window.innerHeight+ » ,resizable=yes, scrollbars=yes, location=yes »)
    }else{window.open(this.currentClip.baseClip.moreInfo.href, »_blank »)
    }}var h=$(this.container).parent().offset();
    var e=g.pageX-h.left;
    var f=g.pageY-h.top;
    this.controller.dispatchEvent(« OnMediaClick »,{ctrlKey:g.ctrlKey,shiftKey:g.shiftKey,localX:e,localY:f,stageX:g.pageX,stageY:g.pageY,position:this.currentClip.currentMediaTime});
    return false
    }return false
    },isPausedWithClickThrough:function(d){var f=this.clipHasClickThroughUrl(d);
    var e=this.getPauseState();
    return f&&e
    },clipHasClickThroughUrl:function(b){return b.baseClip.moreInfo&&b.baseClip.moreInfo.href
    },attachListeners:function(){if(!this.listeners){this.listeners=new Object()
    }var b=this;
    this.videoEngine.addEventListener(« LAYER_LOADED »,this.listeners.layerLoaded=function(a){tpDebug(« Video tag dispatched « +a.type+ » with « +a.data)
    },false);
    this.videoEngine.addEventListener(« MEDIA_LOAD_START »,this.listeners.loadstart=function(a){tpDebug(« Video tag dispatched « +a.type+ » with « +a.media.url)
    },false);
    this.videoEngine.addEventListener(« MEDIA_START »,this.listeners.start=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onMediaStart(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_SEEKED »,this.listeners.seeked=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onSeeked(a)
    },false);
    if(tpIsIOS()){this.videoEngine.addEventListener(« MEDIA_SEEKING »,this.listeners.seeking=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onSeeking(a)
    },false)
    }this.videoEngine.addEventListener(« MEDIA_END »,this.listeners.ended=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onEnded(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_UNPAUSED »,this.listeners.unpause=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onPlay(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_PAUSED »,this.listeners.pause=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onPause(a)
    },false);
    this.videoEngine.addEventListener(« MUTE »,this.listeners.mute=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onMuteChange(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_PLAYING »,this.listeners.playing=function(a){},false);
    this.videoEngine.addEventListener(« MEDIA_LOADING »,this.listeners.progress=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onProgress(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_ERROR »,this.listeners.error=function(a){tpDebug(« Video tag dispatched « +a.type);
    if(a.data){tpDebug( » details: « +a.data.details);
    tpDebug( » errorId: « +a.data.errorId)
    }b.onError(a)
    },false);
    this.videoEngine.addEventListener(« PLAYBACK_ERROR »,this.listeners.playbackerror=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.onPlaybackError(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_UNLOADED »,this.listeners.unloaded=function(a){tpDebug(« Video tag dispatched « +a.type);
    b.unloaded=true
    },false);
    this.videoEngine.addEventListener(« INITIAL_AUDIO_TRACK »,this.listeners.initialAudioTrackSwitched=function(a){b.onInitialAudioTrackSwitched(a)
    },false);
    this.videoEngine.addEventListener(« AUDIO_TRACK_SWITCHED »,this.listeners.audioTrackSwitched=function(a){b.onAudioTrackSwitched(a)
    },false);
    this.videoEngine.addEventListener(« RESIZE »,this.listeners.resize=function(a){b.onResize(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_BUFFER_START »,this.listeners.mediaBufferStart=function(a){b.onMediaBufferStart(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_BUFFER_COMPLETE »,this.listeners.mediaBufferComplete=function(a){b.onMediaBufferComplete(a)
    },false);
    this.videoEngine.addEventListener(« RENDITION_SWITCHED »,this.listeners.renditionSwitched=function(a){b.onRenditionSwitched(a)
    },false);
    this.videoEngine.addEventListener(« MEDIA_CUE_POINT »,this.listeners.mediaCuePoint=function(a){b.onMediaCuePoint(a)
    },false);
    this.videoEngine.addEventListener(« SEEK_ABORTED »,this.listeners.seekAborted=function(a){b.onSeekAborted(a)
    },false);
    this.videoEngine.addEventListener(« LIVE »,this.listeners.liveEvent=function(a){b._isLive=a.isLive;
    b._windowDuration=a.windowDuration
    },false)
    },removeListeners:function(){this.videoEngine.removeEventListener(« MEDIA_LOAD_START »,this.listeners.loadstart);
    this.videoEngine.removeEventListener(« MEDIA_START »,this.listeners.start);
    this.videoEngine.removeEventListener(« MEDIA_SEEKED »,this.listeners.seeked);
    this.videoEngine.removeEventListener(« MEDIA_END »,this.listeners.ended);
    this.videoEngine.removeEventListener(« MEDIA_UNPAUSED »,this.listeners.unpause);
    this.videoEngine.removeEventListener(« MEDIA_PAUSED »,this.listeners.pause);
    this.videoEngine.removeEventListener(« MEDIA_ERROR »,this.listeners.error);
    this.videoEngine.removeEventListener(« PLAYBACK_ERROR »,this.listeners.playbackerror);
    this.videoEngine.removeEventListener(« MEDIA_UNLOADED »,this.listeners.unloaded);
    this.videoEngine.removeEventListener(« MEDIA_PLAYING »,this.listeners.playing);
    this.videoEngine.removeEventListener(« MEDIA_LOADING »,this.listeners.progress);
    this.videoEngine.removeEventListener(« MUTE »,this.listeners.mute);
    this.videoEngine.removeEventListener(« INITIAL_AUDIO_TRACK »,this.listeners.initialAudioTrackSwitched);
    this.videoEngine.removeEventListener(« AUDIO_TRACK_SWITCHED »,this.listeners.audioTrackSwitched);
    this.videoEngine.removeEventListener(« MEDIA_BUFFER_START »,this.listeners.mediaBufferStart);
    this.videoEngine.removeEventListener(« MEDIA_BUFFER_COMPLETE »,this.listeners.mediaBufferComplete);
    this.videoEngine.removeEventListener(« RENDITION_SWITCHED »,this.listeners.renditionSwitched);
    this.videoEngine.removeEventListener(« MEDIA_CUE_POINT »,this.listeners.mediaCuePoint);
    this.videoEngine.removeEventListener(« SEEK_ABORTED »,this.listeners.seekAborted);
    this.videoEngine.removeEventListener(« LIVE »,this.listeners.liveEvent)
    },videoCannotUnmute:function(){return $pdk.isIOS&&!$pdk.isSafari11Plus
    },_bindElement:function(e){this.createContainer(e);
    this.createVideo();
    this.attachListeners();
    var f=this;
    var d=function(){f.onResize()
    };
    if(window.attachEvent){window.attachEvent(« onresize »,d)
    }else{window.addEventListener(« resize »,d);
    window.addEventListener(« orientationchange »,d)
    }this.ready()
    },write:function(e){this.createContainer(e);
    this.createVideo();
    this.attachListeners();
    var f=this;
    var d=function(){f.onResize()
    };
    if(window.attachEvent){window.attachEvent(« onresize »,d)
    }else{window.addEventListener(« resize »,d)
    }this.initialize();
    this.ready()
    },initialize:function(){if(this.scopes){this.controller.scopes=[this.controller.componentId].concat(this.scopes.split(« , »))
    }else{this.controller.scopes=[this.controller.componentId, »default »]
    }this.standbyMode=this.standbymode;
    if(this.standbyMode=== »true »||tpIsAndroid()){this.controller.setProperty(« standbyMode »,true);
    this.standbyMode=true
    }else{if(this.standbyMode=== »prefetch »){this.controller.setProperty(« standbyMode », »prefetch »);
    this.prefetch=true;
    this.standbyMode=false
    }else{if(tpIsIOS()||tpIsAndroid()){this.controller.setProperty(« standbyMode »,true);
    this.standbyMode=true
    }else{this.controller.setProperty(« standbyMode »,false);
    this.standbyMode=false
    }}}var e=this;
    this.controller.addEventListener(« OnPluginsComplete »,function(){e.pluginsComplete=true;
    e.controller.removeEventListener(« OnPluginsComplete »,this)
    });
    this.enableFullWindow=false;
    var f=false;
    try{f=window.self!==window.top
    }catch(d){f=true
    }this._isIFrame=f;
    if(this.controller.getProperty(« enablefullwindow »)=== »true »){this.enableFullWindow=true&&(!f||$pdk.queue._externalControllerListener)
    }else{if(this.controller.getProperty(« enablefullwindow »)!== »false »){if($pdk.isIE){this.enableFullWindow=true&&(!f||$pdk.queue._externalControllerListener)
    }}}this.playbackManager=new PlaybackManager(this,this.controller);
    this.controller.registerFunction(« getMediaArea »,this,this.getMediaArea);
    this.controller.registerFunction(« setMediaArea »,this,this.setMediaArea);
    this.controller.registerFunction(« getContentArea »,this,this.getContentArea);
    this.controller.registerFunction(« writePlayer »,this,this.writePlayer);
    this.controller.registerFunction(« isPrefetch »,this,this.isPrefetch);
    this.controller.registerFunction(« isStandbyMode »,this,this.isStandbyMode);
    this.controller.registerFunction(« isFlashPlayer »,this,this.isFlashPlayer);
    this.controller.registerFunction(« supportsFullScreen »,this,this.supportsFullScreen);
    this.controller.registerFunction(« supportsSeek »,this,this.supportsSeek);
    this.controller.registerFunction(« supportsMute »,this,this.supportsMute);
    this.controller.registerFunction(« supportsVolume »,this,this.supportsVolume);
    this.controller.registerFunction(« getVideoProxy »,this,this.getVideoProxy);
    this.controller.registerFunction(« loadLayer »,this,this.loadLayer);
    this.controller.registerFunction(« hasLayer »,this,this.hasLayer);
    this.controller.registerFunction(« callLayerFunction »,this,this.callLayerFunction);
    this.controller.registerFunction(« setAudioTrackByIndex »,this,this.setAudioTrackByIndex);
    this.controller.registerFunction(« setAudioTrackByLanguage »,this,this.setAudioTrackByLanguage);
    this.controller.registerFunction(« getCurrentAudioTrack »,this,this.getCurrentAudioTrack);
    this.controller.registerFunction(« getPauseState »,this,this.getPauseState);
    this.controller.registerFunction(« getCurrentPosition »,this,this.getCurrentPosition);
    this.controller.registerFunction(« setPlaybackRate »,this,this.setPlaybackRate);
    this.controller.registerFunction(« getPlaybackRate »,this,this.getPlaybackRate);
    this.controller.registerFunction(« supportsFastForward »,this,this.supportsFastForward)
    },ready:function(){this._super();
    this.playbackManager.video=this.video;
    this.playbackManager.videoEngine=this.videoEngine;
    if(this.layout||this.layoutUrl){this.controls=document.createElement(« div »);
    this.controls.className= »controlLayoutArea »;
    this.controls.style.height= »40px »;
    this.controls.style.width= »100% »;
    this.controls.style.background= »#555555″
    }this.video.style.padding= »0″;
    this.video.style.margin= »0″;
    var f=this.controller.getProperty(« endCard »);
    if(self.CardMediator&&f== »HelloWorldEndCard »){this.cardHolder=new oldCardMediator(f,this.controller)
    }if(this.controller.getProperty(« overlayImageURL »)){var g=this;
    setTimeout(function(){g.controller.addPlayerCard(« overlays », »tpOverlayCard », »

    « , »urn:theplatform:pdk:area:overlay »,{},{show:function(a){$pdk.jQuery(a.card).find(« img »)[0].src=a.player.overlayimageurl
    },hide:function(){}});
    g.controller.showPlayerCard(« overlays », »tpOverlayCard »)
    },1)
    }var g=this;
    if(!this.applyVideoEngineSettingsInterval){this.applyVideoEngineSettingsInterval=setInterval(function(){g.applyVideoEngineSettings();
    clearInterval(g.applyVideoEngineSettingsInterval)
    },50)
    }this.controller.addEventListener(« OnPlayerLoaded »,function(){g.handlePlayerLoaded.apply(g,arguments)
    });
    this.controller.addEventListener(« OnShowFullScreen »,function(){g.onShowFullScreen.apply(g,arguments)
    });
    this.controller.addEventListener(« OnMediaPlaying »,function(){g.showVideo();
    g.showBlocker(false)
    });
    this.controller.addEventListener(« OnSetRelease »,function(){g.handleSetRelease.apply(g,arguments)
    });
    this.controller.addEventListener(« OnReleaseSelected »,function(){g.handleSetRelease.apply(g,arguments)
    });
    this.controller.addEventListener(« OnSetReleaseUrl »,function(){g.handleSetReleaseUrl.apply(g,arguments)
    });
    this.controller.addEventListener(« OnLoadReleaseUrl »,function(){g.handleLoadRelease.apply(g,arguments)
    });
    this.controller.addEventListener(« OnMediaLoadStart »,function(){});
    this.controller.addEventListener(« OnMediaStart »,function(a){g.showVideo();
    if(a.data.streamType== »empty »){g.showControlBlocker(false)
    }else{if(!g._hideNativeControls){if(a.data.baseClip.isAd){g.showControlBlocker(true)
    }else{g.showControlBlocker(false)
    }}else{g.showControlBlocker(true)
    }}});
    this.controller.addEventListener(« OnReleaseStart »,function(){g.handleReleaseStart.apply(g,arguments)
    });
    this.controller.addEventListener(« OnReleaseEnd »,function(){g.handleReleaseEnd.apply(g,arguments)
    });
    this.controller.addEventListener(« OnMediaEnd »,function(){g.handleMediaEnd.apply(g,arguments)
    });
    this.controller.addEventListener(« OnClearCurrentRelease »,function(){g.handleClearCurrentRelease.apply(g,arguments)
    });
    this.controller.addEventListener(« OnShowControls »,function(){g.onShowControls.apply(g,arguments)
    });
    this.controller.registerFunction(« seekToPosition »,this,this.seekToPosition);
    this.controller.registerFunction(« seekToPercentage »,this,this.seekToPercentage);
    if(this.pluginsComplete===false){var h=g;
    var e=function(){if(h.pluginsComplete){return
    }h.pluginsComplete=true;
    h.controller.removeEventListener(« OnPlugInsComplete »,e);
    h.controller.dispatchEvent(« OnPlayerLoaded »,[h.id]);
    h.dispatchPlayerReady()
    };
    this.controller.addEventListener(« OnPlugInsComplete »,e);
    return
    }else{this.controller.dispatchEvent(« OnPlayerLoaded »,[this.id]);
    this.dispatchPlayerReady()
    }},dispatchPlayerReady:function(){this.controller.dispatchEvent(« OnPlayerReady »,{id:this.controller.widgetId,customer:this.controller.getProperty(« customer »),version: »CTS PSDK – Web « +$pdk.version.major+ ». »+$pdk.version.minor+ ». »+$pdk.version.revision,releaseUrl:this.controller.getProperty(« releaseurl »)})
    },handleShowPlayOverlay:function(b){if(b.data){if(this.videoEngine&&this.videoEngine.isFullScreen()){if(!this.stayInFullScreen){tpDebug(« Exiting fullscreen »);
    this.controller.showFullScreen(false)
    }}}},onShowControls:function(b){this.controller.getOverlayArea()
    },handlePlayerLoaded:function(b){if(!this.releaseUrl){return
    }if(this.autoPlay&&(!(tpIsIOS()||tpIsAndroid())||$pdk.canAutoplayMobile())){this.controller.dispatchEvent(« OnReleaseSelected »,{releaseUrl:this.releaseUrl,userInitiated:false});
    tpDebug(« Autoplaying releaseUrl: »+this.releaseUrl);
    this.controller.setReleaseURL(this.releaseUrl)
    }else{this.controller.loadReleaseURL(this.releaseUrl)
    }},handleMediaEnd:function(b){},onShowFullScreen:function(b){if(b.data){this.container.style.backgroundColor=this.bgcolor
    }else{this.container.style.backgroundColor= » »
    }this.onResize()
    },supportsFullScreen:function(){try{var d=!(this.playlistHasSSA&&this.currentClip&&this.currentClip.baseClip.isAd&&tpIsIOS())&&this.allowfullscreen=== »true »&&(this.videoEngine.isFullScreenSupported()||typeof(this.container.webkitRequestFullScreen)=== »function »||typeof(this.container.mozRequestFullScreen)=== »function »||(typeof(this.container.msRequestFullScreen)=== »function »&&!this._isIFrame)||this.enableFullWindow);
    return !!d
    }catch(c){return false
    }},supportsSeek:function(){return this.videoEngine.isSeekSupported()
    },supportsMute:function(){return this.videoEngine.isMuteSupported()
    },supportsVolume:function(){return this.videoEngine.isSetVolumeSupported()
    },seekToPosition:function(b){this.doSeek(b)
    },controlsLoaded:function(c,d){if(!c){if(d){this._hideNativeControls=this.controller.getProperty(« overrideNativeControls »)== »true »;
    this.videoEngine.setUseNativeControls(!this._hideNativeControls)
    }}},doSeek:function(g){if(g==0){g=1
    }if(this.currentClip&&(!this._lastSeekTime||Date.now()-this._lastSeekTime>500)){var f=this._filterSeek(g);
    this._lastSeekTime=Date.now();
    var e=this;
    this.seekTimeObject=this.createCurrentTimeObject();
    if($pdk.isAndroid&&!$pdk.isAndroid44plus&&this.currentClip.URL.toLowerCase().indexOf(« m3u »)!==-1){tpDebug(« Ignoring seek for m3u on legacy android »);
    if(!this.isPaused&&!this.videoEngine.isPaused()){this.controller.dispatchEvent(« OnMediaPlaying »,this.seekTimeObject)
    }}else{if(!this.currentClip.chapter||!this.currentClip.chapter.chapters.isAggregate){this.isSeeking=true;
    setTimeout(function(){e.videoEngine.seek(f)
    },1)
    }else{if(this.currentClip.chapter.startTimef){this.isSeeking=true;
    setTimeout(function(){e.videoEngine.seek(f)
    },1)
    }else{clearInterval(this.timeUpdateTimer);
    var h={globalDataType: »com.theplatform.pdk.data::SeekObject »};
    h.end=this.createCurrentTimeObject(f);
    if(h.end!=undefined&&this.seekTimeObject!=undefined&&h.end.currentTime!=this.seekTimeObject.currentTime){h.start=this.seekTimeObject
    }h.clip=this.currentClip;
    this.controller.dispatchEvent(« OnMediaSeek »,h);
    return
    }}}}},_filterSeek:function(c){var d=c;
    if(!this._isLiveDash()){d=this.getClipTime(c);
    if(d>=this.currentClip.mediaLength){d=this.currentClip.mediaLength-100
    }if(d<0){d=0
    }}return d
    },getClipTime:function(g){var j=this.playlist.chapters.chapters;
    var i=0;
    for(var c=0;
    cg){i=h.startTime+(g-h.aggregateStartTime);
    break
    }}return i
    },seekToPercentage:function(d){if(!this.currentClip){return
    }d=isNaN(d)?0:d;
    d=d100?100:d;
    var f=this.videoEngine.getTotalTime();
    if(this.currentClip.chapter&&this.currentClip.chapter.chapters){f=this.currentClip.chapter.chapters.aggregateLength
    }if(isNaN(f)&&this.currentClip){return this.doSeek(this.currentClip.baseClip.trueLength*(d/100))
    }else{if(!isNaN(f)){var e=f*(d/100);
    return this.doSeek(e)
    }else{this.delaySeekPercentage=d;
    return false
    }}},createMediaFileFromClip:function(b){return{url:b.URL,isAd:b.baseClip.isAd,mimeType:b.streamType== »empty »? »empty »:b.baseClip.type,isExternal:this.playbackManager.isNoopClip(b)}
    },handleLoadRelease:function(d){clearTimeout(this.nextClipTimerId);
    this.clipEnded=false;
    var e=d.data;
    this.currentReleaseUrl=e.url;
    if(!this.stayInFullScreen){try{this.controller.showFullScreen(false)
    }catch(f){}}if(tpIsIOS()){this.hideVideo()
    }},handleSetRelease:function(c){var d=c.data;
    this.currentReleaseUrl=d.url;
    this.releaseSet=true;
    clearTimeout(this.nextClipTimerId);
    tpDebug(« handleSetRelease setting release with url « +d.url)
    },handleSetReleaseUrl:function(c){var d=c.data;
    tpDebug(« handleSetReleaseUrl setting release url to « +d);
    clearInterval(this.timeUpdateTimer);
    this.currentReleaseUrl=d
    },handleReleaseStart:function(d){this.newRelease=true;
    this.usesNativeControls=this.controller.getProperty(« useNativeControls »)== »true »;
    this.currentVideoTime=0;
    this.wasPaused=false;
    this.percentLoaded=0;
    this._dispatchInitialAudioTrack=true;
    this.playlist=d.data;
    var f=this.playlist.metaTags;
    if(f){var e=0;
    for(;
    e<f.length;
    e++){if(f[e].name==="manifestServiceUrl"){this.playlistHasSSA=true
    }}}},doMediaLoadStart:function(g){tpDebug("doMediaLoadStart called for for url "+g.URL);
    this.clipEnded=false;
    this.startedPlaying=false;
    this.percentLoaded=0;
    if(this.currentClip){this.previousClipUrl=this.currentClip.baseClip.URL
    }clearTimeout(this.nextClipTimerId);
    clearInterval(this.timeUpdateTimer);
    this.jumpTime=undefined;
    this.needsJump=false;
    this.startedBuffer=false;
    tpDebug("handleMediaLoadStart fired, newRelease="+this.newRelease);
    this.wasPaused=(this.currentClip&&this.currentClip.streamType!="empty"&&!this.currentClip.baseClip.isAd)&&this.paused&&this.newRelease==false;
    this.currentClip=g;
    if(this.currentClip.baseClip.expression){this._isLive=this.currentClip.baseClip.expression.toLowerCase()==="nonstop"
    }this.clipEndedDueToSeek=false;
    if(g.URL.toLowerCase().indexOf("mp3")==-1){this.videoEngine.setPoster("")
    }this.removeListeners();
    this.attachListeners();
    if(!this.videoCannotUnmute()){this.controller.mute(this._startMuted)
    }if((this.currentURL!=g.URL||this.newRelease||this.hasError)&&g.streamType!=="empty"){this.isSeeking=false;
    this.suppressPause=true;
    var h=this;
    var e=g.startTime+g.offset;
    var f=function(){h.videoEngine.removeEventListener("MEDIA_UNLOADED",f);
    h.hasError=false;
    h.ignoreErrors=false;
    h.isComplete=false;
    h.newRelease=false;
    tpDebug("Starting clip #"+g.clipIndex+" with src:"+g.URL+" at offset:"+(e));
    setTimeout(function(){if(g.streamType!=="empty"){h.unloaded=false;
    h.loading=true;
    tpDebug("Doing ve.load() for "+g.URL+" to offset "+e);
    var a=h.createMediaFileFromClip(g);
    h.videoEngine.load(a,e);
    h.loading=false;
    h.releaseSet=false
    }else{h.showBlocker(false)
    }if(!h.wasPaused||g.baseClip.noSkip){tpDebug("Calling play again because it was paused");
    h.videoEngine.play()
    }},1);
    h.clipEnded=false;
    h.currentURL=g.URL;
    if(g.baseClip.noSkip&&g.streamType!=="empty"){h.showControls(false)
    }else{tpDebug("showing controls");
    h.showControls(true)
    }setTimeout(function(){tpDebug("Firing OnMediaLoadStart");
    tpTimeEnd("Time from setReleaseUrl until OnMediaLoadStart");
    h.controller.dispatchEvent("OnMediaLoadStart",g)
    },1)
    };
    this.isComplete=false;
    f();
    return
    }else{if(this.playbackManager.isNoopClip(g)||this.playbackManager.isProxyClip(g)){tpDebug("NoOp case");
    this.isSeeking=false;
    var h=this;
    var f=function(){h.videoEngine.removeEventListener("MEDIA_UNLOADED",f);
    if(g.baseClip.noSkip===true){h.showControls(false)
    }setTimeout(function(){h.unloaded=false;
    tpDebug("Firing OnMediaLoadStart");
    tpTimeEnd("Time from setReleaseUrl until OnMediaLoadStart");
    h.controller.dispatchEvent("OnMediaLoadStart",g);
    h.showBlocker(false)
    },1)
    };
    this.videoEngine.load(this.createMediaFileFromClip(g));
    this.showControlBlocker(false);
    f();
    return
    }else{if(!this.clipEnded){this.clipEnded=true;
    this.suppressPause=true
    }}}this.newRelease=false;
    tpDebug("Starting clip #"+g.clipIndex+" with src:"+g.URL+" at offset:"+(g.startTime+g.offset));
    if(g.streamType!=="empty"){this.videoEngine.load(this.createMediaFileFromClip(g),g.startTime+g.offset)
    }else{this.showBlocker(false)
    }this.clipEnded=false;
    this.currentURL=g.URL;
    var h=this;
    if(g.baseClip.noSkip){h.showControls(false)
    }else{tpDebug("showing controls");
    h.showControls(true)
    }setTimeout(function(){tpDebug("Firing OnMediaLoadStart");
    h.controller.dispatchEvent("OnMediaLoadStart",g)
    },1)
    },handleReleaseEnd:function(j){var f=j.data;
    var g=this;
    this.clipEnded=true;
    if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
    }this.videoEngine.unload();
    this.showBlocker(true);
    var h;
    if(f){h=f.releaseURL
    }function i(){if(!this.stayInFullScreen){tpDebug("Exiting fullscreen");
    g.controller.showFullScreen(false)
    }if(h&&h===g.currentReleaseUrl){g.controller.loadReleaseURL(g.currentReleaseUrl)
    }}this.nextClipTimerId=setTimeout(function(){i()
    },1000);
    this.hideVideo();
    this.currentClip=null
    },handleClearCurrentRelease:function(){clearTimeout(this.nextClipTimerId)
    },showControls:function(b){this.showControlBlocker(!b)
    },onResize:function(){var b=this;
    if(!this._tryResize()){if(this._resizeTimout<=0&&this._tryResizeAttempts<100){this._resizeTimout=setTimeout(function(){b._resizeTimout=0;
    b.onResize()
    },100)
    }else{tpDebug("Gave up trying to resize after attemps:"+this._tryResizeAttempts);
    this._tryResizeAttempts=0
    }}},_tryResize:function(){if(this.container){if(this._containerWidth!==this.container.offsetWidth||this._containerHeight!==this.container.offsetHeight){this._tryResizeAttempts=0;
    this._containerWidth=this.container.offsetWidth;
    this._containerHeight=this.container.offsetHeight;
    this.controller.dispatchEvent("OnResize",{width:this._containerWidth,height:this._containerHeight});
    this.controller.dispatchEvent("OnPlayerComponentAreaChanged",{width:this._containerWidth,height:this._containerHeight});
    var b=this.controller.getOverlayArea(false,false,true);
    this.controller.dispatchEvent("OnOverlayAreaChanged",b);
    this.controller.dispatchEvent("OnContentAreaChanged",this.controller.getContentArea());
    this.updateMediaArea();
    tpDebug(" MediaArea width/height is "+this._mediaArea.width+"/"+this._mediaArea.height);
    if(b.width<=0||b.height0){this.loadPoster(this.currentReleaseUrl)
    }if(!this.videoEngine.isPaused()){tpDebug(« In onMediaStart but ve.isPaused is false »);
    this.suppressPause=false;
    this.setTimer()
    }else{this.startedPlaying=false;
    tpTimeEnd(« Time from setReleaseUrl until OnMediaStart »);
    tpTimeEnd(« Time from page load to OnMediaStart »);
    this.controller.dispatchEvent(« OnMediaStart »,this.currentClip)
    }this.videoEngine.setUseNativeControls(!this._hideNativeControls)
    },onMediaBufferStart:function(b){this.controller.dispatchEvent(« OnMediaBufferStart »,this.currentClip)
    },onMediaBufferComplete:function(b){this.controller.dispatchEvent(« OnMediaBufferComplete »,this.currentClip)
    },onRenditionSwitched:function(b){this.controller.dispatchEvent(« OnRenditionSwitched »,b.event)
    },onMediaCuePoint:function(b){this.controller.dispatchEvent(« OnMediaCuePoint »,b.event)
    },onPlay:function(c){if(!this.currentClip||this.currentClip.streamType== »empty »){return
    }if(!this._hideNativeControls&&this.currentClip.baseClip.isAd){this.showControlBlocker(true)
    }if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
    }if(this.pausedLiveUpdateTimer){clearInterval(this.pausedLiveUpdateTimer)
    }var d=this;
    this.suppressPause=false;
    if(this.paused){if(this.currentClip.baseClip.isAd&&tpIsIOS()){this.showControls(false)
    }this.paused=false;
    if(!this.suppressPause){this.controller.dispatchEvent(« OnMediaUnpause »,{globalDataType: »com.theplatform.pdk.data::MediaPause »,clip:this.currentClip,userInitiated:!!this.pauseUserInitiated})
    }else{this.suppressPause=false
    }this.pauseUserInitiated=false
    }tpDebug(« onPlay calling setTimer »);
    this.setTimer()
    },onPlaying:function(b){if(!this.currentClip){return
    }if(this.needsJump){}else{if(this.currentClip&&this.currentClip.baseClip.isAd==false){this.showVideo()
    }else{if(this.currentClip&&this.currentClip.streamType== »empty »){this.showVideo()
    }}}},onPause:function(c){if(this.ignorePause()){tpDebug(« Ignoring native pause event suppressPause: »+this.suppressPause);
    if(this.clipStarted&&!this.isSeeking&&this.suppressPause){this.videoEngine.play();
    this.suppressPause=false
    }return
    }this.paused=true;
    if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
    }if(this._isLive&&this._windowDuration){var d=this;
    this.pausedLiveUpdateTimer=setInterval(function(){d.onTimeUpdateWhilePaused()
    },500)
    }tpDebug(« Dispatching OnMediaPause »);
    this.controller.dispatchEvent(« OnMediaPause »,{globalDataType: »com.theplatform.pdk.data::MediaPause »,clip:this.currentClip,userInitiated:!!this.pauseUserInitiated});
    this.pauseUserInitiated=false
    },ignorePause:function(){var c=Math.abs(this.videoEngine.getCurrentTime()-this.currentClip.endTime)0&&c&&!this._isLive;
    return !this.currentClip||d||this.suppressPause
    },onMuteChange:function(b){this._startMuted=b.isMute;
    this.controller.dispatchEvent(« OnMute »,b.isMute)
    },onVolumeChange:function(b){this.controller.dispatchEvent(« OnVolumeChange »,b.volume)
    },onSeeked:function(i){if(!this.isSeeking&&(!tpIsIPhone()&&tpIsIOS())&&!this.videoEngine.isFullScreen()&&!this.videoEngine.isPaused()){tpDebug(« this is a bogus seek, ignoring »);
    return
    }this.isSeeking=false;
    if(!this.currentClip||this.currentClip.streamType== »empty »||this.currentClip.baseClip.noSkip){tpDebug(« Ignoring seek! »);
    return
    }if(!this.seekTimeObject&&this.currentTimeObject&&this.currentTimeObject.currentTime!=this.videoEngine.getTotalTime()){this.seekTimeObject=this.cloneTimeObject(this.currentTimeObject)
    }var j={globalDataType: »com.theplatform.pdk.data::SeekObject »};
    j.end=this.createCurrentTimeObject();
    if(j.end!=undefined&&this.seekTimeObject!=undefined&&j.end.currentTime!=this.seekTimeObject.currentTime){j.start=this.seekTimeObject
    }else{var d=this.previousTime;
    var h=j.end.duration;
    j.start={globalDataType: »com.theplatform.pdk.data::TimeObject »,mediaTime:d,currentTime:d,currentTimeAggregate:d,duration:j.end.duration,durationAggregate:j.end.durationAggregate,percentComplete:(d/h)*100,percentCompleteAggregate:(d/h)*100,isAggregate:false,isLive:this._isLive,windowDuration:this._windowDuration}
    }j.clip=this.currentClip;
    j.clip.currentMediaTime=j.end.mediaTime;
    j.clip.mediaTime=j.end.mediaTime;
    var e=j.clip.mediaTime;
    this.controller.dispatchEvent(« OnMediaSeek »,j);
    this.seekTimeObject=undefined;
    if(!this.paused){this.videoEngine.play()
    }},onSeekAborted:function(b){this.isSeeking=false;
    tpDebug(b.description)
    },onSeeking:function(b){if(this.playlistHasSSA&&tpIsIOS()&&this.videoEngine.isFullScreen()&&!this.currentClip.baseClip.noSkip){clearInterval(this.timeUpdateTimer)
    }},onProgress:function(f){if(!this.currentClip||this.currentClip.streamType== »empty »){return
    }if(!this.startedBuffer){this.startedBuffer=true;
    this.controller.dispatchEvent(« OnMediaBuffering »,this.currentClip)
    }var d=f.percentLoaded;
    var e=d*this.videoEngine.getTotalTime();
    if(d>=1){clearInterval(this.progressUpdateTimer)
    }this.controller.dispatchEvent(« OnMediaLoading »,{ratioLoaded:d,isLoadComplete:d>=1,globalDataType: »com.theplatform.pdk.data::LoadMediaData »,loadedMilliseconds:-1,bytesLoaded:-1,bytesTotal:-1})
    },onEnded:function(c){if(c){tpDebug(« MEDIA_END event for « +c.media.url+ » with clipIndex: « +this.currentClip?this.currentClip.clipIndex: »none, currentClip is null »);
    if(this.currentClip&&c.media.url!==this.currentClip.URL){tpDebug(« This was a stale onEnded event, we’ll ignore it »);
    return
    }}if(!this.currentClip||this.currentClip.streamType== »empty »||this.clipEnded===true){return
    }if(this.currentClip.baseClip.isAd){this.currentClip.hasPlayed=true;
    this.playbackManager.updateClip(this.currentClip)
    }tpDebug(« onEnded called for for url « +this.currentClip.URL);
    tpDebug(« Clearing timeUpdateTimer »);
    if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
    }this.jumpTime=undefined;
    this.needsJump=false;
    this.currentVideoTime=undefined;
    var d=this.videoEngine.getCurrentTime();
    tpDebug(« Dispatching OnMediaEnd at « +d+ » for src: »+this.currentClip.URL);
    if(this.startedPlaying&&!this.clipEnded){tpDebug(« Calling endMedia() »);
    this.endMedia()
    }else{tpDebug(« Never started Playing or clipEnded is already true », »tpPlayer »);
    if(!this.releaseSet&&!this.loading){this.playbackManager.nextClip()
    }}this.releaseSet=false
    },onInitialAudioTrackSwitched:function(b){if(this._dispatchInitialAudioTrack===true){this.onAudioTrackSwitched(b);
    this._dispatchInitialAudioTrack=false
    }},onAudioTrackSwitched:function(h){tpDebug(« audioTrackSwitched from VE new: »+h.newAudioTrackIndex, »tpPlayer »);
    var f=this.videoEngine.getAudioTrackByIndex(h.newAudioTrackIndex);
    var g=this.videoEngine.getAudioTrackByIndex(h.oldAudioTrackIndex);
    if(f){f.globalDataType= »com.theplatform.com.data::AudioTrack »
    }if(g){g.globalDataType= »com.theplatform.com.data::AudioTrack »
    }var e={oldAudioTrack:g,newAudioTrack:f};
    if(this.startedPlaying){this.controller.dispatchEvent(« OnAudioTrackSwitched »,e)
    }else{this.standbySwitchedAudio=e
    }},endMedia:function(){this.clipEnded=true;
    this.playbackManager.endMedia(this.currentClip);
    if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
    }if(this.pausedLiveUpdateTimer){clearInterval(this.pausedLiveUpdateTimer)
    }},onTimeUpdateWhilePaused:function(){if(this.fellOutOfDvrWindow()){tpDebug(« We fell out of the DVR window, ending current release. »);
    this.endMedia()
    }},fellOutOfDvrWindow:function(){return this._windowDuration<(this._windowDuration-this.videoEngine.getCurrentTime())
    },onTimeUpdate:function(i){if(this.currentClip===undefined||this.currentClip===null){return
    }if(this.isSeeking){if(this._isLiveDash()){this._incrementLiveStallTimeout()
    }tpDebug("We're still seeking so we'll suppress onTimeUpdate");
    return
    }if(this.clipEnded){tpDebug("onTimeUpdate fired somehow even though clipEnded is true");
    clearInterval(this.timeUpdateTimer);
    return
    }if(this.currentClip&&!this.startedPlaying){this.startedPlaying=true;
    var e=tpGetPid(this.currentReleaseUrl);
    this.currentClip.releasePID=e;
    var l=this.videoEngine.getTotalTime();
    if(isNaN(l)||l<=0){l=this.currentClip.mediaLength
    }this.currentClip.trueLength=Math.floor(l);
    this.currentClip.baseClip.loadTime=0;
    this.currentClip.currentMediaTime=Math.floor(l);
    this.currentClip.mediaTime=this.currentClip.currentMediaTime;
    this.currentClip.mediaLength=Math.round(l);
    if(!this.currentClip.baseClip.isAd&&(!this.currentClip.chapter||!this.currentClip.chapter.chapters.isAggregate)){this.currentClip.endTime=this.currentClip.length=this.currentClip.mediaLength;
    if(this.currentClip.chapter){this.currentClip.chapter.chapters.aggregateLength=this.currentClip.chapter.endTime=this.currentClip.mediaLength;
    this.playlist.chapters.chapters[0].length=this.playlist.chapters.aggregateLength=this.currentClip.mediaLength
    }}this.previousTime=this.currentClip.currentMediaTime;
    tpDebug("Player dispatching OnMediaStart paused="+this.videoEngine.isPaused()+" for clip with index "+this.currentClip.clipIndex+" and url "+this.currentClip.URL+" with VE at offset "+this.videoEngine.getCurrentTime());
    this.suppressPause=false;
    this.startedPlaying=true;
    tpTimeEnd("Time from setReleaseUrl until OnMediaStart");
    tpTimeEnd("Time from page load to OnMediaStart");
    this.controller.dispatchEvent("OnMediaStart",this.currentClip);
    if(this.standbySwitchedAudio){this.controller.dispatchEvent("OnAudioTrackSwitched",this.standbySwitchedAudio);
    this.standbySwitchedAudio=null
    }}if(this.jumpTime){}else{if(this.delaySeek){if(this.doSeek(this.delaySeek)){this.delaySeek=undefined;
    this.delaySeekPercentage=undefined
    }}else{if(this.delaySeekPercentage){if(this.seekToPercentage(this.delaySeekPercentage)){this.delaySeekPercentage=undefined
    }}else{if(this.currentVideoTime&&Math.abs(this.currentVideoTime-(this.videoEngine.getCurrentTime()))<250){}else{if(!this.clipEnded){var h=true;
    if(!this.videoEngine.isPaused()){this.showBlocker(false)
    }else{if(this.blockerShowing===true){this.showBlocker(false)
    }}var l=this.videoEngine.getTotalTime();
    if(isNaN(l)||l0&&Math.abs(this.currentClip.currentMediaTime-this.currentClip.endTime)<1000){this.onEnded();
    return
    }else{if(this.videoEngine.getCurrentTime()===0){return
    }}var j=this.currentTimeObject;
    this.currentTimeObject=this.createCurrentTimeObject();
    if(this.currentClip){this.controller.updateMediaTime(this.currentClip.currentMediaTime)
    }if(this.percentLoaded<1&&this.percentLoaded!=this.videoEngine.getPercentLoaded()){this.percentLoaded=this.videoEngine.getPercentLoaded();
    this.onProgress({percentLoaded:this.percentLoaded})
    }if(this._shouldDispatchOnMediaPlaying(j)){if(this._isLiveDashStalledWhilePlaying(j)){this._incrementLiveStallTimeout();
    return
    }if(!this.contentAreaSet){this.getContentArea();
    this.contentAreaSet=true
    }this.controller.dispatchEvent("OnMediaPlaying",this.currentTimeObject);
    this._liveStallTimeout=0;
    this._attemptedRecoveryTimeout=0
    }this.showVideo();
    this.showBlocker(false);
    var k=this.videoEngine.getCurrentTime();
    if(this.currentVideoTime){k=this.currentVideoTime
    }this.currentVideoTime=undefined;
    if(this._shouldEndClip(k,l)){this.currentVideoTime=this.videoEngine.getCurrentTime();
    if(this.currentClip.baseClip.isAd){this.currentClip.hasPlayed=true
    }this.playbackManager.updateClip(this.currentClip);
    tpDebug("Calling onEnded() at "+this.videoEngine.getCurrentTime());
    this.onEnded()
    }this.previousTime=k
    }}}}}},_shouldDispatchOnMediaPlaying:function(e){var f=this._isLive&&!this._isPaused;
    var d=e==null||(e.currentTime!==this.currentTimeObject.currentTime);
    return f||d
    },_isLiveDash:function(){return this._isDash()&&this._isLive
    },_isDash:function(){return this.currentClip.baseClip.type==="application/dash+xml"||this.currentClip.baseClip.type==="video/vnd.mpeg.dash.mpd"
    },_isCurrentTimeLessThanPreviousTime:function(b){return this.currentTimeObject.currentTimeb){this._attemptToRecoverStalledLiveDash();
    this._incrementAttemptedRecoveryTimeout()
    }},_attemptToRecoverStalledLiveDash:function(){tpDebug(« Live stream stalled, attempting a seek to recover. »);
    this.videoEngine.seek(this.videoEngine.getCurrentTime()-1000);
    this._liveStallTimeout=0
    },_incrementAttemptedRecoveryTimeout:function(){var b=3;
    this._attemptedRecoveryTimeout++;
    if(this._attemptedRecoveryTimeout>b){tpDebug(« Ending live stream after « +b+ » stall recovery attempts. »);
    this.endMedia()
    }},_shouldEndClip:function(h,e){var f=this.playlistHasSSA&&this.usesNativeControls&&h>this.currentClip.endTime+500;
    if(f){return false
    }var g=(this.currentClip&&this.currentClip.endTime&&this.currentClip.endTime>0&&(!this.playlistHasSSA?(Math.abs(h-this.currentClip.endTime)this.currentClip.endTime):h>this.currentClip.endTime)&&Math.abs(h-e)>1000);
    return g
    },createCurrentTimeObject:function(p){if(!this.video){return undefined
    }var o=Math.round(p===undefined?this.videoEngine.getCurrentTime():p);
    var t=this.currentClip.chapter;
    var n=false;
    if(t&&!this.currentClip.baseClip.isAd&&(ot.endTime)){var r=0;
    var m=this.playlist.chapters.chapters.length;
    for(;
    r=d.startTime&&o=d.endTime&&o0){var s={globalDataType: »com.theplatform.pdk.data::TimeObject »};
    s.mediaTime=o;
    s.currentTime=o-this.currentClip.startTime;
    s.currentTimeAggregate=s.currentTime;
    s.duration=this.currentClip.length;
    s.durationAggregate=s.duration;
    s.percentComplete=(s.currentTime/s.duration)*100;
    s.percentCompleteAggregate=s.percentComplete,s.isAggregate=false,s.isLive=this._isLive,s.windowDuration=this._windowDuration;
    return s
    }else{var i=Math.round(this.videoEngine.getTotalTime());
    return{globalDataType: »com.theplatform.pdk.data::TimeObject »,mediaTime:o,currentTime:o,currentTimeAggregate:o,duration:i,durationAggregate:i,percentComplete:(o/i)*100,percentCompleteAggregate:(o/i)*100,isAggregate:false,isLive:this._isLive,windowDuration:this._windowDuration}
    }}},cloneTimeObject:function(b){return b?{globalDataType: »com.theplatform.pdk.data::TimeObject »,mediaTime:b.mediaTime,currentTime:b.currentTime,currentTimeAggregate:b.currentTimeAggregate,duration:b.duration,durationAggregate:b.durationAggregate,percentComplete:b.percentComplete,percentCompleteAggregate:b.percentCompleteAggregate,isAggregate:b.isAggregate,isLive:b.isLive,windowDuration:this._windowDuration}:undefined
    },onPlaybackError:function(b){if(this.ignoreErrors||!this.currentClip||this.currentClip.streamType== »empty »){tpDebug(« Ignoring playback error »);
    return
    }tpDebug(« Got a playback error from the video engine, the call to play media must not have orginated from a user click. »);
    if(this.currentReleaseUrl){tpDebug(« Calling loadReleaseUrl for « +this.currentReleaseUrl);
    this.controller.loadReleaseURL(this.currentReleaseUrl)
    }else{tpDebug(« We don’t have a releaseurl to load »)
    }},onError:function(b){if(this.ignoreErrors||!this.currentClip||this.currentClip.streamType== »empty »){return
    }this.doError(b)
    },doError:function(d){clearTimeout(this.nextClipTimerId);
    this.showControls(false);
    this.showBlocker(true);
    if(this.timeUpdateTimer){clearInterval(this.timeUpdateTimer)
    }this.hasError=true;
    var c={location:this.id,context:d?d.context:undefined,raw:d?d.raw:undefined,clip:this.currentClip,endRelease:!this.currentClip.baseClip.isAd||(this.playlistHasSSA&&this.urlEqualsContentClip(this.playlist,this.currentClip.URL)),message:d&&d.details?d.details: »The media cannot be played »,friendlyMessage: »The media cannot be played »,globalDataType: »com.theplatform.pdk.data::PlaybackError »};
    if(this.currentClip.baseClip.isAd){this.currentClip.hasPlayed=true;
    this.playbackManager.updateClip(this.currentClip)
    }this.suppressPause=false;
    this.controller.sendError(c)
    },urlEqualsContentClip:function(h,c){for(var f=0;
    f<h.clips.length;
    f++){var g=h.clips[f];
    if(!g.isAd){return g.URL==c
    }}return true
    },showVideo:function(){if(this.isShowing){return
    }this.player.style.visibility="";
    this.isShowing=true
    },hideVideo:function(){if(this.isShowing===false){return
    }this.player.style.visibility="hidden";
    this.isShowing=false
    },applyVideoEngineSettings:function(){var h=["limitRenditionsByPlayerSize","maxBufferDuration","startupRendition","withCredentials"];
    var j=[];
    for(var g=0;
    g0){this.videoEngine.applySettings(j)
    }},loadPoster:function(c){if(!c){return
    }if(!this.standby){this.standby=document.getElementById(this.id+ ».standby »)
    }var d=c.split(« ? »)[0]+ »?format=poster&width= »+this.standby.offsetWidth+ »&height= »+this.standby.offsetHeight;
    this.videoEngine.setPoster(d)
    },simulateClick:function(e){tpDebug(« simulateClick »);
    var f=document.createElement(« a »);
    f.id= »clickSimulator »;
    f.href= »# »;
    document.body.appendChild(f);
    f.addEventListener(« click »,function(b){b.preventDefault();
    e()
    },false);
    var a;
    if(document.createEvent){a=document.createEvent(« MouseEvents »);
    if(a.initMouseEvent){a.initMouseEvent(« click »,true,true,window,0,0,0,0,0,false,false,false,false,0,null);
    f.dispatchEvent(a)
    }}document.body.removeChild(f)
    },setMediaArea:function(c){if(c.width>0&&c.height>0){this._mediaArea=c;
    this.video.style.top=c.y+ »px »;
    this.video.style.left=c.x+ »px »;
    this.video.style.width=c.width+ »px »;
    this.video.style.height=c.height+ »px »;
    this.video.style.position= »absolute »;
    this.blocker.style.top=c.y+ »px »;
    this.blocker.style.left=c.x+ »px »;
    this.blocker.style.width=c.width+ »px »;
    this.blocker.style.height=c.height+ »px »;
    this.blocker.style.position= »absolute »;
    this.controller.dispatchEvent(« OnMediaAreaChanged »,this.getMediaArea());
    var d=this;
    setTimeout(function(){d.getContentArea()
    },300)
    }},updateMediaArea:function(){var b={top:0,left:0,x:0,y:0,width:this.player.offsetWidth,height:this.player.offsetHeight};
    if(!this._mediaArea||b.width!=this._mediaArea.width||b.height!=this._mediaArea.height){this._mediaArea=b;
    this.controller.dispatchEvent(« OnMediaAreaChanged »,this._mediaArea)
    }},getContentArea:function(q){var y=0;
    var p=0;
    try{if(this.currentClip){y=this.currentClip.baseClip.width;
    p=this.currentClip.baseClip.height
    }if(this.contentAreaSet||y===0||p===0){var z=this.videoEngine.getVideoWidth();
    var w=this.videoEngine.getVideoHeight();
    if(z>0&&w>0){y=z;
    p=w
    }}}catch(t){return{x:0,y:0,width:0,height:0}
    }if(!this._mediaArea){this.updateMediaArea()
    }var e=y/p;
    var u=this._mediaArea.width/this._mediaArea.height;
    var r=0;
    var s=0;
    var v;
    var o;
    if(e>=u){v=this._mediaArea.width;
    o=Math.round(this._mediaArea.width/e);
    s=Math.abs(Math.round(this._mediaArea.y+Math.round(this._mediaArea.height-o)/2))
    }else{v=Math.round(this._mediaArea.height*e);
    o=this._mediaArea.height;
    r=Math.abs(Math.round(this._mediaArea.x+Math.round(this._mediaArea.width-v)/2))
    }var x={x:r,y:s,width:v,height:o};
    if(!q){this.controller.dispatchEvent(« OnContentAreaChanged »,x)
    }return x
    },getMediaArea:function(){if(!this._mediaArea){this.updateMediaArea()
    }return this._mediaArea
    },getComponentSize:function(){return tpGetComponentSize(this.container)
    },showControlBlocker:function(b){this.controlBlockerShowing=b;
    b?this.controlBlocker.style.display= » »:this.controlBlocker.style.display= »none »
    },showBlocker:function(b){this.blockerShowing=b;
    b?this.blocker.style.display= » »:this.blocker.style.display= »none »
    },handleOnMediaAreaChanged:function(b){if(b.data.height==0){tpDebug(« setting video height to: »+b.data.height, »tpPlayer »)
    }this.blocker.style.top=b.data.y+ »px »;
    this.blocker.style.left=b.data.x+ »px »;
    this.blocker.style.width=b.data.width+ »px »;
    this.blocker.style.height=b.data.height+ »px »;
    this.blocker.style.position= »absolute »
    },handleOnOverlayAreaChanged:function(b){if(this.videoengineruntime=== »silverlight »){this.controlBlocker.style.width=b.data.width+ »px »;
    this.controlBlocker.style.height=b.data.height+ »px »
    }}});
    if(typeof(Player)=== »undefined »){Player=tpPlayer
    }PlugInManager=Class.extend({init:function(b){this.controller=b;
    this.plugins=new Array()
    },addPlugIn:function(s,l,k,t,o,n,m,q,r){if((t.indexOf(« .swf »)<0)){var p={id:s,type:l,priority:k,url:t,subUrl:o,vars:n,plugIn:m};
    this.plugins.push(p)
    }},ready:function(){var c=this;
    if(!this.plugins||this.plugins.length===0){setTimeout(function(){tpTimeEnd("Time it took from $pdk.onload until OnPluginsComplete");
    c.controller.dispatchEvent("OnPlugInsComplete",null);
    c.controller.initializePlayback()
    },1);
    return
    }for(var d=0;
    d<this.plugins.length;
    d++){tpController.loadPlugIn(this.plugins[d],this.controller)
    }}});
    tpReleaseList=PDKComponent.extend({_generateExportedMarkup:function(){return'


    },init:function(g,h,f){this.width=h;
    this.height=f;
    this.id=g;
    this.pretty=!navigator.userAgent.match(/MSIE 8/)&&!navigator.userAgent.match(/MSIE 7/)&&!navigator.userAgent.match(/MSIE 6/);
    if($pdk._isDevMode){this.pretty=false
    }this.controller=new ComponentController(g);
    var e=$pdk.shell.Registry.getInstance().getShells().get(g);
    this.deferredController=e?e._deferredController:null;
    this.hasAutoPlayed=false;
    this.hasAutoLoaded=false;
    this.eventQueue=[];
    this.playing=false
    },initialize:function(){var b=this;
    if(this.scopes){this.controller.scopes=[this.id].concat(this.scopes.split(« , »))
    }else{this.controller.scopes=[this.id, »default »]
    }if(this.deferredController){this.deferredController.addEventListener(« OnRefreshReleaseModelStarted »,function(){b.handleRefreshStarted.apply(b,arguments)
    });
    this.deferredController.addEventListener(« OnRefreshReleaseModel »,function(){b.handleReleaseModelRefreshed.apply(b,arguments)
    });
    this.deferredController.addEventListener(« OnLoadRelease »,function(){b.handleLoadRelease.apply(b,arguments)
    });
    this.deferredController.addEventListener(« OnLoadReleaseUrl »,function(){b.handleLoadRelease.apply(b,arguments)
    });
    this.deferredController.addEventListener(« OnFetchReleaseData »,function(){b.handleLoadRelease.apply(b,arguments)
    })
    }this.controller.addEventListener(« OnRefreshReleaseModelStarted »,function(){b.handleRefreshStarted.apply(b,arguments)
    });
    this.controller.addEventListener(« OnRefreshReleaseModel »,function(){b.handleReleaseModelRefreshed.apply(b,arguments)
    });
    this.controller.addEventListener(« OnSetReleaseUrl »,function(){b.handleSetReleaseUrl.apply(b,arguments)
    });
    this.controller.addEventListener(« OnReleaseSelected »,function(){b.handleOnReleaseSelected.apply(b,arguments)
    });
    this.controller.addEventListener(« OnLoadRelease »,function(){b.handleLoadRelease.apply(b,arguments)
    });
    this.controller.addEventListener(« OnLoadReleaseUrl »,function(){b.handleLoadRelease.apply(b,arguments)
    });
    this.controller.addEventListener(« OnFetchReleaseData »,function(){b.handleLoadRelease.apply(b,arguments)
    });
    this.controller.addEventListener(« OnReleaseStart »,function(){b.handleReleaseStart.apply(b,arguments)
    });
    this.controller.addEventListener(« OnReleaseEnd »,function(){b.handleReleaseEnd.apply(b,arguments)
    });
    this.controller.addEventListener(« OnMediaStart »,function(){b.handleMediaStart.apply(b,arguments)
    });
    this.controller.addEventListener(« OnMediaEnd »,function(){b.handleMediaEnd.apply(b,arguments)
    });
    this.controller.registerFunction(« playNext »,this,this.playNext);
    this.controller.registerFunction(« playPrevious »,this,this.playPrevious);
    this.currentIndex=-1;
    this.createdThumbnailStyles=false;
    if(this.showtitle===undefined){this.showtitle=true
    }if(this.showdescription===undefined){this.showdescription=true
    }if(this.showlength===undefined){this.showlength=true
    }if(this.showthumbnail===undefined){this.showthumbnail=true
    }if(this.defaultthumbnailheight===undefined){this.defaultthumbnailheight=100
    }if(this.thumbnailwidth===undefined){this.thumbnailwidth=160
    }if(this.thumbnailheight===undefined){this.thumbnailheight=90
    }if(this.showtitle=== »false »){this.showtitle=false
    }if(this.showdescription=== »false »){this.showdescription=false
    }if(this.showlength=== »false »){this.showlength=false
    }if(this.showthumbnail=== »false »){this.showthumbnail=false
    }this.showTitle=this.showtitle;
    this.showDescription=this.showdescription;
    this.showLength=this.showlength;
    this.showThumbnail=this.showthumbnail;
    this.thumbnailWidth=this.thumbnailwidth;
    this.thumbnailHeight=this.thumbnailheight;
    this.defaultThumbnailHeight=this.defaultthumbnailheight
    },write:function(c){if(this.autoLoad===undefined){this.autoLoad=true
    }if(this.autoPlay===undefined&&(!(tpIsAndroid()||tpIsIOS())||$pdk.canAutoplayMobile())){this.autoPlay=true
    }else{if((tpIsAndroid()||tpIsIOS())&&!$pdk.canAutoplayMobile()){this.autoPlay=false;
    if(this.autoLoad==false){this.autoLoad=true
    }}}if(this.playAll===undefined){this.playAll=true
    }if(!this.columns){this.columns=2
    }else{this.columns=parseInt(this.columns)
    }if(!this.rows&&this.itemsPerPage!==undefined){this.rows=this.itemsPerPage/this.columns
    }else{if(!this.rows){this.rows=2
    }}if(tpIsIOS()){}if(c){this.container=c
    }else{document.write(‘

    ‘);
    this.container=document.getElementById(this.id);
    this.container.style.width=this.width;
    this.container.style.height=this.height
    }this.style=document.createElement(« style »);
    var d=document.getElementsByTagName(« head »)[0];
    this.style.setAttribute(« type », »text/css »);
    d.appendChild(this.style);
    this.initialize()
    },_bindElement:function(b){if(this.autoLoad==null){this.autoLoad=true
    }if(this.autoPlay===undefined&&(!(tpIsAndroid()||tpIsIOS())||$pdk.canAutoplayMobile())){this.autoPlay=true
    }else{if((tpIsAndroid()||tpIsIOS())&&!$pdk.canAutoplayMobile()){this.autoPlay=false
    }}if(this.playAll==null){this.playAll=true
    }this.container=b;
    this.container.style.width=this.width;
    this.container.style.height=this.height;
    tpController.ready();
    return this.container
    },handleReleaseStart:function(d){var f;
    for(var e=0;
    e0){d=d.substring(0,c)
    }this.currentReleaseUrl=d
    },handleReleaseEnd:function(b){this.currentClip=undefined;
    this.enable()
    },getCurrentIndex:function(){var e=-1;
    var d=this.currentReleaseUrl;
    for(var f=0;
    f0){this.currentIndex–
    }else{if(this.currentIndex==0&&e){this.currentIndex=this.feed.entries.length-1
    }}var f=this.feed.entries[this.currentIndex];
    if(!f){return
    }if(this.autoPlay){this.controller.dispatchEvent(« OnReleaseSelected »,{releaseUrl:f.url,userInitiated:false});
    this.controller.setRelease(f,true);
    return
    }else{var d=this.currentClip;
    if(!this.playing||!d||!(d.noSkip||(d.baseClip&&d.baseClip.noSkip))){this.controller.dispatchEvent(« OnReleaseSelected »,{releaseUrl:f.url,userInitiated:false});
    this.controller.setRelease(f,true)
    }}},handleLoadRelease:function(b){this.doSelectTile(b.data.id,b.data.url)
    },releaseUrlsAreEqual:function(d,e,f){d=d?d.replace(/(.*)\?.*/, »$1″):null;
    e=e?e.replace(/(.*)\?.*/, »$1″):null;
    return d===e||(d!=null?d.indexOf(f)>=0:false)
    },doSelectTile:function(c,d){this.setCurrentReleaseUrl(d);
    if(!this.feed){this.currentMediaId=c;
    this.currentReleaseUrl=d;
    this.currentIndex=-1;
    return
    }this.currentIndex=-1;
    if(c){this.currentIndex=this.setTileSelectedMediaId(c)
    }if(this.currentIndex==-1){this.currentIndex=this.setTileSelectedReleasePid(d)
    }},setTileSelected:function(b){},setTileSelectedMediaId:function(h){var g=-1;
    if(h.indexOf(« / »)>=0){h=h.split(« / »).pop()
    }var j;
    for(var f=0;
    f=0){j=j.split(« / »).pop()
    }if(h==j){g=f;
    var i=this.items[f];
    if(i!==undefined){i.className= »tpRelease tpReleaseSelected »
    }}else{var i=this.items[f];
    if(i!==undefined){i.className= »tpRelease »
    }}}return g
    },setTileSelectedReleasePid:function(e){var f=-1;
    for(var h=0;
    h0){this.paging=true
    }if(this.feed.range.startIndexan.range.startIndex){this.animateForward=false
    }}}else{this.animateForward=false
    }this.feed=an;
    this.loadedTiles=[];
    this.numTiles=an.entries.length;
    if(!this.currentPage||T||!this.pretty){this.refresh();
    this.currentPage=null;
    this.previousPage=null
    }var at=-1;
    var w=-1;
    var aa=0;
    if(this.hasoverlay== »true »){var au=document.createElement(« div »);
    au.className= »tpReleaseListOverlay »;
    this.container.appendChild(au);
    aa=au.clientHeight
    }var af=document.createElement(« ul »);
    af.className= »tpGrid »;
    this.container.appendChild(af);
    $pdk.jQuery(af).css(« margin-top »,parseInt($pdk.jQuery(af).css(« margin-top »))+aa);
    af.ontouchstart=function(b){this.startX=b.changedTouches[0].pageX;
    this.startY=b.changedTouches[0].pageY
    };
    af.ontouchend=function(b){if(this.startX&&((this.startX-b.changedTouches[0].pageX)>100)){$pdk.controller.nextRange()
    }else{if(this.startX&&((b.changedTouches[0].pageX-this.startX)>100)){$pdk.controller.previousRange()
    }}};
    this.items=[];
    var ac,ar,h,O,S,Q,am,ag,Z,aj,aq;
    var V=($pdk.jQuery(af).innerWidth())/this.columns;
    var P=($pdk.jQuery(af).innerHeight())/this.rows;
    var W,ab,ae,ak;
    var U=16/9;
    if(this.allowscrolling== »true »){$(af).append( »

  • « );
    P=parseInt(this.thumbnailheight)+parseInt($(af).find(« .tpRelease »).css(« margin-top »))+parseInt($(af).find(« .tpRelease »).css(« margin-bottom »))+parseInt($(af).find(« .tpRelease »).css(« padding-top »))+parseInt($(af).find(« .tpRelease »).css(« padding-bottom »))+parseInt($(af).find(« .tpRelease »).css(« border-top-width »))+parseInt($(af).find(« .tpRelease »).css(« border-bottom-width »))+parseInt($(af).find(« a »).css(« margin-top »))+parseInt($(af).find(« a »).css(« margin-bottom »))+parseInt($(af).find(« a »).css(« border-top-width »))+parseInt($(af).find(« a »).css(« border-bottom-width »))+parseInt($(af).find(« a »).css(« padding-top »))+parseInt($(af).find(« a »).css(« padding-bottom »))+parseInt($(af).find(« .tpThumbnail »).css(« margin-top »))+parseInt($(af).find(« .tpThumbnail »).css(« margin-bottom »))+parseInt($(af).find(« .tpThumbnail »).css(« border-top-width »))+parseInt($(af).find(« .tpThumbnail »).css(« border-bottom-width »))+parseInt($(af).find(« .tpThumbnail »).css(« padding-top »))+parseInt($(af).find(« .tpThumbnail »).css(« padding-bottom »))+parseInt($(af).find(« .tpThumbnail img »).css(« margin-top »))+parseInt($(af).find(« .tpThumbnail img »).css(« margin-bottom »))+parseInt($(af).find(« .tpThumbnail img »).css(« border-top-width »))+parseInt($(af).find(« .tpThumbnail img »).css(« border-bottom-width »))+parseInt($(af).find(« .tpThumbnail img »).css(« padding-top »))+parseInt($(af).find(« .tpThumbnail img »).css(« padding-bottom »));
    $(af).children().first().remove();
    V-=10;
    $pdk.jQuery(af).css(« overflow-y », »auto »)
    }if(this.thumbnailwidth&&this.thumbnailheight){U=this.thumbnailwidth/this.thumbnailheight
    }for(var R=0;
    R0){Z.innerHTML+=’ (‘+tpMillisToStr(ah)+ ») »
    }}if(this.showDescription){aj=document.createElement(« p »);
    aj.innerHTML=an.entries[R].description;
    ag.appendChild(aj)
    }if(this.showThumbnail){aq=document.createElement(« img »);
    aq.style.display= »none »;
    aq.style.visibility= »hidden »;
    aq.tile=ac;
    aq.onload=aq.onerror=function(g){this.style.display= » »;
    this.style.visibility= »visible »;
    var f=$pdk.jQuery(S).width();
    var b=$pdk.jQuery(S).height();
    var n=parseInt($pdk.jQuery(this).css(« margin-left »));
    var o=parseInt($pdk.jQuery(this).css(« margin-right »));
    var p=parseInt($pdk.jQuery(this).css(« margin-top »));
    var d=parseInt($pdk.jQuery(this).css(« margin-bottom »));
    n=(n?n:0);
    o=(n?n:0);
    p=(n?n:0);
    d=(n?n:0);
    var c=f-n-o;
    var j=b-p-d;
    if(g!==true){tpScaleImage(this,c,j);
    var e=this.newWidth;
    var l=this.newHeight;
    if(!e){e=c
    }if(!l){l=j
    }}else{e=0;
    l=0;
    this.style.display= »none »
    }var m=(j-l)/2;
    var k=(c-e)/2;
    if(e<c){this.style.paddingLeft=Math.floor(k)+"px";
    this.style.paddingRight=Math.floor(k)+"px"
    }else{if(lul .tpRelease a, ul# »+this.id+ ».tpReleaseList .tpRelease a { background-color: # »+this.itembackgroundcolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList>ul .tpRelease a .tpMetadata, ul# »+this.id+ ».tpReleaseList .tpRelease a .tpMetadata { background-color: # »+this.itembackgroundcolor.substr(2)+ »; } »
    }if(this.itemframecolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease a { border-color: # »+this.itemframecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpShine { background-color: # »+this.itemframecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpShine { border-color: # »+this.itemframecolor.substr(2)+ »; } »
    }if(this.textframecolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpMetadata { border-color: # »+this.textframecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease a .tpMetadata .tpGroup { border-color: # »+this.textframecolor.substr(2)+ »; } »
    }if(this.textcolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease a { color: # »+this.textcolor.substr(2)+ »; } »
    }if(this.thumbnailframecolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpThumbnail { border-color: # »+this.thumbnailframecolor.substr(2)+ »; } »
    }if(this.thumbnailbackgroundcolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpThumbnail { background-color: # »+this.thumbnailbackgroundcolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpThumbnail img { background-color: # »+this.thumbnailbackgroundcolor.substr(2)+ »; } »
    }if(this.thumbnailpaddingcolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease .tpThumbnail { background-color: # »+this.thumbnailpaddingcolor.substr(2)+ »; } »
    }if(this.framecolor){i+= »# »+this.id+ ».tpReleaseList { border-color: # »+this.framecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList ul { border-color: # »+this.framecolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList ol { border-color: # »+this.framecolor.substr(2)+ »; } »
    }if(this.texthighlighthovercolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover .tpShine { background-color: # »+this.texthighlighthovercolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover .tpShine { border-color: # »+this.texthighlighthovercolor.substr(2)+ »; } »
    }if(this.texthovercolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover a { color: # »+this.texthovercolor.substr(2)+ »; } »
    }if(this.texthighlighthovercolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover a .tpMetadata .tpGroup { border-color: # »+this.texthighlighthovercolor.substr(2)+ » !important; } »
    }if(this.thumbnailhighlighthovercolor){i+= »# »+this.id+ ».tpReleaseList .tpRelease:hover a .tpThumbnail { border-color: # »+this.thumbnailhighlighthovercolor.substr(2)+ » !important; } »
    }if(this.itemshineselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected .tpShine { background-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected .tpShine { border-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »
    }if(this.textselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected a { color: # »+this.textselectedcolor.substr(2)+ »; } »
    }if(this.texthighlightselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected a .tpMetadata .tpGroup { border-color: # »+this.texthighlightselectedcolor.substr(2)+ » !important; } »
    }if(this.thumbnailhighlightselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected a .tpThumbnail { border-color: # »+this.thumbnailhighlightselectedcolor.substr(2)+ » !important; } »
    }if(this.itemshineselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected:hover .tpShine { background-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »;
    i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected:hover .tpShine { border-color: # »+this.itemshineselectedcolor.substr(2)+ »; } »
    }if(this.textselectedcolor){i+= »# »+this.id+ ».tpReleaseList .tpReleaseSelected:hover a { color: # »+this.textselectedcolor.substr(2)+ »; } »
    }if(this.backgroundcolor&&this.itembackgroundcolor&&this.framecolor){i+= ».tpReleaseList ::-webkit-scrollbar { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-webkit-scrollbar-track { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-webkit-scrollbar-thumb { background-color: # »+this.itembackgroundcolor.substr(2)+ »; border-color: # »+this.framecolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-moz-scrollbar { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-moz-scrollbar-track { background-color: # »+this.backgroundcolor.substr(2)+ »}\n »;
    i+= ».tpReleaseList ::-moz-scrollbar-thumb { background-color: # »+this.itembackgroundcolor.substr(2)+ »; border-color: # »+this.framecolor.substr(2)+ »}\n »
    }if(this.style.styleSheet){this.style.styleSheet.cssText=i
    }else{this.style.appendChild(document.createTextNode(i))
    }}if(this.currentReleaseUrl||this.currentMediaId){this.doSelectTile(this.currentMediaId,this.currentReleaseUrl)
    }var Y=this.currentClip;
    if(Y&&(Y.baseClip&&(Y.baseClip.noSkip))){this.disable()
    }else{if(this.blocker){this.enable()
    }}},handleTileLoaded:function(f){var d=this;
    this.loadedTiles.push(f);
    if(this.loadedTiles.length==this.numTiles){if(!this.pretty){$pdk.jQuery(this.container).find(« .tpRelease »).css(« display », » »);
    $pdk.jQuery(d.previousPage).remove()
    }else{if(this.previousPage){this.paging=true;
    var e=$pdk.jQuery(this.currentPage).width();
    if(this.animateForward){$pdk.jQuery(this.container).find(« .tpRelease »).css(« display », » »).css(« -webkit-filter », »blur(1px) »).css(« filter », »blur(2px) »);
    $pdk.jQuery(this.container).find(« .tpGrid .tpRelease »).animate({left: »-= »+e},600,function(){$pdk.jQuery(d.previousPage).remove();
    d.paging=false;
    $pdk.jQuery(d.container).find(« .tpRelease »).css(« -webkit-filter », » »).css(« filter », » »);
    if(d.eventQueue&&d.eventQueue.length){d.handleReleaseModelRefreshed(d.eventQueue.shift())
    }})
    }else{$pdk.jQuery(this.container).find(« .tpRelease »).css(« display », » »).css(« -webkit-filter », »blur(1px) »).css(« filter », »blur(2px) »);
    $pdk.jQuery(this.container).find(« .tpGrid .tpRelease »).animate({left: »+= »+e},600,function(){$pdk.jQuery(d.previousPage).remove();
    d.paging=false;
    $pdk.jQuery(d.container).find(« .tpRelease »).css(« -webkit-filter », » »).css(« filter », » »);
    if(d.eventQueue&&d.eventQueue.length){d.handleReleaseModelRefreshed(d.eventQueue.shift())
    }})
    }}else{$pdk.jQuery(this.container).find(« .tpRelease »).fadeIn(400,function(){d.paging=false
    })
    }}if(this.showDescription){setTimeout(function(a){for(var b=0;
    b<d.loadedTiles.length;
    b++){tpEllipsis($pdk.jQuery(d.loadedTiles[b]).find(".tpGroup")[0],$pdk.jQuery(d.loadedTiles[b]).find(".tpGroup p")[0])
    }},1)
    }}},doInitialLoad:function(b){if(!b.entries||b.entries.length<=0){return
    }tpDebug("doInitialLoad called");
    if(!this.currentReleaseUrl&&this.autoPlay&&!this.hasAutoPlayed){tpDebug("doInitialLoad firing OnReleaseSelected");
    this.controller.dispatchEvent("OnReleaseSelected",{releaseUrl:b.entries[0].url,userInitiated:false});
    this.controller.setRelease(b.entries[0],false);
    this.wasSetByReleaseList=true
    }else{if(!this.currentReleaseUrl&&this.autoLoad&&!this.hasAutoLoaded){this.hasAutoLoaded=true;
    this.controller.loadRelease(b.entries[0],false);
    this.wasSetByReleaseList=true
    }}},handleMediaStart:function(c){this.playing=true;
    var d=c.data;
    if(d.baseClip&&(d.baseClip.noSkip)){this.disable()
    }else{if(this.blocker){this.enable()
    }}this.currentClip=d
    },disable:function(){if(tpIsIPhone()||tpIsAndroid()){return
    }if(!this.blocker){this.blocker=document.createElement("div");
    this.blocker.style.width="100%";
    this.blocker.style.height="100%";
    this.blocker.style.position="absolute";
    this.blocker.style.top="0";
    this.blocker.style.left="0";
    this.blocker.style.background="#"+this.backgroundcolor.substr(2);
    this.blocker.style.opacity="0.75";
    this.blocker.style.filter="alpha(opacity=75)";
    this.blocker.innerHTML=" ";
    this.blocker.style.zIndex="500";
    this.container.appendChild(this.blocker)
    }this.blocker.style.display="";
    var b=this.container.childNodes;
    for(child in b){if(child.style){child.style.opacity="0.75";
    child.style.filter="alpha(opacity=75)"
    }}},enable:function(){tpDebug("Doing enable");
    try{if(this.blocker){this.blocker.style.display="none"
    }var c=this.container.childNodes;
    for(child in c){if(child.style){child.style.opacity="";
    child.style.filter=""
    }}}catch(d){tpDebug("enabled() threw an error with "+d.message+" on "+d.lineNumber)
    }},handleMediaEnd:function(b){this.playing=false;
    tpDebug("Enabling releaseList");
    this.enable()
    },output:function(c){var d="";
    for(prop in c){d+=prop+": "+c[prop]+"\n"
    }alert(d)
    }});
    ReleaseList=tpReleaseList;
    $pdk.ns("$pdk.classes");
    $pdk.classes.ReplacePlaylistManager=$pdk.extend(function(){},{constructor:function(){},replacePlaylist:function(f,g){var h=false;
    for(var e=0;
    e<f.length;
    e++){if(f[e].playlistPlugIn.replacePlaylist&&f[e].playlistPlugIn.replacePlaylist.apply(f[e].playlistPlugIn,[g])){h=true
    }}return h
    }});
    var SeekEvents={USERSEEKED:"userseeked",PROGRAMATICALLYSEEKED:"programaticallyseeked",SEEKFAILED:"seekfailed"};
    var SeekStates={PAUSED:"paused",PLAYING:"playing",USERSEEKING:"userseeking",PROGRAMATICALLYSEEKING:"programaticallyseeking",ERROR:"error"};
    SeekHandler=EventDispatcher.extend({init:function(d){this.videoEngine=d;
    this.seekInterval=350;
    this.seekState=this.videoEngine.isPaused()?SeekStates.PAUSED:SeekStates.PLAYING;
    var c=this;
    if(!tpIsIOS()){}else{}this.videoEngine.addEventListener("MEDIA_SEEKED",function(a){c.onSeeked(a)
    });
    this.lastTime=this.videoEngine.getCurrentTime()/1000
    },stopTimer:function(){clearInterval(this.seekTimer)
    },startTimer:function(){var b=this;
    this.lastTime=0;
    this.seekTimer=setInterval(function(){b.onTimer()
    },this.seekInterval)
    },onSeeked:function(c){tpDebug("got seeked event from "+this.lastTime+" to"+this.videoEngine.getCurrentTime());
    this.lastTime=this.video.getCurrentTime()/1000;
    if(false&&this.seeking&&Math.abs(this.videoEngine.getCurrentTime()/1000-this.seekingTo)=3
    },checkSeekable:function(b){return false
    },checkBuffered:function(b){return false
    },destroy:function(){this.buildListenerChain();
    this.removeProgressListeners();
    clearInterval(this.seekTimer)
    }});
    StandbyManager=Class.extend({init:function(e,f){this.controller=e;
    this.pbm=f;
    var h=this;
    this.controller.registerFunction(« showMenuCard »,this,this.showMenuCard);
    this.controller.registerFunction(« checkIfEndCardExists »,this,this.checkIfEndCardExists);
    this.controller.addEventListener(« OnLoadReleaseUrl »,function(a){if(!h.formVisible){h.controller.dispatchEvent(« OnShowPlayOverlay »,true)
    }else{}h.controller.dispatchEvent(« OnShowPreviewImageOverlay »,false)
    });
    this.controller.addEventListener(« OnMediaEnd »,function(a){h.playing=false
    });
    this.controller.addEventListener(« OnMediaStart »,function(a){h.playing=true
    });
    this.controller.addEventListener(« OnReleaseEnd »,function(a){h.playing=false
    });
    this.controller.addEventListener(« OnClearCurrentRelease »,function(a){tpDebug(« StandbyManager got « +a.type);
    h.controller.dispatchEvent(« OnShowPreviewImageOverlay »,false);
    h.controller.dispatchEvent(« OnShowPlayOverlay »,false);
    h.setStandby(false)
    });
    this.controller.addEventListener(« OnReleaseError »,function(a){tpDebug(« StandbyManager got « +a.type);
    h.setStandby(false)
    });
    this.controller.addEventListener(« OnShowCard »,function(a){tpDebug(« StandbyManager got « +a.type);
    if(a.data.deck== »forms »){h.formVisible=true
    }});
    this.controller.addEventListener(« OnHideCard »,function(a){tpDebug(« StandbyManager got « +a.type);
    if(a.data.deck== »forms »){h.formVisible=false
    }});
    this.controller.addEventListener(« OnSetReleaseUrl »,function(a){h.setStandby(false)
    });
    this.controller.addEventListener(« OnSetRelease »,function(a){h.setStandby(false)
    });
    this.controller.addEventListener(« OnResetPlayer »,function(a){h.setStandby(false)
    });
    var g=this.controller.getProperty(« endCard »);
    if(g){this.endCardID=g
    }else{this.endCardID= »forms:tpMenuCard »
    }},showMenuCard:function(b){if(b){this.controller.showPlayerCard(« forms », »tpMenuCard »)
    }else{this.controller.hidePlayerCard(« forms »)
    }},setStandby:function(c,d){if(c){this.doStartStandby(d)
    }else{this.doRemoveStandby()
    }},checkIfEndCardExists:function(c){var d=this.controller.getProperty(« endCard »);
    if(d){this.endCardID=d
    }else{this.endCardID= »tpMenuCard »
    }return true
    },doStartStandby:function(j){tpDebug(« doing startStandby »);
    if(this.playing==true){return
    }this.isStandBy=true;
    var k=this.controller.getProperty(« endCard »);
    if(k){this.endCardID=k
    }if(!j){tpDebug(« dispatching OnShowPlayOverlay true »);
    this.controller.dispatchEvent(« OnShowPlayOverlay »,!this.formVisible)
    }else{tpDebug(« call to show card »);
    var l=false;
    if(this.endCardID.indexOf(« : »)!=-1){var o=this.endCardID.split(« : »);
    var i=o[0];
    var p=o[1];
    this.controller.showPlayerCard(i,p);
    l=(i!== »forms »)
    }else{this.controller.showPlayerCard(« forms »,this.endCardID)
    }if(tpIsIOS()){this.controller.showFullScreen(false)
    }this.controller.dispatchEvent(« OnShowPlayOverlay »,l)
    }var n;
    var m=this;
    this.playingListener=function(a){m.controller.removeEventListener(« OnMediaPlaying »,m.playingListener);
    if(m.isStandBy){tpDebug(« playingListener hiding overlay »);
    m.isStandBy=false
    }};
    this.controller.addEventListener(« OnMediaPlaying »,this.playingListener,true)
    },doRemoveStandby:function(){if(this.isStandby){this.isStandby=false;
    this.controller.dispatchEvent(« OnShowPlayOverlay »,false)
    }}});
    TokenManager=Class.extend({init:function(e){this.controller=e;
    this.pluginsLoaded=false;
    this.waitTokens={};
    var f=this;
    var d=this.controller.getProperty(« token »);
    if(d){this.setToken(d, »urn:theplatform:auth:token »)
    }this.controller.registerFunction(« setToken »,this,this.setToken);
    this.plugInsCompleteHandler=function(a){f.plugInsComplete.apply(f,arguments)
    };
    this.controller.addEventListener(« OnPlugInsComplete »,this.plugInsCompleteHandler)
    },plugInsComplete:function(c){this.controller.removeEventListener(« OnPlugInsComplete »,this.plugInsCompleteHandler);
    this.pluginsLoaded=true;
    for(var d in this.waitTokens){this._doSetToken(this.waitTokens[d])
    }},setToken:function(d,f){if(!f){f= »urn:theplatform:auth:token »
    }var e={token:d,type:f,globalDataType: »com.theplatform.pdk.data::TokenInfo »};
    if(this.pluginsLoaded){this._doSetToken(e)
    }else{this.waitTokens[f]=e
    }},_doSetToken:function(b){this.controller.dispatchEvent(« OnSetToken »,b)
    }});
    UrlManager=Class.extend({init:function(b){this.controller=b;
    this.plugins=[];
    this._currentQueue=[];
    this.totalUrlPluginsRegistered=0;
    this.totalUrlPluginsLoaded=0;
    this.controller.registerFunction(« registerURLPlugIn »,this,this.registerURLPlugIn);
    this.controller.registerFunction(« setClip »,this,this.setClip)
    },checkClip:function(d,c){this._context={clip:d,callback:c,complete:false,found:false};
    this._currentQueue=this.plugins.concat();
    if(this._currentQueue.length===0){c(d);
    return true
    }else{if(!this._processNextPlugin()){c(d)
    }return false
    }},_processNextPlugin:function(){var c=false,d;
    while(!c&&this._currentQueue.length>0){d=this._currentQueue.shift();
    c=d.component.rewriteURL(this._context.clip)
    }this._context.found=c?true:this._context.found;
    return this._context.found
    },registerURLPlugIn:function(d,f,e){e=parseInt(e);
    this.plugins.push({component:d,urlType:f,priority:(isNaN(e)?1000:e)});
    this.totalUrlPluginsRegistered++;
    this.plugins.sort(this.compare)
    },setClip:function(b){if(this._currentQueue.length===0){if(!this._context.complete){this._context.clip=b;
    this._context.callback(b);
    this._context.complete=true
    }}else{this._context.clip=b;
    if(!this._processNextPlugin()){this.setClip(b)
    }}},compare:function(a,b){return a.priority-b.priority
    }});
    function tpIsAndroid(){if(navigator.userAgent.match(/iPhone/i)){return false
    }else{if(navigator.userAgent.match(/Android/i)){return true
    }else{return false
    }}}function tpIsChrome(){if(navigator.userAgent.toLowerCase().match(/chrome/i)){return true
    }else{return false
    }}function tpIsAndroidLegacy(){if(!navigator.userAgent.match(/Android/i)){return false
    }else{if(navigator.userAgent.toLowerCase().indexOf(« android 1. »)!=-1){return true
    }else{if(navigator.userAgent.toLowerCase().indexOf(« android 2. »)!=-1){return true
    }else{if(navigator.userAgent.toLowerCase().indexOf(« android 3.0 »)!=-1){return true
    }else{if(navigator.userAgent.toLowerCase().indexOf(« silk »)!=-1){return true
    }else{return false
    }}}}}}function tpIsIOS(){if(navigator.userAgent.match(/iPad/i)){return true
    }if(navigator.userAgent.match(/iPhone/i)){return true
    }else{return false
    }}function tpIsIPhone(){if(navigator.userAgent.match(/iPhone/i)){return true
    }else{return false
    }}function tpGetPid(d){var f=d;
    if(f&&f.indexOf(« pid= »)==-1){f=f.substring(f.lastIndexOf(« / »)+1);
    var e=f.indexOf(« ? »);
    if(e>0){f=f.substring(0,e)
    }}else{if(f){f=f.substring(f.indexOf(« pid= »)+4);
    var e=f.indexOf(« & »);
    if(e>0){f=f.substring(0,e)
    }}}return f
    }tpControllerClass=$pdk.queue.Controller;
    function tpScaleImage(p,l,k){var r=parseInt(p.naturalWidth);
    var j=parseInt(p.naturalHeight);
    var q=j/r;
    p.originalHeight=j;
    p.originalWidth=j;
    var m=k/l;
    var n=l/r;
    var o=k/j;
    if((n-o)>0){p.height=(k);
    p.style.width= »auto »;
    p.newHeight=k;
    p.newWidth=k/q
    }else{if((n-o)-1)
    }function tpIsWebKit(){return(navigator.userAgent.toLowerCase().indexOf(« webkit »)>-1)
    }function tpIsSafari(){return(navigator.userAgent.toLowerCase().indexOf(« safari »)>-1)
    }function tpIsFirefox(){return(navigator.userAgent.toLowerCase().indexOf(« firefox »)>-1)
    }function tpParseXml(d){var e=null;
    if(window.DOMParser){var f=new DOMParser();
    e=f.parseFromString(d, »text/xml »)
    }else{e=new ActiveXObject(« Microsoft.XMLDOM »);
    e.async= »false »;
    e.loadXML(d)
    }tpRemoveWhiteSpace(e);
    return e
    }function tpRemoveWhiteSpace(e){var f=/\S/;
    for(var h=0;
    h<e.childNodes.length;
    h++){var g=e.childNodes[h];
    if(g.nodeType==3&&(!(f.test(g.nodeValue)))){e.removeChild(g);
    h–
    }else{if(g.nodeType==1){tpRemoveWhiteSpace(g)
    }}}}function tpRemoveComments(e){for(var d=0;
    d0){f=g.substr(0,g.indexOf(« ms »))
    }else{var h=g.split(« : »);
    while(h.length>0){var e=h.shift();
    if(h.length==2){f+=((e)*1000*60*60)
    }if(h.length==1){f+=((e)*1000*60)
    }if(h.length==0){if(e.indexOf(« . »)){f+=((e)*1000)
    }else{f+=(e)*1000
    }}}}}return f
    }function tpSendUrl(d){var c=document.createElement(« img »);
    c.src=d;
    c.style.display= »none »;
    c.width=1;
    c.height=1;
    c.left=-1111;
    c.src=d;
    document.body.appendChild(c);
    tpDebug(« sent tracking/impressiong to « +d);
    document.body.removeChild(c)
    }function tpGetIEVersion(){var f=9999;
    if(navigator.appName== »Microsoft Internet Explorer »){var e=navigator.userAgent;
    var d=new RegExp(« MSIE ([0-9]{1,}[.0-9]{0,}) »);
    if(d.exec(e)!=null){f=parseFloat(RegExp.$1)
    }}return f
    }function tpGetComponentSize(e){var h=false;
    var g=e.style.height;
    var f=e.style.width;
    if(g=== »100% »&&e.style.width=== »100% »||(!g&&!f)){h=true
    }if(h&&e.parentNode&&(e.offsetHeight==0&&e.offsetWidth==0)){return tpGetComponentSize(e.parentNode)
    }else{if(!h){g=g.replace(« px », » »);
    f=f.replace(« px », » »);
    return{width:parseInt(f),height:parseInt(g)}
    }}return{width:e.offsetWidth,height:e.offsetHeight}
    }function tpGetScriptPath(e){if(e===undefined&&tpScriptPath!==undefined){return tpScriptPath
    }var f=document.getElementsByTagName(« script »);
    var g;
    if(e!==undefined){for(var h=0;
    h=0){g=f[h].src;
    break
    }}}else{g=f[f.length-1].src
    }if(!g){g=f[f.length-1].src
    }if(g.indexOf(« / »)==-1){return » »
    }g=g.substring(0,g.lastIndexOf(« / »));
    return g
    }function tpMillisToStr(k){var l=k/1000;
    var h=Math.floor(l/(60*60));
    l=l-(h*(60*60));
    var g=Math.floor(l/60);
    var j=Math.floor(l)%60;
    var i= » »;
    if(h>0){i=h.toString()+ »: »;
    if(g<10){i+="0"
    }}i+=g+":";
    if(j=o.scrollHeight;
    var m;
    var q;
    while(!u){m=$pdk.jQuery(o).height();
    q=o.scrollHeight;
    if(tpIsFirefox()){q=0;
    $pdk.jQuery(o).children().each(function(a){q+=$pdk.jQuery(o).children().eq(a).outerHeight()
    })
    }if((n-s)m){i.innerHTML= » »;
    v=false
    }u=true
    }else{if(m>=q){s=r;
    r=Math.floor((r+n)/2);
    i.innerHTML=p.substr(0,r)+ »… »;
    v=p.substr(r-1,2).match(/^[a-zA-Z]+$/)
    }else{if(m100){break
    }}if(i.innerHTML.substr(0,r).match(/[\W]+$/)){i.innerHTML=i.innerHTML.substr(0,r).replace(/[\W]+$/g, » »)+ »… »
    }if(v){i.innerHTML=p.substr(0,r);
    i.innerHTML=i.innerHTML.replace(/[\W]+[\w]+$/g, » »);
    i.innerHTML+= »… »
    }}function tpCreateColorizedStateStyles(u,o,s,w,t,A,q){var z=document.createElement(« canvas »);
    var r=this;
    if(z.getContext&&z.getContext(« 2d »)){var v=$pdk.jQuery(u).css(« background-image »);
    var y= » »;
    if(v&&v!== »none »){if(v.indexOf(‘url(« ‘)==0||v.indexOf(« url(‘ »)==0){v=v.substr(5,v.length-7)
    }else{if(v.indexOf(« url(« )==0){v=v.substr(4,v.length-5)
    }}var x=new Image();
    x.onload=function(){var a=document.createElement(« canvas »);
    var c=a.getContext(« 2d »);
    a.style.borderColor= »# »+t.substr(2);
    var b=$pdk.jQuery(a).css(« border-color »);
    b=b.substr(4,b.length-5).split(« , « );
    a.width=this.width;
    a.height=this.height;
    c.drawImage(this,0,0,this.width,this.height);
    tpColorize(c,b[0],b[1],b[2]);
    y=o.replace(/\{url\}/g, »url(« +a.toDataURL()+ ») »).replace(/\{state\}/g, »:hover »);
    if(A.styleSheet){A.styleSheet.cssText=y+A.styleSheet.cssText
    }else{A.insertBefore(document.createTextNode(y),A.firstChild)
    }};
    x.src=v;
    var p=new Image();
    p.onload=function(){var a=document.createElement(« canvas »);
    var c=a.getContext(« 2d »);
    a.style.borderColor= »# »+w.substr(2);
    var b=$pdk.jQuery(a).css(« border-color »);
    b=b.substr(4,b.length-5).split(« , « );
    a.width=this.width;
    a.height=this.height;
    c.drawImage(this,0,0,this.width,this.height);
    tpColorize(c,b[0],b[1],b[2]);
    y=o.replace(/\{url\}/g, »url(« +a.toDataURL()+ ») »).replace(/\{state\}/g,(q?q: »:active »));
    if(A.styleSheet){A.styleSheet.cssText+=y
    }else{A.appendChild(document.createTextNode(y))
    }};
    p.src=v;
    var B=new Image();
    B.onload=function(){var a=document.createElement(« canvas »);
    var c=a.getContext(« 2d »);
    a.style.borderColor= »# »+s.substr(2);
    var b=$pdk.jQuery(a).css(« border-color »);
    b=b.substr(4,b.length-5).split(« , « );
    a.width=this.width;
    a.height=this.height;
    c.drawImage(this,0,0,this.width,this.height);
    tpColorize(c,b[0],b[1],b[2]);
    y=o.replace(/\{url\}/g, »url(« +a.toDataURL()+ ») »).replace(/\{state\}/g, » »);
    if(A.styleSheet){A.styleSheet.cssText+=y
    }else{A.appendChild(document.createTextNode(y))
    }};
    B.src=v
    }}}function tpColorize(V,R,K,g){var G={r:R,g:K,b:g};
    function Q(e,f,j){var e=e/360,f=f/100,j=j/100,a,c,d;
    if(f==0){a=c=d=j
    }else{O=e*6;
    P=Math.floor(O);
    h=j*(1-f);
    i=j*(1-f*(O-P));
    s=j*(1-f*(1-(O-P)));
    if(P==0){a=j;
    c=s;
    d=h
    }else{if(P==1){a=i;
    c=j;
    d=h
    }else{if(P==2){a=h;
    c=j;
    d=s
    }else{if(P==3){a=h;
    c=i;
    d=j
    }else{if(P==4){a=s;
    c=h;
    d=j
    }else{a=j;
    c=h;
    d=i
    }}}}}}return{r:Math.round(a*255),g:Math.round(c*255),b:Math.round(d*255)}
    }function S(c,m,l){c=c/255;
    m=m/255;
    l=l/255;
    var e=Math.min(c,m,l),d=Math.max(c,m,l),f=d-e,n={};
    n.v=d;
    if(f==0){n.h=0;
    n.s=0
    }else{n.s=f/d;
    var k=(((d-c)/6)+(f/2))/f;
    var a=(((d-m)/6)+(f/2))/f;
    var j=(((d-l)/6)+(f/2))/f;
    if(c==d){n.h=j-a
    }else{if(m==d){n.h=(1/3)+k-j
    }else{if(l==d){n.h=(2/3)+a-k
    }}}if(n.h1){n.h-=1
    }}return{h:(n.h*360),s:(n.s*100),v:(n.v*100)}
    }var L;
    if(V.hasOwnProperty(« canvas »)||V.canvas){L=V
    }if(V.hasOwnProperty(« width »)||V.width){L=V.getContext(« 2d »)
    }if(!L){console.error(« Trying to colorize non-canvas »);
    return
    }var M=L.getImageData(0,0,L.canvas.width,L.canvas.height);
    var v=S(G.r,G.g,G.b);
    var J=v.h/360;
    var I=v.s/100;
    var O=J*6;
    var P=Math.floor(O);
    var U=v.v*2.55;
    for(var b=0;
    b0){for(var d=0;
    d0){var e=this.getVideoEngineTextTrackToShow();
    this.log(« loadCaptions for « +this.currentVESidecarTextTracks.length+ » sidecar tracks »);
    if(e){this.log(« \ttextTrackToShow: « +e.language+ », « +e.mimeType+ », « +e.embedded);
    var d;
    for(var f=0;
    f0&&d.height>0){this.ve.setCaptionsOverlayArea(d)
    }},setCaptionsMediaArea:function(c){var d=c.data;
    if(d.height>0&&d.width>0){this.ve.setCaptionsMediaArea(d)
    }},recalculateCaptionsContainer:function(){var b=this.controller.getMediaArea();
    if(b.height>0&&b.width>0){this.ve.setCaptionsMediaArea(b)
    }},showSelectedLanguage:function(){this.log(« showSelectedLanguage: « +this.selectedTextTrackLanguage);
    var b=this.getVideoEngineTextTrackToShow();
    if(b){this.log(« \tcalling removeVisibleOverlayCuePointsGwt then showCaptions »);
    this.controller.callFunction(« removeVisibleOverlayCuePointsGwt »);
    this.ve.showCaptions(b)
    }else{this.log(« \tcalling hideCaptions »);
    this.ve.hideCaptions(false)
    }},getVideoEngineTextTrackToShow:function(){var b=this.controller.callFunction(« getTextTrackByLanguageGwt »,[this.selectedTextTrackLanguage]);
    return b&&this.isVideoEngineTextTrack(b)?b:null
    },textTrackForLanguageIsOverlay:function(b){return !this.getVideoEngineTextTrackToShow(b)
    },continueShowingOverlayTextTrack:function(b){return b&&this.textTrackForLanguageIsOverlay(b)
    },wasShowingVideoEngineTextTrack:function(b){return b&&b!= »none »
    },nowShowingVideoEngineTextTrack:function(b){return b&&b.language
    },iosFullscreenChange:function(c){this.log(« fullscreenChange »);
    if(!c.data&&this.currentVETextTracks&&this.currentVETextTracks.length>0){this.log(« NOT fullscreen and iOS, so update selected language if necessary »);
    var d=this.ve.getShowingCaptions();
    if(this.nowShowingVideoEngineTextTrack(d)){this.controller.setSubtitleLanguage(d.language)
    }else{if(this.continueShowingOverlayTextTrack(this.selectedTextTrackLanguage)){}else{if(this.wasShowingVideoEngineTextTrack(this.selectedTextTrackLanguage)){this.controller.setSubtitleLanguage(« none »)
    }}}}},iosOnMediaLoadStart:function(b){this.log(« iosOnMediaLoadStart: just show/hide on first clip »);
    if(this.isFirstClip(b.data)){this.showHideOnFirstClip(b.data)
    }},nativeControlsOnMediaStart:function(c){this.log(« iosOnMediaStart »);
    var d=c.data;
    if(d.baseClip.isAd){this.log(« Is ad, but doing nothing here for now. Should be hidden already. »)
    }else{this.hideCaptionsWhenPlaying(false);
    if(this.lastSelectedTextTracks){this.log(« not an ad and have last selected subtitles, so showing them »);
    this.ve.showCaptions(this.lastSelectedTextTracks);
    this.selectedTextTrackLanguage=this.lastSelectedTextTracks.language;
    this.lastSelectedTextTracks=undefined
    }else{this.log(« not an ad and no lastSelected, so nothing to do »)
    }}},nativeControlsOnMediaEnd:function(c){this.log(« iosOnMediaEnd »);
    var d=c.data;
    if(this.contentClipToAdClip(d)){this.log(« next clip is ad, so hiding »);
    this.lastSelectedTextTracks=this.ve.getShowingCaptions();
    this.ve.hideCaptions(false);
    this.hideCaptionsWhenPlaying(true)
    }else{this.log(« next clip is NOT an ad, so doing nothing »)
    }},hideCaptionsWhenPlaying:function(b){if(b){this.controller.addEventListener(« OnMediaPlaying »,this.mediaPlayingHandler)
    }else{this.controller.removeEventListener(« OnMediaPlaying »,this.mediaPlayingHandler)
    }},isFirstClip:function(b){if(this._firstClipIsNext){this._firstClipIsNext=false;
    return true
    }else{return false
    }},showHideOnFirstClip:function(l){this.log(« showHideOnFirstClip »);
    var h=l.baseClip.isAd;
    if(this.currentVESidecarTextTracks&&this.currentVESidecarTextTracks.length>0){var j;
    for(var n=0;
    n<this.currentVESidecarTextTracks.length;
    n++){var m=this.currentVESidecarTextTracks[n];
    if(m.show){j=m;
    break
    }}if(j&&!h){this.log("showingSidecarTextTracks and is not an ad, so show them");
    this.ve.showCaptions(j)
    }else{this.log("showingSidecarSubtitles: "+(j?j.language:"no showingSidecarSubtitles object")+", isAd:"+h);
    var k=this.ve.getShowingCaptions();
    if(k&&k.embedded){this.ve.showCaptions(k)
    }else{this.ve.hideCaptions(false)
    }if(h){this.log("storing lastSelectedTextTracks");
    var i=j?j:k;
    this.lastSelectedTextTracks=i;
    this.hideCaptionsWhenPlaying(true)
    }}}},contentClipToAdClip:function(j){var f=false;
    if(!j.baseClip.isAd){var i=false;
    for(var g=0;
    g<this.playlist.clips.length;
    g++){var h=this.playlist.clips[g];
    if(i){if(h.baseClip.isAd){f=true
    }else{this.log("next clip not an ad")
    }break
    }if(h.clipIndex==j.clipIndex&&h.URL==j.URL){i=true
    }}}return f
    },nativeControlsOnReleaseStart:function(g){this.log("iosOnReleaseStart");
    this.playlist=g.data;
    this._firstClipIsNext=true;
    var f;
    for(var e=0;
    e<this.playlist.baseClips.length;
    e++){var h=this.playlist.baseClips[e];
    if(!h.isAd){f=h.availableTextTracks;
    break
    }}this.setCaptions(f);
    if(!this.currentVETextTracks||this.currentVETextTracks.length<1){this.ve.hideCaptions(true)
    }else{this.loadCaptions()
    }},log:function(b){tpDebug("vesm: "+b)
    }});
    XMLLoader=Class.extend({init:function(b){this._requestContentType=b
    },load:function(r,k,p){var l;
    if(typeof XDomainRequest!=="undefined"&&r.indexOf(document.domain)

    Shutting down the Utah Jazz offense is proving easier said than done for the Oklahoma City Thunder.For a second straight game Authentic Justin Bethel Jersey , a late second-quarter surge by Utah carried over into the second half and it allowed the Jazz to pull away for a 113-96 victory Monday night. The Jazz used a 20-3 run spanning the end of the second quarter and the start of the third to break open the game.

    Utah takes a 3-1 series lead back to Oklahoma City. Game 5 in the best-of-seven playoff is Wednesday night.

    Donovan Mitchell had 33 points and seven rebounds to lead the Jazz to their third straight win in the series. Joe Ingles added 20 points, hitting five 3-pointers.

    Mitchell’s willingness to attack the rim put the Thunder on their heels throughout the second half.

    ”He’s done a good job of getting in there and finishing or dropping it off,” Jazz coach Quin Snyder said. ”It’s an important part of what we do. He’s our most dynamic offensive player.”

    Rudy Gobert added 16 points and 10 rebounds. Ricky Rubio chipped in 13 points, eight assists and six boards. Derrick Favors also scored 13.

    Paul George had 32 points and Russell Westbrook added 23 points and 14 rebounds to lead the Thunder, who shot 39 percent from the field.

    ”I thought we played downhill a lot more,” coach Billy Donovan said. ”I thought we were at the rim a lot more. From there, we probably missed some opportunities to move the ball. I thought our ball movement was sporadic and sometimes it was very good.”

    The Thunder opened a 26-19 lead late in the first quarter when Carmelo Anthony capped a string of three straight Oklahoma City baskets with an alley-oop layup. They held onto the lead for much of the second quarter until Utah finally woke up on offense.

    Starting with Gobert cutting to the rim for a dunk with 3:45 left in the second quarter, the Jazz scored on 11 straight possessions. Ingles fueled the surge by hitting three consecutive 3s to put Utah in front 58-52 before halftime.

    ”These guys are great at telling me to shoot it as much as possible within the flow of our team and our offense,” Ingles said.

    The surge Ingles kept going finally culminated in another dunk by Gobert that punctuated the decisive 20-3 run that gave Utah a 67-52 lead.

    ”The whole year, one of the things that we’ve wanted to do collectively is try to generate open shots,” Snyder said. ”You’re not always going to make them Jason Witten Cowboys Jersey , but you want to keep taking them. Eventually, you’re going to make some. We hit some timely ones in the second half.”

    The Jazz led by as many as 21 in the third quarter. Utah went up 87-68 when Mitchell drained a jumper and then fed Ingles for a 3-pointer on the ensuing possession.

    Physical play and heated emotions characterized the game. Both teams picked up two technical fouls before halftime. Jae Crowder was ejected after a technical foul with 5:30 remaining in the fourth quarter.

    ”That’s just what you’re going to get with a playoff team,” George said. ”It’s playoff basketball. It’s going to get chippy. It’s going to get physical. We’re in it for the fight.”

    TIP-INS

    Thunder: Westbrook finished with his fourth consecutive double-double in the series. … Anthony went just 5 of 18 from the field. … Oklahoma City totaled one assist in the third quarter and finished with 10 for the game. … The Thunder shot 5 of 26 from 3-point range.

    Jazz: Ingles is 10 of 21 from 3-point range over his last two games. … Utah forced 15 turnovers. … Royce O’ Neale finished with a career playoff-high nine rebounds. … Rubio is averaging eight assists per game in the series.

    WESTBROOK VS. RUBIO

    Westbrook publicly promised to shut down Rubio in Game 4 after the Jazz point guard notched a triple-double in Game 3. His aggressiveness ended up with Westbrook drawing four personal fouls in the first half. In the end, Rubio shot just 4 of 12 from the field, but he finished with two fewer assists (eight) than the Thunder tallied as a team.

    Following the game, Westbrook did not want to discuss how he guarded Rubio.

    ”It wasn’t about me or him,” he said. ”Let’s get past that. We done with that.”

    RECORD SETTER

    Mitchell set a postseason rookie scoring record for the Jazz, passing Karl Malone, who had 31 points on April 20, 1986, against the Mavericks. Mitchell is the first rookie to have a 30-point playoff game since Brandon Jennings did it in 2010. Mitchell is just the third rookie in the last 50 years to score 110-plus points in his first four playoff games Hayden Hurst Jersey , joining Kareem Abdul-Jabbar and Michael Jordan.

    ”It’s definitely an honor to have a record like that,” Mitchell said. ”Definitely an honor. No doubt about that, but we have one more game, so I’m focused on that.”

    Maybe Philadelphia Phillies right-hander Jake Arrieta will go longer into the Saturday afternoon game against the Pittsburgh Pirates at PNC Park than he did in his last start.

    The former Cy Young Award winner with the Chicago Cubs has double-digit wins in each of the past four seasons, and a career 3.57 ERA and 1.18 WHIP. But he learned in his first season with the Phillies that it is all about the wins.

    Philadelphia moved well above .500 by making careful decisions, and that included pulling Arrieta after five strong innings and 70 pitches Sunday against Washington simply because the club was trailing 3-0 with one hit.
    “You have to find a way to score runs. You’re running out of outs. You’re down,” Phillies manager Gabe Kapler said of his decision to pinch-hit Carlos Santana for Arrieta after he had given up two earned runs and four hits.

    Philadelphia ended up scoring three runs that inning for a tie and winning 4-3 in 13 innings.

    “There was quite a bit of debate, and mostly because of how good Jake was,” Kapler said. “I was confident we could have gotten two, maybe three more innings out of him. However, we didn’t know if we were going to have an opportunity to score.

    “So there was definitely internal debate Philadelphia Eagles Jerseys Womens , mostly because of how good Jake is and because I knew he could give us length there — and because I knew he wanted to give us length. He’s earned the opportunity to do so. But for the strategy of the Phillies, I didn’t think that was the right move.”

    Arrieta (5-6, 3.54 ERA) hasn’t been winning at his customary clip, the no-decision notwithstanding. On Saturday, he’ll face right-hander Jameson Taillon (5-6, 4.05 ERA) and the struggling Pirates (40-47).

    Arrieta is 11-6 with a 3.01 ERA in 21 career starts against Pittsburgh. The only time he faced them this season, he struck out 10 while pitching seven one-hit scoreless innings in a 7-0 victory on April 19.

    The Phillies opened this series with a 17-5 smackdown Friday and have won five straight and six of seven to gain a share of the National League East lead.

    The Pirates have lost four in a row — by a combined 48-13, with 59 hits and 12 homers allowed — and five of six. They continue to shuffle their lineup.

    “There’s no sense in keeping it the same, is usually a point I get to, because we’re not getting the results we want to get,” Pittsburgh manager Clint Hurdle said.

    In his most recent start Authentic Durham Smythe Jersey , Taillon lasted just 4 2/3 innings Sunday in San Diego. He left with a lead in a game the Pirates won 7-5 but gave up a homer and two singles with two outs in the fourth to prompt the pitching change.

    “I’m hunting a lot of good work, and I just need to keep going,” Taillon, who is is 3-6 with a 4.93 ERA in his past 14 starts, told the Pittsburgh Post-Gazette.

    Against the Phillies, Taillon is 1-1 with a 5.68 ERA in three career starts. This is a rematch of the April 19 game that Arrieta won. In that game, Taillon was rocked for five runs in 1 2/3 innings.

    .

    Détails

    Date :
    août 17, 2018
    Heure :
    8:00 - 5:00