From 50f0fe7785c3bc2003d7ebb8c201e4ef393cbf94 Mon Sep 17 00:00:00 2001 From: "Bot (Assets)" Date: Wed, 10 Apr 2013 22:58:42 +0000 Subject: [PATCH] Compress scripts/styles: 3.6-beta1-23960. git-svn-id: http://core.svn.wordpress.org/trunk@23960 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/media-views.min.js | 2 +- .../mediaelement-and-player.min.js | 210 ++++++------------ .../mediaelement/mediaelementplayer.min.css | 2 +- wp-includes/version.php | 2 +- 4 files changed, 67 insertions(+), 149 deletions(-) diff --git a/wp-includes/js/media-views.min.js b/wp-includes/js/media-views.min.js index 4140590c0f..bc1d94fc4b 100644 --- a/wp-includes/js/media-views.min.js +++ b/wp-includes/js/media-views.min.js @@ -1 +1 @@ -(function(e){var f=wp.media,d=f.model.Attachment,c=f.model.Attachments,a=f.model.Query,b;b=f.view.l10n=typeof _wpMediaViewsL10n==="undefined"?{}:_wpMediaViewsL10n;f.view.settings=b.settings||{};delete b.settings;f.model.settings.post=f.view.settings.post;e.support.transition=(function(){var g=document.documentElement.style,h={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i;i=_.find(_.keys(h),function(j){return !_.isUndefined(g[j])});return i&&{end:h[i]}}());f.transition=function(g,h){var i=e.Deferred();h=h||2000;if(e.support.transition){if(!(g instanceof e)){g=e(g)}g.first().one(e.support.transition.end,i.resolve);_.delay(i.resolve,h)}else{i.resolve()}return i.promise()};f.controller.Region=function(g){_.extend(this,_.pick(g||{},"id","view","selector"))};f.controller.Region.extend=Backbone.Model.extend;_.extend(f.controller.Region.prototype,{mode:function(g){if(!g){return this._mode}if(g===this._mode){return this}this.trigger("deactivate");this._mode=g;this.render(g);this.trigger("activate");return this},render:function(h){if(h&&h!==this._mode){return this.mode(h)}var i={view:null},g;this.trigger("create",i);g=i.view;this.trigger("render",g);if(g){this.set(g)}return this},get:function(){return this.view.views.first(this.selector)},set:function(g,h){if(h){h.add=false}return this.view.views.set(this.selector,g,h)},trigger:function(h){var i;if(!this._mode){return}var g=_.toArray(arguments);i=this.id+":"+h;g[0]=i+":"+this._mode;this.view.trigger.apply(this.view,g);g[0]=i;this.view.trigger.apply(this.view,g);return this}});f.controller.StateMachine=function(g){this.states=new Backbone.Collection(g)};f.controller.StateMachine.extend=Backbone.Model.extend;_.extend(f.controller.StateMachine.prototype,Backbone.Events,{state:function(g){this.states=this.states||new Backbone.Collection();g=g||this._state;if(g&&!this.states.get(g)){this.states.add({id:g})}return this.states.get(g)},setState:function(h){var g=this.state();if((g&&h===g.id)||!this.states||!this.states.get(h)){return this}if(g){g.trigger("deactivate");this._lastState=g.id}this._state=h;this.state().trigger("activate");return this},lastState:function(){if(this._lastState){return this.state(this._lastState)}}});_.each(["on","off","trigger"],function(g){f.controller.StateMachine.prototype[g]=function(){this.states=this.states||new Backbone.Collection();this.states[g].apply(this.states,arguments);return this}});f.controller.State=Backbone.Model.extend({constructor:function(){this.on("activate",this._preActivate,this);this.on("activate",this.activate,this);this.on("activate",this._postActivate,this);this.on("deactivate",this._deactivate,this);this.on("deactivate",this.deactivate,this);this.on("reset",this.reset,this);this.on("ready",this._ready,this);this.on("ready",this.ready,this);Backbone.Model.apply(this,arguments);this.on("change:menu",this._updateMenu,this)},ready:function(){},activate:function(){},deactivate:function(){},reset:function(){},_ready:function(){this._updateMenu()},_preActivate:function(){this.active=true},_postActivate:function(){this.on("change:menu",this._menu,this);this.on("change:titleMode",this._title,this);this.on("change:content",this._content,this);this.on("change:toolbar",this._toolbar,this);this.frame.on("title:render:default",this._renderTitle,this);this._title();this._menu();this._toolbar();this._content();this._router()},_deactivate:function(){this.active=false;this.frame.off("title:render:default",this._renderTitle,this);this.off("change:menu",this._menu,this);this.off("change:titleMode",this._title,this);this.off("change:content",this._content,this);this.off("change:toolbar",this._toolbar,this)},_title:function(){this.frame.title.render(this.get("titleMode")||"default")},_renderTitle:function(g){g.$el.text(this.get("title")||"")},_router:function(){var h=this.frame.router,i=this.get("router"),g;this.frame.$el.toggleClass("hide-router",!i);if(!i){return}this.frame.router.render(i);g=h.get();if(g&&g.select){g.select(this.frame.content.mode())}},_menu:function(){var i=this.frame.menu,h=this.get("menu"),g;if(!h){return}i.mode(h);g=i.get();if(g&&g.select){g.select(this.id)}},_updateMenu:function(){var g=this.previous("menu"),h=this.get("menu");if(g){this.frame.off("menu:render:"+g,this._renderMenu,this)}if(h){this.frame.on("menu:render:"+h,this._renderMenu,this)}},_renderMenu:function(g){var i=this.get("menuItem"),j=this.get("title"),h=this.get("priority");if(!i&&j){i={text:j};if(h){i.priority=h}}if(!i){return}g.set(this.id,i)}});_.each(["toolbar","content"],function(g){f.controller.State.prototype["_"+g]=function(){var h=this.get(g);if(h){this.frame[g].render(h)}}});f.controller.Library=f.controller.State.extend({defaults:{id:"library",multiple:false,describe:false,toolbar:"select",sidebar:"settings",content:"upload",router:"browse",menu:"default",searchable:true,filterable:false,sortable:true,title:b.mediaLibraryTitle,contentUserSetting:true,syncSelection:true},initialize:function(){var h=this.get("selection"),g;if(!this.get("library")){this.set("library",f.query())}if(!(h instanceof f.model.Selection)){g=h;if(!g){g=this.get("library").props.toJSON();g=_.omit(g,"orderby","query")}this.set("selection",new f.model.Selection(null,{multiple:this.get("multiple"),props:g}))}if(!this.get("edge")){this.set("edge",120)}if(!this.get("gutter")){this.set("gutter",8)}this.resetDisplays()},activate:function(){this.syncSelection();wp.Uploader.queue.on("add",this.uploading,this);this.get("selection").on("add remove reset",this.refreshContent,this);if(this.get("contentUserSetting")){this.frame.on("content:activate",this.saveContentMode,this);this.set("content",getUserSetting("libraryContent",this.get("content")))}},deactivate:function(){this.recordSelection();this.frame.off("content:activate",this.saveContentMode,this);this.get("selection").off(null,null,this);wp.Uploader.queue.off(null,null,this)},reset:function(){this.get("selection").reset();this.resetDisplays();this.refreshContent()},resetDisplays:function(){var g=f.view.settings.defaultProps;this._displays=[];this._defaultDisplaySettings={align:g.align||getUserSetting("align","none"),size:g.size||getUserSetting("imgsize","medium"),link:g.link||getUserSetting("urlbutton","file")}},display:function(h){var g=this._displays;if(!g[h.cid]){g[h.cid]=new Backbone.Model(this._defaultDisplaySettings)}return g[h.cid]},syncSelection:function(){var h=this.get("selection"),g=this.frame._selection;if(!this.get("syncSelection")||!g||!h){return}if(h.multiple){h.reset([],{silent:true});h.validateAll(g.attachments);g.difference=_.difference(g.attachments.models,h.models)}h.single(g.single)},recordSelection:function(){var i=this.get("selection"),h=this.frame._selection,g;if(!this.get("syncSelection")||!h||!i){return}if(i.multiple){h.attachments.reset(i.toArray().concat(h.difference));h.difference=[]}else{h.attachments.add(i.toArray())}h.single=i._single},refreshContent:function(){var h=this.get("selection"),j=this.frame,g=j.router.get(),i=j.content.mode();if(this.active&&!h.length&&g&&!g.get(i)){this.frame.content.render(this.get("content"))}},uploading:function(h){var g=this.frame.content;if("upload"===g.mode()){this.frame.content.mode("browse")}this.get("selection").add(h)},saveContentMode:function(){if("browse"!==this.get("router")){return}var h=this.frame.content.mode(),g=this.frame.router.get();if(g&&g.get(h)){setUserSetting("libraryContent",h)}}});f.controller.GalleryEdit=f.controller.Library.extend({defaults:{id:"gallery-edit",multiple:false,describe:true,edge:199,editing:false,sortable:true,searchable:false,toolbar:"gallery-edit",content:"browse",title:b.editGalleryTitle,priority:60,dragInfo:true,syncSelection:false},initialize:function(){if(!this.get("library")){this.set("library",new f.model.Selection())}if(!this.get("AttachmentView")){this.set("AttachmentView",f.view.Attachment.EditLibrary)}f.controller.Library.prototype.initialize.apply(this,arguments)},activate:function(){var g=this.get("library");g.props.set("type","image");this.get("library").observe(wp.Uploader.queue);this.frame.on("content:render:browse",this.gallerySettings,this);f.controller.Library.prototype.activate.apply(this,arguments)},deactivate:function(){this.get("library").unobserve(wp.Uploader.queue);this.frame.off("content:render:browse",this.gallerySettings,this);f.controller.Library.prototype.deactivate.apply(this,arguments)},gallerySettings:function(h){var g=this.get("library");if(!g||!h){return}g.gallery=g.gallery||new Backbone.Model();h.sidebar.set({gallery:new f.view.Settings.Gallery({controller:this,model:g.gallery,priority:40})});h.toolbar.set("reverse",{text:b.reverseOrder,priority:80,click:function(){g.reset(g.toArray().reverse())}})}});f.controller.GalleryAdd=f.controller.Library.extend({defaults:_.defaults({id:"gallery-library",filterable:"uploaded",multiple:"add",menu:"gallery",toolbar:"gallery-add",title:b.addToGalleryTitle,priority:100,syncSelection:false},f.controller.Library.prototype.defaults),initialize:function(){if(!this.get("library")){this.set("library",f.query({type:"image"}))}f.controller.Library.prototype.initialize.apply(this,arguments)},activate:function(){var g=this.get("library"),h=this.frame.state("gallery-edit").get("library");if(this.editLibrary&&this.editLibrary!==h){g.unobserve(this.editLibrary)}g.validator=function(i){return !!this.mirroring.get(i.cid)&&!h.get(i.cid)&&f.model.Selection.prototype.validator.apply(this,arguments)};g.reset(g.mirroring.models,{silent:true});g.observe(h);this.editLibrary=h;f.controller.Library.prototype.activate.apply(this,arguments)}});f.controller.FeaturedImage=f.controller.Library.extend({defaults:_.defaults({id:"featured-image",filterable:"uploaded",multiple:false,toolbar:"featured-image",title:b.setFeaturedImageTitle,priority:60,syncSelection:false},f.controller.Library.prototype.defaults),initialize:function(){var h,g;if(!this.get("library")){this.set("library",f.query({type:"image"}))}f.controller.Library.prototype.initialize.apply(this,arguments);h=this.get("library");g=h.comparator;h.comparator=function(j,i){var l=!!this.mirroring.get(j.cid),k=!!this.mirroring.get(i.cid);if(!l&&k){return -1}else{if(l&&!k){return 1}else{return g.apply(this,arguments)}}};h.observe(this.get("selection"))},activate:function(){this.updateSelection();this.frame.on("open",this.updateSelection,this);f.controller.Library.prototype.activate.apply(this,arguments)},deactivate:function(){this.frame.off("open",this.updateSelection,this);f.controller.Library.prototype.deactivate.apply(this,arguments)},updateSelection:function(){var g=this.get("selection"),i=f.view.settings.post.featuredImageId,h;if(""!==i&&-1!==i){h=d.get(i);h.fetch()}g.reset(h?[h]:[])}});f.controller.Embed=f.controller.State.extend({defaults:{id:"embed",url:"",menu:"default",content:"embed",toolbar:"main-embed",type:"link",title:b.insertFromUrlTitle,priority:120},sensitivity:200,initialize:function(){this.debouncedScan=_.debounce(_.bind(this.scan,this),this.sensitivity);this.props=new Backbone.Model({url:""});this.props.on("change:url",this.debouncedScan,this);this.props.on("change:url",this.refresh,this);this.on("scan",this.scanImage,this)},scan:function(){var h,i=this,g={type:"link",scanners:[]};if(this.props.get("url")){this.trigger("scan",g)}if(g.scanners.length){h=g.scanners=e.when.apply(e,g.scanners);h.always(function(){if(i.get("scanners")===h){i.set("loading",false)}})}else{g.scanners=null}g.loading=!!g.scanners;this.set(g)},scanImage:function(h){var l=this.frame,j=this,i=this.props.get("url"),k=new Image(),g=e.Deferred();h.scanners.push(g.promise());k.onload=function(){g.resolve();if(j!==l.state()||i!==j.props.get("url")){return}j.set({type:"image"});j.props.set({width:k.width,height:k.height})};k.onerror=g.reject;k.src=i},refresh:function(){this.frame.toolbar.get().refresh()},reset:function(){this.props.clear().set({url:""});if(this.active){this.refresh()}}});f.Views=function(h,g){this.view=h;this._views=_.isArray(g)?{"":g}:g||{}};f.Views.extend=Backbone.Model.extend;_.extend(f.Views.prototype,{all:function(){return _.flatten(this._views)},get:function(g){g=g||"";return this._views[g]},first:function(g){var h=this.get(g);return h&&h.length?h[0]:null},set:function(g,h,i){var k,j;if(!_.isString(g)){i=h;h=g;g=""}i=i||{};h=_.isArray(h)?h:[h];k=this.get(g);j=h;if(k){if(i.add){if(_.isUndefined(i.at)){j=k.concat(h)}else{j=k;j.splice.apply(j,[i.at,0].concat(h))}}else{_.each(j,function(l){l.__detach=true});_.each(k,function(l){if(l.__detach){l.$el.detach()}else{l.dispose()}});_.each(j,function(l){delete l.__detach})}}this._views[g]=j;_.each(h,function(n){var l=n.Views||f.Views,m=n.views=n.views||new l(n);m.parent=this.view;m.selector=g},this);if(!i.silent){this._attach(g,h,_.extend({ready:this._isReady()},i))}return this},add:function(g,h,i){if(!_.isString(g)){i=h;h=g;g=""}return this.set(g,h,_.extend({add:true},i))},unset:function(g,h,i){var j;if(!_.isString(g)){i=h;h=g;g=""}h=h||[];if(j=this.get(g)){h=_.isArray(h)?h:[h];this._views[g]=h.length?_.difference(j,h):[]}if(!i||!i.silent){_.invoke(h,"dispose")}return this},detach:function(){e(_.pluck(this.all(),"el")).detach();return this},render:function(){var g={ready:this._isReady()};_.each(this._views,function(i,h){this._attach(h,i,g)},this);this.rendered=true;return this},dispose:function(g){if(!g||!g.silent){if(this.parent&&this.parent.views){this.parent.views.unset(this.selector,this.view,{silent:true})}delete this.parent;delete this.selector}_.invoke(this.all(),"dispose");this._views=[];return this},replace:function(g,h){g.html(h);return this},insert:function(h,k,j){var g=j&&j.at,i;if(_.isNumber(g)&&(i=h.children()).length>g){i.eq(g).before(k)}else{h.append(k)}return this},ready:function(){this.view.trigger("ready");_.chain(this.all()).map(function(g){return g.views}).flatten().where({attached:true}).invoke("ready")},_attach:function(g,h,i){var k=g?this.view.$(g):this.view.$el,j;if(!k.length){return this}j=_.chain(h).pluck("views").flatten().value();_.each(j,function(l){if(l.rendered){return}l.view.render();l.rendered=true},this);this[i.add?"insert":"replace"](k,_.pluck(h,"el"),i);_.each(j,function(l){l.attached=true;if(i.ready){l.ready()}},this);return this},_isReady:function(){var g=this.view.el;while(g){if(g===document.body){return true}g=g.parentNode}return false}});f.View=Backbone.View.extend({Views:f.Views,constructor:function(g){this.views=new this.Views(this,this.views);this.on("ready",this.ready,this);if(g&&g.controller){this.controller=g.controller}Backbone.View.apply(this,arguments)},dispose:function(){this.undelegateEvents();if(this.model&&this.model.off){this.model.off(null,null,this)}if(this.collection&&this.collection.off){this.collection.off(null,null,this)}if(this.controller&&this.controller.off){this.controller.off(null,null,this)}if(this.views){this.views.dispose()}return this},remove:function(){this.dispose();return Backbone.View.prototype.remove.apply(this,arguments)},render:function(){var g;if(this.prepare){g=this.prepare()}this.views.detach();if(this.template){g=g||{};this.trigger("prepare",g);this.$el.html(this.template(g))}this.views.render();return this},prepare:function(){return this.options},ready:function(){}});f.view.Frame=f.View.extend({initialize:function(){this._createRegions();this._createStates()},_createRegions:function(){this.regions=this.regions?this.regions.slice():[];_.each(this.regions,function(g){this[g]=new f.controller.Region({view:this,id:g,selector:".media-frame-"+g})},this)},_createStates:function(){this.states=new Backbone.Collection(null,{model:f.controller.State});this.states.on("add",function(g){g.frame=this;g.trigger("ready")},this);if(this.options.states){this.states.add(this.options.states)}},reset:function(){this.states.invoke("trigger","reset");return this}});_.extend(f.view.Frame.prototype,f.controller.StateMachine.prototype);f.view.MediaFrame=f.view.Frame.extend({className:"media-frame",template:f.template("media-frame"),regions:["menu","title","content","toolbar","router"],initialize:function(){f.view.Frame.prototype.initialize.apply(this,arguments);_.defaults(this.options,{title:"",modal:true,uploader:true});this.$el.addClass("wp-core-ui");if(this.options.modal){this.modal=new f.view.Modal({controller:this,title:this.options.title});this.modal.content(this)}if(wp.Uploader.limitExceeded||!wp.Uploader.browser.supported){this.options.uploader=false}if(this.options.uploader){this.uploader=new f.view.UploaderWindow({controller:this,uploader:{dropzone:this.modal?this.modal.$el:this.$el,container:this.$el}});this.views.set(".media-frame-uploader",this.uploader)}this.on("attach",_.bind(this.views.ready,this.views),this);this.on("title:create:default",this.createTitle,this);this.title.mode("default");this.on("menu:create:default",this.createMenu,this)},render:function(){if(!this.state()&&this.options.state){this.setState(this.options.state)}return f.view.Frame.prototype.render.apply(this,arguments)},createTitle:function(g){g.view=new f.View({controller:this,tagName:"h1"})},createMenu:function(g){g.view=new f.view.Menu({controller:this})},createToolbar:function(g){g.view=new f.view.Toolbar({controller:this})},createRouter:function(g){g.view=new f.view.Router({controller:this})},createIframeStates:function(g){var j=f.view.settings,i=j.tabs,k=j.tabUrl,h;if(!i||!k){return}h=e("#post_ID");if(h.length){k+="&post_id="+h.val()}_.each(i,function(m,n){var l=this.state("iframe:"+n).set(_.defaults({tab:n,src:k+"&tab="+n,title:m,content:"iframe",menu:"default"},g))},this);this.on("content:create:iframe",this.iframeContent,this);this.on("menu:render:default",this.iframeMenu,this);this.on("open",this.hijackThickbox,this);this.on("close",this.restoreThickbox,this)},iframeContent:function(g){this.$el.addClass("hide-toolbar");g.view=new f.view.Iframe({controller:this})},iframeMenu:function(h){var g={};if(!h){return}_.each(f.view.settings.tabs,function(i,j){g["iframe:"+j]={text:this.state("iframe:"+j).get("title"),priority:200}},this);h.set(g)},hijackThickbox:function(){var g=this;if(!window.tb_remove||this._tb_remove){return}this._tb_remove=window.tb_remove;window.tb_remove=function(){g.close();g.reset();g.setState(g.options.state);g._tb_remove.call(window)}},restoreThickbox:function(){if(!this._tb_remove){return}window.tb_remove=this._tb_remove;delete this._tb_remove}});_.each(["open","close","attach","detach","escape"],function(g){f.view.MediaFrame.prototype[g]=function(h){if(this.modal){this.modal[g].apply(this.modal,arguments)}return this}});f.view.MediaFrame.Select=f.view.MediaFrame.extend({initialize:function(){f.view.MediaFrame.prototype.initialize.apply(this,arguments);_.defaults(this.options,{selection:[],library:{},multiple:false,state:"library"});this.createSelection();this.createStates();this.bindHandlers()},createSelection:function(){var g=this,h=this.options.selection;if(!(h instanceof f.model.Selection)){this.options.selection=new f.model.Selection(h,{multiple:this.options.multiple})}this._selection={attachments:new c(),difference:[]}},createStates:function(){var g=this.options;if(this.options.states){return}this.states.add([new f.controller.Library({library:f.query(g.library),multiple:g.multiple,title:g.title,priority:20})])},bindHandlers:function(){this.on("router:create:browse",this.createRouter,this);this.on("router:render:browse",this.browseRouter,this);this.on("content:create:browse",this.browseContent,this);this.on("content:render:upload",this.uploadContent,this);this.on("toolbar:create:select",this.createSelectToolbar,this)},browseRouter:function(g){g.set({upload:{text:b.uploadFilesTitle,priority:20},browse:{text:b.mediaLibraryTitle,priority:40}})},browseContent:function(g){var h=this.state();this.$el.removeClass("hide-toolbar");g.view=new f.view.AttachmentsBrowser({controller:this,collection:h.get("library"),selection:h.get("selection"),model:h,sortable:h.get("sortable"),search:h.get("searchable"),filters:h.get("filterable"),display:h.get("displaySettings"),dragInfo:h.get("dragInfo"),AttachmentView:h.get("AttachmentView")})},uploadContent:function(){this.$el.removeClass("hide-toolbar");this.content.set(new f.view.UploaderInline({controller:this}))},createSelectToolbar:function(h,g){g=g||this.options.button||{};g.controller=this;h.view=new f.view.Toolbar.Select(g)}});f.view.MediaFrame.Post=f.view.MediaFrame.Select.extend({initialize:function(){_.defaults(this.options,{multiple:true,editing:false,state:"insert"});f.view.MediaFrame.Select.prototype.initialize.apply(this,arguments);this.createIframeStates()},createStates:function(){var g=this.options;this.states.add([new f.controller.Library({id:"insert",title:b.insertMediaTitle,priority:20,toolbar:"main-insert",filterable:"all",library:f.query(g.library),multiple:g.multiple?"reset":false,editable:true,allowLocalEdits:true,displaySettings:true,displayUserSettings:true}),new f.controller.Library({id:"gallery",title:b.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:false,library:f.query(_.defaults({type:"image"},g.library))}),new f.controller.Embed(),new f.controller.GalleryEdit({library:g.selection,editing:g.editing,menu:"gallery"}),new f.controller.GalleryAdd()]);if(f.view.settings.post.featuredImageId){this.states.add(new f.controller.FeaturedImage())}},bindHandlers:function(){f.view.MediaFrame.Select.prototype.bindHandlers.apply(this,arguments);this.on("menu:create:gallery",this.createMenu,this);this.on("toolbar:create:main-insert",this.createToolbar,this);this.on("toolbar:create:main-gallery",this.createToolbar,this);this.on("toolbar:create:featured-image",this.featuredImageToolbar,this);this.on("toolbar:create:main-embed",this.mainEmbedToolbar,this);var g={menu:{"default":"mainMenu",gallery:"galleryMenu"},content:{embed:"embedContent","edit-selection":"editSelectionContent"},toolbar:{"main-insert":"mainInsertToolbar","main-gallery":"mainGalleryToolbar","gallery-edit":"galleryEditToolbar","gallery-add":"galleryAddToolbar"}};_.each(g,function(i,h){_.each(i,function(k,j){this.on(h+":render:"+j,this[k],this)},this)},this)},mainMenu:function(g){g.set({"library-separator":new f.View({className:"separator",priority:100})})},galleryMenu:function(g){var h=this.lastState(),i=h&&h.id,j=this;g.set({cancel:{text:b.cancelGalleryTitle,priority:20,click:function(){if(i){j.setState(i)}else{j.close()}}},separateCancel:new f.View({className:"separator",priority:40})})},embedContent:function(){var g=new f.view.Embed({controller:this,model:this.state()}).render();this.content.set(g);g.url.focus()},editSelectionContent:function(){var i=this.state(),h=i.get("selection"),g;g=new f.view.AttachmentsBrowser({controller:this,collection:h,selection:h,model:i,sortable:true,search:false,dragInfo:true,AttachmentView:f.view.Attachment.EditSelection}).render();g.toolbar.set("backToLibrary",{text:b.returnToLibrary,priority:-100,click:function(){this.controller.content.mode("browse")}});this.content.set(g)},selectionStatusToolbar:function(g){var h=this.state().get("editable");g.set("selection",new f.view.Selection({controller:this,collection:this.state().get("selection"),priority:-40,editable:h&&function(){this.controller.content.mode("edit-selection")}}).render())},mainInsertToolbar:function(h){var g=this;this.selectionStatusToolbar(h);h.set("insert",{style:"primary",priority:80,text:b.insertIntoPost,requires:{selection:true},click:function(){var j=g.state(),i=j.get("selection");g.close();j.trigger("insert",i).reset()}})},mainGalleryToolbar:function(h){var g=this;this.selectionStatusToolbar(h);h.set("gallery",{style:"primary",text:b.createNewGallery,priority:60,requires:{selection:true},click:function(){var i=g.state().get("selection"),j=g.state("gallery-edit"),k=i.where({type:"image"});j.set("library",new f.model.Selection(k,{props:i.props.toJSON(),multiple:true}));this.controller.setState("gallery-edit")}})},featuredImageToolbar:function(g){this.createSelectToolbar(g,{text:b.setFeaturedImage,state:this.options.state})},mainEmbedToolbar:function(g){g.view=new f.view.Toolbar.Embed({controller:this})},galleryEditToolbar:function(){var g=this.state().get("editing");this.toolbar.set(new f.view.Toolbar({controller:this,items:{insert:{style:"primary",text:g?b.updateGallery:b.insertGallery,priority:80,requires:{library:true},click:function(){var h=this.controller,i=h.state();h.close();i.trigger("update",i.get("library"));h.setState(h.options.state);h.reset()}}}}))},galleryAddToolbar:function(){this.toolbar.set(new f.view.Toolbar({controller:this,items:{insert:{style:"primary",text:b.addToGallery,priority:80,requires:{selection:true},click:function(){var g=this.controller,i=g.state(),h=g.state("gallery-edit");h.get("library").add(i.get("selection").models);i.trigger("reset");g.setState("gallery-edit")}}}}))}});f.view.Modal=f.View.extend({tagName:"div",template:f.template("media-modal"),attributes:{tabindex:0},events:{"click .media-modal-backdrop, .media-modal-close":"escapeHandler",keydown:"keydown"},initialize:function(){_.defaults(this.options,{container:document.body,title:"",propagate:true,freeze:true})},prepare:function(){return{title:this.options.title}},attach:function(){if(this.views.attached){return this}if(!this.views.rendered){this.render()}this.$el.appendTo(this.options.container);this.views.attached=true;this.views.ready();return this.propagate("attach")},detach:function(){if(this.$el.is(":visible")){this.close()}this.$el.detach();this.views.attached=false;return this.propagate("detach")},open:function(){var h=this.$el,g=this.options;if(h.is(":visible")){return this}if(!this.views.attached){this.attach()}if(g.freeze){this._freeze={scrollTop:e(window).scrollTop()}}h.show().focus();return this.propagate("open")},close:function(g){var h=this._freeze;if(!this.views.attached||!this.$el.is(":visible")){return this}this.$el.hide();this.propagate("close");if(h){e(window).scrollTop(h.scrollTop)}if(g&&g.escape){this.propagate("escape")}return this},escape:function(){return this.close({escape:true})},escapeHandler:function(g){g.preventDefault();this.escape()},content:function(g){this.views.set(".media-modal-content",g);return this},propagate:function(g){this.trigger(g);if(this.options.propagate){this.controller.trigger(g)}return this},keydown:function(g){if(27===g.which){g.preventDefault();this.escape();return}}});f.view.FocusManager=f.View.extend({events:{keydown:"recordTab",focusin:"updateIndex"},focus:function(){if(_.isUndefined(this.index)){return}this.$tabbables=this.$(":tabbable");this.$tabbables.eq(this.index).focus()},recordTab:function(h){if(9!==h.keyCode){return}if(_.isUndefined(this.index)){this.updateIndex(h)}if(_.isUndefined(this.index)){return}var g=this.index+(h.shiftKey?-1:1);if(g>=0&&g').hide().appendTo("body");g=this.options.uploader=_.defaults(this.options.uploader||{},{dropzone:this.$el,browser:this.$browser,params:{}});if(g.dropzone&&!(g.dropzone instanceof e)){g.dropzone=e(g.dropzone)}this.controller.on("activate",this.refresh,this)},refresh:function(){if(this.uploader){this.uploader.refresh()}},ready:function(){var h=f.view.settings.post.id,g;if(this.uploader){return}if(h){this.options.uploader.params.post_id=h}this.uploader=new wp.Uploader(this.options.uploader);g=this.uploader.dropzone;g.on("dropzone:enter",_.bind(this.show,this));g.on("dropzone:leave",_.bind(this.hide,this))},show:function(){var g=this.$el.show();_.defer(function(){g.css({opacity:1})})},hide:function(){var g=this.$el.css({opacity:0});f.transition(g).done(function(){if("0"===g.css("opacity")){g.hide()}})}});f.view.UploaderInline=f.View.extend({tagName:"div",className:"uploader-inline",template:f.template("uploader-inline"),initialize:function(){_.defaults(this.options,{message:"",status:true});if(!this.options.$browser&&this.controller.uploader){this.options.$browser=this.controller.uploader.$browser}if(_.isUndefined(this.options.postId)){this.options.postId=f.view.settings.post.id}if(this.options.status){this.views.set(".upload-inline-status",new f.view.UploaderStatus({controller:this.controller}))}},dispose:function(){if(this.disposing){return f.View.prototype.dispose.apply(this,arguments)}this.disposing=true;return this.remove()},remove:function(){var g=f.View.prototype.remove.apply(this,arguments);_.defer(_.bind(this.refresh,this));return g},refresh:function(){var g=this.controller.uploader;if(g){g.refresh()}},ready:function(){var g=this.options.$browser,h;if(this.controller.uploader){h=this.$(".browser");if(h[0]===g[0]){return}g.detach().text(h.text());g[0].className=h[0].className;h.replaceWith(g.show())}this.refresh();return this}});f.view.UploaderStatus=f.View.extend({className:"media-uploader-status",template:f.template("uploader-status"),events:{"click .upload-dismiss-errors":"dismiss"},initialize:function(){this.queue=wp.Uploader.queue;this.queue.on("add remove reset",this.visibility,this);this.queue.on("add remove reset change:percent",this.progress,this);this.queue.on("add remove reset change:uploading",this.info,this);this.errors=wp.Uploader.errors;this.errors.reset();this.errors.on("add remove reset",this.visibility,this);this.errors.on("add",this.error,this)},dispose:function(){wp.Uploader.queue.off(null,null,this);f.View.prototype.dispose.apply(this,arguments);return this},visibility:function(){this.$el.toggleClass("uploading",!!this.queue.length);this.$el.toggleClass("errors",!!this.errors.length);this.$el.toggle(!!this.queue.length||!!this.errors.length)},ready:function(){_.each({"$bar":".media-progress-bar div","$index":".upload-index","$total":".upload-total","$filename":".upload-filename"},function(g,h){this[h]=this.$(g)},this);this.visibility();this.progress();this.info()},progress:function(){var g=this.queue,i=this.$bar,h=0;if(!i||!g.length){return}i.width((g.reduce(function(j,l){if(!l.get("uploading")){return j+100}var k=l.get("percent");return j+(_.isNumber(k)?k:100)},0)/g.length)+"%")},info:function(){var g=this.queue,h=0,i;if(!g.length){return}i=this.queue.find(function(k,j){h=j;return k.get("uploading")});this.$index.text(h+1);this.$total.text(g.length);this.$filename.html(i?this.filename(i.get("filename")):"")},filename:function(g){return f.truncate(_.escape(g),24)},error:function(g){this.views.add(".upload-errors",new f.view.UploaderStatusError({filename:this.filename(g.get("file").name),message:g.get("message")}),{at:0})},dismiss:function(g){var h=this.views.get(".upload-errors");g.preventDefault();if(h){_.invoke(h,"remove")}wp.Uploader.errors.reset()}});f.view.UploaderStatusError=f.View.extend({className:"upload-error",template:f.template("uploader-status-error")});f.view.Toolbar=f.View.extend({tagName:"div",className:"media-toolbar",initialize:function(){var i=this.controller.state(),h=this.selection=i.get("selection"),g=this.library=i.get("library");this._views={};this.primary=new f.view.PriorityList();this.secondary=new f.view.PriorityList();this.primary.$el.addClass("media-toolbar-primary");this.secondary.$el.addClass("media-toolbar-secondary");this.views.set([this.secondary,this.primary]);if(this.options.items){this.set(this.options.items,{silent:true})}if(!this.options.silent){this.render()}if(h){h.on("add remove reset",this.refresh,this)}if(g){g.on("add remove reset",this.refresh,this)}},dispose:function(){if(this.selection){this.selection.off(null,null,this)}if(this.library){this.library.off(null,null,this)}return f.View.prototype.dispose.apply(this,arguments)},ready:function(){this.refresh()},set:function(j,g,h){var i;h=h||{};if(_.isObject(j)){_.each(j,function(k,l){this.set(l,k,{silent:true})},this)}else{if(!(g instanceof Backbone.View)){g.classes=["media-button-"+j].concat(g.classes||[]);g=new f.view.Button(g).render()}g.controller=g.controller||this.controller;this._views[j]=g;i=g.options.priority<0?"secondary":"primary";this[i].set(j,g,h)}if(!h.silent){this.refresh()}return this},get:function(g){return this._views[g]},unset:function(h,g){delete this._views[h];this.primary.unset(h,g);this.secondary.unset(h,g);if(!g||!g.silent){this.refresh()}return this},refresh:function(){var i=this.controller.state(),g=i.get("library"),h=i.get("selection");_.each(this._views,function(j){if(!j.model||!j.options||!j.options.requires){return}var l=j.options.requires,k=false;if(l.selection&&h&&!h.length){k=true}else{if(l.library&&g&&!g.length){k=true}}j.model.set("disabled",k)})}});f.view.Toolbar.Select=f.view.Toolbar.extend({initialize:function(){var h=this.options,g=h.controller,i=g.state().get("selection");_.bindAll(this,"clickSelect");_.defaults(h,{event:"select",state:false,reset:true,close:true,text:b.select,requires:{selection:true}});h.items=_.defaults(h.items||{},{select:{style:"primary",text:h.text,priority:80,click:this.clickSelect,requires:h.requires}});f.view.Toolbar.prototype.initialize.apply(this,arguments)},clickSelect:function(){var h=this.options,g=this.controller;if(h.close){g.close()}if(h.event){g.state().trigger(h.event)}if(h.state){g.setState(h.state)}if(h.reset){g.reset()}}});f.view.Toolbar.Embed=f.view.Toolbar.Select.extend({initialize:function(){_.defaults(this.options,{text:b.insertIntoPost,requires:false});f.view.Toolbar.Select.prototype.initialize.apply(this,arguments)},refresh:function(){var g=this.controller.state().props.get("url");this.get("select").model.set("disabled",!g||g==="http://");f.view.Toolbar.Select.prototype.refresh.apply(this,arguments)}});f.view.Button=f.View.extend({tagName:"a",className:"media-button",attributes:{href:"#"},events:{click:"click"},defaults:{text:"",style:"",size:"large",disabled:false},initialize:function(){this.model=new Backbone.Model(this.defaults);_.each(this.defaults,function(i,g){var h=this.options[g];if(_.isUndefined(h)){return}this.model.set(g,h);delete this.options[g]},this);this.model.on("change",this.render,this)},render:function(){var h=["button",this.className],g=this.model.toJSON();if(g.style){h.push("button-"+g.style)}if(g.size){h.push("button-"+g.size)}h=_.uniq(h.concat(this.options.classes));this.el.className=h.join(" ");this.$el.attr("disabled",g.disabled);this.$el.text(this.model.get("text"));return this},click:function(g){if("#"===this.attributes.href){g.preventDefault()}if(this.options.click&&!this.model.get("disabled")){this.options.click.apply(this,arguments)}}});f.view.ButtonGroup=f.View.extend({tagName:"div",className:"button-group button-large media-button-group",initialize:function(){this.buttons=_.map(this.options.buttons||[],function(g){if(g instanceof Backbone.View){return g}else{return new f.view.Button(g).render()}});delete this.options.buttons;if(this.options.classes){this.$el.addClass(this.options.classes)}},render:function(){this.$el.html(e(_.pluck(this.buttons,"el")).detach());return this}});f.view.PriorityList=f.View.extend({tagName:"div",initialize:function(){this._views={};this.set(_.extend({},this._views,this.options.views),{silent:true});delete this.options.views;if(!this.options.silent){this.render()}},set:function(l,h,j){var k,g,i;j=j||{};if(_.isObject(l)){_.each(l,function(m,n){this.set(n,m)},this);return this}if(!(h instanceof Backbone.View)){h=this.toView(h,l,j)}h.controller=h.controller||this.controller;this.unset(l);k=h.options.priority||10;g=this.views.get()||[];_.find(g,function(n,m){if(n.options.priority>k){i=m;return true}});this._views[l]=h;this.views.add(h,{at:_.isNumber(i)?i:g.length||0});return this},get:function(g){return this._views[g]},unset:function(h){var g=this.get(h);if(g){g.remove()}delete this._views[h];return this},toView:function(g){return new f.View(g)}});f.view.MenuItem=f.View.extend({tagName:"a",className:"media-menu-item",attributes:{href:"#"},events:{click:"_click"},_click:function(g){var h=this.options.click;if(g){g.preventDefault()}if(h){h.call(this)}else{this.click()}},click:function(){var g=this.options.state;if(g){this.controller.setState(g)}},render:function(){var g=this.options;if(g.text){this.$el.text(g.text)}else{if(g.html){this.$el.html(g.html)}}return this}});f.view.Menu=f.view.PriorityList.extend({tagName:"div",className:"media-menu",property:"state",ItemView:f.view.MenuItem,region:"menu",toView:function(g,h){g=g||{};g[this.property]=g[this.property]||h;return new this.ItemView(g).render()},ready:function(){f.view.PriorityList.prototype.ready.apply(this,arguments);this.visibility()},set:function(){f.view.PriorityList.prototype.set.apply(this,arguments);this.visibility()},unset:function(){f.view.PriorityList.prototype.unset.apply(this,arguments);this.visibility()},visibility:function(){var j=this.region,h=this.controller[j].get(),g=this.views.get(),i=!g||g.length<2;if(this===h){this.controller.$el.toggleClass("hide-"+j,i)}},select:function(h){var g=this.get(h);if(!g){return}this.deselect();g.$el.addClass("active")},deselect:function(){this.$el.children().removeClass("active")}});f.view.RouterItem=f.view.MenuItem.extend({click:function(){var g=this.options.contentMode;if(g){this.controller.content.mode(g)}}});f.view.Router=f.view.Menu.extend({tagName:"div",className:"media-router",property:"contentMode",ItemView:f.view.RouterItem,region:"router",initialize:function(){this.controller.on("content:render",this.update,this);f.view.Menu.prototype.initialize.apply(this,arguments)},update:function(){var g=this.controller.content.mode();if(g){this.select(g)}}});f.view.Sidebar=f.view.PriorityList.extend({className:"media-sidebar"});f.view.Attachment=f.View.extend({tagName:"li",className:"attachment",template:f.template("attachment"),events:{"click .attachment-preview":"toggleSelectionHandler","change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .close":"removeFromLibrary","click .check":"removeFromSelection","click a":"preventDefault"},buttons:{},initialize:function(){var g=this.options.selection;this.model.on("change:sizes change:uploading",this.render,this);this.model.on("change:title",this._syncTitle,this);this.model.on("change:caption",this._syncCaption,this);this.model.on("change:percent",this.progress,this);this.model.on("add",this.select,this);this.model.on("remove",this.deselect,this);if(g){g.on("reset",this.updateSelect,this)}this.model.on("selection:single selection:unsingle",this.details,this);this.details(this.model,this.controller.state().get("selection"))},dispose:function(){var g=this.options.selection;this.updateAll();if(g){g.off(null,null,this)}f.View.prototype.dispose.apply(this,arguments);return this},render:function(){var g=_.defaults(this.model.toJSON(),{orientation:"landscape",uploading:false,type:"",subtype:"",icon:"",filename:"",caption:"",title:"",dateFormatted:"",width:"",height:"",compat:false,alt:"",description:""});g.buttons=this.buttons;g.describe=this.controller.state().get("describe");if("image"===g.type){g.size=this.imageSize()}g.can={};if(g.nonces){g.can.remove=!!g.nonces["delete"];g.can.save=!!g.nonces.update}if(this.controller.state().get("allowLocalEdits")){g.allowLocalEdits=true}this.views.detach();this.$el.html(this.template(g));this.$el.toggleClass("uploading",g.uploading);if(g.uploading){this.$bar=this.$(".media-progress-bar div")}else{delete this.$bar}this.updateSelect();this.updateSave();this.views.render();return this},progress:function(){if(this.$bar&&this.$bar.length){this.$bar.width(this.model.get("percent")+"%")}},toggleSelectionHandler:function(g){var h;if(g.shiftKey){h="between"}else{if(g.ctrlKey||g.metaKey){h="toggle"}}this.toggleSelection({method:h})},toggleSelection:function(p){var k=this.collection,l=this.options.selection,j=this.model,g=p&&p.method,m,n,h,i,o;if(!l){return}m=l.single();g=_.isUndefined(g)?l.multiple:g;if("between"===g&&m&&l.multiple){if(m===j){return}i=k.indexOf(m);o=k.indexOf(this.model);if(i").val(h).text(g.text)[0],priority:g.priority||50}},this).sortBy("priority").pluck("el").value());this.model.on("change",this.select,this);this.select()},createFilters:function(){this.filters={}},change:function(h){var g=this.filters[this.el.value];if(g){this.model.set(g.props)}},select:function(){var g=this.model,i="all",h=g.toJSON();_.find(this.filters,function(k,l){var j=_.all(k.props,function(n,m){return n===(_.isUndefined(h[m])?null:h[m])});if(j){return i=l}});this.$el.val(i)}});f.view.AttachmentFilters.Uploaded=f.view.AttachmentFilters.extend({createFilters:function(){var h=this.model.get("type"),g=f.view.settings.mimeTypes,i;if(g&&h){i=g[h]}this.filters={all:{text:i||b.allMediaItems,props:{uploadedTo:null,orderby:"date",order:"DESC"},priority:10},uploaded:{text:b.uploadedToThisPost,props:{uploadedTo:f.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20}}}});f.view.AttachmentFilters.All=f.view.AttachmentFilters.extend({createFilters:function(){var g={};_.each(f.view.settings.mimeTypes||{},function(i,h){g[h]={text:i,props:{type:h,uploadedTo:null,orderby:"date",order:"DESC"}}});g.all={text:b.allMediaItems,props:{type:null,uploadedTo:null,orderby:"date",order:"DESC"},priority:10};g.uploaded={text:b.uploadedToThisPost,props:{type:null,uploadedTo:f.view.settings.post.id,orderby:"menuOrder",order:"ASC"},priority:20};this.filters=g}});f.view.AttachmentsBrowser=f.View.extend({tagName:"div",className:"attachments-browser",initialize:function(){_.defaults(this.options,{filters:false,search:true,display:false,AttachmentView:f.view.Attachment.Library});this.createToolbar();this.updateContent();this.createSidebar();this.collection.on("add remove reset",this.updateContent,this)},dispose:function(){this.options.selection.off(null,null,this);f.View.prototype.dispose.apply(this,arguments);return this},createToolbar:function(){var h,g;this.toolbar=new f.view.Toolbar({controller:this.controller});this.views.add(this.toolbar);h=this.options.filters;if("uploaded"===h){g=f.view.AttachmentFilters.Uploaded}else{if("all"===h){g=f.view.AttachmentFilters.All}}if(g){this.toolbar.set("filters",new g({controller:this.controller,model:this.collection.props,priority:-80}).render())}if(this.options.search){this.toolbar.set("search",new f.view.Search({controller:this.controller,model:this.collection.props,priority:60}).render())}if(this.options.dragInfo){this.toolbar.set("dragInfo",new f.View({el:e('
'+b.dragInfo+"
")[0],priority:-40}))}},updateContent:function(){var g=this;if(!this.attachments){this.createAttachments()}if(!this.collection.length){this.collection.more().done(function(){if(!g.collection.length){g.createUploader()}})}},removeContent:function(){_.each(["attachments","uploader"],function(g){if(this[g]){this[g].remove();delete this[g]}},this)},createUploader:function(){this.removeContent();this.uploader=new f.view.UploaderInline({controller:this.controller,status:false,message:b.noItemsFound});this.views.add(this.uploader)},createAttachments:function(){this.removeContent();this.attachments=new f.view.Attachments({controller:this.controller,collection:this.collection,selection:this.options.selection,model:this.model,sortable:this.options.sortable,AttachmentView:this.options.AttachmentView});this.views.add(this.attachments)},createSidebar:function(){var g=this.options,h=g.selection,i=this.sidebar=new f.view.Sidebar({controller:this.controller});this.views.add(i);if(this.controller.uploader){i.set("uploads",new f.view.UploaderStatus({controller:this.controller,priority:40}))}h.on("selection:single",this.createSingle,this);h.on("selection:unsingle",this.disposeSingle,this);if(h.single()){this.createSingle()}},createSingle:function(){var h=this.sidebar,i=this.options.selection.single(),g={};h.set("details",new f.view.Attachment.Details({controller:this.controller,model:i,priority:80}));h.set("compat",new f.view.AttachmentCompat({controller:this.controller,model:i,priority:120}));if(this.options.display){h.set("display",new f.view.Settings.AttachmentDisplay({controller:this.controller,model:this.model.display(i),attachment:i,priority:160,userSettings:this.model.get("displayUserSettings")}))}},disposeSingle:function(){var g=this.sidebar;g.unset("details");g.unset("compat");g.unset("display")}});f.view.Selection=f.View.extend({tagName:"div",className:"media-selection",template:f.template("media-selection"),events:{"click .edit-selection":"edit","click .clear-selection":"clear"},initialize:function(){_.defaults(this.options,{editable:false,clearable:true});this.attachments=new f.view.Attachments.Selection({controller:this.controller,collection:this.collection,selection:this.collection,model:new Backbone.Model({edge:40,gutter:5})});this.views.set(".selection-view",this.attachments);this.collection.on("add remove reset",this.refresh,this);this.controller.on("content:activate",this.refresh,this)},ready:function(){this.refresh()},refresh:function(){if(!this.$el.children().length){return}var h=this.collection,g="edit-selection"===this.controller.content.mode();this.$el.toggleClass("empty",!h.length);this.$el.toggleClass("one",1===h.length);this.$el.toggleClass("editing",g);this.$(".count").text(b.selected.replace("%d",h.length))},edit:function(g){g.preventDefault();if(this.options.editable){this.options.editable.call(this,this.collection)}},clear:function(g){g.preventDefault();this.collection.reset()}});f.view.Attachment.Selection=f.view.Attachment.extend({className:"attachment selection",toggleSelection:function(){this.options.selection.single(this.model)}});f.view.Attachments.Selection=f.view.Attachments.extend({events:{},initialize:function(){_.defaults(this.options,{sortable:true,resize:false,AttachmentView:f.view.Attachment.Selection});return f.view.Attachments.prototype.initialize.apply(this,arguments)}});f.view.Attachment.EditSelection=f.view.Attachment.Selection.extend({buttons:{close:true}});f.view.Settings=f.View.extend({events:{"click button":"updateHandler","change input":"updateHandler","change select":"updateHandler","change textarea":"updateHandler"},initialize:function(){this.model=this.model||new Backbone.Model();this.model.on("change",this.updateChanges,this)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},render:function(){f.View.prototype.render.apply(this,arguments);_(this.model.attributes).chain().keys().each(this.update,this);return this},update:function(j){var k=this.model.get(j),i=this.$('[data-setting="'+j+'"]'),g,h;if(!i.length){return}if(i.is("select")){h=i.find('[value="'+k+'"]');if(h.length){i.find("option").prop("selected",false);h.prop("selected",true)}else{this.model.set(j,i.find(":selected").val())}}else{if(i.hasClass("button-group")){g=i.find("button").removeClass("active");g.filter('[value="'+k+'"]').addClass("active")}else{if(i.is('input[type="text"], textarea')){if(!i.is(":focus")){i.val(k)}}else{if(i.is('input[type="checkbox"]')){i.attr("checked",!!k)}}}}},updateHandler:function(i){var h=e(i.target).closest("[data-setting]"),j=i.target.value,g;i.preventDefault();if(!h.length){return}if(h.is('input[type="checkbox"]')){j=h[0].checked}this.model.set(h.data("setting"),j);if(g=h.data("userSetting")){setUserSetting(g,j)}},updateChanges:function(h,g){if(h.hasChanged()){_(h.changed).chain().keys().each(this.update,this)}}});f.view.Settings.AttachmentDisplay=f.view.Settings.extend({className:"attachment-display-settings",template:f.template("attachment-display-settings"),initialize:function(){var g=this.options.attachment;_.defaults(this.options,{userSettings:false});f.view.Settings.prototype.initialize.apply(this,arguments);this.model.on("change:link",this.updateLinkTo,this);if(g){g.on("change:uploading",this.render,this)}},dispose:function(){var g=this.options.attachment;if(g){g.off(null,null,this)}f.view.Settings.prototype.dispose.apply(this,arguments)},render:function(){var g=this.options.attachment;if(g){_.extend(this.options,{sizes:g.get("sizes"),type:g.get("type")})}f.view.Settings.prototype.render.call(this);this.updateLinkTo();return this},updateLinkTo:function(){var h=this.model.get("link"),i=this.$(".link-to-custom"),g=this.options.attachment;if("none"===h||(!g&&"custom"!==h)){i.hide();return}if(g){if("post"===h){i.val(g.get("link"))}else{if("file"===h){i.val(g.get("url"))}else{if(!this.model.get("linkUrl")){i.val("http://")}}}i.prop("readonly","custom"!==h)}i.show();if(i.is(":visible")){i.focus()[0].select()}}});f.view.Settings.Gallery=f.view.Settings.extend({className:"gallery-settings",template:f.template("gallery-settings")});f.view.Attachment.Details=f.view.Attachment.extend({tagName:"div",className:"attachment-details",template:f.template("attachment-details"),events:{"change [data-setting]":"updateSetting","change [data-setting] input":"updateSetting","change [data-setting] select":"updateSetting","change [data-setting] textarea":"updateSetting","click .delete-attachment":"deleteAttachment","click .edit-attachment":"editAttachment","click .refresh-attachment":"refreshAttachment"},initialize:function(){this.focusManager=new f.view.FocusManager({el:this.el});f.view.Attachment.prototype.initialize.apply(this,arguments)},render:function(){f.view.Attachment.prototype.render.apply(this,arguments);this.focusManager.focus();return this},deleteAttachment:function(g){g.preventDefault();if(confirm(b.warnDelete)){this.model.destroy()}},editAttachment:function(g){this.$el.addClass("needs-refresh")},refreshAttachment:function(g){this.$el.removeClass("needs-refresh");g.preventDefault();this.model.fetch()}});f.view.AttachmentCompat=f.View.extend({tagName:"form",className:"compat-item",events:{submit:"preventDefault","change input":"save","change select":"save","change textarea":"save"},initialize:function(){this.focusManager=new f.view.FocusManager({el:this.el});this.model.on("change:compat",this.render,this)},dispose:function(){if(this.$(":focus").length){this.save()}return f.View.prototype.dispose.apply(this,arguments)},render:function(){var g=this.model.get("compat");if(!g||!g.item){return}this.views.detach();this.$el.html(g.item);this.views.render();this.focusManager.focus();return this},preventDefault:function(g){g.preventDefault()},save:function(g){var h={};if(g){g.preventDefault()}_.each(this.$el.serializeArray(),function(i){h[i.name]=i.value});this.model.saveCompat(h)}});f.view.Iframe=f.View.extend({className:"media-iframe",render:function(){this.views.detach();this.$el.html(''}c.style.display="none";return j},updateNative:function(a,b){var c=a.htmlMediaElement, -d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}}; -mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="http://www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId, -{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused; -c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]= -a;var b,c="http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML=''}else a.container.innerHTML=''},flashReady:function(a){var b=this.flashPlayers[a],c= -document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false; -c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement; -(function(a,b,c){var d={locale:{strings:{}},methods:{}};d.locale.getLanguage=function(){return{language:navigator.language}};d.locale.INIT_LANGUAGE=d.locale.getLanguage();d.methods.checkPlain=function(e){var g,f,h={"&":"&",'"':""","<":"<",">":">"};e=String(e);for(g in h)if(h.hasOwnProperty(g)){f=RegExp(g,"g");e=e.replace(f,h[g])}return e};d.methods.formatString=function(e,g){for(var f in g){switch(f.charAt(0)){case "@":g[f]=d.methods.checkPlain(g[f]);break;case "!":break;default:g[f]= -''+d.methods.checkPlain(g[f])+""}e=e.replace(f,g[f])}return e};d.methods.t=function(e,g,f){if(d.locale.strings&&d.locale.strings[f.context]&&d.locale.strings[f.context][e])e=d.locale.strings[f.context][e];if(g)e=d.methods.formatString(e,g);return e};d.t=function(e,g,f){if(typeof e==="string"&&e.length>0){var h=d.locale.getLanguage();f=f||{context:h.language};return d.methods.t(e,g,f)}else throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}; -};c.i18n=d})(jQuery,document,mejs);(function(a){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings); - +*/ +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","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(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='x';return b.firstChild.href},getScriptPath:function(h){var e=0,c,k="",a="",f,b=document.getElementsByTagName("script"),g=b.length,d=h.length;for(;e-1){k=f.substring(0,f.indexOf(a));break}}if(k!==""){break}}return k},secondsToTimeCode:function(c,g,a,b){if(typeof a=="undefined"){a=false}else{if(typeof b=="undefined"){b=25}}var f=Math.floor(c/3600)%24,d=Math.floor(c/60)%60,h=Math.floor(c%60),e=Math.floor(((c%1)*b).toFixed(3)),j=((g||f>0)?(f<10?"0"+f:f)+":":"")+(d<10?"0"+d:d)+":"+(h<10?"0"+h:h)+((a)?":"+(e<10?"0"+e:e):"");return j},timeCodeToSeconds:function(c,k,d,e){if(typeof d=="undefined"){d=false}else{if(typeof e=="undefined"){e=25}}var f=c.split(":"),a=parseInt(f[0],10),b=parseInt(f[1],10),h=parseInt(f[2],10),j=0,g=0;if(d){j=parseInt(f[3])/e}g=(a*3600)+(b*60)+h+j;return g},convertSMPTEtoSeconds:function(a){if(typeof a!="string"){return false}a=a.replace(",",".");var d=0,b=(a.indexOf(".")!=-1)?a.split(".")[1].length:0,e=1;a=a.split(":").reverse();for(var c=0;c0){e=Math.pow(60,c)}d+=Number(a[c])*e}return Number(d.toFixed(b))},removeSwf:function(b){var a=document.getElementById(b);if(a&&/object|embed/i.test(a.nodeName)){if(mejs.MediaFeatures.isIE){a.style.display="none";(function(){if(a.readyState==4){mejs.Utility.removeObjectInIE(b)}else{setTimeout(arguments.callee,10)}})()}else{a.parentNode.removeChild(a)}}},removeObjectInIE:function(c){var b=document.getElementById(c);if(b){for(var a in b){if(typeof b[a]=="function"){b[a]=null}}b.parentNode.removeChild(b)}}};mejs.PluginDetector={hasPluginVersion:function(c,a){var b=this.plugins[c];a[1]=a[1]||0;a[2]=a[2]||0;return(b[0]>a[0]||(b[0]==a[0]&&b[1]>a[1])||(b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]))?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(d,c,e,a,b){this.plugins[d]=this.detectPlugin(c,e,a,b)},detectPlugin:function(g,b,c,k){var h=[0,0,0],j,d,a;if(typeof(this.nav.plugins)!="undefined"&&typeof this.nav.plugins[g]=="object"){j=this.nav.plugins[g].description;if(j&&!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){h=j.replace(g,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(d=0;d0){this.removeChild(c[0])}if(typeof a=="string"){this.src=a}else{var b,d;for(b=0;b0&&o[0].url!==null&&this.getTypeFromFile(o[0].url).indexOf("audio")>-1){g.isVideo=false}if(mejs.MediaFeatures.isBustedAndroid){t.canPlayType=function(j){return(j.match(/video\/(mp4|m4v)/gi)!==null)?"maybe":""}}if(h&&(c.mode==="auto"||c.mode==="auto_plugin"||c.mode==="native")){if(!v){w=document.createElement(g.isVideo?"video":"audio");t.parentNode.insertBefore(w,t);t.style.display="none";g.htmlMediaElement=t=w}for(s=0;s0){g.url=o[0].url}return g},formatType:function(a,c){var b;if(a&&!c){return this.getTypeFromFile(a)}else{if(c&&~c.indexOf(";")){return c.substr(0,c.indexOf(";"))}else{return c}}},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1);return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video":"audio")+"/"+this.getTypeFromExtension(b)},getTypeFromExtension:function(a){switch(a){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return a}},createErrorMessage:function(c,b,g){var d=c.htmlMediaElement,a=document.createElement("div");a.className="me-cannotplay";try{a.style.width=d.width+"px";a.style.height=d.height+"px"}catch(f){}a.innerHTML=(g!=="")?'':''+mejs.i18n.t("Download File")+"";d.parentNode.insertBefore(a,d);d.style.display="none";b.error(d)},createPlugin:function(n,a,c,e,d,h){var r=n.htmlMediaElement,m=1,l=1,s="me_"+n.method+"_"+(mejs.meIndex++),o=new mejs.PluginMediaElement(s,n.method,n.url),g=document.createElement("div"),b,p,j;o.tagName=r.tagName;for(var q=0;q0)?a.videoWidth:(r.getAttribute("width")!==null)?r.getAttribute("width"):a.defaultVideoWidth;l=(a.videoHeight>0)?a.videoHeight:(r.getAttribute("height")!==null)?r.getAttribute("height"):a.defaultVideoHeight;m=mejs.Utility.encodeUrl(m);l=mejs.Utility.encodeUrl(l)}else{if(a.enablePluginDebug){m=320;l=240}}o.success=a.success;mejs.MediaPluginBridge.registerPluginElement(s,o,r);g.className="me-plugin";g.id=s+"_container";if(n.isVideo){r.parentNode.insertBefore(g,r)}else{document.body.insertBefore(g,document.body.childNodes[0])}j=["id="+s,"isvideo="+((n.isVideo)?"true":"false"),"autoplay="+((e)?"true":"false"),"preload="+d,"width="+m,"startvolume="+a.startVolume,"timerrate="+a.timerRate,"flashstreamer="+a.flashStreamer,"height="+l];if(n.url!==null){if(n.method=="flash"){j.push("file="+mejs.Utility.encodeUrl(n.url))}else{j.push("file="+n.url)}}if(a.enablePluginDebug){j.push("debug=true")}if(a.enablePluginSmoothing){j.push("smoothing=true")}if(h){j.push("controls=true")}if(a.pluginVars){j=j.concat(a.pluginVars)}switch(n.method){case"silverlight":g.innerHTML='';break;case"flash":if(mejs.MediaFeatures.isIE){b=document.createElement("div");g.appendChild(b);b.outerHTML=''}else{g.innerHTML=''}break;case"youtube":var k=n.url.substr(n.url.lastIndexOf("=")+1);youtubeSettings={container:g,containerId:g.id,pluginMediaElement:o,pluginId:s,videoId:k,height:l,width:m};if(mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])){mejs.YouTubeApi.createFlash(youtubeSettings)}else{mejs.YouTubeApi.enqueueIframe(youtubeSettings)}break;case"vimeo":o.vimeoid=n.url.substr(n.url.lastIndexOf("/")+1);g.innerHTML='';break}r.style.display="none";return o},updateNative:function(d,c,f,b){var e=d.htmlMediaElement,a;for(a in mejs.HtmlMediaElement){e[a]=mejs.HtmlMediaElement[a]}c.success(e,e);return e}};mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="http://www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded){this.createIframe(a)}else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(c){var b=c.pluginMediaElement,a=new YT.Player(c.containerId,{height:c.height,width:c.width,videoId:c.videoId,playerVars:{controls:0},events:{onReady:function(){c.pluginMediaElement.pluginApi=a;mejs.MediaPluginBridge.initPlugin(c.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(a,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,a,b)}}})},createEvent:function(d,c,b){var e={type:b,target:c};if(d&&d.getDuration){c.currentTime=e.currentTime=d.getCurrentTime();c.duration=e.duration=d.getDuration();e.paused=c.paused;e.ended=c.ended;e.muted=d.isMuted();e.volume=d.getVolume()/100;e.bytesTotal=d.getVideoBytesTotal();e.bufferedBytes=d.getVideoBytesLoaded();var a=e.bufferedBytes/e.bytesTotal*e.duration;e.target.buffered=e.buffered={start:function(f){return 0},end:function(f){return a},length:1}}c.dispatchEvent(e.type,e)},iFrameReady:function(){this.isLoaded=true;this.isIframeLoaded=true;while(this.iframeQueue.length>0){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(c){this.flashPlayers[c.pluginId]=c;var b,a="http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+c.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");c.container.appendChild(b);b.outerHTML=''}else{c.container.innerHTML=''}},flashReady:function(e){var c=this.flashPlayers[e],b=document.getElementById(e),a=c.pluginMediaElement;a.pluginApi=a.pluginElement=b;mejs.MediaPluginBridge.initPlugin(e);b.cueVideoById(c.videoId);var d=c.containerId+"_callback";window[d]=function(f){mejs.YouTubeApi.handleStateChange(f,b,a)};b.addEventListener("onStateChange",d);setInterval(function(){mejs.YouTubeApi.createEvent(b,a,"timeupdate")},250)},handleStateChange:function(c,b,a){switch(c){case -1:a.paused=true;a.ended=true;mejs.YouTubeApi.createEvent(b,a,"loadedmetadata");break;case 0:a.paused=false;a.ended=true;mejs.YouTubeApi.createEvent(b,a,"ended");break;case 1:a.paused=false;a.ended=false;mejs.YouTubeApi.createEvent(b,a,"play");mejs.YouTubeApi.createEvent(b,a,"playing");break;case 2:a.paused=true;a.ended=false;mejs.YouTubeApi.createEvent(b,a,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,a,"progress");break;case 5:break}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement; +/*! + * Adds Internationalization and localization to objects. + * + * What is the concept beyond i18n? + * http://en.wikipedia.org/wiki/Internationalization_and_localization + * + * + * This file both i18n methods and locale which is used to translate + * strings into other languages. + * + * Default translations are not available, you have to add them + * through locale objects which are named exactly as the langcode + * they stand for. The default language is always english (en). + * + * + * Wrapper built to be able to attach the i18n object to + * other objects without changing more than one line. + * + * + * LICENSE: + * + * The i18n file uses methods from the Drupal project (drupal.js): + * - i18n.methods.t() (modified) + * - i18n.methods.checkPlain() (full copy) + * - i18n.methods.formatString() (full copy) + * + * The Drupal project is (like mediaelementjs) licensed under GPLv2. + * - http://drupal.org/licensing/faq/#q1 + * - https://github.com/johndyer/mediaelement + * - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * + * + * @author + * Tim Latz (latz.tim@gmail.com) + * + * @see + * me-i18n-locale.js + * + * @params + * - $ - zepto || jQuery .. + * - context - document, iframe .. + * - exports - CommonJS, window .. + * + */ +(function(d,b,a,e){var c={locale:{strings:{}},methods:{}};c.locale.getLanguage=function(){return{language:navigator.language}};c.locale.INIT_LANGUAGE=c.locale.getLanguage();c.methods.checkPlain=function(j){var h,g,f={"&":"&",'"':""","<":"<",">":">"};j=String(j);for(h in f){if(f.hasOwnProperty(h)){g=new RegExp(h,"g");j=j.replace(g,f[h])}}return j};c.methods.formatString=function(h,f){for(var g in f){switch(g.charAt(0)){case"@":f[g]=c.methods.checkPlain(f[g]);break;case"!":break;case"%":default:f[g]=''+c.methods.checkPlain(f[g])+"";break}h=h.replace(g,f[g])}return h};c.methods.t=function(h,g,f){if(c.locale.strings&&c.locale.strings[f.context]&&c.locale.strings[f.context][h]){h=c.locale.strings[f.context][h]}if(g){h=c.methods.formatString(h,g)}return h};c.t=function(j,g,f){if(typeof j==="string"&&j.length>0){var h=c.locale.getLanguage();f=f||{context:h.language};return c.methods.t(j,g,f)}else{throw {name:"InvalidArgumentException",message:"First argument is either not a string or empty."}}};a.i18n=c}(jQuery,document,mejs)); +/*! + * This is a i18n.locale language object. + * + * German translation by Tim Latz, latz.tim@gmail.com + * + * @author + * Tim Latz (latz.tim@gmail.com) + * + * @see + * me-i18n.js + * + * @params + * - exports - CommonJS, window .. + */ +(function(a,b){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schließen"}}(mejs.i18n.locale.strings)); /*! * MediaElementPlayer * http://mediaelementjs.com/ @@ -74,95 +82,5 @@ c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=fals * Copyright 2010-2012, John Dyer (http://j.hn/) * License: MIT * - */if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender; -(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.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(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-0.1,0))}},{keys:[37,227],action:function(a, -b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!="undefined")a.isFullScreen? -a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;mejs.players[this.id]= -this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(e,g){a.meReady(e,g)},error:function(e){a.handleError(e)}}),d=a.media.tagName.toLowerCase();a.isDynamic=d!=="audio"&&d!=="video";a.isVideo=a.isDynamic?a.options.isVideo:d!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls", -"controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('
').addClass(a.$media[0].className).insertBefore(a.$media); -a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";d=b.substring(0, -1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+d+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!== -null?a.$media.attr("height"):a.options["default"+d+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.height;c.pluginHeight=a.width}mejs.MediaElement(a.$media[0],c);a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});b.container.find(".mejs-control").css("visibility","visible").stop(true, -true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(b.controlsAreVisible)if(a){b.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block");b.controlsAreVisible= -false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},controlsTimer:null,startControlsTimer:function(a){var b=this;a=typeof a!="undefined"?a:1500;b.killControlsTimer("start"); -b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);this.controlsEnabled=true},meReady:function(a,b){var c=this,d=mejs.MediaFeatures,e=b.getAttribute("autoplay"); -e=!(typeof e=="undefined"||e===null||e==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(d.isAndroid&&c.options.AndroidUseNativeControls)&&!(d.isiPad&&c.options.iPadUseNativeControls)&&!(d.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);c.findTracks();for(g in c.options.features){d=c.options.features[g];if(c["build"+d])try{c["build"+d](c, -c.controls,c.layers,c.media)}catch(l){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{c.media.addEventListener("click",function(){if(c.options.clickToPlayPause)c.media.paused?c.media.play():c.media.pause()});c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter"); -c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&c.startControlsTimer(1E3)})}c.options.hideVideoControlsOnLoad&&c.hideControls(false);e&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<= -0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var k=mejs.players[j];k.id!=c.id&&c.options.pauseOtherPlayers&&!k.paused&&!k.ended&&k.pause();k.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause(); -c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen|| -mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(e&&a.pluginType=="native"){a.load();a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a, -b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth==="100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,d=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight: -this.options.defaultAudioHeight,e=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(e*d/c,10):d;if(this.container.parent()[0].tagName.toLowerCase()==="body"){e=f(window).width();c=f(window).height()}if(c!=0&&e!=0){this.container.width(e).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(e,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height); -this.layers.children(".mejs-layer").width(this.width).height(this.height)}},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),d=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var e=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){e.each(function(){var g=f(this);if(g.css("position")!="absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)});b=this.controls.width()- -a-(c.outerWidth(true)-c.width())}c.width(b);d.width(b-(d.outerWidth(true)-d.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,d){var e=f('
').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):e.hide();d.addEventListener("play",function(){e.hide()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"), -c=b.find("img");if(c.length==0)c=f('').appendTo(b);c.attr("src",a)},buildoverlays:function(a,b,c,d){var e=this;if(a.isVideo){var g=f('
').hide().appendTo(c),l=f('
').hide().appendTo(c),j=f('
').appendTo(c).click(function(){if(e.options.clickToPlayPause)d.paused? -d.play():d.pause()});d.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();l.hide()},false);d.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();l.hide()},false);d.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()}, -false);d.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);d.addEventListener("canplay",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);d.addEventListener("error",function(){g.hide();b.find(".mejs-time-buffering").hide();l.show();l.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,d){this.globalBind("keydown", -function(e){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,l=a.options.keyActions.length;g').appendTo(b).click(function(g){g.preventDefault();d.paused?d.play():d.pause();return false});d.addEventListener("play",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false); -d.addEventListener("playing",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);d.addEventListener("pause",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false);d.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,d){f('
').appendTo(b).click(function(){d.paused||d.pause();if(d.currentTime>0){d.setCurrentTime(0);d.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left","0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0)); -b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$); -(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,d){f('
00:00
').appendTo(b);b.find(".mejs-time-buffering").hide();var e= -this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var l=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),k=b.find(".mejs-time-float"),s=b.find(".mejs-time-float-current"),p=function(n){n=n.pageX;var h=g.offset(),q=g.outerWidth(true),m=0,o=m=0;if(d.duration){if(nq+h.left)n=q+h.left;o=n-h.left;m=o/q;m=m<=0.02?0:m*d.duration;r&&m!==d.currentTime&&d.setCurrentTime(m);if(!mejs.MediaFeatures.hasTouch){k.css("left",o);s.html(mejs.Utility.secondsToTimeCode(m)); -k.show()}}},r=false;g.bind("mousedown",function(n){if(n.which===1){r=true;p(n);e.globalBind("mousemove.dur",function(h){p(h)});e.globalBind("mouseup.dur",function(){r=false;k.hide();e.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){e.globalBind("mousemove.dur",function(n){p(n)});mejs.MediaFeatures.hasTouch||k.show()}).bind("mouseleave",function(){if(!r){e.globalUnbind(".dur");k.hide()}});d.addEventListener("progress",function(n){a.setProgressRail(n);a.setCurrentRail(n)},false); -d.addEventListener("timeupdate",function(n){a.setProgressRail(n);a.setCurrentRail(n)},false);e.loaded=c;e.total=g;e.current=l;e.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1, -Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,d){f('
'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");d.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a, -b,c,d){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"); -f('
'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");d.addEventListener("timeupdate",function(){a.updateDuration()}, -false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration: -this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,d){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var e=this,g=e.isVideo?e.options.videoVolume:e.options.audioVolume,l=g=="horizontal"?f('
').appendTo(b):f('
').appendTo(b), -j=e.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),k=e.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),s=e.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=e.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),r=function(m,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();r(m,true);j.hide()}else{m=Math.max(0,m);m=Math.min(m,1);m==0?l.removeClass("mejs-mute").addClass("mejs-unmute"):l.removeClass("mejs-unmute").addClass("mejs-mute"); -if(g=="vertical"){var t=k.height(),u=k.position(),v=t-t*m;p.css("top",Math.round(u.top+v-p.height()/2));s.height(t-v);s.css("top",u.top+v)}else{t=k.width();u=k.position();t=t*m;p.css("left",Math.round(u.left+t-p.width()/2));s.width(Math.round(t))}}},n=function(m){var o=null,t=k.offset();if(g=="vertical"){o=k.height();parseInt(k.css("top").replace(/px/,""),10);o=(o-(m.pageY-t.top))/o;if(t.top==0||t.left==0)return}else{o=k.width();o=(m.pageX-t.left)/o}o=Math.max(0,o);o=Math.min(o,1);r(o);o==0?d.setMuted(true): -d.setMuted(false);d.setVolume(o)},h=false,q=false;l.hover(function(){j.show();q=true},function(){q=false;!h&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){q=true}).bind("mousedown",function(m){n(m);e.globalBind("mousemove.vol",function(o){n(o)});e.globalBind("mouseup.vol",function(){h=false;e.globalUnbind(".vol");!q&&g=="vertical"&&j.hide()});h=true;return false});l.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(){if(!h)if(d.muted){r(0); -l.removeClass("mejs-mute").addClass("mejs-unmute")}else{r(d.volume);l.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(e.container.is(":visible")){r(a.options.startVolume);a.options.startVolume===0&&d.setMuted(true);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}}}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,b,c,d){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen= -false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var e=this,g=f('
').appendTo(b);if(e.media.pluginType==="native"||!e.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&& -mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var l=null;if(function(){var h=document.createElement("x"),q=document.documentElement,m=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";q.appendChild(h);m=m&&m(h,"").pointerEvents==="auto";q.removeChild(h);return!!m}()&&!mejs.MediaFeatures.isOpera){var j=false,k=function(){if(j){s.hide();p.hide();r.hide();g.css("pointer-events", -"");e.controls.css("pointer-events","");j=false}},s=f('
').appendTo(e.container).mouseover(k),p=f('
').appendTo(e.container).mouseover(k),r=f('
').appendTo(e.container).mouseover(k),n=function(){var h={position:"absolute",top:0,left:0};s.css(h);p.css(h);r.css(h);s.width(e.container.width()).height(e.container.height()-e.controls.height());h=g.offset().left-e.container.offset().left;fullScreenBtnWidth= -g.outerWidth(true);p.width(h).height(e.controls.height()).css({top:e.container.height()-e.controls.height()});r.width(e.container.width()-h-fullScreenBtnWidth).height(e.controls.height()).css({top:e.container.height()-e.controls.height(),left:h+fullScreenBtnWidth})};e.globalBind("resize",function(){n()});g.mouseover(function(){if(!e.isFullScreen){var h=g.offset(),q=a.container.offset();d.positionFullscreenButton(h.left-q.left,h.top-q.top,false);g.css("pointer-events","none");e.controls.css("pointer-events", -"none");s.show();r.show();p.show();n();j=true}});d.addEventListener("fullscreenchange",function(){k()})}else g.mouseover(function(){if(l!==null){clearTimeout(l);delete l}var h=g.offset(),q=a.container.offset();d.positionFullscreenButton(h.left-q.left,h.top-q.top,true)}).mouseout(function(){if(l!==null){clearTimeout(l);delete l}l=setTimeout(function(){d.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;e.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()|| -e.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()},enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]); -a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!==screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}}, -250);else{a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(), -f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();document.documentElement.style.overflow= -docStyleOverflow;this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find("object embed").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");this.setControlsSize();this.isFullScreen= -false}}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles",hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,d){if(a.isVideo)if(a.tracks.length!=0){a.chapters=f('
').prependTo(c).hide();a.captions=f('
').prependTo(c).hide();a.captionsText= -a.captions.find(".mejs-captions-text");a.captionsButton=f('
').appendTo(b);for(b=c=0;b0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]|| -a;this.captionsButton.find("ul").append(f('
  • "));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+ -this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i=b.entries.times[a].start&& -this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer=="undefined")){var b=this,c=b.slides.entries.text[a],d=b.slides.entries.imgs[a];if(typeof d=="undefined"||typeof d.fadeIn=="undefined")b.slides.entries.imgs[a]= -d=f('').on("load",function(){d.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else if(!d.is(":visible")&&!d.is(":animated")){console.log("showing existing slide");d.fadeIn().siblings(":visible").fadeOut()}}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b=a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}}, -displayChapters:function(){var a;for(a=0;a100||c==a.entries.times.length-1&&d+e<100)d=100-e;b.chapters.append(f('
    '+a.entries.text[c]+''+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"
    "));e+=d}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));b.media.paused&& -b.media.play()});b.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(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},d,e;b$1");c.text.push(e);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(d[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(d[1]), -stop:mejs.Utility.convertSMPTEtoSeconds(d[3]),settings:d[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var d,e;a={text:[],times:[]};if(b.length){e=b.removeAttr("id").get(0).attributes;if(e.length){d={};for(b=0;b$1");a.text.push(e);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],d="",e;for(e=0;e
    ').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isContextMenuEnabled:true, -enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,b){for(var c= -this,d="",e=c.options.contextMenuItems,g=0,l=e.length;g
    ';else{var j=e[g].render(c);if(j!=null)d+='
    '+j+"
    "}c.contextMenu.empty().append(f(d)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var k=f(this),s=parseInt(k.data("itemindex"),10),p=c.options.contextMenuItems[s];typeof p.show!="undefined"&& -p.show(k,c);k.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$); -(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var d=this.container.find('link[rel="postroll"]').attr("href");if(typeof d!=="undefined"){a.postroll=f('').prependTo(c).hide();this.media.addEventListener("ended", -function(){f.ajax({dataType:"html",url:d,success:function(e){c.find(".mejs-postroll-layer-content").html(e)}});a.postroll.show()},false)}}})})(mejs.$); - + */ +if(typeof jQuery!="undefined"){mejs.$=jQuery}else{if(typeof ender!="undefined"){mejs.$=ender}}(function(a){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(b){return(b.duration*0.05)},defaultSeekForwardInterval:function(b){return(b.duration*0.05)},audioWidth:-1,audioHeight:-1,startVolume:0.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(b,c){if(c.paused||c.ended){c.play()}else{c.pause()}}},{keys:[38],action:function(b,d){var c=Math.min(d.volume+0.1,1);d.setVolume(c)}},{keys:[40],action:function(b,d){var c=Math.max(d.volume-0.1,0);d.setVolume(c)}},{keys:[37,227],action:function(b,d){if(!isNaN(d.duration)&&d.duration>0){if(b.isVideo){b.showControls();b.startControlsTimer()}var c=Math.max(d.currentTime-b.options.defaultSeekBackwardInterval(d),0);d.setCurrentTime(c)}}},{keys:[39,228],action:function(b,d){if(!isNaN(d.duration)&&d.duration>0){if(b.isVideo){b.showControls();b.startControlsTimer()}var c=Math.min(d.currentTime+b.options.defaultSeekForwardInterval(d),d.duration);d.setCurrentTime(c)}}},{keys:[70],action:function(b,c){if(typeof b.enterFullScreen!="undefined"){if(b.isFullScreen){b.exitFullScreen()}else{b.enterFullScreen()}}}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(c,d){if(!(this instanceof mejs.MediaElementPlayer)){return new mejs.MediaElementPlayer(c,d)}var b=this;b.$media=b.$node=a(c);b.node=b.media=b.$media[0];if(typeof b.node.player!="undefined"){return b.node.player}else{b.node.player=b}if(typeof d=="undefined"){d=b.$node.data("mejsoptions")}b.options=a.extend({},mejs.MepDefaults,d);b.id="mep_"+mejs.mepIndex++;mejs.players[b.id]=b;b.init();return b};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var d=this,e=mejs.MediaFeatures,h=a.extend(true,{},d.options,{success:function(k,j){d.meReady(k,j)},error:function(j){d.handleError(j)}}),c=d.media.tagName.toLowerCase();d.isDynamic=(c!=="audio"&&c!=="video");if(d.isDynamic){d.isVideo=d.options.isVideo}else{d.isVideo=(c!=="audio"&&d.options.isVideo)}if((e.isiPad&&d.options.iPadUseNativeControls)||(e.isiPhone&&d.options.iPhoneUseNativeControls)){d.$media.attr("controls","controls");if(e.isiPad&&d.media.getAttribute("autoplay")!==null){d.media.load();d.media.play()}}else{if(e.isAndroid&&d.options.AndroidUseNativeControls){}else{d.$media.removeAttr("controls");d.container=a('
    ').addClass(d.$media[0].className).insertBefore(d.$media);d.container.addClass((e.isAndroid?"mejs-android ":"")+(e.isiOS?"mejs-ios ":"")+(e.isiPad?"mejs-ipad ":"")+(e.isiPhone?"mejs-iphone ":"")+(d.isVideo?"mejs-video ":"mejs-audio "));if(e.isiOS){var g=d.$media.clone();d.container.find(".mejs-mediaelement").append(g);d.$media.remove();d.$node=d.$media=g;d.node=d.media=g[0]}else{d.container.find(".mejs-mediaelement").append(d.$media)}d.controls=d.container.find(".mejs-controls");d.layers=d.container.find(".mejs-layers");var f=(d.isVideo?"video":"audio"),b=f.substring(0,1).toUpperCase()+f.substring(1);if(d.options[f+"Width"]>0||d.options[f+"Width"].toString().indexOf("%")>-1){d.width=d.options[f+"Width"]}else{if(d.media.style.width!==""&&d.media.style.width!==null){d.width=d.media.style.width}else{if(d.media.getAttribute("width")!==null){d.width=d.$media.attr("width")}else{d.width=d.options["default"+b+"Width"]}}}if(d.options[f+"Height"]>0||d.options[f+"Height"].toString().indexOf("%")>-1){d.height=d.options[f+"Height"]}else{if(d.media.style.height!==""&&d.media.style.height!==null){d.height=d.media.style.height}else{if(d.$media[0].getAttribute("height")!==null){d.height=d.$media.attr("height")}else{d.height=d.options["default"+b+"Height"]}}}d.setPlayerSize(d.width,d.height);h.pluginWidth=d.height;h.pluginHeight=d.width}}mejs.MediaElement(d.$media[0],h);d.container.trigger("controlsshown")},showControls:function(b){var c=this;b=typeof b=="undefined"||b;if(c.controlsAreVisible){return}if(b){c.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){c.controlsAreVisible=true;c.container.trigger("controlsshown")});c.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){c.controlsAreVisible=true})}else{c.controls.css("visibility","visible").css("display","block");c.container.find(".mejs-control").css("visibility","visible").css("display","block");c.controlsAreVisible=true;c.container.trigger("controlsshown")}c.setControlsSize()},hideControls:function(b){var c=this;b=typeof b=="undefined"||b;if(!c.controlsAreVisible){return}if(b){c.controls.stop(true,true).fadeOut(200,function(){a(this).css("visibility","hidden").css("display","block");c.controlsAreVisible=false;c.container.trigger("controlshidden")});c.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){a(this).css("visibility","hidden").css("display","block")})}else{c.controls.css("visibility","hidden").css("display","block");c.container.find(".mejs-control").css("visibility","hidden").css("display","block");c.controlsAreVisible=false;c.container.trigger("controlshidden")}},controlsTimer:null,startControlsTimer:function(c){var b=this;c=typeof c!="undefined"?c:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},c)},killControlsTimer:function(c){var b=this;if(b.controlsTimer!==null){clearTimeout(b.controlsTimer);delete b.controlsTimer;b.controlsTimer=null}},controlsEnabled:true,disableControls:function(){var b=this;b.killControlsTimer();b.hideControls(false);this.controlsEnabled=false},enableControls:function(){var b=this;b.showControls(false);b.controlsEnabled=true},meReady:function(c,f){var k=this,j=mejs.MediaFeatures,g=f.getAttribute("autoplay"),d=!(typeof g=="undefined"||g===null||g==="false"),b,l;if(k.created){return}else{k.created=true}k.media=c;k.domNode=f;if(!(j.isAndroid&&k.options.AndroidUseNativeControls)&&!(j.isiPad&&k.options.iPadUseNativeControls)&&!(j.isiPhone&&k.options.iPhoneUseNativeControls)){k.buildposter(k,k.controls,k.layers,k.media);k.buildkeyboard(k,k.controls,k.layers,k.media);k.buildoverlays(k,k.controls,k.layers,k.media);k.findTracks();for(b in k.options.features){l=k.options.features[b];if(k["build"+l]){try{k["build"+l](k,k.controls,k.layers,k.media)}catch(h){}}}k.container.trigger("controlsready");k.setPlayerSize(k.width,k.height);k.setControlsSize();if(k.isVideo){if(mejs.MediaFeatures.hasTouch){k.$media.bind("touchstart",function(){if(k.controlsAreVisible){k.hideControls(false)}else{if(k.controlsEnabled){k.showControls(false)}}})}else{k.media.addEventListener("click",function(){if(k.options.clickToPlayPause){if(k.media.paused){k.media.play()}else{k.media.pause()}}});k.container.bind("mouseenter mouseover",function(){if(k.controlsEnabled){if(!k.options.alwaysShowControls){k.killControlsTimer("enter");k.showControls();k.startControlsTimer(2500)}}}).bind("mousemove",function(){if(k.controlsEnabled){if(!k.controlsAreVisible){k.showControls()}if(!k.options.alwaysShowControls){k.startControlsTimer(2500)}}}).bind("mouseleave",function(){if(k.controlsEnabled){if(!k.media.paused&&!k.options.alwaysShowControls){k.startControlsTimer(1000)}}})}if(k.options.hideVideoControlsOnLoad){k.hideControls(false)}if(d&&!k.options.alwaysShowControls){k.hideControls()}if(k.options.enableAutosize){k.media.addEventListener("loadedmetadata",function(m){if(k.options.videoHeight<=0&&k.domNode.getAttribute("height")===null&&!isNaN(m.target.videoHeight)){k.setPlayerSize(m.target.videoWidth,m.target.videoHeight);k.setControlsSize();k.media.setVideoSize(m.target.videoWidth,m.target.videoHeight)}},false)}}c.addEventListener("play",function(){var e;for(e in mejs.players){var m=mejs.players[e];if(m.id!=k.id&&k.options.pauseOtherPlayers&&!m.paused&&!m.ended){m.pause()}m.hasFocus=false}k.hasFocus=true},false);k.media.addEventListener("ended",function(m){if(k.options.autoRewind){try{k.media.setCurrentTime(0)}catch(n){}}k.media.pause();if(k.setProgressRail){k.setProgressRail()}if(k.setCurrentRail){k.setCurrentRail()}if(k.options.loop){k.media.play()}else{if(!k.options.alwaysShowControls&&k.controlsEnabled){k.showControls()}}},false);k.media.addEventListener("loadedmetadata",function(m){if(k.updateDuration){k.updateDuration()}if(k.updateCurrent){k.updateCurrent()}if(!k.isFullScreen){k.setPlayerSize(k.width,k.height);k.setControlsSize()}},false);setTimeout(function(){k.setPlayerSize(k.width,k.height);k.setControlsSize()},50);k.globalBind("resize",function(){if(!(k.isFullScreen||(mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen))){k.setPlayerSize(k.width,k.height)}k.setControlsSize()});if(k.media.pluginType=="youtube"){k.container.find(".mejs-overlay-play").hide()}}if(d&&c.pluginType=="native"){c.load();c.play()}if(k.options.success){if(typeof k.options.success=="string"){window[k.options.success](k.media,k.domNode,k)}else{k.options.success(k.media,k.domNode,k)}}},handleError:function(c){var b=this;b.controls.hide();if(b.options.error){b.options.error(c)}},setPlayerSize:function(g,b){var e=this;if(typeof g!="undefined"){e.width=g}if(typeof b!="undefined"){e.height=b}if(e.height.toString().indexOf("%")>0||e.$node.css("max-width")==="100%"||(e.$node[0].currentStyle&&e.$node[0].currentStyle.maxWidth==="100%")){var h=e.isVideo?((e.media.videoWidth&&e.media.videoWidth>0)?e.media.videoWidth:e.options.defaultVideoWidth):e.options.defaultAudioWidth,d=e.isVideo?((e.media.videoHeight&&e.media.videoHeight>0)?e.media.videoHeight:e.options.defaultVideoHeight):e.options.defaultAudioHeight,f=e.container.parent().closest(":visible").width(),c=e.isVideo||!e.options.autosizeProgress?parseInt(f*d/h,10):d;if(e.container.parent()[0].tagName.toLowerCase()==="body"){f=a(window).width();c=a(window).height()}if(c!=0&&f!=0){e.container.width(f).height(c);e.$media.add(e.container.find(".mejs-shim")).width("100%").height("100%");if(e.isVideo){if(e.media.setVideoSize){e.media.setVideoSize(f,c)}}e.layers.children(".mejs-layer").width("100%").height("100%")}}else{e.container.width(e.width).height(e.height);e.layers.children(".mejs-layer").width(e.width).height(e.height)}},setControlsSize:function(){var c=this,g=0,j=0,h=c.controls.find(".mejs-time-rail"),e=c.controls.find(".mejs-time-total"),f=c.controls.find(".mejs-time-current"),b=c.controls.find(".mejs-time-loaded"),d=h.siblings();if(c.options&&!c.options.autosizeProgress){j=parseInt(h.css("width"))}if(j===0||!j){d.each(function(){var k=a(this);if(k.css("position")!="absolute"&&k.is(":visible")){g+=a(this).outerWidth(true)}});j=c.controls.width()-g-(h.outerWidth(true)-h.width())}h.width(j);e.width(j-(e.outerWidth(true)-e.width()));if(c.setProgressRail){c.setProgressRail()}if(c.setCurrentRail){c.setCurrentRail()}},buildposter:function(e,b,g,f){var d=this,h=a('
    ').appendTo(g),c=e.$media.attr("poster");if(e.options.poster!==""){c=e.options.poster}if(c!==""&&c!=null){d.setPoster(c)}else{h.hide()}f.addEventListener("play",function(){h.hide()},false)},setPoster:function(c){var d=this,e=d.container.find(".mejs-poster"),b=e.find("img");if(b.length==0){b=a('').appendTo(e)}b.attr("src",c)},buildoverlays:function(f,b,h,g){var e=this;if(!f.isVideo){return}var j=a('
    ').hide().appendTo(h),c=a('
    ').hide().appendTo(h),d=a('
    ').appendTo(h).click(function(){if(e.options.clickToPlayPause){if(g.paused){g.play()}else{g.pause()}}});g.addEventListener("play",function(){d.hide();j.hide();b.find(".mejs-time-buffering").hide();c.hide()},false);g.addEventListener("playing",function(){d.hide();j.hide();b.find(".mejs-time-buffering").hide();c.hide()},false);g.addEventListener("seeking",function(){j.show();b.find(".mejs-time-buffering").show()},false);g.addEventListener("seeked",function(){j.hide();b.find(".mejs-time-buffering").hide()},false);g.addEventListener("pause",function(){if(!mejs.MediaFeatures.isiPhone){d.show()}},false);g.addEventListener("waiting",function(){j.show();b.find(".mejs-time-buffering").show()},false);g.addEventListener("loadeddata",function(){j.show();b.find(".mejs-time-buffering").show()},false);g.addEventListener("canplay",function(){j.hide();b.find(".mejs-time-buffering").hide()},false);g.addEventListener("error",function(){j.hide();b.find(".mejs-time-buffering").hide();c.show();c.find("mejs-overlay-error").html("Error loading this resource")},false)},buildkeyboard:function(d,b,f,e){var c=this;c.globalBind("keydown",function(n){if(d.hasFocus&&d.options.enableKeyboard){for(var m=0,g=d.options.keyActions.length;m
    ').appendTo(b).click(function(h){h.preventDefault();if(f.paused){f.play()}else{f.pause()}return false});f.addEventListener("play",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);f.addEventListener("playing",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);f.addEventListener("pause",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false);f.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);(function(a){a.extend(mejs.MepDefaults,{stopText:"Stop"});a.extend(MediaElementPlayer.prototype,{buildstop:function(e,b,g,f){var d=this,c=a('
    ').appendTo(b).click(function(){if(!f.paused){f.pause()}if(f.currentTime>0){f.setCurrentTime(0);f.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left","0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));g.find(".mejs-poster").show()}})}})})(mejs.$);(function(a){a.extend(MediaElementPlayer.prototype,{buildprogress:function(n,o,f,c){a('
    00:00
    ').appendTo(o);o.find(".mejs-time-buffering").hide();var p=this,l=o.find(".mejs-time-total"),g=o.find(".mejs-time-loaded"),k=o.find(".mejs-time-current"),j=o.find(".mejs-time-handle"),m=o.find(".mejs-time-float"),b=o.find(".mejs-time-float-current"),e=function(u){var q=u.pageX,v=l.offset(),s=l.outerWidth(true),r=0,t=0,w=0;if(c.duration){if(qs+v.left){q=s+v.left}}w=q-v.left;r=(w/s);t=(r<=0.02)?0:r*c.duration;if(h&&t!==c.currentTime){c.setCurrentTime(t)}if(!mejs.MediaFeatures.hasTouch){m.css("left",w);b.html(mejs.Utility.secondsToTimeCode(t));m.show()}}},h=false,d=false;l.bind("mousedown",function(q){if(q.which===1){h=true;e(q);p.globalBind("mousemove.dur",function(r){e(r)});p.globalBind("mouseup.dur",function(r){h=false;m.hide();p.globalUnbind(".dur")});return false}}).bind("mouseenter",function(q){d=true;p.globalBind("mousemove.dur",function(r){e(r)});if(!mejs.MediaFeatures.hasTouch){m.show()}}).bind("mouseleave",function(q){d=false;if(!h){p.globalUnbind(".dur");m.hide()}});c.addEventListener("progress",function(q){n.setProgressRail(q);n.setCurrentRail(q)},false);c.addEventListener("timeupdate",function(q){n.setProgressRail(q);n.setCurrentRail(q)},false);p.loaded=g;p.total=l;p.current=k;p.handle=j},setProgressRail:function(f){var b=this,d=(f!=undefined)?f.target:b.media,c=null;if(d&&d.buffered&&d.buffered.length>0&&d.buffered.end&&d.duration){c=d.buffered.end(0)/d.duration}else{if(d&&d.bytesTotal!=undefined&&d.bytesTotal>0&&d.bufferedBytes!=undefined){c=d.bufferedBytes/d.bytesTotal}else{if(f&&f.lengthComputable&&f.total!=0){c=f.loaded/f.total}}}if(c!==null){c=Math.min(1,Math.max(0,c));if(b.loaded&&b.total){b.loaded.width(b.total.width()*c)}}},setCurrentRail:function(){var b=this;if(b.media.currentTime!=undefined&&b.media.duration){if(b.total&&b.handle){var d=Math.round(b.total.width()*b.media.currentTime/b.media.duration),c=d-Math.round(b.handle.outerWidth(true)/2);b.current.width(d);b.handle.css("left",c)}}}})})(mejs.$);(function(a){a.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "});a.extend(MediaElementPlayer.prototype,{buildcurrent:function(d,b,f,e){var c=this;a('
    '+(d.options.alwaysShowHours?"00:":"")+(d.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
    ").appendTo(b);c.currenttime=c.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){d.updateCurrent()},false)},buildduration:function(d,b,f,e){var c=this;if(b.children().last().find(".mejs-currenttime").length>0){a(c.options.timeAndDurationSeparator+''+(c.options.duration>0?mejs.Utility.secondsToTimeCode(c.options.duration,c.options.alwaysShowHours||c.media.duration>3600,c.options.showTimecodeFrameCount,c.options.framesPerSecond||25):((d.options.alwaysShowHours?"00:":"")+(d.options.showTimecodeFrameCount?"00:00:00":"00:00")))+"").appendTo(b.find(".mejs-time"))}else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");a('
    '+(c.options.duration>0?mejs.Utility.secondsToTimeCode(c.options.duration,c.options.alwaysShowHours||c.media.duration>3600,c.options.showTimecodeFrameCount,c.options.framesPerSecond||25):((d.options.alwaysShowHours?"00:":"")+(d.options.showTimecodeFrameCount?"00:00:00":"00:00")))+"
    ").appendTo(b)}c.durationD=c.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){d.updateDuration()},false)},updateCurrent:function(){var b=this;if(b.currenttime){b.currenttime.html(mejs.Utility.secondsToTimeCode(b.media.currentTime,b.options.alwaysShowHours||b.media.duration>3600,b.options.showTimecodeFrameCount,b.options.framesPerSecond||25))}},updateDuration:function(){var b=this;b.container.toggleClass("mejs-long-video",b.media.duration>3600);if(b.durationD&&(b.options.duration>0||b.media.duration)){b.durationD.html(mejs.Utility.secondsToTimeCode(b.options.duration>0?b.options.duration:b.media.duration,b.options.alwaysShowHours,b.options.showTimecodeFrameCount,b.options.framesPerSecond||25))}}})})(mejs.$);(function(a){a.extend(mejs.MepDefaults,{muteText:"Mute Toggle",hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});a.extend(MediaElementPlayer.prototype,{buildvolume:function(n,o,j,d){if(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices){return}var p=this,l=(p.isVideo)?p.options.videoVolume:p.options.audioVolume,f=(l=="horizontal")?a('
    ').appendTo(o):a('
    ').appendTo(o),q=p.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),b=p.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),h=p.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),g=p.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),m=function(w,x){if(!q.is(":visible")&&typeof x=="undefined"){q.show();m(w,true);q.hide();return}w=Math.max(0,w);w=Math.min(w,1);if(w==0){f.removeClass("mejs-mute").addClass("mejs-unmute")}else{f.removeClass("mejs-unmute").addClass("mejs-mute")}if(l=="vertical"){var u=b.height(),t=b.position(),s=u-(u*w);g.css("top",Math.round(t.top+s-(g.height()/2)));h.height(u-s);h.css("top",t.top+s)}else{var r=b.width(),t=b.position(),v=r*w;g.css("left",Math.round(t.left+v-(g.width()/2)));h.width(Math.round(v))}},c=function(w){var u=null,s=b.offset();if(l=="vertical"){var t=b.height(),r=parseInt(b.css("top").replace(/px/,""),10),v=w.pageY-s.top;u=(t-v)/t;if(s.top==0||s.left==0){return}}else{var y=b.width(),x=w.pageX-s.left;u=x/y}u=Math.max(0,u);u=Math.min(u,1);m(u);if(u==0){d.setMuted(true)}else{d.setMuted(false)}d.setVolume(u)},k=false,e=false;f.hover(function(){q.show();e=true},function(){e=false;if(!k&&l=="vertical"){q.hide()}});q.bind("mouseover",function(){e=true}).bind("mousedown",function(r){c(r);p.globalBind("mousemove.vol",function(s){c(s)});p.globalBind("mouseup.vol",function(){k=false;p.globalUnbind(".vol");if(!e&&l=="vertical"){q.hide()}});k=true;return false});f.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(r){if(!k){if(d.muted){m(0);f.removeClass("mejs-mute").addClass("mejs-unmute")}else{m(d.volume);f.removeClass("mejs-unmute").addClass("mejs-mute")}}},false);if(p.container.is(":visible")){m(n.options.startVolume);if(n.options.startVolume===0){d.setMuted(true)}if(d.pluginType==="native"){d.setVolume(n.options.startVolume)}}}})})(mejs.$);(function(a){a.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});a.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(r,q,h,g){if(!r.isVideo){return}r.isInIframe=(window.location!=window.parent.location);if(mejs.MediaFeatures.hasTrueNativeFullScreen){var f=function(t){if(mejs.MediaFeatures.isFullScreen()){r.isNativeFullScreen=true;r.setControlsSize()}else{r.isNativeFullScreen=false;r.exitFullScreen()}};if(mejs.MediaFeatures.hasMozNativeFullScreen){r.globalBind(mejs.MediaFeatures.fullScreenEventName,f)}else{r.container.bind(mejs.MediaFeatures.fullScreenEventName,f)}}var p=this,e=0,c=0,o=r.container,b=a('
    ').appendTo(q);if(p.media.pluginType==="native"||(!p.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)){b.click(function(){var t=(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen())||r.isFullScreen;if(t){r.exitFullScreen()}else{r.enterFullScreen()}})}else{var n=null,j=(function(){var v=document.createElement("x"),w=document.documentElement,x=window.getComputedStyle,t;if(!("pointerEvents" in v.style)){return false}v.style.pointerEvents="auto";v.style.pointerEvents="x";w.appendChild(v);t=x&&x(v,"").pointerEvents==="auto";w.removeChild(v);return !!t})();if(j&&!mejs.MediaFeatures.isOpera){var m=false,s=function(){if(m){k.hide();d.hide();l.hide();b.css("pointer-events","");p.controls.css("pointer-events","");m=false}},k=a('
    ').appendTo(p.container).mouseover(s),d=a('
    ').appendTo(p.container).mouseover(s),l=a('
    ').appendTo(p.container).mouseover(s),u=function(){var v={position:"absolute",top:0,left:0};k.css(v);d.css(v);l.css(v);k.width(p.container.width()).height(p.container.height()-p.controls.height());var t=b.offset().left-p.container.offset().left;fullScreenBtnWidth=b.outerWidth(true);d.width(t).height(p.controls.height()).css({top:p.container.height()-p.controls.height()});l.width(p.container.width()-t-fullScreenBtnWidth).height(p.controls.height()).css({top:p.container.height()-p.controls.height(),left:t+fullScreenBtnWidth})};p.globalBind("resize",function(){u()});b.mouseover(function(){if(!p.isFullScreen){var t=b.offset(),v=r.container.offset();g.positionFullscreenButton(t.left-v.left,t.top-v.top,false);b.css("pointer-events","none");p.controls.css("pointer-events","none");k.show();l.show();d.show();u();m=true}});g.addEventListener("fullscreenchange",function(t){s()})}else{b.mouseover(function(){if(n!==null){clearTimeout(n);delete n}var t=b.offset(),v=r.container.offset();g.positionFullscreenButton(t.left-v.left,t.top-v.top,true)}).mouseout(function(){if(n!==null){clearTimeout(n);delete n}n=setTimeout(function(){g.hideFullscreenButton()},1500)})}}r.fullscreenBtn=b;p.globalBind("keydown",function(t){if(((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen())||p.isFullScreen)&&t.keyCode==27){r.exitFullScreen()}})},cleanfullscreen:function(b){b.exitFullScreen()},enterFullScreen:function(){var c=this;if(c.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||c.options.usePluginFullScreen)){return}docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=c.container.height();normalWidth=c.container.width();if(c.media.pluginType==="native"){if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(c.container[0]);if(c.isInIframe){setTimeout(function d(){if(c.isNativeFullScreen){if(a(window).width()!==screen.width){c.exitFullScreen()}else{setTimeout(d,500)}}},500)}}else{if(mejs.MediaFeatures.hasSemiNativeFullScreen){c.media.webkitEnterFullscreen();return}}}if(c.isInIframe){var b=c.options.newWindowCallback(this);if(b!==""){if(!mejs.MediaFeatures.hasTrueNativeFullScreen){c.pause();window.open(b,c.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}else{setTimeout(function(){if(!c.isNativeFullScreen){c.pause();window.open(b,c.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250)}}}c.container.addClass("mejs-container-fullscreen").width("100%").height("100%");setTimeout(function(){c.container.css({width:"100%",height:"100%"});c.setControlsSize()},500);if(c.pluginType==="native"){c.$media.width("100%").height("100%")}else{c.container.find(".mejs-shim").width("100%").height("100%");c.media.setVideoSize(a(window).width(),a(window).height())}c.layers.children("div").width("100%").height("100%");if(c.fullscreenBtn){c.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen")}c.setControlsSize();c.isFullScreen=true},exitFullScreen:function(){var b=this;if(b.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox){b.media.setFullscreen(false);return}if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||b.isFullScreen)){mejs.MediaFeatures.cancelFullScreen()}document.documentElement.style.overflow=docStyleOverflow;b.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(b.pluginType==="native"){b.$media.width(normalWidth).height(normalHeight)}else{b.container.find("object embed").width(normalWidth).height(normalHeight);b.media.setVideoSize(normalWidth,normalHeight)}b.layers.children("div").width(normalWidth).height(normalHeight);b.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");b.setControlsSize();b.isFullScreen=false}})})(mejs.$);(function(a){a.extend(mejs.MepDefaults,{startLanguage:"",tracksText:"Captions/Subtitles",hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});a.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(f,b,j,h){if(!f.isVideo){return}if(f.tracks.length==0){return}var e=this,d,c="";f.chapters=a('
    ').prependTo(j).hide();f.captions=a('
    ').prependTo(j).hide();f.captionsText=f.captions.find(".mejs-captions-text");f.captionsButton=a('
    ').appendTo(b);var g=0;for(d=0;d0){d.displayChapters(b)}},false)}if(b.kind=="slides"){d.setupSlides(b)}},error:function(){d.loadNextTrack()}})},enableTrackButton:function(d,b){var c=this;if(b===""){b=mejs.language.codes[d]||d}c.captionsButton.find("input[value="+d+"]").prop("disabled",false).siblings("label").html(b);if(c.options.startLanguage==d){a("#"+c.id+"_captions_"+d).click()}c.adjustLanguageBox()},addTrackButton:function(d,b){var c=this;if(b===""){b=mejs.language.codes[d]||d}c.captionsButton.find("ul").append(a('
  • "));c.adjustLanguageBox();c.container.find(".mejs-captions-translations option[value="+d+"]").remove()},adjustLanguageBox:function(){var b=this;b.captionsButton.find(".mejs-captions-selector").height(b.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+b.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var b=this,c=false;if(b.options.hideCaptionsButtonWhenEmpty){for(i=0;i=b.entries.times[c].start&&d.media.currentTime<=b.entries.times[c].stop){d.captionsText.html(b.entries.text[c]);d.captions.show().height(0);return}}d.captions.hide()}else{d.captions.hide()}},setupSlides:function(b){var c=this;c.slides=b;c.slides.entries.imgs=[c.slides.entries.text.length];c.showSlide(0)},showSlide:function(d){if(typeof this.tracks=="undefined"||typeof this.slidesContainer=="undefined"){return}var e=this,c=e.slides.entries.text[d],b=e.slides.entries.imgs[d];if(typeof b=="undefined"||typeof b.fadeIn=="undefined"){e.slides.entries.imgs[d]=b=a('').on("load",function(){b.appendTo(e.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()})}else{if(!b.is(":visible")&&!b.is(":animated")){console.log("showing existing slide");b.fadeIn().siblings(":visible").fadeOut()}}},displaySlides:function(){if(typeof this.slides=="undefined"){return}var c=this,d=c.slides,b;for(b=0;b=d.entries.times[b].start&&c.media.currentTime<=d.entries.times[b].stop){c.showSlide(b);return}}},displayChapters:function(){var c=this,b;for(b=0;b100||b==f.entries.times.length-1&&e+g<100){e=100-g}c.chapters.append(a('
    '+f.entries.text[b]+''+mejs.Utility.secondsToTimeCode(f.entries.times[b].start)+"–"+mejs.Utility.secondsToTimeCode(f.entries.times[b].stop)+"
    "));g+=e}c.chapters.find("div.mejs-chapter").click(function(){c.media.setCurrentTime(parseFloat(a(this).attr("rel")));if(c.media.paused){c.media.play()}});c.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(g){var e=0,d=mejs.TrackFormatParser.split2(g,/\r?\n/),c={text:[],times:[]},b,f;for(;e$1");c.text.push(f);c.times.push({start:(mejs.Utility.convertSMPTEtoSeconds(b[1])==0)?0.2:mejs.Utility.convertSMPTEtoSeconds(b[1]),stop:mejs.Utility.convertSMPTEtoSeconds(b[3]),settings:b[5]})}}}return c}},dfxp:{parse:function(l){l=a(l).filter("tt");var j=0,c=l.children("div").eq(0),p=c.find("p"),h=l.find("#"+c.attr("style")),o,d,f,n,k={text:[],times:[]};if(h.length){var g=h.removeAttr("id").get(0).attributes;if(g.length){o={};for(j=0;j$1");k.text.push(n);if(k.times.start==0){k.times.start=2}}return k}},split2:function(c,b){return c.split(b)}};if("x\n\ny".split(/\n/gi).length!=3){mejs.TrackFormatParser.split2=function(f,d){var e=[],b="",c;for(c=0;c
    ').appendTo(a("body")).hide();c.container.bind("contextmenu",function(f){if(c.isContextMenuEnabled){f.preventDefault();c.renderContextMenu(f.clientX-1,f.clientY-1);return false}});c.container.bind("click",function(){c.contextMenu.hide()});c.contextMenu.bind("mouseleave",function(){c.startContextMenuTimer()})},cleancontextmenu:function(b){b.contextMenu.remove()},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var b=this;b.killContextMenuTimer();b.contextMenuTimer=setTimeout(function(){b.hideContextMenu();b.killContextMenuTimer()},750)},killContextMenuTimer:function(){var b=this.contextMenuTimer;if(b!=null){clearTimeout(b);delete b;b=null}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(b,j){var g=this,f="",d=g.options.contextMenuItems;for(var e=0,c=d.length;e
    '}else{var h=d[e].render(g);if(h!=null){f+='
    '+h+"
    "}}}g.contextMenu.empty().append(a(f)).css({top:j,left:b}).show();g.contextMenu.find(".mejs-contextmenu-item").each(function(){var k=a(this),l=parseInt(k.data("itemindex"),10),m=g.options.contextMenuItems[l];if(typeof m.show!="undefined"){m.show(k,g)}k.click(function(){if(typeof m.click!="undefined"){m.click(g)}g.contextMenu.hide()})});setTimeout(function(){g.killControlsTimer("rev3")},100)}})})(mejs.$);(function(a){a.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});a.extend(MediaElementPlayer.prototype,{buildpostroll:function(e,c,g,f){var d=this,b=d.container.find('link[rel="postroll"]').attr("href");if(typeof b!=="undefined"){e.postroll=a('').prependTo(g).hide();d.media.addEventListener("ended",function(h){a.ajax({dataType:"html",url:b,success:function(j,k){g.find(".mejs-postroll-layer-content").html(j)}});e.postroll.show()},false)}}})})(mejs.$); \ No newline at end of file diff --git a/wp-includes/js/mediaelement/mediaelementplayer.min.css b/wp-includes/js/mediaelement/mediaelementplayer.min.css index dfc1910b31..1bdf3cea32 100644 --- a/wp-includes/js/mediaelement/mediaelementplayer.min.css +++ b/wp-includes/js/mediaelement/mediaelementplayer.min.css @@ -1 +1 @@ -.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;text-indent:0;}.me-plugin{position:absolute;}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden;}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000;}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%;}.mejs-background{position:absolute;top:0;left:0;}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%;}.mejs-poster{position:absolute;top:0;left:0;}.mejs-poster img{border:0;padding:0;border:0;display:block;}.mejs-overlay{position:absolute;top:0;left:0;}.mejs-overlay-play{cursor:pointer;}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.svg) no-repeat;}.no-svg .mejs-overlay-button{background-image:url(bigplay.png);}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px;}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,0.9);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.9)),to(rgba(0,0,0,0.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-moz-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-o-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-ms-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:linear-gradient(rgba(50,50,50,0.9),rgba(0,0,0,0.9));}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat;}.mejs-container .mejs-controls{position:absolute;background:none;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));height:30px;width:100%;}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;background:0;font-family:Helvetica,Arial;border:0;}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.svg) no-repeat;}.no-svg .mejs-controls .mejs-button button{background-image:url(controls.png);}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow;}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:8px 3px 0 3px;overflow:hidden;text-align:center;padding:auto 4px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}.mejs-container .mejs-controls .mejs-time span{font-size:11px;color:#fff;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto;}.mejs-controls .mejs-play button{background-position:0 0;}.mejs-controls .mejs-pause button{background-position:0 -16px;}.mejs-controls .mejs-stop button{background-position:-112px 0;}.mejs-controls div.mejs-time-rail{width:200px;padding-top:5px;}.mejs-controls .mejs-time-rail span{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer;}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite;}@-webkit-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-moz-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-ms-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-o-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(44,124,145,0.8)),to(rgba(78,183,212,0.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-moz-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-o-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-ms-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:linear-gradient(rgba(44,124,145,0.8),rgba(78,183,212,0.8));width:0;}.mejs-controls .mejs-time-rail .mejs-time-current{width:0;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center;}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111;}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0;}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float{width:48px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current{width:44px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner{left:18px;}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px;}.mejs-controls .mejs-mute button{background-position:-16px -16px;}.mejs-controls .mejs-unmute button{background-position:-16px 0;}.mejs-controls .mejs-volume-button{position:relative;}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,0.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0;}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.5);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.9);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,0.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0;}.mejs-controls div.mejs-horizontal-volume-slider{height:26px;width:60px;position:relative;}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none;}.mejs-controls .mejs-captions-button{position:relative;}.mejs-controls .mejs-captions-button button{background-position:-48px 0;}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px 0;}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;z-index:1;}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#323232,endColorstr=#000000);overflow:hidden;border:0;}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer;}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:none;}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(102,102,102,0.7)),to(rgba(50,50,50,0.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-moz-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-o-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-ms-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:linear-gradient(rgba(102,102,102,0.7),rgba(50,50,50,0.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#666666,endColorstr=#323232);}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:bold;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px 0;line-height:12px;}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px 0;display:block;white-space:nowrap;text-overflow:ellipsis;}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:22px;font-size:12px;color:#fff;}.mejs-captions-layer a{color:#fff;text-decoration:underline;}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:normal;}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0;}.mejs-captions-position-hover{bottom:45px;}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,0.8);}.mejs-clear{clear:both;}.me-cannotplay a{color:#fff;font-weight:bold;}.me-cannotplay span{padding:15px;display:block;}.mejs-controls .mejs-loop-off button{background-position:-64px -16px;}.mejs-controls .mejs-loop-on button{background-position:-64px 0;}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on button{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001;}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333;}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333;}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff;}.mejs-controls .mejs-sourcechooser-button{position:relative;}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-postroll-layer{position:absolute;bottom:0;left:0;width:100%;height:100%;background:url(background.png);background:rgba(50,50,50,0.7);z-index:1000;overflow:hidden;}.mejs-postroll-layer-content{width:100%;height:100%;}.mejs-postroll-close{position:absolute;right:0;top:0;background:url(background.png);background:rgba(50,50,50,0.7);color:#fff;padding:4px;z-index:100;cursor:pointer;} \ No newline at end of file +.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;text-indent:0}.me-plugin{position:absolute}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%}.mejs-background{position:absolute;top:0;left:0}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%}.mejs-poster{position:absolute;top:0;left:0}.mejs-poster img{border:0;padding:0;border:0;display:block}.mejs-overlay{position:absolute;top:0;left:0}.mejs-overlay-play{cursor:pointer}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.svg) no-repeat}.no-svg .mejs-overlay-button{background-image:url(bigplay.png)}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,0.9);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.9)),to(rgba(0,0,0,0.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-moz-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-o-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-ms-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:linear-gradient(rgba(50,50,50,0.9),rgba(0,0,0,0.9))}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat}.mejs-container .mejs-controls{position:absolute;background:0;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));height:30px;width:100%}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;background:0;font-family:Helvetica,Arial;border:0}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.svg) no-repeat}.no-svg .mejs-controls .mejs-button button{background-image:url(controls.png)}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:8px 3px 0 3px;overflow:hidden;text-align:center;padding:auto 4px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.mejs-container .mejs-controls .mejs-time span{font-size:11px;color:#fff;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto}.mejs-controls .mejs-play button{background-position:0 0}.mejs-controls .mejs-pause button{background-position:0 -16px}.mejs-controls .mejs-stop button{background-position:-112px 0}.mejs-controls div.mejs-time-rail{width:200px;padding-top:5px}.mejs-controls .mejs-time-rail span{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8))}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite}@-webkit-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-moz-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-ms-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@-o-keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}@keyframes buffering-stripes{from{background-position:0 0}to{background-position:30px 0}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(44,124,145,0.8)),to(rgba(78,183,212,0.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-moz-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-o-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-ms-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:linear-gradient(rgba(44,124,145,0.8),rgba(78,183,212,0.8));width:0}.mejs-controls .mejs-time-rail .mejs-time-current{width:0;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8))}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float{width:48px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current{width:44px}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner{left:18px}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mejs-controls .mejs-mute button{background-position:-16px -16px}.mejs-controls .mejs-unmute button{background-position:-16px 0}.mejs-controls .mejs-volume-button{position:relative}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,0.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.5);margin:0}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.9);margin:0}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,0.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0}.mejs-controls div.mejs-horizontal-volume-slider{height:26px;width:60px;position:relative}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8))}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8))}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none}.mejs-controls .mejs-captions-button{position:relative}.mejs-controls .mejs-captions-button button{background-position:-48px 0}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px 0}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;z-index:1}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#323232,endColorstr=#000000);overflow:hidden;border:0}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:0}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(102,102,102,0.7)),to(rgba(50,50,50,0.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-moz-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-o-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-ms-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:linear-gradient(rgba(102,102,102,0.7),rgba(50,50,50,0.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#666666,endColorstr=#323232)}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:bold;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px 0;line-height:12px}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px 0;display:block;white-space:nowrap;text-overflow:ellipsis}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:22px;font-size:12px;color:#fff}.mejs-captions-layer a{color:#fff;text-decoration:underline}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:normal}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0}.mejs-captions-position-hover{bottom:45px}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,0.8)}.mejs-clear{clear:both}.me-cannotplay a{color:#fff;font-weight:bold}.me-cannotplay span{padding:15px;display:block}.mejs-controls .mejs-loop-off button{background-position:-64px -16px}.mejs-controls .mejs-loop-on button{background-position:-64px 0}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px}.mejs-controls .mejs-backlight-on button{background-position:-80px 0}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2c7c91;color:#fff}.mejs-controls .mejs-sourcechooser-button{position:relative}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px}.mejs-postroll-layer{position:absolute;bottom:0;left:0;width:100%;height:100%;background:url(background.png);background:rgba(50,50,50,0.7);z-index:1000;overflow:hidden}.mejs-postroll-layer-content{width:100%;height:100%}.mejs-postroll-close{position:absolute;right:0;top:0;background:url(background.png);background:rgba(50,50,50,0.7);color:#fff;padding:4px;z-index:100;cursor:pointer} \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index 1528c1012a..427a914c15 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '3.6-beta1-23953'; +$wp_version = '3.6-beta1-23960'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.