(function(){var a=Function.prototype.call,g=Object.prototype,h=Array.prototype.slice,m,k;if(!Function.prototype.bind)Function.prototype.bind=function(a){var e=this;if("function"!=typeof e)throw new TypeError;var b=h.call(arguments,1),d=function(){if(this instanceof d){var c=function(){};c.prototype=e.prototype;var c=new c,f=e.apply(c,b.concat(h.call(arguments)));return null!==f&&Object(f)===f?f:c}return e.apply(a,b.concat(h.call(arguments)))};return d};k=a.bind(g.toString);m=a.bind(g.hasOwnProperty); if(!Array.isArray)Array.isArray=function(a){return"[object Array]"==k(a)};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,e){var b=q(this),d=0,c=b.length>>>0;if("[object Function]"!=k(a))throw new TypeError;for(;d>>0,c=Array(d);if("[object Function]"!=k(a))throw new TypeError;for(var f=0;f>>0,c=[];if("[object Function]"!=k(a))throw new TypeError;for(var f=0;f>>0;if("[object Function]"!=k(a))throw new TypeError;for(var c=0;c>>0;if("[object Function]"!=k(a))throw new TypeError; for(var c=0;c>>0;if("[object Function]"!=k(a))throw new TypeError;if(!b&&1==arguments.length)throw new TypeError;var d=0,c;if(2<=arguments.length)c=arguments[1];else{do{if(d in e){c=e[d++];break}if(++d>=b)throw new TypeError;}while(1)}for(;d>>0;if("[object Function]"!=k(a))throw new TypeError;if(!b&&1==arguments.length)throw new TypeError;var d,b=b-1;if(2<=arguments.length)d=arguments[1];else{do{if(b in e){d=e[b--];break}if(0>--b)throw new TypeError;}while(1)}do b in this&&(d=a.call(void 0,d,e[b],b,e));while(b--);return d};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){var e=q(this),b=e.length>>>0;if(!b)return-1;var d=0;1>>0;if(!b)return-1;var d=b-1;1b&&(a[e]="0"+b);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+"]",y=RegExp("^"+a+a+"*"),w=RegExp(a+a+"*$");String.prototype.trim=function(){return(""+this).replace(y,"").replace(w,"")}}if("0".split(void 0,0).length){var u=String.prototype.split;String.prototype.split=function(a,e){return void 0===a&&0===e?[]:u.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var x=String.prototype.substr;String.prototype.substr=function(a,e){return x.call(this,0>a?0>(a=this.length+a)?0:a:a,e)}}var v=function(a){a=+a; a!==a?a=-1:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0e.runs&&setTimeout(e.test,30)):e.runs=0},handler:function(g){clearTimeout(d);d=setTimeout(function(){if("resize"==g.type){var d=a(h).width(),i=a(h).width();if(i==c&&d==b)return;c=i;b=d;e.height=e.getHeight();e.width=e.getWidth()}a.event.trigger("updateshadowdom")},"resize"==g.type?50:9)},_create:function(){a.each({Height:"getHeight",Width:"getWidth"},function(a,d){var c=m.body,b=m.documentElement;e[d]=function(){return Math.max(c["scroll"+a],b["scroll"+a],c["offset"+a],b["offset"+a],b["client"+ a])}})},start:function(){if(!this.init&&m.body)this.init=!0,this._create(),this.height=e.getHeight(),this.width=e.getWidth(),setInterval(this.test,400),a(this.test),a(h).bind("load",this.test),a(h).bind("resize",this.handler),function(){var d=a.fn.animate,c;a.fn.animate=function(){clearTimeout(c);c=setTimeout(function(){e.test();e.handler({type:"animationstart"})},19);return d.apply(this,arguments)}}()}};a.event.customEvent.updateshadowdom=!0;g.docObserve=function(){g.ready("DOM",function(){e.start()})}; return function(d,c,b){b=b||{};d.jquery&&(d=d[0]);c.jquery&&(c=c[0]);var f=a.data(d,v)||a.data(d,v,{}),e=a.data(c,v)||a.data(c,v,{}),j={};if(b.shadowFocusElement){if(b.shadowFocusElement){if(b.shadowFocusElement.jquery)b.shadowFocusElement=b.shadowFocusElement[0];j=a.data(b.shadowFocusElement,v)||a.data(b.shadowFocusElement,v,j)}}else b.shadowFocusElement=c;f.hasShadow=c;j.nativeElement=e.nativeElement=d;j.shadowData=e.shadowData=f.shadowData={nativeElement:d,shadowElement:c,shadowFocusElement:b.shadowFocusElement}; b.shadowChilds&&b.shadowChilds.each(function(){s(this,"shadowData",e.shadowData)});if(b.data)j.shadowData.data=e.shadowData.data=f.shadowData.data=b.data;b=null;g.docObserve()}}(),propTypes:{standard:function(a){b(a);if(!a.prop)a.prop={set:function(c){a.attr.set.call(this,""+c)},get:function(){return a.attr.get.call(this)||a.defaultValue}}},"boolean":function(a){b(a);if(!a.prop)a.prop={set:function(c){c?a.attr.set.call(this,""):a.removeAttr.value.call(this)},get:function(){return null!=a.attr.get.call(this)}}}, src:function(){var d=m.createElement("a");d.style.display="none";return function(c,f){b(c);if(!c.prop)c.prop={set:function(a){c.attr.set.call(this,a)},get:function(){var c=this.getAttribute(f),b;if(null==c)return"";d.setAttribute("href",c+"");if(!a.support.hrefNormalized){try{a(d).insertAfter(this),b=d.getAttribute("href",4)}catch(e){b=d.getAttribute("href",4)}a(d).detach()}return b||d.href}}}}(),enumarated:function(a){b(a);if(!a.prop)a.prop={set:function(c){a.attr.set.call(this,c)},get:function(){var c= (a.attr.get.call(this)||"").toLowerCase();if(!c||-1==a.limitedTo.indexOf(c))c=a.defaultValue;return c}}}},reflectProperties:function(d,c){"string"==typeof c&&(c=c.split(i));c.forEach(function(c){g.defineNodeNamesProperty(d,c,{prop:{set:function(d){a.attr(this,c,d)},get:function(){return a.attr(this,c)||""}}})})},defineNodeNameProperty:function(d,c,b){n[c]=!0;if(b.reflect)g.propTypes[b.propType||"standard"](b,c);["prop","attr","removeAttr"].forEach(function(e){var o=b[e];o&&(o="prop"===e?a.extend({writeable:!0}, o):a.extend({},o,{writeable:!0}),y[e](d,c,o),"*"!=d&&g.cfg.extendNative&&"prop"==e&&o.value&&a.isFunction(o.value)&&l(d,c,o),b[e]=o)});b.initAttr&&e.content(d,c);return b},defineNodeNameProperties:function(a,c,b,j){for(var o in c)!j&&c[o].initAttr&&e.createTmpCache(a),b&&!c[o][b]&&(c[o][b]={},["value","set","get"].forEach(function(a){a in c[o]&&(c[o][b][a]=c[o][a],delete c[o][a])})),c[o]=g.defineNodeNameProperty(a,o,c[o]);j||e.flushTmpCache();return c},createElement:function(b,c,f){var j;a.isFunction(c)&& (c={after:c});e.createTmpCache(b);c.before&&e.createElement(b,c.before);f&&(j=g.defineNodeNameProperties(b,f,!1,!0));c.after&&e.createElement(b,c.after);e.flushTmpCache();return j},onNodeNamesPropertyModify:function(b,c,f,g){"string"==typeof b&&(b=b.split(i));a.isFunction(f)&&(f={set:f});b.forEach(function(a){w[a]||(w[a]={});"string"==typeof c&&(c=c.split(i));f.initAttr&&e.createTmpCache(a);c.forEach(function(b){w[a][b]||(w[a][b]=[],n[b]=!0);if(f.set){if(g)f.set.only=g;w[a][b].push(f.set)}f.initAttr&& e.content(a,b)});e.flushTmpCache()})},defineNodeNamesBooleanProperty:function(b,c,f){f||(f={});if(a.isFunction(f))f.set=f;g.defineNodeNamesProperty(b,c,{attr:{set:function(a){this.setAttribute(c,a);f.set&&f.set.call(this,!0)},get:function(){return null==this.getAttribute(c)?k:c}},removeAttr:{value:function(){this.removeAttribute(c);f.set&&f.set.call(this,!1)}},reflect:!0,propType:"boolean",initAttr:f.initAttr||!1})},contentAttr:function(a,b,f){if(a.nodeName){if(f===k)return a=a.attributes[b]||{}, f=a.specified?a.value:null,null==f?k:f;"boolean"==typeof f?f?a.setAttribute(b,b):a.removeAttribute(b):a.setAttribute(b,f)}},activeLang:function(){var b=[],c={},f,e,o=/:\/\/|^\.*\//,i=function(b,c,d){return c&&d&&-1!==a.inArray(c,d.availabeLangs||[])?(b.loading=!0,d=d.langSrc,o.test(d)||(d=g.cfg.basePath+d),g.loader.loadScript(d+c+".js",function(){b.langObj[c]?(b.loading=!1,A(b,!0)):a(function(){b.langObj[c]&&A(b,!0);b.loading=!1})}),!0):!1},u=function(a){c[a]&&c[a].forEach(function(a){a.callback()})}, A=function(a,b){if(a.activeLang!=f&&a.activeLang!==e){var c=t[a.module].options;if(a.langObj[f]||e&&a.langObj[e])a.activeLang=f,a.callback(a.langObj[f]||a.langObj[e],f),u(a.module);else if(!b&&!i(a,f,c)&&!i(a,e,c)&&a.langObj[""]&&""!==a.activeLang)a.activeLang="",a.callback(a.langObj[""],f),u(a.module)}};return function(g){if("string"==typeof g&&g!==f)f=g,e=f.split("-")[0],f==e&&(e=!1),a.each(b,function(a,b){A(b)});else if("object"==typeof g)if(g.register)c[g.register]||(c[g.register]=[]),c[g.register].push(g), g.callback();else{if(!g.activeLang)g.activeLang="";b.push(g);A(g)}return f}}()});a.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(a,b){g[a]=function(a,d,e,u){"string"==typeof a&&(a=a.split(i));var h={};a.forEach(function(a){h[a]=g[b](a,d,e,u)});return h}});g.isReady("webshimLocalization",!0)}); (function(a,g){var h=a.webshims.browserVersion;if(!(a.browser.mozilla&&5h&&7")[0].readyState;if(!i.track)try{new TextTrackCue(2,3,"")}catch(g){i.track=!0}var k=h.cfg.track,n=function(g){a(g.target).filter("track").each(m)}, m=function(){if(i.track||!k.override&&3==a.prop(this,"readyState"))k.override=!0,h.reTest("track"),document.removeEventListener("error",n,!0),this&&a.nodeName(this,"track")?h.error("track support was overwritten. Please check your vtt including your vtt mime-type"):h.info("track support was overwritten. due to bad browser support")},p=function(){document.addEventListener("error",n,!0);i.track?m():a("track").each(m)};k.override||(h.isReady("track")?p():a(p))}();h.register("mediaelement-core",function(a, h,v,s,q){p=swfobject.hasFlashPlayerVersion("9.0.115");var l=h.mediaelement,e=function(b,c){var b=a(b),d={src:b.attr("src")||"",elem:b,srcProp:b.prop("src")};if(!d.src)return d;var e=b.attr("type");if(e)d.type=e,d.container=a.trim(e.split(";")[0]);else if(c||(c=b[0].nodeName.toLowerCase(),"source"==c&&(c=(b.closest("video, audio")[0]||{nodeName:"video"}).nodeName.toLowerCase())),e=l.getTypeForSrc(d.src,c))d.type=e,d.container=e;if(e=b.attr("media"))d.media=e;return d},b=!p&&"postMessage"in v&&m,d= function(){var c;return function(){!c&&b&&(c=!0,h.loader.loadScript("https://www.youtube.com/player_api"),a(function(){h.polyfill("mediaelement-yt")}))}}(),c=function(){p?n():d()};h.addPolyfill("mediaelement-yt",{test:!b,d:["dom-support"]});l.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"]}};l.mimeTypes.source=a.extend({},l.mimeTypes.audio,l.mimeTypes.video);l.getTypeForSrc=function(b,c){if(-1!=b.indexOf("youtube.com/watch?")|| -1!=b.indexOf("youtube.com/v/"))return"video/youtube";var b=b.split("?")[0].split("."),b=b[b.length-1],d;a.each(l.mimeTypes[c],function(a,c){if(-1!==c.indexOf(b))return d=a,!1});return d};l.srces=function(b,c){b=a(b);if(c)b.removeAttr("src").removeAttr("type").find("source").remove(),a.isArray(c)||(c=[c]),c.forEach(function(a){var c=s.createElement("source");"string"==typeof a&&(a={src:a});c.setAttribute("src",a.src);a.type&&c.setAttribute("type",a.type);a.media&&c.setAttribute("media",a.media);b.append(c)}); else{var c=[],d=b[0].nodeName.toLowerCase(),f=e(b,d);f.src?c.push(f):a("source",b).each(function(){f=e(this,d);f.src&&c.push(f)});return c}};a.fn.loadMediaSrc=function(b,c){return this.each(function(){c!==q&&(a(this).removeAttr("poster"),c&&a.attr(this,"poster",c));l.srces(this,b);a(this).mediaLoad()})};l.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(","); l.canThirdPlaySrces=function(c,d){var e="";if(p||b)c=a(c),d=d||l.srces(c),a.each(d,function(a,c){if(c.container&&c.src&&(p&&-1!=l.swfMimeTypes.indexOf(c.container)||b&&"video/youtube"==c.container))return e=c,!1});return e};var f={};l.canNativePlaySrces=function(b,c){var d="";if(m){var b=a(b),e=(b[0].nodeName||"").toLowerCase();if(!f[e])return d;c=c||l.srces(b);a.each(c,function(a,c){if(c.type&&f[e].prop._supvalue.call(b[0],c.type))return d=c,!1})}return d};l.setError=function(b,c){c||(c="can't play sources"); a(b).pause().data("mediaerror",c);h.warn("mediaelementError: "+c);setTimeout(function(){a(b).data("mediaerror")&&a(b).trigger("mediaerror")},1)};var j=function(){var a;return function(e,f,g){h.ready(p?r:"mediaelement-yt",function(){l.createSWF?l.createSWF(e,f,g):a||(a=!0,c(),j(e,f,g))});!a&&b&&!l.createSWF&&d()}}(),o=function(a,b,c,d,e){c||!1!==c&&b&&"third"==b.isActive?(c=l.canThirdPlaySrces(a,d))?j(a,c,b):e?l.setError(a,!1):o(a,b,!1,d,!0):(c=l.canNativePlaySrces(a,d))?b&&"third"==b.isActive&&l.setActive(a, "html5",b):e?(l.setError(a,!1),b&&"third"==b.isActive&&l.setActive(a,"html5",b)):o(a,b,!0,d,!0)},z=/^(?:embed|object|datalist)$/i,D=function(b,c){var d=h.data(b,"mediaelementBase")||h.data(b,"mediaelementBase",{}),e=l.srces(b),f=b.parentNode;clearTimeout(d.loadTimer);a.data(b,"mediaerror",!1);if(e.length&&f&&!(1!=f.nodeType||z.test(f.nodeName||"")))c=c||h.data(b,"mediaelement"),o(b,c,t.preferFlash||q,e)};a(s).on("ended",function(b){var c=h.data(b.target,"mediaelement");(!k||c&&"html5"!=c.isActive|| a.prop(b.target,"loop"))&&setTimeout(function(){!a.prop(b.target,"paused")&&a.prop(b.target,"loop")&&a(b.target).prop("currentTime",0).play()},1)});k||h.defineNodeNamesBooleanProperty(["audio","video"],"loop");["audio","video"].forEach(function(b){var c=h.defineNodeNameProperty(b,"load",{prop:{value:function(){var a=h.data(this,"mediaelement");D(this,a);m&&(!a||"html5"==a.isActive)&&c.prop._supvalue&&c.prop._supvalue.apply(this,arguments)}}});f[b]=h.defineNodeNameProperty(b,"canPlayType",{prop:{value:function(c){var d= "";m&&f[b].prop._supvalue&&(d=f[b].prop._supvalue.call(this,c),"no"==d&&(d=""));!d&&p&&(c=a.trim((c||"").split(";")[0]),-1!=l.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)}});v=function(){h.addReady(function(b,c){a("video, audio",b).add(c.filter("video, audio")).each(function(){a.browser.msie&& 8=b.duration||b.duration===b._lastDuration)b.duration=d}catch(e){}b.duration&& b.duration!=b._lastDuration?(l(b._elem,"durationchange"),("audio"==b._elemNodeName||b._callMeta)&&i.jwEvents.Model.META(a.extend({duration:b.duration},c),b),b._durationCalcs--):b._durationCalcs++}},c=function(a,b){3>a&&clearTimeout(b._canplaythroughTimer);if(3<=a&&3>b.readyState)b.readyState=a,l(b._elem,"canplay"),clearTimeout(b._canplaythroughTimer),b._canplaythroughTimer=setTimeout(function(){c(4,b)},4E3);if(4<=a&&4>b.readyState)b.readyState=a,l(b._elem,"canplaythrough");b.readyState=a};a.extend(a.event.customEvent, {updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0});i.jwEvents={View:{PLAY:function(a){var b=s(a.id);if(b&&!b.stopPlayPause&&(b._ppFlag=!0,b.paused==a.state)){b.paused=!a.state;if(b.ended)b.ended=!1;l(b._elem,a.state?"play":"pause")}}},Model:{BUFFER:function(b){var e=s(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",k,e._elem,!0)}}},META:function(a,b){if(b=b&&b.networkState?b:s(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&&l(b._elem,"durationchange");l(b._elem,"loadedmetadata")}}else b._callMeta=!0},TIME:function(a){var b=s(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;l(b._elem,"timeupdate")}},STATE:function(a){var b= s(a.id);if(b)switch(a.newstate){case "BUFFERING":if(b.ended)b.ended=!1;c(1,b);l(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;l(b._elem,"playing");break;case "PAUSED":if(!b.paused&&!b.stopPlayPause)b.paused=!0,b._ppFlag=!0,l(b._elem,"pause");break;case "COMPLETED":4>b.readyState&&c(4,b),b.ended=!0,l(b._elem,"ended")}}},Controller:{ERROR:function(a){var b=s(a.id);b&&i.setError(b._elem,a.message)},SEEK:function(a){var b= s(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,l(b._elem,"timeupdate")}},VOLUME:function(a){var b=s(a.id);if(b&&(a=a.percentage/100,b.volume!=a))b.volume=a,l(b._elem,"volumechange")},MUTE:function(a){if(!a.state){var b=s(a.id);if(b&&b.muted!=a.state)b.muted=a.state,l(b._elem,"volumechange")}}}};var f=function(b){var c=!0;a.each(i.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},j=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=[]},o=function(b){b&&(b._ppFlag===k&&a.prop(b._elem,"autoplay")||!b.paused)&&setTimeout(function(){if("third"==b.isActive&&(b._ppFlag===k||!b.paused))try{a(b._elem).play()}catch(c){}},1)};i.playerResize=function(b){b&& (b=m.getElementById(b.replace(v,"")))&&a(b).triggerHandler("swfstageresize")};a(m).on("emptied",function(a){a=q(a.target);o(a)});var z;i.jwPlayerReady=function(b){var c=s(b.id),d=0,e=function(){if(!(9h||6<=h)&&g.warn("mediaelement-swf is only testet with jwplayer 5.6+")}c.wasSwfReady=!0;c.tryedReframeing=0;j(c);o(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(z);c.jwData=b;c.shadowElem.removeClass("flashblocker-assumed");a.prop(c._elem,"volume",c.volume);a.prop(c._elem,"muted",c.muted);e()}};var D=a.noop;if(n){var A={play:1,playing:1},E="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),B=E.map(function(a){return a+ ".webshimspolyfill"}).join(" "),C=function(b){var c=g.data(b.target,"mediaelement");c&&(b.originalEvent&&b.originalEvent.type===b.type)==("third"==c.activating)&&(b.stopImmediatePropagation(),A[b.type]&&c.isActive!=c.activating&&a(b.target).pause())},D=function(b){a(b).off(B).on(B,C);E.forEach(function(a){g.moveToFirstEvent(b,a)})};D(m)}i.setActive=function(b,c,d){d||(d=g.data(b,"mediaelement"));if(d&&d.isActive!=c){"html5"!=c&&"third"!=c&&g.warn("wrong type for mediaelement activating: "+c);var e= g.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 H=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 e=b,f=d.networkState;for(c(0,d);--e;)delete d[a[e]];d.actionQueue=[];d.buffered.length=0;f&&l(d._elem,"emptied")}}}(),G=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()})};i.createSWF=function(c,d,f){if(p){1>y?y=1:y++;var j=a.extend({},t.vars,{image:a.prop(c,"poster")||"",file:d.srcProp}), h=a(c).data("vars")||{};f||(f=g.data(c,"mediaelement"));if(f&&f.swfCreated)i.setActive(c,"third",f),H(f),f.currentSrc=d.srcProp,a.extend(j,h),t.changeSWF(j,c,d,f,"load"),F(c,"sendEvent",["LOAD",j]);else{var o=a.prop(c,"controls"),k="jwplayer-"+g.getID(c),l=a.extend({},t.params,a(c).data("params")),m=c.nodeName.toLowerCase(),s=a.extend({},t.attrs,{name:k,id:k},a(c).data("attrs")),q=a('
').css({position:"relative", overflow:"hidden"}),f=g.data(c,"mediaelement",g.objectCreate(x,{actionQueue:{value:[]},shadowElem:{value:q},_elemNodeName:{value:m},_elem:{value:c},currentSrc:{value:d.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(a){if(a>=f.buffered.length)g.error("buffered index size error");else return 0},end:function(a){if(a>=f.buffered.length)g.error("buffered index size error");else return(f.duration-f._bufferedStart)*f._bufferedEnd/100+f._bufferedStart},length:0}}}));G(f,o);q.insertBefore(c); n&&a.extend(f,{volume:a.prop(c,"volume"),muted:a.prop(c,"muted")});a.extend(j,{id:k,controlbar:o?t.vars.controlbar||("video"==m?"over":"bottom"):"video"==m?"none":"bottom",icons:""+(o&&"video"==m)},h,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});j.plugins=j.plugins?j.plugins+(","+b):b;g.addShadowDom(c,q);D(c);i.setActive(c,"third",f);t.changeSWF(j,c,d,f,"embed");a(c).on("updatemediaelementdimensions updateshadowdom",function(){G(f,a.prop(c,"controls"))});r.embedSWF(e,k,"100%","100%", "9.0.0",!1,j,l,s,function(b){if(b.success)f.jwapi=b.ref,o||a(b.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!b.ref.parentNode&&q[0].parentNode||"none"==b.ref.style.display)q.addClass("flashblocker-assumed"),a(c).trigger("flashblocker"),g.warn("flashblocker assumed");a(b.ref).css({minHeight:"2px",minWidth:"2px",display:"block"})},9),z||(clearTimeout(z),z=setTimeout(function(){var c=a(b.ref);1c[0].offsetWidth||2>c[0].offsetHeight)&&g.warn("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){a(c).mediaLoad()},1)};var F=function(a,b,c,d){return(d=d||q(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10< d.actionQueue.length&&setTimeout(function(){5a||100g.browserVersion,K={object:1,OBJECT:1};a.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&y)for(b=0;b"),r=Modernizr.ES5&&Modernizr.objectAccessor,n=function(a){var b={};a.addEventListener=function(a,c){b[a]&&g.error("always use $.on to the shimed event: "+a+" already bound fn was: "+b[a]+" your fn was: "+c);b[a]=c};a.removeEventListener=function(a,c){b[a]&&b[a]!=c&&g.error("always use $.on/$.off to the shimed event: "+a+" already bound fn was: "+ b[a]+" your fn was: "+c);b[a]&&delete b[a]};return a},p={getCueById:function(a){for(var b=null,d=0,c=this.length;da.startTime&& g.error("cue startTime higher than previous cue's startTime")}else this.cues=k.createCueList();a.track&&a.track.removeCue&&a.track.removeCue(a);a.track=this;this.cues.push(a)},removeCue:function(a){var b=this.cues||[],d=0,c=b.length;if(a.track!=this)g.error("cue not part of track");else{for(;d")[0];h.TextTrackCue=function(a,b,d){3!=arguments.length&&g.error("wrong arguments.length for TextTrackCue.constructor");this.startTime=a;this.endTime=b;this.text=d;this.id="";this.pauseOnExit=!1;n(this)};h.TextTrackCue.prototype= {onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var a="",b="",d=m.createDocumentFragment(),c;if(!v(this,"getCueAsHTML"))c=this.getCueAsHTML=function(){var c,g;if(a!=this.text){a=this.text;b=k.parseCueTextToHTML(a);l.innerHTML=b;for(c=0,g=l.childNodes.length;c]+>)/ig,b=/^(?:c|v|ruby|rt|b|i|u)/,d=/\<\s*\//,c=function(a,b,c,e){d.test(e)?a="":(c.splice(0,1),a="<"+a+" "+b+'="'+c.join(" ").replace(/\"/g,""")+'">');return a},f=function(a){var d=a.replace(/[<\/>]+/ig,"").split(/[\s\.]+/);d[0]&&(d[0]=d[0].toLowerCase(),b.test(d[0])?"c"==d[0]?a=c("span","class",d,a):"v"==d[0]&&(a=c("q","title",d,a)):a="");return a};return function(b){return b.replace(a,f)}}();k.loadTextTrack=function(e,b,d,c){var f=d.track,h=function(){var c=a.prop(b,"src"), d,i;if("disabled"!=f.mode&&c&&a.attr(b,"src")&&(a(e).unbind("play playing timeupdate updatetrackdisplay",h),a(b).unbind("checktrackmode",h),!f.readyState)){d=function(){f.readyState=3;f.cues=null;f.activeCues=f.shimActiveCues=f._shimActiveCues=null;a(b).triggerHandler("error")};f.readyState=1;try{f.cues=k.createCueList(),f.activeCues=f.shimActiveCues=f._shimActiveCues=k.createCueList(),i=a.ajax({dataType:"text",url:c,success:function(c){"text/vtt"!=i.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"); k.parseCaptions(c,f,function(c){c&&"length"in c?(f.readyState=2,a(b).triggerHandler("load"),a(e).triggerHandler("updatetrackdisplay")):d()})},error:d})}catch(l){d(),g.warn(l)}}};f.readyState=0;f.shimActiveCues=null;f._shimActiveCues=null;f.activeCues=null;f.cues=null;a(e).unbind("play playing timeupdate updatetrackdisplay",h);a(b).unbind("checktrackmode",h);a(e).on("play playing timeupdate updatetrackdisplay",h);a(b).on("checktrackmode",h);if(c)f.mode=t[f.kind]?"showing":"hidden",h()};k.createTextTrack= function(e,b){var d,c;if(b.nodeName&&(c=g.data(b,"trackData")))q(b,c),d=c.track;if(!d)d=n(g.objectCreate(w)),r||u.forEach(function(c){var e=a.prop(b,c);e&&(d[x[c]||c]=e)}),b.nodeName?(r&&u.forEach(function(c){g.defineProperty(d,x[c]||c,{get:function(){return a.prop(b,c)}})}),c=g.data(b,"trackData",{track:d}),k.loadTextTrack(e,b,c,a.prop(b,"default")&&a(b).siblings("track[default]").andSelf()[0]==b)):(r&&u.forEach(function(a){g.defineProperty(d,x[a]||a,{value:b[a],writeable:!1})}),d.cues=k.createCueList(), d.activeCues=d._shimActiveCues=d.shimActiveCues=k.createCueList(),d.mode="hidden",d.readyState=2);return d};k.parseCaptionChunk=function(){var a=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,b=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,d=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,c=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(f){var h,i,k,l;if(b.exec(f)||d.exec(f)||c.exec(f))return null;for(f=f.split(/\n/g);!f[0].replace(/\s+/ig,"").length&&0=n&&(l||g.error("please use WebVTT format. This is the standard"), d(b.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);f(0,a.length)},9)},9)):g.error("Required parameter captionData not supplied.")};k.createTrackList=function(a,b){b=b||g.data(a,"mediaelementBase")||g.data(a,"mediaelementBase",{});if(!b.textTracks)b.textTracks=[],g.defineProperties(b.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null}}),n(b.textTracks);return b.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(a){var b=g.data(this,"trackData");this.setAttribute("data-kind",a);if(b)b.attrKind=a},get:function(){var a=g.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(u,function(e,b){var d=x[b]||b;g.onNodeNamesPropertyModify("track",b,function(){var c=g.data(this,"trackData"),e=this;if(c)"kind"==b&&q(this,c),r||(c.track[d]=a.prop(this,b)),clearTimeout(c.changedTrackPropTimer),c.changedTrackPropTimer=setTimeout(function(){a(e).trigger("updatesubtitlestate")},1)})});g.onNodeNamesPropertyModify("track","src",function(e){if(e){var e=g.data(this,"trackData"),b;e&&(b=a(this).closest("video, audio"), b[0]&&k.loadTextTrack(b,this,e))}});g.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 k.createTextTrack(a(this).closest("audio, video")[0],this)},writeable:!1}},"prop");g.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var a=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{}),b= k.createTrackList(this,a);a.blockTrackListUpdate||s.call(this,a,b);return b},writeable:!1},addTextTrack:{value:function(a,b,d){a=k.createTextTrack(this,{kind:i.prop("kind",a||"").prop("kind"),label:b||"",srclang:d||""});b=g.data(this,"mediaelementBase")||g.data(this,"mediaelementBase",{});if(!b.scriptedTextTracks)b.scriptedTextTracks=[];b.scriptedTextTracks.push(a);s.call(this);return a}}},"prop");a(m).on("emptied ended updatetracklist",function(e){if(a(e.target).is("audio, video")){var b=g.data(e.target, "mediaelementBase");if(b)clearTimeout(b.updateTrackListTimer),b.updateTrackListTimer=setTimeout(function(){s.call(e.target,b)},0)}});g.addReady(function(e,b){var d=b.filter("video, audio, track").closest("audio, video");a("video, audio",e).add(d).each(function(){s.call(this)}).each(function(){if(Modernizr.track){var b=this.textTracks;a.prop(this,"textTracks").length!=b.length&&g.error("textTracks couldn't be copied");a("track",this).each(function(){var b=a.prop(this,"track"),c=this.track,d,e;if(c){d= a.prop(this,"kind");e=c.readyState||this.readyState;if(c.mode||e)b.mode=y[c.mode]||c.mode;if("descriptions"!=d)c.mode="string"==typeof c.mode?"disabled":0,this.kind="metadata",a(this).attr({kind:d})}}).on("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(){s.call(a,b)},9)})});Modernizr.track&&a("video, audio").trigger("trackapichange")});