(function(f,g){var d=f.document;(function(){var a=!1,c=/xyz/.test(function(){})?/\b_super\b/:/.*/;this.JRClass=function(){};JRClass.extend=function(b){function e(){!a&&this.init&&this.init.apply(this,arguments)}var d=this.prototype;a=!0;var f=new this;a=!1;for(var g in b)f[g]=typeof b[g]=="function"&&typeof d[g]=="function"&&c.test(b[g])?function(a,c){return function(){var b=this._super;this._super=d[a];var h=c.apply(this,arguments);this._super=b;return h}}(g,b[g]):b[g];e.prototype=f;e.constructor=
e;e.extend=arguments.callee;return e}})();var b=JRClass.extend({init:function(a,c){this.video=typeof a=="string"?d.getElementById(a):a;this.video.player=this;this.values={};this.elements={};this.options={autoplay:!1,preload:!0,useBuiltInControls:!1,controlsBelow:!1,controlsAtStart:!1,controlsHiding:!0,defaultVolume:0.85,playerFallbackOrder:["html5","flash","links"],flashPlayer:"htmlObject",flashPlayerVersion:!1};typeof b.options=="object"&&_V_.merge(this.options,b.options);typeof c=="object"&&_V_.merge(this.options,
c);if(this.getPreloadAttribute()!==g)this.options.preload=this.getPreloadAttribute();if(this.getAutoplayAttribute()!==g)this.options.autoplay=this.getAutoplayAttribute();this.box=this.video.parentNode;this.linksFallback=this.getLinksFallback();this.hideLinksFallback();this.each(this.options.playerFallbackOrder,function(a){if(this[a+"Supported"]())return this[a+"Init"](),!0});this.activateElement(this,"player");this.activateElement(this.box,"box")},behaviors:{},newBehavior:function(a,c,b){this.behaviors[a]=
c;this.extend(b)},activateElement:function(a,c){typeof a=="string"&&(a=d.getElementById(a));this.behaviors[c].call(this,a)},errors:[],warnings:[],warning:function(a){this.warnings.push(a);this.log(a)},history:[],log:function(a){if(a){typeof a=="string"&&(a={type:a});a.type&&this.history.push(a.type);this.history.length>=50&&this.history.shift();try{console.log(a.type)}catch(c){try{opera.postError(a.type)}catch(b){}}}},setLocalStorage:function(a,c){if(localStorage)try{localStorage[a]=c}catch(h){(h.code==
22||h.code==1014)&&this.warning(b.warnings.localStorageFull)}},getPreloadAttribute:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("preload")){var a=this.video.getAttribute("preload");return a===""||a==="true"?"auto":a==="false"?"none":a}},getAutoplayAttribute:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("autoplay"))return this.video.getAttribute("autoplay")==="false"?!1:!0},bufferedPercent:function(){return this.duration()?this.buffered()[1]/
this.duration():0},each:function(a,c){if(a&&a.length!==0)for(var b=0,e=a.length;b<e;b++)if(c.call(this,a[b],b))break},extend:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c])}});b.player=b.prototype;b.player.extend({flashSupported:function(){if(!this.flashElement)this.flashElement=this.getFlashElement();return this.flashElement&&this.flashPlayerVersionSupported()?!0:!1},flashInit:function(){this.replaceWithFlash();this.element=this.flashElement;this.video.src="";var a=b.flashPlayers[this.options.flashPlayer];
this.extend(b.flashPlayers[this.options.flashPlayer].api);a.init.context(this)()},getFlashElement:function(){for(var a=this.video.children,c=0,b=a.length;c<b;c++)if(a[c].className=="vjs-flash-fallback")return a[c]},replaceWithFlash:function(){if(this.flashElement)this.box.insertBefore(this.flashElement,this.video),this.video.style.display="none"},flashPlayerVersionSupported:function(){var a=this.options.flashPlayerVersion?this.options.flashPlayerVersion:b.flashPlayers[this.options.flashPlayer].flashPlayerVersion;
return b.getFlashVersion()>=a}});b.flashPlayers={};b.flashPlayers.htmlObject={flashPlayerVersion:9,init:function(){return!0},api:{width:function(a){return a!==g?(this.element.width=a,this.box.style.width=a+"px",this.triggerResizeListeners(),this):this.element.width},height:function(a){return a!==g?(this.element.height=a,this.box.style.height=a+"px",this.triggerResizeListeners(),this):this.element.height}}};b.player.extend({linksSupported:function(){return!0},linksInit:function(){this.showLinksFallback();
this.element=this.video},getLinksFallback:function(){return this.box.getElementsByTagName("P")[0]},hideLinksFallback:function(){if(this.linksFallback)this.linksFallback.style.display="none"},showLinksFallback:function(){if(this.linksFallback)this.linksFallback.style.display="block"}});b.merge=function(a,c,b){for(var e in c)if(c.hasOwnProperty(e)&&(!b||!a.hasOwnProperty(e)))a[e]=c[e];return a};b.extend=function(a){this.merge(this,a,!0)};b.extend({setupAllWhenReady:function(a){b.options=a;b.DOMReady(b.setup)},
DOMReady:function(a){b.addToDOMReady(a)},setup:function(a,c){var h=!1,e=[],g;if(!a||a=="All")a=b.getVideoJSTags();else if(typeof a!="object"||a.nodeType==1)a=[a],h=!0;for(var f=0;f<a.length;f++)g=typeof a[f]=="string"?d.getElementById(a[f]):a[f],e.push(new b(g,c));return h?e[0]:e},getVideoJSTags:function(){for(var a=d.getElementsByTagName("video"),c=[],b,e=0,f=a.length;e<f;e++)b=a[e],b.className.indexOf("video-js")!=-1&&c.push(b);return c},browserSupportsVideo:function(){if(typeof b.videoSupport!=
"undefined")return b.videoSupport;b.videoSupport=!!d.createElement("video").canPlayType;return b.videoSupport},getFlashVersion:function(){if(typeof b.flashVersion!="undefined")return b.flashVersion;var a=0,c;if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]=="object")(c=navigator.plugins["Shockwave Flash"].description)&&!(typeof navigator.mimeTypes!="undefined"&&navigator.mimeTypes["application/x-shockwave-flash"]&&!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)&&
(a=parseInt(c.match(/^.*\s+([^\s]+)\.[^\s]+\s+[^\s]+$/)[1],10));else if(typeof f.ActiveXObject!="undefined")try{(c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))&&(a=parseInt(c.GetVariable("$version").match(/^[^\s]+\s(\d+)/)[1],10))}catch(h){}b.flashVersion=a;return b.flashVersion},isIE:function(){return!+"\u000b1"},isIPad:function(){return navigator.userAgent.match(/iPad/i)!==null},isIPhone:function(){return navigator.userAgent.match(/iPhone/i)!==null},isIOS:function(){return b.isIPhone()||
b.isIPad()},iOSVersion:function(){var a=navigator.userAgent.match(/OS (\d+)_/i);if(a&&a[1])return a[1]},isAndroid:function(){return navigator.userAgent.match(/Android/i)!==null},androidVersion:function(){var a=navigator.userAgent.match(/Android (\d+)\./i);if(a&&a[1])return a[1]},warnings:{videoNotReady:"Video is not ready yet (try playing the video first).",localStorageFull:"Local Storage is Full"}});b.isIE()&&d.createElement("video");f.VideoJS=f._V_=b;b.player.extend({html5Supported:function(){return b.browserSupportsVideo()&&
this.canPlaySource()?!0:!1},html5Init:function(){this.element=this.video;this.fixPreloading();this.supportProgressEvents();this.volume(localStorage&&localStorage.volume||this.options.defaultVolume);if(b.isIOS())this.options.useBuiltInControls=!0,this.iOSInterface();else if(b.isAndroid())this.options.useBuiltInControls=!0,this.androidInterface();if(!this.options.useBuiltInControls)this.video.controls=!1,this.options.controlsBelow&&_V_.addClass(this.box,"vjs-controls-below"),this.activateElement(this.video,
"playToggle"),this.buildStylesCheckDiv(),this.buildAndActivatePoster(),this.buildBigPlayButton(),this.buildAndActivateSpinner(),this.buildAndActivateControlBar(),this.loadInterface(),this.getSubtitles()},canPlaySource:function(){if(this.canPlaySourceResult)return this.canPlaySourceResult;for(var a=this.video.children,c=0,b=a.length;c<b;c++)if(a[c].tagName.toUpperCase()=="SOURCE"){var e=this.video.canPlayType(a[c].type)||this.canPlayExt(a[c].src);if(e=="probably"||e=="maybe")return this.firstPlayableSource=
a[c],this.canPlaySourceResult=!0}return this.canPlaySourceResult=!1},canPlayExt:function(a){if(!a)return"";if((a=a.match(/\.([^\.]+)$/))&&a[1])if(a=a[1].toLowerCase(),b.isAndroid()){if(a=="mp4"||a=="m4v")return"maybe"}else if(b.isIOS()&&a=="m3u8")return"maybe";return""},forceTheSource:function(){this.video.src=this.firstPlayableSource.src;this.video.load()},fixPreloading:function(){typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("preload")&&this.video.preload!="none"?this.video.autobuffer=
!0:(this.video.autobuffer=!1,this.video.preload="none")},supportProgressEvents:function(){_V_.addListener(this.video,"progress",this.playerOnVideoProgress.context(this))},playerOnVideoProgress:function(a){this.setBufferedFromProgress(a)},setBufferedFromProgress:function(a){if(a.total>0&&(a=a.loaded/a.total*this.duration(),a>this.values.bufferEnd))this.values.bufferEnd=a},iOSInterface:function(){b.iOSVersion()<4&&this.forceTheSource();b.isIPad()&&this.buildAndActivateSpinner()},androidInterface:function(){this.forceTheSource();
_V_.addListener(this.video,"click",function(){this.play()});this.buildBigPlayButton();_V_.addListener(this.bigPlayButton,"click",function(){this.play()}.context(this));this.positionBox();this.showBigPlayButtons()},loadInterface:function(){if(!this.stylesHaveLoaded()){if(!this.positionRetries)this.positionRetries=1;if(this.positionRetries++<100){setTimeout(this.loadInterface.context(this),10);return}}this.hideStylesCheckDiv();this.showPoster();this.video.paused!==!1&&this.showBigPlayButtons();this.options.controlsAtStart&&
this.showControlBars();this.positionAll()},buildAndActivateControlBar:function(){this.controls=_V_.createElement("div",{className:"vjs-controls"});this.box.appendChild(this.controls);this.activateElement(this.controls,"controlBar");this.activateElement(this.controls,"mouseOverVideoReporter");this.playControl=_V_.createElement("div",{className:"vjs-play-control",innerHTML:"<span></span>"});this.controls.appendChild(this.playControl);this.activateElement(this.playControl,"playToggle");this.progressControl=
_V_.createElement("div",{className:"vjs-progress-control"});this.controls.appendChild(this.progressControl);this.progressHolder=_V_.createElement("div",{className:"vjs-progress-holder"});this.progressControl.appendChild(this.progressHolder);this.activateElement(this.progressHolder,"currentTimeScrubber");this.loadProgressBar=_V_.createElement("div",{className:"vjs-load-progress"});this.progressHolder.appendChild(this.loadProgressBar);this.activateElement(this.loadProgressBar,"loadProgressBar");this.playProgressBar=
_V_.createElement("div",{className:"vjs-play-progress"});this.progressHolder.appendChild(this.playProgressBar);this.activateElement(this.playProgressBar,"playProgressBar");this.timeControl=_V_.createElement("div",{className:"vjs-time-control"});this.controls.appendChild(this.timeControl);this.currentTimeDisplay=_V_.createElement("span",{className:"vjs-current-time-display",innerHTML:"00:00"});this.timeControl.appendChild(this.currentTimeDisplay);this.activateElement(this.currentTimeDisplay,"currentTimeDisplay");
this.timeSeparator=_V_.createElement("span",{innerHTML:" / "});this.timeControl.appendChild(this.timeSeparator);this.durationDisplay=_V_.createElement("span",{className:"vjs-duration-display",innerHTML:"00:00"});this.timeControl.appendChild(this.durationDisplay);this.activateElement(this.durationDisplay,"durationDisplay");this.volumeControl=_V_.createElement("div",{className:"vjs-volume-control",innerHTML:"<div><span></span><span></span><span></span><span></span><span></span><span></span></div>"});
this.controls.appendChild(this.volumeControl);this.activateElement(this.volumeControl,"volumeScrubber");this.volumeDisplay=this.volumeControl.children[0];this.activateElement(this.volumeDisplay,"volumeDisplay");this.fullscreenControl=_V_.createElement("div",{className:"vjs-fullscreen-control",innerHTML:"<div><span></span><span></span><span></span><span></span></div>"});this.controls.appendChild(this.fullscreenControl);this.activateElement(this.fullscreenControl,"fullscreenToggle")},buildAndActivatePoster:function(){this.updatePosterSource();
this.video.poster?(this.poster=d.createElement("img"),this.box.appendChild(this.poster),this.poster.src=this.video.poster,this.poster.className="vjs-poster",this.activateElement(this.poster,"poster")):this.poster=!1},buildBigPlayButton:function(){this.bigPlayButton=_V_.createElement("div",{className:"vjs-big-play-button",innerHTML:"<span></span>"});this.box.appendChild(this.bigPlayButton);this.activateElement(this.bigPlayButton,"bigPlayButton")},buildAndActivateSpinner:function(){this.spinner=_V_.createElement("div",
{className:"vjs-spinner",innerHTML:"<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>"});this.box.appendChild(this.spinner);this.activateElement(this.spinner,"spinner")},buildStylesCheckDiv:function(){this.stylesCheckDiv=_V_.createElement("div",{className:"vjs-styles-check"});this.stylesCheckDiv.style.position="absolute";this.box.appendChild(this.stylesCheckDiv)},hideStylesCheckDiv:function(){this.stylesCheckDiv.style.display="none"},stylesHaveLoaded:function(){return this.stylesCheckDiv.offsetHeight!=
5?!1:!0},positionAll:function(){this.positionBox();this.positionControlBars();this.positionPoster()},positionBox:function(){if(this.videoIsFullScreen){if(this.box.style.width="",this.element.style.height="",this.options.controlsBelow)this.box.style.height="",this.element.style.height=this.box.offsetHeight-this.controls.offsetHeight+"px"}else if(this.box.style.width=this.width()+"px",this.element.style.height=this.height()+"px",this.options.controlsBelow)this.element.style.height=""},getSubtitles:function(){for(var a=
this.video.getElementsByTagName("TRACK"),c=0,b=a.length;c<b;c++)if(a[c].getAttribute("kind")=="subtitles"&&a[c].getAttribute("src"))this.subtitlesSource=a[c].getAttribute("src"),this.loadSubtitles(),this.buildSubtitles()},loadSubtitles:function(){_V_.get(this.subtitlesSource,this.parseSubtitles.context(this))},parseSubtitles:function(a){var a=a.split("\n"),c="",b,e;this.subtitles=[];this.currentSubtitle=!1;for(var d=this.lastSubtitleIndex=0;d<a.length;d++)if(c=_V_.trim(a[d])){b={id:c,index:this.subtitles.length};
c=_V_.trim(a[++d]);c=c.split(" --\> ");b.start=this.parseSubtitleTime(c[0]);b.end=this.parseSubtitleTime(c[1]);e=[];for(var f=d;f<a.length;f++){c=_V_.trim(a[++d]);if(!c)break;e.push(c)}b.text=e.join("<br/>");this.subtitles.push(b)}},parseSubtitleTime:function(a){var c=a.split(":"),a=0;a+=parseFloat(c[0])*3600;a+=parseFloat(c[1])*60;c=c[2].split(/\.|,/);a+=parseFloat(c[0]);(ms=parseFloat(c[1]))&&(a+=ms/1E3);return a},buildSubtitles:function(){this.subtitlesDisplay=_V_.createElement("div",{className:"vjs-subtitles"});
this.box.appendChild(this.subtitlesDisplay);this.activateElement(this.subtitlesDisplay,"subtitlesDisplay")},addVideoListener:function(a,c){_V_.addListener(this.video,a,c.rEvtContext(this))},play:function(){this.video.play();return this},onPlay:function(a){this.addVideoListener("play",a);return this},pause:function(){this.video.pause();return this},onPause:function(a){this.addVideoListener("pause",a);return this},paused:function(){return this.video.paused},currentTime:function(a){if(a!==g){try{this.video.currentTime=
a}catch(c){this.warning(b.warnings.videoNotReady)}this.values.currentTime=a;return this}return this.video.currentTime},onCurrentTimeUpdate:function(a){this.currentTimeListeners.push(a)},duration:function(){return this.video.duration},buffered:function(){if(this.values.bufferStart===g)this.values.bufferStart=0,this.values.bufferEnd=0;if(this.video.buffered&&this.video.buffered.length>0){var a=this.video.buffered.end(0);if(a>this.values.bufferEnd)this.values.bufferEnd=a}return[this.values.bufferStart,
this.values.bufferEnd]},volume:function(a){return a!==g?(this.values.volume=Math.max(0,Math.min(1,parseFloat(a))),this.video.volume=this.values.volume,this.setLocalStorage("volume",this.values.volume),this):this.values.volume?this.values.volume:this.video.volume},onVolumeChange:function(a){_V_.addListener(this.video,"volumechange",a.rEvtContext(this))},width:function(a){return a!==g?(this.video.width=a,this.box.style.width=a+"px",this.triggerResizeListeners(),this):this.video.offsetWidth},height:function(a){return a!==
g?(this.video.height=a,this.box.style.height=a+"px",this.triggerResizeListeners(),this):this.video.offsetHeight},supportsFullScreen:function(){return typeof this.video.webkitEnterFullScreen=="function"&&!navigator.userAgent.match("Chrome")&&!navigator.userAgent.match("Mac OS X 10.5")?!0:!1},html5EnterNativeFullScreen:function(){try{this.video.webkitEnterFullScreen()}catch(a){a.code==11&&this.warning(b.warnings.videoNotReady)}return this},enterFullScreen:function(){this.supportsFullScreen()?this.html5EnterNativeFullScreen():
this.enterFullWindow()},exitFullScreen:function(){this.supportsFullScreen()||this.exitFullWindow()},enterFullWindow:function(){this.videoIsFullScreen=!0;this.docOrigOverflow=d.documentElement.style.overflow;_V_.addListener(d,"keydown",this.fullscreenOnEscKey.rEvtContext(this));_V_.addListener(f,"resize",this.fullscreenOnWindowResize.rEvtContext(this));d.documentElement.style.overflow="hidden";_V_.addClass(this.box,"vjs-fullscreen");this.positionAll()},exitFullWindow:function(){this.videoIsFullScreen=
!1;d.removeEventListener("keydown",this.fullscreenOnEscKey,!1);f.removeEventListener("resize",this.fullscreenOnWindowResize,!1);d.documentElement.style.overflow=this.docOrigOverflow;_V_.removeClass(this.box,"vjs-fullscreen");this.positionAll()},onError:function(a){this.addVideoListener("error",a);return this},onEnded:function(a){this.addVideoListener("ended",a);return this}});b.player.newBehavior("player",function(){this.onError(this.playerOnVideoError);this.onPlay(this.playerOnVideoPlay);this.onPlay(this.trackCurrentTime);
this.onPause(this.playerOnVideoPause);this.onPause(this.stopTrackingCurrentTime);this.onEnded(this.playerOnVideoEnded);this.trackBuffered();this.onBufferedUpdate(this.isBufferFull)},{playerOnVideoError:function(a){this.log(a);this.log(this.video.error)},playerOnVideoPlay:function(){this.hasPlayed=!0},playerOnVideoPause:function(){},playerOnVideoEnded:function(){this.currentTime(0);this.pause()},trackBuffered:function(){this.bufferedInterval=setInterval(this.triggerBufferedListeners.context(this),
500)},stopTrackingBuffered:function(){clearInterval(this.bufferedInterval)},bufferedListeners:[],onBufferedUpdate:function(a){this.bufferedListeners.push(a)},triggerBufferedListeners:function(){this.isBufferFull();this.each(this.bufferedListeners,function(a){a.context(this)()})},isBufferFull:function(){this.bufferedPercent()==1&&this.stopTrackingBuffered()},trackCurrentTime:function(){this.currentTimeInterval&&clearInterval(this.currentTimeInterval);this.currentTimeInterval=setInterval(this.triggerCurrentTimeListeners.context(this),
100);this.trackingCurrentTime=!0},stopTrackingCurrentTime:function(){clearInterval(this.currentTimeInterval);this.trackingCurrentTime=!1},currentTimeListeners:[],triggerCurrentTimeListeners:function(a,c){this.each(this.currentTimeListeners,function(a){a.context(this)(c||this.currentTime())})},resizeListeners:[],onResize:function(a){this.resizeListeners.push(a)},triggerResizeListeners:function(){this.each(this.resizeListeners,function(a){a.context(this)()})}});b.player.newBehavior("mouseOverVideoReporter",
function(a){_V_.addListener(a,"mousemove",this.mouseOverVideoReporterOnMouseMove.context(this));_V_.addListener(a,"mouseout",this.mouseOverVideoReporterOnMouseOut.context(this))},{mouseOverVideoReporterOnMouseMove:function(){this.showControlBars();clearInterval(this.mouseMoveTimeout);this.mouseMoveTimeout=setTimeout(this.hideControlBars.context(this),4E3)},mouseOverVideoReporterOnMouseOut:function(a){for(a=a.relatedTarget;a&&a!==this.box;)a=a.parentNode;a!==this.box&&this.hideControlBars()}});b.player.newBehavior("box",
function(a){this.positionBox();_V_.addClass(a,"vjs-paused");this.activateElement(a,"mouseOverVideoReporter");this.onPlay(this.boxOnVideoPlay);this.onPause(this.boxOnVideoPause)},{boxOnVideoPlay:function(){_V_.removeClass(this.box,"vjs-paused");_V_.addClass(this.box,"vjs-playing")},boxOnVideoPause:function(){_V_.removeClass(this.box,"vjs-playing");_V_.addClass(this.box,"vjs-paused")}});b.player.newBehavior("poster",function(a){this.activateElement(a,"mouseOverVideoReporter");this.activateElement(a,
"playButton");this.onPlay(this.hidePoster);this.onEnded(this.showPoster);this.onResize(this.positionPoster)},{showPoster:function(){if(this.poster)this.poster.style.display="block",this.positionPoster()},positionPoster:function(){if(this.poster&&this.poster.style.display!="none")this.poster.style.height=this.height()+"px",this.poster.style.width=this.width()+"px"},hidePoster:function(){if(this.poster)this.poster.style.display="none"},updatePosterSource:function(){if(!this.video.poster){var a=this.video.getElementsByTagName("img");
if(a.length>0)this.video.poster=a[0].src}}});b.player.newBehavior("controlBar",function(a){if(!this.controlBars)this.controlBars=[],this.onResize(this.positionControlBars);this.controlBars.push(a);_V_.addListener(a,"mousemove",this.onControlBarsMouseMove.context(this));_V_.addListener(a,"mouseout",this.onControlBarsMouseOut.context(this))},{showControlBars:function(){(this.options.controlsAtStart||this.hasPlayed)&&this.each(this.controlBars,function(a){a.style.display="block"})},positionControlBars:function(){this.updatePlayProgressBars();
this.updateLoadProgressBars()},hideControlBars:function(){this.options.controlsHiding&&!this.mouseIsOverControls&&this.each(this.controlBars,function(a){a.style.display="none"})},onControlBarsMouseMove:function(){this.mouseIsOverControls=!0},onControlBarsMouseOut:function(){this.mouseIsOverControls=!1}});b.player.newBehavior("playToggle",function(a){if(!this.elements.playToggles)this.elements.playToggles=[],this.onPlay(this.playTogglesOnPlay),this.onPause(this.playTogglesOnPause);this.elements.playToggles.push(a);
_V_.addListener(a,"click",this.onPlayToggleClick.context(this))},{onPlayToggleClick:function(){this.paused()?this.play():this.pause()},playTogglesOnPlay:function(){this.each(this.elements.playToggles,function(a){_V_.removeClass(a,"vjs-paused");_V_.addClass(a,"vjs-playing")})},playTogglesOnPause:function(){this.each(this.elements.playToggles,function(a){_V_.removeClass(a,"vjs-playing");_V_.addClass(a,"vjs-paused")})}});b.player.newBehavior("playButton",function(a){_V_.addListener(a,"click",this.onPlayButtonClick.context(this))},
{onPlayButtonClick:function(){this.play()}});b.player.newBehavior("pauseButton",function(a){_V_.addListener(a,"click",this.onPauseButtonClick.context(this))},{onPauseButtonClick:function(){this.pause()}});b.player.newBehavior("playProgressBar",function(a){if(!this.playProgressBars)this.playProgressBars=[],this.onCurrentTimeUpdate(this.updatePlayProgressBars);this.playProgressBars.push(a)},{updatePlayProgressBars:function(a){var c=a!==g?a/this.duration():this.currentTime()/this.duration();isNaN(c)&&
(c=0);this.each(this.playProgressBars,function(a){if(a.style)a.style.width=_V_.round(c*100,2)+"%"})}});b.player.newBehavior("loadProgressBar",function(a){if(!this.loadProgressBars)this.loadProgressBars=[];this.loadProgressBars.push(a);this.onBufferedUpdate(this.updateLoadProgressBars)},{updateLoadProgressBars:function(){this.each(this.loadProgressBars,function(a){if(a.style)a.style.width=_V_.round(this.bufferedPercent()*100,2)+"%"})}});b.player.newBehavior("currentTimeDisplay",function(a){if(!this.currentTimeDisplays)this.currentTimeDisplays=
[],this.onCurrentTimeUpdate(this.updateCurrentTimeDisplays);this.currentTimeDisplays.push(a)},{updateCurrentTimeDisplays:function(a){if(this.currentTimeDisplays){var c=a?a:this.currentTime();this.each(this.currentTimeDisplays,function(a){a.innerHTML=_V_.formatTime(c)})}}});b.player.newBehavior("durationDisplay",function(a){if(!this.durationDisplays)this.durationDisplays=[],this.onCurrentTimeUpdate(this.updateDurationDisplays);this.durationDisplays.push(a)},{updateDurationDisplays:function(){this.durationDisplays&&
this.each(this.durationDisplays,function(a){if(this.duration())a.innerHTML=_V_.formatTime(this.duration())})}});b.player.newBehavior("currentTimeScrubber",function(a){_V_.addListener(a,"mousedown",this.onCurrentTimeScrubberMouseDown.rEvtContext(this))},{onCurrentTimeScrubberMouseDown:function(a,c){a.preventDefault();this.currentScrubber=c;this.stopTrackingCurrentTime();this.videoWasPlaying=!this.paused();this.pause();_V_.blockTextSelection();this.setCurrentTimeWithScrubber(a);_V_.addListener(d,"mousemove",
this.onCurrentTimeScrubberMouseMove.rEvtContext(this));_V_.addListener(d,"mouseup",this.onCurrentTimeScrubberMouseUp.rEvtContext(this))},onCurrentTimeScrubberMouseMove:function(a){this.setCurrentTimeWithScrubber(a)},onCurrentTimeScrubberMouseUp:function(){_V_.unblockTextSelection();d.removeEventListener("mousemove",this.onCurrentTimeScrubberMouseMove,!1);d.removeEventListener("mouseup",this.onCurrentTimeScrubberMouseUp,!1);this.videoWasPlaying&&(this.play(),this.trackCurrentTime())},setCurrentTimeWithScrubber:function(a){a=
_V_.getRelativePosition(a.pageX,this.currentScrubber)*this.duration();this.triggerCurrentTimeListeners(0,a);a==this.duration()&&(a-=0.1);this.currentTime(a)}});b.player.newBehavior("volumeDisplay",function(a){if(!this.volumeDisplays)this.volumeDisplays=[],this.onVolumeChange(this.updateVolumeDisplays);this.volumeDisplays.push(a);this.updateVolumeDisplay(a)},{updateVolumeDisplays:function(){this.volumeDisplays&&this.each(this.volumeDisplays,function(a){this.updateVolumeDisplay(a)})},updateVolumeDisplay:function(a){var c=
Math.ceil(this.volume()*6);this.each(a.children,function(a,b){b<c?_V_.addClass(a,"vjs-volume-level-on"):_V_.removeClass(a,"vjs-volume-level-on")})}});b.player.newBehavior("volumeScrubber",function(a){_V_.addListener(a,"mousedown",this.onVolumeScrubberMouseDown.rEvtContext(this))},{onVolumeScrubberMouseDown:function(a,c){_V_.blockTextSelection();this.currentScrubber=c;this.setVolumeWithScrubber(a);_V_.addListener(d,"mousemove",this.onVolumeScrubberMouseMove.rEvtContext(this));_V_.addListener(d,"mouseup",
this.onVolumeScrubberMouseUp.rEvtContext(this))},onVolumeScrubberMouseMove:function(a){this.setVolumeWithScrubber(a)},onVolumeScrubberMouseUp:function(a){this.setVolumeWithScrubber(a);_V_.unblockTextSelection();d.removeEventListener("mousemove",this.onVolumeScrubberMouseMove,!1);d.removeEventListener("mouseup",this.onVolumeScrubberMouseUp,!1)},setVolumeWithScrubber:function(a){this.volume(_V_.getRelativePosition(a.pageX,this.currentScrubber))}});b.player.newBehavior("fullscreenToggle",function(a){_V_.addListener(a,
"click",this.onFullscreenToggleClick.context(this))},{onFullscreenToggleClick:function(){this.videoIsFullScreen?this.exitFullScreen():this.enterFullScreen()},fullscreenOnWindowResize:function(){this.positionControlBars()},fullscreenOnEscKey:function(a){a.keyCode==27&&this.exitFullScreen()}});b.player.newBehavior("bigPlayButton",function(a){if(!this.elements.bigPlayButtons)this.elements.bigPlayButtons=[],this.onPlay(this.bigPlayButtonsOnPlay),this.onEnded(this.bigPlayButtonsOnEnded);this.elements.bigPlayButtons.push(a);
this.activateElement(a,"playButton")},{bigPlayButtonsOnPlay:function(){this.hideBigPlayButtons()},bigPlayButtonsOnEnded:function(){this.showBigPlayButtons()},showBigPlayButtons:function(){this.each(this.elements.bigPlayButtons,function(a){a.style.display="block"})},hideBigPlayButtons:function(){this.each(this.elements.bigPlayButtons,function(a){a.style.display="none"})}});b.player.newBehavior("spinner",function(a){if(!this.spinners)this.spinners=[],_V_.addListener(this.video,"loadeddata",this.spinnersOnVideoLoadedData.context(this)),
_V_.addListener(this.video,"loadstart",this.spinnersOnVideoLoadStart.context(this)),_V_.addListener(this.video,"seeking",this.spinnersOnVideoSeeking.context(this)),_V_.addListener(this.video,"seeked",this.spinnersOnVideoSeeked.context(this)),_V_.addListener(this.video,"canplay",this.spinnersOnVideoCanPlay.context(this)),_V_.addListener(this.video,"canplaythrough",this.spinnersOnVideoCanPlayThrough.context(this)),_V_.addListener(this.video,"waiting",this.spinnersOnVideoWaiting.context(this)),_V_.addListener(this.video,
"stalled",this.spinnersOnVideoStalled.context(this)),_V_.addListener(this.video,"suspend",this.spinnersOnVideoSuspend.context(this)),_V_.addListener(this.video,"playing",this.spinnersOnVideoPlaying.context(this)),_V_.addListener(this.video,"timeupdate",this.spinnersOnVideoTimeUpdate.context(this));this.spinners.push(a)},{showSpinners:function(){this.each(this.spinners,function(a){a.style.display="block"});clearInterval(this.spinnerInterval);this.spinnerInterval=setInterval(this.rotateSpinners.context(this),
100)},hideSpinners:function(){this.each(this.spinners,function(a){a.style.display="none"});clearInterval(this.spinnerInterval)},spinnersRotated:0,rotateSpinners:function(){this.each(this.spinners,function(a){a.style.WebkitTransform="scale(0.5) rotate("+this.spinnersRotated+"deg)";a.style.MozTransform="scale(0.5) rotate("+this.spinnersRotated+"deg)"});if(this.spinnersRotated==360)this.spinnersRotated=0;this.spinnersRotated+=45},spinnersOnVideoLoadedData:function(){this.hideSpinners()},spinnersOnVideoLoadStart:function(){this.showSpinners()},
spinnersOnVideoSeeking:function(){},spinnersOnVideoSeeked:function(){},spinnersOnVideoCanPlay:function(){},spinnersOnVideoCanPlayThrough:function(){this.hideSpinners()},spinnersOnVideoWaiting:function(){this.showSpinners()},spinnersOnVideoStalled:function(){},spinnersOnVideoSuspend:function(){},spinnersOnVideoPlaying:function(){this.hideSpinners()},spinnersOnVideoTimeUpdate:function(){this.spinner.style.display=="block"&&this.hideSpinners()}});b.player.newBehavior("subtitlesDisplay",function(a){if(!this.subtitleDisplays)this.subtitleDisplays=
[],this.onCurrentTimeUpdate(this.subtitleDisplaysOnVideoTimeUpdate),this.onEnded(function(){this.lastSubtitleIndex=0}.context(this));this.subtitleDisplays.push(a)},{subtitleDisplaysOnVideoTimeUpdate:function(a){if(this.subtitles&&(!this.currentSubtitle||this.currentSubtitle.start>=a||this.currentSubtitle.end<a)){for(var c=!1,b=this.subtitles[this.lastSubtitleIndex].start>a,d=this.lastSubtitleIndex-b?1:0;;)if(b){if(d<0||this.subtitles[d].end<a)break;if(this.subtitles[d].start<a){c=d;break}d--}else{if(d>=
this.subtitles.length||this.subtitles[d].start>a)break;if(this.subtitles[d].end>a){c=d;break}d++}if(c!==!1)this.currentSubtitle=this.subtitles[c],this.lastSubtitleIndex=c,this.updateSubtitleDisplays(this.currentSubtitle.text);else if(this.currentSubtitle)this.currentSubtitle=!1,this.updateSubtitleDisplays("")}},updateSubtitleDisplays:function(a){this.each(this.subtitleDisplays,function(c){c.innerHTML=a})}});b.extend({addClass:function(a,c){if((" "+a.className+" ").indexOf(" "+c+" ")==-1)a.className=
a.className===""?c:a.className+" "+c},removeClass:function(a,c){if(a.className.indexOf(c)!=-1){var b=a.className.split(/\s+/);b.splice(b.lastIndexOf(c),1);a.className=b.join(" ")}},createElement:function(a,c){return this.merge(d.createElement(a),c)},blockTextSelection:function(){d.body.focus();d.onselectstart=function(){return!1}},unblockTextSelection:function(){d.onselectstart=function(){return!0}},formatTime:function(a){var a=Math.round(a),c=Math.floor(a/60),a=Math.floor(a%60);return(c>=10?c:"0"+
c)+":"+(a>=10?a:"0"+a)},getRelativePosition:function(a,c){return Math.max(0,Math.min(1,(a-this.findPosX(c))/c.offsetWidth))},findPosX:function(a){for(var c=a.offsetLeft;a=a.offsetParent;)c+=a.offsetLeft;return c},getComputedStyleValue:function(a,c){return f.getComputedStyle(a,null).getPropertyValue(c)},round:function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)},addListener:function(a,c,b){a.addEventListener?a.addEventListener(c,b,!1):a.attachEvent&&a.attachEvent("on"+c,b)},removeListener:function(a,
c,b){a.removeEventListener?a.removeEventListener(c,b,!1):a.attachEvent&&a.detachEvent("on"+c,b)},get:function(a,c){typeof XMLHttpRequest=="undefined"&&(XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(b){}throw Error("This browser does not support XMLHttpRequest.");});var b=new XMLHttpRequest;b.open("GET",a);b.onreadystatechange=function(){b.readyState==
4&&b.status==200&&c(b.responseText)}.context(this);b.send()},trim:function(a){return a.toString().replace(/^\s+/,"").replace(/\s+$/,"")},bindDOMReady:function(){if(d.readyState==="complete")return b.onDOMReady();d.addEventListener?(d.addEventListener("DOMContentLoaded",b.DOMContentLoaded,!1),f.addEventListener("load",b.onDOMReady,!1)):d.attachEvent&&(d.attachEvent("onreadystatechange",b.DOMContentLoaded),f.attachEvent("onload",b.onDOMReady))},DOMContentLoaded:function(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",
b.DOMContentLoaded,!1),b.onDOMReady()):d.attachEvent&&d.readyState==="complete"&&(d.detachEvent("onreadystatechange",b.DOMContentLoaded),b.onDOMReady())},DOMReadyList:[],addToDOMReady:function(a){b.DOMIsReady?a.call(d):b.DOMReadyList.push(a)},DOMIsReady:!1,onDOMReady:function(){if(!b.DOMIsReady){if(!d.body)return setTimeout(b.onDOMReady,13);b.DOMIsReady=!0;if(b.DOMReadyList){for(var a=0;a<b.DOMReadyList.length;a++)b.DOMReadyList[a].call(d);b.DOMReadyList=null}}}});b.bindDOMReady();Function.prototype.context=
function(a){var c=this;return function(){return c.apply(a,arguments)}};Function.prototype.evtContext=function(a){var c=this;return function(b){return c.call(a,b,this)}};Function.prototype.rEvtContext=function(a,b){if(this.hasContext===!0)return this;b||(b=a);for(var d in b)if(b[d]==this)return b[d]=this.evtContext(a),b[d].hasContext=!0,b[d];return this.evtContext(a)};f.jQuery&&function(a){a.fn.VideoJS=function(a){this.each(function(){b.setup(this,a)});return this};a.fn.player=function(){return this[0].player}}(jQuery);
f.VideoJS=f._V_=b})(window);
