').appendTo(t.container).mouseover(restoreControls),positionHoverDivs=function(){var style={position:'absolute',top:0,left:0};videoHoverDiv.css(style);controlsLeftHoverDiv.css(style);controlsRightHoverDiv.css(style);videoHoverDiv.width(t.container.width()).height(t.container.height()-t.controls.height());var fullScreenBtnOffset=fullscreenBtn.offset().left-t.container.offset().left;fullScreenBtnWidth=fullscreenBtn.outerWidth(true);controlsLeftHoverDiv.width(fullScreenBtnOffset).height(t.controls.height()).css({top:t.container.height()-t.controls.height()});controlsRightHoverDiv.width(t.container.width()-fullScreenBtnOffset-fullScreenBtnWidth).height(t.controls.height()).css({top:t.container.height()-t.controls.height(),left:fullScreenBtnOffset+fullScreenBtnWidth});};$(document).resize(function(){positionHoverDivs();});fullscreenBtn.mouseover(function(){if(!t.isFullScreen){var buttonPos=fullscreenBtn.offset(),containerPos=player.container.offset();media.positionFullscreenButton(buttonPos.left-containerPos.left,buttonPos.top-containerPos.top,false);fullscreenBtn.css('pointer-events','none');t.controls.css('pointer-events','none');videoHoverDiv.show();controlsRightHoverDiv.show();controlsLeftHoverDiv.show();positionHoverDivs();fullscreenIsDisabled=true;}});media.addEventListener('fullscreenchange',function(e){restoreControls();});}else{fullscreenBtn.mouseover(function(){if(hideTimeout!==null){clearTimeout(hideTimeout);delete hideTimeout;}
var buttonPos=fullscreenBtn.offset(),containerPos=player.container.offset();media.positionFullscreenButton(buttonPos.left-containerPos.left,buttonPos.top-containerPos.top,true);}).mouseout(function(){if(hideTimeout!==null){clearTimeout(hideTimeout);delete hideTimeout;}
hideTimeout=setTimeout(function(){media.hideFullscreenButton();},1500);});}}
player.fullscreenBtn=fullscreenBtn;$(document).bind('keydown',function(e){if(((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen())||t.isFullScreen)&&e.keyCode==27){player.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 checkFullscreen(){if(t.isNativeFullScreen){if($(window).width()!==screen.width){t.exitFullScreen();}else{setTimeout(checkFullscreen,500);}}},500);}}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){t.media.webkitEnterFullscreen();return;}}
if(t.isInIframe){var url=t.options.newWindowCallback(this);if(url!==''){if(!mejs.MediaFeatures.hasTrueNativeFullScreen){t.pause();window.open(url,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(url,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('object, embed, iframe').width('100%').height('100%');t.media.setVideoSize($(window).width(),$(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 t=this;if(t.media.pluginType!=='native'&&mejs.MediaFeatures.isFirefox){t.media.setFullscreen(false);return;}
if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||t.isFullScreen)){mejs.MediaFeatures.cancelFullScreen();}
document.documentElement.style.overflow=docStyleOverflow;t.container.removeClass('mejs-container-fullscreen').width(normalWidth).height(normalHeight);if(t.pluginType==='native'){t.$media.width(normalWidth).height(normalHeight);}else{t.container.find('object embed').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();t.isFullScreen=false;}});})(mejs.$);(function($){$.extend(mejs.MepDefaults,{startLanguage:'',tracksText:'Captions/Subtitles'});$.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(player,controls,layers,media){if(!player.isVideo)
return;if(player.tracks.length==0)
return;var t=this,i,options='';player.chapters=$('
').prependTo(layers).hide();player.captions=$('
').prependTo(layers).hide();player.captionsText=player.captions.find('.mejs-captions-text');player.captionsButton=$('
').appendTo(controls).hover(function(){$(this).find('.mejs-captions-selector').css('visibility','visible');},function(){$(this).find('.mejs-captions-selector').css('visibility','hidden');}).delegate('input[type=radio]','click',function(){lang=this.value;if(lang=='none'){player.selectedTrack=null;}else{for(i=0;i
0){t.drawChapters(track);}},error:function(){t.loadNextTrack();}});}},enableTrackButton:function(lang,label){var t=this;if(label===''){label=mejs.language.codes[lang]||lang;}
t.captionsButton.find('input[value='+lang+']').prop('disabled',false).siblings('label').html(label);if(t.options.startLanguage==lang){$('#'+t.id+'_captions_'+lang).click();}
t.adjustLanguageBox();},addTrackButton:function(lang,label){var t=this;if(label===''){label=mejs.language.codes[lang]||lang;}
t.captionsButton.find('ul').append($(''+''+''+''));t.adjustLanguageBox();t.container.find('.mejs-captions-translations option[value='+lang+']').remove();},adjustLanguageBox:function(){var t=this;t.captionsButton.find('.mejs-captions-selector').height(t.captionsButton.find('.mejs-captions-selector ul').outerHeight(true)+t.captionsButton.find('.mejs-captions-translations').outerHeight(true));},displayCaptions:function(){if(typeof this.tracks=='undefined')
return;var
t=this,i,track=t.selectedTrack;if(track!=null&&track.isLoaded){for(i=0;i=track.entries.times[i].start&&t.media.currentTime<=track.entries.times[i].stop){t.captionsText.html(track.entries.text[i]);t.captions.show().height(0);return;}}
t.captions.hide();}else{t.captions.hide();}},displayChapters:function(){var
t=this,i;for(i=0;i100||i==chapters.entries.times.length-1&&percent+usedPercent<100)
{percent=100-usedPercent;}
t.chapters.append($(''+'
'+''+chapters.entries.text[i]+''+''+mejs.Utility.secondsToTimeCode(chapters.entries.times[i].start)+'–'+mejs.Utility.secondsToTimeCode(chapters.entries.times[i].stop)+''+'
'+'
'));usedPercent+=percent;}
t.chapters.find('div.mejs-chapter').click(function(){t.media.setCurrentTime(parseFloat($(this).attr('rel')));if(t.media.paused){t.media.play();}});t.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={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})?)(.*)$/,split2:function(text,regex){return text.split(regex);},parse:function(trackText){var
i=0,lines=this.split2(trackText,/\r?\n/),entries={text:[],times:[]},timecode,text;for(;i').appendTo($('body')).hide();player.container.bind('contextmenu',function(e){if(player.isContextMenuEnabled){e.preventDefault();player.renderContextMenu(e.clientX-1,e.clientY-1);return false;}});player.container.bind('click',function(){player.contextMenu.hide();});player.contextMenu.bind('mouseleave',function(){player.startContextMenuTimer();});},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true;},disableContextMenu:function(){this.isContextMenuEnabled=false;},contextMenuTimeout:null,startContextMenuTimer:function(){var t=this;t.killContextMenuTimer();t.contextMenuTimer=setTimeout(function(){t.hideContextMenu();t.killContextMenuTimer();},750);},killContextMenuTimer:function(){var timer=this.contextMenuTimer;if(timer!=null){clearTimeout(timer);delete timer;timer=null;}},hideContextMenu:function(){this.contextMenu.hide();},renderContextMenu:function(x,y){var t=this,html='',items=t.options.contextMenuItems;for(var i=0,il=items.length;i