text: window.PlayerFramework={};window.PlayerFramework.Plugins={};PlayerFramework.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c,false):a.attachEvent&&(a["e"+b+c]=c,a[b+c]=function(){a["e"+b+c](window.event)},a.attachEvent("on"+b,a[b+c]))};PlayerFramework.getComputedStyle=function(a,b){if(a.currentStyle)return a.currentStyle[b];else if(window.getComputedStyle)return document.defaultView.getComputedStyle(a,null).getPropertyValue(b)};
  PlayerFramework.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,false):a.detachEvent&&(a.detachEvent("on"+b,a[b+c]),a[b+c]=null,a["e"+b+c]=null)};PlayerFramework.padString=function(a,b,c){for(a=new String(a);a.length<b;)a=c+a;return a};PlayerFramework.typeExtendsFrom=function(a,b){return a.prototype instanceof b};PlayerFramework.proxy=function(a,b){return function(){return b.apply(a,arguments)}};
  PlayerFramework.mouseEventProxy=function(a,b){return PlayerFramework.proxy(this,function(){var c=document.createEvent("MouseEvents");c.initMouseEvent(b,true,true,window,0,0,0,0,0,false,false,false,false,0,null);a.dispatchEvent(c)})};
  PlayerFramework.xhr=function(a,b,c){var d=null;if(window.XMLHttpRequest)d=new XMLHttpRequest;else if(window.ActiveXObject)d=new ActiveXObject("Microsoft.XMLHTTP");else throw Error("XMLHttpRequest unavailable");d.onreadystatechange=function(){d.readyState==4&&(d.status>=200&&d.status<=300?b(d):c(d))};d.open(a.method||"GET",a.url,true);d.responseType=a.responseType||"";a.data&&(d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.setRequestHeader("Content-type","application/x-www-form-urlencoded"),
  d.setRequestHeader("Connection","close"));d.send(a.data)};PlayerFramework.merge=function(a,b){if(b)for(var c in b){var d=a[c],e=b[c];e==null?delete a[c]:typeof d=="object"&&typeof e=="object"&&!(d instanceof Array)?PlayerFramework.merge(d,e):a[c]=e}};PlayerFramework.mergeOptions=function(a,b){var c={};PlayerFramework.merge(c,a);PlayerFramework.merge(c,b);return c};
  PlayerFramework.convertNodeListToArray=function(a){if(a===void 0||a===null)throw new TypeError;for(var a=Object(a),b=[],c=a.length;c--;b.unshift(a[c]));return b};PlayerFramework.getElementsByClass=function(a,b,c){var d=[];b||(b=document);c||(c="*");var b=b.getElementsByTagName(c),e=RegExp("(^|\\s)"+a+"(\\s|$)");PlayerFramework.forEach(b,function(a){e.test(a.className)&&d.push(a)});return d};
  PlayerFramework.getTotalOffsetLeft=function(a){return a?a.offsetLeft+PlayerFramework.getTotalOffsetLeft(a.offsetParent):0};PlayerFramework.forEachAsync=function(a,b){if(a===void 0||a===null)throw new TypeError;var c=Object(a.concat());if(typeof b!=="function")throw new TypeError;var d=function(a,f,h){c.length>>>0!==0&&(a=c.shift(),b.call(h,d,a))};d()};
  PlayerFramework.first=function(a,b,c){if(a===void 0||a===null)throw new TypeError;var a=Object(a),d=a.length>>>0;if(typeof b!=="function")throw new TypeError;for(var e=0;e<d;e++)if(e in a&&b.call(c,a[e],e,a))return a[e];return null};PlayerFramework.filter=function(a,b,c){if(a===void 0||a===null)throw new TypeError;var a=Object(a),d=a.length>>>0;if(typeof b!=="function")throw new TypeError;for(var e=[],f=0;f<d;f++)if(f in a){var h=a[f];b.call(c,h,f,a)&&e.push(h)}return e};
  PlayerFramework.forEach=function(a,b,c){if(a===void 0||a===null)throw new TypeError;var a=Object(a),d=a.length>>>0;if(typeof b!=="function")throw new TypeError;for(var e=0;e<d;e++)e in a&&b.call(c,a[e],e,a)};PlayerFramework.requestAnimationFrame=function(){return PlayerFramework.proxy(window,window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)})}();
  PlayerFramework.createElement=function(a,b){if(!(b instanceof Array)||b.length===0||typeof b[0]!=="string")throw Error("Invalid JSONML.");var c=document.createElement(b[0]),d=b[1];if(d&&typeof d==="object"&&!(d instanceof Array))for(var e in d){var f=d[e];typeof f!=="string"?c[e]=f:c.setAttribute(e,f)}for(d=1;d<b.length;d++)e=b[d],e instanceof Array?PlayerFramework.createElement(c,e):typeof e==="string"&&c.appendChild(document.createTextNode(e));a&&a.appendChild(c);return c};
  PlayerFramework.domReady=function(){function a(){d?document.removeEventListener("DOMContentLoaded",a,true):document.readyState==="complete"&&document.detachEvent("onreadystatechange",a);c()}function b(){if(!e){try{document.documentElement.doScroll("left")}catch(a){window.setTimeout(arguments.callee,15);return}c()}}function c(){if(!e){e=true;for(var a=h.length,b=0;b<a;b++)h[b].call(document)}}var d=!!document.addEventListener,e=false,f=false,h=[];if(d)document.addEventListener("DOMContentLoaded",a,
  true),window.addEventListener("load",c,false);else{document.attachEvent("onreadystatechange",a);window.attachEvent("onload",c);try{f=window.frameElement===null}catch(g){}document.documentElement.doScroll&&f&&b()}return function(a){e?a.call(document):h.push(a)}}();
  (function(){var a=false,b=/xyz/.test(function(){})?/\b_super\b/:/.*/;PlayerFramework.Class=function(){};PlayerFramework.Class.extend=function(c){function d(){!a&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;a=true;var f=new this;a=false;for(var h in c)f[h]=typeof c[h]=="function"&&typeof e[h]=="function"&&b.test(c[h])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);this._super=c;return d}}(h,c[h]):c[h];d.prototype=f;d.constructor=
  d;d.extend=arguments.callee;return d}})();PlayerFramework.Object=PlayerFramework.Class.extend({init:function(a){this.options=a||{};this.eventListeners=[]},addEventListener:function(a,b,c){this.eventListeners.push({type:a,callback:b,capture:c})},dispatchEvent:function(a){PlayerFramework.forEach(this.eventListeners,function(b){b.type===a.type&&b.callback(a)})},mergeOptions:function(a,b){PlayerFramework.merge(this.options,b);PlayerFramework.merge(this.options,a)}});
  PlayerFramework.Plugin=PlayerFramework.Object.extend({defaultOptions:function(){return{}},isEnabled:function(){return true},init:function(a,b){this._super(b);this.player=a}});PlayerFramework.ModulePlugin=PlayerFramework.Plugin.extend({init:function(a,b){this._super(a,b);this.options.playerExtensionPropertyName&&(this.player[this.options.playerExtensionPropertyName]=this)}});
  PlayerFramework.MediaPlugin=PlayerFramework.Plugin.extend({init:function(a,b,c){this._super(a,b);this.playerOptions=c;this.element=null},checkSupport:function(){throw Error("Not implemented.");}});
  PlayerFramework.VideoMediaPlugin=PlayerFramework.MediaPlugin.extend({init:function(a,b,c){this._super(a,b,c);this.canPlayThroughEvent={type:"canplaythrough"};this.endedEvent={type:"ended"};this.errorEvent={type:"error"};this.fullScreenChangeEvent={type:"fullscreenchange"};this.loadedMediaPluginEvent={type:"loadedmediaplugin"};this.mouseOutEvent={type:"mouseout"};this.mouseOverEvent={type:"mouseover"};this.networkStateChangeEvent={type:"networkstatechange"};this.pauseEvent={type:"pause"};this.playEvent=
  {type:"play"};this.progressEvent={type:"progress"};this.seekedEvent={type:"seeked"};this.seekingEvent={type:"seeking"};this.timeUpdateEvent={type:"timeupdate"};this.unloadingMediaPluginEvent={type:"unloadingmediaplugin"};this.volumeChangeEvent={type:"volumechange"};a.buffered=PlayerFramework.proxy(this,this.buffered);a.canPlayType=PlayerFramework.proxy(this,this.canPlayType);a.controls=PlayerFramework.proxy(this,this.controls);a.currentTime=PlayerFramework.proxy(this,this.currentTime);a.displayingFullscreen=
  PlayerFramework.proxy(this,this.displayingFullscreen);a.duration=PlayerFramework.proxy(this,this.duration);a.error=PlayerFramework.proxy(this,this.error);a.muted=PlayerFramework.proxy(this,this.muted);a.networkState=PlayerFramework.proxy(this,this.networkState);a.paused=PlayerFramework.proxy(this,this.paused);a.poster=PlayerFramework.proxy(this,this.poster);a.preload=PlayerFramework.proxy(this,this.preload);a.readyState=PlayerFramework.proxy(this,this.readyState);a.scrubbing=PlayerFramework.proxy(this,
  this.seeking);a.seeking=PlayerFramework.proxy(this,this.seeking);a.volume=PlayerFramework.proxy(this,this.volume);a.pause=PlayerFramework.proxy(this,this.pause);a.play=PlayerFramework.proxy(this,this.play)},buffered:function(){throw Error("Not implemented.");},controls:function(){throw Error("Not implemented.");},currentTime:function(){throw Error("Not implemented.");},displayingFullscreen:function(){return!this.element||!this.element.parentNode?false:this.element.parentNode.className==="pf-container pf-full-browser"},
  duration:function(){throw Error("Not implemented.");},error:function(){throw Error("Not implemented.");},muted:function(){throw Error("Not implemented.");},paused:function(){throw Error("Not implemented.");},networkState:function(){throw Error("Not implemented.");},poster:function(){throw Error("Not implemented.");},preload:function(){throw Error("Not implemented.");},readyState:function(){throw Error("Not implemented.");},scrubbing:function(){throw Error("Not implemented.");},seeking:function(){throw Error("Not implemented.");
  },supportsVolumeSetter:function(){throw Error("Not implemented.");},volume:function(){throw Error("Not implemented.");},canPlayType:function(){throw Error("Not implemented.");},pause:function(){throw Error("Not implemented.");},play:function(){throw Error("Not implemented.");},setup:function(){throw Error("Not implemented.");},onCanPlayThrough:function(){this.player.dispatchEvent(this.canPlayThroughEvent)},onEnded:function(){this.player.dispatchEvent(this.endedEvent)},onError:function(){this.player.dispatchEvent(this.errorEvent)},
  onFullScreenChange:function(){this.player.dispatchEvent(this.fullScreenChangeEvent)},onLoadedMediaPlugin:function(){this.player.dispatchEvent(this.loadedMediaPluginEvent)},onNetworkStateChange:function(){this.player.dispatchEvent(this.networkStateChangeEvent)},onMouseOut:function(){this.player.dispatchEvent(this.mouseOutEvent)},onMouseOver:function(){this.player.dispatchEvent(this.mouseOverEvent)},onPause:function(){this.player.dispatchEvent(this.pauseEvent)},onPlay:function(){this.player.dispatchEvent(this.playEvent)},
  onProgress:function(){this.player.dispatchEvent(this.progressEvent)},onSeeked:function(){this.player.dispatchEvent(this.seekedEvent)},onSeeking:function(){this.player.dispatchEvent(this.seekingEvent)},onTimeUpdate:function(){this.player.dispatchEvent(this.timeUpdateEvent)},onUnloadingMediaPlugin:function(){this.player.dispatchEvent(this.unloadingMediaPluginEvent)},onVolumeChange:function(){this.player.dispatchEvent(this.volumeChangeEvent)}});
  PlayerFramework.VideoMediaPlugin.ReadyState={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4};PlayerFramework.VideoMediaPlugin.NetworkState={NETWORK_EMPTY:0,NETWORK_IDLE:1,NETWORK_LOADING:2,NETWORK_NO_SOURCE:3};PlayerFramework.VideoMediaPlugin.MediaError={MEDIA_ERR_ABORTED:1,MEDIA_ERR_NETWORK:2,MEDIA_ERR_DECODE:3,MEDIA_ERR_SRC_NOT_SUPPORTED:4};
  PlayerFramework.ControlPlugin=PlayerFramework.ModulePlugin.extend({init:function(a,b){this._super(a,b);this.player.addEventListener("canplaythrough",PlayerFramework.proxy(this,this.onCanPlayThrough),false);this.player.addEventListener("ended",PlayerFramework.proxy(this,this.onEnded),false);this.player.addEventListener("error",PlayerFramework.proxy(this,this.onError),false);this.player.addEventListener("fullscreenchange",PlayerFramework.proxy(this,this.onFullScreenChange),false);this.player.addEventListener("loadedmediaplugin",
  PlayerFramework.proxy(this,this.onLoadedMediaPlugin),false);this.player.addEventListener("mouseout",PlayerFramework.proxy(this,this.onPlayerMouseOut),false);this.player.addEventListener("mouseover",PlayerFramework.proxy(this,this.onPlayerMouseOver),false);this.player.addEventListener("networkstatechange",PlayerFramework.proxy(this,this.onNetworkStateChange),false);this.player.addEventListener("pause",PlayerFramework.proxy(this,this.onPause),false);this.player.addEventListener("play",PlayerFramework.proxy(this,
  this.onPlay),false);this.player.addEventListener("progress",PlayerFramework.proxy(this,this.onProgress),false);this.player.addEventListener("ready",PlayerFramework.proxy(this,this.onReady),false);this.player.addEventListener("seeked",PlayerFramework.proxy(this,this.onSeeked),false);this.player.addEventListener("seeking",PlayerFramework.proxy(this,this.onSeeking),false);this.player.addEventListener("timeupdate",PlayerFramework.proxy(this,this.onTimeUpdate),false);this.player.addEventListener("unloadingmediaplugin",
  PlayerFramework.proxy(this,this.onUnloadingMediaPlugin),false);this.player.addEventListener("volumechange",PlayerFramework.proxy(this,this.onVolumeChange),false)},mediaPlugin:function(){return this.player.mediaPlugin},onCanPlayThrough:function(){},onEnded:function(){},onError:function(){},onFullScreenChange:function(){},onLoadedMediaPlugin:function(){},onPlayerMouseOut:function(){},onPlayerMouseOver:function(){},onNetworkStateChange:function(){},onPause:function(){},onPlay:function(){},onProgress:function(){},
  onReady:function(){},onSeeked:function(){},onSeeking:function(){},onTimeUpdate:function(){},onUnloadingMediaPlugin:function(){},onVolumeChange:function(){}});
  PlayerFramework.Plugins.VideoElementMediaPluginBase=PlayerFramework.VideoMediaPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{"class":"pf-video",controls:false,supportsTrackElements:true})},init:function(a,b,c){this._super(a,b,c);if(this.options.element){if(this.options.element.tagName&&this.options.element.tagName.toLowerCase()!=="video")throw new TypeError("options.element not a video tag.");this.element=this.options.element}},buffered:function(){return this.element.buffered},
  controls:function(a){if(a!==void 0)this.element.controls=a;return this.element.controls},currentTime:function(a){if(a!==void 0)this.element.currentTime=a;return this.element.currentTime},duration:function(){return this.element.duration||0},error:function(){return this.element.error},ended:function(){return this.element.ended},muted:function(a){if(a!==void 0)this.element.muted=a;return this.element.muted},networkState:function(){var a;switch(this.element.networkState){case HTMLMediaElement.NETWORK_EMPTY:a=
  PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_EMPTY;break;case HTMLMediaElement.NETWORK_IDLE:a=PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_IDLE;break;case HTMLMediaElement.NETWORK_LOADING:a=PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_LOADING;break;case HTMLMediaElement.NETWORK_LOADED:a=PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_IDLE;break;case HTMLMediaElement.NETWORK_NO_SOURCE:a=PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_NO_SOURCE}return a},paused:function(){return this.element.paused},
  poster:function(){return this.element.poster},preload:function(){return this.element.preload},readyState:function(){var a;switch(this.element.readyState){case HTMLMediaElement.HAVE_NOTHING:a=PlayerFramework.VideoMediaPlugin.ReadyState.HAVE_NOTHING;break;case HTMLMediaElement.HAVE_METADATA:a=PlayerFramework.VideoMediaPlugin.ReadyState.HAVE_METADATA;break;case HTMLMediaElement.HAVE_CURRENT_DATA:a=PlayerFramework.VideoMediaPlugin.ReadyState.HAVE_CURRENT_DATA;break;case HTMLMediaElement.HAVE_FUTURE_DATA:a=
  PlayerFramework.VideoMediaPlugin.ReadyState.HAVE_FUTURE_DATA;break;case HTMLMediaElement.HAVE_ENOUGH_DATA:a=PlayerFramework.VideoMediaPlugin.ReadyState.HAVE_ENOUGH_DATA}return a},scrubbing:function(){return this.element.seeking},seeking:function(){return this.element.seeking},supportsVolumeSetter:function(){this.element.volume-=0.01;var a=this.volume()!==1;a&&(this.element.volume+=0.01);return a},volume:function(a){if(a)this.element.volume=a;return this.element.volume},canPlayType:function(a){return this.element?
  this.element.canPlayType(a):document.createElement("video").canPlayType(a)},checkSupport:function(a){var b=null;if(this.element.canPlayType){var b=PlayerFramework.convertNodeListToArray(this.element.getElementsByTagName("source")),c=PlayerFramework.filter(b,PlayerFramework.proxy(this,function(a){return a.parentNode===this.element})),b=PlayerFramework.first(c,PlayerFramework.proxy(this,function(a){return!!this.canPlayType(a.type).replace(/no/,"")}));if(!b&&/Android.*AppleWebKit/i.test(navigator.userAgent)&&
  (b=PlayerFramework.first(c,PlayerFramework.proxy(this,function(a){return a.type.match(/mp4/)}))))this.element.src=b.src,this.element.load()}a(!!b)},pause:function(){this.element.pause()},play:function(){this.element.play()},setup:function(){this.controls(!!this.options.controls);this.volume(this.playerOptions.initialVolume);!this.controls()&&!this.supportsVolumeSetter()&&this.cloneAndReplaceVideoElement();this.checkNetworkState();this.preload()!="none"?window.setTimeout(PlayerFramework.proxy(this,
  function(){this.checkBufferProgress(10,0,0)}),1):window.setTimeout(PlayerFramework.proxy(this,this.onCanPlayThrough),1);this.addEventListeners()},addEventListeners:function(){PlayerFramework.addEvent(this.element,"canplaythrough",PlayerFramework.proxy(this,this.onCanPlayThrough));PlayerFramework.addEvent(this.element,"error",PlayerFramework.proxy(this,this.onError));PlayerFramework.addEvent(this.element,"ended",PlayerFramework.proxy(this,this.onEnded));PlayerFramework.addEvent(this.element,"pause",
  PlayerFramework.proxy(this,this.onPause));PlayerFramework.addEvent(this.element,"play",PlayerFramework.proxy(this,this.onPlay));PlayerFramework.addEvent(this.element,"progress",PlayerFramework.proxy(this,this.onProgress));PlayerFramework.addEvent(this.element,"seeked",PlayerFramework.proxy(this,this.onSeeked));PlayerFramework.addEvent(this.element,"seeking",PlayerFramework.proxy(this,this.onSeeking));PlayerFramework.addEvent(this.element,"timeupdate",PlayerFramework.proxy(this,this.onTimeUpdate));
  PlayerFramework.addEvent(this.element,"volumechange",PlayerFramework.proxy(this,this.onVolumeChange));PlayerFramework.addEvent(this.element,"mouseout",PlayerFramework.proxy(this,this.onMouseOut));PlayerFramework.addEvent(this.element,"mouseover",PlayerFramework.proxy(this,this.onMouseOver))},checkBufferProgress:function(a,b,c){if(this.readyState()===PlayerFramework.VideoMediaPlugin.ReadyState.HAVE_ENOUGH_DATA||this.buffered().length==0)window.setTimeout(PlayerFramework.proxy(this,this.onCanPlayThrough),
  1);else{if(this.buffered().length>0){this.duration()>0&&this.duration();var d=this.duration()>0?this.buffered().end(0)/this.duration():0;if(d===c)if(b===a){this.onCanPlayThrough();return}else b++;else c=d,b=0}else if(this.networkState()===PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_NO_SOURCE||this.error())return;window.setTimeout(PlayerFramework.proxy(this,function(){this.checkBufferProgress(a,b,c)}),100)}},checkNetworkState:function(a){this.networkState()!==a&&(window.setTimeout(PlayerFramework.proxy(this,
  this.onNetworkStateChange),1),a=this.networkState());window.setTimeout(PlayerFramework.proxy(this,function(){this.checkNetworkState(a)}),100)},cloneAndReplaceVideoElement:function(){var a=this.element.nextSibling,b=this.element.parentNode;this.element=b.removeChild(this.element).cloneNode(true);this.element.style["-webkit-transform"]="translateX(-2000px)";PlayerFramework.addEvent(this.element,"timeupdate",PlayerFramework.proxy(this,function(){this.element.style["-webkit-transform"]="translateX(0)"}));
  b.insertBefore(this.element,a)}});document.createElement("video");
  PlayerFramework.Plugins.SilverlightMediaPluginBase=PlayerFramework.VideoMediaPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{"class":"pf-silverlight",controls:false,supportsTrackElements:false})},init:function(a,b,c){this._super(a,b,c);if(this.options.element){if(this.options.element.tagName&&this.options.element.tagName.toLowerCase()!=="object")throw new TypeError("options.element not a video tag.");this.setElement(this.options.element)}this.seekingValue=
  false},controls:function(a){if(a!==void 0)this.silverlightPlayer.IsControlStripVisible=a;return this.silverlightPlayer.IsControlStripVisible},currentTime:function(a){try{return a&&this.silverlightPlayer.SeekToPosition(a),this.silverlightPlayer.PlaybackPositionSeconds}catch(b){return 0}},duration:function(){try{return this.silverlightPlayer.EndPositionSeconds}catch(a){return 0}},error:function(){return this.lastError},muted:function(a){if(a!==void 0)this.silverlightPlayer.IsMuted=a,this.silverlightPlayer.SetVolume(this.silverlightPlayer.GetVolume()+
  1.0E-5),this.silverlightPlayer.SetVolume(this.silverlightPlayer.GetVolume()-1.0E-5);return this.silverlightPlayer.IsMuted},networkState:function(){return PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_IDLE},paused:function(){return this.silverlightPlayer.PlayState===PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState.Paused},poster:function(){var a=this.element.getAttribute("data-poster");return a?a.valueOf():null},preload:function(){return"auto"},readyState:function(){return this.silverlightPlayer.PlayState>
  PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState.Buffering?PlayerFramework.VideoMediaPlugin.ReadyState.HAVE_ENOUGH_DATA:PlayerFramework.VideoMediaPlugin.ReadyState.HAVE_NOTHING},scrubbing:function(){return this.seekingValue},seeking:function(){return this.seekingValue},supportsVolumeSetter:function(){return true},volume:function(a){a&&this.silverlightPlayer.SetVolume(a);return this.silverlightPlayer.GetVolume()},canPlayType:function(a){for(var b=[/video\/mp4/i,/text\/xml/i],c=0;c<b.length;c++)if(b[c].test(a))return true;
  return false},checkSupport:function(a){var b=false;navigator.plugins&&(b=!!navigator.plugins["Silverlight Plug-In"]);if(!b&&window.ActiveXObject)try{new ActiveXObject("AgControl.AgControl"),b=true}catch(c){}this.options.initParams&&!this.options.initParams.mediaurl&&(b=false);b?(this.checkSupportCallback=a,this.onLoadOrError()):a(false)},pause:function(){try{this.silverlightPlayer.Pause()}catch(a){}},play:function(){this.silverlightPlayer.Play()},setup:function(){},addEventListeners:function(){this.silverlightPlayer.addEventListener("ApplicationExit",
  PlayerFramework.proxy(this,this.onUnloadingMediaPlugin),false);this.silverlightPlayer.addEventListener("MediaEnded",PlayerFramework.proxy(this,this.onEnded),false);this.silverlightPlayer.addEventListener("MediaFailed",PlayerFramework.proxy(this,this.onMediaFailed),false);this.silverlightPlayer.addEventListener("PlayStateChanged",PlayerFramework.proxy(this,this.onPlayStateChanged),false);this.silverlightPlayer.addEventListener("PlaybackPositionChanged",PlayerFramework.proxy(this,this.onTimeUpdate),
  false);this.silverlightPlayer.addEventListener("VolumeLevelChanged",PlayerFramework.proxy(this,this.onVolumeChange),false);this.silverlightPlayer.addEventListener("SeekCompleted",PlayerFramework.proxy(this,this.onSeekCompleted),false);PlayerFramework.addEvent(this.element,"mouseout",PlayerFramework.proxy(this,this.onMouseOut));PlayerFramework.addEvent(this.element,"mouseover",PlayerFramework.proxy(this,this.onMouseOver))},setElement:function(a){this.element=a;this.element.style["-webkit-transform"]=
  "translateX(-2000px)";this.element.onLoadCallback=PlayerFramework.proxy(this,this.onElementLoad);this.element.onErrorCallback=PlayerFramework.proxy(this,this.onElementError)},onElementError:function(){this.hasError=true;this.onLoadOrError()},onElementLoad:function(a){var b=true;this.silverlightPlayer&&(b=false);this.silverlightPlayer=a;this.isReady=true;this.controls(!!this.options.controls);this.volume(this.playerOptions.initialVolume);if(b)this.onLoadOrError();else this.onTimeUpdate();if(this.controls())this.element.height=
  360;this.addEventListeners();this.element.style["-webkit-transform"]="translateX(0)";if(!b)this.onLoadedMediaPlugin()},onLoadOrError:function(){this.checkSupportCallback&&(this.hasError?this.checkSupportCallback(false):this.isReady&&this.checkSupportCallback(true))},onMediaFailed:function(){this.lastError={code:PlayerFramework.VideoMediaPlugin.MediaError.MEDIA_ERR_NETWORK};this.onError()},onPlayStateChanged:function(){try{var a=this.silverlightPlayer.PlayState;if(a===PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState.Paused)this.onPause();
  else if(a===PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState.Playing)this.onPlay();if(a===PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState.Playing||a===PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState.Paused||a===PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState.Stopped||a===PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState.ClipPlaying)this.onCanPlayThrough()}catch(b){}},onSeekCompleted:function(){var a=Date.now();PlayerFramework.proxy(this,
  function(b){window.setTimeout(PlayerFramework.proxy(this,function(){if(this.seekingValue=a!=b)this.onSeeking();else this.onSeeked()}),100)})(a)}});PlayerFramework.Plugins.SilverlightMediaPluginBase.PlayState={Closed:0,Opening:1,Buffering:2,Playing:3,Paused:4,Stopped:5,Individualizing:6,AcquiringLicense:7,ClipPlaying:100};
  var onSilverlightError=function(a,b){if(b.ErrorCode.toString()!=="2104"){var c=b.getHost();if(c.onErrorCallback)c.onErrorCallback()}},onSilverlightLoad=function(a){var a=a.getHost(),b;try{b=a.Content.Player}catch(c){}if(b&&a.onLoadCallback)a.onLoadCallback(b)};
  PlayerFramework.StaticContentMediaPlugin=PlayerFramework.MediaPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{"class":"pf-static"})},init:function(a,b,c){this._super(a,b,c);if(this.options.element){if(!this.options.element.tagName)throw new TypeError("options.element not a DOM element");this.element=this.options.element}},checkSupport:function(a){a(true)}});
  PlayerFramework.Plugins.PlaylistPlugin=PlayerFramework.ModulePlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{playlistItemEndBehavior:PlayerFramework.Plugins.PlaylistPlugin.PlaylistItemEndBehavior.ADVANCE_AND_PLAY,initialPlaylistItemIndex:0,playerExtensionPropertyName:"playlist"})},isEnabled:function(a){return!!a.options.playlist},init:function(a,b){this._super(a,b);this.playlistItems=[];this.loadPlaylistItems();this.player.addEventListener("ended",PlayerFramework.proxy(this,
  this.onEnded),false)},currentPlaylistItem:function(){if(this.currentPlaylistItemIndex+1>this.playlistItems.length)throw Error("Invalid playlist item index.");return this.playlistItems[this.currentPlaylistItemIndex]},onEnded:function(){this.options.playlistItemEndBehavior==PlayerFramework.Plugins.PlaylistPlugin.PlaylistItemEndBehavior.NONE||this.currentPlaylistItemIndex==this.playlistItems.length-1||(this.currentPlaylistItemIndex++,window.setTimeout(PlayerFramework.proxy(this,function(){switch(this.options.playlistItemEndBehavior){case PlayerFramework.Plugins.PlaylistPlugin.PlaylistItemEndBehavior.ADVANCE_ONLY:this.changeMediaPlugin({poster:null,
  autoplay:null});break;case PlayerFramework.Plugins.PlaylistPlugin.PlaylistItemEndBehavior.ADVANCE_AND_PLAY:this.changeMediaPlugin({poster:null,autoplay:"autoplay"})}}),1))},addPlaylistItem:function(a,b){this.playlistItems.splice(b!=void 0?b:this.playlistItems.length,0,a);this.player.dispatchEvent({type:"playlistitemadded"})},changeMediaPlugin:function(a){this.player.mediaPlugin.onUnloadingMediaPlugin();this.player.mediaPlugin.element.parentNode.removeChild(this.player.mediaPlugin.element);var b=this.currentPlaylistItem();
  PlayerFramework.merge(b,a);this.player.setMediaPlugin(b)},loadPlaylistItems:function(){if(!this.player.options.playlist||!(this.player.options.playlist instanceof Array))throw Error("Invalid playlist.");this.playlistItems=this.player.options.playlist;this.setPlaylistItemOptions()},nextPlaylistItem:function(){this.setPlaylistItem(this.currentPlaylistItemIndex+1)},previousPlaylistItem:function(){this.setPlaylistItem(this.currentPlaylistItemIndex-1)},removePlaylistItem:function(a){this.playlistItems.splice(a,
  1);this.player.dispatchEvent({type:"playlistitemremoved"})},setPlaylistItem:function(a){if(!(a<0||a>this.playlistItems.length-1))this.currentPlaylistItemIndex=a,this.changeMediaPlugin({poster:null,autoplay:"autoplay"})},setPlaylistItemOptions:function(){this.currentPlaylistItemIndex=this.options.initialPlaylistItemIndex;this.player.setMediaPlugin(this.currentPlaylistItem())}});PlayerFramework.Plugins.PlaylistPlugin.PlaylistItemEndBehavior={NONE:0,ADVANCE_ONLY:1,ADVANCE_AND_PLAY:2};
  PlayerFramework.TrackPlugin=PlayerFramework.ModulePlugin.extend({init:function(a,b){this._super(a,b);this.previousTimeValue=-1;this.previousScrubbingValue=false;this.lastDirection=1;this.activeTextTrack=null;this.isTrackPolyfill=false;this.addEventListeners()},onCueAdded:function(){},onCueChange:function(){},onCueLeft:function(){},onCueReached:function(){},onCueRemoved:function(){},onCueSkipped:function(){},onLoadedMediaPlugin:function(){var a=this.player.mediaPlugin.playerOptions[this.options.playerExtensionPropertyName];
  a&&PlayerFramework.forEach(a,PlayerFramework.proxy(this,function(a){this.addCue(a)}))},onScrubbed:function(){this.onTimeUpdate()},onTimeUpdate:function(){if(this.activeTextTrack){for(var a=this.player.scrubbing()&&this.previousScrubbingValue,b=!this.player.scrubbing()&&!this.previousScrubbingValue,c=!this.player.scrubbing()&&this.previousScrubbingValue,d=this.player.currentTime(),e=false,f=[],h=0;h<this.activeTextTrack.cues.length;h++){var g=this.activeTextTrack.cues[h];if(a&&(this.previousTimeValue<
  g.startTime&&d>=g.startTime||this.previousTimeValue>g.endTime&&d<=g.endTime))this.onCueReached({cue:g,seeked:c,direction:this.lastDirection});else if(!g.committed&&(c||b)&&d>=g.startTime&&d<=g.endTime)g.committed=true,this.onCueReached({cue:g,seeked:c,direction:this.lastDirection});if(a&&(this.previousTimeValue>=g.startTime&&d<g.startTime||this.previousTimeValue<=g.endTime&&d>g.endTime))this.onCueLeft({cue:g,seeked:c,direction:this.lastDirection});else if(g.committed&&(c||b)&&(d<g.startTime||d>g.endTime))g.committed=
  false,this.onCueLeft({cue:g,seeked:c,direction:this.lastDirection});var j=this.previousTimeValue<g.startTime&&d>g.endTime,k=this.previousTimeValue>g.endTime&&d<g.startTime;if(j||k)j=j?1:-1,this.onCueSkipped({cue:g,direction:j});j=this.scrubStartCurrentTimeValue<g.startTime&&d>g.endTime;k=this.scrubStartCurrentTimeValue>g.endTime&&d<g.startTime;if(!this.scrubStartCurrentTimeValue&&this.previousScrubbingValue)this.scrubStartCurrentTimeValue=d;else if(this.scrubStartCurrentTimeValue&&!this.player.scrubbing()&&
  (j||k))j=j?1:-1,this.onCueSkipped({cue:g,direction:j});if(d>=g.startTime&&d<=g.endTime&&(this.previousTimeValue>g.endTime||this.previousTimeValue<g.startTime))f.push(g),g.dispatchEvent({type:"enter"}),e=true;else if(this.previousTimeValue>=g.startTime&&this.previousTimeValue<=g.endTime&&(d>g.endTime||d<g.startTime))g.dispatchEvent({type:"exit"}),e=true}if(e)this.activeTextTrack.activeCues=f,this.onCueChange();if(this.scrubStartCurrentTimeValue&&!this.player.scrubbing())this.scrubStartCurrentTimeValue=
  0;this.lastDirection=this.previousTimeValue<d?1:this.previousTimeValue>d?-1:this.lastDirection;this.previousTimeValue=d;this.previousScrubbingValue=this.player.scrubbing()}},onUnloadingMediaPlugin:function(){this.activeTextTrack&&PlayerFramework.forEach(this.activeTextTrack.cues,PlayerFramework.proxy(this,function(a){this.removeCue(a)}))},addCue:function(a){this.activeTextTrack&&(this.activeTextTrack.addCue(a),this.onCueAdded({cue:a}))},addEventListeners:function(){this.player.addEventListener("loadedmediaplugin",
  PlayerFramework.proxy(this,this.onLoadedMediaPlugin),false);this.player.addEventListener("scrubbed",PlayerFramework.proxy(this,this.onScrubbed),false);this.player.addEventListener("timeupdate",PlayerFramework.proxy(this,this.onTimeUpdate),false);this.player.addEventListener("unloadingmediaplugin",PlayerFramework.proxy(this,this.onUnloadingMediaPlugin),false)},activateTextTrack:function(a){!a.xml&&a.src?(a.readyState=a.LOADING,PlayerFramework.xhr({url:a.src},PlayerFramework.proxy(this,function(b){a.xml=
  b.responseXML;this.processTextTrackSource(a);a.readyState=a.LOADED;a.dispatchEvent({type:"load"});a.mode=a.SHOWING;this.activeTextTrack=a}),PlayerFramework.proxy(this,PlayerFramework.proxy(this,function(){a.readyState=a.ERROR;this.player.dispatchEvent({type:"error"})})))):(a.mode=a.SHOWING,this.activeTextTrack=a)},deactivateTextTrack:function(a){a.mode=a.OFF;this.activeTextTrack=null},isActiveTextTrack:function(a){return this.activeTextTrack==a},processTextTrackSource:function(){},removeCue:function(a){this.activeTextTrack&&
  (this.activeTextTrack.removeCue(a),this.onCueRemoved({cue:a}))}});
  PlayerFramework.Plugins.TrackDataProviderPlugin=PlayerFramework.ModulePlugin.extend({init:function(a,b){this._super(a,b);this.addEventListeners();this.isTrackSupported=!!document.createElement("track").track;this.player.textTracks=[];this.player.addTextTrack=PlayerFramework.proxy(this,this.addTextTrack)},onLoadedMediaPlugin:function(){this.player.textTracks=[];var a=PlayerFramework.convertNodeListToArray(this.player.mediaPlugin.element.getElementsByTagName("track"));this.isTrackSupported||PlayerFramework.forEach(a,
  PlayerFramework.proxy(this,this.extendTrackElement));if(a=this.player.mediaPlugin.playerOptions.textTracks)for(var b=0;b<a.length;b++){var c=a[b];if(this.player.mediaPlugin.options.supportsTrackElements)c=PlayerFramework.createElement(this.player.mediaPlugin.element,["track",c]),this.isTrackSupported||this.extendTrackElement(c);else{var d=this.player.addTextTrack(c.kind,c.label,c.srclang);d.src=c.src;c["default"]!=void 0&&c.src&&this.activateTextTrack(d)}}},addEventListeners:function(){this.player.addEventListener("loadedmediaplugin",
  PlayerFramework.proxy(this,this.onLoadedMediaPlugin),false)},addTextTrack:function(a,b,c){var d=new PlayerFramework.TextTrack;d.kind=a;d.label=b;d.languge=c;this.player.textTracks.push(d);this.player.dispatchEvent({type:"texttrackadded"});return d},activateTextTrack:function(a){var b=PlayerFramework.first(this.player.modules,PlayerFramework.proxy(this,function(b){return b instanceof PlayerFramework.TrackPlugin&&b.options.kind===a.kind}));b&&b.activateTextTrack(a)},extendTrackElement:function(a){a.isDefault=
  a.getAttribute("default")!=void 0;a.kind=a.getAttribute("kind");a.label=a.getAttribute("label");a.srclang=a.getAttribute("srclang");a.src=a.getAttribute("src");var b=this.player.addTextTrack(a.kind,a.label,a.srclang);b.src=a.src;a.track=b;a.isDefault&&a.src&&this.activateTextTrack(b)}});
  PlayerFramework.Plugins.ChapterTrackPlugin=PlayerFramework.TrackPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{playerExtensionPropertyName:"chapters",kind:"chapters"})},init:function(a,b){this._super(a,b);this.activeTextTrack=this.player.addTextTrack(this.options.kind)},onCueAdded:function(a){a.type="chaptercueadded";this.player.dispatchEvent(a)},onCueChange:function(){this.player.dispatchEvent({type:"chaptercuechange"})},onCueLeft:function(a){a.type="chaptercueleft";
  this.player.dispatchEvent(a)},onCueReached:function(a){a.type="chaptercuereached";this.player.dispatchEvent(a)},onCueRemoved:function(a){a.type="chaptercueremoved";this.player.dispatchEvent(a)},onCueSkipped:function(a){a.type="chaptercueskipped";this.player.dispatchEvent(a)},skipBackChapter:function(){for(var a,b=this.activeTextTrack.cues.length-1;b>=0;b--){var c=this.activeTextTrack.cues[b];if(c.startTime<this.player.currentTime()-1){a=c.startTime;break}}a||(a=0);this.player.currentTime(a)},skipForwardChapter:function(){for(var a,
  b=0;b<this.activeTextTrack.cues.length;b++){var c=this.activeTextTrack.cues[b];if(c.startTime>this.player.currentTime()){a=c.startTime;break}}a||(a=this.player.duration());this.player.currentTime(a)}});
  PlayerFramework.Plugins.TimelineTrackPlugin=PlayerFramework.TrackPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{playerExtensionPropertyName:"timelineCues",kind:"metadata"})},init:function(a,b){this._super(a,b);this.activeTextTrack=this.player.addTextTrack(this.options.kind)},onCueAdded:function(a){a.type="timelinecueadded";this.player.dispatchEvent(a)},onCueChange:function(){this.player.dispatchEvent({type:"timelinecuechange"})},onCueLeft:function(a){a.type=
  "timelinecueleft";this.player.dispatchEvent(a)},onCueReached:function(a){a.type="timelinecuereached";this.player.dispatchEvent(a)},onCueRemoved:function(a){a.type="timelinecueremoved";this.player.dispatchEvent(a)},onCueSkipped:function(a){a.type="timelinecueskipped";this.player.dispatchEvent(a)}});
  PlayerFramework.Plugins.CaptionTrackPlugin=PlayerFramework.TrackPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{playerExtensionPropertyName:"captions",kind:"captions"})},init:function(a,b){this._super(a,b);this.player.addEventListener("ready",PlayerFramework.proxy(this,this.onReady),false)},onCueAdded:function(a){a.type="captioncueadded";this.player.dispatchEvent(a)},onCueChange:function(){if(this.activeTextTrack.mode==this.activeTextTrack.SHOWING){this.clearCaptionContainer();
  for(i=0,max=this.activeTextTrack.activeCues.length;i<max;i++)this.element.appendChild(this.activeTextTrack.activeCues[i].getCueAsHTML().cloneNode(true))}this.player.dispatchEvent({type:"captioncuechange"})},onCueLeft:function(a){a.type="captioncueleft";this.player.dispatchEvent(a)},onCueReached:function(a){a.type="captioncuereached";this.player.dispatchEvent(a)},onCueRemoved:function(a){a.type="captioncueremoved";this.player.dispatchEvent(a)},onCueSkipped:function(a){a.type="captioncueskipped";this.player.dispatchEvent(a)},
  onReady:function(){this.element=PlayerFramework.createElement(null,["div",{"class":"pf-caption-cues-container"}]);this.player.containerElement.insertBefore(this.element,this.player.mediaPlugin.element.nextSibling);PlayerFramework.addEvent(this.element,"mouseover",PlayerFramework.mouseEventProxy(this.player,"mouseover"));PlayerFramework.addEvent(this.element,"mouseout",PlayerFramework.mouseEventProxy(this.player,"mouseout"))},clearCaptionContainer:function(){this.element.innerHTML=""},processTextTrackSource:function(a){var b=
  (new PlayerFramework.TtmlParser).parseTtml(a.xml);a.cues=new PlayerFramework.TextTrackCueList({track:a,list:b.captions})}});
  PlayerFramework.Plugins.ControlStripPlugin=PlayerFramework.ControlPlugin.extend({init:function(a,b){this._super(a,b);this.accessKeys={playControl:"p",muteControl:"m",fullBrowserControl:"s",playOverlayControl:"p"};this.createControl();this.isVolumeMouseDown=this.isTimelineMouseDown=this.playInitiated=this.canPlayThrough=false;this.volumeLevelDelta=0.1;this.currentTimeDelta=5},currentTime:function(a){a!==void 0&&this.player.mediaPlugin.currentTime(a);return this.currentTimeValue},onPlayClick:function(){this.player.paused()?
  this.player.play():this.player.pause();this.element.style.display="block"},onTimelineMouseDown:function(a){document.body.focus();document.onselectstart=function(){return false};this.timelineSliderMeasurements={headWidth:this.timelineHeadElement.offsetWidth,headContainerLeft:PlayerFramework.getTotalOffsetLeft(this.timelineHeadContainerElement),headContainerWidth:this.timelineHeadContainerElement.offsetWidth};this.isTimelineMouseDown=true;this.player.scrubbing=PlayerFramework.proxy(this,this.scrubbing);
  this.player.dispatchEvent({type:"scrubbing"});this.onDocumentMouseMove(a)},onTimelineFillClick:function(){var a=this.player.currentTime();a-this.currentTimeDelta>0&&this.player.currentTime(a-this.currentTimeDelta)},onTimelineEmptyClick:function(){var a=this.player.currentTime();a+this.currentTimeDelta<this.player.duration()&&this.player.currentTime(a+this.currentTimeDelta)},onVolumeMouseDown:function(a){document.body.focus();document.onselectstart=function(){return false};this.volumeSliderMeasurements=
  {headWidth:this.volumeHeadElement.offsetWidth,headContainerLeft:PlayerFramework.getTotalOffsetLeft(this.volumeHeadContainerElement),headContainerWidth:this.volumeHeadContainerElement.offsetWidth};this.isVolumeMouseDown=true;this.onDocumentMouseMove(a)},onVolumeFillClick:function(){var a=this.player.volume();a-this.volumeLevelDelta>0&&this.player.volume(a-this.volumeLevelDelta)},onVolumeEmptyClick:function(){var a=this.player.volume();a+this.volumeLevelDelta<1&&this.player.volume(a+this.volumeLevelDelta)},
  onDocumentMouseMove:function(a){if(this.isTimelineMouseDown){var b=this.getSliderMouseFraction(this.timelineSliderMeasurements,a);this.currentTimeValue=b*this.player.duration();this.player.currentTime(this.currentTimeValue);this.setSliderHeadPosition(this.timelineContainerElement,b)}this.isVolumeMouseDown&&this.player.volume(this.getSliderMouseFraction(this.volumeSliderMeasurements,a))},onDocumentMouseUp:function(){document.onselectstart=function(){return true};(this.player.currentTime()===this.player.duration()||
  this.player.ended&&this.player.ended())&&this.player.pause();this.isVolumeMouseDown=this.isTimelineMouseDown=false;this.player.dispatchEvent({type:"scrubbed"})},onPlayerMouseOut:function(){if(this.player.options.overlayControls)this.element.style.display="none"},onPlayerMouseOver:function(){if(this.player.options.overlayControls&&(this.playInitiated||this.canPlayThrough&&!this.player.options.overlayPlayButton))this.element.style.display="block"},onMuteClick:function(){this.player.muted(!this.player.muted())},
  onFullBrowserClick:function(){this.player.displayingFullscreen()?this.exitFullScreen():this.enterFullScreen();this.mediaPlugin().onFullScreenChange()},onCanPlayThrough:function(){window.setTimeout(PlayerFramework.proxy(this,function(){this.canPlayThrough=true;if(!this.playInitiated&&!(this.player.mediaPlugin instanceof PlayerFramework.StaticContentMediaPlugin))this.playOverlayControlElement?this.playOverlayControlElement.style.display="block":this.element.style.display="block"}),500)},onEnded:function(){this.isTimelineMouseDown||
  this.player.pause()},onPlay:function(){if(this.posterElement)this.posterElement.style.display="none";if(this.playOverlayControlElement)this.playOverlayControlElement.style.display="none";this.playInitiated=true;this.playControlElement.className="pf-pause pf-play-control";this.playButtonElement.setAttribute("title","Pause")},onPause:function(){this.playControlElement.className="pf-play pf-play-control";this.playButtonElement.setAttribute("title","Play")},onProgress:function(){if(this.player.buffered().length>
  0)this.timelineLoadElement.style.width=Math.round(100*(this.player.buffered().end(0)/this.player.duration()),2)+"%"},onReady:function(){this.mediaPlugin().supportsVolumeSetter()||(this.element.className+=" pf-no-volume");var a=this.player.poster();if(a)this.posterElement=PlayerFramework.createElement(null,["img",{"class":"pf-poster",src:a}]),this.player.containerElement.insertBefore(this.posterElement,this.mediaPlugin().element.nextSibling);if(this.player.options.overlayPlayButton)this.playOverlayControlElement=
  PlayerFramework.createElement(this.player.containerElement,["div",{"class":"pf-play-overlay-control"},["button",{"class":"pf-button",title:"Play",accessKey:this.accessKeys.playOverlayControl},["span"]]]);this.onVolumeChange();this.addEventListeners()},onSeeked:function(){window.setTimeout(PlayerFramework.proxy(this,function(){this.player.currentTime=PlayerFramework.proxy(this.player.mediaPlugin,this.player.mediaPlugin.currentTime)}),1)},onSeeking:function(){if(this.isTimelineMouseDown)this.player.currentTime=
  PlayerFramework.proxy(this,this.currentTime)},onTimeUpdate:function(){var a=this.player.currentTime(),b=this.player.duration();if(!this.isTimelineMouseDown){var c=a!==0?a/b:0;this.setSliderHeadPosition(this.timelineContainerElement,c);this.timelineButtonElement.setAttribute("title","Timeline: "+Math.round(c*100)+"%")}if(this.previousCurrentTime!==Math.round(a))this.previousCurrentTime=Math.round(a),c=this.formatTimeString(a),this.timeElapsedElement.innerHTML="",this.timeElapsedElement.appendChild(document.createTextNode(c)),
  this.timeElapsedElement.appendChild(document.createTextNode(" / ")),a=this.formatTimeString(b-a),this.timeRemainingElement.innerHTML="",this.timeRemainingElement.appendChild(document.createTextNode(a))},onUnloadingMediaPlugin:function(){if(this.playOverlayControlElement)this.playOverlayControlElement.style.display="none"},onVolumeChange:function(){this.setSliderHeadPosition(this.volumeContainerElement,this.player.volume());this.muteControlElement.className=this.player.muted()?"pf-mute pf-mute-control":
  "pf-sound pf-mute-control";this.volumeButtonElement.setAttribute("title","Volume: "+Math.round(this.player.volume()*100)+"%")},addEventListeners:function(){this.posterElement&&PlayerFramework.addEvent(this.posterElement,"click",PlayerFramework.proxy(this,this.onDocumentMouseUp));this.playOverlayControlElement&&PlayerFramework.addEvent(this.playOverlayControlElement,"click",PlayerFramework.proxy(this,this.onPlayClick));PlayerFramework.addEvent(this.playControlElement,"click",PlayerFramework.proxy(this,
  this.onPlayClick));PlayerFramework.addEvent(this.muteControlElement,"click",PlayerFramework.proxy(this,this.onMuteClick));PlayerFramework.addEvent(this.fullBrowserControlElement,"click",PlayerFramework.proxy(this,this.onFullBrowserClick));PlayerFramework.addEvent(this.timelineContainerElement,"mousedown",PlayerFramework.proxy(this,this.onTimelineMouseDown));PlayerFramework.addEvent(this.timelineFillElement,"click",PlayerFramework.proxy(this,this.onTimelineFillClick));PlayerFramework.addEvent(this.timelineEmptyElement,
  "click",PlayerFramework.proxy(this,this.onTimelineEmptyClick));PlayerFramework.addEvent(this.volumeContainerElement,"mousedown",PlayerFramework.proxy(this,this.onVolumeMouseDown));PlayerFramework.addEvent(this.volumeFillElement,"click",PlayerFramework.proxy(this,this.onVolumeFillClick));PlayerFramework.addEvent(this.volumeEmptyElement,"click",PlayerFramework.proxy(this,this.onVolumeEmptyClick));PlayerFramework.addEvent(document,"mousemove",PlayerFramework.proxy(this,this.onDocumentMouseMove));PlayerFramework.addEvent(document,
  "mouseup",PlayerFramework.proxy(this,this.onDocumentMouseUp));PlayerFramework.addEvent(this.element,"mouseover",PlayerFramework.mouseEventProxy(this.player,"mouseover"));PlayerFramework.addEvent(this.element,"mouseout",PlayerFramework.mouseEventProxy(this.player,"mouseout"))},createControl:function(){this.element=PlayerFramework.createElement(this.player.containerElement,["div",{"class":this.player.options.overlayControls?"pf-controls pf-controls-overlay":"pf-controls"}]);this.playControlElement=
  PlayerFramework.createElement(this.element,["div",{"class":"pf-play-control pf-play"}]);this.playButtonElement=PlayerFramework.createElement(this.playControlElement,["button",{"class":"pf-button",title:"Play",accessKey:this.accessKeys.playControl},["span"]]);this.timelineControlElement=PlayerFramework.createElement(this.element,["div",{"class":"pf-timeline-control"}]);this.timelineButtonElement=PlayerFramework.createElement(this.timelineControlElement,["button",{"class":"pf-button"}]);this.timelineContainerElement=
  PlayerFramework.createElement(this.timelineControlElement,["div",{"class":"pf-slider-container"},["span",{"class":"pf-slider-range"}]]);this.timelineLoadElement=PlayerFramework.createElement(this.timelineContainerElement,["span",{"class":"pf-slider-load"}]);this.timelineFillElement=PlayerFramework.createElement(this.timelineContainerElement,["span",{"class":"pf-slider-fill"},["button",{"class":"pf-button",title:"Decrement Playback Position"}]]);this.timelineEmptyElement=PlayerFramework.createElement(this.timelineContainerElement,
  ["span",{"class":"pf-slider-empty"},["button",{"class":"pf-button",title:"Increment Playback Position"}]]);this.timelineHeadContainerElement=PlayerFramework.createElement(this.timelineContainerElement,["span",{"class":"pf-slider-head-container"}]);this.timelineHeadElement=PlayerFramework.createElement(this.timelineHeadContainerElement,["span",{"class":"pf-slider-head"}]);this.timeElapsedControlElement=PlayerFramework.createElement(this.element,["div",{"class":"pf-time-elapsed-control pf-time-display",
  title:"Time Elapsed"}]);this.timeElapsedElement=PlayerFramework.createElement(this.timeElapsedControlElement,["div","0:00:00"," / "]);this.timeRemainingControlElement=PlayerFramework.createElement(this.element,["div",{"class":"pf-time-remaining-control pf-time-display",title:"Time Remaining"}]);this.timeRemainingElement=PlayerFramework.createElement(this.timeRemainingControlElement,["div","0:00:00"]);this.muteControlElement=PlayerFramework.createElement(this.element,["div",{"class":"pf-mute-control pf-sound"},
  ["button",{"class":"pf-button",title:"Mute",accessKey:this.accessKeys.muteControl},["span",{"class":"pf-mute-icon"},["span",{"class":"pf-speaker-base"}],["span",{"class":"pf-speaker"}],["span",{"class":"pf-sound-waves"},["span",{"class":"pf-sound-wave-1 pf-sound-wave"}],["span",{"class":"pf-sound-wave-2 pf-sound-wave"}],["span",{"class":"pf-sound-wave-3 pf-sound-wave"}]]]]]);this.volumeControlElement=PlayerFramework.createElement(this.element,["div",{"class":"pf-volume-control"}]);this.volumeButtonElement=
  PlayerFramework.createElement(this.volumeControlElement,["button",{"class":"pf-button"}]);this.volumeContainerElement=PlayerFramework.createElement(this.volumeControlElement,["div",{"class":"pf-slider-container"},["span",{"class":"pf-slider-range"}]]);this.volumeFillElement=PlayerFramework.createElement(this.volumeContainerElement,["span",{"class":"pf-slider-fill"},["button",{"class":"pf-button",title:"Decrement Volume Level"}]]);this.volumeEmptyElement=PlayerFramework.createElement(this.volumeContainerElement,
  ["span",{"class":"pf-slider-empty"},["button",{"class":"pf-button",title:"Increment Volume Level"}]]);this.volumeHeadContainerElement=PlayerFramework.createElement(this.volumeContainerElement,["span",{"class":"pf-slider-head-container"}]);this.volumeHeadElement=PlayerFramework.createElement(this.volumeHeadContainerElement,["span",{"class":"pf-slider-head"}]);this.fullBrowserControlElement=PlayerFramework.createElement(this.element,["div",{"class":"pf-full-browser-control"},["button",{"class":"pf-button",
  title:"Full Screen",accessKey:this.accessKeys.fullBrowserControl},["span",{"class":"pf-full-browser-box"}]]]);this.updateLayout()},enterFullScreen:function(){this.player.containerElement.className="pf-container pf-full-browser";this.elementWidthBeforeFullBrowser=this.mediaPlugin().element.width;this.elementHeightBeforeFullBrowser=this.mediaPlugin().element.height;this.player.containerElement.style.width="";this.player.containerElement.style.height=""},exitFullScreen:function(){this.player.containerElement.className=
  "pf-container";this.mediaPlugin().element.width=this.elementWidthBeforeFullBrowser;this.mediaPlugin().element.height=this.elementHeightBeforeFullBrowser;this.player.containerElement.style.width=this.mediaPlugin().element.width.toString()+"px";this.player.containerElement.style.height=this.mediaPlugin().element.height.toString()+"px"},formatTimeString:function(a){var b=new Date(0,0,0,0,0,0,0);b.setSeconds(a);var a=PlayerFramework.padString(b.getHours(),1,"0"),c=PlayerFramework.padString(b.getMinutes(),
  2,"0"),b=PlayerFramework.padString(b.getSeconds(),2,"0");return a+":"+c+":"+b},getSliderMouseFraction:function(a,b){return Math.min(1,Math.max(0,(b.clientX-a.headWidth/2-a.headContainerLeft)/a.headContainerWidth))},scrubbing:function(){return this.isTimelineMouseDown},setSliderHeadPosition:function(a,b){var c=100*b+"%",d=100*(1-b)+"%";PlayerFramework.getElementsByClass("pf-slider-fill",a)[0].style.width=c;PlayerFramework.getElementsByClass("pf-slider-head",a)[0].style.left=c;PlayerFramework.getElementsByClass("pf-slider-empty",
  a)[0].style.width=d},updateLayout:function(){for(var a=PlayerFramework.convertNodeListToArray(this.element.childNodes),b=0,c=a.length-1;c>=0;c--){var d=a[c];d.style.right=b+"px";PlayerFramework.getComputedStyle(d,"display")!="none"&&(b+=parseInt(PlayerFramework.getComputedStyle(d,"width"),10));if(d.className=="pf-timeline-control")break}for(c=b=0;c<a.length;c++)if(d=a[c],d.style.left=b+"px",PlayerFramework.getComputedStyle(d,"display")!="none"&&(b+=parseInt(PlayerFramework.getComputedStyle(d,"width"),
  10)),d.className=="pf-timeline-control")break}});
  PlayerFramework.Plugins.ChapterTrackControlPlugin=PlayerFramework.ControlPlugin.extend({defaultOptions:function(a){return PlayerFramework.mergeOptions(this._super(),{chapterTrackPlugin:PlayerFramework.first(a.modules,function(a){return a instanceof PlayerFramework.Plugins.ChapterTrackPlugin}),controlStripPlugin:PlayerFramework.first(a.modules,function(a){return a instanceof PlayerFramework.Plugins.ControlStripPlugin})})},isEnabled:function(a,b){return!!b.chapterTrackPlugin&&!!b.controlStripPlugin},
  init:function(a,b){this._super(a,b);this.chapterTrackPlugin=this.options.chapterTrackPlugin;this.controlStripPlugin=this.options.controlStripPlugin;if(!this.chapterTrackPlugin)throw Error("ChapterTrackPlugin required.");if(!this.controlStripPlugin)throw Error("ControlStripPlugin required.");this.accessKeys={skipBackControl:"b",skipForwardControl:"n"}},onChapterCueAdded:function(){this.controlStripPlugin.element.className.indexOf("pf-chapters")===-1&&(this.controlStripPlugin.element.className+=" pf-chapters");
  this.controlStripPlugin.updateLayout()},onSkipBackClick:function(){this.chapterTrackPlugin.skipBackChapter()},onSkipForwardClick:function(){this.chapterTrackPlugin.skipForwardChapter()},onReady:function(){this.createControl();this.addEventListeners()},onUnloadingMediaPlugin:function(){this.controlStripPlugin.element.className=this.controlStripPlugin.element.className.replace("pf-chapters","");this.controlStripPlugin.updateLayout()},addEventListeners:function(){PlayerFramework.addEvent(this.player,
  "chaptercueadded",PlayerFramework.proxy(this,this.onChapterCueAdded));PlayerFramework.addEvent(this.skipBackControlElement,"click",PlayerFramework.proxy(this,this.onSkipBackClick));PlayerFramework.addEvent(this.skipForwardControlElement,"click",PlayerFramework.proxy(this,this.onSkipForwardClick))},createControl:function(){this.skipBackControlElement=PlayerFramework.createElement(null,["div",{"class":"pf-skip-back-chapter-control"},["button",{"class":"pf-button",title:"Skip Back Chapter",accessKey:this.accessKeys.skipBackControl},
  ["span",{"class":"pf-skip-back-chapter-arrow"}],["span",{"class":"pf-skip-back-chapter-line"}]]]);this.controlStripPlugin.element.insertBefore(this.skipBackControlElement,this.controlStripPlugin.timelineControlElement);this.skipForwardControlElement=PlayerFramework.createElement(null,["div",{"class":"pf-skip-forward-chapter-control"},["button",{"class":"pf-button",title:"Skip Forward Chapter",accessKey:this.accessKeys.skipForwardControl},["span",{"class":"pf-skip-forward-chapter-arrow"}],["span",
  {"class":"pf-skip-forward-chapter-line"}]]]);this.controlStripPlugin.element.insertBefore(this.skipForwardControlElement,this.controlStripPlugin.timelineControlElement.nextSibling);this.controlStripPlugin.updateLayout()}});
  PlayerFramework.Plugins.ErrorMessageControlPlugin=PlayerFramework.ControlPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{defaultMessage:"An error occurred while attempting to play the video."})},init:function(a,b){this._super(a,b)},onError:function(){!this.element&&this.mediaPlugin()&&this.player.error()&&(this.player.error().code===PlayerFramework.VideoMediaPlugin.MediaError.MEDIA_ERR_NETWORK||this.player.error().code===PlayerFramework.VideoMediaPlugin.MediaError.MEDIA_ERR_DECODE)?
  this.show(this.options.defaultMessage):this.mediaPlugin()||this.show(this.options.defaultMessage)},onNetworkStateChange:function(){!this.element&&this.player.networkState()===PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_NO_SOURCE&&this.show(this.options.defaultMessage)},show:function(a){window.setTimeout(PlayerFramework.proxy(this,function(){this.element=PlayerFramework.createElement(this.player.containerElement,["div",{"class":"pf-error-message-control"},["div",{"class":"pf-error-message-container"},
  a]])}),500)}});
  PlayerFramework.Plugins.HyperlinkMediaPlugin=PlayerFramework.StaticContentMediaPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{"class":"pf-hyperlinks",unsupportedTypes:[/text\/xml/i]})},init:function(a,b,c){this._super(a,b,c);this.player.containerElement.style["background-color"]="#fff";this.render();this.player.dispatchEvent({type:"canplaythrough"})},render:function(){var a=this.playerOptions.sources;this.element=PlayerFramework.createElement(null,["div",
  {"class":this.options["class"],width:this.playerOptions.width,height:this.playerOptions.height,controls:"controls",poster:this.playerOptions.poster},["div","Downloads:"]]);for(var b=0;b<a.length;b++){for(var c=true,d=0;d<this.options.unsupportedTypes.length;d++)this.options.unsupportedTypes[d].test(a[b].type)&&(c=false);if(c)c=a[b].src,PlayerFramework.createElement(this.element,["div",["a",{href:c,title:c},c]])}}});
  PlayerFramework.Plugins.MediaRssPlaylistPlugin=PlayerFramework.Plugins.PlaylistPlugin.extend({isEnabled:function(a){return!!a.options.mediaRssPlaylistUrl},init:function(a,b){this._super(a,b)},loadPlaylistItems:function(){PlayerFramework.xhr({url:this.player.options.mediaRssPlaylistUrl},PlayerFramework.proxy(this,function(a){(this.playlistItems=this.parseMediaRssXml(a.responseXML))?this.setPlaylistItemOptions():this.player.dispatchEvent({type:"error"})}),PlayerFramework.proxy(this,function(){this.player.dispatchEvent({type:"error"})}))},
  parseMediaRssXml:function(a){if((a=this.parseXmlDocument(a))&&a.rss&&a.rss.channel&&a.rss.channel.item){a=a.rss.channel.item;a instanceof Array||(a=[a]);for(var b=[],c=0;c<a.length;c++){var d=a[c],e=d["media:content"];e&&(b=b.concat(this.parseMediaContentNodes(e)));(d=d["media:group"])&&(b=b.concat(this.parseMediaGroupNodes(d)))}return b}},parseMediaContentNodes:function(a){var b=[];a instanceof Array||(a=[a]);for(var c=0;c<a.length;c++){var d=a[c];if(d.url){var e={sources:[]},f={src:d.url};if(d.type)f.type=
  d.type;if(d["media:thumbnail"])e.poster=d["media:thumbnail"].url;e.sources.push(f);b.push(e)}}return b},parseMediaGroupNodes:function(a){var b=[];a instanceof Array||(a=[a]);for(var c=0;c<a.length;c++){var d=a[c],e={sources:[]},f=d["media:content"];f instanceof Array||(f=[f]);for(var h=0;h<f.length;h++){var g=f[h];if(g.url){var j={src:g.url};if(g.type)j.type=g.type;if(g["media:thumbnail"])e.poster=g["media:thumbnail"].url;else if(d["media:thumbnail"])e.poster=d["media:thumbnail"].url;e.sources.push(j)}}e.sources.length>
  0&&b.push(e)}return b},parseXmlDocument:function(a){var b=a.documentElement;if(b){var a=b.nodeName,c=b.nodeType,b=this.parseXmlNode(b);if(c==11)return b;c={};c[a]=b;return c}},parseXmlNode:function(a){switch(a.nodeType){case 8:break;case 3:case 4:var b=a.nodeValue;if(!b.match(/\S/))break;return this.formatValue(b);default:var c={},d=a.attributes,a=a.childNodes;if(d&&d.length)for(var b={},e=0,f=d.length;e<f;e++){var h=d[e],g=h.nodeName.toLowerCase(),h=h.nodeValue;typeof c[g]=="undefined"&&(c[g]=0);
  this.addProperty(b,g,this.formatValue(h),++c[g])}if(a&&a.length){d=true;b&&(d=false);e=0;for(f=a.length;e<f&&d;e++)g=a[e].nodeType,g==3||g==4||(d=false);if(d){b||(b="");c=0;for(d=a.length;c<d;c++)b+=this.formatValue(a[c].nodeValue)}else{b||(b={});d=0;for(e=a.length;d<e;d++)if(g=a[d],f=g.nodeName,typeof f=="string"&&(g=this.parseXmlNode(g)))typeof c[f]=="undefined"&&(c[f]=0),this.addProperty(b,f,this.formatValue(g),++c[f])}}return b}},formatValue:function(a){if(typeof a=="string"&&a.length>0){var b=
  a.toLowerCase();if(b=="true")return true;else if(b=="false")return false;if(!isNaN(a))return(new Number(a)).valueOf()}return a},addProperty:function(a,b,c,d){switch(d){case 1:a[b]=c;break;case 2:a[b]=[a[b],c];break;default:a[b][a[b].length]=c}}});
  PlayerFramework.Player = PlayerFramework.Object.extend({init: function (a, b) {this._super(); this.mergeOptions(b, {containerClassName: "pf-container",autoplay: false,initialVolume: 0.5, overlayControls: true, overlayPlayButton: true, plugins: PlayerFramework.Plugins, pluginOptions: {}}); this.plugins = []; this.modules = []; this.fallbackMediaPlugins = []; this.mediaPlugin = null; this.controls = []; this.isReady = false; PlayerFramework.domReady(PlayerFramework.proxy(this, function () {if (!a) throw Error("Element is null.");if (typeof a === "string" && (a = document.getElementById(a), !a))throw Error("Element not found.");if (a.tagName != null)a.className === this.options.containerClassName ? (this.containerElement = a, this.containerElement.style.width = this.options.width, this.containerElement.style.height = this.options.height) : a.parentNode.className !== this.options.containerClassName && this.createParentContainer(a); this.loadPlugins();this.options.mediaPluginFallbackOrder || this.setMediaPluginFallbackOrderFromDeclaration(a);(!this.options.mediaPluginFallbackOrder ||
  this.options.sources) && this.setMediaPlugin()}), 500)}, createParentContainer: function (a) {this.containerElement = PlayerFramework.createElement(a.parentNode, ["div", { "class": "pf-container", style: "width: " + a.width + "px;height: " + a.height + "px;" }]);this.containerElement.appendChild(a)}, loadPlugins: function () {if (this.options && this.options.plugins) for (var a in this.options.plugins) {var b = PlayerFramework.Plugins[a]; if (PlayerFramework.typeExtendsFrom(b, PlayerFramework.ModulePlugin)) {var c = b.prototype.defaultOptions(this);
  PlayerFramework.merge(c,this.options.pluginOptions[a]);b.prototype.isEnabled(this,c)&&this.modules.push(new b(this,c))}else this.plugins.push(b)}},ready:function(a){this.isReady?a():this.addEventListener("ready",function(){window.setTimeout(a,1)},false)},setMediaPluginFallbackOrderFromDeclaration:function(a){var b=[],c=PlayerFramework.filter(this.plugins,function(a){return PlayerFramework.typeExtendsFrom(a,PlayerFramework.MediaPlugin)}),d=function(a){for(var f=0;f<a.length;f++){var h=a[f];if(h.className){var g=
  PlayerFramework.first(c,PlayerFramework.proxy(this,function(a){var b={};PlayerFramework.merge(b,this.options);b=a.prototype.defaultOptions(this,b);PlayerFramework.merge(b,this.options.pluginOptions[name]);return b["class"]===h.className&&!a.prototype.render}));if(!g&&f===a.length-1)throw Error("No matching media plugin.");if(g){b.push({type:g,element:h});PlayerFramework.proxy(this,d)(h.childNodes);break}}}};PlayerFramework.proxy(this,d)([a]);this.fallbackMediaPlugins=b},setMediaPluginFallbackOrderFromOptions:function(a){this.fallbackMediaPlugins=
  [];for(var b=0;b<a.mediaPluginFallbackOrder.length;b++){var c=a.plugins[a.mediaPluginFallbackOrder[b]];if(!c)throw Error("No matching media plugin.");this.fallbackMediaPlugins.push({type:c})}},setMediaPlugin:function(a){var b={};PlayerFramework.merge(b,this.options);a&&PlayerFramework.merge(b,a);b.mediaPluginFallbackOrder&&this.setMediaPluginFallbackOrderFromOptions(b);var c=null;PlayerFramework.forEachAsync(this.fallbackMediaPlugins,PlayerFramework.proxy(this,function(a,e){if(e.element&&c){var f=
  e.element.parentNode.removeChild(e.element);e.element=f.cloneNode(true)}f=e.type.prototype.defaultOptions(this,b);if(e.element)f.element=e.element;PlayerFramework.merge(f,this.options.pluginOptions[name]);var h=new e.type(this,f,b);h.element.parentNode||(this.containerElement.insertBefore(h.element,this.containerElement.firstChild),c&&this.containerElement.removeChild(c));h.checkSupport(PlayerFramework.proxy(this,function(b){b?(this.mediaPlugin=h,this.mediaPlugin instanceof PlayerFramework.VideoMediaPlugin&&
  (this.mediaPlugin.setup(),window.setTimeout(PlayerFramework.proxy(this,function(){if(this.isReady===false)this.isReady=true,this.dispatchEvent({type:"ready"});this.mediaPlugin.onLoadedMediaPlugin()}),1))):(c=h.element,a())}))}))}});
  PlayerFramework.Plugins.PlaylistControlPlugin=PlayerFramework.ControlPlugin.extend({defaultOptions:function(a){return PlayerFramework.mergeOptions(this._super(),{playlistPlugin:PlayerFramework.first(a.modules,function(a){return a instanceof PlayerFramework.Plugins.PlaylistPlugin})})},isEnabled:function(a,b){return!!b.playlistPlugin},init:function(a,b){this._super(a,b);this.playlistPlugin=this.options.playlistPlugin;if(!this.playlistPlugin)throw Error("PlaylistPlugin required.");this.playlistItemSpacer=
  10;this.playInitiated=false;this.accessKeys={playlistArrowControlLeft:"q",playlistArrowControlRight:"w",playlistToggle:"l"}},onLoadedMediaPlugin:function(){this.setSelectedPlaylistItem()},onPlayerMouseOut:function(){if(this.playlistElement&&this.playlistToggleElement&&this.playInitiated&&(this.playlistToggleElement.style.display="none",this.playlistElement.style.top==="0px"))this.playlistElement.style.display="none"},onPlayerMouseOver:function(){if(this.playlistElement&&this.playlistToggleElement&&
  this.playInitiated&&(this.playlistToggleElement.style.display="block",this.playlistElement.style.top==="0px"))this.playlistElement.style.display="block"},onPlay:function(){this.playInitiated=true},onPlaylistItemAdded:function(){this.playlistItemsElement.innerHTML="";this.createPlaylistItems();this.setSelectedPlaylistItem()},onPlaylistItemRemoved:function(){this.playlistItemsElement.innerHTML="";this.createPlaylistItems();this.setSelectedPlaylistItem()},onPlaylistItemClick:function(a){this.togglePlaylistDisplay(false);
  this.playlistPlugin.setPlaylistItem(a.selectedPlaylistItemIndex);this.setSelectedPlaylistItem()},onPlaylistArrowControlLeftElementClick:function(){this.arrowElementMouseDownEventFired?this.arrowElementMouseDownEventFired=false:this.scrollPlaylist(this.playlistItemWidth+this.playlistItemSpacer)},onPlaylistArrowControlLeftElementMouseDown:function(){this.arrowElementMouseDownEventFired=this.arrowElementMouseDown=true;this.scrollPlaylist(5)},onPlaylistArrowControlRightElementClick:function(){this.arrowElementMouseDownEventFired?
  this.arrowElementMouseDownEventFired=false:this.scrollPlaylist(-(this.playlistItemWidth+this.playlistItemSpacer))},onPlaylistArrowControlRightElementMouseDown:function(){this.arrowElementMouseDownEventFired=this.arrowElementMouseDown=true;this.scrollPlaylist(-5)},onPlaylistArrowElementMouseUp:function(){this.arrowElementMouseDown=false},onPlaylistToggleElementClick:function(){this.togglePlaylistDisplay(this.playlistElement.style.top!=="0px")},onReady:function(){this.createControl();this.addEventListeners()},
  addEventListeners:function(){PlayerFramework.addEvent(this.player,"playlistitemadded",PlayerFramework.proxy(this,this.onPlaylistItemAdded));PlayerFramework.addEvent(this.player,"playlistitemremoved",PlayerFramework.proxy(this,this.onPlaylistItemRemoved));PlayerFramework.addEvent(this.player,"play",PlayerFramework.proxy(this,this.onPlay));PlayerFramework.addEvent(this.playlistElement,"mouseover",PlayerFramework.mouseEventProxy(this.player,"mouseover"));PlayerFramework.addEvent(this.playlistElement,
  "mouseout",PlayerFramework.mouseEventProxy(this.player,"mouseout"));PlayerFramework.addEvent(this.playlistToggleElement,"mouseover",PlayerFramework.mouseEventProxy(this.player,"mouseover"));PlayerFramework.addEvent(this.playlistToggleElement,"mouseout",PlayerFramework.mouseEventProxy(this.player,"mouseout"));PlayerFramework.addEvent(this.playlistToggleElement,"click",PlayerFramework.proxy(this,this.onPlaylistToggleElementClick));PlayerFramework.addEvent(this.playlistArrowControlLeftElement,"mousedown",
  PlayerFramework.proxy(this,this.onPlaylistArrowControlLeftElementMouseDown));PlayerFramework.addEvent(this.playlistArrowControlLeftElement,"mouseup",PlayerFramework.proxy(this,this.onPlaylistArrowElementMouseUp));PlayerFramework.addEvent(this.playlistArrowControlLeftElement,"click",PlayerFramework.proxy(this,this.onPlaylistArrowControlLeftElementClick));PlayerFramework.addEvent(this.playlistArrowControlRightElement,"mousedown",PlayerFramework.proxy(this,this.onPlaylistArrowControlRightElementMouseDown));
  PlayerFramework.addEvent(this.playlistArrowControlRightElement,"mouseup",PlayerFramework.proxy(this,this.onPlaylistArrowElementMouseUp));PlayerFramework.addEvent(this.playlistArrowControlRightElement,"click",PlayerFramework.proxy(this,this.onPlaylistArrowControlRightElementClick))},createControl:function(){this.playlistToggleElement=PlayerFramework.createElement(this.player.containerElement,["div",{"class":"pf-playlist-toggle"},["button",{"class":"pf-button",title:"Show Playlist",accessKey:this.accessKeys.playlistToggle},
  ["span",{"class":"pf-playlist-toggle-text"},"PLAYLIST"]]]);this.playlistElement=PlayerFramework.createElement(this.player.containerElement,["div",{"class":"pf-playlist",title:"Playlist",style:"display: block;"},["div",{"class":"pf-playlist-arrow-control pf-playlist-arrow-control-left"},["button",{"class":"pf-button",title:"Scroll Playlist Left",accessKey:this.accessKeys.playlistArrowControlLeft},["span",{"class":"pf-playlist-arrow"}]]],["div",{"class":"pf-playlist-items-container"},["div",{"class":"pf-playlist-items"}]],
  ["div",{"class":"pf-playlist-arrow-control pf-playlist-arrow-control-right"},["button",{"class":"pf-button",title:"Scroll Playlist Right",accessKey:this.accessKeys.playlistArrowControlRight},["span",{"class":"pf-playlist-arrow"}]]]]);this.playlistArrowControlLeftElement=PlayerFramework.getElementsByClass("pf-playlist-arrow-control-left",this.playlistElement)[0];this.playlistArrowControlRightElement=PlayerFramework.getElementsByClass("pf-playlist-arrow-control-right",this.playlistElement)[0];this.playlistItemsContainerElement=
  PlayerFramework.getElementsByClass("pf-playlist-items-container",this.playlistElement)[0];this.playlistItemsElement=PlayerFramework.getElementsByClass("pf-playlist-items",this.playlistElement)[0];this.playlistItemsContainerElementWidth=this.playlistItemsContainerElement.offsetWidth;this.playlistItemWidth=this.playlistElementHeight=this.playlistElement.offsetHeight;this.playlistElement.style.display="none";this.createPlaylistItems()},createPlaylistItems:function(){for(var a=0;a<this.playlistPlugin.playlistItems.length;a++)this.createPlaylistItemControl(this.playlistPlugin.playlistItems[a],
  a)},createPlaylistItemControl:function(a,b){var c=PlayerFramework.createElement(this.playlistItemsElement,["div",{"class":"pf-playlist-item",style:"left: "+b*(this.playlistItemWidth+this.playlistItemSpacer)+"px;width: "+this.playlistItemWidth+"px;"}]),d=PlayerFramework.createElement(c,["button",{"class":"pf-button",title:"Playlist Item #"+(b+1)}]);a.poster&&PlayerFramework.createElement(d,["img",{alt:"Playlist Item #"+(b+1)+" Poster",src:a.poster,style:"width: 100%;height: 100%;"}]);PlayerFramework.proxy(this,
  function(a){PlayerFramework.addEvent(c,"click",PlayerFramework.proxy(this,function(){this.onPlaylistItemClick({selectedPlaylistItemIndex:a})}))})(b)},togglePlaylistDisplay:function(a){if(this.mediaPlugin())a?(this.playlistElement.style.display="block",this.playlistElement.style.top="0px",this.playlistToggleElement.style.top=this.playlistElementHeight+"px",this.playlistToggleElement.setAttribute("title","Hide Playlist")):(this.playlistElement.style.display="none",this.playlistElement.style.top=-this.playlistElementHeight+
  "px",this.playlistToggleElement.style.top="0px",this.playlistToggleElement.setAttribute("title","Show Playlist"))},setSelectedPlaylistItem:function(){var a=this.playlistItemsElement.childNodes;PlayerFramework.forEach(a,function(a){a.className="pf-playlist-item"});a=a[this.playlistPlugin.currentPlaylistItemIndex];a.className="pf-playlist-item pf-playlist-item-selected";if(parseInt(this.playlistItemsElement.style.left||"0px")+a.offsetLeft+this.playlistItemWidth>this.playlistItemsContainerElementWidth)this.playlistItemsElement.style.left=
  this.playlistItemsContainerElementWidth-(this.playlistPlugin.currentPlaylistItemIndex+1)*(this.playlistItemWidth+this.playlistItemSpacer)+"px"},scrollPlaylist:function(a){var b=parseInt(this.playlistItemsElement.style.left||"0px")+a,c=(this.playlistPlugin.playlistItems.length-1)*(this.playlistItemWidth+this.playlistItemSpacer);b>0?b=0:b<-c&&(b=-c);this.playlistItemsElement.style.left=b+"px";window.setTimeout(PlayerFramework.proxy(this,function(){this.arrowElementMouseDown&&this.scrollPlaylist(a)}),
  15)}});
  PlayerFramework.Plugins.SilverlightMediaPlugin=PlayerFramework.Plugins.SilverlightMediaPluginBase.extend({defaultOptions:function(a,b){return PlayerFramework.mergeOptions(this._super(),{params:{source:"../xap/SilverlightPlayer.xap",onError:"onSilverlightError",onLoad:"onSilverlightLoad",minRuntimeVersion:"4.0.50401.0",autoUpgrade:false,enableGPUAcceleration:true,windowless:true},initParams:{scriptablename:"Player",autoplay:!!b.autoplay}})},init:function(a,b,c){this._super(a,b,c);this.render()},render:function(){var a=
  PlayerFramework.createElement(null,["object",{"class":this.options["class"],data:"data:application/x-silverlight-2,",type:"application/x-silverlight-2",width:this.playerOptions.width,height:this.playerOptions.height,"data-poster":this.playerOptions.poster||null}]);this.createParams(a);this.setElement(a.cloneNode(true))},createParams:function(a){for(var b in this.options.params)PlayerFramework.createElement(a,["param",{name:b,value:this.options.params[b]}]);this.options.initParams.mediaurl||PlayerFramework.merge(this.options.initParams,
  {mediaurl:this.getMediaUrl()});var c="";for(b in this.options.initParams)c&&(c+=","),c+=b+"="+this.options.initParams[b];PlayerFramework.createElement(a,["param",{name:"InitParams",value:c}])},getMediaUrl:function(){var a=PlayerFramework.first(this.playerOptions.sources,PlayerFramework.proxy(this,function(a){return this.canPlayType(a.type)}));return!a?null:a.src.indexOf("://")!=-1?a.src:this.qualifyURL(a.src)},escapeHTML:function(a){return a.split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},
  qualifyURL:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href}});
  PlayerFramework.TextTrack=PlayerFramework.Object.extend({init:function(a){this._super(a);this.language=this.label=this.kind="";this.NONE=0;this.LOADING=1;this.LOADED=2;this.ERROR=3;this.readyState=this.NONE;this.OFF=0;this.HIDDEN=1;this.SHOWING=2;this.mode=this.HIDDEN;this.cues=new PlayerFramework.TextTrackCueList;this.activeCues=new PlayerFramework.TextTrackCueList;this.xml=null;this.onload=function(){};this.onerror=function(){};this.oncuechange=null},addCue:function(a){this.cues.push(a);this.cues.sort(function(a,
  c){return a.startTime>c.startTime?1:-1})},removeCue:function(a){for(var b=0;b<this.cues.length;b++)if(this.cues[b].id==a.id){this.cues.splice(b,1);break}}});PlayerFramework.TextTrackCue=PlayerFramework.Object.extend({init:function(a){this._super(a);this.track=this.options.track;this.id=this.options.id;this.startTime=this.options.startTime;this.endTime=this.options.endTime;this.pauseOnExit=this.options.pauseOnExit;this.onexit=this.onenter=null},getCueAsSource:function(){return this.options.text},getCueAsHTML:function(){return this.options.markup}});
  PlayerFramework.TextTrackCueList=function(a){var b=[];a&&a.list&&PlayerFramework.forEach(a.list,PlayerFramework.proxy(this,function(c){b.push(new PlayerFramework.TextTrackCue({track:a.track,id:c.id,startTime:c.start/1E3,endTime:c.end/1E3,pauseOnExit:false,text:c.caption.innerHTML,markup:c.caption,uri:c.uri}))}));b.getCueById=function(a){return a===""?null:PlayerFramework.first(b,function(b){return b.id===a})};return b};
  PlayerFramework.Plugins.ThrobberControlPlugin=PlayerFramework.ControlPlugin.extend({defaultOptions:function(){return PlayerFramework.mergeOptions(this._super(),{nodeCount:12,maxOpacity:0.85,animationDelay:75})},init:function(a,b){this._super(a,b);this.createControl();this.animateNodes()},onCanPlayThrough:function(){this.hide()},onError:function(){this.hide()},onUnloadingMediaPlugin:function(){this.element.style.display="block";this.animateNodes()},onNetworkStateChange:function(){this.player.networkState()===
  PlayerFramework.VideoMediaPlugin.NetworkState.NETWORK_NO_SOURCE&&this.hide()},createControl:function(){this.element=PlayerFramework.createElement(this.player.containerElement,["div",{"class":"pf-throbber-control",title:"Buffering"}]);this.throbberContainerElement=PlayerFramework.createElement(this.element,["div",{"class":"pf-throbber-container"}]);this.throbberNodeElements=[];this.opacityDifference=this.options.maxOpacity/this.options.nodeCount;for(var a=2*Math.PI/this.options.nodeCount,b=parseInt(PlayerFramework.getComputedStyle(this.throbberContainerElement,
  "width"))/2,c=0;c<this.options.nodeCount;c++){var d=PlayerFramework.createElement(this.throbberContainerElement,["div",{"class":"pf-throbber-node"}]);this.throbberNodeElements.push(d);var e=parseInt(PlayerFramework.getComputedStyle(d,"width"))/2,f=b*(Math.cos(c*a)+1)-e,e=b*(Math.sin(c*a)+1)-e;d.style.left=f.toString()+"px";d.style.top=e.toString()+"px";d.style.opacity=this.options.maxOpacity-(this.options.nodeCount-c)*this.opacityDifference}},animateNodes:function(){this.element.style.display!=="none"&&
  (window.setTimeout(PlayerFramework.proxy(this,function(){PlayerFramework.requestAnimationFrame(PlayerFramework.proxy(this,this.animateNodes))}),this.options.animationDelay),this.fadeNodes())},fadeNodes:function(){for(var a=0;a<this.options.nodeCount;a++)this.throbberNodeElements[a].style.opacity=this.options.maxOpacity-(this.options.nodeCount-a)*this.opacityDifference;this.throbberNodeElements.push(this.throbberNodeElements.shift())},hide:function(){window.setTimeout(PlayerFramework.proxy(this,function(){this.element.style.display=
  "none"}),500)}});
  PlayerFramework.Plugins.TimelineTrackControlPlugin=PlayerFramework.ControlPlugin.extend({defaultOptions:function(a){return PlayerFramework.mergeOptions(this._super(),{timelineTrackPlugin:PlayerFramework.first(a.modules,function(a){return a instanceof PlayerFramework.Plugins.TimelineTrackPlugin}),controlStripPlugin:PlayerFramework.first(a.modules,function(a){return a instanceof PlayerFramework.Plugins.ControlStripPlugin})})},isEnabled:function(a,b){return!!b.timelineTrackPlugin&&!!b.controlStripPlugin},init:function(a,
  b){this._super(a,b);this.timelineTrackPlugin=this.options.timelineTrackPlugin;this.controlStripPlugin=this.options.controlStripPlugin;if(!this.timelineTrackPlugin)throw Error("TimelineTrackPlugin required.");if(!this.controlStripPlugin)throw Error("ControlStripPlugin required.");this.cuesPositioned=false;this.cueElements=[]},onTimelineCueAdded:function(a){var b=PlayerFramework.createElement(this.timelineCueContainerElement,["div",{"class":"pf-timeline-cue"}]);b.cue=a.cue;PlayerFramework.addEvent(b,
  "click",PlayerFramework.proxy(this,function(){this.onTimelineCueClicked(a.cue)}));this.cueElements.push(b);this.player.duration()&&this.positionCue(b)},onTimelineCueClicked:function(a){this.player.currentTime(a.startTime)},onTimelineCueRemoved:function(a){for(var b=0;b<this.cueElements.length;b++){var c=this.cueElements[b];if(c.cue==a.cue){this.timelineCueContainerElement.removeChild(c);this.cueElements.splice(b,1);break}}},onPlay:function(){if(!this.cuesPositioned)this.cuesPositioned=true,PlayerFramework.forEach(this.cueElements,
  PlayerFramework.proxy(this,this.positionCue))},onReady:function(){this.createControl();this.addEventListeners()},onUnloadingMediaPlugin:function(){this.cuesPositioned=false;this.cueElements=[]},addEventListeners:function(){PlayerFramework.addEvent(this.player,"timelinecueadded",PlayerFramework.proxy(this,this.onTimelineCueAdded));PlayerFramework.addEvent(this.player,"timelinecueremoved",PlayerFramework.proxy(this,this.onTimelineCueRemoved));PlayerFramework.addEvent(this.player,"timeupdate",PlayerFramework.proxy(this,
  this.onTimeUpdate))},createControl:function(){this.timelineCueContainerElement=PlayerFramework.createElement(this.controlStripPlugin.timelineControlElement,["div",{"class":"pf-timeline-cues-container"}])},positionCue:function(a){a.style.left=100*a.cue.startTime/this.player.duration()+"%";a.style.display="block"}});
  PlayerFramework.Plugins.TrackSelectorControlPlugin=PlayerFramework.ControlPlugin.extend({defaultOptions:function(a){return PlayerFramework.mergeOptions(this._super(),{kind:"captions",trackOffOptionLabel:"(None)",trackPlugin:PlayerFramework.first(a.modules,function(a){return a instanceof PlayerFramework.TrackPlugin&&a.options.kind=="captions"}),controlStripPlugin:PlayerFramework.first(a.modules,function(a){return a instanceof PlayerFramework.Plugins.ControlStripPlugin})})},isEnabled:function(a,b){return!!b.trackPlugin&&
  !!b.controlStripPlugin},init:function(a,b){this._super(a,b);this.trackPlugin=this.options.trackPlugin;this.controlStripPlugin=this.options.controlStripPlugin;if(!this.trackPlugin)throw Error("TrackPlugin required.");if(!this.controlStripPlugin)throw Error("ControlStripPlugin required.");this.accessKeys={trackSelectorControl:"c"}},onTextTrackAdded:function(){this.controlStripPlugin.element.className.indexOf("pf-track-selector")===-1&&this.createControl()},onPlayerMouseOut:function(){if(this.popUpSelectorControl&&
  this.player.options.overlayControls)this.popUpSelectorControl.style.display="none"},onPlayerMouseOver:function(){if(this.popUpSelectorControl&&this.player.options.overlayControls)this.popUpSelectorControl.style.display="block"},onPopUpSelectorOptionClick:function(a){this.trackPlugin.isActiveTextTrack(a.textTrack)||(PlayerFramework.forEach(this.player.textTracks,PlayerFramework.proxy(this,function(b){b.kind==this.options.kind&&this.trackPlugin.deactivateTextTrack(a.textTrack)})),a.textTrack.label!=
  this.options.trackOffOptionLabel&&this.trackPlugin.activateTextTrack(a.textTrack));this.trackPlugin.clearCaptionContainer();this.removePopUpSelectorControl()},onSelectTrackClick:function(){this.popUpSelectorControl?this.removePopUpSelectorControl():this.createPopUpSelectorControl()},onReady:function(){this.addEventListeners()},addEventListeners:function(){PlayerFramework.addEvent(this.player,"texttrackadded",PlayerFramework.proxy(this,this.onTextTrackAdded))},createControl:function(){this.controlStripPlugin.element.className+=
  " pf-track-selector";this.selectTrackControlElement=PlayerFramework.createElement(null,["div",{"class":"pf-track-selector-control"},["button",{"class":"pf-button",title:"Select Captions/Subtitles",accessKey:this.accessKeys.trackSelectorControl},["span",{"class":"pf-track-selector-box"},"CC"]]]);PlayerFramework.addEvent(this.selectTrackControlElement,"click",PlayerFramework.proxy(this,this.onSelectTrackClick));this.controlStripPlugin.element.insertBefore(this.selectTrackControlElement,this.controlStripPlugin.fullBrowserControlElement);
  this.controlStripPlugin.updateLayout()},createPopUpSelectorControl:function(){var a=PlayerFramework.filter(this.player.textTracks,PlayerFramework.proxy(this,function(a){return a.kind==this.options.kind})),b=(a.length+1)*22,c=this.player.containerElement.offsetHeight;this.popUpSelectorControl=PlayerFramework.createElement(null,["div",{"class":"pf-popup-track-selector-control",style:this.style({bottom:this.player.options.overlayControls?this.controlStripPlugin.element.offsetHeight+"px":"0",height:(b<
  c?b:c)+"px","overflow-x":"hidden","overflow-y":b<c?"hidden":"scroll"})}]);var d=false;PlayerFramework.forEach(a,PlayerFramework.proxy(this,function(a){var b=this.trackPlugin.isActiveTextTrack(a);b&&(d=true);this.createPopUpSelectorOptionControl(a,b)}));this.createPopUpSelectorOptionControl({label:this.options.trackOffOptionLabel},!d);PlayerFramework.addEvent(this.popUpSelectorControl,"mouseover",PlayerFramework.mouseEventProxy(this.player,"mouseover"));PlayerFramework.addEvent(this.popUpSelectorControl,
  "mouseout",PlayerFramework.mouseEventProxy(this.player,"mouseout"));this.player.containerElement.insertBefore(this.popUpSelectorControl,this.trackPlugin.element.nextSibling)},createPopUpSelectorOptionControl:function(a,b){var c=PlayerFramework.createElement(this.popUpSelectorControl,["div",{"class":"pf-popup-track-selector-option"+(b?" selected":"")},["button",{"class":"pf-button",title:a.label},a.label]]);PlayerFramework.proxy(this,function(a){PlayerFramework.addEvent(c,"click",PlayerFramework.proxy(this,
  function(){this.onPopUpSelectorOptionClick({textTrack:a})}))})(a)},removePopUpSelectorControl:function(){this.player.containerElement.removeChild(this.popUpSelectorControl);this.popUpSelectorControl=null},style:function(a){var b="",c;for(c in a)b+=c+": "+a[c]+"; ";return b}});
  PlayerFramework.TtmlParser=PlayerFramework.Object.extend({init:function(a){this._super();this.mergeOptions(a,{xmlNamespace:"http://www.w3.org/XML/1998/namespace",ttmlNamespace:"http://www.w3.org/ns/ttml",ttmlStyleNamespace:"http://www.w3.org/ns/ttml#styling",ttmlMetaNamespace:"http://www.w3.org/ns/ttml#metadata",smpteNamespace:"http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",trackIdPrefix:"",mediaFrameRate:30,mediaFrameRateMultiplier:1,mediaSubFrameRate:1,mediaTickRate:1E3,mediaStart:0,mediaDuration:99999,
  clocktime:/^(\d{2,}):(\d{2}):(\d{2})((\.\d{1,})|:(\d{2,}(?:\.\d{2,})?))?$/,offsettime:/^(\d+(\.\d+)?)(ms|[hmsft])$/});this.regions=this.body=this.head=this.layout=this.root=null;this.usingDefaultRegion=true;this.TTMLEvents=[];this.Descriptions=[];this.Navigation=null;this.StyleSetCache={};this.styleSetId=0;this.ImageCache={};this.rightMostInLevel=[];this.nodeType={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,
  DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12}},parseTtml:function(a){this.xmlDoc=typeof a=="string"?this.parseXml(a):a;if(this.root=this.getElementsByTagNameNS(this.xmlDoc,this.options.ttmlNamespace,"tt")[0])this.body=this.getElementsByTagNameNS(this.root,this.options.ttmlNamespace,"body")[0]||null,this.layout=(this.head=this.getElementsByTagNameNS(this.root,this.options.ttmlNamespace,"head")[0]||null)?this.getElementsByTagNameNS(this.root,this.options.ttmlNamespace,
  "layout")[0]||null:null,this.loadSMPTEImages(),this.layout?(this.regions=this.getElementsByTagNameNS(this.layout,this.options.ttmlNamespace,"region"),this.usingDefaultRegion=this.regions.length==0):(this.regions=[],this.usingDefaultRegion=true),this.applyTiming(this.root,{first:this.options.mediaStart,second:this.options.mediaDuration},true),this.Navigation=this.getNavigation(this.body),this.applyStyling();for(var a=[],b=0,c=this.TTMLEvents.length;b<c;b++)if(this.TTMLEvents[b].elementScope!=this.root){var d=
  this.getCuesAtTime(this.TTMLEvents[b].tick,this.TTMLEvents[b].elementScope);if(b>0)for(var e=b-1;e>=0;e--)if(!(this.TTMLEvents[e].elementScope==this.root||this.TTMLEvents[e].elementScope==this.TTMLEvents[b].elementScope)){var f=this.getCuesAtTime(this.TTMLEvents[b].tick,this.TTMLEvents[e].elementScope);if(f.length!=0)d.push(f[0]);else break}e=0;for(f=d.length;e<f;e++)a.push({start:this.TTMLEvents[b].tick,end:b+1<c?this.TTMLEvents[b+1].tick:this.options.mediaDuration,id:"caption"+(a.length+1),caption:d[e]})}return{captions:a,
  descriptions:this.Descriptions,navigation:this.Navigation,xml:this.root}},parseXml:function(a){var b;try{window.DOMParser?b=(new DOMParser).parseFromString(a,"application/xml"):(b=new ActiveXObject("Microsoft.XMLDOM"),b.async=false,b.loadXML(a))}catch(c){b=null}return b},getCuesAtTime:function(a,b){var c=[];if(b&&this.isTemporallyActive(b,a))if(this.usingDefaultRegion){var d=PlayerFramework.createElement(null,["div",{style:this.style({position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%"})}]),
  e=this.prune(b,"",a);e&&d.appendChild(e);this.children(d).length>0&&c.push(d)}else PlayerFramework.forEach(this.regions,PlayerFramework.proxy(this,function(d){var e=this.attrNS(d,"id",this.options.xmlNamespace);if(d=this.translateMarkup(d,a)){(e=this.prune(b,e,a))&&d.appendChild(e);var e=d.getAttribute("data-showBackground")!="whenActive",g=d.innerHTML.replace(/\s/g,"");(e||g!="")&&c.push(d)}}));return c},applyTiming:function(a,b,c){var d=this.getTime(this.getAttr(a,"begin")),e=b.first+d,f,h=d=0;
  a.tagName!="body"&&e==0&&(e=0.01);if(!this.hasAttr(a,"dur")&&!this.hasAttr(a,"end")){if(c)e<=b.second?(Math.max(0,b.second-e),f=b.second):f=0}else this.hasAttr(a,"dur")&&this.hasAttr(a,"end")?(d=this.getTime(this.getAttr(a,"dur")),h=this.getTime(this.getAttr(a,"end")),c=Math.min(e+d,b.first+h),f=Math.min(c,b.second)):this.hasAttr(a,"end")?(h=this.getTime(this.getAttr(a,"end")),f=Math.min(b.first+h,b.second)):(d=this.getTime(this.getAttr(a,"dur")),f=Math.min(e+d,b.second));f<e&&(f=e);a.setAttribute("data-time-start",
  e);a.setAttribute("data-time-end",f);PlayerFramework.first(this.TTMLEvents,function(a){return a.tick==e})||this.TTMLEvents.push({tick:e,elementScope:a});PlayerFramework.first(this.TTMLEvents,function(a){return a.tick==f})||this.TTMLEvents.push({tick:f,elementScope:a});this.TTMLEvents.sort(function(a,b){return a.tick-b.tick});if(this.attrNS(a,"role",this.options.ttmlMetaNamespace)&&(b=this.attrNS(a,"audio","http://www.microsoft.com/enable#media")))this.Descriptions.push({start:e,end:f,id:"description"+
  (this.Descriptions.length+1),uri:b,caption:""}),this.Descriptions.sort(function(a,b){return a.start-b.start});var g=e,j=this.getAttr(a,"timeContainer");PlayerFramework.forEach(this.children(a),PlayerFramework.proxy(this,function(a){j!="seq"?this.applyTiming(a,{first:e,second:f},true):(this.applyTiming(a,{first:g,second:f},false),g=new Number(this.getAttr(a,"data-time-end")))}))},getTime:function(a){var b=0,c=0,d=0,e=0,e=this.options.clocktime.exec(a),a=this.options.offsettime.exec(a);return e!=null?
  (b=new Number(e[1])*3600,c=new Number(e[2])*60,d=new Number(e[3]),e=new Number(e[6])*this.getMetricMultiplier("f"),1E3*(b+c+d)+e):a!=null?(b=new Number(a[1]),multiplier=this.getMetricMultiplier(a[3]),b*multiplier):0},getMetricMultiplier:function(a){switch(a){case "h":return 36E5;case "ms":return 1;case "m":return 6E4;case "s":return 1E3;case "f":return 1E3/this.options.mediaFrameRate;case "t":return 1E3/this.options.mediaTickRate;default:return 0}},isTemporallyActive:function(a,b){return this.getAttr(a,
  "data-time-start")<=b&&b<this.getAttr(a,"data-time-end")},getNavigation:function(a){return this.getNavPoint(a,null,0)},getNavPoint:function(a,b,c){var d=null,e=[],f={};this.rightMostInLevel.length<=c&&this.rightMostInLevel.push(null);switch(this.attrNS(a,"role",this.options.ttmlMetaNamespace)){case "x-nav-label":d=this.getNavLabel(a);break;case "x-nav-point":PlayerFramework.forEach(this.children(a),PlayerFramework.proxy(this,function(a){switch(this.attrNS(a,"role",this.options.ttmlMetaNamespace)){case "x-nav-label":d=
  this.getNavLabel(a);break;case "x-nav-list":e=this.getNavList(a,f,c+1)}}))}if(d!=null){f.text=d.text;f.startTime=new Number(d.startTime)/1E3+0.01;f.endTime=new Number(d.endTime)/1E3;f.parent=b;f.left=this.rightMostInLevel[c];f.right=null;f.children=e;if(this.rightMostInLevel[c]!=null)this.rightMostInLevel[c].right=f;return this.rightMostInLevel[c]=f}else return null},getNavLabel:function(a){var b=this.attrNS(a,"role",this.options.ttmlMetaNamespace);if(b!=null&&!PlayerFramework.first(b,function(a){return a===
  "x-nav-label"}))return{text:a.innerHTML,startTime:this.getAttr(a,"data-time-start"),endTime:this.getAttr(a,"data-time-end")}},getNavList:function(a,b,c){var d=[],e=this.attrNS(a,"role",this.options.ttmlMetaNamespace);e!=null&&!PlayerFramework.first(e,function(a){return a==="x-nav-list"})&&PlayerFramework.forEach(this.children(a),function(a){a=getNavPoint(a,b,c);a!=null&&d.push(a)});return d},translateMarkup:function(a,b){var c=void 0,d=this.getTagNameEquivalent(a),e="",f="",h={};if(a&&this.isTemporallyActive(a,
  b)){switch(d){case "tt:region":case "tt:tt":f="cue ";e="div";break;case "tt:body":case "tt:div":e="div";break;case "tt:p":e="p";break;case "tt:span":e="span";break;case "tt:br":e="br";break;case "":break;default:e=d,PlayerFramework.forEach(PlayerFramework.convertNodeListToArray(a.attributes),function(a){h[a.name]=a.value})}(d=this.attrNS(a,"role",this.options.ttmlMetaNamespace))&&(f+=d+" ");var g=this.attrNS(a,"class","http://www.w3.org/1999/xhtml");g&&(f+=g+" ");d=="x-ruby"&&(e="ruby");d=="x-rubybase"&&
  (e="rb");d=="x-rubytext"&&(e="rt");d=this.getAttr(a,"image");d!=null&&(e="img");if(e!=""){c=PlayerFramework.createElement(null,[e,{"class":f,style:this.style({offset:"0px",margin:"0pt",padding:"0pt",border:"0pt",overflow:"hidden",fontFamly:"Arial"})}]);(e=this.attrNS(a,"id",this.options.xmlNamespace))&&c.setAttribute("id",this.options.trackIdPrefix+e);this.translateStyle(a,c,b);for(attr in h)c.setAttribute(attr,h[attr]);d!=null&&(c.setAttribute("src",d),c.setAttribute("alt",a.innerHTML))}}return c},
  translateStyle:function(a,b,c){var d={},e=this.StyleSetCache[this.getAttr(a,"__styleSet__")],f;for(f in e)d[f]=e[f];PlayerFramework.forEach(this.getElementsByTagNameNS(a,this.options.ttmlNamespace,"set"),PlayerFramework.proxy(this,function(a){this.isTemporallyActive(a,c)&&this.applyInlineStyles(d,a)}));for(f in d)this.convertTtmlToCss(b,f,d[f])},convertTtmlToCss:function(a,b,c){var d;switch(b){case "origin":b=c.split(/\s/);d={position:"absolute",left:b[0],top:b[1]};break;case "extent":b=c.split(/\s/);
  d={width:b[0],height:b[1]};break;case "displayAlign":d={textAlign:c};break;case "wrapOption":d={whiteSpace:c=="nowrap"?"nowrap":"normal"};break;default:d={},d[b]=c}this.setStyle(a,d);return a},applyStyling:function(){PlayerFramework.forEach(this.root.getElementsByTagName("*"),PlayerFramework.proxy(this,function(a){this.applyStyle(a)}))},applyStyle:function(a){var b={};this.applyStylesheet(b,a);this.applyInlineStyles(b,a);this.StyleSetCache[this.styleSetId]=b;a.setAttribute("__styleSet__",this.styleSetId++)},
  applyInlineStyles:function(a,b){PlayerFramework.forEach(PlayerFramework.convertNodeListToArray(b.attributes),PlayerFramework.proxy(this,function(c){if(c.namespaceURI==this.options.ttmlStyleNamespace)a[this.getLocalTagName(c)]=c.nodeValue;if(c.namespaceURI==this.options.smpteNamespace&&this.getLocalTagName(this)=="backgroundImage")c=c.nodeValue,c.indexOf("#")==0?b.setAttribute("image","data:image/png;base64,"+this.ImageCache[c]):b.setAttribute("image",c)}))},applyStylesheet:function(a,b){if(this.hasAttr(b,
  "style")){var c=this.isTagNS(b,"style",this.options.ttmlNamespace),d=this.getAttr(b,"style").split(/\s/);PlayerFramework.forEach(d,PlayerFramework.proxy(this,function(b){PlayerFramework.forEach(this.getElementsByTagNameNS(this.head,this.options.ttmlNamespace,"style"),PlayerFramework.proxy(this,function(d){this.attrNS(d,"id",this.options.xmlNamespace)==b&&(this.applyStylesheet(a,d),!c&&this.isTagNS(d,"region",this.options.ttmlNamespace)&&PlayerFramework.forEach(this.getElementsByTagNameNS(d,this.options.ttmlNamespace,
  "style"),PlayerFramework.proxy(this,function(b){this.applyStylesheet(a,b)})),this.applyInlineStyles(a,d))}))}))}},isInRegion:function(a,b){if(b==""||b==void 0)return this.usingDefaultRegion;if(this.getAttr(a,"region")==b)return true;for(var c=a.parentNode;c!=null&&c.nodeType==this.nodeType.ELEMENT_NODE;){var d=this.getAttr(c,"region");if(d)return d==b;c=c.parentNode}for(var c=a.getElementsByTagName("*"),d=0,e=c.length;d<e;d++)if(this.getAttr(c[d],"region")==b&&c[d].namespaceURI==this.options.ttmlNamespace)return true;
  return this.usingDefaultRegion?b=="":false},loadSMPTEImages:function(){this.ImageCache={};var a=this.getElementsByTagNameNS(this.root,this.options.smpteNamespace,"image");PlayerFramework.forEach(a,PlayerFramework.proxy(this,function(a){var c=this.attrNS(a,"id",this.options.xmlNamespace);if(c!=null)this.ImageCache["#"+c]=a.innerHTML}))},getTagNameEquivalent:function(a){var b=this.getLocalTagName(a);switch(a.namespaceURI){case "http://www.w3.org/1999/xhtml":return b;case "http://www.w3.org/ns/ttml":return"tt:"+
  b;case "http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt":return"smpte:"+b;default:return""}},prune:function(a,b,c){var d=void 0;if(this.isInRegion(a,b)){d=this.translateMarkup(a,c);if(!d)return d;PlayerFramework.forEach(a.childNodes,PlayerFramework.proxy(this,function(a){a.nodeType!=this.nodeType.COMMENT_NODE&&(a.nodeType==this.nodeType.TEXT_NODE?d.appendChild(document.createTextNode(a.data)):(a=this.prune(a,b,c))&&d.appendChild(a))}))}return d},getLocalTagName:function(a){return a.localName?
  a.localName:a.baseName},getElementsByTagNameNS:function(a,b,c){for(var d=[],a=a.getElementsByTagName("*"),e=0;e<a.length;e++)this.getLocalTagName(a[e])==c&&a[e].namespaceURI==b&&d.push(a[e]);return d},prefixNS:function(a,b){if(b=="http://www.w3.org/XML/1998/namespace")return"xml:";if(a==null||a==void 0||a.nodeType==this.nodeType.DOCUMENT_NODE)return"";for(var c=a.attributes,d=0;d<c.length;d++){var e=c[d];if(e.name.indexOf("xmlns")==0&&e.value==b){if(e.localName)return e.localName+":";if(e.baseName)return e.baseName+
  ":"}}return this.prefixNS(a.parentNode,b)},attrNS:function(a,b,c){c=c?this.prefixNS(a,c):"";return a.getAttribute(c+b)},hasAttr:function(a,b){return this.getAttr(a,b)!=void 0},getAttr:function(a,b){if(a.nodeType==this.nodeType.ELEMENT_NODE){var c=a.getAttribute(b);c==void 0&&a.prefix!=null&&a.prefix!=""&&(c=a.getAttribute(a.prefix+":"+b));return c}},isTagNS:function(a,b,c){var d=false,d=a.localName?b==a.localName:b==a.baseName;d&=a.namespaceURI==c;return d},children:function(a){for(var a=a.firstChild,
  b=[];a;a=a.nextSibling)a.nodeType===this.nodeType.ELEMENT_NODE&&b.push(a);return b},style:function(a){var b="",c;for(c in a)b+=c+": "+a[c]+"; ";return b},setStyle:function(a,b){for(var c in b)a.style[c]=b[c]}});
  PlayerFramework.Plugins.VideoElementMediaPlugin=PlayerFramework.Plugins.VideoElementMediaPluginBase.extend({init:function(a,b,c){this._super(a,b,c);this.render()},render:function(){this.element=PlayerFramework.createElement(null,["video",{"class":this.options["class"],width:this.playerOptions.width,height:this.playerOptions.height,controls:"controls",poster:this.playerOptions.poster||null,autoplay:this.playerOptions.autoplay||null}]);for(var a=0;a<this.playerOptions.sources.length;a++){var b=this.playerOptions.sources[a];
  this.canPlayType(b.type)&&PlayerFramework.createElement(this.element,["source",b])}}});