var Vevo=window.Vevo||{};Vevo.VideoPlayer=(function(){var PLAYERID="thePlayer";var VP=null;var $VP=null;var playList=false;var playListPos=0;var _this=null;var isFullScreen=false;
return{fire:function(e){if(e.type==="complete"){$(Vevo).trigger("videoComplete")}else{$VP.trigger(e.type,e)}},popout:function(e,eventObj){var playlistParams=(Vevo.pageData.pageType=="watchPlaylist")?"&isPlaylist=true&playlistId="+Vevo.pageData.playlistID:"";
window.open("/Watch/Popout?videoId="+eventObj.isrc+"&autoplay="+eventObj.playing+"&startTime="+eventObj.time+playlistParams,"PopoutPlayer","width=850,height=350,location=0,toolbar=0,menubar=0,directories=0,scrollbars=0,status=0,resizable=0")
},fullscreen:function(e,data){isFullScreen=data.fullscreen;$(Vevo).trigger("videoFullscreenChange")},seek:function(idx){VP.seek(idx)},pause:function(){VP.pause()
},play:function(){VP._play()},isPlaying:function(){return VP._isPlaying()},stop:function(){VP._stop()},load:function(e,isrc,isPlaylist){VP.loadVideo(isrc,isPlaylist);
$(Vevo.VideoPlayer).trigger("videoLoaded",[isrc])},toggleAutoPlay:function(e){VP.setAutoPlay(!VP.getAutoPlay())},init:function(){_this=this;VP=document.getElementById(PLAYERID);
$VP=$(VP);var lambda=function(){};var events=["complete","fullscreen","popout","error"];for(var i=0,eLen=events.length,e;i<eLen;i++){VP.addFlashListener(events[i],"Vevo.VideoPlayer.fire")
}$VP.bind("popout",this.popout);$VP.bind("fullscreen",this.fullscreen);$(Vevo).trigger("playerAvailable")}}})();$(document).ready(function(){$(Vevo).bind("loadVideo",Vevo.VideoPlayer.load)
});