function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(e){mejs.YouTubeApi.flashReady(e)}var mejs=mejs||{};mejs.version="2.13.0",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/youtube","video/x-youtube"]}],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="",d="",u=document.getElementsByTagName("script"),c=u.length,m=e.length;c>r;r++){for(s=u[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(d=e[t],n=a.indexOf(d),n>-1){l=o;break}if(""!==l)break}return l},secondsToTimeCode:function(e,t,i,n){"undefined"==typeof i?i=!1:"undefined"==typeof n&&(n=25);var s=Math.floor(e/3600)%24,o=Math.floor(e/60)%60,a=Math.floor(e%60),r=Math.floor((e%1*n).toFixed(3)),l=(t||s>0?(10>s?"0"+s:s)+":":"")+(10>o?"0"+o:o)+":"+(10>a?"0"+a:a)+(i?":"+(10>r?"0"+r:r):"");return l},timeCodeToSeconds:function(e,t,i,n){"undefined"==typeof i?i=!1:"undefined"==typeof n&&(n=25);var s=e.split(":"),o=parseInt(s[0],10),a=parseInt(s[1],10),r=parseInt(s[2],10),l=0,d=0;return i&&(l=parseInt(s[3])/n),d=3600*o+60*a+r+l},convertSMPTEtoSeconds:function(e){if("string"!=typeof e)return!1;e=e.replace(",",".");var t=0,i=-1!=e.indexOf(".")?e.split(".")[1].length:0,n=1;e=e.split(":").reverse();for(var s=0;s0&&(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]?!0:!1},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":""}),!(!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();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(t)?"video":"audio")+"/"+this.getTypeFromExtension(t)},getTypeFromExtension:function(e){switch(e){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return e}},createErrorMessage:function(e,t,i){var n=e.htmlMediaElement,s=document.createElement("div");s.className="me-cannotplay";try{s.style.width=n.width+"px",s.style.height=n.height+"px"}catch(o){}s.innerHTML=t.customError?t.customError:""!==i?'':''+mejs.i18n.t("Download File")+"",n.parentNode.insertBefore(s,n),n.style.display="none",t.error(n)},createPlugin:function(e,t,i,n,s,o){var a,r,l,d=e.htmlMediaElement,u=1,c=1,m="me_"+e.method+"_"+mejs.meIndex++,p=new mejs.PluginMediaElement(m,e.method,e.url),h=document.createElement("div");p.tagName=d.tagName;for(var f=0;f0?t.pluginWidth:t.videoWidth>0?t.videoWidth:null!==d.getAttribute("width")?d.getAttribute("width"):t.defaultVideoWidth,c=t.pluginHeight>0?t.pluginHeight:t.videoHeight>0?t.videoHeight:null!==d.getAttribute("height")?d.getAttribute("height"):t.defaultVideoHeight,u=mejs.Utility.encodeUrl(u),c=mejs.Utility.encodeUrl(c)):t.enablePluginDebug&&(u=320,c=240),p.success=t.success,mejs.MediaPluginBridge.registerPluginElement(m,p,d),h.className="me-plugin",h.id=m+"_container",e.isVideo?d.parentNode.insertBefore(h,d):document.body.insertBefore(h,document.body.childNodes[0]),l=["id="+m,"isvideo="+(e.isVideo?"true":"false"),"autoplay="+(n?"true":"false"),"preload="+s,"width="+u,"startvolume="+t.startVolume,"timerrate="+t.timerRate,"flashstreamer="+t.flashStreamer,"height="+c,"pseudostreamstart="+t.pseudoStreamingStartQueryParam],null!==e.url&&l.push("flash"==e.method?"file="+mejs.Utility.encodeUrl(e.url):"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=e.url.substr(e.url.lastIndexOf("=")+1);youtubeSettings={container:h,containerId:h.id,pluginMediaElement:p,pluginId:m,videoId:g,height:c,width:u},mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case"vimeo":p.vimeoid=e.url.substr(e.url.lastIndexOf("/")+1),h.innerHTML=''}return d.style.display="none",d.removeAttribute("autoplay"),p},updateNative:function(e,t){var i,n=e.htmlMediaElement;for(i in mejs.HtmlMediaElement)n[i]=mejs.HtmlMediaElement[i];return t.success(n,n),n}},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},events:{onReady:function(){e.pluginMediaElement.pluginApi=i,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(){return 0},end:function(){return s},length:1}}t.dispatchEvent(n.type,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)},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.mejs=mejs,window.MediaElement=mejs.MediaElement,function(e,t){"use strict";var i={locale:{language:"",strings:{}},methods:{}};i.locale.getLanguage=function(){return i.locale.language||navigator.language},"undefined"!=typeof mejsL10n&&(i.locale.language=mejsL10n.language),i.locale.INIT_LANGUAGE=i.locale.getLanguage(),i.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},i.methods.formatString=function(e,t){for(var n in t){switch(n.charAt(0)){case"@":t[n]=i.methods.checkPlain(t[n]);break;case"!":break;case"%":default:t[n]=''+i.methods.checkPlain(t[n])+""}e=e.replace(n,t[n])}return e},i.methods.t=function(e,t,n){return i.locale.strings&&i.locale.strings[n.context]&&i.locale.strings[n.context][e]&&(e=i.locale.strings[n.context][e]),t&&(e=i.methods.formatString(e,t)),e},i.t=function(e,t,n){if("string"==typeof e&&e.length>0){var s=i.locale.getLanguage();return n=n||{context:s},i.methods.t(e,t,n)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},t.i18n=i}(document,mejs),function(e){"use strict";"undefined"!=typeof mejsL10n&&(e[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),function(e){"use strict";e.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schließen"}}(mejs.i18n.locale.strings),function(e){"use strict";e.zh={Fullscreen:"全螢幕","Go Fullscreen":"全屏模式","Turn off Fullscreen":"退出全屏模式",Close:"關閉"}}(mejs.i18n.locale.strings),"undefined"!=typeof jQuery?mejs.$=jQuery:"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},audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,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){var i=Math.min(t.volume+.1,1);t.setVolume(i)}},{keys:[40],action:function(e,t){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){"undefined"!=typeof e.enterFullScreen&&(e.isFullScreen?e.exitFullScreen():e.enterFullScreen())}}]},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],"undefined"!=typeof n.node.player?n.node.player:(n.node.player=n,"undefined"==typeof i&&(i=n.$node.data("mejsoptions")),n.options=e.extend({},mejs.MepDefaults,i),n.id="mep_"+mejs.mepIndex++,mejs.players[n.id]=n,n.init(),n)},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.isVideo=t.isDynamic?t.options.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.media.load(),t.media.play());else if(i.isAndroid&&t.options.AndroidUseNativeControls);else{if(t.$media.removeAttr("controls"),t.container=e('
').addClass(t.$media[0].className).insertBefore(t.$media),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 ")),i.isiOS){var o=t.$media.clone();t.container.find(".mejs-mediaelement").append(o),t.$media.remove(),t.$node=t.$media=o,t.node=t.media=o[0]}else t.container.find(".mejs-mediaelement").append(t.$media);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.width=t.options[a+"Width"]>0||t.options[a+"Width"].toString().indexOf("%")>-1?t.options[a+"Width"]:""!==t.media.style.width&&null!==t.media.style.width?t.media.style.width:null!==t.media.getAttribute("width")?t.$media.attr("width"):t.options["default"+r+"Width"],t.height=t.options[a+"Height"]>0||t.options[a+"Height"].toString().indexOf("%")>-1?t.options[a+"Height"]:""!==t.media.style.height&&null!==t.media.style.height?t.media.style.height:null!==t.$media[0].getAttribute("height")?t.$media.attr("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.css("visibility","visible").stop(!0,!0).fadeIn(200,function(){t.controlsAreVisible=!0,t.container.trigger("controlsshown")}),t.container.find(".mejs-control").css("visibility","visible").stop(!0,!0).fadeIn(200,function(){t.controlsAreVisible=!0})):(t.controls.css("visibility","visible").css("display","block"),t.container.find(".mejs-control").css("visibility","visible").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&&(t?(i.controls.stop(!0,!0).fadeOut(200,function(){e(this).css("visibility","hidden").css("display","block"),i.controlsAreVisible=!1,i.container.trigger("controlshidden")}),i.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){e(this).css("visibility","hidden").css("display","block")})):(i.controls.css("visibility","hidden").css("display","block"),i.container.find(".mejs-control").css("visibility","hidden").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(){var e=this;null!==e.controlsTimer&&(clearTimeout(e.controlsTimer),delete e.controlsTimer,e.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(e,t){var i,n,s=this,o=mejs.MediaFeatures,a=t.getAttribute("autoplay"),r=!("undefined"==typeof a||null===a||"false"===a);if(!s.created){if(s.created=!0,s.media=e,s.domNode=t,!(o.isAndroid&&s.options.AndroidUseNativeControls||o.isiPad&&s.options.iPadUseNativeControls||o.isiPhone&&s.options.iPhoneUseNativeControls)){s.buildposter(s,s.controls,s.layers,s.media),s.buildkeyboard(s,s.controls,s.layers,s.media),s.buildoverlays(s,s.controls,s.layers,s.media),s.findTracks();for(i in s.options.features)if(n=s.options.features[i],s["build"+n])try{s["build"+n](s,s.controls,s.layers,s.media)}catch(l){}s.container.trigger("controlsready"),s.setPlayerSize(s.width,s.height),s.setControlsSize(),s.isVideo&&(mejs.MediaFeatures.hasTouch?s.$media.bind("touchstart",function(){s.controlsAreVisible?s.hideControls(!1):s.controlsEnabled&&s.showControls(!1)}):(mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback=function(){s.options.clickToPlayPause&&(s.media.paused?s.media.play():s.media.pause())},s.media.addEventListener("click",s.clickToPlayPauseCallback,!1),s.container.bind("mouseenter mouseover",function(){s.controlsEnabled&&(s.options.alwaysShowControls||(s.killControlsTimer("enter"),s.showControls(),s.startControlsTimer(2500))) }).bind("mousemove",function(){s.controlsEnabled&&(s.controlsAreVisible||s.showControls(),s.options.alwaysShowControls||s.startControlsTimer(2500))}).bind("mouseleave",function(){s.controlsEnabled&&(s.media.paused||s.options.alwaysShowControls||s.startControlsTimer(1e3))})),s.options.hideVideoControlsOnLoad&&s.hideControls(!1),r&&!s.options.alwaysShowControls&&s.hideControls(),s.options.enableAutosize&&s.media.addEventListener("loadedmetadata",function(e){s.options.videoHeight<=0&&null===s.domNode.getAttribute("height")&&!isNaN(e.target.videoHeight)&&(s.setPlayerSize(e.target.videoWidth,e.target.videoHeight),s.setControlsSize(),s.media.setVideoSize(e.target.videoWidth,e.target.videoHeight))},!1)),e.addEventListener("play",function(){var e;for(e in mejs.players){var t=mejs.players[e];t.id==s.id||!s.options.pauseOtherPlayers||t.paused||t.ended||t.pause(),t.hasFocus=!1}s.hasFocus=!0},!1),s.media.addEventListener("ended",function(){if(s.options.autoRewind)try{s.media.setCurrentTime(0)}catch(e){}s.media.pause(),s.setProgressRail&&s.setProgressRail(),s.setCurrentRail&&s.setCurrentRail(),s.options.loop?s.media.play():!s.options.alwaysShowControls&&s.controlsEnabled&&s.showControls()},!1),s.media.addEventListener("loadedmetadata",function(){s.updateDuration&&s.updateDuration(),s.updateCurrent&&s.updateCurrent(),s.isFullScreen||(s.setPlayerSize(s.width,s.height),s.setControlsSize())},!1),setTimeout(function(){s.setPlayerSize(s.width,s.height),s.setControlsSize()},50),s.globalBind("resize",function(){s.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||s.setPlayerSize(s.width,s.height),s.setControlsSize()}),"youtube"==s.media.pluginType&&s.container.find(".mejs-overlay-play").hide()}r&&"native"==e.pluginType&&(e.load(),e.play()),s.options.success&&("string"==typeof s.options.success?window[s.options.success](s.media,s.domNode,s):s.options.success(s.media,s.domNode,s))}},handleError:function(e){var t=this;t.controls.hide(),t.options.error&&t.options.error(e)},setPlayerSize:function(t,i){var n=this;if("undefined"!=typeof t&&(n.width=t),"undefined"!=typeof i&&(n.height=i),n.height.toString().indexOf("%")>0||"100%"===n.$node.css("max-width")||parseInt(n.$node.css("max-width").replace(/px/,""),10)/n.$node.offsetParent().width()===1||n.$node[0].currentStyle&&"100%"===n.$node[0].currentStyle.maxWidth){var s=n.isVideo?n.media.videoWidth&&n.media.videoWidth>0?n.media.videoWidth:n.options.defaultVideoWidth:n.options.defaultAudioWidth,o=n.isVideo?n.media.videoHeight&&n.media.videoHeight>0?n.media.videoHeight:n.options.defaultVideoHeight:n.options.defaultAudioHeight,a=n.container.parent().closest(":visible").width(),r=n.isVideo||!n.options.autosizeProgress?parseInt(a*o/s,10):o;"body"===n.container.parent()[0].tagName.toLowerCase()&&(a=e(window).width(),r=e(window).height()),0!=r&&0!=a&&(n.container.width(a).height(r),n.$media.add(n.container.find(".mejs-shim")).width("100%").height("100%"),n.isVideo&&n.media.setVideoSize&&n.media.setVideoSize(a,r),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);var l=n.layers.find(".mejs-overlay-play"),d=l.find(".mejs-overlay-button");l.height(n.container.height()-n.controls.height()),d.css("margin-top","-"+(d.height()/2-n.controls.height()/2).toString()+"px")},setControlsSize:function(){var t=this,i=0,n=0,s=t.controls.find(".mejs-time-rail"),o=t.controls.find(".mejs-time-total"),a=(t.controls.find(".mejs-time-current"),t.controls.find(".mejs-time-loaded"),s.siblings());t.options&&!t.options.autosizeProgress&&(n=parseInt(s.css("width"))),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())),s.width(n),o.width(n-(o.outerWidth(!0)-o.width())),t.setProgressRail&&t.setProgressRail(),t.setCurrentRail&&t.setCurrentRail()},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&&null!=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).click(function(){o.options.clickToPlayPause&&(s.paused?s.play():s.pause())});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()},!1),s.addEventListener("canplay",function(){a.hide(),i.find(".mejs-time-buffering").hide()},!1),s.addEventListener("error",function(){a.hide(),i.find(".mejs-time-buffering").hide(),r.show(),r.find("mejs-overlay-error").html("Error loading this resource")},!1)}},buildkeyboard:function(t,i,n,s){var o=this;o.globalBind("keydown",function(e){if(t.hasFocus&&t.options.enableKeyboard)for(var i=0,n=t.options.keyActions.length;n>i;i++)for(var o=t.options.keyActions[i],a=0,r=o.keys.length;r>a;a++)if(e.keyCode==o.keys[a])return e.preventDefault(),o.action(t,s,e.keyCode),!1;return!0}),o.globalBind("click",function(i){0==e(i.target).closest(".mejs-container").length&&(t.hasFocus=!1)})},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.media.play()},pause:function(){try{this.media.pause()}catch(e){}},load:function(){this.media.load()},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;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().show().insertBefore(i.container),i.$node.remove()),"native"!==i.media.pluginType&&i.media.remove(),delete mejs.players[i.id],i.container.remove(),i.globalUnbind(),delete i.node.player}},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;i=t(i,o.id),i.d&&e(document).bind(i.d,n,s),i.w&&e(window).bind(i.w,n,s)},mejs.MediaElementPlayer.prototype.globalUnbind=function(i,n){var s=this;i=t(i,s.id),i.d&&e(document).unbind(i.d,n),i.w&&e(window).unbind(i.w,n)}}(),"undefined"!=typeof jQuery&&(jQuery.fn.mediaelementplayer=function(e){return this.each(e===!1?function(){var e=jQuery(this).data("mediaelementplayer");e&&e.remove(),jQuery(this).removeData("mediaelementplayer")}:function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,e))}),this}),e(document).ready(function(){e(".mejs-player").mediaelementplayer()}),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(e){e.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")}),e.extend(MediaElementPlayer.prototype,{buildplaypause:function(t,i,n,s){var o=this,a=e('
').appendTo(i).click(function(e){return e.preventDefault(),s.paused?s.play():s.pause(),!1});s.addEventListener("play",function(){a.removeClass("mejs-play").addClass("mejs-pause")},!1),s.addEventListener("playing",function(){a.removeClass("mejs-play").addClass("mejs-pause")},!1),s.addEventListener("pause",function(){a.removeClass("mejs-pause").addClass("mejs-play")},!1),s.addEventListener("paused",function(){a.removeClass("mejs-pause").addClass("mejs-play")},!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)),i.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0)),n.find(".mejs-poster").show())})}}})}(mejs.$),function(e){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"),d=i.find(".mejs-time-handle"),u=i.find(".mejs-time-float"),c=i.find(".mejs-time-float-current"),m=function(e){var t=e.pageX,i=a.offset(),n=a.outerWidth(!0),o=0,r=0,l=0;s.duration&&(tn+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
    ').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,{postrollCloseText:mejs.i18n.t("Close")}),e.extend(MediaElementPlayer.prototype,{buildpostroll:function(t,i,n){var s=this,o=s.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof o&&(t.postroll=e('').prependTo(n).hide(),s.media.addEventListener("ended",function(){e.ajax({dataType:"html",url:o,success:function(e){n.find(".mejs-postroll-layer-content").html(e)}}),t.postroll.show()},!1))}})}(mejs.$);