var mejs=mejs||{};mejs.version="2.20.1",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/dailymotion","video/x-dailymotion","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(e){return encodeURIComponent(e)},escapeHTML:function(e){return e.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(e){var t=document.createElement("div");return t.innerHTML='x',t.firstChild.href},getScriptPath:function(e){for(var t,i,n,s,o,a,r=0,l="",u="",d=document.getElementsByTagName("script"),c=d.length,m=e.length;c>r;r++){for(s=d[r].src,i=s.lastIndexOf("/"),i>-1?(a=s.substring(i+1),o=s.substring(0,i+1)):(a=s,o=""),t=0;m>t;t++)if(u=e[t],n=a.indexOf(u),n>-1){l=o;break}if(""!==l)break}return l},calculateTimeFormat:function(e,t,i){0>e&&(e=0),"undefined"==typeof i&&(i=25);var n=t.timeFormat,s=n[0],o=n[1]==n[0],a=o?2:1,r=":",l=Math.floor(e/3600)%24,u=Math.floor(e/60)%60,d=Math.floor(e%60),c=Math.floor((e%1*i).toFixed(3)),m=[[c,"f"],[d,"s"],[u,"m"],[l,"h"]];n.lengthh;h++)if(-1!==n.indexOf(m[h][1]))p=!0;else if(p){for(var v=!1,g=h;f>g;g++)if(m[g][0]>0){v=!0;break}if(!v)break;o||(n=s+n),n=m[h][1]+r+n,o&&(n=m[h][1]+n),s=m[h][1]}t.currentTimeFormat=n},twoDigitsString:function(e){return 10>e?"0"+e:String(e)},secondsToTimeCode:function(e,t){if(0>e&&(e=0),"object"!=typeof t){var n="m:ss";n=arguments[1]?"hh:mm:ss":n,n=arguments[2]?n+":ff":n,t={currentTimeFormat:n,framesPerSecond:arguments[3]||25}}var s=t.framesPerSecond;"undefined"==typeof s&&(s=25);var n=t.currentTimeFormat,o=Math.floor(e/3600)%24,a=Math.floor(e/60)%60,r=Math.floor(e%60),l=Math.floor((e%1*s).toFixed(3));lis=[[l,"f"],[r,"s"],[a,"m"],[o,"h"]];var u=n;for(i=0,len=lis.length;i0&&(n=Math.pow(60,s)),t+=Number(e[s])*n;return Number(t.toFixed(i))},removeSwf:function(e){var t=document.getElementById(e);t&&/object|embed/i.test(t.nodeName)&&(mejs.MediaFeatures.isIE?(t.style.display="none",function(){4==t.readyState?mejs.Utility.removeObjectInIE(e):setTimeout(arguments.callee,10)}()):t.parentNode.removeChild(t))},removeObjectInIE:function(e){var t=document.getElementById(e);if(t){for(var i in t)"function"==typeof t[i]&&(t[i]=null);t.parentNode.removeChild(t)}}},mejs.PluginDetector={hasPluginVersion:function(e,t){var i=this.plugins[e];return t[1]=t[1]||0,t[2]=t[2]||0,i[0]>t[0]||i[0]==t[0]&&i[1]>t[1]||i[0]==t[0]&&i[1]==t[1]&&i[2]>=t[2]},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(e,t,i,n,s){this.plugins[e]=this.detectPlugin(t,i,n,s)},detectPlugin:function(e,t,i,n){var s,o,a,r=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[e]){if(s=this.nav.plugins[e].description,s&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[t]||this.nav.mimeTypes[t].enabledPlugin))for(r=s.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),o=0;o0;)this.removeChild(t[0]);if("string"==typeof e)this.src=e;else{var i,n;for(i=0;i0&&null!==v[0].url&&this.getTypeFromFile(v[0].url).indexOf("audio")>-1&&(g.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(e.canPlayType=function(e){return null!==e.match(/video\/(mp4|m4v)/gi)?"maybe":""}),mejs.MediaFeatures.isChromium&&(e.canPlayType=function(e){return null!==e.match(/video\/(webm|ogv|ogg)/gi)?"maybe":""}),i&&("auto"===t.mode||"auto_plugin"===t.mode||"native"===t.mode)&&(!mejs.MediaFeatures.isBustedNativeHTTPS||t.httpsBasicAuthSite!==!0)){for(n||(h=document.createElement(g.isVideo?"video":"audio"),e.parentNode.insertBefore(h,e),e.style.display="none",g.htmlMediaElement=e=h),o=0;o0&&(g.url=v[0].url),g)},formatType:function(e,t){return e&&!t?this.getTypeFromFile(e):t&&~t.indexOf(";")?t.substr(0,t.indexOf(";")):t},getTypeFromFile:function(e){e=e.split("?")[0];var t=e.substring(e.lastIndexOf(".")+1).toLowerCase(),i=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(t)?"video/":"audio/";return this.getTypeFromExtension(t,i)},getTypeFromExtension:function(e,t){switch(t=t||"",e){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return t+"mp4";case"flv":return t+"x-flv";case"webm":case"webma":case"webmv":return t+"webm";case"ogg":case"oga":case"ogv":return t+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return t+"mp2t";default:return t+e}},createErrorMessage:function(e,t,i){var n=e.htmlMediaElement,s=document.createElement("div"),o=t.customError;s.className="me-cannotplay";try{s.style.width=n.width+"px",s.style.height=n.height+"px"}catch(a){}o||(o='',""!==i&&(o+=''),o+=""+mejs.i18n.t("Download File")+""),s.innerHTML=o,n.parentNode.insertBefore(s,n),n.style.display="none",t.error(n)},createPlugin:function(e,t,i,n,s,o){var a,r,l,u=e.htmlMediaElement,d=1,c=1,m="me_"+e.method+"_"+mejs.meIndex++,p=new mejs.PluginMediaElement(m,e.method,e.url),h=document.createElement("div");p.tagName=u.tagName;for(var f=0;f0?t.pluginWidth:t.videoWidth>0?t.videoWidth:null!==u.getAttribute("width")?u.getAttribute("width"):t.defaultVideoWidth,c=t.pluginHeight>0?t.pluginHeight:t.videoHeight>0?t.videoHeight:null!==u.getAttribute("height")?u.getAttribute("height"):t.defaultVideoHeight,d=mejs.Utility.encodeUrl(d),c=mejs.Utility.encodeUrl(c)):t.enablePluginDebug&&(d=320,c=240),p.success=t.success,mejs.MediaPluginBridge.registerPluginElement(m,p,u),h.className="me-plugin",h.id=m+"_container",e.isVideo?u.parentNode.insertBefore(h,u):document.body.insertBefore(h,document.body.childNodes[0]),l=["id="+m,"jsinitfunction=mejs.MediaPluginBridge.initPlugin","jscallbackfunction=mejs.MediaPluginBridge.fireEvent","isvideo="+(e.isVideo?"true":"false"),"autoplay="+(n?"true":"false"),"preload="+s,"width="+d,"startvolume="+t.startVolume,"timerrate="+t.timerRate,"flashstreamer="+t.flashStreamer,"height="+c,"pseudostreamstart="+t.pseudoStreamingStartQueryParam],null!==e.url&&("flash"==e.method?l.push("file="+mejs.Utility.encodeUrl(e.url)):l.push("file="+e.url)),t.enablePluginDebug&&l.push("debug=true"),t.enablePluginSmoothing&&l.push("smoothing=true"),t.enablePseudoStreaming&&l.push("pseudostreaming=true"),o&&l.push("controls=true"),t.pluginVars&&(l=l.concat(t.pluginVars)),e.method){case"silverlight":h.innerHTML='';break;case"flash":mejs.MediaFeatures.isIE?(a=document.createElement("div"),h.appendChild(a),a.outerHTML=''):h.innerHTML='';break;case"youtube":var g;-1!=e.url.lastIndexOf("youtu.be")?(g=e.url.substr(e.url.lastIndexOf("/")+1),-1!=g.indexOf("?")&&(g=g.substr(0,g.indexOf("?")))):g=e.url.substr(e.url.lastIndexOf("=")+1),youtubeSettings={container:h,containerId:h.id,pluginMediaElement:p,pluginId:m,videoId:g,height:c,width:d},window.postMessage?mejs.YouTubeApi.enqueueIframe(youtubeSettings):mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])&&mejs.YouTubeApi.createFlash(youtubeSettings,t);break;case"vimeo":var y=m+"_player";if(p.vimeoid=e.url.substr(e.url.lastIndexOf("/")+1),h.innerHTML='',"function"==typeof $f){var b=$f(h.childNodes[0]);b.addEvent("ready",function(){function e(e,t,i,n){var s={type:i,target:t};"timeupdate"==i&&(t.currentTime=s.currentTime=n.seconds,t.duration=s.duration=n.duration),t.dispatchEvent(s)}b.playVideo=function(){b.api("play")},b.stopVideo=function(){b.api("unload")},b.pauseVideo=function(){b.api("pause")},b.seekTo=function(e){b.api("seekTo",e)},b.setVolume=function(e){b.api("setVolume",e)},b.setMuted=function(e){e?(b.lastVolume=b.api("getVolume"),b.api("setVolume",0)):(b.api("setVolume",b.lastVolume),delete b.lastVolume)},b.addEvent("play",function(){e(b,p,"play"),e(b,p,"playing")}),b.addEvent("pause",function(){e(b,p,"pause")}),b.addEvent("finish",function(){e(b,p,"ended")}),b.addEvent("playProgress",function(t){e(b,p,"timeupdate",t)}),p.pluginElement=h,p.pluginApi=b,mejs.MediaPluginBridge.initPlugin(m)})}else console.warn("You need to include froogaloop for vimeo to work")}return u.style.display="none",u.removeAttribute("autoplay"),p},updateNative:function(e,t,i,n){var s,o=e.htmlMediaElement;for(s in mejs.HtmlMediaElement)o[s]=mejs.HtmlMediaElement[s];return t.success(o,o),o}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(){if(!this.isIframeStarted){var e=document.createElement("script");e.src="//www.youtube.com/player_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(e){this.isLoaded?this.createIframe(e):(this.loadIframeApi(),this.iframeQueue.push(e))},createIframe:function(e){var t=e.pluginMediaElement,i=new YT.Player(e.containerId,{height:e.height,width:e.width,videoId:e.videoId,playerVars:{controls:0,wmode:"transparent"},events:{onReady:function(){i.setVideoSize=function(e,t){i.setSize(e,t)},e.pluginMediaElement.pluginApi=i,e.pluginMediaElement.pluginElement=document.getElementById(e.containerId),mejs.MediaPluginBridge.initPlugin(e.pluginId),setInterval(function(){mejs.YouTubeApi.createEvent(i,t,"timeupdate")},250)},onStateChange:function(e){mejs.YouTubeApi.handleStateChange(e.data,i,t)}}})},createEvent:function(e,t,i){var n={type:i,target:t};if(e&&e.getDuration){t.currentTime=n.currentTime=e.getCurrentTime(),t.duration=n.duration=e.getDuration(),n.paused=t.paused,n.ended=t.ended,n.muted=e.isMuted(),n.volume=e.getVolume()/100,n.bytesTotal=e.getVideoBytesTotal(),n.bufferedBytes=e.getVideoBytesLoaded();var s=n.bufferedBytes/n.bytesTotal*n.duration;n.target.buffered=n.buffered={start:function(e){return 0},end:function(e){return s},length:1}}t.dispatchEvent(n)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var e=this.iframeQueue.pop();this.createIframe(e)}},flashPlayers:{},createFlash:function(e){this.flashPlayers[e.pluginId]=e;var t,i="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+e.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(t=document.createElement("div"),e.container.appendChild(t),t.outerHTML=''):e.container.innerHTML=''},flashReady:function(e){var t=this.flashPlayers[e],i=document.getElementById(e),n=t.pluginMediaElement;n.pluginApi=n.pluginElement=i,mejs.MediaPluginBridge.initPlugin(e),i.cueVideoById(t.videoId);var s=t.containerId+"_callback";window[s]=function(e){mejs.YouTubeApi.handleStateChange(e,i,n)},i.addEventListener("onStateChange",s),setInterval(function(){mejs.YouTubeApi.createEvent(i,n,"timeupdate")},250),mejs.YouTubeApi.createEvent(i,n,"canplay")},handleStateChange:function(e,t,i){switch(e){case-1:i.paused=!0,i.ended=!0,mejs.YouTubeApi.createEvent(t,i,"loadedmetadata");break;case 0:i.paused=!1,i.ended=!0,mejs.YouTubeApi.createEvent(t,i,"ended");break;case 1:i.paused=!1,i.ended=!1,mejs.YouTubeApi.createEvent(t,i,"play"),mejs.YouTubeApi.createEvent(t,i,"playing");break;case 2:i.paused=!0,i.ended=!1,mejs.YouTubeApi.createEvent(t,i,"pause");break;case 3:mejs.YouTubeApi.createEvent(t,i,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(e){mejs.YouTubeApi.flashReady(e)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(e,t,i){"use strict";var n={locale:{language:t.i18n&&t.i18n.locale.language||"",strings:t.i18n&&t.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};n.getLanguage=function(){var e=n.locale.language||window.navigator.userLanguage||window.navigator.language;return n.ietf_lang_regex.exec(e)?e:null},"undefined"!=typeof mejsL10n&&(n.locale.language=mejsL10n.language),n.methods.checkPlain=function(e){var t,i,n={"&":"&",'"':""","<":"<",">":">"};e=String(e);for(t in n)n.hasOwnProperty(t)&&(i=new RegExp(t,"g"),e=e.replace(i,n[t]));return e},n.methods.t=function(e,t){return n.locale.strings&&n.locale.strings[t.context]&&n.locale.strings[t.context][e]&&(e=n.locale.strings[t.context][e]),n.methods.checkPlain(e)},n.t=function(e,t){if("string"==typeof e&&e.length>0){var i=n.getLanguage();return t=t||{context:i},n.methods.t(e,t)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},t.i18n=n}(document,mejs),function(e,t){"use strict";"undefined"!=typeof mejsL10n&&(e[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),"undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof Zepto?(mejs.$=Zepto,Zepto.fn.outerWidth=function(e){var t=$(this).width();return e&&(t+=parseInt($(this).css("margin-right"),10),t+=parseInt($(this).css("margin-left"),10)),t}):"undefined"!=typeof ender&&(mejs.$=ender),function(e){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(e){return.05*e.duration},defaultSeekForwardInterval:function(e){return.05*e.duration},setDimensions:!0,audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(e,t){t.paused||t.ended?t.play():t.pause()}},{keys:[38],action:function(e,t){e.container.find(".mejs-volume-slider").css("display","block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var i=Math.min(t.volume+.1,1);t.setVolume(i)}},{keys:[40],action:function(e,t){e.container.find(".mejs-volume-slider").css("display","block"),e.isVideo&&(e.showControls(),e.startControlsTimer());var i=Math.max(t.volume-.1,0);t.setVolume(i)}},{keys:[37,227],action:function(e,t){if(!isNaN(t.duration)&&t.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer());var i=Math.max(t.currentTime-e.options.defaultSeekBackwardInterval(t),0);t.setCurrentTime(i)}}},{keys:[39,228],action:function(e,t){if(!isNaN(t.duration)&&t.duration>0){e.isVideo&&(e.showControls(),e.startControlsTimer());var i=Math.min(t.currentTime+e.options.defaultSeekForwardInterval(t),t.duration);t.setCurrentTime(i)}}},{keys:[70],action:function(e,t){"undefined"!=typeof e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}},{keys:[77],action:function(e,t){e.container.find(".mejs-volume-slider").css("display","block"),e.isVideo&&(e.showControls(),e.startControlsTimer()),e.media.muted?e.setMuted(!1):e.setMuted(!0)}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(t,i){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(t,i);var n=this;return n.$media=n.$node=e(t),n.node=n.media=n.$media[0],n.node?"undefined"!=typeof n.node.player?n.node.player:("undefined"==typeof i&&(i=n.$node.data("mejsoptions")),n.options=e.extend({},mejs.MepDefaults,i),n.options.timeFormat||(n.options.timeFormat="mm:ss",n.options.alwaysShowHours&&(n.options.timeFormat="hh:mm:ss"),n.options.showTimecodeFrameCount&&(n.options.timeFormat+=":ff")),mejs.Utility.calculateTimeFormat(0,n.options,n.options.framesPerSecond||25),n.id="mep_"+mejs.mepIndex++,mejs.players[n.id]=n,n.init(),n):void 0},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var t=this,i=mejs.MediaFeatures,n=e.extend(!0,{},t.options,{success:function(e,i){t.meReady(e,i)},error:function(e){t.handleError(e)}}),s=t.media.tagName.toLowerCase();if(t.isDynamic="audio"!==s&&"video"!==s,t.isDynamic?t.isVideo=t.options.isVideo:t.isVideo="audio"!==s&&t.options.isVideo,i.isiPad&&t.options.iPadUseNativeControls||i.isiPhone&&t.options.iPhoneUseNativeControls)t.$media.attr("controls","controls"),i.isiPad&&null!==t.media.getAttribute("autoplay")&&t.play();else if(i.isAndroid&&t.options.AndroidUseNativeControls);else{ t.$media.removeAttr("controls");var o=t.isVideo?mejs.i18n.t("Video Player"):mejs.i18n.t("Audio Player");e(''+o+"").insertBefore(t.$media),t.container=e('
').addClass(t.$media[0].className).insertBefore(t.$media).focus(function(e){if(!t.controlsAreVisible){t.showControls(!0);var i=t.container.find(".mejs-playpause-button > button");i.focus()}}),t.container.addClass((i.isAndroid?"mejs-android ":"")+(i.isiOS?"mejs-ios ":"")+(i.isiPad?"mejs-ipad ":"")+(i.isiPhone?"mejs-iphone ":"")+(t.isVideo?"mejs-video ":"mejs-audio ")),t.container.find(".mejs-mediaelement").append(t.$media),t.node.player=t,t.controls=t.container.find(".mejs-controls"),t.layers=t.container.find(".mejs-layers");var a=t.isVideo?"video":"audio",r=a.substring(0,1).toUpperCase()+a.substring(1);t.options[a+"Width"]>0||t.options[a+"Width"].toString().indexOf("%")>-1?t.width=t.options[a+"Width"]:""!==t.media.style.width&&null!==t.media.style.width?t.width=t.media.style.width:null!==t.media.getAttribute("width")?t.width=t.$media.attr("width"):t.width=t.options["default"+r+"Width"],t.options[a+"Height"]>0||t.options[a+"Height"].toString().indexOf("%")>-1?t.height=t.options[a+"Height"]:""!==t.media.style.height&&null!==t.media.style.height?t.height=t.media.style.height:null!==t.$media[0].getAttribute("height")?t.height=t.$media.attr("height"):t.height=t.options["default"+r+"Height"],t.setPlayerSize(t.width,t.height),n.pluginWidth=t.width,n.pluginHeight=t.height}mejs.MediaElement(t.$media[0],n),"undefined"!=typeof t.container&&t.controlsAreVisible&&t.container.trigger("controlsshown")},showControls:function(e){var t=this;e="undefined"==typeof e||e,t.controlsAreVisible||(e?(t.controls.removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){t.controlsAreVisible=!0,t.container.trigger("controlsshown")}),t.container.find(".mejs-control").removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){t.controlsAreVisible=!0})):(t.controls.removeClass("mejs-offscreen").css("display","block"),t.container.find(".mejs-control").removeClass("mejs-offscreen").css("display","block"),t.controlsAreVisible=!0,t.container.trigger("controlsshown")),t.setControlsSize())},hideControls:function(t){var i=this;t="undefined"==typeof t||t,!i.controlsAreVisible||i.options.alwaysShowControls||i.keyboardAction||(t?(i.controls.stop(!0,!0).fadeOut(200,function(){e(this).addClass("mejs-offscreen").css("display","block"),i.controlsAreVisible=!1,i.container.trigger("controlshidden")}),i.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){e(this).addClass("mejs-offscreen").css("display","block")})):(i.controls.addClass("mejs-offscreen").css("display","block"),i.container.find(".mejs-control").addClass("mejs-offscreen").css("display","block"),i.controlsAreVisible=!1,i.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(e){var t=this;e="undefined"!=typeof e?e:1500,t.killControlsTimer("start"),t.controlsTimer=setTimeout(function(){t.hideControls(),t.killControlsTimer("hide")},e)},killControlsTimer:function(e){var t=this;null!==t.controlsTimer&&(clearTimeout(t.controlsTimer),delete t.controlsTimer,t.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){var e=this;e.killControlsTimer(),e.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){var e=this;e.showControls(!1),e.controlsEnabled=!0},meReady:function(t,i){var n,s,o=this,a=mejs.MediaFeatures,r=i.getAttribute("autoplay"),l=!("undefined"==typeof r||null===r||"false"===r);if(!o.created){if(o.created=!0,o.media=t,o.domNode=i,!(a.isAndroid&&o.options.AndroidUseNativeControls||a.isiPad&&o.options.iPadUseNativeControls||a.isiPhone&&o.options.iPhoneUseNativeControls)){o.buildposter(o,o.controls,o.layers,o.media),o.buildkeyboard(o,o.controls,o.layers,o.media),o.buildoverlays(o,o.controls,o.layers,o.media),o.findTracks();for(n in o.options.features)if(s=o.options.features[n],o["build"+s])try{o["build"+s](o,o.controls,o.layers,o.media)}catch(u){}o.container.trigger("controlsready"),o.setPlayerSize(o.width,o.height),o.setControlsSize(),o.isVideo&&(mejs.MediaFeatures.hasTouch?o.$media.bind("touchstart",function(){o.controlsAreVisible?o.hideControls(!1):o.controlsEnabled&&o.showControls(!1)}):(o.clickToPlayPauseCallback=function(){o.options.clickToPlayPause&&(o.media.paused?o.play():o.pause())},o.media.addEventListener("click",o.clickToPlayPauseCallback,!1),o.container.bind("mouseenter",function(){o.controlsEnabled&&(o.options.alwaysShowControls||(o.killControlsTimer("enter"),o.showControls(),o.startControlsTimer(2500)))}).bind("mousemove",function(){o.controlsEnabled&&(o.controlsAreVisible||o.showControls(),o.options.alwaysShowControls||o.startControlsTimer(2500))}).bind("mouseleave",function(){o.controlsEnabled&&(o.media.paused||o.options.alwaysShowControls||o.startControlsTimer(1e3))})),o.options.hideVideoControlsOnLoad&&o.hideControls(!1),l&&!o.options.alwaysShowControls&&o.hideControls(),o.options.enableAutosize&&o.media.addEventListener("loadedmetadata",function(e){o.options.videoHeight<=0&&null===o.domNode.getAttribute("height")&&!isNaN(e.target.videoHeight)&&(o.setPlayerSize(e.target.videoWidth,e.target.videoHeight),o.setControlsSize(),o.media.setVideoSize(e.target.videoWidth,e.target.videoHeight))},!1)),t.addEventListener("play",function(){var e;for(e in mejs.players){var t=mejs.players[e];t.id==o.id||!o.options.pauseOtherPlayers||t.paused||t.ended||t.pause(),t.hasFocus=!1}o.hasFocus=!0},!1),o.media.addEventListener("ended",function(t){if(o.options.autoRewind)try{o.media.setCurrentTime(0),window.setTimeout(function(){e(o.container).find(".mejs-overlay-loading").parent().hide()},20)}catch(i){}o.media.pause(),o.setProgressRail&&o.setProgressRail(),o.setCurrentRail&&o.setCurrentRail(),o.options.loop?o.play():!o.options.alwaysShowControls&&o.controlsEnabled&&o.showControls()},!1),o.media.addEventListener("loadedmetadata",function(e){o.updateDuration&&o.updateDuration(),o.updateCurrent&&o.updateCurrent(),o.isFullScreen||(o.setPlayerSize(o.width,o.height),o.setControlsSize())},!1);var d=null;o.media.addEventListener("timeupdate",function(){d!==this.duration&&(d=this.duration,mejs.Utility.calculateTimeFormat(d,o.options,o.options.framesPerSecond||25))},!1),o.container.focusout(function(t){if(t.relatedTarget){var i=e(t.relatedTarget);o.keyboardAction&&0===i.parents(".mejs-container").length&&(o.keyboardAction=!1,o.hideControls(!0))}}),setTimeout(function(){o.setPlayerSize(o.width,o.height),o.setControlsSize()},50),o.globalBind("resize",function(){o.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||o.setPlayerSize(o.width,o.height),o.setControlsSize()}),"youtube"==o.media.pluginType&&(a.isiOS||a.isAndroid)&&o.container.find(".mejs-overlay-play").hide()}l&&"native"==t.pluginType&&o.play(),o.options.success&&("string"==typeof o.options.success?window[o.options.success](o.media,o.domNode,o):o.options.success(o.media,o.domNode,o))}},handleError:function(e){var t=this;t.controls&&t.controls.hide(),t.options.error&&t.options.error(e)},setPlayerSize:function(t,i){var n=this;if(!n.options.setDimensions)return!1;if("undefined"!=typeof t&&(n.width=t),"undefined"!=typeof i&&(n.height=i),n.height.toString().indexOf("%")>0||"none"!==n.$node.css("max-width")&&"t.width"!==n.$node.css("max-width")||n.$node[0].currentStyle&&"100%"===n.$node[0].currentStyle.maxWidth){var s=function(){return n.isVideo?n.media.videoWidth&&n.media.videoWidth>0?n.media.videoWidth:null!==n.media.getAttribute("width")?n.media.getAttribute("width"):n.options.defaultVideoWidth:n.options.defaultAudioWidth}(),o=function(){return n.isVideo?n.media.videoHeight&&n.media.videoHeight>0?n.media.videoHeight:null!==n.media.getAttribute("height")?n.media.getAttribute("height"):n.options.defaultVideoHeight:n.options.defaultAudioHeight}(),a=n.container.parent().closest(":visible").width(),r=n.container.parent().closest(":visible").height(),l=n.isVideo||!n.options.autosizeProgress?parseInt(a*o/s,10):o;isNaN(l)&&(l=r),n.container.parent().length>0&&"body"===n.container.parent()[0].tagName.toLowerCase()&&(a=e(window).width(),l=e(window).height()),l&&a&&(n.container.width(a).height(l),n.$media.add(n.container.find(".mejs-shim")).width("100%").height("100%"),n.isVideo&&n.media.setVideoSize&&n.media.setVideoSize(a,l),n.layers.children(".mejs-layer").width("100%").height("100%"))}else n.container.width(n.width).height(n.height),n.layers.children(".mejs-layer").width(n.width).height(n.height)},setControlsSize:function(){var t=this,i=0,n=0,s=t.controls.find(".mejs-time-rail"),o=t.controls.find(".mejs-time-total"),a=s.siblings(),r=a.last(),l=null;if(t.container.is(":visible")&&s.length&&s.is(":visible")){t.options&&!t.options.autosizeProgress&&(n=parseInt(s.css("width"),10)),0!==n&&n||(a.each(function(){var t=e(this);"absolute"!=t.css("position")&&t.is(":visible")&&(i+=e(this).outerWidth(!0))}),n=t.controls.width()-i-(s.outerWidth(!0)-s.width()));do s.width(n),o.width(n-(o.outerWidth(!0)-o.width())),"absolute"!=r.css("position")&&(l=r.length?r.position():null,n--);while(null!==l&&l.top>0&&n>0);t.container.trigger("controlsresize")}},buildposter:function(t,i,n,s){var o=this,a=e('
').appendTo(n),r=t.$media.attr("poster");""!==t.options.poster&&(r=t.options.poster),r?o.setPoster(r):a.hide(),s.addEventListener("play",function(){a.hide()},!1),t.options.showPosterWhenEnded&&t.options.autoRewind&&s.addEventListener("ended",function(){a.show()},!1)},setPoster:function(t){var i=this,n=i.container.find(".mejs-poster"),s=n.find("img");0===s.length&&(s=e('').appendTo(n)),s.attr("src",t),n.css({"background-image":"url("+t+")"})},buildoverlays:function(t,i,n,s){var o=this;if(t.isVideo){var a=e('
').hide().appendTo(n),r=e('
').hide().appendTo(n),l=e('
').appendTo(n).bind("click",function(){o.options.clickToPlayPause&&s.paused&&s.play()});s.addEventListener("play",function(){l.hide(),a.hide(),i.find(".mejs-time-buffering").hide(),r.hide()},!1),s.addEventListener("playing",function(){l.hide(),a.hide(),i.find(".mejs-time-buffering").hide(),r.hide()},!1),s.addEventListener("seeking",function(){a.show(),i.find(".mejs-time-buffering").show()},!1),s.addEventListener("seeked",function(){a.hide(),i.find(".mejs-time-buffering").hide()},!1),s.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||l.show()},!1),s.addEventListener("waiting",function(){a.show(),i.find(".mejs-time-buffering").show()},!1),s.addEventListener("loadeddata",function(){a.show(),i.find(".mejs-time-buffering").show(),mejs.MediaFeatures.isAndroid&&(s.canplayTimeout=window.setTimeout(function(){if(document.createEvent){var e=document.createEvent("HTMLEvents");return e.initEvent("canplay",!0,!0),s.dispatchEvent(e)}},300))},!1),s.addEventListener("canplay",function(){a.hide(),i.find(".mejs-time-buffering").hide(),clearTimeout(s.canplayTimeout)},!1),s.addEventListener("error",function(e){o.handleError(e),a.hide(),l.hide(),r.show(),r.find(".mejs-overlay-error").html("Error loading this resource")},!1),s.addEventListener("keydown",function(e){o.onkeydown(t,s,e)},!1)}},buildkeyboard:function(t,i,n,s){var o=this;o.container.keydown(function(){o.keyboardAction=!0}),o.globalBind("keydown",function(i){return t.hasFocus=0!==e(i.target).closest(".mejs-container").length,o.onkeydown(t,s,i)}),o.globalBind("click",function(i){t.hasFocus=0!==e(i.target).closest(".mejs-container").length})},onkeydown:function(e,t,i){if(e.hasFocus&&e.options.enableKeyboard)for(var n=0,s=e.options.keyActions.length;s>n;n++)for(var o=e.options.keyActions[n],a=0,r=o.keys.length;r>a;a++)if(i.keyCode==o.keys[a])return"function"==typeof i.preventDefault&&i.preventDefault(),o.action(e,t,i.keyCode),!1;return!0},findTracks:function(){var t=this,i=t.$media.find("track");t.tracks=[],i.each(function(i,n){n=e(n),t.tracks.push({srclang:n.attr("srclang")?n.attr("srclang").toLowerCase():"",src:n.attr("src"),kind:n.attr("kind"),label:n.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(e){this.container[0].className="mejs-container "+e,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(e){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(e){this.media.setMuted(e)},setCurrentTime:function(e){this.media.setCurrentTime(e)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(e){this.media.setVolume(e)},getVolume:function(){return this.media.volume},setSrc:function(e){this.media.setSrc(e)},remove:function(){var e,t,i=this;i.container.prev(".mejs-offscreen").remove();for(e in i.options.features)if(t=i.options.features[e],i["clean"+t])try{i["clean"+t](i)}catch(n){}i.isDynamic?i.$node.insertBefore(i.container):(i.$media.prop("controls",!0),i.$node.clone().insertBefore(i.container).show(),i.$node.remove()),"native"!==i.media.pluginType&&i.media.remove(),delete mejs.players[i.id],"object"==typeof i.container&&i.container.remove(),i.globalUnbind(),delete i.node.player},rebuildtracks:function(){var e=this;e.findTracks(),e.buildtracks(e,e.controls,e.layers,e.media)},resetSize:function(){var e=this;setTimeout(function(){e.setPlayerSize(e.width,e.height),e.setControlsSize()},50)}},function(){function t(t,n){var s={d:[],w:[]};return e.each((t||"").split(" "),function(e,t){var o=t+"."+n;0===o.indexOf(".")?(s.d.push(o),s.w.push(o)):s[i.test(t)?"w":"d"].push(o)}),s.d=s.d.join(" "),s.w=s.w.join(" "),s}var i=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(i,n,s){var o=this,a=o.node?o.node.ownerDocument:document;i=t(i,o.id),i.d&&e(a).bind(i.d,n,s),i.w&&e(window).bind(i.w,n,s)},mejs.MediaElementPlayer.prototype.globalUnbind=function(i,n){var s=this,o=s.node?s.node.ownerDocument:document;i=t(i,s.id),i.d&&e(o).unbind(i.d,n),i.w&&e(window).unbind(i.w,n)}}(),"undefined"!=typeof e&&(e.fn.mediaelementplayer=function(t){return t===!1?this.each(function(){var t=e(this).data("mediaelementplayer");t&&t.remove(),e(this).removeData("mediaelementplayer")}):this.each(function(){e(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,t))}),this},e(document).ready(function(){e(".mejs-player").mediaelementplayer()})),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(e){e.extend(mejs.MepDefaults,{playText:mejs.i18n.t("Play"),pauseText:mejs.i18n.t("Pause")}),e.extend(MediaElementPlayer.prototype,{buildplaypause:function(t,i,n,s){function o(e){"play"===e?(l.removeClass("mejs-play").addClass("mejs-pause"),u.attr({title:r.pauseText,"aria-label":r.pauseText})):(l.removeClass("mejs-pause").addClass("mejs-play"),u.attr({title:r.playText,"aria-label":r.playText}))}var a=this,r=a.options,l=e('
').appendTo(i).click(function(e){return e.preventDefault(),s.paused?s.play():s.pause(),!1}),u=l.find("button");o("pse"),s.addEventListener("play",function(){o("play")},!1),s.addEventListener("playing",function(){o("play")},!1),s.addEventListener("pause",function(){o("pse")},!1),s.addEventListener("paused",function(){o("pse")},!1)}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{stopText:"Stop"}),e.extend(MediaElementPlayer.prototype,{buildstop:function(t,i,n,s){var o=this;e('
').appendTo(i).click(function(){s.paused||s.pause(),s.currentTime>0&&(s.setCurrentTime(0),s.pause(),i.find(".mejs-time-current").width("0px"),i.find(".mejs-time-handle").css("left","0px"),i.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0,t.options)),i.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0,t.options)),n.find(".mejs-poster").show())})}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{progessHelpText:mejs.i18n.t("Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.")}),e.extend(MediaElementPlayer.prototype,{buildprogress:function(t,i,n,s){e('
00:00
').appendTo(i),i.find(".mejs-time-buffering").hide();var o=this,a=i.find(".mejs-time-total"),r=i.find(".mejs-time-loaded"),l=i.find(".mejs-time-current"),u=i.find(".mejs-time-handle"),d=i.find(".mejs-time-float"),c=i.find(".mejs-time-float-current"),m=i.find(".mejs-time-slider"),p=function(e){var i,n=a.offset(),o=a.width(),r=0,l=0,u=0;i=e.originalEvent&&e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].pageX:e.changedTouches?e.changedTouches[0].pageX:e.pageX,s.duration&&(io+n.left&&(i=o+n.left),u=i-n.left,r=u/o,l=.02>=r?0:r*s.duration,h&&l!==s.currentTime&&s.setCurrentTime(l),mejs.MediaFeatures.hasTouch||(d.css("left",u),c.html(mejs.Utility.secondsToTimeCode(l,t.options)),d.show()))},h=!1,f=!1,v=0,g=!1,y=t.options.autoRewind,b=function(e){var i=s.currentTime,n=mejs.i18n.t("Time Slider"),o=mejs.Utility.secondsToTimeCode(i,t.options),a=s.duration;m.attr({"aria-label":n,"aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":i,"aria-valuetext":o,role:"slider",tabindex:0})},j=function(){var e=new Date;e-v>=1e3&&s.play()};m.bind("focus",function(e){t.options.autoRewind=!1}),m.bind("blur",function(e){t.options.autoRewind=y}),m.bind("keydown",function(e){new Date-v>=1e3&&(g=s.paused);var t=e.keyCode,i=s.duration,n=s.currentTime;switch(t){case 37:n-=1;break;case 39:n+=1;break;case 38:n+=Math.floor(.1*i);break;case 40:n-=Math.floor(.1*i);break;case 36:n=0;break;case 35:n=i;break;case 10:return void(s.paused?s.play():s.pause());case 13:return void(s.paused?s.play():s.pause());default:return}return n=0>n?0:n>=i?i:Math.floor(n),v=new Date,g||s.pause(),n0&&i.buffered.end&&i.duration?n=i.buffered.end(i.buffered.length-1)/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('
'+mejs.Utility.secondsToTimeCode(0,t.options)+"
").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+''+mejs.Utility.secondsToTimeCode(o.options.duration,o.options)+"").appendTo(i.find(".mejs-time")):(i.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),e('
'+mejs.Utility.secondsToTimeCode(o.options.duration,o.options)+"
").appendTo(i)),o.durationD=o.controls.find(".mejs-duration"),s.addEventListener("timeupdate",function(){t.updateDuration()},!1)},updateCurrent:function(){var e=this,t=e.media.currentTime;isNaN(t)&&(t=0),e.currenttime&&e.currenttime.html(mejs.Utility.secondsToTimeCode(t,e.options))},updateDuration:function(){var e=this,t=e.media.duration;e.options.duration>0&&(t=e.options.duration),isNaN(t)&&(t=0),e.container.toggleClass("mejs-long-video",t>3600),e.durationD&&t>0&&e.durationD.html(mejs.Utility.secondsToTimeCode(t,e.options))}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),allyVolumeControlText:mejs.i18n.t("Use Up/Down Arrow keys to increase or decrease volume."),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),e.extend(MediaElementPlayer.prototype,{buildvolume:function(t,i,n,s){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var o=this,a=o.isVideo?o.options.videoVolume:o.options.audioVolume,r="horizontal"==a?e('
'+o.options.allyVolumeControlText+'
').appendTo(i):e('').appendTo(i),l=o.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),u=o.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),d=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();e=Math.max(0,e),e=Math.min(e,1),0===e?(r.removeClass("mejs-mute").addClass("mejs-unmute"),r.children("button").attr("title",mejs.i18n.t("Unmute")).attr("aria-label",mejs.i18n.t("Unmute"))):(r.removeClass("mejs-unmute").addClass("mejs-mute"),r.children("button").attr("title",mejs.i18n.t("Mute")).attr("aria-label",mejs.i18n.t("Mute")));var i=u.position();if("vertical"==a){var n=u.height(),s=n-n*e;c.css("top",Math.round(i.top+s-c.height()/2)),d.height(n-s),d.css("top",i.top+s)}else{var o=u.width(),p=o*e;c.css("left",Math.round(i.left+p-c.width()/2)),d.width(Math.round(p))}},p=function(e){var t=null,i=u.offset();if("vertical"===a){var n=u.height(),o=e.pageY-i.top;if(t=(n-o)/n,0===i.top||0===i.left)return}else{var r=u.width(),l=e.pageX-i.left;t=l/r}t=Math.max(0,t),t=Math.min(t,1),m(t),0===t?s.setMuted(!0):s.setMuted(!1),s.setVolume(t)},h=!1,f=!1;r.hover(function(){l.show(),f=!0},function(){f=!1,h||"vertical"!=a||l.hide()});var v=function(e){var t=Math.floor(100*s.volume);l.attr({"aria-label":mejs.i18n.t("volumeSlider"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t,"aria-valuetext":t+"%",role:"slider",tabindex:0})};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}).bind("keydown",function(e){var t=e.keyCode,i=s.volume;switch(t){case 38:i+=.1;break;case 40:i-=.1;break;default:return!0}return h=!1,m(i),s.setVolume(i),!1}),r.find("button").click(function(){s.setMuted(!s.muted)}),r.find("button").bind("focus",function(){l.show()}),s.addEventListener("volumechange",function(e){h||(s.muted?(m(0),r.removeClass("mejs-mute").addClass("mejs-unmute")):(m(s.volume),r.removeClass("mejs-unmute").addClass("mejs-mute"))),v(e)},!1),0===t.options.startVolume&&s.setMuted(!0),"native"===s.pluginType&&s.setVolume(t.options.startVolume),o.container.on("controlsresize",function(){m(s.volume)})}}})}(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,fullscreenMode:"",buildfullscreen:function(t,i,n,s){if(t.isVideo){t.isInIframe=window.location!=window.parent.location,s.addEventListener("play",function(){t.detectFullscreenMode()});var o=this,a=null,r=e('
').appendTo(i).on("click",function(){var e=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||t.isFullScreen;e?t.exitFullScreen():t.enterFullScreen()}).on("mouseover",function(){if("plugin-hover"==o.fullscreenMode){null!==a&&(clearTimeout(a),delete a);var e=r.offset(),i=t.container.offset();s.positionFullscreenButton(e.left-i.left,e.top-i.top,!0)}}).on("mouseout",function(){"plugin-hover"==o.fullscreenMode&&(null!==a&&(clearTimeout(a),delete a),a=setTimeout(function(){s.hideFullscreenButton()},1500))});if(t.fullscreenBtn=r,o.globalBind("keydown",function(e){27==e.keyCode&&(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||o.isFullScreen)&&t.exitFullScreen()}),o.normalHeight=0,o.normalWidth=0,mejs.MediaFeatures.hasTrueNativeFullScreen){var l=function(e){t.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(t.isNativeFullScreen=!0,t.setControlsSize()):(t.isNativeFullScreen=!1,t.exitFullScreen()))};t.globalBind(mejs.MediaFeatures.fullScreenEventName,l)}}},detectFullscreenMode:function(){var e=this,t="",i=mejs.MediaFeatures;return i.hasTrueNativeFullScreen&&"native"===e.media.pluginType?t="native-native":i.hasTrueNativeFullScreen&&"native"!==e.media.pluginType&&!i.hasFirefoxPluginMovingProblem?t="plugin-native":e.usePluginFullScreen?mejs.MediaFeatures.supportsPointerEvents?(t="plugin-click",e.createPluginClickThrough()):t="plugin-hover":t="fullwindow",e.fullscreenMode=t,t},isPluginClickThroughCreated:!1,createPluginClickThrough:function(){var t=this;if(!t.isPluginClickThroughCreated){var i,n,s=!1,o=function(){if(s){for(var e in a)a[e].hide();t.fullscreenBtn.css("pointer-events",""),t.controls.css("pointer-events",""),t.media.removeEventListener("click",t.clickToPlayPauseCallback),s=!1}},a={},r=["top","left","right","bottom"],l=function(){var e=fullscreenBtn.offset().left-t.container.offset().left,n=fullscreenBtn.offset().top-t.container.offset().top,s=fullscreenBtn.outerWidth(!0),o=fullscreenBtn.outerHeight(!0),r=t.container.width(),l=t.container.height();for(i in a)a[i].css({position:"absolute",top:0,left:0});a.top.width(r).height(n),a.left.width(e).height(o).css({top:n}),a.right.width(r-e-s).height(o).css({top:n,left:e+s}),a.bottom.width(r).height(l-o-n).css({top:n+o})};for(t.globalBind("resize",function(){l()}),i=0,n=r.length;n>i;i++)a[r[i]]=e('
').appendTo(t.container).mouseover(o).hide();fullscreenBtn.on("mouseover",function(){if(!t.isFullScreen){var e=fullscreenBtn.offset(),n=player.container.offset();media.positionFullscreenButton(e.left-n.left,e.top-n.top,!1),t.fullscreenBtn.css("pointer-events","none"),t.controls.css("pointer-events","none"),t.media.addEventListener("click",t.clickToPlayPauseCallback);for(i in a)a[i].show();l(),s=!0}}),media.addEventListener("fullscreenchange",function(e){t.isFullScreen=!t.isFullScreen,t.isFullScreen?t.media.removeEventListener("click",t.clickToPlayPauseCallback):t.media.addEventListener("click",t.clickToPlayPauseCallback),o()}),t.globalBind("mousemove",function(e){if(s){var i=fullscreenBtn.offset();(e.pageYi.top+fullscreenBtn.outerHeight(!0)||e.pageXi.left+fullscreenBtn.outerWidth(!0))&&(fullscreenBtn.css("pointer-events",""),t.controls.css("pointer-events",""),s=!1)}}),t.isPluginClickThroughCreated=!0}},cleanfullscreen:function(e){e.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var t=this;return mejs.MediaFeatures.hasiOSFullScreen?void t.media.webkitEnterFullscreen():(e(document.documentElement).addClass("mejs-fullscreen"),t.normalHeight=t.container.height(),t.normalWidth=t.container.width(),"native-native"===t.fullscreenMode||"plugin-native"===t.fullscreenMode?(mejs.MediaFeatures.requestFullScreen(t.container[0]),t.isInIframe&&setTimeout(function i(){if(t.isNativeFullScreen){var n=window.devicePixelRatio||1,s=.002,o=n*e(window).width(),a=screen.width,r=n*o;Math.abs(a-o)>Math.abs(a-r)&&(o=r);var l=Math.abs(a-o),u=a*s;l>u?t.exitFullScreen():setTimeout(i,500)}},1e3)):"fullwindow"==t.fullscreeMode,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%"),setTimeout(function(){var i=e(window),n=i.width(),s=i.height();t.media.setVideoSize(n,s)},500)),t.layers.children("div").width("100%").height("100%"),t.fullscreenBtn&&t.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),t.setControlsSize(),t.isFullScreen=!0,t.container.find(".mejs-captions-text").css("font-size",screen.width/t.width*1*100+"%"),t.container.find(".mejs-captions-position").css("bottom","45px"),void t.container.trigger("enteredfullscreen"))},exitFullScreen:function(){var t=this;clearTimeout(t.containerSizeTimeout),mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||t.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),e(document.documentElement).removeClass("mejs-fullscreen"),t.container.removeClass("mejs-container-fullscreen").width(t.normalWidth).height(t.normalHeight),"native"===t.media.pluginType?t.$media.width(t.normalWidth).height(t.normalHeight):(t.container.find(".mejs-shim").width(t.normalWidth).height(t.normalHeight),t.media.setVideoSize(t.normalWidth,t.normalHeight)),t.layers.children("div").width(t.normalWidth).height(t.normalHeight),t.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"), t.setControlsSize(),t.isFullScreen=!1,t.container.find(".mejs-captions-text").css("font-size",""),t.container.find(".mejs-captions-position").css("bottom",""),t.container.trigger("exitedfullscreen")}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x"}),e.extend(MediaElementPlayer.prototype,{buildspeed:function(t,i,n,s){var o=this;if("native"==o.media.pluginType){for(var a=null,r=null,l=null,u=null,d=[],c=!1,m=0,p=o.options.speeds.length;p>m;m++){var h=o.options.speeds[m];"string"==typeof h?(d.push({name:h+o.options.speedChar,value:h}),h===o.options.defaultSpeed&&(c=!0)):(d.push(h),h.value===o.options.defaultSpeed&&(c=!0))}c||d.push({name:o.options.defaultSpeed+o.options.speedChar,value:o.options.defaultSpeed}),d.sort(function(e,t){return parseFloat(t.value)-parseFloat(e.value)});var f=function(e){for(m=0,p=d.length;p>m;m++)if(d[m].value===e)return d[m].name},v='
    ';for(m=0,il=d.length;m";v+="
",a=e(v).appendTo(i),r=a.find(".mejs-speed-selector"),l=o.options.defaultSpeed,s.addEventListener("loadedmetadata",function(e){l&&(s.playbackRate=parseFloat(l))},!0),r.on("click",'input[type="radio"]',function(){var t=e(this).attr("value");l=t,s.playbackRate=parseFloat(t),a.find("button").html(f(t)),a.find(".mejs-speed-selected").removeClass("mejs-speed-selected"),a.find('input[type="radio"]:checked').next().addClass("mejs-speed-selected")}),a.one("mouseenter focusin",function(){r.height(a.find(".mejs-speed-selector ul").outerHeight(!0)+a.find(".mejs-speed-translations").outerHeight(!0)).css("top",-1*r.height()+"px")})}}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),e.extend(MediaElementPlayer.prototype,{hasChapters:!1,cleartracks:function(e,t,i,n){e&&(e.captions&&e.captions.remove(),e.chapters&&e.chapters.remove(),e.captionsText&&e.captionsText.remove(),e.captionsButton&&e.captionsButton.remove())},buildtracks:function(t,i,n,s){if(0!==t.tracks.length){var o,a=this,r=a.options.tracksAriaLive?'role="log" aria-live="assertive" aria-atomic="false"':"";if(a.domNode.textTracks)for(o=a.domNode.textTracks.length-1;o>=0;o--)a.domNode.textTracks[o].mode="hidden";a.cleartracks(t,i,n,s),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 l=0;for(o=0;o0&&i.displayChapters(n)},!1),"slides"==n.kind&&i.setupSlides(n)},error:function(){i.removeTrackButton(n.srclang),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).prop("checked",!0).trigger("click"),n.adjustLanguageBox()},removeTrackButton:function(e){var t=this;t.captionsButton.find("input[value="+e+"]").closest("li").remove(),t.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]).attr("class","mejs-captions-text "+(i.entries.times[e].identifier||"")),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,s.options)+"–"+mejs.Utility.secondsToTimeCode(t.entries.times[i].stop,s.options)+"
    ")),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",fl:"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={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(t){for(var i,n,s,o=0,a=mejs.TrackFormatParser.split2(t,/\r?\n/),r={text:[],times:[]};o=0&&""!==a[o-1]&&(s=a[o-1]),o++,n=a[o],o++;""!==a[o]&&o$1"),r.text.push(n),r.times.push({identifier:s,start:0===mejs.Utility.convertSMPTEtoSeconds(i[1])?.2:mejs.Utility.convertSMPTEtoSeconds(i[1]),stop:mejs.Utility.convertSMPTEtoSeconds(i[3]),settings:i[5]})}s=""}return r}},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 u=r.removeAttr("id").get(0).attributes;if(u.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
    ').appendTo(e("body")).hide(),t.container.bind("contextmenu",function(e){return t.isContextMenuEnabled?(e.preventDefault(),t.renderContextMenu(e.clientX-1,e.clientY-1),!1):void 0}),t.container.bind("click",function(){t.contextMenu.hide()}),t.contextMenu.bind("mouseleave",function(){t.startContextMenuTimer()})},cleancontextmenu:function(e){e.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var e=this;e.killContextMenuTimer(),e.contextMenuTimer=setTimeout(function(){e.hideContextMenu(),e.killContextMenuTimer()},750)},killContextMenuTimer:function(){var e=this.contextMenuTimer;null!=e&&(clearTimeout(e),delete e,e=null)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(t,i){for(var n=this,s="",o=n.options.contextMenuItems,a=0,r=o.length;r>a;a++)if(o[a].isSeparator)s+='
    ';else{var l=o[a].render(n);null!=l&&(s+='
    '+l+"
    ")}n.contextMenu.empty().append(e(s)).css({top:i,left:t}).show(),n.contextMenu.find(".mejs-contextmenu-item").each(function(){var t=e(this),i=parseInt(t.data("itemindex"),10),s=n.options.contextMenuItems[i];"undefined"!=typeof s.show&&s.show(t,n),t.click(function(){"undefined"!=typeof s.click&&s.click(n),n.contextMenu.hide()})}),setTimeout(function(){n.killControlsTimer("rev3")},100)}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{skipBackInterval:30,skipBackText:mejs.i18n.t("Skip back %1 seconds")}),e.extend(MediaElementPlayer.prototype,{buildskipback:function(t,i,n,s){var o=this,a=o.options.skipBackText.replace("%1",o.options.skipBackInterval);e('
    ").appendTo(i).click(function(){s.setCurrentTime(Math.max(s.currentTime-o.options.skipBackInterval,0)),e(this).find("button").blur()})}})}(mejs.$),function(e){e.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")}),e.extend(MediaElementPlayer.prototype,{buildpostroll:function(t,i,n,s){var o=this,a=o.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof a&&(t.postroll=e('').prependTo(n).hide(),o.media.addEventListener("ended",function(i){e.ajax({dataType:"html",url:a,success:function(e,t){n.find(".mejs-postroll-layer-content").html(e)}}),t.postroll.show()},!1))}})}(mejs.$);