/*!
Video.js - HTML5 Video Player
Version GENERATED_AT_BUILD
LGPL v3 LICENSE INFO
This file is part of Video.js. Copyright 2011 Zencoder, Inc.
Video.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Video.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Video.js.  If not, see <http://www.gnu.org/licenses/>.
*/
var VimeoState,Froogaloop;(function(n,t){function e(){return!0}function o(){return!1}var r=n.document,f;r.createElement("video"),r.createElement("audio");var u=function(n,t,r){var u;if(typeof n=="string"){if(n.indexOf("#")===0&&(n=n.slice(1)),i.players[n])return i.players[n];u=i.el(n)}else u=n;if(!u||!u.nodeName)throw new TypeError("The element or ID supplied is not valid. (VideoJS)");return u.player||new i.Player(u,t,r)},i=u,s="GENERATED_CDN_VSN";u.players={},u.options={techOrder:["html5","flash"],html5:{},flash:{swf:"http://vjs.zencdn.net/c/video-js.swf"},width:300,height:150,defaultVolume:0,components:{posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}}},s!="GENERATED_CDN_VSN"&&(i.options.flash.swf="http://vjs.zencdn.net/"+s+"/video-js.swf"),i.merge=function(n,t,i){t||(t={});for(var r in t)!t.hasOwnProperty(r)||i&&n.hasOwnProperty(r)||(n[r]=t[r]);return n},i.extend=function(n){this.merge(this,n,!0)},i.extend({tech:{},controlSets:{},isIE:function(){return!+"\v1"},isFF:function(){return!!i.ua.match("Firefox")},isIPad:function(){return navigator.userAgent.match(/iPad/i)!==null},isIPhone:function(){return navigator.userAgent.match(/iPhone/i)!==null},isIOS:function(){return u.isIPhone()||u.isIPad()},iOSVersion:function(){var n=navigator.userAgent.match(/OS (\d+)_/i);if(n&&n[1])return n[1]},isAndroid:function(){return navigator.userAgent.match(/Android.*AppleWebKit/i)!==null},androidVersion:function(){var n=navigator.userAgent.match(/Android (\d+)\./i);if(n&&n[1])return n[1]},testVid:r.createElement("video"),ua:navigator.userAgent,support:{},each:function(n,t){if(n&&n.length!==0)for(var i=0,r=n.length;i<r;i++)t.call(this,n[i],i)},eachProp:function(n,t){if(n)for(var i in n)n.hasOwnProperty(i)&&t.call(this,i,n[i])},el:function(n){return r.getElementById(n)},createElement:function(n,t){var u=r.createElement(n),i;for(i in t)t.hasOwnProperty(i)&&(i.indexOf("-")!==-1?u.setAttribute(i,t[i]):u[i]=t[i]);return u},insertFirst:function(n,t){t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)},addClass:function(n,t){(" "+n.className+" ").indexOf(" "+t+" ")==-1&&(n.className=n.className===""?t:n.className+" "+t)},removeClass:function(n,t){if(n.className.indexOf(t)!=-1){var i=n.className.split(" ");i.splice(i.indexOf(t),1),n.className=i.join(" ")}},blockTextSelection:function(){r.body.focus(),r.onselectstart=function(){return!1}},unblockTextSelection:function(){r.onselectstart=function(){return!0}},formatTime:function(n,t){t=t||n;var i=Math.floor(n%60),r=Math.floor(n/60%60),u=Math.floor(n/3600),f=Math.floor(t/60%60),e=Math.floor(t/3600);return u=u>0||e>0?u+":":"",r=((u||f>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,u+r+i},uc:function(n){return n.charAt(0).toUpperCase()+n.slice(1)},getRelativePosition:function(n,t){return Math.max(0,Math.min(1,(n-i.findPosX(t))/t.offsetWidth))},getComputedStyleValue:function(t,i){return n.getComputedStyle(t,null).getPropertyValue(i)},trim:function(n){return n.toString().replace(/^\s+/,"").replace(/\s+$/,"")},round:function(n,t){return t||(t=0),Math.round(n*Math.pow(10,t))/Math.pow(10,t)},isEmpty:function(n){for(var t in n)return!1;return!0},createTimeRange:function(n,t){return{length:1,start:function(){return n},end:function(){return t}}},cache:{},guid:1,expando:"vdata"+(new Date).getTime(),getData:function(n){var t=n[i.expando];return t||(t=n[i.expando]=i.guid++,i.cache[t]={}),i.cache[t]},removeData:function(n){var t=n[i.expando];if(t){delete i.cache[t];try{delete n[i.expando]}catch(r){n.removeAttribute?n.removeAttribute(i.expando):n[i.expando]=null}}},proxy:function(n,t,r){t.guid||(t.guid=i.guid++);var u=function(){return t.apply(n,arguments)};return u.guid=r?r+"_"+t.guid:t.guid,u},get:function(t,r,u){var o=t.indexOf("file:")==0||n.location.href.indexOf("file:")==0&&t.indexOf("http:")==-1,f;typeof XMLHttpRequest=="undefined"&&(XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(n){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(i){}throw new Error("This browser does not support XMLHttpRequest.");}),f=new XMLHttpRequest;try{f.open("GET",t)}catch(e){return i.log("VideoJS XMLHttpRequest (open)",e),!1}f.onreadystatechange=i.proxy(this,function(){f.readyState==4&&(f.status==200||o&&f.status==0?r(f.responseText):u&&u())});try{f.send()}catch(e){i.log("VideoJS XMLHttpRequest (send)",e),u&&u(e)}},setLocalStorage:function(t,r){var f=n.localStorage||!1;if(f)try{f[t]=r}catch(u){u.code==22||u.code==1014?i.log("LocalStorage Full (VideoJS)",u):i.log("LocalStorage Error (VideoJS)",u)}},getAbsoluteURL:function(n){return n.match(/^https?:\/\//)||(n=i.createElement("div",{innerHTML:'<a href="'+n+'">x<\/a>'}).firstChild.href),n}}),i.log=function(){if(i.log.history=i.log.history||[],i.log.history.push(arguments),n.console){arguments.callee=arguments.callee.caller;var t=[].slice.call(arguments);typeof console.log=="object"?i.log.apply.call(console.log,console,t):console.log.apply(console,t)}},function(n){function i(){}for(var r="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),t;t=r.pop();)n[t]=n[t]||i}(function(){try{return console.log(),n.console}catch(t){return n.console={}}}()),i.findPosX="getBoundingClientRect"in r.documentElement?function(t){var i;try{i=t.getBoundingClientRect()}catch(s){}if(!i)return 0;var f=r.documentElement,u=r.body,e=f.clientLeft||u.clientLeft||0,o=n.pageXOffset||u.scrollLeft;return i.left+o-e}:function(n){for(var t=n.offsetLeft;n=obj.offsetParent;)n.className.indexOf("video-js")==-1,t+=n.offsetLeft;return t},f||(f={}),function(){var n=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;typeof f.parse!="function"&&(f.parse=function(i,r){function f(n,i){var e,o,u=n[i];if(u&&typeof u=="object")for(e in u)Object.prototype.hasOwnProperty.call(u,e)&&(o=f(u,e),o!==t?u[e]=o:delete u[e]);return r.call(n,i,u)}var u;if(i=String(i),n.lastIndex=0,n.test(i)&&(i=i.replace(n,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(i.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return u=eval("("+i+")"),typeof r=="function"?f({"":u},""):u;throw new SyntaxError("JSON.parse");})}(),i.extend({on:function(n,t,u){var f=i.getData(n),e;f&&!f.handler&&(f.handler=function(t){var f,r,u,e;if(t=i.fixEvent(t),f=i.getData(n).events[t.type],f)for(r=[],i.each(f,function(n,t){r[t]=n}),u=0,e=r.length;u<e;u++)r[u].call(n,t)}),f.events||(f.events={}),e=f.events[t],e||(e=f.events[t]=[],r.addEventListener?n.addEventListener(t,f.handler,!1):r.attachEvent&&n.attachEvent("on"+t,f.handler)),u.guid||(u.guid=i.guid++),e.push(u)},addEvent:function(){return i.on.apply(this,arguments)},off:function(n,t,r){var e=i.getData(n),u,f;if(e.events){if(!t){for(t in e.events)i.cleanUpEvents(n,t);return}if(u=e.events[t],u){if(r&&r.guid)for(f=0;f<u.length;f++)u[f].guid===r.guid&&u.splice(f--,1);i.cleanUpEvents(n,t)}}},removeEvent:function(){return i.off.apply(this,arguments)},cleanUpEvents:function(n,t){var u=i.getData(n);u.events[t].length===0&&(delete u.events[t],r.removeEventListener?n.removeEventListener(t,u.handler,!1):r.detachEvent&&n.detachEvent("on"+t,u.handler)),i.isEmpty(u.events)&&(delete u.events,delete u.handler),i.isEmpty(u)&&i.removeData(n)},fixEvent:function(n){var e,o,s;if(n[i.expando])return n;for(e=n,n=new i.Event(e),o=i.Event.props.length;o;)s=i.Event.props[--o],n[s]=e[s];if(n.target||(n.target=n.srcElement||r),n.target.nodeType===3&&(n.target=n.target.parentNode),!n.relatedTarget&&n.fromElement&&(n.relatedTarget=n.fromElement===n.target?n.toElement:n.fromElement),n.pageX==null&&n.clientX!=null){var h=n.target.ownerDocument||r,u=h.documentElement,f=h.body;n.pageX=n.clientX+(u&&u.scrollLeft||f&&f.scrollLeft||0)-(u&&u.clientLeft||f&&f.clientLeft||0),n.pageY=n.clientY+(u&&u.scrollTop||f&&f.scrollTop||0)-(u&&u.clientTop||f&&f.clientTop||0)}return n.which==null&&(n.charCode!=null||n.keyCode!=null)&&(n.which=n.charCode!=null?n.charCode:n.keyCode),!n.metaKey&&n.ctrlKey&&(n.metaKey=n.ctrlKey),n.which||n.button===t||(n.which=n.button&1?1:n.button&2?3:n.button&4?2:0),n},trigger:function(n,r){var e=i.getData(n),o=n.parentNode||n.ownerDocument,u=r.type||r,f;e&&(f=e.handler),r=typeof r=="object"?r[i.expando]?r:new i.Event(u,r):new i.Event(u),r.type=u,f&&f.call(n,r),r.result=t,r.target=n},triggerEvent:function(){return i.trigger.apply(this,arguments)},one:function(n,t,r){i.on(n,t,function(){i.off(n,t,arguments.callee),r.apply(this,arguments)})}}),i.Event=function(n,t){n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?e:o):this.type=n,t&&i.merge(this,t),this.timeStamp=(new Date).getTime(),this[i.expando]=!0},i.Event.prototype={preventDefault:function(){this.isDefaultPrevented=e;var n=this.originalEvent;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=e;var n=this.originalEvent;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=e,this.stopPropagation()},isDefaultPrevented:o,isPropagationStopped:o,isImmediatePropagationStopped:o},i.Event.props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),function(){var n=!1,t=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;i.Class=function(){},i.Class.extend=function(i){function u(){return!n&&this.init?this.init.apply(this,arguments):n?void 0:arguments.callee.prototype.init()}var e=this.prototype,f,r;n=!0,f=new this,n=!1;for(r in i)f[r]=typeof i[r]=="function"&&typeof e[r]=="function"&&t.test(i[r])?function(n,t){return function(){var r=this._super,i;return this._super=e[n],i=t.apply(this,arguments),this._super=r,i}}(r,i[r]):i[r];return u.prototype=f,u.constructor=u,u.extend=arguments.callee,u}}(),i.Component=i.Class.extend({init:function(n,t){this.player=n,t=this.options=i.merge(this.options||{},t),this.el=t.el?t.el:this.createElement(),this.initComponents()},destroy:function(){},createElement:function(n,t){return i.createElement(n||"div",t)},buildCSSClass:function(){return""},initComponents:function(){var n=this.options;n&&n.components&&this.eachProp(n.components,function(n,t){if(t!==!1){var i=this.proxy(function(){this[n]=this.addComponent(n,t)});if(t.loadEvent)this.one(t.loadEvent,i);else i()}})},addComponent:function(n,t){var r,u;return typeof n=="string"?(t=t||{},u=t.componentClass||i.uc(n),r=new i[u](this.player||this,t)):r=n,this.el.appendChild(r.el),r},removeComponent:function(n){this.el.removeChild(n.el)},show:function(){this.el.style.display="block"},hide:function(){this.el.style.display="none"},fadeIn:function(){this.removeClass("vjs-fade-out"),this.addClass("vjs-fade-in")},fadeOut:function(){this.removeClass("vjs-fade-in"),this.addClass("vjs-fade-out")},lockShowing:function(){var n=this.el.style;n.display="block",n.opacity=1,n.visiblity="visible"},unlockShowing:function(){var n=this.el.style;n.display="",n.opacity="",n.visiblity=""},addClass:function(n){i.addClass(this.el,n)},removeClass:function(n){i.removeClass(this.el,n)},on:function(n,t){i.on(this.el,n,i.proxy(this,t));return this},addEvent:function(){return this.on.apply(this,arguments)},off:function(n,t){return i.off(this.el,n,t),this},removeEvent:function(){return this.off.apply(this,arguments)},trigger:function(n,t){return i.trigger(this.el,n,t),this},triggerEvent:function(){return this.trigger.apply(this,arguments)},one:function(n,t){i.one(this.el,n,i.proxy(this,t));return this},ready:function(n){return n?(this.isReady?n.call(this):(this.readyQueue===t&&(this.readyQueue=[]),this.readyQueue.push(n)),this):this},triggerReady:function(){this.isReady=!0,this.readyQueue&&this.readyQueue.length>0&&(this.each(this.readyQueue,function(n){n.call(this)}),this.readyQueue=[],this.trigger("ready"))},each:function(n,t){i.each.call(this,n,t)},eachProp:function(n,t){i.eachProp.call(this,n,t)},extend:function(n){i.merge(this,n)},proxy:function(n,t){return i.proxy(this,n,t)}}),i.Player=i.Component.extend({init:function(n,t,r){var o,u,h,f,e,s,c;if(this.tag=n,o=this.el=i.createElement("div"),u=this.options={},i.merge(u,i.options),i.merge(u,this.getVideoTagSettings()),i.merge(u,t),n.removeAttribute("controls"),n.removeAttribute("poster"),n.player=o.player=this,n.id=n.id||"vjs_video_"+i.guid++,this.id=o.id=n.id,o.className=n.className,i.players[o.id]=this,this.width(u.width,!0),this.height(u.height,!0),n.id+="_html5_api",n.className="vjs-tech",n.removeAttribute("width"),n.removeAttribute("height"),n.parentNode.insertBefore(o,n),o.appendChild(n),n.hasChildNodes())for(h=n.childNodes.length,f=0,e=n.childNodes;f<h;f++)(e[0].nodeName.toLowerCase()=="source"||e[0].nodeName.toLowerCase()=="track")&&n.removeChild(e[0]);this.values={},this.addClass("vjs-paused");this.on("ended",this.onEnded);this.on("play",this.onPlay);this.on("pause",this.onPause);this.on("progress",this.onProgress);this.on("durationchange",this.onDurationChange);this.on("error",this.onError);if(u.controls&&this.ready(function(){this.initComponents()}),this.ready(r),this.textTracks=[],u.tracks&&u.tracks.length>0&&this.addTextTracks(u.tracks),u.sources&&u.sources.length!=0)this.src(u.sources);else for(f=0,e=u.techOrder;f<e.length;f++)if(s=e[f],c=i[s],c.isSupported()){this.loadTech(s);break}},destroy:function(){this.stopTrackingProgress(),this.stopTrackingCurrentTime(),i.players[this.id]=null,delete i.players[this.id],this.tech.destroy(),this.el.parentNode.removeChild(this.el)},createElement:function(){},getVideoTagSettings:function(){var i={sources:[],tracks:[]},r=this.tag,n="getAttribute",t,u,f;if(i.src=r[n]("src"),i.controls=r[n]("controls")!==null,i.poster=r[n]("poster"),i.preload=r[n]("preload"),i.autoplay=r[n]("autoplay")!==null,i.loop=r[n]("loop")!==null,i.muted=r[n]("muted")!==null,i.width=r[n]("width"),i.height=r[n]("height"),this.tag.hasChildNodes())for(u=0,f=this.tag.childNodes;u<f.length;u++)t=f[u],t.nodeName.toLowerCase()=="source"&&i.sources.push({src:t[n]("src"),type:t[n]("type"),media:t[n]("media"),title:t[n]("title")}),t.nodeName.toLowerCase()=="track"&&i.tracks.push({src:t[n]("src"),kind:t[n]("kind"),srclang:t[n]("srclang"),label:t[n]("label"),"default":t[n]("default")!==null,title:t[n]("title")});return i},loadTech:function(n,t){this.tech?this.unloadTech():n!="html5"&&this.tag&&(this.el.removeChild(this.tag),this.tag=!1),this.techName=n,this.isReady=!1;var u=function(){this.player.triggerReady(),this.support.progressEvent||this.player.manualProgressOn(),this.support.timeupdateEvent||this.player.manualTimeUpdatesOn()},r=i.merge({source:t,parentEl:this.el},this.options[n]);t&&(t.src==this.values.src&&this.values.currentTime>0&&(r.startTime=this.values.currentTime),this.values.src=t.src),this.tech=new i[n](this,r),this.tech.ready(u)},unloadTech:function(){this.tech.destroy(),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),this.tech=!1},manualProgressOn:function(){this.manualProgress=!0,this.trackProgress();this.tech.on("progress",function(){this.removeEvent("progress",arguments.callee),this.support.progressEvent=!0,this.player.manualProgressOff()})},manualProgressOff:function(){this.manualProgress=!1,this.stopTrackingProgress()},trackProgress:function(){this.progressInterval=setInterval(i.proxy(this,function(){this.values.bufferEnd<this.buffered().end(0)?this.trigger("progress"):this.bufferedPercent()==1&&(this.stopTrackingProgress(),this.trigger("progress"))}),500)},stopTrackingProgress:function(){clearInterval(this.progressInterval)},manualTimeUpdatesOn:function(){this.manualTimeUpdates=!0;this.on("play",this.trackCurrentTime);this.on("pause",this.stopTrackingCurrentTime);this.tech.on("timeupdate",function(){this.removeEvent("timeupdate",arguments.callee),this.support.timeupdateEvent=!0,this.player.manualTimeUpdatesOff()})},manualTimeUpdatesOff:function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.removeEvent("play",this.trackCurrentTime),this.removeEvent("pause",this.stopTrackingCurrentTime)},trackCurrentTime:function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=setInterval(i.proxy(this,function(){this.trigger("timeupdate")}),250)},stopTrackingCurrentTime:function(){clearInterval(this.currentTimeInterval)},onEnded:function(){this.options.loop?(this.currentTime(0),this.play()):this.pause()},onPlay:function(){i.removeClass(this.el,"vjs-paused"),i.addClass(this.el,"vjs-playing")},onPause:function(){i.removeClass(this.el,"vjs-playing"),i.addClass(this.el,"vjs-paused")},onProgress:function(){this.bufferedPercent()==1&&this.trigger("loadedalldata")},onDurationChange:function(){this.duration(this.techGet("duration"))},onError:function(n){i.log("Video Error",n)},techCall:function(n,t){if(this.tech.isReady)try{this.tech[n](t)}catch(r){i.log(r)}else this.tech.ready(function(){this[n](t)})},techGet:function(n){if(this.tech.isReady)try{return this.tech[n]()}catch(r){this.tech[n]===t?i.log("Video.js: "+n+" method not defined for "+this.techName+" playback technology.",r):r.name=="TypeError"?(i.log("Video.js: "+n+" unavailable on "+this.techName+" playback technology element.",r),this.tech.isReady=!1):i.log(r)}return},play:function(){return this.techCall("play"),this},pause:function(){return this.techCall("pause"),this},paused:function(){return this.techGet("paused")===!1?!1:!0},currentTime:function(n){return n!==t?(this.values.lastSetCurrentTime=n,this.techCall("setCurrentTime",n),this.manualTimeUpdates&&this.trigger("timeupdate"),this):this.values.currentTime=this.techGet("currentTime")||0},duration:function(n){return n!==t?(this.values.duration=parseFloat(n),this):this.values.duration},remainingTime:function(){return this.duration()-this.currentTime()},buffered:function(){var n=this.techGet("buffered"),t=this.values.bufferEnd=this.values.bufferEnd||0;return n&&n.length>0&&n.end(0)!==t&&(t=n.end(0),this.values.bufferEnd=t),i.createTimeRange(0,t)},bufferedPercent:function(){return this.duration()?this.buffered().end(0)/this.duration():0},volume:function(n){var r;return n!==t?(r=Math.max(0,Math.min(1,parseFloat(n))),this.values.volume=r,this.techCall("setVolume",r),i.setLocalStorage("volume",r),this):(r=parseFloat(this.techGet("volume")),isNaN(r)?1:r)},muted:function(n){return n!==t?(this.techCall("setMuted",n),this):this.techGet("muted")||!1},width:function(n,t){return this.dimension("width",n,t)},height:function(n,t){return this.dimension("height",n,t)},size:function(n,t){return this.width(n,!0).height(t)},dimension:function(n,i,r){return i!==t&&i!==null?(this.el[n]=i,this.el.style[n]=(""+i).indexOf("%")!==-1||i==="auto"?i:i+"px",r||this.trigger("resize"),this):parseInt(this.el.getAttribute(n))},supportsFullScreen:function(){return this.techGet("supportsFullScreen")||!1},requestFullScreen:function(){var n=i.support.requestFullScreen;if(this.isFullScreen=!0,n){i.on(r,n.eventName,this.proxy(function(){this.isFullScreen=r[n.isFullScreen],this.isFullScreen==!1&&i.removeEvent(r,n.eventName,arguments.callee),this.trigger("fullscreenchange")}));if(this.tech.support.fullscreenResize===!1&&this.options.flash.iFrameMode!=!0){this.pause(),this.unloadTech();i.on(r,n.eventName,this.proxy(function(){i.removeEvent(r,n.eventName,arguments.callee),this.loadTech(this.techName,{src:this.values.src})}));this.el[n.requestFn]()}else this.el[n.requestFn]()}else this.tech.supportsFullScreen()?(this.trigger("fullscreenchange"),this.techCall("enterFullScreen")):(this.trigger("fullscreenchange"),this.enterFullWindow());return this},cancelFullScreen:function(){var n=i.support.requestFullScreen;if(this.isFullScreen=!1,n)if(this.tech.support.fullscreenResize===!1&&this.options.flash.iFrameMode!=!0){this.pause(),this.unloadTech();i.on(r,n.eventName,this.proxy(function(){i.removeEvent(r,n.eventName,arguments.callee),this.loadTech(this.techName,{src:this.values.src})}));r[n.cancelFn]()}else r[n.cancelFn]();else this.tech.supportsFullScreen()?(this.techCall("exitFullScreen"),this.trigger("fullscreenchange")):(this.exitFullWindow(),this.trigger("fullscreenchange"));return this},enterFullWindow:function(){this.isFullWindow=!0,this.docOrigOverflow=r.documentElement.style.overflow;i.on(r,"keydown",i.proxy(this,this.fullWindowOnEscKey));r.documentElement.style.overflow="hidden",i.addClass(r.body,"vjs-full-window"),i.addClass(this.el,"vjs-fullscreen"),this.trigger("enterFullWindow")},fullWindowOnEscKey:function(n){n.keyCode==27&&(this.isFullScreen==!0?this.cancelFullScreen():this.exitFullWindow())},exitFullWindow:function(){this.isFullWindow=!1,i.removeEvent(r,"keydown",this.fullWindowOnEscKey),r.documentElement.style.overflow=this.docOrigOverflow,i.removeClass(r.body,"vjs-full-window"),i.removeClass(this.el,"vjs-fullscreen"),this.trigger("exitFullWindow")},selectSource:function(n){for(var f,e,r,o,s,t=0,u=this.options.techOrder;t<u.length;t++)if(f=u[t],e=i[f],e.isSupported())for(r=0,o=n;r<o.length;r++)if(s=o[r],e.canPlaySource.call(this,s))return{source:s,tech:f};return!1},src:function(n){if(n instanceof Array){var t=this.selectSource(n),n,r;t?(n=t.source,r=t.tech,r==this.techName?this.src(n):this.loadTech(r,n)):i.log("No compatible source and playback technology were found.")}else n instanceof Object?i[this.techName].canPlaySource(n)?this.src(n.src):this.src([n]):(this.values.src=n,this.isReady?(this.techCall("src",n),this.options.preload=="auto"&&this.load(),this.options.autoplay&&this.play()):this.ready(function(){this.src(n)}));return this},load:function(){return this.techCall("load"),this},currentSrc:function(){return this.techGet("currentSrc")||this.values.src||""},preload:function(n){return n!==t?(this.techCall("setPreload",n),this.options.preload=n,this):this.techGet("preload")},autoplay:function(n){return n!==t?(this.techCall("setAutoplay",n),this.options.autoplay=n,this):this.techGet("autoplay",n)},loop:function(n){return n!==t?(this.techCall("setLoop",n),this.options.loop=n,this):this.techGet("loop")},controls:function(){return this.options.controls},poster:function(){return this.techGet("poster")},error:function(){return this.techGet("error")},ended:function(){return this.techGet("ended")}}),function(){var n,f,e,u,o=i.Player.prototype;r.cancelFullscreen!==t?(n="requestFullscreen",f="exitFullscreen",e="fullscreenchange",u="fullScreen"):i.each(["moz","webkit"],function(i){(i!="moz"||r.mozFullScreenEnabled)&&r[i+"CancelFullScreen"]!==t&&(n=i+"RequestFullScreen",f=i+"CancelFullScreen",e=i+"fullscreenchange",u=i=="webkit"?i+"IsFullScreen":i+"FullScreen")}),n&&(i.support.requestFullScreen={requestFn:n,cancelFn:f,eventName:e,isFullScreen:u})}(),i.PlaybackTech=i.Component.extend({init:function(){},onClick:function(){this.player.options.controls&&i.PlayToggle.prototype.onClick.call(this)}}),i.apiMethods="play,pause,paused,currentTime,setCurrentTime,duration,buffered,volume,setVolume,muted,setMuted,width,height,supportsFullScreen,enterFullScreen,src,load,currentSrc,preload,setPreload,autoplay,setAutoplay,loop,setLoop,error,networkState,readyState,seeking,initialTime,startOffsetTime,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks,defaultPlaybackRate,playbackRate,mediaGroup,controller,controls,defaultMuted".split(","),i.each(i.apiMethods,function(n){i.PlaybackTech.prototype[n]=function(){throw new Error("The '"+n+"' method is not available on the playback technology's API");}}),i.Control=i.Component.extend({buildCSSClass:function(){return"vjs-control "+this._super()}}),i.ControlBar=i.Component.extend({options:{loadEvent:"play",components:{playToggle:{},fullscreenToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},volumeControl:{},muteToggle:{}}},init:function(n,t){this._super(n,t);n.one("play",this.proxy(function(){this.fadeIn();this.player.on("mouseover",this.proxy(this.fadeIn));this.player.on("mouseout",this.proxy(this.fadeOut))}))},createElement:function(){return i.createElement("div",{className:"vjs-controls"})},fadeIn:function(){this._super(),this.player.trigger("controlsvisible")},fadeOut:function(){this._super(),this.player.trigger("controlshidden")},lockShowing:function(){this.el.style.opacity="1"}}),i.Button=i.Control.extend({init:function(n,t){this._super(n,t);this.on("click",this.onClick);this.on("focus",this.onFocus);this.on("blur",this.onBlur)},createElement:function(n,t){return t=i.merge({className:this.buildCSSClass(),innerHTML:'<div><span class="vjs-control-text">'+(this.buttonText||"Need Text")+"<\/span><\/div>",role:"button",tabIndex:0},t),this._super(n,t)},onClick:function(){},onFocus:function(){i.on(r,"keyup",i.proxy(this,this.onKeyPress))},onKeyPress:function(n){(n.which==32||n.which==13)&&(n.preventDefault(),this.onClick())},onBlur:function(){i.off(r,"keyup",i.proxy(this,this.onKeyPress))}}),i.PlayButton=i.Button.extend({buttonText:"Play",buildCSSClass:function(){return"vjs-play-button "+this._super()},onClick:function(){this.player.play()}}),i.PauseButton=i.Button.extend({buttonText:"Pause",buildCSSClass:function(){return"vjs-pause-button "+this._super()},onClick:function(){this.player.pause()}}),i.PlayToggle=i.Button.extend({buttonText:"Play",init:function(n,t){this._super(n,t);n.on("play",i.proxy(this,this.onPlay));n.on("pause",i.proxy(this,this.onPause))},buildCSSClass:function(){return"vjs-play-control "+this._super()},onClick:function(){this.player.paused()?this.player.play():this.player.pause()},onPlay:function(){i.removeClass(this.el,"vjs-paused"),i.addClass(this.el,"vjs-playing")},onPause:function(){i.removeClass(this.el,"vjs-playing"),i.addClass(this.el,"vjs-paused")}}),i.FullscreenToggle=i.Button.extend({buttonText:"Fullscreen",buildCSSClass:function(){return"vjs-fullscreen-control "+this._super()},onClick:function(){this.player.isFullScreen?(jQuery("body").removeClass("fullscreen-video"),this.player.cancelFullScreen()):(jQuery("body").hasClass("fullscreen-video")||jQuery("body").addClass("fullscreen-video"),this.player.requestFullScreen())}}),i.BigPlayButton=i.Button.extend({init:function(n,t){this._super(n,t);n.on("play",i.proxy(this,this.hide));n.on("ended",i.proxy(this,this.show))},createElement:function(){return this._super("div",{className:"vjs-big-play-button",innerHTML:"<span><\/span>"})},onClick:function(){this.player.currentTime()&&this.player.currentTime(0),this.player.play()}}),i.LoadingSpinner=i.Component.extend({init:function(n,t){this._super(n,t);n.on("canplay",i.proxy(this,this.hide));n.on("canplaythrough",i.proxy(this,this.hide));n.on("playing",i.proxy(this,this.hide));n.on("seeked",i.proxy(this,this.hide));n.addEvent("seeking",i.proxy(this,this.show)),n.addEvent("seeked",i.proxy(this,this.hide)),n.addEvent("error",i.proxy(this,this.show));n.on("waiting",i.proxy(this,this.show))},createElement:function(){var n,t;return typeof this.player.el.style.WebkitBorderRadius=="string"||typeof this.player.el.style.MozBorderRadius=="string"||typeof this.player.el.style.KhtmlBorderRadius=="string"||typeof this.player.el.style.borderRadius=="string"?(n="vjs-loading-spinner",t="<div class='ball1'><\/div><div class='ball2'><\/div><div class='ball3'><\/div><div class='ball4'><\/div><div class='ball5'><\/div><div class='ball6'><\/div><div class='ball7'><\/div><div class='ball8'><\/div>"):(n="vjs-loading-spinner-fallback",t=""),this._super("div",{className:n,innerHTML:t})}}),i.CurrentTimeDisplay=i.Component.extend({init:function(n,t){this._super(n,t);n.on("timeupdate",i.proxy(this,this.updateContent))},createElement:function(){var n=this._super("div",{className:"vjs-current-time vjs-time-controls vjs-control"});return this.content=i.createElement("div",{className:"vjs-current-time-display",innerHTML:"0:00"}),n.appendChild(i.createElement("div").appendChild(this.content)),n},updateContent:function(){var n=this.player.scrubbing?this.player.values.currentTime:this.player.currentTime();this.content.innerHTML=i.formatTime(n,this.player.duration())}}),i.DurationDisplay=i.Component.extend({init:function(n,t){this._super(n,t);n.on("timeupdate",i.proxy(this,this.updateContent))},createElement:function(){var n=this._super("div",{className:"vjs-duration vjs-time-controls vjs-control"});return this.content=i.createElement("div",{className:"vjs-duration-display",innerHTML:"0:00"}),n.appendChild(i.createElement("div").appendChild(this.content)),n},updateContent:function(){this.player.duration()&&(this.content.innerHTML=i.formatTime(this.player.duration()))}}),i.TimeDivider=i.Component.extend({createElement:function(){return this._super("div",{className:"vjs-time-divider",innerHTML:"<div><span>/<\/span><\/div>"})}}),i.RemainingTimeDisplay=i.Component.extend({init:function(n,t){this._super(n,t);n.on("timeupdate",i.proxy(this,this.updateContent))},createElement:function(){var n=this._super("div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});return this.content=i.createElement("div",{className:"vjs-remaining-time-display",innerHTML:"-0:00"}),n.appendChild(i.createElement("div").appendChild(this.content)),n},updateContent:function(){this.player.duration()&&(this.content.innerHTML="-"+i.formatTime(this.player.remainingTime()))}}),i.Slider=i.Component.extend({init:function(n,t){this._super(n,t);n.on(this.playerEvent,i.proxy(this,this.update));this.on("mousedown",this.onMouseDown);this.on("focus",this.onFocus);this.on("blur",this.onBlur);this.player.on("controlsvisible",this.proxy(this.update));this.update()},createElement:function(n,t){return t=i.merge({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},t),this._super(n,t)},onMouseDown:function(n){n.preventDefault(),i.blockTextSelection();i.on(r,"mousemove",i.proxy(this,this.onMouseMove));i.on(r,"mouseup",i.proxy(this,this.onMouseUp));this.onMouseMove(n)},onMouseUp:function(){i.unblockTextSelection(),i.off(r,"mousemove",this.onMouseMove,!1),i.off(r,"mouseup",this.onMouseUp,!1),this.update()},update:function(){var t,n=this.getPercent();if(handle=this.handle,bar=this.bar,isNaN(n)&&(n=0),t=n,handle){var f=this.el,e=f.offsetWidth,r=handle.el.offsetWidth,u=r?r/e:0,o=1-u;adjustedProgress=n*o,t=adjustedProgress+u/2,handle.el.style.left=i.round(adjustedProgress*100,2)+"%"}bar.el.style.width=i.round(t*100,2)+"%"},calculateDistance:function(n){var f=this.el,t=i.findPosX(f),r=f.offsetWidth,e=this.handle,u;return e&&(u=e.el.offsetWidth,t=t+u/2,r=r-u),Math.max(0,Math.min(1,(n.pageX-t)/r))},onFocus:function(){i.on(r,"keyup",i.proxy(this,this.onKeyPress))},onKeyPress:function(n){n.which==37?(n.preventDefault(),this.stepBack()):n.which==39&&(n.preventDefault(),this.stepForward())},onBlur:function(){i.off(r,"keyup",i.proxy(this,this.onKeyPress))}}),i.ProgressControl=i.Component.extend({options:{components:{seekBar:{}}},createElement:function(){return this._super("div",{className:"vjs-progress-control vjs-control"})}}),i.SeekBar=i.Slider.extend({options:{components:{loadProgressBar:{},bar:{componentClass:"PlayProgressBar"},handle:{componentClass:"SeekHandle"}}},playerEvent:"timeupdate",init:function(n,t){this._super(n,t)},createElement:function(){return this._super("div",{className:"vjs-progress-holder"})},getPercent:function(){return this.player.currentTime()/this.player.duration()},onMouseDown:function(n){this._super(n),this.player.scrubbing=!0,this.videoWasPlaying=!this.player.paused(),this.player.pause()},onMouseMove:function(n){var t=this.calculateDistance(n)*this.player.duration();t==this.player.duration()&&(t=t-.1),this.player.currentTime(t)},onMouseUp:function(n){this._super(n),this.player.scrubbing=!1,this.videoWasPlaying&&this.player.play()},stepForward:function(){this.player.currentTime(this.player.currentTime()+1)},stepBack:function(){this.player.currentTime(this.player.currentTime()-1)}}),i.LoadProgressBar=i.Component.extend({init:function(n,t){this._super(n,t);n.on("progress",i.proxy(this,this.update))},createElement:function(){return this._super("div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text">Loaded: 0%<\/span>'})},update:function(){this.el.style&&(this.el.style.width=i.round(this.player.bufferedPercent()*100,2)+"%")}}),i.PlayProgressBar=i.Component.extend({createElement:function(){return this._super("div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text">Progress: 0%<\/span>'})}}),i.SeekHandle=i.Component.extend({createElement:function(){return this._super("div",{className:"vjs-seek-handle",innerHTML:'<span class="vjs-control-text">00:00<\/span>'})}}),i.VolumeControl=i.Component.extend({options:{components:{volumeBar:{}}},createElement:function(){return this._super("div",{className:"vjs-volume-control vjs-control"})}}),i.VolumeBar=i.Slider.extend({options:{components:{bar:{componentClass:"VolumeLevel"},handle:{componentClass:"VolumeHandle"}}},playerEvent:"volumechange",createElement:function(){return this._super("div",{className:"vjs-volume-bar"})},onMouseMove:function(n){this.player.volume(this.calculateDistance(n))},getPercent:function(){return this.player.volume()},stepForward:function(){this.player.volume(this.player.volume()+.1)},stepBack:function(){this.player.volume(this.player.volume()-.1)}}),i.VolumeLevel=i.Component.extend({createElement:function(){return this._super("div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"><\/span>'})}}),i.VolumeHandle=i.Component.extend({createElement:function(){return this._super("div",{className:"vjs-volume-handle",innerHTML:'<span class="vjs-control-text"><\/span>'})}}),i.MuteToggle=i.Button.extend({init:function(n,t){this._super(n,t);n.on("volumechange",i.proxy(this,this.update))},createElement:function(){return this._super("div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">Mute<\/span><\/div>'})},onClick:function(){this.player.muted(this.player.muted()?!1:!0)},update:function(){var t=this.player.volume(),n=3;t==0||this.player.muted()?n=0:t<.33?n=1:t<.67&&(n=2),i.each.call(this,[0,1,2,3],function(n){i.removeClass(this.el,"vjs-vol-"+n)}),i.addClass(this.el,"vjs-vol-"+n)}}),i.PosterImage=i.Button.extend({init:function(n,t){this._super(n,t),this.player.options.poster||this.hide();n.on("play",i.proxy(this,this.hide))},createElement:function(){return i.createElement("img",{className:"vjs-poster",src:this.player.options.poster,tabIndex:-1})},onClick:function(){this.player.play()}}),i.Menu=i.Component.extend({init:function(n,t){this._super(n,t)},addItem:function(n){this.addComponent(n);n.on("click",this.proxy(function(){this.unlockShowing()}))},createElement:function(){return this._super("ul",{className:"vjs-menu"})}}),i.MenuItem=i.Button.extend({init:function(n,t){this._super(n,t),t.selected&&this.addClass("vjs-selected")},createElement:function(n,t){return this._super("li",i.merge({className:"vjs-menu-item",innerHTML:this.options.label},t))},onClick:function(){this.selected(!0)},selected:function(n){n?this.addClass("vjs-selected"):this.removeClass("vjs-selected")}}),i.merge(i.Player.prototype,{addTextTracks:function(n){for(var f=this.textTracks=this.textTracks?this.textTracks:[],r=0,e=n.length,t,u;r<e;r++)u=i.uc(n[r].kind||"subtitles"),t=new i[u+"Track"](this,n[r]),f.push(t),t["default"]&&this.ready(i.proxy(t,t.show));return this},showTextTrack:function(n,t){for(var e=this.textTracks,r=0,o=e.length,i,u,f;r<o;r++)i=e[r],i.id===n?(i.show(),u=i):t&&i.kind==t&&i.mode>0&&i.disable();return f=u?u.kind:t?t:!1,f&&this.trigger(f+"trackchange"),this}}),i.Track=i.Component.extend({init:function(n,t){this._super(n,t),i.merge(this,{id:t.id||"vjs_"+t.kind+"_"+t.language+"_"+i.guid++,src:t.src,"default":t["default"],title:t.title,language:t.srclang,label:t.label,cues:[],activeCues:[],readyState:0,mode:0})},createElement:function(){return this._super("div",{className:"vjs-"+this.kind+" vjs-text-track"})},show:function(){this.activate(),this.mode=2,this._super()},hide:function(){this.activate(),this.mode=1,this._super()},disable:function(){this.mode==2&&this.hide(),this.deactivate(),this.mode=0},activate:function(){if(this.readyState==0&&this.load(),this.mode==0){this.player.on("timeupdate",this.proxy(this.update,this.id));this.player.on("ended",this.proxy(this.reset,this.id));(this.kind=="captions"||this.kind=="subtitles")&&this.player.textTrackDisplay.addComponent(this)}},deactivate:function(){this.player.off("timeupdate",this.proxy(this.update,this.id)),this.player.off("ended",this.proxy(this.reset,this.id)),this.reset(),this.player.textTrackDisplay.removeComponent(this)},load:function(){this.readyState==0&&(this.readyState=1,i.get(this.src,this.proxy(this.parseCues),this.proxy(this.onError)))},onError:function(n){this.error=n,this.readyState=3,this.trigger("error")},parseCues:function(n){for(var u,e,o,f=n.split("\n"),t="",s,r=1,h=f.length;r<h;r++)if(t=i.trim(f[r]),t){for(t.indexOf("-->")==-1?(s=t,t=i.trim(f[++r])):s=this.cues.length,u={id:s,index:this.cues.length},e=t.split(" --> "),u.startTime=this.parseCueTime(e[0]),u.endTime=this.parseCueTime(e[1]),o=[];f[++r]&&(t=i.trim(f[r]));)o.push(t);u.text=o.join("<br/>"),this.cues.push(u)}this.readyState=2,this.trigger("loaded")},parseCueTime:function(n){var i=n.split(":"),r=0,f,e,u,t,o;return i.length==3?(f=i[0],e=i[1],u=i[2]):(f=0,e=i[0],u=i[1]),u=u.split(/\s+/),t=u.splice(0,1)[0],t=t.split(/\.|,/),o=parseFloat(t[1]),t=t[0],r+=parseFloat(f)*3600,r+=parseFloat(e)*60,r+=parseFloat(t),o&&(r+=o/1e3),r},update:function(){var r;if(this.cues.length>0&&(r=this.player.currentTime(),this.prevChange===t||r<this.prevChange||this.nextChange<=r)){var h=this.cues,u=this.player.duration(),f=0,e=!1,c=[],o,s,n,i;for(r>=this.nextChange||this.nextChange===t?i=this.firstActiveIndex!==t?this.firstActiveIndex:0:(e=!0,i=this.lastActiveIndex!==t?this.lastActiveIndex:h.length-1);;){if(n=h[i],n.endTime<=r)f=Math.max(f,n.endTime),n.active&&(n.active=!1);else if(r<n.startTime){if(u=Math.min(u,n.startTime),n.active&&(n.active=!1),!e)break}else e?(c.splice(0,0,n),s===t&&(s=i),o=i):(c.push(n),o===t&&(o=i),s=i),u=Math.min(u,n.endTime),f=Math.max(f,n.startTime),n.active=!0;if(e)if(i===0)break;else i--;else if(i===h.length-1)break;else i++}this.activeCues=c,this.nextChange=u,this.prevChange=f,this.firstActiveIndex=o,this.lastActiveIndex=s,this.updateDisplay(),this.trigger("cuechange")}},updateDisplay:function(){for(var t=this.activeCues,i="",n=0,r=t.length;n<r;n++)i+="<span class='vjs-tt-cue'>"+t[n].text+"<\/span>";this.el.innerHTML=i},reset:function(){this.nextChange=0,this.prevChange=this.player.duration(),this.firstActiveIndex=0,this.lastActiveIndex=0}}),i.CaptionsTrack=i.Track.extend({kind:"captions"}),i.SubtitlesTrack=i.Track.extend({kind:"subtitles"}),i.ChaptersTrack=i.Track.extend({kind:"chapters"}),i.TextTrackDisplay=i.Component.extend({createElement:function(){return this._super("div",{className:"vjs-text-track-display"})}}),i.TextTrackMenuItem=i.MenuItem.extend({init:function(n,t){var r=this.track=t.track;t.label=r.label,t.selected=r["default"],this._super(n,t);this.player.on(r.kind+"trackchange",i.proxy(this,this.update))},onClick:function(){this._super(),this.player.showTextTrack(this.track.id,this.track.kind)},update:function(){this.track.mode==2?this.selected(!0):this.selected(!1)}}),i.OffTextTrackMenuItem=i.TextTrackMenuItem.extend({init:function(n,t){t.track={kind:t.kind,player:n,label:"Off"},this._super(n,t)},onClick:function(){this._super(),this.player.showTextTrack(this.track.id,this.track.kind)},update:function(){for(var i=this.player.textTracks,n=0,u=i.length,t,r=!0;n<u;n++)t=i[n],t.kind==this.track.kind&&t.mode==2&&(r=!1);r?this.selected(!0):this.selected(!1)}}),i.TextTrackButton=i.Button.extend({init:function(n,t){this._super(n,t),this.menu=this.createMenu(),this.items.length===0&&this.hide()},createMenu:function(){var n=new i.Menu(this.player);return n.el.appendChild(i.createElement("li",{className:"vjs-menu-title",innerHTML:i.uc(this.kind)})),n.addItem(new i.OffTextTrackMenuItem(this.player,{kind:this.kind})),this.items=this.createItems(),this.each(this.items,function(t){n.addItem(t)}),this.addComponent(n),n},createItems:function(){var n=[];return this.each(this.player.textTracks,function(t){t.kind===this.kind&&n.push(new i.TextTrackMenuItem(this.player,{track:t}))}),n},buildCSSClass:function(){return this.className+" vjs-menu-button "+this._super()},onFocus:function(){this.menu.lockShowing();i.one(this.menu.el.childNodes[this.menu.el.childNodes.length-1],"blur",this.proxy(function(){this.menu.unlockShowing()}))},onBlur:function(){},onClick:function(){this.one("mouseout",this.proxy(function(){this.menu.unlockShowing(),this.el.blur()}))}}),i.CaptionsButton=i.TextTrackButton.extend({kind:"captions",buttonText:"Captions",className:"vjs-captions-button"}),i.SubtitlesButton=i.TextTrackButton.extend({kind:"subtitles",buttonText:"Subtitles",className:"vjs-subtitles-button"}),i.ChaptersButton=i.TextTrackButton.extend({kind:"chapters",buttonText:"Chapters",className:"vjs-chapters-button",createItems:function(){var n=[];return this.each(this.player.textTracks,function(t){t.kind===this.kind&&n.push(new i.TextTrackMenuItem(this.player,{track:t}))}),n},createMenu:function(){for(var o=this.player.textTracks,n=0,f=o.length,t,u,c=this.items=[],r;n<f;n++)if(t=o[n],t.kind==this.kind&&t["default"]){if(t.readyState<2){this.chaptersTrack=t;t.on("loaded",this.proxy(this.createMenu));return}u=t;break}if(r=this.menu=new i.Menu(this.player),r.el.appendChild(i.createElement("li",{className:"vjs-menu-title",innerHTML:i.uc(this.kind)})),u)for(var s=u.cues,n=0,f=s.length,h,e;n<f;n++)h=s[n],e=new i.ChaptersTrackMenuItem(this.player,{track:u,cue:h}),c.push(e),r.addComponent(e);return this.addComponent(r),this.items.length>0&&this.show(),r}}),i.ChaptersTrackMenuItem=i.MenuItem.extend({init:function(n,t){var f=this.track=t.track,r=this.cue=t.cue,u=n.currentTime();t.label=r.text,t.selected=r.startTime<=u&&u<r.endTime,this._super(n,t);f.on("cuechange",i.proxy(this,this.update))},onClick:function(){this._super(),this.player.currentTime(this.cue.startTime),this.update(this.cue.startTime)},update:function(){var n=this.cue,t=this.player.currentTime();n.startTime<=t&&t<n.endTime?this.selected(!0):this.selected(!1)}}),i.merge(i.ControlBar.prototype.options.components,{subtitlesButton:{},captionsButton:{},chaptersButton:{}}),i.html5=i.PlaybackTech.extend({init:function(n,t,i){this.player=n,this.el=this.createElement(),this.ready(i),this.addEvent("click",this.proxy(this.onClick));var r=t.source;r&&this.el.currentSrc==r.src?n.triggerEvent("loadstart"):r&&(this.el.src=r.src),n.ready(function(){this.options.autoplay&&this.paused()&&(this.tag.poster=null,this.play())}),this.setupTriggers(),this.triggerReady()},destroy:function(){this.player.tag=!1,this.removeTriggers(),this.el.parentNode.removeChild(this.el)},createElement:function(){var u=i.html5,t=this.player,n=t.tag,r;return n&&this.support.movingElementInDOM!==!1||(n&&t.el.removeChild(n),r=i.createElement("video",{id:n.id||t.el.id+"_html5_api",className:n.className||"vjs-tech"}),n=r,i.insertFirst(n,t.el)),i.each(["autoplay","preload","loop","muted"],function(i){t.options[i]!==null&&(n[i]=t.options[i])},this),n},setupTriggers:function(){i.each.call(this,i.html5.events,function(n){i.addEvent(this.el,n,i.proxy(this.player,this.eventHandler))})},removeTriggers:function(){i.each.call(this,i.html5.events,function(n){i.removeEvent(this.el,n,i.proxy(this.player,this.eventHandler))})},eventHandler:function(n){n.stopPropagation(),this.triggerEvent(n)},play:function(){this.el.play()},pause:function(){this.el.pause()},paused:function(){return this.el.paused},currentTime:function(){return this.el.currentTime},setCurrentTime:function(n){try{this.el.currentTime=n}catch(t){i.log(t,"Video isn't ready. (VideoJS)")}},duration:function(){return this.el.duration||0},buffered:function(){return this.el.buffered},volume:function(){return this.el.volume},setVolume:function(n){this.el.volume=n},muted:function(){return this.el.muted},setMuted:function(n){this.el.muted=n},width:function(){return this.el.offsetWidth},height:function(){return this.el.offsetHeight},supportsFullScreen:function(){return typeof this.el.webkitEnterFullScreen=="function"&&!navigator.userAgent.match("Chrome")&&!navigator.userAgent.match("Mac OS X 10.5")?!0:!1},enterFullScreen:function(){try{this.el.webkitEnterFullScreen()}catch(n){n.code==11&&i.log("VideoJS: Video not ready.")}},exitFullScreen:function(){try{this.el.webkitExitFullScreen()}catch(n){n.code==11&&i.log("VideoJS: Video not ready.")}},src:function(n){this.el.src=n},load:function(){this.el.load()},currentSrc:function(){return this.el.currentSrc},preload:function(){return this.el.preload},setPreload:function(n){this.el.preload=n},autoplay:function(){return this.el.autoplay},setAutoplay:function(n){this.el.autoplay=n},loop:function(){return this.el.loop},setLoop:function(n){this.el.loop=n},error:function(){return this.el.error},seeking:function(){return this.el.seeking},ended:function(){return this.el.ended},controls:function(){return this.player.options.controls},defaultMuted:function(){return this.el.defaultMuted}}),i.html5.isSupported=function(){return!!r.createElement("video").canPlayType},i.html5.canPlaySource=function(n){return!!r.createElement("video").canPlayType(n.type)},i.html5.events="loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange".split(","),i.html5.prototype.support={fullscreen:typeof i.testVid.webkitEnterFullScreen!==t?!i.ua.match("Chrome")&&!i.ua.match("Mac OS X 10.5")?!0:!1:!1,movingElementInDOM:!i.isIOS()},i.isAndroid()&&i.androidVersion()<3&&(r.createElement("video").constructor.prototype.canPlayType=function(n){return n&&n.toLowerCase().indexOf("video/mp4")!=-1?"maybe":""}),i.flash=i.PlaybackTech.extend({init:function(n,t){var r;this.player=n;var s=t.source,h=t.parentEl,f=this.el=i.createElement("div",{id:h.id+"_temp_flash"}),e=n.el.id+"_flash_api",o=n.options,u=i.merge({readyFunction:"_V_.flash.onReady",eventProxyFunction:"_V_.flash.onEvent",errorEventProxyFunction:"_V_.flash.onError",autoplay:o.autoplay,preload:o.preload,loop:o.loop,muted:o.muted},t.flashVars),c=i.merge({wmode:"opaque",bgcolor:"#000000"},t.params),l=i.merge({id:e,name:e,"class":"vjs-tech"},t.attributes);s&&(u.src=encodeURIComponent(i.getAbsoluteURL(s.src))),i.insertFirst(f,h),t.startTime&&this.ready(function(){this.load(),this.play(),this.currentTime(t.startTime)}),t.iFrameMode!==!0||i.isFF?i.flash.embed(t.swf,f,u,c,l):(r=i.createElement("iframe",{id:e+"_iframe",name:e+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0}),u.readyFunction="ready",u.eventProxyFunction="events",u.errorEventProxyFunction="errors",i.addEvent(r,"load",i.proxy(this,function(){var f,n=r.contentWindow;f=r.contentDocument?r.contentDocument:r.contentWindow.document,f.write(i.flash.getEmbedCode(t.swf,u,c,l)),n.player=this.player,n.ready=i.proxy(this.player,function(n){var r=f.getElementById(n),u=this,t=u.tech;t.el=r,i.addEvent(r,"click",t.proxy(t.onClick)),i.flash.checkReady(t)}),n.events=i.proxy(this.player,function(n,t){var i=this;i&&i.techName=="flash"&&i.triggerEvent(t)}),n.errors=i.proxy(this.player,function(n,t){i.log("Flash Error",t)})})),f.parentNode.replaceChild(r,f))},destroy:function(){this.el.parentNode.removeChild(this.el)},play:function(){this.el.vjs_play()},pause:function(){this.el.vjs_pause()},src:function(n){if(n=i.getAbsoluteURL(n),this.el.vjs_src(n),this.player.autoplay()){var t=this;setTimeout(function(){t.play()},0)}},load:function(){this.el.vjs_load()},poster:function(){this.el.vjs_getProperty("poster")},buffered:function(){return i.createTimeRange(0,this.el.vjs_getProperty("buffered"))},supportsFullScreen:function(){return!1},enterFullScreen:function(){return!1}}),function(){var n=i.flash.prototype,t="preload,currentTime,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),r="error,currentSrc,networkState,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks".split(","),u="load,play,pause".split(",");createSetter=function(t){var i=t.charAt(0).toUpperCase()+t.slice(1);n["set"+i]=function(n){return this.el.vjs_setProperty(t,n)}},createGetter=function(t){n[t]=function(){return this.el.vjs_getProperty(t)}},i.each(t,function(n){createGetter(n),createSetter(n)}),i.each(r,function(n){createGetter(n)})}(),i.flash.isSupported=function(){return i.flash.version()[0]>=10},i.flash.canPlaySource=function(n){if(n.type in i.flash.prototype.support.formats)return"maybe"},i.flash.prototype.support={formats:{"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},progressEvent:!1,timeupdateEvent:!1,fullscreenResize:!1,parentResize:!i.ua.match("Firefox")},i.flash.onReady=function(n){var t=i.el(n),u=t.player||t.parentNode.player,r=u.tech;t.player=u,r.el=t,r.addEvent("click",r.onClick),i.flash.checkReady(r)},i.flash.checkReady=function(n){n.el.vjs_getProperty?n.triggerReady():setTimeout(function(){i.flash.checkReady(n)},50)},i.flash.onEvent=function(n,t){var r=i.el(n).player;r.triggerEvent(t)},i.flash.onError=function(n,t){var r=i.el(n).player;r.triggerEvent("error"),i.log("Flash Error",t,n)},i.flash.version=function(){var n="0,0,0";try{n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(n=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(t){}}return n.split(",")},i.flash.embed=function(n,t,r,u,f){var s=i.flash.getEmbedCode(n,r,u,f),e=i.createElement("div",{innerHTML:s}).childNodes[0],h=t.parentNode,o;return t.parentNode.replaceChild(e,t),i.isIE()&&(o=h.childNodes[0],setTimeout(function(){o.style.display="block"},1e3)),e},i.flash.getEmbedCode=function(n,t,r,u){var f="",e="",o="";return t&&i.eachProp(t,function(n,t){f+=n+"="+t+"&amp;"}),r=i.merge({movie:n,flashvars:f,allowScriptAccess:"always",allowNetworking:"all"},r),i.eachProp(r,function(n,t){e+='<param name="'+n+'" value="'+t+'" />'}),u=i.merge({data:n,width:"100%",height:"100%"},u),i.eachProp(u,function(n,t){o+=n+'="'+t+'" '}),'<object type="application/x-shockwave-flash"'+o+">"+e+"<\/object>"},i.autoSetup=function(){var u,n,h,e=r.getElementsByTagName("video"),o,s;if(e&&e.length>0)for(o=0,s=e.length;o<s;o++)if(n=e[o],n&&n.getAttribute)n.player===t&&(u=n.getAttribute("data-setup"),u!==null&&(u=f.parse(u||"{}"),h=i(n,u)));else{i.autoSetupTimeout(1);break}else i.windowLoaded||i.autoSetupTimeout(1)},i.autoSetupTimeout=function(n){setTimeout(i.autoSetup,n)},i.addEvent(n,"load",function(){i.windowLoaded=!0}),setTimeout(i.autoSetup,0),n.VideoJS=n._V_=u})(window),_V_.youtube=_V_.PlaybackTech.extend({init:function(n,t){function p(n){return n.substr(n.indexOf(h)+h.length,2)}var c;this.player=n;var l=t.source,a=this.getVideoId(l.src),r=t.parentEl,u=n.el.id+"_youtube_api",f=this.el=_V_.createElement("iframe",{id:u+"_iframe",name:u+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0,webkitAllowFullScreen:"",mozallowfullscreen:"",allowFullScreen:""});_V_.youtube.loadingEls=_V_.youtube.loadingEls||[],_V_.youtube.loadingEls.push(r);var e=n.options,o=t.params||{},i={disablekb:1,enablejsapi:1,iv_load_policy:3,modestbranding:1,playerapiid:u,wmode:"opaque",rel:0,showinfo:0,showsearch:0,controls:this.toBoolInt(o.ytcontrols||e.ytcontrols),autoplay:1,loop:this.toBoolInt(o.loop||e.loop),hd:this.toBoolInt(o.hd||e.hd)},s=l.src,h="cc_lang_pref=",v=s.indexOf(h)!==-1,y=s.indexOf("cc_load_policy=true")!==-1;y&&(i.cc_load_policy=1),v&&(i.cc_lang_pref=p(s)),c=document.location.protocol=="https:"?"https:":"http:",document.domain!="localhost"&&document.location.protocol!="file:"&&(i.origin=c+"//"+document.domain),this.player.apiArgs={videoId:a,playerVars:i,events:{onReady:_V_.youtube.onReady,onStateChange:_V_.youtube.onStateChange,onPlaybackQualityChange:_V_.youtube.onPlaybackQualityChange,onError:_V_.youtube.onError}},_V_.addEvent(r,"techready",_V_.proxy(this,function(){f.src=c+"//www.youtube.com/embed/"+a+"?"+this.makeQueryString(i),this.youtube=new YT.Player(f,{events:this.player.apiArgs.events})})),_V_.insertFirst(f,r),_V_.youtube.updateVideoQuality(this.player,null),this.loadApi()},destroy:function(){this.el.parentNode.removeChild(this.el),this.youtube.destroy(),delete this.youtube},play:function(){this.youtube.playVideo()},pause:function(){this.youtube.pauseVideo()},paused:function(){var n=this.youtube.getPlayerState();return n!==YT.PlayerState.PLAYING&&n!==YT.PlayerState.BUFFERING},src:function(n){delete this.player.error;var t=this.getVideoId(n);this.youtube.loadVideoById(t)},load:function(){},poster:function(){var n=this.getVideoId(this.youtube.getVideoUrl());return"http://img.youtube.com/vi/"+n+"/0.jpg"},currentTime:function(){return this.youtube.getCurrentTime()||0},setCurrentTime:function(n){this.youtube.seekTo(n,!0),this.player.triggerEvent("timeupdate")},duration:function(){return this.youtube.getDuration()||0},buffered:function(){var t=this.youtube.getVideoBytesLoaded(),n=this.youtube.getVideoBytesTotal();if(!t||!n)return 0;var i=this.youtube.getDuration(),u=t/n*i,r=this.youtube.getVideoStartBytes()/n*i;return _V_.createTimeRange(r,r+u)},volume:function(){return isNaN(this.youtube.volumeVal)&&(this.youtube.volumeVal=this.youtube.getVolume()/100),this.youtube.volumeVal},setVolume:function(n){n!=this.youtube.volumeVal&&(this.youtube.volumeVal=n,this.youtube.setVolume(n*100),this.player.triggerEvent("volumechange"))},muted:function(){return this.youtube.isMuted()},setMuted:function(n){n?this.youtube.mute():this.youtube.unMute();var t=this;setTimeout(function(){t.player.triggerEvent("volumechange")},50)},width:function(){return this.el.offsetWidth},height:function(){return this.el.offsetHeight},currentSrc:function(){return this.youtube.getVideoUrl()},preload:function(){return!1},setPreload:function(){},autoplay:function(){return!!this.player.apiArgs.playerVars.autoplay},setAutoplay:function(){},loop:function(){return!!this.player.apiArgs.playerVars.loop},setLoop:function(n){this.player.apiArgs.playerVars.loop=n?1:0},supportsFullScreen:function(){return!1},enterFullScreen:function(){return!1},error:function(){return this.player.error},seeking:function(){return!1},ended:function(){return this.youtube.getPlayerState()===YT.PlayerState.ENDED},videoWidth:function(){return this.player.videoWidth},videoHeight:function(){return this.player.videoHeight},controls:function(){return this.player.options.controls},defaultMuted:function(){return!1},makeQueryString:function(n){var i=[],t;for(t in n)n.hasOwnProperty(t)&&i.push(encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return i.join("&")},getVideoId:function(n){var t=n.match(/embed\/([^&]+)/),i;return t&&t[1]?i=t[1]:(t=n.match(/v=([^&]+)/),t&&t[1]&&(i=t[1])),i},toBoolInt:function(n){return n?1:0},loadApi:function(){var n,t="youtube-jssdk",i=document.getElementsByTagName("script")[0],r;if(_V_.el(t)){window.onYouTubePlayerAPIReady();return}r=document.location.protocol=="https:"?"https:":"http:",n=_V_.createElement("script",{id:t,async:!0,src:r+"//www.youtube.com/player_api"}),i.parentNode.insertBefore(n,i)}}),_V_.youtube.onReady=function(n){var t=n.target.getIframe().parentNode.player;t.tech.triggerReady(),t.triggerReady(),t.triggerEvent("durationchange"),_V_.youtube.hideOverlay(t)},_V_.youtube.onStateChange=function(n){var t=n.target.getIframe().parentNode.player;if(t.lastState!==n.data){switch(n.data){case-1:t.triggerEvent("durationchange");break;case YT.PlayerState.ENDED:t.triggerEvent("ended"),_V_.youtube.hideOverlay(t),t.apiArgs.playerVars.loop?(t.tech.youtube.seekTo(0,!0),t.tech.youtube.playVideo()):t.tech.youtube.stopVideo();break;case YT.PlayerState.PLAYING:t.triggerEvent("timeupdate"),t.triggerEvent("playing"),t.triggerEvent("play");break;case YT.PlayerState.PAUSED:t.triggerEvent("pause");break;case YT.PlayerState.BUFFERING:t.triggerEvent("timeupdate"),t.triggerEvent("waiting"),t.loadingSpinner.hide()}t.lastState=n.data}},_V_.youtube.onPlaybackQualityChange=function(n){var t=n.target.getIframe().parentNode.player;_V_.youtube.updateVideoQuality(t,n.data),t.triggerEvent("ratechange")},_V_.youtube.onError=function(n){var t=n.target.getIframe().parentNode.player;t.error=n.data,t.triggerEvent("error")},_V_.youtube.hideOverlay=function(n){n.bigPlayButton.hide(),n.posterImage.hide()},_V_.youtube.updateVideoQuality=function(n,t){switch(t){case"medium":n.videoWidth=480,n.videoHeight=360;break;case"large":n.videoWidth=640,n.videoHeight=480;break;case"hd720":n.videoWidth=960,n.videoHeight=720;break;case"hd1080":n.videoWidth=1440,n.videoHeight=1080;break;case"highres":n.videoWidth=1920,n.videoHeight=1080;break;case"small":n.videoWidth=320,n.videoHeight=240;break;default:n.videoWidth=0,n.videoHeight=0}},_V_.youtube.isSupported=function(){return!0},_V_.youtube.canPlaySource=function(n){return n.type=="video/youtube"},_V_.youtube.prototype.support={formats:{"video/youtube":"YT"},progressEvent:!1,timeupdateEvent:!1,movingElementInDOM:!_V_.isIOS(),fullscreenResize:!0,parentResize:!0},window.onYouTubePlayerAPIReady=function(){for(var n;n=_V_.youtube.loadingEls.shift();)n.player.triggerEvent("techready")},VimeoState={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3},_V_.vimeo=_V_.PlaybackTech.extend({init:function(n,t){this.player=n;var f=t.source,e=this.getVideoId(f.src),o=t.parentEl,i=n.el.id+"_vimeo_api",s=this.el=_V_.createElement("iframe",{id:i+"_iframe",name:i+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0,webkitAllowFullScreen:"",mozallowfullscreen:"",allowFullScreen:""}),r=n.options,u=t.params||{};this.player.apiArgs={api:1,byline:0,portrait:0,show_title:0,show_byline:0,show_portrait:0,fullscreen:1,player_id:i+"_iframe",color:u.color||r.color||"ffffff",autoplay:this.toBoolInt(u.autoplay||r.autoplay),loop:this.toBoolInt(u.loop||r.loop)},this.player.vimeoInfo={},_V_.insertFirst(s,o),this.loadPlayer(e)},loadPlayer:function(n){var t=document.location.protocol=="https:"?"https://player.vimeo.com/video/":"http://player.vimeo.com/video/";_V_.addEvent(this.el,"load",_V_.proxy(this,function(){this.vimeo=$f(this.el),this.player.vimeoInfo={state:VimeoState.UNSTARTED,volume:1,muted:!1,muteVolume:1,time:0,duration:0,buffered:0,url:t+n,error:null},this.vimeo.addEvent("ready",_V_.vimeo.onReady),this.vimeo.addEvent("loadProgress",_V_.vimeo.onLoadProgress),this.vimeo.addEvent("playProgress",_V_.vimeo.onPlayProgress),this.vimeo.addEvent("play",_V_.vimeo.onPlay),this.vimeo.addEvent("pause",_V_.vimeo.onPause),this.vimeo.addEvent("finish",_V_.vimeo.onFinish),this.vimeo.addEvent("seek",_V_.vimeo.onSeek)})),this.el.src=t+n+"?"+this.makeQueryString(this.player.apiArgs)},destroy:function(){this.vimeo.api("unload"),delete this.vimeo,this.el.parentNode.removeChild(this.el)},play:function(){this.vimeo.api("play")},pause:function(){this.vimeo.api("pause")},paused:function(){var n=this.player.vimeoInfo.state;return n!==VimeoState.PLAYING&&n!==VimeoState.BUFFERING},src:function(n){var t=this.getVideoId(n);this.loadPlayer(t)},load:function(){},poster:function(){return null},currentTime:function(){return this.player.vimeoInfo.time||0},setCurrentTime:function(n){this.vimeo.api("seekTo",n)},duration:function(){return this.player.vimeoInfo.duration||0},buffered:function(){return _V_.createTimeRange(0,this.player.vimeoInfo.buffered||0)},volume:function(){return this.player.vimeoInfo.muted?this.player.vimeoInfo.muteVolume:this.player.vimeoInfo.volume},setVolume:function(n){this.vimeo.api("setVolume",n),this.player.vimeoInfo.volume=n,this.player.triggerEvent("volumechange")},muted:function(){return this.player.vimeoInfo.muted||!1},setMuted:function(n){n?(this.player.vimeoInfo.muteVolume=this.player.vimeoInfo.volume,this.setVolume(0)):this.setVolume(this.player.vimeoInfo.muteVolume),this.player.vimeoInfo.muted=n,this.player.triggerEvent("volumechange")},width:function(){return this.el.offsetWidth},height:function(){return this.el.offsetHeight},currentSrc:function(){return this.player.vimeoInfo.url},preload:function(){return!1},setPreload:function(){},autoplay:function(){return!!this.player.apiArgs.autoplay},setAutoplay:function(){},loop:function(){return!!this.player.apiArgs.loop},setLoop:function(n){this.player.apiArgs.loop=n?1:0},supportsFullScreen:function(){return!1},enterFullScreen:function(){return!1},error:function(){return this.player.vimeoInfo.error},seeking:function(){return!1},ended:function(){return this.player.vimeoInfo.state===VimeoState.ENDED},videoWidth:function(){return this.width()},videoHeight:function(){return this.height()},controls:function(){return this.player.options.controls},defaultMuted:function(){return!1},makeQueryString:function(n){var i=[],t;for(t in n)n.hasOwnProperty(t)&&i.push(encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return i.join("&")},getVideoId:function(n){var t=n.match(/vimeo\.com\/(?:.*#|.*\/videos?\/)?([0-9]+)/);return t?t[1]:0},toBoolInt:function(n){return n?1:0}}),_V_.vimeo.onReady=function(n){var t=_V_.el(n).parentNode.player;t.tech.triggerReady(),t.triggerReady(),t.triggerEvent("canplay"),_V_.vimeo.hideOverlay(t),t.controlBar.hide()},_V_.vimeo.onLoadProgress=function(n,t){var i=_V_.el(t).parentNode.player,r=!i.vimeoInfo.duration;i.vimeoInfo.duration=n.duration,i.vimeoInfo.buffered=n.percent,i.triggerEvent("progress"),r&&i.triggerEvent("durationchange")},_V_.vimeo.onPlayProgress=function(n,t){var i=_V_.el(t).parentNode.player;i.vimeoInfo.time=n.seconds,i.triggerEvent("timeupdate")},_V_.vimeo.onPlay=function(n){var t=_V_.el(n).parentNode.player;t.vimeoInfo.state=VimeoState.PLAYING,t.triggerEvent("play")},_V_.vimeo.onPause=function(n){var t=_V_.el(n).parentNode.player;t.vimeoInfo.state=VimeoState.PAUSED,t.triggerEvent("pause")},_V_.vimeo.onFinish=function(n){var t=_V_.el(n).parentNode.player;t.vimeoInfo.state=VimeoState.ENDED,t.triggerEvent("ended"),_V_.vimeo.hideOverlay(t),t.apiArgs.loop?t.tech.vimeo.api("play"):(t.tech.vimeo.api("seekTo",0),t.tech.vimeo.api("play"),t.tech.vimeo.api("pause"))},_V_.vimeo.onSeek=function(n,t){var i=_V_.el(t).parentNode.player;i.vimeoInfo.time=n.seconds,i.triggerEvent("timeupdate"),i.triggerEvent("seeked")},_V_.vimeo.hideOverlay=function(n){n.bigPlayButton.hide(),n.posterImage.hide()},_V_.vimeo.isSupported=function(){return!0},_V_.vimeo.canPlaySource=function(n){return n.type=="video/vimeo"},_V_.vimeo.prototype.support={formats:{"video/vimeo":"VIM"},progressEvent:!0,timeupdateEvent:!0,movingElementInDOM:!_V_.isIOS(),fullscreenResize:!0,parentResize:!0},Froogaloop=function(){function t(n){return new t.fn.init(n)}function r(n,t,i){if(!i.contentWindow.postMessage)return!1;var r=i.getAttribute("src").split("?")[0],u=JSON.stringify({method:n,value:t});r.substr(0,2)==="//"&&(r=window.location.protocol+r),i.contentWindow.postMessage(u,"*")}function f(n){var t,e;try{t=JSON.parse(n.data),e=t.event||t.method}catch(l){}if(e!="ready"||i||(i=!0),n.origin!=u)return!1;var h=t.value,c=t.data,f=f===""?null:t.player_id,o=s(e,f),r=[];return o?(h!==undefined&&r.push(h),c&&r.push(c),f&&r.push(f),r.length>0?o.apply(null,r):o.call()):!1}function e(t,i,r){r?(n[r]||(n[r]={}),n[r][t]=i):n[t]=i}function s(t,i){return i&&n[i]?n[i][t]:n[t]}function h(t,i){if(i&&n[i]){if(!n[i][t])return!1;n[i][t]=null}else{if(!n[t])return!1;n[t]=null}return!0}function c(n){var r,i,t,u;for(n.substr(0,2)==="//"&&(n=window.location.protocol+n),r=n.split("/"),i="",t=0,u=r.length;t<u;t++){if(t<3)i+=r[t];else break;t<2&&(i+="/")}return i}function o(n){return!!(n&&n.constructor&&n.call&&n.apply)}var n={},i=!1,l=Array.prototype.slice,u="";return t.fn=t.prototype={element:null,init:function(n){return typeof n=="string"&&(n=document.getElementById(n)),this.element=n,u=c(this.element.getAttribute("src")),this},api:function(n,t){if(!this.element||!n)return!1;var u=this,i=u.element,s=i.id!==""?i.id:null,h=o(t)?null:t,f=o(t)?t:null;return f&&e(n,f,s),r(n,h,i),u},addEvent:function(n,t){if(!this.element)return!1;var f=this,u=f.element,o=u.id!==""?u.id:null;return e(n,t,o),n!="ready"?r("addEventListener",n,u):n=="ready"&&i&&t.call(null,o),f},removeEvent:function(n){if(!this.element)return!1;var i=this,t=i.element,u=t.id!==""?t.id:null,f=h(n,u);n!="ready"&&f&&r("removeEventListener",n,t)}},t.fn.init.prototype=t.fn,window.addEventListener?window.addEventListener("message",f,!1):window.attachEvent("onmessage",f),window.Froogaloop=window.$f=t}()