(function(){var a=this,ct=a._,e={},r=Array.prototype,g=Object.prototype,lt=Function.prototype,v=r.push,t=r.slice,o=r.concat,f=g.toString,at=g.hasOwnProperty,nt=r.forEach,tt=r.map,it=r.reduce,rt=r.reduceRight,ut=r.filter,ft=r.every,et=r.some,s=r.indexOf,ot=r.lastIndexOf,vt=Array.isArray,yt=Object.keys,y=lt.bind,n=function(t){if(t instanceof n)return t;if(!(this instanceof n))return new n(t);this._wrapped=t},i,p,w,h,b,k,c,u,st,ht,l;typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=n),exports._=n):a._=n;n.VERSION="1.4.4";i=n.each=n.forEach=function(t,i,r){var u,o,f;if(t!=null)if(nt&&t.forEach===nt)t.forEach(i,r);else if(t.length===+t.length){for(u=0,o=t.length;u<o;u++)if(i.call(r,t[u],u,t)===e)return}else for(f in t)if(n.has(t,f)&&i.call(r,t[f],f,t)===e)return};n.map=n.collect=function(n,t,r){var u=[];return n==null?u:tt&&n.map===tt?n.map(t,r):(i(n,function(n,i,f){u[u.length]=t.call(r,n,i,f)}),u)};p="Reduce of empty array with no initial value";n.reduce=n.foldl=n.inject=function(t,r,u,f){var e=arguments.length>2;if(t==null&&(t=[]),it&&t.reduce===it)return f&&(r=n.bind(r,f)),e?t.reduce(r,u):t.reduce(r);if(i(t,function(n,t,i){e?u=r.call(f,u,n,t,i):(u=n,e=!0)}),!e)throw new TypeError(p);return u};n.reduceRight=n.foldr=function(t,r,u,f){var o=arguments.length>2,e,s;if(t==null&&(t=[]),rt&&t.reduceRight===rt)return f&&(r=n.bind(r,f)),o?t.reduceRight(r,u):t.reduceRight(r);if(e=t.length,e!==+e&&(s=n.keys(t),e=s.length),i(t,function(n,i,h){i=s?s[--e]:--e;o?u=r.call(f,u,t[i],i,h):(u=t[i],o=!0)}),!o)throw new TypeError(p);return u};n.find=n.detect=function(n,t,i){var r;return w(n,function(n,u,f){if(t.call(i,n,u,f))return r=n,!0}),r};n.filter=n.select=function(n,t,r){var u=[];return n==null?u:ut&&n.filter===ut?n.filter(t,r):(i(n,function(n,i,f){t.call(r,n,i,f)&&(u[u.length]=n)}),u)};n.reject=function(t,i,r){return n.filter(t,function(n,t,u){return!i.call(r,n,t,u)},r)};n.every=n.all=function(t,r,u){r||(r=n.identity);var f=!0;return t==null?f:ft&&t.every===ft?t.every(r,u):(i(t,function(n,t,i){if(!(f=f&&r.call(u,n,t,i)))return e}),!!f)};w=n.some=n.any=function(t,r,u){r||(r=n.identity);var f=!1;return t==null?f:et&&t.some===et?t.some(r,u):(i(t,function(n,t,i){if(f||(f=r.call(u,n,t,i)))return e}),!!f)};n.contains=n.include=function(n,t){return n==null?!1:s&&n.indexOf===s?n.indexOf(t)!=-1:w(n,function(n){return n===t})};n.invoke=function(i,r){var u=t.call(arguments,2),f=n.isFunction(r);return n.map(i,function(n){return(f?r:n[r]).apply(n,u)})};n.pluck=function(t,i){return n.map(t,function(n){return n[i]})};n.where=function(t,i,r){return n.isEmpty(i)?r?void 0:[]:n[r?"find":"filter"](t,function(n){for(var t in i)if(i[t]!==n[t])return!1;return!0})};n.findWhere=function(t,i){return n.where(t,i,!0)};n.max=function(t,r,u){if(!r&&n.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.max.apply(Math,t);if(!r&&n.isEmpty(t))return-Infinity;var f={computed:-Infinity,value:-Infinity};return i(t,function(n,t,i){var e=r?r.call(u,n,t,i):n;e>=f.computed&&(f={value:n,computed:e})}),f.value};n.min=function(t,r,u){if(!r&&n.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.min.apply(Math,t);if(!r&&n.isEmpty(t))return Infinity;var f={computed:Infinity,value:Infinity};return i(t,function(n,t,i){var e=r?r.call(u,n,t,i):n;e<f.computed&&(f={value:n,computed:e})}),f.value};n.shuffle=function(t){var u,f=0,r=[];return i(t,function(t){u=n.random(f++);r[f-1]=r[u];r[u]=t}),r};h=function(t){return n.isFunction(t)?t:function(n){return n[t]}};n.sortBy=function(t,i,r){var u=h(i);return n.pluck(n.map(t,function(n,t,i){return{value:n,index:t,criteria:u.call(r,n,t,i)}}).sort(function(n,t){var i=n.criteria,r=t.criteria;if(i!==r){if(i>r||i===void 0)return 1;if(i<r||r===void 0)return-1}return n.index<t.index?-1:1}),"value")};b=function(t,r,u,f){var e={},o=h(r||n.identity);return i(t,function(n,i){var r=o.call(u,n,i,t);f(e,r,n)}),e};n.groupBy=function(t,i,r){return b(t,i,r,function(t,i,r){(n.has(t,i)?t[i]:t[i]=[]).push(r)})};n.countBy=function(t,i,r){return b(t,i,r,function(t,i){n.has(t,i)||(t[i]=0);t[i]++})};n.sortedIndex=function(t,i,r,u){var e;r=r==null?n.identity:h(r);for(var s=r.call(u,i),f=0,o=t.length;f<o;)e=f+o>>>1,r.call(u,t[e])<s?f=e+1:o=e;return f};n.toArray=function(i){return i?n.isArray(i)?t.call(i):i.length===+i.length?n.map(i,n.identity):n.values(i):[]};n.size=function(t){return t==null?0:t.length===+t.length?t.length:n.keys(t).length};n.first=n.head=n.take=function(n,i,r){if(n!=null)return i!=null&&!r?t.call(n,0,i):n[0]};n.initial=function(n,i,r){return t.call(n,0,n.length-(i==null||r?1:i))};n.last=function(n,i,r){if(n!=null)return i==null||r?n[n.length-1]:t.call(n,Math.max(n.length-i,0))};n.rest=n.tail=n.drop=function(n,i,r){return t.call(n,i==null||r?1:i)};n.compact=function(t){return n.filter(t,n.identity)};k=function(t,r,u){return i(t,function(t){n.isArray(t)?r?v.apply(u,t):k(t,r,u):u.push(t)}),u};n.flatten=function(n,t){return k(n,t,[])};n.without=function(i){return n.difference(i,t.call(arguments,1))};n.uniq=n.unique=function(t,r,u,f){n.isFunction(r)&&(f=u,u=r,r=!1);var s=u?n.map(t,u,f):t,o=[],e=[];return i(s,function(i,u){(r?u&&e[e.length-1]===i:n.contains(e,i))||(e.push(i),o.push(t[u]))}),o};n.union=function(){return n.uniq(o.apply(r,arguments))};n.intersection=function(i){var r=t.call(arguments,1);return n.filter(n.uniq(i),function(t){return n.every(r,function(i){return n.indexOf(i,t)>=0})})};n.difference=function(i){var u=o.apply(r,t.call(arguments,1));return n.filter(i,function(t){return!n.contains(u,t)})};n.zip=function(){for(var r=t.call(arguments),u=n.max(n.pluck(r,"length")),f=new Array(u),i=0;i<u;i++)f[i]=n.pluck(r,""+i);return f};n.object=function(n,t){var r,i,u;if(n==null)return{};for(r={},i=0,u=n.length;i<u;i++)t?r[n[i]]=t[i]:r[n[i][0]]=n[i][1];return r};n.indexOf=function(t,i,r){if(t==null)return-1;var u=0,f=t.length;if(r)if(typeof r=="number")u=r<0?Math.max(0,f+r):r;else return u=n.sortedIndex(t,i),t[u]===i?u:-1;if(s&&t.indexOf===s)return t.indexOf(i,r);for(;u<f;u++)if(t[u]===i)return u;return-1};n.lastIndexOf=function(n,t,i){var u,r;if(n==null)return-1;if(u=i!=null,ot&&n.lastIndexOf===ot)return u?n.lastIndexOf(t,i):n.lastIndexOf(t);for(r=u?i:n.length;r--;)if(n[r]===t)return r;return-1};n.range=function(n,t,i){arguments.length<=1&&(t=n||0,n=0);i=arguments[2]||1;for(var r=Math.max(Math.ceil((t-n)/i),0),u=0,f=new Array(r);u<r;)f[u++]=n,n+=i;return f};n.bind=function(n,i){if(n.bind===y&&y)return y.apply(n,t.call(arguments,1));var r=t.call(arguments,2);return function(){return n.apply(i,r.concat(t.call(arguments)))}};n.partial=function(n){var i=t.call(arguments,1);return function(){return n.apply(this,i.concat(t.call(arguments)))}};n.bindAll=function(r){var u=t.call(arguments,1);if(u.length===0)throw new Error("bindAll must be passed function names");return i(u,function(t){r[t]=n.bind(r[t],r)}),r};n.memoize=function(t,i){var r={};return i||(i=n.identity),function(){var u=i.apply(this,arguments);return n.has(r,u)?r[u]:r[u]=t.apply(this,arguments)}};n.delay=function(n,i){var r=t.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},i)};n.defer=function(i){return n.delay.apply(n,[i,1].concat(t.call(arguments,1)))};n.throttle=function(n,t){var r,u,i,f,e=0,o=function(){e=new Date;i=null;f=n.apply(r,u)};return function(){var s=new Date,h=t-(s-e);return r=this,u=arguments,h<=0?(clearTimeout(i),i=null,e=s,f=n.apply(r,u)):i||(i=setTimeout(o,h)),f}};n.debounce=function(n,t,i){var r,u;return function(){var f=this,e=arguments,o=function(){r=null;i||(u=n.apply(f,e))},s=i&&!r;return clearTimeout(r),r=setTimeout(o,t),s&&(u=n.apply(f,e)),u}};n.once=function(n){var i=!1,t;return function(){return i?t:(i=!0,t=n.apply(this,arguments),n=null,t)}};n.wrap=function(n,t){return function(){var i=[n];return v.apply(i,arguments),t.apply(this,i)}};n.compose=function(){var n=arguments;return function(){for(var i=arguments,t=n.length-1;t>=0;t--)i=[n[t].apply(this,i)];return i[0]}};n.after=function(n,t){return n<=0?t():function(){if(--n<1)return t.apply(this,arguments)}};n.keys=yt||function(t){var i,r;if(t!==Object(t))throw new TypeError("Invalid object");i=[];for(r in t)n.has(t,r)&&(i[i.length]=r);return i};n.values=function(t){var r=[],i;for(i in t)n.has(t,i)&&r.push(t[i]);return r};n.pairs=function(t){var r=[],i;for(i in t)n.has(t,i)&&r.push([i,t[i]]);return r};n.invert=function(t){var r={},i;for(i in t)n.has(t,i)&&(r[t[i]]=i);return r};n.functions=n.methods=function(t){var r=[],i;for(i in t)n.isFunction(t[i])&&r.push(i);return r.sort()};n.extend=function(n){return i(t.call(arguments,1),function(t){if(t)for(var i in t)n[i]=t[i]}),n};n.pick=function(n){var u={},f=o.apply(r,t.call(arguments,1));return i(f,function(t){t in n&&(u[t]=n[t])}),u};n.omit=function(i){var f={},e=o.apply(r,t.call(arguments,1)),u;for(u in i)n.contains(e,u)||(f[u]=i[u]);return f};n.defaults=function(n){return i(t.call(arguments,1),function(t){if(t)for(var i in t)n[i]==null&&(n[i]=t[i])}),n};n.clone=function(t){return n.isObject(t)?n.isArray(t)?t.slice():n.extend({},t):t};n.tap=function(n,t){return t(n),n};c=function(t,i,r,u){var a,v,e,o,h,l,s;if(t===i)return t!==0||1/t==1/i;if(t==null||i==null)return t===i;if(t instanceof n&&(t=t._wrapped),i instanceof n&&(i=i._wrapped),a=f.call(t),a!=f.call(i))return!1;switch(a){case"[object String]":return t==String(i);case"[object Number]":return t!=+t?i!=+i:t==0?1/t==1/i:t==+i;case"[object Date]":case"[object Boolean]":return+t==+i;case"[object RegExp]":return t.source==i.source&&t.global==i.global&&t.multiline==i.multiline&&t.ignoreCase==i.ignoreCase}if(typeof t!="object"||typeof i!="object")return!1;for(v=r.length;v--;)if(r[v]==t)return u[v]==i;if(r.push(t),u.push(i),e=0,o=!0,a=="[object Array]"){if(e=t.length,o=e==i.length,o)while(e--)if(!(o=c(t[e],i[e],r,u)))break}else{if(h=t.constructor,l=i.constructor,h!==l&&!(n.isFunction(h)&&h instanceof h&&n.isFunction(l)&&l instanceof l))return!1;for(s in t)if(n.has(t,s)&&(e++,!(o=n.has(i,s)&&c(t[s],i[s],r,u))))break;if(o){for(s in i)if(n.has(i,s)&&!e--)break;o=!e}}return r.pop(),u.pop(),o};n.isEqual=function(n,t){return c(n,t,[],[])};n.isEmpty=function(t){if(t==null)return!0;if(n.isArray(t)||n.isString(t))return t.length===0;for(var i in t)if(n.has(t,i))return!1;return!0};n.isElement=function(n){return!!(n&&n.nodeType===1)};n.isArray=vt||function(n){return f.call(n)=="[object Array]"};n.isObject=function(n){return n===Object(n)};i(["Arguments","Function","String","Number","Date","RegExp"],function(t){n["is"+t]=function(n){return f.call(n)=="[object "+t+"]"}});n.isArguments(arguments)||(n.isArguments=function(t){return!!(t&&n.has(t,"callee"))});typeof/./!="function"&&(n.isFunction=function(n){return typeof n=="function"});n.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))};n.isNaN=function(t){return n.isNumber(t)&&t!=+t};n.isBoolean=function(n){return n===!0||n===!1||f.call(n)=="[object Boolean]"};n.isNull=function(n){return n===null};n.isUndefined=function(n){return n===void 0};n.has=function(n,t){return at.call(n,t)};n.noConflict=function(){return a._=ct,this};n.identity=function(n){return n};n.times=function(n,t,i){for(var u=Array(n),r=0;r<n;r++)u[r]=t.call(i,r);return u};n.random=function(n,t){return t==null&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};u={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};u.unescape=n.invert(u.escape);st={escape:new RegExp("["+n.keys(u.escape).join("")+"]","g"),unescape:new RegExp("("+n.keys(u.unescape).join("|")+")","g")};n.each(["escape","unescape"],function(t){n[t]=function(n){return n==null?"":(""+n).replace(st[t],function(n){return u[t][n]})}});n.result=function(t,i){if(t==null)return void 0;var r=t[i];return n.isFunction(r)?r.call(t):r};n.mixin=function(t){i(n.functions(t),function(i){var r=n[i]=t[i];n.prototype[i]=function(){var t=[this._wrapped];return v.apply(t,arguments),l.call(this,r.apply(n,t))}})};ht=0;n.uniqueId=function(n){var t=++ht+"";return n?n+t:t};n.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var d=/(.)^/,pt={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},wt=/\\|'|\r|\n|\t|\u2028|\u2029/g;n.template=function(t,i,r){var f,e;r=n.defaults({},r,n.templateSettings);var h=new RegExp([(r.escape||d).source,(r.interpolate||d).source,(r.evaluate||d).source].join("|")+"|$","g"),o=0,u="__p+='";t.replace(h,function(n,i,r,f,e){return u+=t.slice(o,e).replace(wt,function(n){return"\\"+pt[n]}),i&&(u+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'"),r&&(u+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),f&&(u+="';\n"+f+"\n__p+='"),o=e+n.length,n});u+="';\n";r.variable||(u="with(obj||{}){\n"+u+"}\n");u="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+u+"return __p;\n";try{f=new Function(r.variable||"obj","_",u)}catch(s){s.source=u;throw s;}return i?f(i,n):(e=function(t){return f.call(this,t,n)},e.source="function("+(r.variable||"obj")+"){\n"+u+"}",e)};n.chain=function(t){return n(t).chain()};l=function(t){return this._chain?n(t).chain():t};n.mixin(n);i(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var i=r[t];n.prototype[t]=function(){var n=this._wrapped;return i.apply(n,arguments),(t=="shift"||t=="splice")&&n.length===0&&delete n[0],l.call(this,n)}});i(["concat","join","slice"],function(t){var i=r[t];n.prototype[t]=function(){return l.call(this,i.apply(this._wrapped,arguments))}});n.extend(n.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this),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="3.2";u.players={};u.options={techOrder:["html5","flash"],html5:{},flash:{swf:"http://vjs.zencdn.net/c/video-js.swf",iFrameMode:!0},width:"auto",height:"auto",defaultVolume:0,components:{posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},CacheIndicatorButton:{}}};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/*@cc_on!@*/!1&&!/\s/.test("﻿")},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)},isTouch:!!("ontouchstart"in n||n.DocumentTouch&&r instanceof n.DocumentTouch),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(" ")}},remove:function(n,t){if(t){var i=t.indexOf(n);if(i!=-1)return t.splice(i,1)}},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;try{f=n.localStorage||!1}catch(u){return}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},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){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")},slideVisible:function(){var t=$(this.el).data("origheight"),n=$(this.el),i=this.player;n.show();t>0&&n.height()<t&&(n.stop(!0,!1),n.animate({height:t},300,function(){n.css({overflow:""});$(i.el).removeClass("controls-hidden").addClass("controls-show");i.controlBar.progressControl.seekBar.update()}))},slideHide:function(n,t){typeof t=="undefined"&&(t=!0);var i=$(this.el),u=i.height(),r=this.player;typeof i.data("origheight")=="undefined"&&i.data("origheight",u);this.player.controlBar.progressControl.seekBar.update();i.css({overflow:"hidden"});$(r.el).removeClass("controls-show");i.animate({height:0},600,function(){i.css({overflow:"hidden"});t===!0&&($(this).hide(),$(r.el).addClass("controls-hidden"))})},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)},addEvent:function(n,t){return i.addEvent(this.el,n,i.proxy(this,t))},removeEvent:function(n,t){return i.removeEvent(this.el,n,t)},triggerEvent:function(n,t){return i.triggerEvent(this.el,n,t)},one:function(n,t){i.one(this.el,n,i.proxy(this,t))},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.triggerEvent("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.Control=i.Component.extend({buildCSSClass:function(){return"vjs-control "+this._super()}});i.ControlBar=i.Component.extend({options:{loadEvent:"play",components:{PlayToggleWithReplay:{},Playlist:{},CVTimeDisplay:{},fullscreenToggle:{},popoutButton:{},DevicesButton:{},CVVolumeControlButton:{},ResolutionSelectorButton:{},ChapterListButton:{},MetaChapterListButton:{},ResourceListButton:{},ClosedCaptionButton:{},MasterClosedCaptionButton:{},progressControl:{}}},init:function(n,t){this._super(n,t);this.timer;this.justHidden=!1;this.hidden=!1;this.locked=!0;var r=this;this.player.autoHideControls=!0;this.player.showControls=!0;this.player.addEvent("play",this.proxy(function(){this.startHideControls(null,null,null,!0)}));this.player.one("play",this.proxy(function(){this.locked=!1}));i.isTouch&&(this.player.addEvent("touchstart",this.proxy(this.startHideControls)),this.player.addEvent("touchend",this.proxy(this.startHideControls)),this.player.addEvent("touchmove",this.proxy(this.startHideControls)));this.player.addEvent("mousemove",this.proxy(this.startHideControls));$(this.player.el).on("mouseleave",function(n){r.startHideControls(n,250,!0)});i.isTouch||this.addEvent("mouseover",this.proxy(function(){this.addClass("over")}));this.addEvent("mouseout",this.proxy(function(){this.removeClass("over")}));this.player.autoHideControls&&$(this.player.el).addClass("controls-show")},createElement:function(){return i.createElement("div",{className:"vjs-controls"})},fadeIn:function(){this._super();this.player.triggerEvent("controlsvisible")},fadeOut:function(){this._super();this.player.triggerEvent("controlshidden")},slideVisible:function(){this._super();this.player.triggerEvent("controlsvisible")},slideHide:function(n,t){this._super(n,t);this.player.triggerEvent("controlshidden")},hideCursor:function(){this.player.isFullScreen&&$(this.player.el).addClass("noCursor")},showCursor:function(){$(this.player.el).removeClass("noCursor")},lockShowing:function(){this.el.style.opacity="1"},hideControls:function(n){$(this.el).hasClass("over")||this.player.autoHideControls&&!this.locked&&(this.player.isFullScreen?this.slideHide():this.slideHide(n,!1),this.player.triggerEvent("titleHide"),this.hidden=!0,this.hideCursor())},showControls:function(n){this.player.showControls&&(this.slideVisible(),this.player.triggerEvent("titleShow"),this.showCursor(),this.hidden=!1,typeof n=="boolean"&&(this.locked=n),n||this.startHideControls())},startHideControls:function(n,t,i,r){var f=this,s=t||2e3,e=0,o=0,u;n&&(e=n.pageX,o=n.pageY,u=n.originalEvent,u&&u.touches&&u.touches.length>0&&u.touches[0]&&(e=u.touches[0].pageX,o=u.touches[0].pageY));(!this.justHidden||i)&&(this.mousex!=e&&this.mousey!=o||i)&&(this.hidden&&!r&&this.showControls(),this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(function(){f.justHidden=i?!1:!0;f.hideControls();setTimeout(function(){f.justHidden=!1},500)},s));n&&(this.mousex=n.pageX,this.mousey=n.pageY)}});i.Button=i.Control.extend({disabled:!1,init:function(n,t){this._super(n,t);this.addEvent("click",this.onClick);this.addEvent("focus",this.onFocus);this.addEvent("blur",this.onBlur)},createElement:function(n,t){return t=i.merge({className:this.buildCSSClass(),innerHTML:'<div><span class="vjs-control-text">'+(this.buttonText||"")+"<\/span><\/div>",role:"button",tabIndex:0,title:this.title||""},t),this._super(n,t)},onClick:function(){},onFocus:function(){i.addEvent(r,"keyup",i.proxy(this,this.onKeyPress))},onKeyPress:function(n){(n.which==32||n.which==13)&&(n.preventDefault(),this.onClick())},onBlur:function(){i.removeEvent(r,"keyup",i.proxy(this,this.onKeyPress))},disable:function(){$(this.el).addClass("disabled");this.disabled=!0},enable:function(){$(this.el).removeClass("disabled");this.disabled=!1}});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",title:"Play",init:function(n,t){this._super(n,t);n.addEvent("play",i.proxy(this,this.onPlay));n.addEvent("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");this.title="Pause";this.el.title=this.title},onPause:function(){i.removeClass(this.el,"vjs-playing");i.addClass(this.el,"vjs-paused");this.title="Play";this.el.title=this.title}});i.FullscreenToggle=i.Button.extend({buttonText:"Fullscreen",title:"Fullscreen",buildCSSClass:function(){return"vjs-fullscreen-control right "+this._super()},onClick:function(){$(".vjs-fullscreen-control").hasClass("disabled")||(this.player.isFullScreen?this.player.cancelFullScreen():this.player.requestFullScreen())}});i.PopoutButton=i.Button.extend({buttonText:"Pop out",title:"Pop Out",init:function(n,t){this._super(n,t);this.player.addEvent("popoutButtonHide",i.proxy(this,this.hide));this.player.addEvent("popoutButtonShow",i.proxy(this,this.show));this.player.origSrc="";this.player.origTime=0;this.hide();opener},buildCSSClass:function(){return"vjs-cv-popout-control right "+this._super()},onClick:function(){if(!$(".vjs-popout-control").hasClass("disabled"))if(opener)n.close();else if(cv.param.PlaylistId){var t="/home/ev?popout=true&p="+cv.param.PlaylistId+"&t="+this.player.currentTime()+"&i="+(this.player.playlist.getCurrentChapter()+1),r=n.open(t,"","height=480,width=854,resizable=1,toolbar=0,menubar=0,scrollbars=0,fullscreen=yes");r&&(this.player.pause(),this.player.origTime=this.player.currentTime(),this.player.origSrc=i.players.cvVideo.currentSrc())}},hide:function(){$(this.el).hide()},show:function(){$(this.el).show()}});i.BigPlayButton=i.Button.extend({init:function(n,t){this._super(n,t);n.addEvent("play",i.proxy(this,this.hide));n.addEvent("ended",i.proxy(this,this.show))},createElement:function(){return this._super("div",{className:"vjs-big-play-button",innerHTML:"<span><\/span>"})},onClick:function(){i.log("time:"+this.player.currentTime());this.player.play();this.player.triggerEvent("bigPlay:click")}});i.LoadingSpinner=i.Component.extend({init:function(n,t){this._super(n,t);n.addEvent("canplay",i.proxy(this,this.hide));n.addEvent("canplaythrough",i.proxy(this,this.hide));n.addEvent("playing",i.proxy(this,this.hide));n.addEvent("seeked",i.proxy(this,this.hide));n.addEvent("seeking",i.proxy(this,this.show));n.addEvent("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.addEvent("timeupdate",i.proxy(this,this.updateContent))},createElement:function(){var n=this._super("div",{className:"vjs-current-time vjs-time-controls "});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.addEvent("timeupdate",i.proxy(this,this.updateContent))},createElement:function(){var n=this._super("div",{className:"vjs-duration vjs-time-controls "});return this.content=i.createElement("div",{className:"vjs-duration-display",innerHTML:i.formatTime(this.options.duration||0)}),n.appendChild(i.createElement("div").appendChild(this.content)),n},updateContent:function(){this.player.duration()&&this.setContent(this.player.duration())},setContent:function(n){n&&(this.content.innerHTML=i.formatTime(n))}});i.TimeDivider=i.Component.extend({createElement:function(){return this._super("div",{className:"vjs-cv-time-divider",innerHTML:"<div><span>/<\/span><\/div>"})}});i.RemainingTimeDisplay=i.Component.extend({init:function(n,t){this._super(n,t);n.addEvent("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);this.playerEvent&&n.addEvent(this.playerEvent,i.proxy(this,this.update));this.addEvent("touchstart",this.onTouchStart);this.addEvent("mousedown",this.onMouseDown);this.addEvent("focus",this.onFocus);this.addEvent("blur",this.onBlur);this.player.addEvent("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)},onTouchStart:function(n){i.blockTextSelection();i.addEvent(r,"touchmove",i.proxy(this,this.onTouchMove));i.addEvent(r,"touchend",i.proxy(this,this.onMouseUp));n.stopPropagation&&n.stopPropagation();n.preventDefault()},onTouchMove:function(n){n.stopPropagation&&n.stopPropagation();this.onMouseMove(n)},onMouseDown:function(n){i.blockTextSelection();i.addEvent(r,"mousemove",i.proxy(this,this.onMouseMove));i.addEvent(r,"mouseup",i.proxy(this,this.onMouseUp));this.onMouseMove(n)},onMouseUp:function(){this.removeEvents();this.update()},removeEvents:function(){i.unblockTextSelection();i.removeEvent(r,"mousemove",this.onMouseMove,!1);i.removeEvent(r,"mouseup",this.onMouseUp,!1);i.removeEvent(r,"touchmove",this.onTouchMove,!1);i.removeEvent(r,"touchend",this.onMouseUp,!1)},getBarOffset:function(){return 0},update:function(){var n,t=this.getPercent();if(handle=this.handle,bar=this.bar,isNaN(t)&&(t=0),n=t,handle){var e=this.el,o=e.offsetWidth,r=handle.el.offsetWidth,u=r?r/o:0,s=1-u;adjustedProgress=t*s;n=adjustedProgress+u/2;n=Math.max(0,Math.min(1,n));handle.el.style.left=i.round(adjustedProgress*100,2)+"%"}var f=this.getBarOffset(),h=i.round(Math.max(0,n-f)*100,2)+"%",c=i.round(Math.max(0,f)*100,2)+"%";bar.el.style.width=h;bar.el.style.left=c},calculateDistance:function(n){var e=this.el,t=i.findPosX(e),r=e.offsetWidth,o=this.handle,u,f;return o&&(u=o.el.offsetWidth,t=t+u/2,r=r-u),f=n.pageX,n.originalEvent.touches&&(f=n.originalEvent.touches[0].pageX),Math.max(0,Math.min(1,(f-t)/r))},onFocus:function(){i.addEvent(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.removeEvent(r,"keyup",i.proxy(this,this.onKeyPress))}});i.ProgressControl=i.Component.extend({options:{components:{seekBar:{},clippingBar:{},clipIndicator:{}}},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"}}},init:function(n,t){this._super(n,t);n.addEvent("timeupdate",i.proxy(this,this.onTimeUpdate));n.addEvent("seeking",i.proxy(this,this.onSeeking));n.addEvent("updateseekbar",i.proxy(this,this.onTimeUpdate))},onTimeUpdate:function(n){this.player.scrubbing&&this.player.techName=="html5"||this.update(n)},onSeeking:function(n){this.update(n)},createElement:function(){return this._super("div",{className:"vjs-progress-holder"})},getBarOffset:function(){var n=this.player.duration(),t=this.player.options.startTime;return!n||!cv.isClipped()?0:t/n},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()},onTouchStart:function(n){this._super(n);this.onMouseDown(n)},onMouseMove:function(n){var f=this.player.options.startTime||0,i=this.player.options.endTime||0,r=this.player.duration(),t=this.calculateDistance(n)*r,u;(t===r&&(t=t-.1),i>0&&(t=Math.max(f,Math.min(i,t))),u=this.player.currentTime(),t!==u)&&this.player.currentTime(t)},onMouseUp:function(n){this._super(n);this.player.scrubbing=!1;this.player.triggerEvent("endseek");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.addEvent("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:""})}});i.VolumeHandle=i.Component.extend({createElement:function(){return this._super("div",{className:"vjs-volume-handle",innerHTML:""})}});i.MuteToggle=i.Button.extend({init:function(n,t){this._super(n,t);n.addEvent("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.addEvent("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.addEvent("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")}});Array.prototype.indexOf||(Array.prototype.indexOf=function(n){"use strict";var u,r,t,i;if(this===void 0||this===null)throw new TypeError;if((u=Object(this),r=u.length>>>0,r===0)||(t=0,arguments.length>0&&(t=Number(arguments[1]),t!==t?t=0:t!==0&&t!==1/0&&t!==-(1/0)&&(t=(t>0||-1)*Math.floor(Math.abs(t)))),t>=r))return-1;for(i=t>=0?t:Math.max(r-Math.abs(t),0);i<r;i++)if(i in u&&u[i]===n)return i;return-1});i.extend({addEvent: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)},removeEvent: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)}}},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},triggerEvent: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},one:function(n,t,r){i.addEvent(n,t,function(){i.removeEvent(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(" ");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(text,reviver){function walk(n,i){var u,f,r=n[i];if(r&&typeof r=="object")for(u in r)Object.prototype.hasOwnProperty.call(r,u)&&(f=walk(r,u),f!==t?r[u]=f:delete r[u]);return reviver.call(n,i,r)}var j;if(text=String(text),n.lastIndex=0,n.test(text)&&(text=text.replace(n,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}();i.Player=i.Component.extend({init:function(n,t,r){var f,o,s,l;this.tag=n;var e=this.el=i.createElement("div"),u=this.options={},a=u.width=n.getAttribute("width"),v=u.height=n.getAttribute("height"),h=a||300,c=v||150;if(n.player=e.player=this,this.ready(r),n.parentNode.insertBefore(e,n),e.appendChild(n),e.id=this.id=n.id,e.className=n.className,n.id+="_html5_api",n.className="vjs-tech",i.players[e.id]=this,e.setAttribute("width",h),e.setAttribute("height",c),e.style.width=h+"px",e.style.height=c+"px",n.removeAttribute("width"),n.removeAttribute("height"),i.merge(u,i.options),i.merge(u,this.getVideoTagSettings()),i.merge(u,t),n.removeAttribute("controls"),n.removeAttribute("poster"),n.hasChildNodes())for(f=0,o=n.childNodes;f<o.length;f++)(o[f].nodeName=="SOURCE"||o[f].nodeName=="TRACK")&&n.removeChild(o[f]);if(this.values={},this.addClass("vjs-paused"),this.addEvent("ended",this.onEnded),this.addEvent("play",this.onPlay),this.addEvent("pause",this.onPause),this.addEvent("progress",this.onProgress),this.addEvent("error",this.onError),u.controls&&this.ready(function(){this.initComponents()}),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,o=u.techOrder;f<o.length;f++)if(s=o[f],l=i[s],l.isSupported()){i.log("Using tech: "+s);this.loadTech(s);return}i.log("No playback tech found")}},values:{},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 t={sources:[],tracks:[]},n,i,r;if(t.src=this.tag.getAttribute("src"),t.controls=this.tag.getAttribute("controls")!==null,t.poster=this.tag.getAttribute("poster"),t.preload=this.tag.getAttribute("preload"),t.autoplay=this.tag.getAttribute("autoplay")!==null,t.loop=this.tag.getAttribute("loop")!==null,t.muted=this.tag.getAttribute("muted")!==null,this.tag.hasChildNodes())for(i=0,r=this.tag.childNodes;i<r.length;i++)n=r[i],n.nodeName=="SOURCE"&&t.sources.push({src:n.getAttribute("src"),type:n.getAttribute("type"),media:n.getAttribute("media"),title:n.getAttribute("title")}),n.nodeName=="TRACK"&&t.tracks.push({src:n.getAttribute("src"),kind:n.getAttribute("kind"),srclang:n.getAttribute("srclang"),label:n.getAttribute("label"),"default":n.getAttribute("default")!==null,title:n.getAttribute("title")});return t},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.addEvent("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.triggerEvent("progress"):this.bufferedPercent()==1&&(this.stopTrackingProgress(),this.triggerEvent("progress"))}),500)},stopTrackingProgress:function(){clearInterval(this.progressInterval)},manualTimeUpdatesOn:function(){this.manualTimeUpdates=!0;this.addEvent("play",this.trackCurrentTime);this.addEvent("pause",this.stopTrackingCurrentTime);this.tech.addEvent("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.triggerEvent("timeupdate")}),250)},stopTrackingCurrentTime:function(){clearInterval(this.currentTimeInterval)},onEnded:function(){this.options.loop?(this.currentTime(0),this.play()):(this.pause(),this.currentTime(0),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.triggerEvent("loadedalldata")},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.triggerEvent("timeupdate"),this):this.values.currentTime=this.techGet("currentTime")||0},duration:function(){return parseFloat(this.techGet("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,i){return n!==t?(this.el.width=n,this.el.style.width=n+"px",i||this.triggerEvent("resize"),this):parseInt(this.el.getAttribute("width"))},height:function(n){return n!==t?(this.el.height=n,this.el.style.height=n+"px",this.triggerEvent("resize"),this):parseInt(this.el.getAttribute("height"))},size:function(n,t){return this.width(n,!0).height(t)},supportsFullScreen:function(){return this.techGet("supportsFullScreen")||!1},requestFullScreen:function(){var n=i.support.requestFullScreen;return this.isFullScreen=!0,n?(this.triggerEvent("reqfs"),i.addEvent(r,n.eventName,this.proxy(function(){this.isFullScreen=!!r[n.isFullScreen];this.isFullScreen==!1&&i.removeEvent(r,n.eventName,arguments.callee);this.triggerEvent("fullscreenchange")})),this.tech.support.fullscreenResize===!1&&this.options.flash.iFrameMode!=!0?(this.pause(),this.unloadTech(),i.addEvent(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]()):this.el[n.requestFn]()):this.tech.supportsFullScreen()?(this.triggerEvent("fullscreenchange"),this.techCall("enterFullScreen")):(this.triggerEvent("fullscreenchange"),this.enterFullWindow()),this},cancelFullScreen:function(){var n=i.support.requestFullScreen;return this.isFullScreen=!1,n?(this.triggerEvent("cnfs"),this.tech.support.fullscreenResize===!1&&this.options.flash.iFrameMode!=!0?(this.pause(),this.unloadTech(),i.addEvent(r,n.eventName,this.proxy(function(){i.removeEvent(r,n.eventName,arguments.callee);this.loadTech(this.techName,{src:this.values.src})})),r[n.cancelFn]()):r[n.cancelFn]()):this.tech.supportsFullScreen()?(this.techCall("exitFullScreen"),this.triggerEvent("fullscreenchange")):(this.exitFullWindow(),this.triggerEvent("fullscreenchange")),this},enterFullWindow:function(){this.isFullWindow=!0;this.triggerEvent("reqfsw");this.docOrigOverflow=r.documentElement.style.overflow;i.addEvent(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.triggerEvent("enterFullWindow")},fullWindowOnEscKey:function(n){n.keyCode==27&&(this.isFullScreen==!0?this.cancelFullScreen():this.exitFullWindow())},exitFullWindow:function(){this.isFullWindow=!1;this.triggerEvent("cnfsw");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.triggerEvent("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(){for(var f=i.Player.prototype,u=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e=u[0],n,t=0;t<u.length;t++)if(u[t][1]in r){n=u[t];break}n&&(i.support.requestFullScreen={requestFn:n[0],cancelFn:n[1],eventName:n[4],isFullScreen:n[2]})}();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.html5=i.PlaybackTech.extend({init:function(n,t,r){this.player=n;this.el=this.createElement();this.ready(r);i.isTouch||this.addEvent("click",this.proxy(this.onClick));var u=t.source;u&&this.el.currentSrc==u.src?n.triggerEvent("loadstart"):u&&(this.el.src=u.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.")}},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="";return attrsString="",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){attrsString+=n+'="'+t+'" '}),'<object type="application/x-shockwave-flash"'+attrsString+">"+e+"<\/object>"};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.triggerEvent(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(){this.readyState==0&&this.load();this.mode==0&&(this.player.addEvent("timeupdate",this.proxy(this.update,this.id)),this.player.addEvent("ended",this.proxy(this.reset,this.id)),(this.kind=="captions"||this.kind=="subtitles")&&this.player.textTrackDisplay.addComponent(this))},deactivate:function(){this.player.removeEvent("timeupdate",this.proxy(this.update,this.id));this.player.removeEvent("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.triggerEvent("error");this.player.triggerEvent("closeCaptionSourceNullChange")},parseCues:function(n){var f,e,o,u,t,s,r,h;if(!n){this.player.triggerEvent("closeCaptionSourceNullChange");return}for(u=n.split("\n"),t="",r=1,h=u.length;r<h;r++)if(t=i.trim(u[r]),t){for(t.indexOf("-->")==-1?(s=t,t=i.trim(u[++r])):s=this.cues.length,f={id:s,index:this.cues.length},e=t.split(" --> "),f.startTime=this.parseCueTime(e[0]),f.endTime=this.parseCueTime(e[1]),o=[];u[++r]&&(t=i.trim(u[r]));)o.push(t);f.text=o.join("<br/>");this.cues.push(f)}this.player.triggerEvent("closeCaptionSourceChange");this.readyState=2;this.triggerEvent("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.triggerEvent("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.addEvent(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","default":t.default};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.addEvent("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.addEvent("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.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});i.autoSetup();n.VideoJS=n._V_=u}(window)