(function(){var a=Function.prototype.call,h=Object.prototype,i=Array.prototype.slice,m,l;if(!Function.prototype.bind)Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var f=i.call(arguments,1),d=function(){if(this instanceof d){var c=function(){};c.prototype=b.prototype;var c=new c,k=b.apply(c,f.concat(i.call(arguments)));return null!==k&&Object(k)===k?k:c}return b.apply(a,f.concat(i.call(arguments)))};return d};l=a.bind(h.toString);m=a.bind(h.hasOwnProperty); if(!Array.isArray)Array.isArray=function(a){return"[object Array]"==l(a)};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,g){var f=b(this),d=0,c=f.length>>>0;if("[object Function]"!=l(a))throw new TypeError;for(;d>>0,c=Array(d);if("[object Function]"!=l(a))throw new TypeError;for(var k=0;k>>0,c=[];if("[object Function]"!=l(a))throw new TypeError;for(var k=0;k>>0;if("[object Function]"!=l(a))throw new TypeError;for(var c=0;c>>0;if("[object Function]"!=l(a))throw new TypeError; for(var c=0;c>>0;if("[object Function]"!=l(a))throw new TypeError;if(!f&&1==arguments.length)throw new TypeError;var d=0,c;if(2<=arguments.length)c=arguments[1];else{do{if(d in g){c=g[d++];break}if(++d>=f)throw new TypeError;}while(1)}for(;d>>0;if("[object Function]"!=l(a))throw new TypeError;if(!f&&1==arguments.length)throw new TypeError;var d,f=f-1;if(2<=arguments.length)d=arguments[1];else{do{if(f in g){d=g[f--];break}if(0>--f)throw new TypeError;}while(1)}do f in this&&(d=a.call(void 0,d,g[f],f,g));while(f--);return d};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){var g=b(this),f=g.length>>>0;if(!f)return-1;var d=0;1>>0;if(!f)return-1;var d=f-1;1f&&(a[b]="0"+f);return a.slice(0,3).join("-")+"T"+a.slice(3).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};if(!Date.now)Date.now=function(){return(new Date).getTime()};if(!Date.prototype.toJSON)Date.prototype.toJSON=function(){if("function"!=typeof this.toISOString)throw new TypeError;return this.toISOString()};a="\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"; if(!String.prototype.trim||a.trim()){var a="["+a+"]",s=RegExp("^"+a+a+"*"),t=RegExp(a+a+"*$");String.prototype.trim=function(){return(""+this).replace(s,"").replace(t,"")}}if("0".split(void 0,0).length){var v=String.prototype.split;String.prototype.split=function(a,b){return void 0===a&&0===b?[]:v.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var x=String.prototype.substr;String.prototype.substr=function(a,b){return x.call(this,0>a?0>(a=this.length+a)?0:a:a,b)}}var u=function(a){a=+a; a!==a?a=-1:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0i&&7")[0].readyState;if(!j.track)try{new TextTrackCue(2,3,"")}catch(h){j.track=!0}var l=i.cfg.track,m=function(b){a(b.target).filter("track").each(n)}, n=function(){if(j.track||!l.override&&3==a.prop(this,"readyState"))l.override=!0,i.reTest("track"),document.removeEventListener("error",m,!0),this&&a.nodeName(this,"track")?i.error("track support was overwritten. Please check your vtt including your vtt mime-type"):i.info("track support was overwritten. due to bad browser support")},p=function(){document.addEventListener("error",m,!0);j.track?n():a("track").each(n)};l.override||(i.isReady("track")?p():a(p))}();i.register("mediaelement-core",function(a, i,o,s,p){n=swfobject.hasFlashPlayerVersion("9.0.115");var b=i.mediaelement,e=function(c,d){var c=a(c),e={src:c.attr("src")||"",elem:c,srcProp:c.prop("src")};if(!e.src)return e;var f=c.attr("type");if(f)e.type=f,e.container=a.trim(f.split(";")[0]);else if(d||(d=c[0].nodeName.toLowerCase(),"source"==d&&(d=(c.closest("video, audio")[0]||{nodeName:"video"}).nodeName.toLowerCase())),f=b.getTypeForSrc(e.src,d))e.type=f,e.container=f;if(f=c.attr("media"))e.media=f;return e},g=!n&&"postMessage"in o&&m,f= function(){var c;return function(){!c&&g&&(c=!0,i.loader.loadScript("https://www.youtube.com/player_api"),a(function(){i.polyfill("mediaelement-yt")}))}}(),d=function(){n?r():f()};i.addPolyfill("mediaelement-yt",{test:!g,d:["dom-support"]});b.mimeTypes={audio:{"audio/ogg":["ogg","oga","ogm"],'audio/ogg;codecs="opus"':"opus","audio/mpeg":["mp2","mp3","mpga","mpega"],"audio/mp4":"mp4,mpg4,m4r,m4a,m4p,m4b,aac".split(","),"audio/wav":["wav"],"audio/3gpp":["3gp","3gpp"],"audio/webm":["webm"],"audio/fla":["flv", "f4a","fla"],"application/x-mpegURL":["m3u8","m3u"]},video:{"video/ogg":["ogg","ogv","ogm"],"video/mpeg":["mpg","mpeg","mpe"],"video/mp4":["mp4","mpg4","m4v"],"video/quicktime":["mov","qt"],"video/x-msvideo":["avi"],"video/x-ms-asf":["asf","asx"],"video/flv":["flv","f4v"],"video/3gpp":["3gp","3gpp"],"video/webm":["webm"],"application/x-mpegURL":["m3u8","m3u"],"video/MP2T":["ts"]}};b.mimeTypes.source=a.extend({},b.mimeTypes.audio,b.mimeTypes.video);b.getTypeForSrc=function(c,d){if(-1!=c.indexOf("youtube.com/watch?")|| -1!=c.indexOf("youtube.com/v/"))return"video/youtube";var c=c.split("?")[0].split("."),c=c[c.length-1],e;a.each(b.mimeTypes[d],function(a,b){if(-1!==b.indexOf(c))return e=a,!1});return e};b.srces=function(c,b){c=a(c);if(b)c.removeAttr("src").removeAttr("type").find("source").remove(),a.isArray(b)||(b=[b]),b.forEach(function(a){var b=s.createElement("source");"string"==typeof a&&(a={src:a});b.setAttribute("src",a.src);a.type&&b.setAttribute("type",a.type);a.media&&b.setAttribute("media",a.media);c.append(b)}); else{var b=[],d=c[0].nodeName.toLowerCase(),f=e(c,d);f.src?b.push(f):a("source",c).each(function(){f=e(this,d);f.src&&b.push(f)});return b}};a.fn.loadMediaSrc=function(c,d){return this.each(function(){d!==p&&(a(this).removeAttr("poster"),d&&a.attr(this,"poster",d));b.srces(this,c);a(this).mediaLoad()})};b.swfMimeTypes="video/3gpp,video/x-msvideo,video/quicktime,video/x-m4v,video/mp4,video/m4p,video/x-flv,video/flv,audio/mpeg,audio/aac,audio/mp4,audio/x-m4a,audio/m4a,audio/mp3,audio/x-fla,audio/fla,youtube/flv,jwplayer/jwplayer,video/youtube".split(","); b.canThirdPlaySrces=function(c,d){var e="";if(n||g)c=a(c),d=d||b.srces(c),a.each(d,function(a,c){if(c.container&&c.src&&(n&&-1!=b.swfMimeTypes.indexOf(c.container)||g&&"video/youtube"==c.container))return e=c,!1});return e};var c={};b.canNativePlaySrces=function(d,e){var f="";if(m){var d=a(d),g=(d[0].nodeName||"").toLowerCase();if(!c[g])return f;e=e||b.srces(d);a.each(e,function(a,b){if(b.type&&c[g].prop._supvalue.call(d[0],b.type))return f=b,!1})}return f};b.setError=function(c,b){b||(b="can't play sources"); a(c).pause().data("mediaerror",b);i.warn("mediaelementError: "+b);setTimeout(function(){a(c).data("mediaerror")&&a(c).trigger("mediaerror")},1)};var k=function(){var a;return function(c,e,h){i.ready(n?"mediaelement-swf":"mediaelement-yt",function(){b.createSWF?b.createSWF(c,e,h):a||(a=!0,d(),k(c,e,h))});!a&&g&&!b.createSWF&&f()}}(),z=function(a,c,d,e,f){d||!1!==d&&c&&"third"==c.isActive?(d=b.canThirdPlaySrces(a,e))?k(a,d,c):f?b.setError(a,!1):z(a,c,!1,e,!0):(d=b.canNativePlaySrces(a,e))?c&&"third"== c.isActive&&b.setActive(a,"html5",c):f?(b.setError(a,!1),c&&"third"==c.isActive&&b.setActive(a,"html5",c)):z(a,c,!0,e,!0)},A=/^(?:embed|object|datalist)$/i,D=function(c,d){var e=i.data(c,"mediaelementBase")||i.data(c,"mediaelementBase",{}),f=b.srces(c),g=c.parentNode;clearTimeout(e.loadTimer);a.data(c,"mediaerror",!1);if(f.length&&g&&!(1!=g.nodeType||A.test(g.nodeName||"")))d=d||i.data(c,"mediaelement"),z(c,d,q.preferFlash||p,f)};a(s).bind("ended",function(c){var b=i.data(c.target,"mediaelement"); (!l||b&&"html5"!=b.isActive||a.prop(c.target,"loop"))&&setTimeout(function(){!a.prop(c.target,"paused")&&a.prop(c.target,"loop")&&a(c.target).prop("currentTime",0).play()},1)});l||i.defineNodeNamesBooleanProperty(["audio","video"],"loop");["audio","video"].forEach(function(d){var e=i.defineNodeNameProperty(d,"load",{prop:{value:function(){var a=i.data(this,"mediaelement");D(this,a);m&&(!a||"html5"==a.isActive)&&e.prop._supvalue&&e.prop._supvalue.apply(this,arguments)}}});c[d]=i.defineNodeNameProperty(d, "canPlayType",{prop:{value:function(e){var f="";m&&c[d].prop._supvalue&&(f=c[d].prop._supvalue.call(this,e),"no"==f&&(f=""));!f&&n&&(e=a.trim((e||"").split(";")[0]),-1!=b.swfMimeTypes.indexOf(e)&&(f="maybe"));return f}}})});i.onNodeNamesPropertyModify(["audio","video"],["src","poster"],{set:function(){var a=this,c=i.data(a,"mediaelementBase")||i.data(a,"mediaelementBase",{});clearTimeout(c.loadTimer);c.loadTimer=setTimeout(function(){D(a);a=null},9)}});o=function(){i.addReady(function(c,b){a("video, audio", c).add(b.filter("video, audio")).each(function(){a.browser.msie&&8=c.duration||c.duration===c._lastDuration)c.duration=d}catch(f){}c.duration&& c.duration!=c._lastDuration?(e(c._elem,"durationchange"),("audio"==c._elemNodeName||c._callMeta)&&j.jwEvents.Model.META(a.extend({duration:c.duration},b),c),c._durationCalcs--):c._durationCalcs++}},c=function(a,b){3>a&&clearTimeout(b._canplaythroughTimer);if(3<=a&&3>b.readyState)b.readyState=a,e(b._elem,"canplay"),clearTimeout(b._canplaythroughTimer),b._canplaythroughTimer=setTimeout(function(){c(4,b)},4E3);if(4<=a&&4>b.readyState)b.readyState=a,e(b._elem,"canplaythrough");b.readyState=a};a.extend(a.event.customEvent, {updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});j.jwEvents={View:{PLAY:function(a){var c=p(a.id);if(c&&!c.stopPlayPause&&(c._ppFlag=!0,c.paused==a.state)){c.paused=!a.state;if(c.ended)c.ended=!1;e(c._elem,a.state?"play":"pause")}}},Model:{BUFFER:function(b){var e=p(b.id);if(e&&"percentage"in b&&e._bufferedEnd!=b.percentage){e.networkState=100==b.percentage?1:2;(isNaN(e.duration)||5b.percentage||100===b.percentage)&&d(e,b);if(e.ended)e.ended= !1;if(e.duration){2b.percentage?c(3,e):20b.percentage)e._bufferedStart=e.currentTime||0;e._bufferedEnd=b.percentage;e.buffered.length=1;if(100==b.percentage)e.networkState=1,c(4,e);a.event.trigger("progress",l,e._elem,!0)}}},META:function(a,b){if(b=b&&b.networkState?b:p(a.id))if("duration"in a){if(!b._metadata||!((!a.height||b.videoHeight==a.height)&&a.duration===b.duration)){b._metadata=!0;var d=b.duration;if(a.duration)b.duration= a.duration;b._lastDuration=b.duration;if(a.height||a.width)b.videoHeight=a.height||0,b.videoWidth=a.width||0;if(!b.networkState)b.networkState=2;1>b.readyState&&c(1,b);b.duration&&d!==b.duration&&e(b._elem,"durationchange");e(b._elem,"loadedmetadata")}}else b._callMeta=!0},TIME:function(a){var b=p(a.id);if(b&&b.currentTime!==a.position){b.currentTime=a.position;b.duration&&b.durationb.readyState&&c(2,b);if(b.ended)b.ended=!1;e(b._elem,"timeupdate")}},STATE:function(a){var b= p(a.id);if(b)switch(a.newstate){case "BUFFERING":if(b.ended)b.ended=!1;c(1,b);e(b._elem,"waiting");break;case "PLAYING":b.paused=!1;b._ppFlag=!0;b.duration||d(b,a);3>b.readyState&&c(3,b);if(b.ended)b.ended=!1;e(b._elem,"playing");break;case "PAUSED":if(!b.paused&&!b.stopPlayPause)b.paused=!0,b._ppFlag=!0,e(b._elem,"pause");break;case "COMPLETED":4>b.readyState&&c(4,b),b.ended=!0,e(b._elem,"ended")}}},Controller:{ERROR:function(a){var b=p(a.id);b&&j.setError(b._elem,a.message)},SEEK:function(a){var b= p(a.id);if(b){if(b.ended)b.ended=!1;if(b.paused)try{b.jwapi.sendEvent("play","false")}catch(c){}if(b.currentTime!=a.position)b.currentTime=a.position,e(b._elem,"timeupdate")}},VOLUME:function(a){var b=p(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,e(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=p(a.id);if(b&&b.muted!=a.state)b.muted=a.state,e(b._elem,"volumechange")}}}};var k=function(b){var c=!0;a.each(j.jwEvents,function(d,e){a.each(e,function(a){try{b.jwapi["add"+d+"Listener"](a, "jQuery.webshims.mediaelement.jwEvents."+d+"."+a)}catch(e){return c=!1}})});return c},z=function(a){var b=a.actionQueue.length,c=0,d;if(b&&"third"==a.isActive)for(;a.actionQueue.length&&b>c;)c++,d=a.actionQueue.shift(),a.jwapi[d.fn].apply(a.jwapi,d.args);if(a.actionQueue.length)a.actionQueue=[]},A=function(b){b&&(b._ppFlag===l&&a.prop(b._elem,"autoplay")||!b.paused)&&setTimeout(function(){if("third"==b.isActive&&(b._ppFlag===l||!b.paused))try{a(b._elem).play()}catch(c){}},1)},D=function(b){if(b&& "video"==b._elemNodeName){var c,d,e,f,g,h,k,i,j=function(j,l){if(l&&j&&!(1>l||1>j||"third"!=b.isActive))if(c&&(c.remove(),c=!1),f=j,g=l,clearTimeout(k),d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e){h=h||a(b._elem).getShadowElement();var m;d&&!e?(m=h.height(),j*=m/l,l=m):!d&&e&&(m=h.width(),l*=m/j,j=m);i=!0;setTimeout(function(){i=!1},9);h.css({width:j,height:l})}},l=function(){if(!("third"!=b.isActive||a.prop(b._elem,"readyState")&&a.prop(this,"videoWidth"))){var f=a.prop(b._elem, "poster");if(f&&(d="auto"==b._elem.style.width,e="auto"==b._elem.style.height,d||e))c&&(c.remove(),c=!1),c=a(''),c.bind("load error alreadycomplete",function(){clearTimeout(k);var b=this,d=b.naturalWidth||b.width||b.offsetWidth,e=b.naturalHeight||b.height||b.offsetHeight;e&&d?(j(d,e),b=null):setTimeout(function(){d=b.naturalWidth||b.width||b.offsetWidth;e=b.naturalHeight||b.height||b.offsetHeight; j(d,e);c&&(c.remove(),c=!1);b=null},9);a(this).unbind()}).prop("src",f).appendTo("body").each(function(){this.complete||this.error?a(this).triggerHandler("alreadycomplete"):(clearTimeout(k),k=setTimeout(function(){a(b._elem).triggerHandler("error")},9999))})}};a(b._elem).bind("loadedmetadata",function(){j(a.prop(this,"videoWidth"),a.prop(this,"videoHeight"))}).bind("emptied",l).bind("swfstageresize updatemediaelementdimensions",function(){i||j(f,g)}).bind("emptied",function(){f=void 0;g=void 0}).triggerHandler("swfstageresize"); l();a.prop(b._elem,"readyState")&&j(a.prop(b._elem,"videoWidth"),a.prop(b._elem,"videoHeight"))}};j.playerResize=function(b){b&&(b=m.getElementById(b.replace(u,"")))&&a(b).triggerHandler("swfstageresize")};a(m).bind("emptied",function(a){a=b(a.target);A(a)});var w;j.jwPlayerReady=function(b){var c=p(b.id),d=0,e=function(){if(!(9f||6<=f)&&h.warn("mediaelement-swf is only testet with jwplayer 5.6+")}c.wasSwfReady= !0;c.tryedReframeing=0;z(c);A(c)}else clearTimeout(c.reframeTimer),c.reframeTimer=setTimeout(e,9*d),2c.tryedReframeing&&(c.tryedReframeing++,c.shadowElem.css({overflow:"visible"}),setTimeout(function(){c.shadowElem.css({overflow:"hidden"})},16))};if(c&&c.jwapi){if(!c.tryedReframeing)c.tryedReframeing=0;clearTimeout(w);c.jwData=b;c.shadowElem.removeClass("flashblocker-assumed");a.prop(c._elem,"volume",c.volume);a.prop(c._elem,"muted",c.muted);e()}};var y=a.noop;if(n){var B={play:1,playing:1}, F="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),G=F.map(function(a){return a+".webshimspolyfill"}).join(" "),H=function(b){var c=h.data(b.target,"mediaelement");c&&(b.originalEvent&&b.originalEvent.type===b.type)==("third"==c.activating)&&(b.stopImmediatePropagation(),B[b.type]&&c.isActive!=c.activating&&a(b.target).pause())},y=function(b){a(b).unbind(G).bind(G,H);F.forEach(function(a){h.moveToFirstEvent(b,a)})};y(m)}j.setActive=function(b,c, d){d||(d=h.data(b,"mediaelement"));if(d&&d.isActive!=c){"html5"!=c&&"third"!=c&&h.warn("wrong type for mediaelement activating: "+c);var e=h.data(b,"shadowData");d.activating=c;a(b).pause();d.isActive=c;"third"==c?(e.shadowElement=e.shadowFocusElement=d.shadowElem[0],a(b).addClass("swf-api-active nonnative-api-active").hide().getShadowElement().show()):(a(b).removeClass("swf-api-active nonnative-api-active").show().getShadowElement().hide(),e.shadowElement=e.shadowFocusElement=!1);a(b).trigger("mediaelementapichange")}}; var I=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(d){if(d){var f=b,g=d.networkState;for(c(0,d);--f;)delete d[a[f]];d.actionQueue=[];d.buffered.length=0;g&&e(d._elem,"emptied")}}}(),E=function(b,c){var d=b._elem,e=b.shadowElem;a(d)[c?"addClass":"removeClass"]("webshims-controls");"audio"==b._elemNodeName&&!c?e.css({width:0,height:0}):e.css({width:d.style.width|| a(d).width(),height:d.style.height||a(d).height()})};j.createSWF=function(b,c,d){if(o){1>s?s=1:s++;var e=a.extend({},q.jwVars,{image:a.prop(b,"poster")||"",file:c.srcProp}),k=a(b).data("jwvars")||{};d||(d=h.data(b,"mediaelement"));if(d&&d.swfCreated)j.setActive(b,"third",d),I(d),d.currentSrc=c.srcProp,a.extend(e,k),q.changeJW(e,b,c,d,"load"),C(b,"sendEvent",["LOAD",e]);else{var i=a.prop(b,"controls"),l="jwplayer-"+h.getID(b),m=a.extend({},q.jwParams,a(b).data("jwparams")),z=b.nodeName.toLowerCase(), p=a.extend({},q.jwAttrs,{name:l,id:l},a(b).data("jwattrs")),A=a('
').css({position:"relative",overflow:"hidden"}),d=h.data(b,"mediaelement",h.objectCreate(x,{actionQueue:{value:[]},shadowElem:{value:A},_elemNodeName:{value:z},_elem:{value:b},currentSrc:{value:c.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(a){if(a>=d.buffered.length)h.error("buffered index size error");else return 0},end:function(a){if(a>= d.buffered.length)h.error("buffered index size error");else return(d.duration-d._bufferedStart)*d._bufferedEnd/100+d._bufferedStart},length:0}}}));E(d,i);A.insertBefore(b);n&&a.extend(d,{volume:a.prop(b,"volume"),muted:a.prop(b,"muted")});a.extend(e,{id:l,controlbar:i?q.jwVars.controlbar||("video"==z?"over":"bottom"):"video"==z?"none":"bottom",icons:""+(i&&"video"==z)},k,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});e.plugins=e.plugins?e.plugins+(","+f):f;h.addShadowDom(b,A);y(b);j.setActive(b, "third",d);q.changeJW(e,b,c,d,"embed");a(b).bind("updatemediaelementdimensions updateshadowdom",function(){E(d,a.prop(b,"controls"))});D(d);r.embedSWF(g,l,"100%","100%","9.0.0",!1,e,m,p,function(c){if(c.success)d.jwapi=c.ref,i||a(c.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!c.ref.parentNode&&A[0].parentNode||"none"==c.ref.style.display)A.addClass("flashblocker-assumed"),a(b).trigger("flashblocker"),h.warn("flashblocker assumed");a(c.ref).css({minHeight:"2px",minWidth:"2px", display:"block"})},9),w||(clearTimeout(w),w=setTimeout(function(){var b=a(c.ref);1b[0].offsetWidth||2>b[0].offsetHeight)&&h.warn("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){a(b).mediaLoad()}, 1)};var C=function(a,c,d,e){return(e=e||b(a))?(e.jwapi&&e.jwapi[c]?e.jwapi[c].apply(e.jwapi,d||[]):(e.actionQueue.push({fn:c,args:d}),10a||100h.browserVersion,L={object:1,OBJECT:1};a.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&s)for(b=0;ba.startTime&&h.error("cue startTime higher than previous cue's startTime")}else this.cues= l.createCueList();a.track&&a.track.removeCue&&a.track.removeCue(a);a.track=this;this.cues.push(a)},removeCue:function(a){var e=this.cues||[],g=0,f=e.length;if(a.track!=this)h.error("cue not part of track");else{for(;g")[0];i.TextTrackCue=function(a,e,g){3!=arguments.length&&h.error("wrong arguments.length for TextTrackCue.constructor");this.startTime=a;this.endTime=e;this.text=g;this.id="";this.pauseOnExit=!1;r(this)};i.TextTrackCue.prototype={onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var a="",e="",g=m.createDocumentFragment(),f;if(!v(this, "getCueAsHTML"))f=this.getCueAsHTML=function(){var d,c;if(a!=this.text){a=this.text;e=l.parseCueTextToHTML(a);p.innerHTML=e;for(d=0,c=p.childNodes.length;d]+>)/ig,e=/^(?:c|v|ruby|rt|b|i|u)/,g=/\<\s*\//,f=function(a,b,d,e){g.test(e)?a="":(d.splice(0,1), a="<"+a+" "+b+'="'+d.join(" ").replace(/\"/g,""")+'">');return a},d=function(a){var b=a.replace(/[<\/>]+/ig,"").split(/[\s\.]+/);b[0]&&(b[0]=b[0].toLowerCase(),e.test(b[0])?"c"==b[0]?a=f("span","class",b,a):"v"==b[0]&&(a=f("q","title",b,a)):a="");return a};return function(c){return c.replace(a,d)}}();l.loadTextTrack=function(b,e,g,f){var d=g.track,c=function(){var f=a.prop(e,"src"),g,i;if("disabled"!=d.mode&&f&&a.attr(e,"src")&&(a(b).unbind("play playing timeupdate updatetrackdisplay",c),a(e).unbind("checktrackmode", c),!d.readyState)){g=function(){d.readyState=3;d.cues=null;d.activeCues=d.shimActiveCues=d._shimActiveCues=null;a(e).triggerHandler("error")};d.readyState=1;try{d.cues=l.createCueList(),d.activeCues=d.shimActiveCues=d._shimActiveCues=l.createCueList(),i=a.ajax({dataType:"text",url:f,success:function(c){"text/vtt"!=i.getResponseHeader("content-type")&&h.error("set the mime-type of your WebVTT files to text/vtt. see: http://dev.w3.org/html5/webvtt/#text/vtt");l.parseCaptions(c,d,function(c){c&&"length"in c?(d.readyState=2,a(e).triggerHandler("load"),a(b).triggerHandler("updatetrackdisplay")):g()})},error:g})}catch(j){g(),h.warn(j)}}};d.readyState=0;d.shimActiveCues=null;d._shimActiveCues=null;d.activeCues=null;d.cues=null;a(b).unbind("play playing timeupdate updatetrackdisplay",c);a(e).unbind("checktrackmode",c);a(b).bind("play playing timeupdate updatetrackdisplay",c);a(e).bind("checktrackmode",c);if(f)d.mode=q[d.kind]?"showing":"hidden",c()};l.createTextTrack=function(b,e){var g,f;if(e.nodeName&& (f=h.data(e,"trackData")))u(e,f),g=f.track;if(!g)g=r(h.objectCreate(o)),j||s.forEach(function(b){var c=a.prop(e,b);c&&(g[t[b]||b]=c)}),e.nodeName?(j&&s.forEach(function(b){h.defineProperty(g,t[b]||b,{get:function(){return a.prop(e,b)}})}),f=h.data(e,"trackData",{track:g}),l.loadTextTrack(b,e,f,a.prop(e,"default")&&a(e).siblings("track[default]").andSelf()[0]==e)):(j&&s.forEach(function(a){h.defineProperty(g,t[a]||a,{value:e[a],writeable:!1})}),g.cues=l.createCueList(),g.activeCues=g._shimActiveCues= g.shimActiveCues=l.createCueList(),g.mode="hidden",g.readyState=2);return g};l.parseCaptionChunk=function(){var a=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,e=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,g=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,f=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(d){var c,i,j,l;if(e.exec(d)||g.exec(d)||f.exec(d))return null;for(d=d.split(/\n/g);!d[0].replace(/\s+/ig,"").length&&0=n&&(j||h.error("please use WebVTT format. This is the standard"),g(e.cues))},a=a.replace(/\r\n/g,"\n"),setTimeout(function(){a= a.replace(/\r/g,"\n");setTimeout(function(){i=(new Date).getTime();a=a.split(/\n\n+/g);d(0,a.length)},9)},9)):h.error("Required parameter captionData not supplied.")};l.createTrackList=function(a,e){e=e||h.data(a,"mediaelementBase")||h.data(a,"mediaelementBase",{});if(!e.textTracks)e.textTracks=[],h.defineProperties(e.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null}}),r(e.textTracks);return e.textTracks};Modernizr.track||(h.defineNodeNamesBooleanProperty(["track"],"default"),h.reflectProperties(["track"], ["srclang","label"]),h.defineNodeNameProperties("track",{src:{reflect:!0,propType:"src"}}));h.defineNodeNameProperties("track",{kind:{attr:Modernizr.track?{set:function(a){var e=h.data(this,"trackData");this.setAttribute("data-kind",a);if(e)e.attrKind=a},get:function(){var a=h.data(this,"trackData");return a&&"attrKind"in a?a.attrKind:this.getAttribute("kind")}}:{},reflect:!0,propType:"enumarated",defaultValue:"subtitles",limitedTo:["subtitles","captions","descriptions","chapters","metadata"]}}); a.each(s,function(b,e){var g=t[e]||e;h.onNodeNamesPropertyModify("track",e,function(){var b=h.data(this,"trackData"),d=this;if(b)"kind"==e&&u(this,b),j||(b.track[g]=a.prop(this,e)),clearTimeout(b.changedTrackPropTimer),b.changedTrackPropTimer=setTimeout(function(){a(d).trigger("updatesubtitlestate")},1)})});h.onNodeNamesPropertyModify("track","src",function(b){if(b){var b=h.data(this,"trackData"),e;b&&(e=a(this).closest("video, audio"),e[0]&&l.loadTextTrack(e,this,b))}});h.defineNodeNamesProperties(["track"], {ERROR:{value:3},LOADED:{value:2},LOADING:{value:1},NONE:{value:0},readyState:{get:function(){return(a.prop(this,"track")||{readyState:0}).readyState},writeable:!1},track:{get:function(){return l.createTextTrack(a(this).closest("audio, video")[0],this)},writeable:!1}},"prop");h.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var a=h.data(this,"mediaelementBase")||h.data(this,"mediaelementBase",{}),e=l.createTrackList(this,a);a.blockTrackListUpdate||x.call(this,a,e);return e}, writeable:!1},addTextTrack:{value:function(a,e,g){a=l.createTextTrack(this,{kind:a||"",label:e||"",srclang:g||""});e=h.data(this,"mediaelementBase")||h.data(this,"mediaelementBase",{});if(!e.scriptedTextTracks)e.scriptedTextTracks=[];e.scriptedTextTracks.push(a);x.call(this);return a}}},"prop");a(m).bind("emptied ended updatetracklist",function(b){if(a(b.target).is("audio, video")){var e=h.data(b.target,"mediaelementBase");if(e)clearTimeout(e.updateTrackListTimer),e.updateTrackListTimer=setTimeout(function(){x.call(b.target, e)},0)}});h.addReady(function(b,e){var g=e.filter("video, audio, track").closest("audio, video");a("video, audio",b).add(g).each(function(){x.call(this)}).each(function(){if(Modernizr.track){var b=this.textTracks;a.prop(this,"textTracks").length!=b.length&&h.error("textTracks couldn't be copied");a("track",this).each(function(){var b=a.prop(this,"track"),c=this.track,e,f;if(c){e=a.prop(this,"kind");f=c.readyState||this.readyState;if(c.mode||f)b.mode=c.mode;if("descriptions"!=e)c.mode="string"==typeof c.mode? "disabled":0,this.kind="metadata",a(this).attr({kind:e})}}).bind("load error",function(a){a.originalEvent&&a.stopImmediatePropagation()})}});g.each(function(){var a=this,b=h.data(a,"mediaelementBase");if(b)clearTimeout(b.updateTrackListTimer),b.updateTrackListTimer=setTimeout(function(){x.call(a,b)},9)})});Modernizr.track&&a("video, audio").trigger("trackapichange")});