var mejs=mejs||{};mejs.version="2.11.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"]}]};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");t.innerHTML='x';return t.firstChild.href},getScriptPath:function(e){return"/cgi_bank/lib/MediaElementPlayer/"},secondsToTimeCode:function(e,t,n,r){if(typeof n=="undefined"){n=false}else if(typeof r=="undefined"){r=25}var i=Math.floor(e/3600)%24,s=Math.floor(e/60)%60,o=Math.floor(e%60),u=Math.floor((e%1*r).toFixed(3)),a=(t||i>0?(i<10?"0"+i:i)+":":"")+(s<10?"0"+s:s)+":"+(o<10?"0"+o:o)+(n?":"+(u<10?"0"+u:u):"");return a},timeCodeToSeconds:function(e,t,n,r){if(typeof n=="undefined"){n=false}else if(typeof r=="undefined"){r=25}var i=e.split(":"),s=parseInt(i[0],10),o=parseInt(i[1],10),u=parseInt(i[2],10),a=0,f=0;if(n){a=parseInt(i[3])/r}f=s*3600+o*60+u+a;return f},convertSMPTEtoSeconds:function(e){if(typeof e!="string")return false;e=e.replace(",",".");var t=0,n=e.indexOf(".")!=-1?e.split(".")[1].length:0,r=1;e=e.split(":").reverse();for(var i=0;i0){r=Math.pow(60,i)}t+=Number(e[i])*r}return Number(t.toFixed(n))},removeSwf:function(e){var t=document.getElementById(e);if(t&&/object|embed/i.test(t.nodeName)){if(mejs.MediaFeatures.isIE){t.style.display="none";(function(){if(t.readyState==4){mejs.Utility.removeObjectInIE(e)}else{setTimeout(arguments.callee,10)}})()}else{t.parentNode.removeChild(t)}}},removeObjectInIE:function(e){var t=document.getElementById(e);if(t){for(var n in t){if(typeof t[n]=="function"){t[n]=null}}t.parentNode.removeChild(t)}}};mejs.PluginDetector={hasPluginVersion:function(e,t){var n=this.plugins[e];t[1]=t[1]||0;t[2]=t[2]||0;return n[0]>t[0]||n[0]==t[0]&&n[1]>t[1]||n[0]==t[0]&&n[1]==t[1]&&n[2]>=t[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(e,t,n,r,i){this.plugins[e]=this.detectPlugin(t,n,r,i)},detectPlugin:function(e,t,n,r){var i=[0,0,0],s,o,u;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[e]=="object"){s=this.nav.plugins[e].description;if(s&&!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[t]&&!this.nav.mimeTypes[t].enabledPlugin)){i=s.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(o=0;o0){this.removeChild(t[0])}if(typeof e=="string"){this.src=e}else{var n,r;for(n=0;n0&&s[0].url!==null&&this.getTypeFromFile(s[0].url).indexOf("audio")>-1){h.isVideo=false}if(mejs.MediaFeatures.isBustedAndroid){e.canPlayType=function(e){return e.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""}}if(n&&(t.mode==="auto"||t.mode==="auto_plugin"||t.mode==="native")){if(!r){m=document.createElement(h.isVideo?"video":"audio");e.parentNode.insertBefore(m,e);e.style.display="none";h.htmlMediaElement=e=m}for(o=0;o0){h.url=s[0].url}return h},formatType:function(e,t){var n;if(e&&!t){return this.getTypeFromFile(e)}else{if(t&&~t.indexOf(";")){return t.substr(0,t.indexOf(";"))}else{return t}}},getTypeFromFile:function(e){e=e.split("?")[0];var t=e.substring(e.lastIndexOf(".")+1);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,n){var r=e.htmlMediaElement,i=document.createElement("div");i.className="me-cannotplay";try{i.style.width=r.width+"px";i.style.height=r.height+"px"}catch(s){}i.innerHTML=n!==""?'':''+mejs.i18n.t("Download File")+"";r.parentNode.insertBefore(i,r);r.style.display="none";t.error(r)},createPlugin:function(e,t,n,r,i,s){var o=e.htmlMediaElement,u=1,a=1,f="me_"+e.method+"_"+mejs.meIndex++,l=new mejs.PluginMediaElement(f,e.method,e.url),c=document.createElement("div"),h,p,d;l.tagName=o.tagName;for(var v=0;v0?t.videoWidth:o.getAttribute("width")!==null?o.getAttribute("width"):t.defaultVideoWidth;a=t.videoHeight>0?t.videoHeight:o.getAttribute("height")!==null?o.getAttribute("height"):t.defaultVideoHeight;u=mejs.Utility.encodeUrl(u);a=mejs.Utility.encodeUrl(a)}else{if(t.enablePluginDebug){u=320;a=240}}l.success=t.success;mejs.MediaPluginBridge.registerPluginElement(f,l,o);c.className="me-plugin";c.id=f+"_container";if(e.isVideo){o.parentNode.insertBefore(c,o)}else{document.body.insertBefore(c,document.body.childNodes[0])}d=["id="+f,"isvideo="+(e.isVideo?"true":"false"),"autoplay="+(r?"true":"false"),"preload="+i,"width="+u,"startvolume="+t.startVolume,"timerrate="+t.timerRate,"flashstreamer="+t.flashStreamer,"height="+a];if(e.url!==null){if(e.method=="flash"){d.push("file="+mejs.Utility.encodeUrl(e.url))}else{d.push("file="+e.url)}}if(t.enablePluginDebug){d.push("debug=true")}if(t.enablePluginSmoothing){d.push("smoothing=true")}if(s){d.push("controls=true")}if(t.pluginVars){d=d.concat(t.pluginVars)}switch(e.method){case"silverlight":c.innerHTML=''+''+''+''+''+''+''+"";break;case"flash":if(mejs.MediaFeatures.isIE){h=document.createElement("div");c.appendChild(h);h.outerHTML=''+''+''+''+''+''+''+''+""}else{c.innerHTML=''}break}o.style.display="none";return l},updateNative:function(e,t,n,r){var i=e.htmlMediaElement,s;for(s in mejs.HtmlMediaElement){i[s]=mejs.HtmlMediaElement[s]}t.success(i,i);return i}};window.mejs=mejs;window.MediaElement=mejs.MediaElement;(function(e,t,n,r){"use strict";var i={locale:{strings:{}},methods:{}};i.locale.getLanguage=function(){return{language:navigator.language}};i.locale.INIT_LANGUAGE=i.locale.getLanguage();i.methods.checkPlain=function(e){var t,n,r={"&":"&",'"':""","<":"<",">":">"};e=String(e);for(t in r){if(r.hasOwnProperty(t)){n=new RegExp(t,"g");e=e.replace(n,r[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])+"";break}e=e.replace(n,t[n])}return e};i.methods.t=function(e,t,n){if(i.locale.strings&&i.locale.strings[n.context]&&i.locale.strings[n.context][e]){e=i.locale.strings[n.context][e]}if(t){e=i.methods.formatString(e,t)}return e};i.t=function(e,t,n){if(typeof e==="string"&&e.length>0){var r=i.locale.getLanguage();n=n||{context:r.language};return i.methods.t(e,t,n)}else{throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}}};n.i18n=i})(jQuery,document,mejs);(function(e,t){"use strict";e.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schließen"}})(mejs.i18n.locale.strings);if(typeof jQuery!="undefined"){mejs.$=jQuery}else if(typeof ender!="undefined"){mejs.$=ender}(function(e){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(e){return e.duration*.05},defaultSeekForwardInterval:function(e){return e.duration*.05},audioWidth:-1,audioHeight:-1,startVolume:.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,hideVideoControlsOnLoad:false,clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(e,t){if(t.paused||t.ended){t.play()}else{t.pause()}}},{keys:[38],action:function(e,t){var n=Math.min(t.volume+.1,1);t.setVolume(n)}},{keys:[40],action:function(e,t){var n=Math.max(t.volume-.1,0);t.setVolume(n)}},{keys:[37,227],action:function(e,t){if(!isNaN(t.duration)&&t.duration>0){if(e.isVideo){e.showControls();e.startControlsTimer()}var n=Math.max(t.currentTime-e.options.defaultSeekBackwardInterval(t),0);t.setCurrentTime(n)}}},{keys:[39,228],action:function(e,t){if(!isNaN(t.duration)&&t.duration>0){if(e.isVideo){e.showControls();e.startControlsTimer()}var n=Math.min(t.currentTime+e.options.defaultSeekForwardInterval(t),t.duration);t.setCurrentTime(n)}}},{keys:[70],action:function(e,t){if(typeof e.enterFullScreen!="undefined"){if(e.isFullScreen){e.exitFullScreen()}else{e.enterFullScreen()}}}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(t,n){if(!(this instanceof mejs.MediaElementPlayer)){return new mejs.MediaElementPlayer(t,n)}var r=this;r.$media=r.$node=e(t);r.node=r.media=r.$media[0];if(typeof r.node.player!="undefined"){return r.node.player}else{r.node.player=r}if(typeof n=="undefined"){n=r.$node.data("mejsoptions")}r.options=e.extend({},mejs.MepDefaults,n);r.id="mep_"+mejs.mepIndex++;mejs.players[r.id]=r;r.init();return r};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var t=this,n=mejs.MediaFeatures,r=e.extend(true,{},t.options,{success:function(e,n){t.meReady(e,n)},error:function(e){t.handleError(e)}}),i=t.media.tagName.toLowerCase();t.isDynamic=i!=="audio"&&i!=="video";if(t.isDynamic){t.isVideo=t.options.isVideo}else{t.isVideo=i!=="audio"&&t.options.isVideo}if(n.isiPad&&t.options.iPadUseNativeControls||n.isiPhone&&t.options.iPhoneUseNativeControls){t.$media.attr("controls","controls");if(n.isiPad&&t.media.getAttribute("autoplay")!==null){t.media.load();t.media.play()}}else if(n.isAndroid&&t.options.AndroidUseNativeControls){}else{t.$media.removeAttr("controls");t.container=e('
'+'
'+'
'+'
'+'
'+'
'+"
"+"
").addClass(t.$media[0].className).insertBefore(t.$media);t.container.addClass((n.isAndroid?"mejs-android ":"")+(n.isiOS?"mejs-ios ":"")+(n.isiPad?"mejs-ipad ":"")+(n.isiPhone?"mejs-iphone ":"")+(t.isVideo?"mejs-video ":"mejs-audio "));if(n.isiOS){var s=t.$media.clone();t.container.find(".mejs-mediaelement").append(s);t.$media.remove();t.$node=t.$media=s;t.node=t.media=s[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 o=t.isVideo?"video":"audio",u=o.substring(0,1).toUpperCase()+o.substring(1);if(t.options[o+"Width"]>0||t.options[o+"Width"].toString().indexOf("%")>-1){t.width=t.options[o+"Width"]}else if(t.media.style.width!==""&&t.media.style.width!==null){t.width=t.media.style.width}else if(t.media.getAttribute("width")!==null){t.width=t.$media.attr("width")}else{t.width=t.options["default"+u+"Width"]}if(t.options[o+"Height"]>0||t.options[o+"Height"].toString().indexOf("%")>-1){t.height=t.options[o+"Height"]}else if(t.media.style.height!==""&&t.media.style.height!==null){t.height=t.media.style.height}else if(t.$media[0].getAttribute("height")!==null){t.height=t.$media.attr("height")}else{t.height=t.options["default"+u+"Height"]}t.setPlayerSize(t.width,t.height);r.pluginWidth=t.width;r.pluginHeight=t.height}mejs.MediaElement(t.$media[0],r);t.container.trigger("controlsshown")},showControls:function(e){var t=this;e=typeof e=="undefined"||e;if(t.controlsAreVisible)return;if(e){t.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){t.controlsAreVisible=true;t.container.trigger("controlsshown")});t.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){t.controlsAreVisible=true})}else{t.controls.css("visibility","visible").css("display","block");t.container.find(".mejs-control").css("visibility","visible").css("display","block");t.controlsAreVisible=true;t.container.trigger("controlsshown")}t.setControlsSize()},hideControls:function(t){var n=this;t=typeof t=="undefined"||t;if(!n.controlsAreVisible)return;if(t){n.controls.stop(true,true).fadeOut(200,function(){e(this).css("visibility","hidden").css("display","block");n.controlsAreVisible=false;n.container.trigger("controlshidden")});n.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){e(this).css("visibility","hidden").css("display","block")})}else{n.controls.css("visibility","hidden").css("display","block");n.container.find(".mejs-control").css("visibility","hidden").css("display","block");n.controlsAreVisible=false;n.container.trigger("controlshidden")}},controlsTimer:null,startControlsTimer:function(e){var t=this;e=typeof e!="undefined"?e:1500;t.killControlsTimer("start");t.controlsTimer=setTimeout(function(){t.hideControls();t.killControlsTimer("hide")},e)},killControlsTimer:function(e){var t=this;if(t.controlsTimer!==null){clearTimeout(t.controlsTimer);delete t.controlsTimer;t.controlsTimer=null}},controlsEnabled:true,disableControls:function(){var e=this;e.killControlsTimer();e.hideControls(false);this.controlsEnabled=false},enableControls:function(){var e=this;e.showControls(false);e.controlsEnabled=true},meReady:function(e,t){var n=this,r=mejs.MediaFeatures,i=t.getAttribute("autoplay"),s=!(typeof i=="undefined"||i===null||i==="false"),o,u;if(n.created)return;else n.created=true;n.media=e;n.domNode=t;if(!(r.isAndroid&&n.options.AndroidUseNativeControls)&&!(r.isiPad&&n.options.iPadUseNativeControls)&&!(r.isiPhone&&n.options.iPhoneUseNativeControls)){n.buildposter(n,n.controls,n.layers,n.media);n.buildkeyboard(n,n.controls,n.layers,n.media);n.buildoverlays(n,n.controls,n.layers,n.media);n.findTracks();for(o in n.options.features){u=n.options.features[o];if(n["build"+u]){try{n["build"+u](n,n.controls,n.layers,n.media)}catch(a){}}}n.container.trigger("controlsready");n.setPlayerSize(n.width,n.height);n.setControlsSize();if(n.isVideo){if(mejs.MediaFeatures.hasTouch){n.$media.bind("touchstart",function(){if(n.controlsAreVisible){n.hideControls(false)}else{if(n.controlsEnabled){n.showControls(false)}}})}else{n.media.addEventListener("click",function(){if(n.options.clickToPlayPause){if(n.media.paused){n.media.play()}else{n.media.pause()}}});n.container.bind("mouseenter mouseover",function(){if(n.controlsEnabled){if(!n.options.alwaysShowControls){n.killControlsTimer("enter");n.showControls();n.startControlsTimer(2500)}}}).bind("mousemove",function(){if(n.controlsEnabled){if(!n.controlsAreVisible){n.showControls()}if(!n.options.alwaysShowControls){n.startControlsTimer(2500)}}}).bind("mouseleave",function(){if(n.controlsEnabled){if(!n.media.paused&&!n.options.alwaysShowControls){n.startControlsTimer(1e3)}}})}if(n.options.hideVideoControlsOnLoad){n.hideControls(false)}if(s&&!n.options.alwaysShowControls){n.hideControls()}if(n.options.enableAutosize){n.media.addEventListener("loadedmetadata",function(e){if(n.options.videoHeight<=0&&n.domNode.getAttribute("height")===null&&!isNaN(e.target.videoHeight)){n.setPlayerSize(e.target.videoWidth,e.target.videoHeight);n.setControlsSize();n.media.setVideoSize(e.target.videoWidth,e.target.videoHeight)}},false)}}e.addEventListener("play",function(){var e;for(e in mejs.players){var t=mejs.players[e];if(t.id!=n.id&&n.options.pauseOtherPlayers&&!t.paused&&!t.ended){t.pause()}t.hasFocus=false}n.hasFocus=true},false);n.media.addEventListener("ended",function(e){if(n.options.autoRewind){try{n.media.setCurrentTime(0)}catch(t){}}n.media.pause();if(n.setProgressRail)n.setProgressRail();if(n.setCurrentRail)n.setCurrentRail();if(n.options.loop){n.media.play()}else if(!n.options.alwaysShowControls&&n.controlsEnabled){n.showControls()}},false);n.media.addEventListener("loadedmetadata",function(e){if(n.updateDuration){n.updateDuration()}if(n.updateCurrent){n.updateCurrent()}if(!n.isFullScreen){n.setPlayerSize(n.width,n.height);n.setControlsSize()}},false);setTimeout(function(){n.setPlayerSize(n.width,n.height);n.setControlsSize()},50);n.globalBind("resize",function(){if(!(n.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen)){n.setPlayerSize(n.width,n.height)}n.setControlsSize()})}if(s&&e.pluginType=="native"){e.load();e.play()}if(n.options.success){if(typeof n.options.success=="string"){window[n.options.success](n.media,n.domNode,n)}else{n.options.success(n.media,n.domNode,n)}}},handleError:function(e){var t=this;t.controls.hide();if(t.options.error){t.options.error(e)}},setPlayerSize:function(t,n){var r=this;if(typeof t!="undefined")r.width=t;if(typeof n!="undefined")r.height=n;if(r.height.toString().indexOf("%")>0||r.$node.css("max-width")==="100%"||r.$node[0].currentStyle&&r.$node[0].currentStyle.maxWidth==="100%"){var i=r.isVideo?r.media.videoWidth&&r.media.videoWidth>0?r.media.videoWidth:r.options.defaultVideoWidth:r.options.defaultAudioWidth,s=r.isVideo?r.media.videoHeight&&r.media.videoHeight>0?r.media.videoHeight:r.options.defaultVideoHeight:r.options.defaultAudioHeight,o=r.container.parent().closest(":visible").width(),u=r.isVideo||!r.options.autosizeProgress?parseInt(o*s/i,10):s;if(r.container.parent()[0].tagName.toLowerCase()==="body"){o=e(window).width();u=e(window).height()}if(u!=0&&o!=0){r.container.width(o).height(u);r.$media.add(r.container.find(".mejs-shim")).width("100%").height("100%");if(r.isVideo){if(r.media.setVideoSize){r.media.setVideoSize(o,u)}}r.layers.children(".mejs-layer").width("100%").height("100%")}}else{r.container.width(r.width).height(r.height);r.layers.children(".mejs-layer").width(r.width).height(r.height)}},setControlsSize:function(){var t=this,n=0,r=0,i=t.controls.find(".mejs-time-rail"),s=t.controls.find(".mejs-time-total"),o=t.controls.find(".mejs-time-current"),u=t.controls.find(".mejs-time-loaded"),a=i.siblings();if(t.options&&!t.options.autosizeProgress){r=parseInt(i.css("width"))}if(r===0||!r){a.each(function(){var t=e(this);if(t.css("position")!="absolute"&&t.is(":visible")){n+=e(this).outerWidth(true)}});r=t.controls.width()-n-2-(i.outerWidth(true)-i.width())}i.width(r);s.width(r-(s.outerWidth(true)-s.width()));if(t.setProgressRail)t.setProgressRail();if(t.setCurrentRail)t.setCurrentRail()},buildposter:function(t,n,r,i){var s=this,o=e('
'+"
").appendTo(r),u=t.$media.attr("poster");if(t.options.poster!==""){u=t.options.poster}if(u!==""&&u!=null){s.setPoster(u)}else{o.hide()}i.addEventListener("play",function(){o.hide()},false)},setPoster:function(t){var n=this,r=n.container.find(".mejs-poster"),i=r.find("img");if(i.length==0){i=e('').appendTo(r)}i.attr("src",t)},buildoverlays:function(t,n,r,i){var s=this;if(!t.isVideo)return;var o=e('
'+'
'+"
").hide().appendTo(r),u=e('
'+'
'+"
").hide().appendTo(r),a=e('
'+'
'+"
").appendTo(r).click(function(){if(s.options.clickToPlayPause){if(i.paused){i.play()}else{i.pause()}}});i.addEventListener("play",function(){a.hide();o.hide();n.find(".mejs-time-buffering").hide();u.hide()},false);i.addEventListener("playing",function(){a.hide();o.hide();n.find(".mejs-time-buffering").hide();u.hide()},false);i.addEventListener("seeking",function(){o.show();n.find(".mejs-time-buffering").show()},false);i.addEventListener("seeked",function(){o.hide();n.find(".mejs-time-buffering").hide()},false);i.addEventListener("pause",function(){if(!mejs.MediaFeatures.isiPhone){a.show()}},false);i.addEventListener("waiting",function(){o.show();n.find(".mejs-time-buffering").show()},false);i.addEventListener("loadeddata",function(){o.show();n.find(".mejs-time-buffering").show()},false);i.addEventListener("canplay",function(){o.hide();n.find(".mejs-time-buffering").hide()},false);i.addEventListener("error",function(){o.hide();n.find(".mejs-time-buffering").hide();u.show();u.find("mejs-overlay-error").html("Error loading this resource")},false)},buildkeyboard:function(t,n,r,i){var s=this;s.globalBind("keydown",function(e){if(t.hasFocus&&t.options.enableKeyboard){for(var n=0,r=t.options.keyActions.length;n0) { e(this).attr("width",e(this).parent().width()); } else { e(this).attr("width","150"); } } }); e("video").each(function(){ if(e(this).attr("width")==0||e(this).attr("width")==100||e(this).attr("width")=="100%"){ if(e(this).parent().width()>0) { e(this).attr("width",e(this).parent().width()); } else { e(this).attr("width","150"); } } if(e(this).attr("height")==0||e(this).attr("height")==100||e(this).attr("height")=="100%"){ e(this).attr("height",350); } });e(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);(function(e){e.extend(mejs.MepDefaults,{playpauseText:"Play/Pause"});e.extend(MediaElementPlayer.prototype,{buildplaypause:function(t,n,r,i){var s=this,o=e('
'+''+"
").appendTo(n).click(function(e){e.preventDefault();if(i.paused){i.play()}else{i.pause()}return false});i.addEventListener("play",function(){o.removeClass("mejs-play").addClass("mejs-pause")},false);i.addEventListener("playing",function(){o.removeClass("mejs-play").addClass("mejs-pause")},false);i.addEventListener("pause",function(){o.removeClass("mejs-pause").addClass("mejs-play")},false);i.addEventListener("paused",function(){o.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);(function(e){e.extend(mejs.MepDefaults,{stopText:"Stop"});e.extend(MediaElementPlayer.prototype,{buildstop:function(t,n,r,i){var s=this,o=e('
'+''+"
").appendTo(n).click(function(){if(!i.paused){i.pause()}if(i.currentTime>0){i.setCurrentTime(0);i.pause();n.find(".mejs-time-current").width("0px");n.find(".mejs-time-handle").css("left","0px");n.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));n.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));r.find(".mejs-poster").show()}})}})})(mejs.$);(function(e){e.extend(MediaElementPlayer.prototype,{buildprogress:function(t,n,r,i){e('
'+''+''+''+''+''+''+'00:00'+''+""+""+"
").appendTo(n);n.find(".mejs-time-buffering").hide();var s=this,o=n.find(".mejs-time-total"),u=n.find(".mejs-time-loaded"),a=n.find(".mejs-time-current"),f=n.find(".mejs-time-handle"),l=n.find(".mejs-time-float"),c=n.find(".mejs-time-float-current"),h=function(e){var t=e.pageX,n=o.offset(),r=o.outerWidth(true),s=0,u=0,a=0;if(i.duration){if(tr+n.left){t=r+n.left}a=t-n.left;s=a/r;u=s<=.02?0:s*i.duration;if(p&&u!==i.currentTime){i.setCurrentTime(u)}if(!mejs.MediaFeatures.hasTouch){l.css("left",a);c.html(mejs.Utility.secondsToTimeCode(u));l.show()}}},p=false,d=false;o.bind("mousedown",function(e){if(e.which===1){p=true;h(e);s.globalBind("mousemove.dur",function(e){h(e)});s.globalBind("mouseup.dur",function(e){p=false;l.hide();s.globalUnbind(".dur")});return false}}).bind("mouseenter",function(e){d=true;s.globalBind("mousemove.dur",function(e){h(e)});if(!mejs.MediaFeatures.hasTouch){l.show()}}).bind("mouseleave",function(e){d=false;if(!p){s.globalUnbind(".dur");l.hide()}});i.addEventListener("progress",function(e){t.setProgressRail(e);t.setCurrentRail(e)},false);i.addEventListener("timeupdate",function(e){t.setProgressRail(e);t.setCurrentRail(e)},false);s.loaded=u;s.total=o;s.current=a;s.handle=f},setProgressRail:function(e){var t=this,n=e!=undefined?e.target:t.media,r=null;if(n&&n.buffered&&n.buffered.length>0&&n.buffered.end&&n.duration){r=n.buffered.end(0)/n.duration}else if(n&&n.bytesTotal!=undefined&&n.bytesTotal>0&&n.bufferedBytes!=undefined){r=n.bufferedBytes/n.bytesTotal}else if(e&&e.lengthComputable&&e.total!=0){r=e.loaded/e.total}if(r!==null){r=Math.min(1,Math.max(0,r));if(t.loaded&&t.total){t.loaded.width(t.total.width()*r)}}},setCurrentRail:function(){var e=this;if(e.media.currentTime!=undefined&&e.media.duration){if(e.total&&e.handle){var t=Math.round(e.total.width()*e.media.currentTime/e.media.duration),n=t-Math.round(e.handle.outerWidth(true)/2);e.current.width(t);e.handle.css("left",n)}}}})})(mejs.$);(function(e){e.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "});e.extend(MediaElementPlayer.prototype,{buildcurrent:function(t,n,r,i){var s=this;e('
'+''+(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00")+""+"
").appendTo(n);s.currenttime=s.controls.find(".mejs-currenttime");i.addEventListener("timeupdate",function(){t.updateCurrent()},false)},buildduration:function(t,n,r,i){var s=this;if(s.controls.width()<260){return}if(n.children().last().find(".mejs-currenttime").length>0){e(s.options.timeAndDurationSeparator+''+(s.options.duration>0?mejs.Utility.secondsToTimeCode(s.options.duration,s.options.alwaysShowHours||s.media.duration>3600,s.options.showTimecodeFrameCount,s.options.framesPerSecond||25):(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(n.find(".mejs-time"))}else{n.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");e('
'+''+(s.options.duration>0?mejs.Utility.secondsToTimeCode(s.options.duration,s.options.alwaysShowHours||s.media.duration>3600,s.options.showTimecodeFrameCount,s.options.framesPerSecond||25):(t.options.alwaysShowHours?"00:":"")+(t.options.showTimecodeFrameCount?"00:00:00":"00:00"))+""+"
").appendTo(n)}s.durationD=s.controls.find(".mejs-duration");i.addEventListener("timeupdate",function(){t.updateDuration()},false)},updateCurrent:function(){var e=this;if(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);if(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:"Mute Toggle",hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});e.extend(MediaElementPlayer.prototype,{buildvolume:function(t,n,r,i){if(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)return;var s=this;total=s.controls;var o=s.isVideo?s.options.videoVolume:s.options.audioVolume,u=o=="horizontal"?e('
'+''+"
"+'
'+'
'+'
'+'
'+"
").appendTo(n):e('
'+''+'
'+'
'+'
'+'
'+"
"+"
").appendTo(n),a=s.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),f=s.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),l=s.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),c=s.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),h=function(e,t){if(!a.is(":visible")&&typeof t=="undefined"){a.show();h(e,true);a.hide();return}e=Math.max(0,e);e=Math.min(e,1);if(e==0){u.removeClass("mejs-mute").addClass("mejs-unmute")}else{u.removeClass("mejs-unmute").addClass("mejs-mute")}if(o=="vertical"){var n=f.height(),r=f.position(),i=n-n*e;c.css("top",Math.round(r.top+i-c.height()/2));l.height(n-i);l.css("top",r.top+i)}else{var s=f.width(),r=f.position(),p=s*e;c.css("left",Math.round(r.left+p-c.width()/2));l.width(Math.round(p))}},p=function(e){var t=null,n=f.offset();if(o=="vertical"){var r=f.height(),s=parseInt(f.css("top").replace(/px/,""),10),u=e.pageY-n.top;t=(r-u)/r;if(n.top==0||n.left==0)return}else{var a=f.width(),l=e.pageX-n.left;t=l/a}t=Math.max(0,t);t=Math.min(t,1);h(t);if(t==0){i.setMuted(true)}else{i.setMuted(false)}i.setVolume(t)},d=false,v=false;u.hover(function(){a.show();v=true},function(){v=false;if(!d&&o=="vertical"){a.hide()}});a.bind("mouseover",function(){v=true}).bind("mousedown",function(e){p(e);s.globalBind("mousemove.vol",function(e){p(e)});s.globalBind("mouseup.vol",function(){d=false;s.globalUnbind(".vol");if(!v&&o=="vertical"){a.hide()}});d=true;return false});u.find("button").click(function(){i.setMuted(!i.muted)});i.addEventListener("volumechange",function(e){if(!d){if(i.muted){h(0);u.removeClass("mejs-mute").addClass("mejs-unmute")}else{h(i.volume);u.removeClass("mejs-unmute").addClass("mejs-mute")}}},false);if(s.container.is(":visible")){h(t.options.startVolume);if(t.options.startVolume===0){i.setMuted(true)}if(i.pluginType==="native"){i.setVolume(t.options.startVolume)}}}})})(mejs.$);(function(e){e.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});e.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(t,n,r,i){if(!t.isVideo)return;t.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){var s=function(e){if(mejs.MediaFeatures.isFullScreen()){t.isNativeFullScreen=true;t.setControlsSize()}else{t.isNativeFullScreen=false;t.exitFullScreen()}};if(mejs.MediaFeatures.hasMozNativeFullScreen){t.globalBind(mejs.MediaFeatures.fullScreenEventName,s)}else{t.container.bind(mejs.MediaFeatures.fullScreenEventName,s)}}var o=this,u=0,a=0,f=t.container,l=e('
'+''+"
").appendTo(n);if(o.media.pluginType==="native"||!o.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox){l.click(function(){var e=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||t.isFullScreen;if(e){t.exitFullScreen()}else{t.enterFullScreen()}})}else{var c=null,h=function(){var e=document.createElement("x"),t=document.documentElement,n=window.getComputedStyle,r;if(!("pointerEvents"in e.style)){return false}e.style.pointerEvents="auto";e.style.pointerEvents="x";t.appendChild(e);r=n&&n(e,"").pointerEvents==="auto";t.removeChild(e);return!!r}();if(h&&!mejs.MediaFeatures.isOpera){var p=false,d=function(){if(p){v.hide();m.hide();g.hide();l.css("pointer-events","");o.controls.css("pointer-events","");p=false}},v=e('
').appendTo(o.container).mouseover(d),m=e('
').appendTo(o.container).mouseover(d),g=e('
').appendTo(o.container).mouseover(d),y=function(){var e={position:"absolute",top:0,left:0};v.css(e);m.css(e);g.css(e);v.width(o.container.width()).height(o.container.height()-o.controls.height());var t=l.offset().left-o.container.offset().left;fullScreenBtnWidth=l.outerWidth(true);m.width(t).height(o.controls.height()).css({top:o.container.height()-o.controls.height()});g.width(o.container.width()-t-fullScreenBtnWidth).height(o.controls.height()).css({top:o.container.height()-o.controls.height(),left:t+fullScreenBtnWidth})};o.globalBind("resize",function(){y()});l.mouseover(function(){if(!o.isFullScreen){var e=l.offset(),n=t.container.offset();i.positionFullscreenButton(e.left-n.left,e.top-n.top,false);l.css("pointer-events","none");o.controls.css("pointer-events","none");v.show();g.show();m.show();y();p=true}});i.addEventListener("fullscreenchange",function(e){d()})}else{l.mouseover(function(){if(c!==null){clearTimeout(c);delete c}var e=l.offset(),n=t.container.offset();i.positionFullscreenButton(e.left-n.left,e.top-n.top,true)}).mouseout(function(){if(c!==null){clearTimeout(c);delete c}c=setTimeout(function(){i.hideFullscreenButton()},1500)})}}t.fullscreenBtn=l;o.globalBind("keydown",function(e){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||o.isFullScreen)&&e.keyCode==27){t.exitFullScreen()}})},cleanfullscreen:function(e){e.exitFullScreen()},enterFullScreen:function(){var t=this;if(t.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||t.options.usePluginFullScreen)){return}docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=t.container.height();normalWidth=t.container.width();if(t.media.pluginType==="native"){if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(t.container[0]);if(t.isInIframe){setTimeout(function r(){if(t.isNativeFullScreen){if(e(window).width()!==screen.width){t.exitFullScreen()}else{setTimeout(r,500)}}},500)}}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){t.media.webkitEnterFullscreen();return}}if(t.isInIframe){var n=t.options.newWindowCallback(this);if(n!==""){if(!mejs.MediaFeatures.hasTrueNativeFullScreen){t.pause();window.open(n,t.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}else{setTimeout(function(){if(!t.isNativeFullScreen){t.pause();window.open(n,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%");setTimeout(function(){t.container.css({width:"100%",height:"100%"});t.setControlsSize()},500);if(t.pluginType==="native"){t.$media.width("100%").height("100%")}else{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%");if(t.fullscreenBtn){t.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen")}t.setControlsSize();t.isFullScreen=true},exitFullScreen:function(){var e=this;if(e.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox){e.media.setFullscreen(false);return}if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||e.isFullScreen)){mejs.MediaFeatures.cancelFullScreen()}document.documentElement.style.overflow=docStyleOverflow;e.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(e.pluginType==="native"){e.$media.width(normalWidth).height(normalHeight)}else{e.container.find("object embed").width(normalWidth).height(normalHeight);e.media.setVideoSize(normalWidth,normalHeight)}e.layers.children("div").width(normalWidth).height(normalHeight);e.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");e.setControlsSize();e.isFullScreen=false}})})(mejs.$);(function(e){e.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles",hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});e.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(t,n,r,i){if(!t.isVideo)return;if(t.tracks.length==0)return;var s=this,o,u="";t.chapters=e('
').prependTo(r).hide();t.captions=e('
').prependTo(r).hide();t.captionsText=t.captions.find(".mejs-captions-text");t.captionsButton=e('
'+''+'
'+"
    "+"
  • "+''+''+"
  • "+"
"+"
"+"
").appendTo(n);var a=0;for(o=0;o0){n.displayChapters(r)}},false)}if(r.kind=="slides"){n.setupSlides(r)}},error:function(){n.loadNextTrack()}})},enableTrackButton:function(t,n){var r=this;if(n===""){n=mejs.language.codes[t]||t}r.captionsButton.find("input[value="+t+"]").prop("disabled",false).siblings("label").html(n);if(r.options.startLanguage==t){e("#"+r.id+"_captions_"+t).click()}r.adjustLanguageBox()},addTrackButton:function(t,n){var r=this;if(n===""){n=mejs.language.codes[t]||t}r.captionsButton.find("ul").append(e("
  • "+''+'"+"
  • "));r.adjustLanguageBox();r.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(true)+e.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var e=this,t=false;if(e.options.hideCaptionsButtonWhenEmpty){for(i=0;i=n.entries.times[t].start&&e.media.currentTime<=n.entries.times[t].stop){e.captionsText.html(n.entries.text[t]);e.captions.show().height(0);return}}e.captions.hide()}else{e.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(typeof this.tracks=="undefined"||typeof this.slidesContainer=="undefined"){return}var n=this,r=n.slides.entries.text[t],i=n.slides.entries.imgs[t];if(typeof i=="undefined"||typeof i.fadeIn=="undefined"){n.slides.entries.imgs[t]=i=e('').on("load",function(){i.appendTo(n.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()})}else{if(!i.is(":visible")&&!i.is(":animated")){console.log("showing existing slide");i.fadeIn().siblings(":visible").fadeOut()}}},displaySlides:function(){if(typeof this.slides=="undefined")return;var e=this,t=e.slides,n;for(n=0;n=t.entries.times[n].start&&e.media.currentTime<=t.entries.times[n].stop){e.showSlide(n);return}}},displayChapters:function(){var e=this,t;for(t=0;t100||r==t.entries.times.length-1&&s+o<100){s=100-o}n.chapters.append(e('
    '+'
    '+''+t.entries.text[r]+""+''+mejs.Utility.secondsToTimeCode(t.entries.times[r].start)+"–"+mejs.Utility.secondsToTimeCode(t.entries.times[r].stop)+""+"
    "+"
    "));o+=s}n.chapters.find("div.mejs-chapter").click(function(){n.media.setCurrentTime(parseFloat(e(this).attr("rel")));if(n.media.paused){n.media.play()}});n.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){var n=0,r=mejs.TrackFormatParser.split2(t,/\r?\n/),i={text:[],times:[]},s,o;for(;n$1");i.text.push(o);i.times.push({start:mejs.Utility.convertSMPTEtoSeconds(s[1])==0?.2:mejs.Utility.convertSMPTEtoSeconds(s[1]),stop:mejs.Utility.convertSMPTEtoSeconds(s[3]),settings:s[5]})}}}return i}},dfxp:{parse:function(t){t=e(t).filter("tt");var n=0,r=t.children("div").eq(0),i=r.find("p"),s=t.find("#"+r.attr("style")),o,u,a,f,l={text:[],times:[]};if(s.length){var c=s.removeAttr("id").get(0).attributes;if(c.length){o={};for(n=0;n$1");l.text.push(f);if(l.times.start==0)l.times.start=2}return l}},split2:function(e,t){return e.split(t)}};if("x\n\ny".split(/\n/gi).length!=3){mejs.TrackFormatParser.split2=function(e,t){var n=[],r="",i;for(i=0;i
    ').appendTo(e("body")).hide();t.container.bind("contextmenu",function(e){if(t.isContextMenuEnabled){e.preventDefault();t.renderContextMenu(e.clientX-1,e.clientY-1);return false}});t.container.bind("click",function(){t.contextMenu.hide()});t.contextMenu.bind("mouseleave",function(){t.startContextMenuTimer()})},cleancontextmenu:function(e){e.contextMenu.remove()},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var e=this;e.killContextMenuTimer();e.contextMenuTimer=setTimeout(function(){e.hideContextMenu();e.killContextMenuTimer()},750)},killContextMenuTimer:function(){var e=this.contextMenuTimer;if(e!=null){clearTimeout(e);delete e;e=null}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(t,n){var r=this,i="",s=r.options.contextMenuItems;for(var o=0,u=s.length;o
    '}else{var a=s[o].render(r);if(a!=null){i+='
    '+a+"
    "}}}r.contextMenu.empty().append(e(i)).css({top:n,left:t}).show();r.contextMenu.find(".mejs-contextmenu-item").each(function(){var t=e(this),n=parseInt(t.data("itemindex"),10),i=r.options.contextMenuItems[n];if(typeof i.show!="undefined")i.show(t,r);t.click(function(){if(typeof i.click!="undefined")i.click(r);r.contextMenu.hide()})});setTimeout(function(){r.killControlsTimer("rev3")},100)}})})(mejs.$);(function(e){e.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});e.extend(MediaElementPlayer.prototype,{buildpostroll:function(t,n,r,i){var s=this,o=s.container.find('link[rel="postroll"]').attr("href");if(typeof o!=="undefined"){t.postroll=e('').prependTo(r).hide();s.media.addEventListener("ended",function(n){e.ajax({dataType:"html",url:o,success:function(e,t){r.find(".mejs-postroll-layer-content").html(e)}});t.postroll.show()},false)}}})})(mejs.$)