jQuery.webshims.register("dom-extend",function(b,g,j,k,l){var u=g.modules,m=/\s*,\s*/,p={},r={},o={},s={},n={},h=b.fn.val,w=function(c,f,a,d,e){return e?h.call(b(c)):h.call(b(c),a)};b.fn.val=function(c){var f=this[0];arguments.length&&null==c&&(c="");if(!arguments.length)return!f||1!==f.nodeType?h.call(this):b.prop(f,"value",c,"val",!0);if(b.isArray(c))return h.apply(this,arguments);var a=b.isFunction(c);return this.each(function(d){f=this;1===f.nodeType&&(a?(d=c.call(f,d,b.prop(f,"value",l,"val", !0)),null==d&&(d=""),b.prop(f,"value",d,"val")):b.prop(f,"value",c,"val"))})};var t="_webshimsLib"+Math.round(1E3*Math.random()),z=function(c,f,a){c=c.jquery?c[0]:c;if(!c)return a||{};var d=b.data(c,t);a!==l&&(d||(d=b.data(c,t,{})),f&&(d[f]=a));return f?d&&d[f]:d};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(c){b.fn[c.name]=function(){return this.map(function(){var b=z(this, "shadowData");return b&&b[c.prop]||this})}});["removeAttr","prop","attr"].forEach(function(c){p[c]=b[c];b[c]=function(f,a,d,e,g){var q="val"==e,v=!q?p[c]:w;if(!f||!r[a]||1!==f.nodeType||!q&&e&&"attr"==c&&b.attrFn[a])return v(f,a,d,e,g);var C=(f.nodeName||"").toLowerCase(),i=o[C],B="attr"==c&&(!1===d||null===d)?"removeAttr":c,h,j,k;i||(i=o["*"]);i&&(i=i[a]);i&&(h=i[B]);if(h){if("value"==a)j=h.isVal,h.isVal=q;if("removeAttr"===B)return h.value.call(f);if(d===l)return h.get?h.get.call(f):h.value;h.set&& ("attr"==c&&!0===d&&(d=a),k=h.set.call(f,d));if("value"==a)h.isVal=j}else k=v(f,a,d,e,g);if((d!==l||"removeAttr"===B)&&n[C]&&n[C][a]){var m;m="removeAttr"==B?!1:"prop"==B?!!d:!0;n[C][a].forEach(function(b){if(!b.only||(b.only="prop"==c)||"attr"==b.only&&"prop"!=c)b.call(f,d,m,q?"val":B,c)})}return k};s[c]=function(f,a,d){o[f]||(o[f]={});o[f][a]||(o[f][a]={});var e=o[f][a][c],i=function(b,f,e){return f&&f[b]?f[b]:e&&e[b]?e[b]:"prop"==c&&"value"==a?function(b){return d.isVal?w(this,a,b,!1,0===arguments.length): p[c](this,a,b)}:"prop"==c&&"value"==b&&d.value.apply?function(b){var f=p[c](this,a);f&&f.apply&&(f=f.apply(this,arguments));return f}:function(b){return p[c](this,a,b)}};o[f][a][c]=d;if(d.value===l){if(!d.set)d.set=d.writeable?i("set",d,e):g.cfg.useStrict&&"prop"==a?function(){throw a+" is readonly on "+f;}:b.noop;if(!d.get)d.get=i("get",d,e)}["value","get","set"].forEach(function(b){d[b]&&(d["_sup"+b]=i(b,e))})}});var e=!b.browser.msie||8j&&7")[0].readyState;if(!m.track)try{new TextTrackCue(2,3,"")}catch(g){m.track=!0}var h=j.cfg.track,k=function(e){b(e.target).filter("track").each(l)}, l=function(){if(m.track||!h.override&&3==b.prop(this,"readyState"))h.override=!0,j.reTest("track"),document.removeEventListener("error",k,!0),this&&b.nodeName(this,"track")?j.error("track support was overwritten. Please check your vtt including your vtt mime-type"):j.info("track support was overwritten. due to bad browser support")},p=function(){document.addEventListener("error",k,!0);m.track?l():b("track").each(l)};h.override||(j.isReady("track")?p():b(p))}();j.register("mediaelement-core",function(b, h,j,t,o){r=swfobject.hasFlashPlayerVersion("9.0.115");var e=h.mediaelement,a=function(a,c){var a=b(a),d={src:a.attr("src")||"",elem:a,srcProp:a.prop("src")};if(!d.src)return d;var f=a.attr("type");if(f)d.type=f,d.container=b.trim(f.split(";")[0]);else if(c||(c=a[0].nodeName.toLowerCase(),"source"==c&&(c=(a.closest("video, audio")[0]||{nodeName:"video"}).nodeName.toLowerCase())),f=e.getTypeForSrc(d.src,c))d.type=f,d.container=f;if(f=a.attr("media"))d.media=f;return d},d=!r&&"postMessage"in j&&k,i= function(){var a;return function(){!a&&d&&(a=!0,h.loader.loadScript("https://www.youtube.com/player_api"),b(function(){h.polyfill("mediaelement-yt")}))}}(),c=function(){r?p():i()};h.addPolyfill("mediaelement-yt",{test:!d,d:["dom-support"]});e.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"]}};e.mimeTypes.source=b.extend({},e.mimeTypes.audio,e.mimeTypes.video);e.getTypeForSrc=function(a,d){if(-1!=a.indexOf("youtube.com/watch?")|| -1!=a.indexOf("youtube.com/v/"))return"video/youtube";var a=a.split("?")[0].split("."),a=a[a.length-1],c;b.each(e.mimeTypes[d],function(b,d){if(-1!==d.indexOf(a))return c=b,!1});return c};e.srces=function(d,c){d=b(d);if(c)d.removeAttr("src").removeAttr("type").find("source").remove(),b.isArray(c)||(c=[c]),c.forEach(function(a){var b=t.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);d.append(b)}); else{var c=[],f=d[0].nodeName.toLowerCase(),e=a(d,f);e.src?c.push(e):b("source",d).each(function(){e=a(this,f);e.src&&c.push(e)});return c}};b.fn.loadMediaSrc=function(a,c){return this.each(function(){c!==o&&(b(this).removeAttr("poster"),c&&b.attr(this,"poster",c));e.srces(this,a);b(this).mediaLoad()})};e.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(","); e.canThirdPlaySrces=function(a,c){var f="";if(r||d)a=b(a),c=c||e.srces(a),b.each(c,function(a,b){if(b.container&&b.src&&(r&&-1!=e.swfMimeTypes.indexOf(b.container)||d&&"video/youtube"==b.container))return f=b,!1});return f};var f={};e.canNativePlaySrces=function(a,c){var d="";if(k){var a=b(a),i=(a[0].nodeName||"").toLowerCase();if(!f[i])return d;c=c||e.srces(a);b.each(c,function(b,c){if(c.type&&f[i].prop._supvalue.call(a[0],c.type))return d=c,!1})}return d};e.setError=function(a,c){c||(c="can't play sources"); b(a).pause().data("mediaerror",c);h.warn("mediaelementError: "+c);setTimeout(function(){b(a).data("mediaerror")&&b(a).trigger("mediaerror")},1)};var x=function(){var a;return function(b,f,g){h.ready(r?"mediaelement-swf":"mediaelement-yt",function(){e.createSWF?e.createSWF(b,f,g):a||(a=!0,c(),x(b,f,g))});!a&&d&&!e.createSWF&&i()}}(),y=function(a,b,c,d,f){c||!1!==c&&b&&"third"==b.isActive?(c=e.canThirdPlaySrces(a,d))?x(a,c,b):f?e.setError(a,!1):y(a,b,!1,d,!0):(c=e.canNativePlaySrces(a,d))?b&&"third"== b.isActive&&e.setActive(a,"html5",b):f?(e.setError(a,!1),b&&"third"==b.isActive&&e.setActive(a,"html5",b)):y(a,b,!0,d,!0)},A=/^(?:embed|object|datalist)$/i,D=function(a,c){var d=h.data(a,"mediaelementBase")||h.data(a,"mediaelementBase",{}),f=e.srces(a),i=a.parentNode;clearTimeout(d.loadTimer);b.data(a,"mediaerror",!1);if(f.length&&i&&!(1!=i.nodeType||A.test(i.nodeName||"")))c=c||h.data(a,"mediaelement"),y(a,c,u.preferFlash||o,f)};b(t).bind("ended",function(a){var c=h.data(a.target,"mediaelement"); (!l||c&&"html5"!=c.isActive||b.prop(a.target,"loop"))&&setTimeout(function(){!b.prop(a.target,"paused")&&b.prop(a.target,"loop")&&b(a.target).prop("currentTime",0).play()},1)});l||h.defineNodeNamesBooleanProperty(["audio","video"],"loop");["audio","video"].forEach(function(a){var c=h.defineNodeNameProperty(a,"load",{prop:{value:function(){var a=h.data(this,"mediaelement");D(this,a);k&&(!a||"html5"==a.isActive)&&c.prop._supvalue&&c.prop._supvalue.apply(this,arguments)}}});f[a]=h.defineNodeNameProperty(a, "canPlayType",{prop:{value:function(c){var d="";k&&f[a].prop._supvalue&&(d=f[a].prop._supvalue.call(this,c),"no"==d&&(d=""));!d&&r&&(c=b.trim((c||"").split(";")[0]),-1!=e.swfMimeTypes.indexOf(c)&&(d="maybe"));return d}}})});h.onNodeNamesPropertyModify(["audio","video"],["src","poster"],{set:function(){var a=this,b=h.data(a,"mediaelementBase")||h.data(a,"mediaelementBase",{});clearTimeout(b.loadTimer);b.loadTimer=setTimeout(function(){D(a);a=null},9)}});j=function(){h.addReady(function(a,c){b("video, audio", a).add(c.filter("video, audio")).each(function(){b.browser.msie&&8'),u=function(){if(l[0].querySelector)try{k.findRequired=!l[0].querySelector("select:required")}catch(b){k.findRequired=!1}};k.findRequired=!1;k.validationMessage=!1;k.valueAsNumberSet=!1;j.capturingEventPrevented=function(g){if(!g._isPolyfilled){var h=g.isDefaultPrevented, j=g.preventDefault;g.preventDefault=function(){clearTimeout(b.data(g.target,g.type+"DefaultPrevented"));b.data(g.target,g.type+"DefaultPrevented",setTimeout(function(){b.removeData(g.target,g.type+"DefaultPrevented")},30));return j.apply(this,arguments)};g.isDefaultPrevented=function(){return!(!h.apply(this,arguments)&&!b.data(g.target,g.type+"DefaultPrevented"))};g._isPolyfilled=!0}};if(!g.formvalidation||k.bustedValidity)u();else if(j.capturingEvents(["input"]),j.capturingEvents(["invalid"],!0), g.bugfreeformvalidation=!0,window.opera||b.browser.webkit||window.testGoodWithFix){var m=b("input",l).eq(0),p,r=function(b){j.loader.loadList(["dom-extend"]);j.ready("dom-extend",b)},o=function(k){var h=["form-extend","form-message","form-native-fix"];k&&(k.preventDefault(),k.stopImmediatePropagation());clearTimeout(p);setTimeout(function(){l&&(l.remove(),l=m=null)},9);if(!g.bugfreeformvalidation)j.addPolyfill("form-native-fix",{f:"forms",d:["form-extend"]}),j.modules["form-extend"].test=b.noop;j.isReady("form-number-date-api")&& h.push("form-number-date-api");j.reTest(h);if(m)try{m.prop({disabled:!0,value:""}).prop("disabled",!1).is(":valid")&&r(function(){j.onNodeNamesPropertyModify(["input","textarea"],["disabled","readonly"],{set:function(g){!g&&this&&b.prop(this,"value",b.prop(this,"value"))}});j.onNodeNamesPropertyModify(["select"],["disabled","readonly"],{set:function(g){if(!g&&this)g=b(this).val(),(b("option:last-child",this)[0]||{}).selected=!0,b(this).val(g)}})})}catch(o){}(b.browser.opera||window.testGoodWithFix)&& r(function(){var g=function(b){b.preventDefault()};["form","input","textarea","select"].forEach(function(h){var e=j.defineNodeNameProperty(h,"checkValidity",{prop:{value:function(){j.fromSubmit||b(this).bind("invalid.checkvalidity",g);j.fromCheckValidity=!0;var a=e.prop._supvalue.apply(this,arguments);j.fromSubmit||b(this).unbind("invalid.checkvalidity",g);j.fromCheckValidity=!1;return a}}})})})};l.appendTo("head");if(window.opera||window.testGoodWithFix){u();k.validationMessage=!m.prop("validationMessage"); if((g.inputtypes||{}).date){try{m.prop("valueAsNumber",0)}catch(s){}k.valueAsNumberSet="1970-01-01"!=m.prop("value")}m.prop("value","")}l.bind("submit",function(b){g.bugfreeformvalidation=!1;o(b)});p=setTimeout(function(){l&&l.triggerHandler("submit")},9);b("input, select",l).bind("invalid",o).filter('[type="submit"]').bind("click",function(b){b.stopImmediatePropagation()}).trigger("click");b.browser.webkit&&g.bugfreeformvalidation&&!j.bugs.bustedValidity&&function(){var g=/^(?:textarea|input)$/i, h=!1;document.addEventListener("contextmenu",function(b){g.test(b.target.nodeName||"")&&(h=b.target.form)&&setTimeout(function(){h=!1},1)},!1);b(window).bind("invalid",function(b){if(b.originalEvent&&h&&h==b.target.form)b.wrongWebkitInvalid=!0,b.stopImmediatePropagation()})}()}})(jQuery); jQuery.webshims.register("form-core",function(b,g,j,k,l,u){var m={radio:1},p={checkbox:1,radio:1},r=b([]),o=g.bugs,s=function(a){var a=b(a),d,e;d=r;if(m[a[0].type])e=a.prop("form"),d=(d=a[0].name)?e?b(e[d]):b(k.getElementsByName(d)).filter(function(){return!b.prop(this,"form")}):a,d=d.filter('[type="radio"]');return d},n=g.getContentValidationMessage=function(a,d,e){var c=b(a).data("errormessage")||a.getAttribute("x-moz-errormessage")||"";e&&c[e]&&(c=c[e]);"object"==typeof c&&(d=d||b.prop(a,"validity")|| {valid:1},d.valid||b.each(d,function(a,b){if(b&&"valid"!=a&&c[a])return c=c[a],!1}));if("object"==typeof c)c=c.defaultMessage;return c||""},h={number:1,range:1,date:1};b.extend(b.expr[":"],{"valid-element":function(a){return!(!b.prop(a,"willValidate")||!(b.prop(a,"validity")||{valid:1}).valid)},"invalid-element":function(a){return!(!b.prop(a,"willValidate")||(b.prop(a,"validity")||{valid:1}).valid)},"required-element":function(a){return!(!b.prop(a,"willValidate")||!b.prop(a,"required"))},"optional-element":function(a){return!!(b.prop(a, "willValidate")&&!1===b.prop(a,"required"))},"in-range":function(a){if(!h[b.prop(a,"type")]||!b.prop(a,"willValidate"))return!1;a=b.prop(a,"validity");return!(!a||a.rangeOverflow||a.rangeUnderflow)},"out-of-range":function(a){if(!h[b.prop(a,"type")]||!b.prop(a,"willValidate"))return!1;a=b.prop(a,"validity");return!(!a||!a.rangeOverflow&&!a.rangeUnderflow)}});["valid","invalid","required","optional"].forEach(function(a){b.expr[":"][a]=b.expr.filters[a+"-element"]});b.expr[":"].focus=function(a){try{var b= a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())}catch(e){}return!1};var w=b.event.customEvent||{};(o.bustedValidity||o.findRequired||!Modernizr.bugfreeformvalidation)&&function(){var a=b.find,d=b.find.matchesSelector,e=/(\:valid|\:invalid|\:optional|\:required|\:in-range|\:out-of-range)(?=[\s\[\~\.\+\>\:\#*]|$)/ig,c=function(a){return a+"-element"};b.find=function(){var b=Array.prototype.slice,d=function(d){var g=arguments,g=b.call(g,1,g.length);g.unshift(d.replace(e,c));return a.apply(this, g)},g;for(g in a)a.hasOwnProperty(g)&&(d[g]=a[g]);return d}();if(!Modernizr.prefixed||Modernizr.prefixed("matchesSelector",k.documentElement))b.find.matchesSelector=function(a,b){b=b.replace(e,c);return d.call(this,a,b)}}();var t=b.prop,z={selectedIndex:1,value:1,checked:1,disabled:1,readonly:1};b.prop=function(a,d,e){var c=t.apply(this,arguments);if(a&&"form"in a&&z[d]&&e!==l&&b(a).hasClass("form-ui-invalid")&&(b.prop(a,"validity")||{valid:1}).valid)b(a).getShadowElement().removeClass("form-ui-invalid"), "checked"==d&&e&&s(a).not(a).removeClass("form-ui-invalid").removeAttr("aria-invalid");return c};var e=function(a,d){var e;b.each(a,function(a,f){if(f)return e="customError"==a?b.prop(d,"validationMessage"):a,!1});return e};b(k).bind(u.validityUIEvents||"focusout change refreshvalidityui",function(a){var d,g;if(a.target&&(d=b(a.target).getNativeElement()[0],!("submit"==d.type||!b.prop(d,"willValidate")||"focusout"==a.type&&"radio"==a.type))){g=b.data(d,"webshimsswitchvalidityclass");var c=function(){var c= b.prop(d,"validity"),g=b(d).getShadowElement(),i,h,j,k;b(d).trigger("refreshCustomValidityRules");c.valid?g.hasClass("form-ui-valid")||(i="form-ui-valid",h="form-ui-invalid",k="changedvaliditystate",j="changedvalid",p[d.type]&&d.checked&&s(d).not(d).removeClass(h).addClass(i).removeAttr("aria-invalid"),b.removeData(d,"webshimsinvalidcause")):(c=e(c,d),b.data(d,"webshimsinvalidcause")!=c&&(b.data(d,"webshimsinvalidcause",c),k="changedvaliditystate"),g.hasClass("form-ui-invalid")||(i="form-ui-invalid", h="form-ui-valid",p[d.type]&&!d.checked&&s(d).not(d).removeClass(h).addClass(i),j="changedinvalid"));i&&(g.addClass(i).removeClass(h),setTimeout(function(){b(d).trigger(j)},0));k&&setTimeout(function(){b(d).trigger(k)},0);b.removeData(a.target,"webshimsswitchvalidityclass")};g&&clearTimeout(g);"refreshvalidityui"==a.type?c():b.data(a.target,"webshimsswitchvalidityclass",setTimeout(c,9))}});w.changedvaliditystate=!0;w.refreshCustomValidityRules=!0;w.changedvalid=!0;w.changedinvalid=!0;w.refreshvalidityui= !0;g.triggerInlineForm=function(a,d){b(a).trigger(d)};g.modules["form-core"].getGroupElements=s;o=function(){g.scrollRoot=b.browser.webkit||"BackCompat"==k.compatMode?b(k.body):b(k.documentElement)};o();g.ready("DOM",o);g.getRelOffset=function(a,d){var a=b(a),e=b(d).offset(),c;b.swap(b(a)[0],{visibility:"hidden",display:"inline-block",left:0,top:0},function(){c=a.offset()});e.top-=c.top;e.left-=c.left;return e};g.validityAlert=function(){var a=!b.browser.msie||7j&&(g.scrollRoot.animate({scrollTop:j-5},{queue:!1,duration:Math.max(Math.min(600,1.5*(h-j)),80)}),x=!0);try{i[0].focus()}catch(l){}x&&(g.scrollRoot.scrollTop(h),setTimeout(function(){g.scrollRoot.scrollTop(h)},0));setTimeout(function(){b(k).bind("focusout.validityalert",f)},10)},getMessage:function(a,c){c||(c=n(a[0])||a.prop("validationMessage"));c?b("span.va-box",d).text(c):this.hide()},position:function(a, c){c=c?b.extend({},c):h.getOffsetFromBody(a);c.top+=a.outerHeight();d.css(c)},show:function(){"none"===d.css("display")&&d.css({opacity:0}).show();d.addClass("va-visible").fadeTo(400,1)},hide:function(){d.removeClass("va-visible").fadeOut()},clear:function(){clearTimeout(!1);clearTimeout(e);b(k).unbind(".validityalert");b(j).unbind(".validityalert");d.stop().removeAttr("for")},_create:function(){if(!d)d=h.errorBubble=b("<"+a+' class="validity-alert-wrapper" role="alert">").css({position:"absolute",display:"none"}),g.ready("DOM",function(){d.appendTo("body");b.fn.bgIframe&&b.browser.msie&&7>parseInt(b.browser.version,10)&&d.bgIframe()})}};f=b.proxy(h,"hide");return h}();(function(){var a,d=[],e;b(k).bind("invalid",function(c){if(!c.wrongWebkitInvalid){var f=b(c.target),g=f.getShadowElement();g.hasClass("form-ui-invalid")||(g.addClass("form-ui-invalid").removeClass("form-ui-valid"),setTimeout(function(){b(c.target).trigger("changedinvalid").trigger("changedvaliditystate")}, 0));if(!a)a=b.Event("firstinvalid"),a.isInvalidUIPrevented=c.isDefaultPrevented,g=b.Event("firstinvalidsystem"),b(k).triggerHandler(g,{element:c.target,form:c.target.form,isInvalidUIPrevented:c.isDefaultPrevented}),f.trigger(a);a&&a.isDefaultPrevented()&&c.preventDefault();d.push(c.target);c.extraData="fix";clearTimeout(e);e=setTimeout(function(){var e={type:"lastinvalid",cancelable:!1,invalidlist:b(d)};a=!1;d=[];b(c.target).trigger(e,e)},9);g=f=null}})})();b.fn.getErrorMessage=function(){var a="", d=this[0];d&&(a=n(d)||b.prop(d,"customValidationMessage")||b.prop(d,"validationMessage"));return a};u.replaceValidationUI&&g.ready("DOM forms",function(){b(k).bind("firstinvalid",function(a){a.isInvalidUIPrevented()||(a.preventDefault(),b.webshims.validityAlert.showFor(a.target,b(a.target).prop("customValidationMessage")))})})}); jQuery.webshims.register("track",function(b,g,j,k){var l=g.mediaelement;(new Date).getTime();var u={subtitles:1,captions:1,descriptions:1},m=Modernizr.ES5&&Modernizr.objectAccessor,p=function(b){var a={};b.addEventListener=function(b,e){a[b]&&g.error("always use $.bind to the shimed event: "+b+" already bound fn was: "+a[b]+" your fn was: "+e);a[b]=e};b.removeEventListener=function(b,e){a[b]&&a[b]!=e&&g.error("always use $.bind/$.unbind to the shimed event: "+b+" already bound fn was: "+a[b]+" your fn was: "+ e);a[b]&&delete a[b]};return b},r={getCueById:function(b){for(var a=null,d=0,g=this.length;db.startTime&&g.error("cue startTime higher than previous cue's startTime")}else this.cues= l.createCueList();b.track&&b.track.removeCue&&b.track.removeCue(b);b.track=this;this.cues.push(b)},removeCue:function(b){var a=this.cues||[],d=0,i=a.length;if(b.track!=this)g.error("cue not part of track");else{for(;d")[0];j.TextTrackCue=function(b,a,d){3!=arguments.length&&g.error("wrong arguments.length for TextTrackCue.constructor");this.startTime=b;this.endTime=a;this.text=d;this.id="";this.pauseOnExit=!1;p(this)};j.TextTrackCue.prototype={onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var b="",a="",d=k.createDocumentFragment(),g;if(!h(this, "getCueAsHTML"))g=this.getCueAsHTML=function(){var c,f;if(b!=this.text){b=this.text;a=l.parseCueTextToHTML(b);z.innerHTML=a;for(c=0,f=z.childNodes.length;c]+>)/ig,a=/^(?:c|v|ruby|rt|b|i|u)/,d=/\<\s*\//,g=function(a,b,c,e){d.test(e)?a="":(c.splice(0,1), a="<"+a+" "+b+'="'+c.join(" ").replace(/\"/g,""")+'">');return a},c=function(b){var c=b.replace(/[<\/>]+/ig,"").split(/[\s\.]+/);c[0]&&(c[0]=c[0].toLowerCase(),a.test(c[0])?"c"==c[0]?b=g("span","class",c,b):"v"==c[0]&&(b=g("q","title",c,b)):b="");return b};return function(a){return a.replace(b,c)}}();l.loadTextTrack=function(e,a,d,i){var c=d.track,f=function(){var d=b.prop(a,"src"),i,h;if("disabled"!=c.mode&&d&&b.attr(a,"src")&&(b(e).unbind("play playing timeupdate updatetrackdisplay",f),b(a).unbind("checktrackmode", f),!c.readyState)){i=function(){c.readyState=3;c.cues=null;c.activeCues=c.shimActiveCues=c._shimActiveCues=null;b(a).triggerHandler("error")};c.readyState=1;try{c.cues=l.createCueList(),c.activeCues=c.shimActiveCues=c._shimActiveCues=l.createCueList(),h=b.ajax({dataType:"text",url:d,success:function(d){"text/vtt"!=h.getResponseHeader("content-type")&&g.error("set the mime-type of your WebVTT files to text/vtt. see: http://dev.w3.org/html5/webvtt/#text/vtt");l.parseCaptions(d,c,function(d){d&&"length"in d?(c.readyState=2,b(a).triggerHandler("load"),b(e).triggerHandler("updatetrackdisplay")):i()})},error:i})}catch(j){i(),g.warn(j)}}};c.readyState=0;c.shimActiveCues=null;c._shimActiveCues=null;c.activeCues=null;c.cues=null;b(e).unbind("play playing timeupdate updatetrackdisplay",f);b(a).unbind("checktrackmode",f);b(e).bind("play playing timeupdate updatetrackdisplay",f);b(a).bind("checktrackmode",f);if(i)c.mode=u[c.kind]?"showing":"hidden",f()};l.createTextTrack=function(e,a){var d,i;if(a.nodeName&& (i=g.data(a,"trackData")))t(a,i),d=i.track;if(!d)d=p(g.objectCreate(o)),m||s.forEach(function(c){var e=b.prop(a,c);e&&(d[n[c]||c]=e)}),a.nodeName?(m&&s.forEach(function(c){g.defineProperty(d,n[c]||c,{get:function(){return b.prop(a,c)}})}),i=g.data(a,"trackData",{track:d}),l.loadTextTrack(e,a,i,b.prop(a,"default")&&b(a).siblings("track[default]").andSelf()[0]==a)):(m&&s.forEach(function(b){g.defineProperty(d,n[b]||b,{value:a[b],writeable:!1})}),d.cues=l.createCueList(),d.activeCues=d._shimActiveCues= d.shimActiveCues=l.createCueList(),d.mode="hidden",d.readyState=2);return d};l.parseCaptionChunk=function(){var b=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,a=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,d=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,i=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(c){var f,h,j,k;if(a.exec(c)||d.exec(c)||i.exec(c))return null;for(c=c.split(/\n/g);!c[0].replace(/\s+/ig,"").length&&0=m&&(j||g.error("please use WebVTT format. This is the standard"),d(a.cues))},b=b.replace(/\r\n/g,"\n"),setTimeout(function(){b= b.replace(/\r/g,"\n");setTimeout(function(){h=(new Date).getTime();b=b.split(/\n\n+/g);c(0,b.length)},9)},9)):g.error("Required parameter captionData not supplied.")};l.createTrackList=function(b,a){a=a||g.data(b,"mediaelementBase")||g.data(b,"mediaelementBase",{});if(!a.textTracks)a.textTracks=[],g.defineProperties(a.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null}}),p(a.textTracks);return a.textTracks};Modernizr.track||(g.defineNodeNamesBooleanProperty(["track"],"default"),g.reflectProperties(["track"], ["srclang","label"]),g.defineNodeNameProperties("track",{src:{reflect:!0,propType:"src"}}));g.defineNodeNameProperties("track",{kind:{attr:Modernizr.track?{set:function(b){var a=g.data(this,"trackData");this.setAttribute("data-kind",b);if(a)a.attrKind=b},get:function(){var b=g.data(this,"trackData");return b&&"attrKind"in b?b.attrKind:this.getAttribute("kind")}}:{},reflect:!0,propType:"enumarated",defaultValue:"subtitles",limitedTo:["subtitles","captions","descriptions","chapters","metadata"]}}); b.each(s,function(e,a){var d=n[a]||a;g.onNodeNamesPropertyModify("track",a,function(){var e=g.data(this,"trackData"),c=this;if(e)"kind"==a&&t(this,e),m||(e.track[d]=b.prop(this,a)),clearTimeout(e.changedTrackPropTimer),e.changedTrackPropTimer=setTimeout(function(){b(c).trigger("updatesubtitlestate")},1)})});g.onNodeNamesPropertyModify("track","src",function(e){if(e){var e=g.data(this,"trackData"),a;e&&(a=b(this).closest("video, audio"),a[0]&&l.loadTextTrack(a,this,e))}});g.defineNodeNamesProperties(["track"], {ERROR:{value:3},LOADED:{value:2},LOADING:{value:1},NONE:{value:0},readyState:{get:function(){return(b.prop(this,"track")||{readyState:0}).readyState},writeable:!1},track:{get:function(){return l.createTextTrack(b(this).closest("audio, video")[0],this)},writeable:!1}},"prop");g.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var b=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{}),a=l.createTrackList(this,b);b.blockTrackListUpdate||w.call(this,b,a);return a}, writeable:!1},addTextTrack:{value:function(b,a,d){b=l.createTextTrack(this,{kind:b||"",label:a||"",srclang:d||""});a=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{});if(!a.scriptedTextTracks)a.scriptedTextTracks=[];a.scriptedTextTracks.push(b);w.call(this);return b}}},"prop");b(k).bind("emptied ended updatetracklist",function(e){if(b(e.target).is("audio, video")){var a=g.data(e.target,"mediaelementBase");if(a)clearTimeout(a.updateTrackListTimer),a.updateTrackListTimer=setTimeout(function(){w.call(e.target, a)},0)}});g.addReady(function(e,a){var d=a.filter("video, audio, track").closest("audio, video");b("video, audio",e).add(d).each(function(){w.call(this)}).each(function(){if(Modernizr.track){var a=this.textTracks;b.prop(this,"textTracks").length!=a.length&&g.error("textTracks couldn't be copied");b("track",this).each(function(){var a=b.prop(this,"track"),d=this.track,e,g;if(d){e=b.prop(this,"kind");g=d.readyState||this.readyState;if(d.mode||g)a.mode=d.mode;if("descriptions"!=e)d.mode="string"==typeof d.mode? "disabled":0,this.kind="metadata",b(this).attr({kind:e})}}).bind("load error",function(a){a.originalEvent&&a.stopImmediatePropagation()})}});d.each(function(){var a=this,b=g.data(a,"mediaelementBase");if(b)clearTimeout(b.updateTrackListTimer),b.updateTrackListTimer=setTimeout(function(){w.call(a,b)},9)})});Modernizr.track&&b("video, audio").trigger("trackapichange")});