n+i.left&&(t=n+i.left),l=t-i.left,o=l/n,r=.02>=o?0:o*s.duration,p&&r!==s.currentTime&&s.setCurrentTime(r),mejs.MediaFeatures.hasTouch||(u.css("left",l),c.html(mejs.Utility.secondsToTimeCode(r)),u.show()))},p=!1,h=!1;a.bind("mousedown",function(e){return 1===e.which?(p=!0,m(e),o.globalBind("mousemove.dur",function(e){m(e)}),o.globalBind("mouseup.dur",function(){p=!1,u.hide(),o.globalUnbind(".dur")}),!1):void 0}).bind("mouseenter",function(){h=!0,o.globalBind("mousemove.dur",function(e){m(e)}),mejs.MediaFeatures.hasTouch||u.show()}).bind("mouseleave",function(){h=!1,p||(o.globalUnbind(".dur"),u.hide())}),s.addEventListener("progress",function(e){t.setProgressRail(e),t.setCurrentRail(e)},!1),s.addEventListener("timeupdate",function(e){t.setProgressRail(e),t.setCurrentRail(e)},!1),o.loaded=r,o.total=a,o.current=l,o.handle=d},setProgressRail:function(e){var t=this,i=void 0!=e?e.target:t.media,n=null;i&&i.buffered&&i.buffered.length>0&&i.buffered.end&&i.duration?n=i.buffered.end(0)/i.duration:i&&void 0!=i.bytesTotal&&i.bytesTotal>0&&void 0!=i.bufferedBytes?n=i.bufferedBytes/i.bytesTotal:e&&e.lengthComputable&&0!=e.total&&(n=e.loaded/e.total),null!==n&&(n=Math.min(1,Math.max(0,n)),t.loaded&&t.total&&t.loaded.width(t.total.width()*n))},setCurrentRail:function(){var e=this;if(void 0!=e.media.currentTime&&e.media.duration&&e.total&&e.handle){var t=Math.round(e.total.width()*e.media.currentTime/e.media.duration),i=t-Math.round(e.handle.outerWidth(!0)/2);e.current.width(t),e.handle.css("left",i)}}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "}),e.extend(MediaElementPlayer.prototype,{buildcurrent:function(t,i,n,s){var o=this;e(''+(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
").appendTo(i),o.currenttime=o.controls.find(".mejs-currenttime"),s.addEventListener("timeupdate",function(){t.updateCurrent()},!1)},buildduration:function(t,i,n,s){var o=this;i.children().last().find(".mejs-currenttime").length>0?e(o.options.timeAndDurationSeparator+''+(o.options.duration>0?mejs.Utility.secondsToTimeCode(o.options.duration,o.options.alwaysShowHours||o.media.duration>3600,o.options.showTimecodeFrameCount,o.options.framesPerSecond||25):(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(i.find(".mejs-time")):(i.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),e(''+(o.options.duration>0?mejs.Utility.secondsToTimeCode(o.options.duration,o.options.alwaysShowHours||o.media.duration>3600,o.options.showTimecodeFrameCount,o.options.framesPerSecond||25):(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
").appendTo(i)),o.durationD=o.controls.find(".mejs-duration"),s.addEventListener("timeupdate",function(){t.updateDuration()},!1)},updateCurrent:function(){var e=this;e.currenttime&&e.currenttime.html(mejs.Utility.secondsToTimeCode(e.media.currentTime,e.options.alwaysShowHours||e.media.duration>3600,e.options.showTimecodeFrameCount,e.options.framesPerSecond||25))},updateDuration:function(){var e=this;e.container.toggleClass("mejs-long-video",e.media.duration>3600),e.durationD&&(e.options.duration>0||e.media.duration)&&e.durationD.html(mejs.Utility.secondsToTimeCode(e.options.duration>0?e.options.duration:e.media.duration,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond||25))}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),e.extend(MediaElementPlayer.prototype,{buildvolume:function(t,i,n,s){if(!mejs.MediaFeatures.hasTouch||!this.options.hideVolumeOnTouchDevices){var o=this,a=o.isVideo?o.options.videoVolume:o.options.audioVolume,r="horizontal"==a?e('').appendTo(i):e('').appendTo(i),l=o.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),d=o.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),u=o.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),c=o.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),m=function(e,t){if(!l.is(":visible")&&"undefined"==typeof t)return l.show(),m(e,!0),void l.hide();if(e=Math.max(0,e),e=Math.min(e,1),0==e?r.removeClass("mejs-mute").addClass("mejs-unmute"):r.removeClass("mejs-unmute").addClass("mejs-mute"),"vertical"==a){var i=d.height(),n=d.position(),s=i-i*e;c.css("top",Math.round(n.top+s-c.height()/2)),u.height(i-s),u.css("top",n.top+s)}else{var o=d.width(),n=d.position(),p=o*e;c.css("left",Math.round(n.left+p-c.width()/2)),u.width(Math.round(p))}},p=function(e){var t=null,i=d.offset();if("vertical"==a){var n=d.height(),o=(parseInt(d.css("top").replace(/px/,""),10),e.pageY-i.top);if(t=(n-o)/n,0==i.top||0==i.left)return}else{var r=d.width(),l=e.pageX-i.left;t=l/r}t=Math.max(0,t),t=Math.min(t,1),m(t),s.setMuted(0==t?!0:!1),s.setVolume(t)},h=!1,f=!1;r.hover(function(){l.show(),f=!0},function(){f=!1,h||"vertical"!=a||l.hide()}),l.bind("mouseover",function(){f=!0}).bind("mousedown",function(e){return p(e),o.globalBind("mousemove.vol",function(e){p(e)}),o.globalBind("mouseup.vol",function(){h=!1,o.globalUnbind(".vol"),f||"vertical"!=a||l.hide()}),h=!0,!1}),r.find("button").click(function(){s.setMuted(!s.muted)}),s.addEventListener("volumechange",function(){h||(s.muted?(m(0),r.removeClass("mejs-mute").addClass("mejs-unmute")):(m(s.volume),r.removeClass("mejs-unmute").addClass("mejs-mute")))},!1),o.container.is(":visible")&&(m(t.options.startVolume),0===t.options.startVolume&&s.setMuted(!0),"native"===s.pluginType&&s.setVolume(t.options.startVolume))}}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")}),e.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,buildfullscreen:function(t,i,n,s){if(t.isVideo){if(t.isInIframe=window.location!=window.parent.location,mejs.MediaFeatures.hasTrueNativeFullScreen){var o=function(){t.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(t.isNativeFullScreen=!0,t.setControlsSize()):(t.isNativeFullScreen=!1,t.exitFullScreen()))};mejs.MediaFeatures.hasMozNativeFullScreen?t.globalBind(mejs.MediaFeatures.fullScreenEventName,o):t.container.bind(mejs.MediaFeatures.fullScreenEventName,o)}var a=this,r=(t.container,e('').appendTo(i));if("native"===a.media.pluginType||!a.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)r.click(function(){var e=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||t.isFullScreen;e?t.exitFullScreen():t.enterFullScreen()});else{var l=null,d=function(){var e,t=document.createElement("x"),i=document.documentElement,n=window.getComputedStyle;return"pointerEvents"in t.style?(t.style.pointerEvents="auto",t.style.pointerEvents="x",i.appendChild(t),e=n&&"auto"===n(t,"").pointerEvents,i.removeChild(t),!!e):!1}();if(d&&!mejs.MediaFeatures.isOpera){var u,c,m=!1,p=function(){if(m){for(var e in h)h[e].hide();r.css("pointer-events",""),a.controls.css("pointer-events",""),a.media.removeEventListener("click",a.clickToPlayPauseCallback),m=!1}},h={},f=["top","left","right","bottom"],v=function(){var e=r.offset().left-a.container.offset().left,t=r.offset().top-a.container.offset().top,i=r.outerWidth(!0),n=r.outerHeight(!0),s=a.container.width(),o=a.container.height();for(u in h)h[u].css({position:"absolute",top:0,left:0});h.top.width(s).height(t),h.left.width(e).height(n).css({top:t}),h.right.width(s-e-i).height(n).css({top:t,left:e+i}),h.bottom.width(s).height(o-n-t).css({top:t+n})};for(a.globalBind("resize",function(){v()}),u=0,c=f.length;c>u;u++)h[f[u]]=e('').appendTo(a.container).mouseover(p).hide();r.on("mouseover",function(){if(!a.isFullScreen){var e=r.offset(),i=t.container.offset();s.positionFullscreenButton(e.left-i.left,e.top-i.top,!1),r.css("pointer-events","none"),a.controls.css("pointer-events","none"),a.media.addEventListener("click",a.clickToPlayPauseCallback);for(u in h)h[u].show();v(),m=!0}}),s.addEventListener("fullscreenchange",function(){a.isFullScreen=!a.isFullScreen,a.isFullScreen?a.media.removeEventListener("click",a.clickToPlayPauseCallback):a.media.addEventListener("click",a.clickToPlayPauseCallback),p()}),a.globalBind("mousemove",function(e){if(m){var t=r.offset();(e.pageYt.top+r.outerHeight(!0)||e.pageXt.left+r.outerWidth(!0))&&(r.css("pointer-events",""),a.controls.css("pointer-events",""),m=!1)}})}else r.on("mouseover",function(){null!==l&&(clearTimeout(l),delete l);var e=r.offset(),i=t.container.offset();s.positionFullscreenButton(e.left-i.left,e.top-i.top,!0)}).on("mouseout",function(){null!==l&&(clearTimeout(l),delete l),l=setTimeout(function(){s.hideFullscreenButton()},1500)})}t.fullscreenBtn=r,a.globalBind("keydown",function(e){(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||a.isFullScreen)&&27==e.keyCode&&t.exitFullScreen()})}},cleanfullscreen:function(e){e.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var t=this;if("native"===t.media.pluginType||!mejs.MediaFeatures.isFirefox&&!t.options.usePluginFullScreen){if(e(document.documentElement).addClass("mejs-fullscreen"),normalHeight=t.container.height(),normalWidth=t.container.width(),"native"===t.media.pluginType)if(mejs.MediaFeatures.hasTrueNativeFullScreen)mejs.MediaFeatures.requestFullScreen(t.container[0]),t.isInIframe&&setTimeout(function n(){t.isNativeFullScreen&&(e(window).width()!==screen.width?t.exitFullScreen():setTimeout(n,500))},500);else if(mejs.MediaFeatures.hasSemiNativeFullScreen)return void t.media.webkitEnterFullscreen();if(t.isInIframe){var i=t.options.newWindowCallback(this);if(""!==i){if(!mejs.MediaFeatures.hasTrueNativeFullScreen)return t.pause(),void window.open(i,t.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");setTimeout(function(){t.isNativeFullScreen||(t.pause(),window.open(i,t.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no"))},250)}}t.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),t.containerSizeTimeout=setTimeout(function(){t.container.css({width:"100%",height:"100%"}),t.setControlsSize()},500),"native"===t.media.pluginType?t.$media.width("100%").height("100%"):(t.container.find(".mejs-shim").width("100%").height("100%"),t.media.setVideoSize(e(window).width(),e(window).height())),t.layers.children("div").width("100%").height("100%"),t.fullscreenBtn&&t.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),t.setControlsSize(),t.isFullScreen=!0}},exitFullScreen:function(){var t=this;return clearTimeout(t.containerSizeTimeout),"native"!==t.media.pluginType&&mejs.MediaFeatures.isFirefox?void t.media.setFullscreen(!1):(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||t.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),e(document.documentElement).removeClass("mejs-fullscreen"),t.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight),"native"===t.media.pluginType?t.$media.width(normalWidth).height(normalHeight):(t.container.find(".mejs-shim").width(normalWidth).height(normalHeight),t.media.setVideoSize(normalWidth,normalHeight)),t.layers.children("div").width(normalWidth).height(normalHeight),t.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),t.setControlsSize(),void(t.isFullScreen=!1))}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),e.extend(MediaElementPlayer.prototype,{hasChapters:!1,buildtracks:function(t,i,n,s){if(0!=t.tracks.length){var o,a=this;if(a.domNode.textTracks)for(var o=a.domNode.textTracks.length-1;o>=0;o--)a.domNode.textTracks[o].mode="hidden";t.chapters=e('').prependTo(n).hide(),t.captions=e('').prependTo(n).hide(),t.captionsText=t.captions.find(".mejs-captions-text"),t.captionsButton=e('").appendTo(i);var r=0;for(o=0;o0&&i.displayChapters(n)},!1),"slides"==n.kind&&i.setupSlides(n)},error:function(){i.loadNextTrack()}})},enableTrackButton:function(t,i){var n=this;""===i&&(i=mejs.language.codes[t]||t),n.captionsButton.find("input[value="+t+"]").prop("disabled",!1).siblings("label").html(i),n.options.startLanguage==t&&e("#"+n.id+"_captions_"+t).click(),n.adjustLanguageBox()},addTrackButton:function(t,i){var n=this;""===i&&(i=mejs.language.codes[t]||t),n.captionsButton.find("ul").append(e('")),n.adjustLanguageBox(),n.container.find(".mejs-captions-translations option[value="+t+"]").remove()},adjustLanguageBox:function(){var e=this;e.captionsButton.find(".mejs-captions-selector").height(e.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+e.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var e=this,t=!1;if(e.options.hideCaptionsButtonWhenEmpty){for(i=0;i=i.entries.times[e].start&&t.media.currentTime<=i.entries.times[e].stop)return t.captionsText.html(i.entries.text[e]),void t.captions.show().height(0);t.captions.hide()}else t.captions.hide()}},setupSlides:function(e){var t=this;t.slides=e,t.slides.entries.imgs=[t.slides.entries.text.length],t.showSlide(0)},showSlide:function(t){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var i=this,n=i.slides.entries.text[t],s=i.slides.entries.imgs[t];"undefined"==typeof s||"undefined"==typeof s.fadeIn?i.slides.entries.imgs[t]=s=e('
').on("load",function(){s.appendTo(i.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):s.is(":visible")||s.is(":animated")||s.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var e,t=this,i=t.slides;for(e=0;e=i.entries.times[e].start&&t.media.currentTime<=i.entries.times[e].stop)return void t.showSlide(e)}},displayChapters:function(){var e,t=this;for(e=0;e100||i==t.entries.times.length-1&&100>o+a)&&(o=100-a),s.chapters.append(e(''+t.entries.text[i]+''+mejs.Utility.secondsToTimeCode(t.entries.times[i].start)+"–"+mejs.Utility.secondsToTimeCode(t.entries.times[i].stop)+"
")),a+=o;s.chapters.find("div.mejs-chapter").click(function(){s.media.setCurrentTime(parseFloat(e(this).attr("rel"))),s.media.paused&&s.media.play()}),s.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(t){for(var i,n,s=0,o=mejs.TrackFormatParser.split2(t,/\r?\n/),a={text:[],times:[]};s$1"),a.text.push(n),a.times.push({start:0==mejs.Utility.convertSMPTEtoSeconds(i[1])?.2:mejs.Utility.convertSMPTEtoSeconds(i[1]),stop:mejs.Utility.convertSMPTEtoSeconds(i[3]),settings:i[5]})}return a}},dfxp:{parse:function(t){t=e(t).filter("tt");var i,n,s=0,o=t.children("div").eq(0),a=o.find("p"),r=t.find("#"+o.attr("style")),l={text:[],times:[]};if(r.length){var d=r.removeAttr("id").get(0).attributes;if(d.length)for(i={},s=0;s$1"),l.text.push(n),0==l.times.start&&(l.times.start=2)}return l}},split2:function(e,t){return e.split(t)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(e,t){var i,n=[],s="";for(i=0;i