Function.prototype.method=function(_1,_2){
this.prototype[_1]=_2;
return this;
};
if(typeof console!="object"||!this.DEBUG){
var n=function(){
};
console={warn:n,error:n,info:n,log:n};
}
if(typeof EmbeddedPlayerUtil=="undefined"){
EmbeddedPlayerUtil={getElementPosition:function(e){
var _4=(typeof (e)=="string")?document.getElementById(e):e;
var _5=curtop=0;
if(_4.offsetParent){
_5=_4.offsetLeft;
curtop=_4.offsetTop;
while(_4=_4.offsetParent){
_5+=_4.offsetLeft;
curtop+=_4.offsetTop;
}
}
return {x:_5,y:curtop};
}};
}
if(typeof EmbeddedPlayerManager=="undefined"){
EmbeddedPlayerManager=function(){
function Constructor(){
this.BASE_LOCATION="";
this.TRACKING_JS="";
this.COMPANION_REFERRER="";
this.METADATA_THUMB_URL="";
this.players;
this.companionReference;
this.lastPlayer;
this.fullscreenPlayer=null;
if(!deconcept||!deconcept.SWFObject){
console.error("Couldn't initialize EmbeddedPlayerManager. SWFObject unavailable");
return null;
}
console.info("making shared instance of embeddedPlayerManager. this message should only appear once");
this.players=new Array();
this.initOnResize();
this.initOnScroll();
}
with(Constructor){
method("embedPlayer",function(_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10,_11,_12,_13,_14,_15){
enableFullscreen=true;
if(this.players[_6]){
return this.players[_6];
}
if(!document.getElementById(_6)){
var _16="";
}
var _17="";
var _18=384;
var _19=316;
if(_8){
if(typeof _8=="string"&&_8.indexOf("/")!=-1){
_17=_8;
}else{
_16=_8;
}
}
if(typeof _9=="number"&&typeof _a=="number"){
_18=_9;
_19=_a;
}
this.lastPlayer=new EmbeddedPlayer(this,_6,_7,_16,_17,_18,_19,_b,_c,_d,_e,enableFullscreen,_f,_10,_11,_12,_13,_14,_15);
this.players[_6]=this.lastPlayer;
this.lastPlayer.currentClip.dlid=_16;
return this.lastPlayer;
});
method("setCompanion",function(_1a){
this.companionReference=_1a;
});
method("getCompanionReference",function(){
return this.companionReference;
});
method("getPlayer",function(_1b){
try{
if(typeof _1b=="undefined"){
return this.lastPlayer;
}
this.lastPlayer=this.players[_1b];
return this.lastPlayer;
}
catch(e){
}
});
method("pauseAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].pause();
}
}
}
catch(e){
}
});
method("playAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].play();
}
}
}
catch(e){
}
});
method("muteAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].mute();
}
}
}
catch(e){
}
});
method("volumeUpAll",function(_1f){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].volumeUp(_1f);
}
}
}
catch(e){
}
});
method("volumeDownAll",function(_21){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].volumeDown(_21);
}
}
}
catch(e){
}
});
method("setVolumeAll",function(_23){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].setVolume(_23);
}
}
}
catch(e){
}
});
method("rewindAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].rewind();
}
}
}
catch(e){
}
});
method("fastForwardAll",function(){
try{
for(var i in this.players){
if(this.players[i].id){
this.players[i].fastForward();
}
}
}
catch(e){
}
});
method("setBaseLocation",function(_27){
this.BASE_LOCATION=_27;
});
method("setTrackingJS",function(_28){
this.TRACKING_JS=_28;
});
method("setCompanionRenderer",function(_29){
this.COMPANION_RENDERER=_29;
});
method("setMetadataThumbURL",function(_2a){
this.METADATA_THUMB_URL=_2a;
});
method("setActivePlayer",function(_2b){
try{
if(this.isValidPlayer(_2b)==true){
this.lastPlayer=this.players[_2b];
}else{
this.lastPlayer=this.lastPlayer;
}
}
catch(e){
}
});
method("isValidPlayer",function(_2c){
try{
var _2d=false;
for(var i in this.players){
if(i==_2c){
_2d=true;
}
}
return _2d;
}
catch(e){
}
});
method("setActiveFullscreen",function(_2f){
this.fullscreenPlayer=_2f;
});
method("unFullscreen",function(){
this.fullscreenPlayer.fullscreen(false);
});
method("updatePositions",function(){
for(var i in this.players){
var _31=this.players[i];
if(_31.id){
var _32=EmbeddedPlayerUtil.getElementPosition("placeholder_"+_31.id);
_31.container.style.left=_32.x+"px";
_31.container.style.top=_32.y+"px";
if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){
_31.container.style.left=parseInt(_31.container.style.left)+1+"px";
_31.container.style.top=parseInt(_31.container.style.top)+1+"px";
}
}
}
});
method("initOnResize",function(){
var _33=this;
if(typeof (window.onresize)!="function"){
window.onresize=function(){
_33.updatePositions();
};
}else{
if(!this.oldResize){
this.oldResize=window.onresize;
}
window.onresize=function(){
_33.oldResize();
_33.updatePositions();
};
}
});
method("resetOnResize",function(){
if(this.oldResize){
window.onresize=this.oldResize;
}else{
window.onresize=null;
}
this.initOnResize();
});
method("initOnScroll",function(){
var _34=this;
if(typeof (window.onscroll)!="function"){
window.onscroll=function(){
_34.updatePositions();
};
}else{
if(!this.oldScroll){
this.oldScroll=window.onscroll;
}
window.onscroll=function(){
_34.oldScroll();
_34.updatePositions();
};
}
});
method("resetOnScroll",function(){
if(this.oldScroll){
window.onscroll=this.oldScroll;
}else{
window.onscroll=null;
}
this.initOnScroll();
});
}
return new Constructor();
};
}
if(typeof EmbeddedPlayer=="undefined"){
EmbeddedPlayer=function(_35,_36,_37,_38,_39,_3a,_3b,_3c,_3d,_3e,_3f,_40,_41,_42,_43,_44,_45,_46,_47){
function Constructor(){
this.manager=_35;
this.id=_36;
this.onMetadata;
this.onClearMetadata;
this.companion;
this.swf;
this.container;
this.trackingiframe;
this.companionDiv;
this.width=_3a;
this.height=_3b;
this.isFullscreen=false;
this.isFullscreenEnabled=(_40==true);
this.isPlayingAd=false;
this.playingAdType;
this.placeholder;
this.oldWin;
this.lastScrollPos;
this.divIDList=new Array();
this.cssPropertyList1;
this.cssPropertyList2;
this.currentClip=new Object();
this.currentClip.dlid=0;
this.metadataContainers=new MetadataContainer(this);
this.metadata=new Object();
this.playlists=new Array();
this.lastPlaylist;
this.activePlaylist;
this.runOnFullscreenStartFunction;
this.runOnFullscreenEndFunction;
this.runOnBeginFunction;
this.runOnClipStartFunction;
this.runOnClipSwitchedFunction;
this.runOnClipCompletedFunction;
this.runOnClosedFunction;
this.runOnEndFunction;
this.allowPlaylistAdvance=true;
this.inAutoplay=false;
this.onClearMetadata=function(){
this.executeRunOnEnd();
if(this.allowPlaylistAdvance==true){
this.isPlayingAd=false;
this.activePlaylist.playNext();
}
};
if(!document.getElementById("trackingiframe")){
console.log("Tracking IFrame not found, adding.");
var _48=document.createElement("iframe");
with(_48){
setAttribute("src","about:blank");
setAttribute("id","trackingiframe");
setAttribute("name","trackingiframe");
setAttribute("width","1");
setAttribute("height","1");
setAttribute("marginwidth","0");
setAttribute("frameborder","0");
style.position="absolute";
style.top="0px";
style.left="0px";
style.display="none";
}
document.body.appendChild(_48);
}
this.trackingiframe=document.getElementById("trackingiframe");
this.companionDiv=document.getElementById(_37);
var _49="player_"+_36;
var _4a=new deconcept.SWFObject(embeddedPlayerManager.BASE_LOCATION+"embedded.swf",_49,null,null,"8","#000000",true);
_4a.addParam("allowScriptAccess","always");
_4a.addParam("allowFullScreen","true");
if(_38){
_4a.addVariable("deepLinkID",_38);
}
if(_39){
_4a.addVariable("deepLinkPath",_39);
}
if(_3d){
_4a.addVariable("videoControls",_3d);
}
if(_41!=undefined){
_4a.addVariable("exitFullscreenOnVideoComplete",_41);
}
if(_44){
_4a.addVariable("overrideKeyword1",_44);
}
if(_45){
_4a.addVariable("overrideKeyword2",_45);
}
if(_46){
_4a.addVariable("overrideKeyword3",_46);
}
if(_47){
_4a.addVariable("overrideClipID",_47);
}
if(_43){
_4a.addVariable("overrideRandom",_43);
}
if(_42){
_4a.addVariable("embVal",_42);
}
if(_3c){
_4a.addVariable("configLocation",_3c);
}
if(_3e){
_4a.addVariable("autoStart",_3e);
}
if(_3f){
_4a.addVariable("initVolume",_3f);
}
if(embeddedPlayerManager.BASE_LOCATION){
_4a.addVariable("BASE_LOCATION",embeddedPlayerManager.BASE_LOCATION);
}
_4a.addVariable("playerID",_36);
if(this.isFullscreenEnabled){
this.container=document.createElement("div");
var _4b="container_"+this.id;
this.container.id=_4b;
this.container.className="fullscreenPlayer";
document.body.appendChild(this.container);
with(this.container.style){
position="absolute";
width=_3a+"px";
height=_3b+"px";
margin="0";
padding="0";
backgroundColor="#000";
border="none";
}
this.placeholder=document.createElement("div");
this.placeholder.id="placeholder_"+this.id;
document.getElementById(_36).appendChild(this.placeholder);
with(this.placeholder.style){
width=_3a+"px";
height=_3b+"px";
margin="0";
padding="0";
border="none";
}
var _4c=EmbeddedPlayerUtil.getElementPosition("placeholder_"+this.id);
this.container.style.left=_4c.x+"px";
this.container.style.top=_4c.y+"px";
if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){
this.container.style.left=parseInt(this.container.style.left)+1+"px";
this.container.style.top=parseInt(this.container.style.top)+1+"px";
}
_4a.setAttribute("width","100%");
_4a.setAttribute("height","100%");
_4a.write(_4b);
}else{
_4a.setAttribute("width",_3a);
_4a.setAttribute("height",_3b);
_4a.write(_36);
}
this.swf=document.getElementById(_49);
}
with(Constructor){
method("_onFullscreen",function(_4d){
if(typeof _4d!="boolean"){
return;
}
if(!this.isFullscreenEnabled){
console.warn("Fullscreen not enabled for this player.");
return;
}
this.isFullscreen=_4d;
if(this.isFullscreen){
this.setOldWindowParameters();
window.onresize=function(){
};
this.executeRunOnFullscreenStart();
this.onEnterFullScreenCSS();
this.goFullScreenJS();
}else{
var c=this.container;
with(c.style){
top=left=right=bottom="";
}
this.placeholder.style.width=this.width+"px";
this.placeholder.style.height=this.height+"px";
var _4f=EmbeddedPlayerUtil.getElementPosition("placeholder_"+this.id);
c.style.width=this.width+"px";
c.style.height=this.height+"px";
c.style.left=_4f.x+"px";
c.style.top=_4f.y+"px";
if(navigator.userAgent.toLowerCase().indexOf("firefox")==-1){
if(document.documentElement){
document.documentElement.style.overflow="";
if(navigator.userAgent.toLowerCase().indexOf("safari")>-1){
document.body.style.overflow="visible";
}
}else{
document.body.style.overflow="";
}
}
window.onscroll=function(){
};
this.manager.resetOnResize();
if(!document.all){
top.window.resizeTo(this.oldWin.w,this.oldWin.h);
top.window.moveTo(this.oldWin.l,this.oldWin.t);
window.scrollTo(0,this.lastScrollPos);
}else{
top.window.resizeTo(this.oldWin.w,this.oldWin.h);
top.window.moveTo(this.oldWin.l,this.oldWin.t);
window.scrollTo(0,this.lastScrollPos);
}
this.executeRunOnFullscreenEnd();
this.onExitFullScreenCSS();
}
});
method("setFullscreenElementIDs",function(_50){
this.divIDList=_50.split(",");
});
method("onEnterFullScreenCSS",function(){
this.cssPropertyList1=new Array();
this.cssPropertyList2=new Array();
var _51="";
var _52="";
for(var i=0;i<this.divIDList.length;i++){
try{
if(_51!=""){
_51=_51+",";
}
if(_52!=""){
_52=_52+",";
}
_51=_51+this.getStyle(this.divIDList[i].toString(),"overflow");
_52=_52+this.getStyle(this.divIDList[i].toString(),"visibility");
console.info("ENTER-BEFORE:"+i+"|"+this.divIDList[i].toString()+"|"+this.getStyle(this.divIDList[i].toString(),"overflow")+"|"+this.getStyle(this.divIDList[i].toString(),"visibility"));
document.getElementById(this.divIDList[i].toString()).style.overflow="hidden";
document.getElementById(this.divIDList[i].toString()).style.visibility="hidden";
console.info("ENTER-AFTER:"+i+"|"+this.divIDList[i].toString()+"|"+this.getStyle(this.divIDList[i].toString(),"overflow")+"|"+this.getStyle(this.divIDList[i].toString(),"visibility"));
}
catch(err){
console.warn("onEnterFullScreenCSS:"+i+err);
}
}
this.cssPropertyList1=_51.split(",");
this.cssPropertyList2=_52.split(",");
});
method("onExitFullScreenCSS",function(){
for(var i=0;i<this.divIDList.length;i++){
try{
console.info("EXIT-BEFORE:"+i+"|"+this.divIDList[i].toString()+"|"+this.getStyle(this.divIDList[i].toString(),"overflow")+"|"+this.getStyle(this.divIDList[i].toString(),"visibility"));
document.getElementById(this.divIDList[i].toString()).style.overflow=this.cssPropertyList1[i].toString();
document.getElementById(this.divIDList[i].toString()).style.visibility=this.cssPropertyList2[i].toString();
console.info("EXIT-AFTER:"+i+"|"+this.divIDList[i].toString()+"|"+this.getStyle(this.divIDList[i].toString(),"overflow")+"|"+this.getStyle(this.divIDList[i].toString(),"visibility"));
}
catch(err){
console.warn("onExitFullScreenCSS"+err);
}
}
});
method("getStyle",function(el,_56){
var x=document.getElementById(el);
if(x.currentStyle){
var y=x.currentStyle[_56];
}else{
if(window.getComputedStyle){
var y=document.defaultView.getComputedStyle(x,null).getPropertyValue(_56);
}
}
return y;
});
method("goFullScreenJS",function(){
top.window.moveTo(0,0);
if(document.all){
top.window.resizeTo(screen.availWidth,screen.availHeight);
}else{
if(document.layers||document.getElementById){
if(top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight=top.screen.availHeight;
top.window.outerWidth=top.screen.availWidth;
}
}
}
if(navigator.userAgent.toLowerCase().indexOf("mac")>-1&&navigator.userAgent.toLowerCase().indexOf("netscape")>-1){
top.window.moveTo(0,0);
}
if(navigator.userAgent.toLowerCase().indexOf("safari")>-1){
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
var _59=this.setContainer();
window.onscroll=function(){
window.scrollTo(0,_59);
};
window.onscroll();
var _5a=this;
window.onresize=function(){
_5a.setContainer();
};
});
method("setContainer",function(){
var c=this.container;
var _5c=0;
if(navigator.userAgent.toLowerCase().indexOf("firefox")==-1){
if(document.documentElement&&document.documentElement.scrollTop){
document.documentElement.style.overflow="hidden";
_5c=document.documentElement.scrollTop;
}else{
if(document.body.scrollTop){
if(navigator.userAgent.toLowerCase().indexOf("safari")>-1){
document.body.style.overflow="visible";
}else{
document.body.style.overflow="hidden";
}
_5c=document.body.scrollTop;
}
}
if(this.lastScrollPos==null){
this.lastScrollPos=_5c;
}
}else{
if(this.lastScrollPos==null){
this.lastScrollPos=window.pageYOffset;
}
}
var ch=0;
var cw=0;
if(typeof (window.innerWidth)=="number"){
ch=window.innerHeight;
cw=window.innerWidth;
}else{
if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
ch=document.documentElement.clientHeight;
cw=document.documentElement.clientWidth;
}else{
if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
ch=document.body.clientHeight;
cw=document.body.clientWidth;
}
}
}
with(c.style){
if(document.all&&!window.opera){
height=ch+"px";
width=cw+"px";
}else{
height="100%";
width="100%";
}
left="0px";
right="0px";
bottom="0px";
top=_5c+"px";
}
return _5c;
});
method("setOldWindowParameters",function(){
this.oldWin=new Object();
this.oldWin.l=top.window.screenX||top.window.screenLeft-4;
this.oldWin.t=top.window.screenY||top.window.screenTop-104;
if(document.all){
this.oldWin.w=document.documentElement.clientWidth+30;
this.oldWin.h=document.documentElement.clientHeight+135;
}else{
this.oldWin.h=top.window.outerHeight;
this.oldWin.w=top.window.outerWidth;
}
this.lastScrollPos=null;
});
method("onPlayVideo",function(_5f){
var _60=this.isPlayingAd;
this.isPlayingAd=_5f.isAd;
this.playingAdType=_5f.adType;
if(_60&&!this.isPlayingAd){
this.companion=embeddedPlayerManager.getCompanionReference();
if(this.companion!=""&&this.companion!=null){
}
}
});
method("onExecuteTrackingJS",function(evt){
if(typeof embeddedPlayerManager.TRACKING_JS=="string"&&evt["url"]!="undefined"&&evt["url"]!=undefined&&evt["type"]!="undefined"&&evt["type"]!=undefined){
this.trackingiframe.src=embeddedPlayerManager.TRACKING_JS+"?"+"type="+evt["type"]+"&"+"source="+evt["url"];
}
});
method("onLoadCompanion",function(evt){
var _63=this.validateCompanionParam(evt["companion"]);
var _64=this.validateCompanionParam(evt["companionURL"]);
var _65=this.validateCompanionParam(evt["companionType"]);
var _66=this.validateCompanionParam(evt["dartSite"]);
var _67=this.validateCompanionParam(evt["dartSection"]);
var _68=this.validateCompanionParam(evt["dartNetwork"]);
var _69=this.validateCompanionParam(evt["keyword1"]);
var _6a=this.validateCompanionParam(evt["keyword2"]);
var _6b=this.validateCompanionParam(evt["keyword3"]);
var _6c=this.validateCompanionParam(evt["clipID"]);
var _6d=this.validateCompanionParam(evt["embval"]);
var _6e=this.validateCompanionParam(evt["randomNum"]);
if(_63!=""&&_64!=""){
this.writeCompanion(_65,_63,_64);
}else{
this.write300x250(_66,_67,_68,_69,_6a,_6b,_6c,_6d,_6e);
}
});
method("writeCompanion",function(_6f,_70,_71){
var _72=this.companionDiv.id.toString();
_70=_70.replace("[timestamp]",Math.round(1000000000000*Math.random()));
_71=_71.replace("[timestamp]",Math.round(1000000000000*Math.random()));
switch(_6f){
case "swf":
var _73="companionSWF_"+_72;
var _74=new deconcept.SWFObject("http://video.nbcuni.com/embed/player_1-2/companion.swf",_73,"300","250","8","#000000");
_74.addParam("wmode","transparent");
_74.addParam("allowScriptAccess","always");
_74.addVariable("sourceURL",escape(_70));
_74.addVariable("linkURL",escape(_71));
_74.write(_72);
var swf=document.getElementById(_73);
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(swf);
}
break;
case "image":
document.getElementById(_72).innerHTML="<a href='"+_71+"' target='_blank'><img src='"+_70+"' border='0' /></a>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
break;
case "iframe":
document.getElementById(_72).innerHTML="<iframe src='"+_70+"' frameborder='0' width='300' height='250' scrolling='no' allowtransparency='true' /></iframe>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
break;
case "js":
document.getElementById(_72).innerHTML="<iframe id='companionAdiFrame' scrolling='no' frameborder='0' width='300' height='250' allowtransparency='true' src='"+embeddedPlayerManager.COMPANION_RENDERER+"?companionType=js&companion="+escape(_70)+"' /></iframe>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
break;
default:
document.getElementById(_72).innerHTML="<a href='"+_71+"' target='_blank'><img src='"+_70+"' border='0' /></a>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
}
});
method("write300x250",function(_76,_77,_78,_79,_7a,_7b,_7c,_7d,_7e){
var _7f=this.companionDiv.id.toString();
document.getElementById(_7f).innerHTML="<iframe id='companionAdiFrame' frameborder='0' scrolling='no' width='300' height='250' src='"+embeddedPlayerManager.COMPANION_RENDERER+"?companionType=300x250&dartsite="+_76+"&dartsection="+_77+"&dartnetwork="+_78+"&keyword1="+_79+"&keyword2="+_7a+"&keyword3="+_7b+"&clipid="+_7c+"&embval="+_7d+"&randomnum="+_7e+"' /></iframe>";
if(typeof EmbeddedPlayerManager!="undefined"){
embeddedPlayerManager.setCompanion(null);
}
});
method("validateCompanionParam",function(_80){
if(typeof _80=="undefined"||_80=="null"||_80=="undefined"||_80==null||_80==undefined){
return "";
}else{
return _80;
}
});
method("play",function(){
try{
this.swf.playVideo();
}
catch(e){
}
});
method("pause",function(){
try{
this.swf.pauseVideo();
}
catch(e){
}
});
method("playVideo",function(_81,_82,_83){
try{
if(this.isPlayingAd==false){
this.currentClip.dlid=_81;
if(_82==null||_82==""||typeof _82=="undefined"||typeof _82==undefined){
this.inAutoplay=false;
for(var i in this.playlists){
if(this.playlists[i].playlistID){
this.playlists[i].currentPosition=this.playlists[i].getPosition(_81);
this.playlists[i].currentDLID=_81;
this.playlists[i].nextClip=this.playlists[i].getNext();
}
}
}else{
this.playlists[_83].nextClip=this.playlists[_83].getNext();
}
this.swf.playVideoByPathID(_81);
}
}
catch(e){
alert(e);
}
});
method("playVideoByPathID",function(_85){
this.playVideo(_85);
});
method("setAdOverrides",function(_86,_87,_88,_89,_8a,_8b){
try{
this.swf.setAdOverrides(_86,_87,_88,_89,_8a,_8b);
}
catch(e){
}
});
method("clearAdOverrides",function(){
try{
this.swf.clearAdOverides();
}
catch(e){
}
});
method("browserWindowBeforeUnload",function(){
try{
this.swf.onBrowserWindowBeforeUnload();
}
catch(e){
}
});
method("setMetadataContainers",function(_8c,_8d,_8e,_8f){
this.metadataContainers.setTitle(_8c);
this.metadataContainers.setSubtitle(_8d);
this.metadataContainers.setShortDescription(_8e);
this.metadataContainers.setAirtime(_8f);
this.metadataContainers.setContainers();
});
method("resizePlayer",function(_90,_91){
try{
this.width=_90;
this.height=_91;
var c=this.container;
with(c.style){
top=left=right=bottom="";
}
this.placeholder.style.width=this.width+"px";
this.placeholder.style.height=this.height+"px";
var _93=EmbeddedPlayerUtil.getElementPosition("placeholder_"+this.id);
c.style.width=this.width+"px";
c.style.height=this.height+"px";
c.style.left=_93.x+"px";
c.style.top=_93.y+"px";
if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){
c.style.left=parseInt(c.style.left)+1+"px";
c.style.top=parseInt(c.style.top)+1+"px";
}
}
catch(e){
}
});
method("hidePlayer",function(_94,_95,_96,_97){
try{
if(typeof _94=="undefined"){
_94="black";
}
if(typeof _95!="undefined"){
if(typeof _96=="undefined"){
_96="repeat";
}
if(typeof _97=="undefined"){
_97="center";
}
document.getElementById("placeholder_"+this.id.toString()).style.backgroundImage="url("+_95+")";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundRepeat=_96;
document.getElementById("placeholder_"+this.id.toString()).style.backgroundPosition=_97;
}else{
document.getElementById("placeholder_"+this.id.toString()).style.backgroundImage="";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundRepeat="";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundPosition="";
}
document.getElementById("placeholder_"+this.id.toString()).style.backgroundColor=_94;
document.getElementById("container_"+this.id.toString()).style.width="1px";
document.getElementById("container_"+this.id.toString()).style.height="1px";
}
catch(e){
console.info("hidePlayer(): "+e);
}
});
method("unHidePlayer",function(){
try{
document.getElementById("placeholder_"+this.id.toString()).style.backgroundColor="#000000";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundImage="";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundRepeat="";
document.getElementById("placeholder_"+this.id.toString()).style.backgroundPosition="";
document.getElementById("container_"+this.id.toString()).style.width=this.width+"px";
document.getElementById("container_"+this.id.toString()).style.height=this.height+"px";
}
catch(e){
alert(e);
}
});
method("goFullscreen",function(){
try{
this.swf.toggleFullscreen();
}
catch(e){
}
});
method("toggleFullscreen",function(){
this.goFullscreen();
});
method("setRunOnBegin",function(_98){
this.runOnBeginFunction=_98;
});
method("executeRunOnBegin",function(){
try{
eval(this.runOnBeginFunction);
}
catch(e){
}
});
method("setRunOnClipStart",function(_99){
this.runOnClipStartFunction=_99;
});
method("executeRunOnClipStart",function(){
try{
eval(this.runOnClipStartFunction);
}
catch(e){
}
});
method("setRunOnClipSwitched",function(_9a){
this.runOnClipSwitchedFunction=_9a;
});
method("executeRunOnClipSwitched",function(){
try{
eval(this.runOnClipSwitchedFunction);
}
catch(e){
}
});
method("setRunOnClipCompleted",function(_9b){
this.runOnClipCompletedFunction=_9b;
});
method("executeRunOnClipCompleted",function(){
try{
eval(this.runOnClipCompletedFunction);
}
catch(e){
}
});
method("setRunOnClosed",function(_9c){
this.runOnClosedFunction=_9c;
});
method("executeRunOnClosed",function(){
try{
eval(this.runOnClosedFunction);
}
catch(e){
}
});
method("setRunOnEnd",function(_9d){
this.runOnEndFunction=_9d;
});
method("executeRunOnEnd",function(){
try{
eval(this.runOnEndFunction);
}
catch(e){
}
});
method("setRunOnFullscreenStart",function(_9e){
this.runOnFullscreenStartFunction=_9e;
});
method("executeRunOnFullscreenStart",function(){
try{
eval(this.runOnFullscreenStartFunction);
}
catch(e){
}
});
method("setRunOnFullscreenEnd",function(_9f){
this.runOnFullscreenEndFunction=_9f;
});
method("executeRunOnFullscreenEnd",function(){
try{
eval(this.runOnFullscreenEndFunction);
}
catch(e){
}
});
method("createPlaylist",function(_a0,_a1,_a2,_a3,_a4){
if(typeof _a1=="undefined"){
_a1="default";
}
if(typeof _a2=="undefined"){
_a2=true;
}
if(typeof _a3=="undefined"){
_a3=0;
}
if(typeof _a4=="undefined"){
_a4=0;
}
this.lastPlaylist=new Playlist(this,_a1,_a0,this.currentClip.dlid,_a3,_a4);
this.playlists[_a1]=this.lastPlaylist;
if(_a2==true){
this.activePlaylist=this.lastPlaylist;
}
return this.lastPlaylist;
});
method("playNextClipInPlaylist",function(){
try{
if(this.activePlaylist==null||this.isValidPlaylistID(this.activePlaylist.playlistID)==false){
this.activePlaylist=this.lastPlaylist;
}
this.getPlaylist(this.activePlaylist.playlistID).playNext();
}
catch(e){
}
});
method("setActivePlaylist",function(_a5){
try{
if(this.isValidPlaylistID(_a5)==true){
this.activePlaylist=this.playlists[_a5];
}else{
this.activePlaylist=this.lastPlaylist;
}
}
catch(e){
}
});
method("isValidPlaylistID",function(_a6){
try{
var _a7=false;
for(var i in this.playlists){
if(i==_a6){
_a7=true;
}
}
return _a7;
}
catch(e){
}
});
method("getPlaylist",function(_a9){
try{
if(typeof _a9=="undefined"){
return this.lastPlaylist;
}
this.lastPlaylist=this.playlists[_a9];
return this.lastPlaylist;
}
catch(e){
}
});
method("seekTo",function(_aa){
try{
if(this.isPlayingAd){
console.warn("Can't navigate during ads");
return;
}
this.swf.seekToJS(_aa);
return 0;
}
catch(e){
}
});
method("getCurrentTime",function(){
try{
return this.swf.getCurrentTimeJS("up");
}
catch(e){
console.info("error_getTime:"+e.description);
}
});
method("getCurrentTimeEnd",function(){
try{
return this.swf.getCurrentTimeJS("countdown");
}
catch(e){
console.info("error_getTimeEND:"+e.description);
}
});
method("mute",function(){
try{
this.swf.muteJS();
return 0;
}
catch(e){
}
});
method("getVolume",function(){
try{
return this.swf.getVolumeJS();
}
catch(e){
}
});
method("setVolume",function(_ab){
try{
return this.swf.setVolumeJS(_ab);
}
catch(e){
}
});
method("volumeUp",function(_ac){
this.setVolume((this.getVolume()*1)+_ac);
});
method("volumeDown",function(_ad){
this.setVolume((this.getVolume()*1)-_ad);
});
method("rewind",function(){
try{
this.swf.rewindJS();
return 0;
}
catch(e){
}
});
method("fastForward",function(){
try{
this.swf.fastForwardJS();
return 0;
}
catch(e){
}
});
}
return new Constructor();
};
}
if(typeof MetadataContainer=="undefined"){
MetadataContainer=function(_ae){
function Constructor(){
this.player=_ae;
this.title;
this.subtitle;
this.shortDescription;
this.airtime;
this.dlid;
this.thumbSmall;
this.thumbSmallImage;
this.thumbLarge;
this.thumbLargeImage;
this.folderPath;
this.usOnly;
this.folderid;
this.clipOrder;
this.startDate;
this.endDate;
this.isThirdParty;
this.longDescription;
this.guid;
this.publishDate;
this.buyURL;
this.buyURLtext;
this.relatedURL;
this.relatedURLtext;
this.copyright;
this.thumbMezznPath;
this.fullPageConfig;
this.streamType;
this.permalink;
this.adPlaylist;
this.showVideoAds;
}
with(Constructor){
method("setTitle",function(_af){
this.title=_af.toString();
});
method("setSubtitle",function(_b0){
this.subtitle=_b0.toString();
});
method("setShortDescription",function(_b1){
this.shortDescription=_b1.toString();
});
method("setAirtime",function(_b2){
this.airtime=_b2.toString();
});
method("setDlid",function(_b3){
this.dlid=_b3.toString();
});
method("setThumbSmall",function(_b4){
this.thumbSmall=_b4.toString();
});
method("setThumbSmallImage",function(_b5){
this.thumbSmallImage=_b5.toString();
});
method("setThumbLarge",function(_b6){
this.thumbLarge=_b6.toString();
});
method("setThumbLargeImage",function(_b7){
this.thumbLargeImage=_b7.toString();
});
method("setFolderPath",function(_b8){
this.folderPath=_b8.toString();
});
method("setUsOnly",function(_b9){
this.usOnly=_b9.toString();
});
method("setFolderid",function(_ba){
this.folderid=_ba.toString();
});
method("setClipOrder",function(_bb){
this.clipOrder=_bb.toString();
});
method("setStartDate",function(_bc){
this.startDate=_bc.toString();
});
method("setEndDate",function(_bd){
this.endDate=_bd.toString();
});
method("setIsThirdParty",function(_be){
this.isThirdParty=_be.toString();
});
method("setLongDescription",function(_bf){
this.longDescription=_bf.toString();
});
method("setPublishDate",function(_c0){
this.publishDate=_c0.toString();
});
method("setBuyURL",function(_c1){
this.buyURL=_c1.toString();
});
method("setBuyURLtext",function(_c2){
this.buyURLtext=_c2.toString();
});
method("setRelatedURL",function(_c3){
this.relatedURL=_c3.toString();
});
method("setRelatedURLtext",function(_c4){
this.relatedURLtext=_c4.toString();
});
method("setCopyright",function(_c5){
this.copyright=_c5.toString();
});
method("setThumbMezznPath",function(_c6){
this.thumbMezznPath=_c6.toString();
});
method("setFullPageConfig",function(_c7){
this.fullPageConfig=_c7.toString();
});
method("setStreamType",function(_c8){
this.streamType=_c8.toString();
});
method("setPermalink",function(_c9){
this.permalink=_c9.toString();
});
method("setAdPlaylist",function(_ca){
this.adPlaylist=_ca.toString();
});
method("setShowVideoAds",function(_cb){
this.showVideoAds=_cb.toString();
});
method("setContainers",function(){
this.player.onMetadata=function(_cc){
this.executeRunOnBegin();
this.metadata.title=_cc.title;
this.metadata.subtitle=_cc.subtitle;
this.metadata.shortDescription=_cc.shortDescription;
this.metadata.airtime=_cc.airtime;
this.metadata.dlid=_cc.dlid;
this.metadata.thumbSmall=_cc.thumbSmall;
this.metadata.thumbLarge=_cc.thumbLarge;
this.metadata.thumbSmallImage="<img src=\""+embeddedPlayerManager.METADATA_THUMB_URL+""+this.metadataContainers.replaceCharsforHTML(_cc.thumbSmall)+"\" />";
this.metadata.thumbLargeImage="<img src=\""+embeddedPlayerManager.METADATA_THUMB_URL+""+this.metadataContainers.replaceCharsforHTML(_cc.thumbLarge)+"\" />";
this.metadata.folderPath=_cc.folderPath;
this.metadata.usOnly=_cc.usOnly;
this.metadata.folderid=_cc.folderid;
this.metadata.clipOrder=_cc.placement;
this.metadata.startDate=_cc.startdate;
this.metadata.endDate=_cc.enddate;
this.metadata.isThirdParty=_cc.isThirdParty;
this.metadata.longDescription=_cc.longdescription;
this.metadata.guid=_cc.guid;
this.metadata.publishDate=_cc.publishdate;
this.metadata.buyURL=_cc.buyurl;
this.metadata.buyURLtext=_cc.buyurltext;
this.metadata.relatedURL=_cc.relatedurl;
this.metadata.relatedURLtext=_cc.relatedurltext;
this.metadata.copyright=_cc.copyright;
this.metadata.thumbMezznPath=_cc.mezznimagepath;
this.metadata.fullPageConfig=_cc.fullpageconfigpath;
this.metadata.streamType=_cc.streamType;
this.metadata.permalink=_cc.permalink;
this.metadata.adPlaylist=_cc.adPlaylistDart;
this.metadata.showVideoAds=_cc.videoads;
this.currentClip=this.metadata;
if(this.metadataContainers.title!=null){
document.getElementById(this.metadataContainers.title).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.title);
}
if(this.metadataContainers.subtitle!=null){
document.getElementById(this.metadataContainers.subtitle).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.subtitle);
}
if(this.metadataContainers.shortDescription!=null){
document.getElementById(this.metadataContainers.shortDescription).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.shortDescription);
}
if(this.metadataContainers.airtime!=null){
document.getElementById(this.metadataContainers.airtime).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.airtime);
}
if(this.metadataContainers.dlid!=null){
document.getElementById(this.metadataContainers.dlid).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.dlid);
}
if(this.metadataContainers.thumbSmall!=null){
document.getElementById(this.metadataContainers.thumbSmall).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbSmall);
}
if(this.metadataContainers.thumbLarge!=null){
document.getElementById(this.metadataContainers.thumbLarge).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbLarge);
}
if(this.metadataContainers.thumbSmallImage!=null){
document.getElementById(this.metadataContainers.thumbSmallImage).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbSmallImage);
}
if(this.metadataContainers.thumbLargeImage!=null){
document.getElementById(this.metadataContainers.thumbLargeImage).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbLargeImage);
}
if(this.metadataContainers.folderPath!=null){
document.getElementById(this.metadataContainers.folderPath).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.folderPath);
}
if(this.metadataContainers.usOnly!=null){
document.getElementById(this.metadataContainers.usOnly).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.usOnly);
}
if(this.metadataContainers.folderid!=null){
document.getElementById(this.metadataContainers.folderid).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.folderid);
}
if(this.metadataContainers.clipOrder!=null){
document.getElementById(this.metadataContainers.clipOrder).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.clipOrder);
}
if(this.metadataContainers.startDate!=null){
document.getElementById(this.metadataContainers.startDate).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.startDate);
}
if(this.metadataContainers.endDate!=null){
document.getElementById(this.metadataContainers.endDate).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.endDate);
}
if(this.metadataContainers.isThirdParty!=null){
document.getElementById(this.metadataContainers.isThirdParty).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.isThirdParty);
}
if(this.metadataContainers.longDescription!=null){
document.getElementById(this.metadataContainers.longDescription).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.longDescription);
}
if(this.metadataContainers.guid!=null){
document.getElementById(this.metadataContainers.guid).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.guid);
}
if(this.metadataContainers.publishDate!=null){
document.getElementById(this.metadataContainers.publishDate).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.publishDate);
}
if(this.metadataContainers.buyURL!=null){
document.getElementById(this.metadataContainers.buyURL).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.buyURL);
}
if(this.metadataContainers.buyURLtext!=null){
document.getElementById(this.metadataContainers.buyURLtext).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.buyURLtext);
}
if(this.metadataContainers.relatedURL!=null){
document.getElementById(this.metadataContainers.relatedURL).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.relatedURL);
}
if(this.metadataContainers.relatedURLtext!=null){
document.getElementById(this.metadataContainers.relatedURLtext).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.relatedURLtext);
}
if(this.metadataContainers.copyright!=null){
document.getElementById(this.metadataContainers.copyright).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.copyright);
}
if(this.metadataContainers.thumbMezznPath!=null){
document.getElementById(this.metadataContainers.thumbMezznPath).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.thumbMezznPath);
}
if(this.metadataContainers.fullPageConfig!=null){
document.getElementById(this.metadataContainers.fullPageConfig).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.fullPageConfig);
}
if(this.metadataContainers.streamType!=null){
document.getElementById(this.metadataContainers.streamType).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.streamType);
}
if(this.metadataContainers.permalink!=null){
document.getElementById(this.metadataContainers.permalink).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.permalink);
}
if(this.metadataContainers.adPlaylist!=null){
document.getElementById(this.metadataContainers.adPlaylist).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.adPlaylist);
}
if(this.metadataContainers.showVideoAds!=null){
document.getElementById(this.metadataContainers.showVideoAds).innerHTML=this.metadataContainers.replaceCharsforHTML(this.metadata.showVideoAds);
}
};
});
method("replaceCharsforHTML",function(_cd){
var _ce=new String(_cd);
_ce=_ce.replace("&","&amp;");
return _ce;
});
}
return new Constructor();
};
}
if(typeof Playlist=="undefined"){
Playlist=function(_cf,_d0,_d1,_d2,_d3,_d4){
function Constructor(){
this.player=_cf;
this.playlistID=_d0;
this.currentDLID=_d2;
this.currentPosition=-1;
this.seedDLID=null;
this.playlist=new Array();
this.nextClip=new Object();
this.delayFirstClip=_d3;
this.delayBetweenClips=_d4;
this.delayCounter=0;
this.delayToggle=false;
this.playlist=_d1.split(",");
this.nextClip=this.getNext();
}
with(Constructor){
method("seed",function(_d5){
this.seedDLID=_d5;
this.nextClip=this.getNext();
});
method("add",function(_d6){
try{
this.playlist.push(_d6);
this.nextClip=this.getNext();
}
catch(e){
}
});
method("remove",function(_d7){
try{
this.playlist.splice(_d7,1);
this.nextClip=this.getNext();
}
catch(e){
}
});
method("clear",function(){
try{
this.playlist=new Array();
this.currentPosition=-1;
this.seedDLID=null;
}
catch(e){
}
});
method("move",function(_d8,_d9){
try{
_d8=Number(_d8);
_d9=Number(_d9);
if(_d9>this.playlist.length-1){
_d9=this.playlist.length;
}
if(_d8>this.playlist.length-1){
_d8=this.playlist.length-1;
}
var _da=this.playlist[_d8];
if(_d8<_d9){
this.playlist.splice(_d9+1,0,_da);
this.playlist.splice(_d8,1);
}else{
if(_d8>_d9){
this.playlist.splice(_d9,0,_da);
this.playlist.splice(_d8+1,1);
}else{
}
}
this.nextClip=this.getNext();
}
catch(e){
}
});
method("playNext",function(){
try{
if(this.nextClip.atEndOfPlaylist==false&&this.player.allowPlaylistAdvance==true){
if(this.delayToggle==false){
if(this.player.inAutoplay==true){
this.delayCounter=this.delayBetweenClips;
}else{
this.delayCounter=this.delayFirstClip;
this.player.inAutoplay=true;
}
this.delayToggle=true;
}
if(this.delayCounter>0){
this.delayCounter=this.delayCounter-1;
timeoutID=window.setTimeout("embeddedPlayerManager.getPlayer('"+this.player.id+"').getPlaylist().playNext()",1000);
}else{
this.delayToggle=false;
this.currentPosition=this.nextClip.position;
this.currentDLID=this.nextClip.dlid;
this.player.playVideo(this.nextClip.dlid,1,this.playlistID);
}
}
}
catch(e){
}
});
method("getPosition",function(_db){
var _dc=-1;
for(var x=0;x<=this.playlist.length-1;x++){
if(_db.toString()===this.playlist[x].toString()){
_dc=x;
}
}
return _dc;
});
method("getNext",function(){
if(this.playlist.length>0){
var _de=0;
var _df=-1;
var _e0=true;
if(this.seedDLID!=null){
if(this.seedDLID.toString()=="0"){
_de=this.playlist[0];
_df=0;
}else{
_de=this.seedDLID;
_df=this.getPosition(_de);
}
_e0=false;
this.seedDLID=null;
}else{
for(var x=0;x<=this.playlist.length-1;x++){
if(this.playlist[x].toString()==this.currentDLID&&(this.currentPosition==-1||x==this.currentPosition)){
if(x+1==this.playlist.length){
}else{
_de=this.playlist[x+1];
_df=x+1;
x=this.playlist.length-1;
_e0=false;
}
}else{
}
}
}
if(_e0==false){
this.nextClip.atEndOfPlaylist=false;
this.nextClip.position=_df;
this.nextClip.dlid=_de;
return this.nextClip;
}else{
this.nextClip.atEndOfPlaylist=true;
this.nextClip.position=-1;
this.nextClip.dlid=0;
return this.nextClip;
}
}
});
}
return new Constructor();
};
}
if(typeof embeddedPlayerManager=="undefined"){
embeddedPlayerManager=new EmbeddedPlayerManager();
this.onEmbeddedPlayerEvent=function(_e2,_e3,_e4){
if(typeof embeddedPlayerManager.getPlayer(_e2)=="object"&&typeof embeddedPlayerManager.getPlayer(_e2)[_e3]=="function"){
console.info("Message",_e3);
embeddedPlayerManager.getPlayer(_e2)[_e3](_e4);
}else{
console.warn("Event type %s not supported.",_e3);
}
};
this.doAfterLoad=function(f){
if(typeof f!="function"){
return;
}
var _e6=window.onload;
window.onload=function(){
if(typeof _e6=="function"){
_e6();
}
f();
};
};
}
embeddedPlayerManager.BASE_LOCATION="";
embeddedPlayerManager.TRACKING_JS="http://video.nbcuni.com/dynamic/ad_tracking2.php";
embeddedPlayerManager.COMPANION_RENDERER="http://video.nbcuni.com/dynamic/companionDART.php";
embeddedPlayerManager.METADATA_THUMB_URL="http://video.nbcuni.com/";
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
try{
oldBeforeUnload();
executeOnUnload();
}
catch(e){
}
};
}else{
window.onbeforeunload=function(){
try{
executeOnUnload();
}
catch(e){
}
};
}
function executeOnUnload(){
__flash_unloadHandler=function(){
};
__flash_savedUnloadHandler=function(){
};
if(typeof window.onunload=="function"){
var _e7=window.onunload;
window.onunload=function(){
try{
embeddedPlayerManager.getPlayer().browserWindowBeforeUnload();
deconcept.SWFObjectUtil.cleanupSWFs();
_e7();
}
catch(e){
}
};
}else{
try{
embeddedPlayerManager.getPlayer().browserWindowBeforeUnload();
window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;
}
catch(e){
}
}
}

