jQuery.webshims.register("mediaelement-yt",function(d,e,i,r,m){var n=e.mediaelement,p=jQuery.Deferred();i.onYouTubePlayerAPIReady=function(){p.resolve()};if(i.YT&&YT.Player)i.onYouTubePlayerAPIReady();var i={paused:!0,ended:!1,currentSrc:"",duration:i.NaN,readyState:0,networkState:0,videoHeight:0,videoWidth:0,error:null,buffered:{start:function(b){if(b)e.error("buffered index size error");else return 0},end:function(b){if(b)e.error("buffered index size error");else return 0},length:0}},v=Object.keys(i), s={currentTime:0,volume:1,muted:!1};Object.keys(s);var w=d.extend({isActive:"html5",activating:"html5",wasSwfReady:!1,_metadata:!1,_callMeta:!1,currentTime:0,_buffered:0,_ppFlag:m},i,s),k=function(b,c){c=d.Event(c);c.preventDefault();d.event.trigger(c,m,b)},x=function(){var b="_buffered,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta".split(","),c=b.length;return function(a){if(a){var d=c,h=a.networkState;for(a.readyState=0;--d;)delete a[b[d]]; a.buffered.length=0;clearInterval(a._timeInterval);h&&k(a._elem,"emptied")}}}(),t=function(b){var c=b._elem;b.shadowElem.css({width:c.style.width||d(c).width(),height:c.style.height||d(c).height()})},j=function(b){return(b=e.data(b,"mediaelement"))&&"third"==b.isActive?b:null},y=function(b){var c,b=b.split("?");-1!=b[0].indexOf("youtube.com/watch")&&b[1]?(b=b[1].split("&"),d.each(b,function(a,d){d=d.split("=");if("v"==d[0])return b=d[1],c=!0,!1})):-1!=b[0].indexOf("youtube.com/v/")&&(b=b[0].split("/"), d.each(b,function(a,d){if(c)return b=d,!1;"v"==d&&(c=!0)}));c||e.warn("no youtube id found: "+b);return b},u=function(b){b&&(b._ppFlag===m&&d.prop(b._elem,"autoplay")||!b.paused)&&setTimeout(function(){if("third"==b.isActive&&(b._ppFlag===m||!b.paused))try{d(b._elem).play()}catch(c){}},1)},q=d.noop;(function(){var b={play:1,playing:1},c="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","),a=c.map(function(a){return a+".webshimspolyfill"}).join(" "), g=function(a){var c=e.data(a.target,"mediaelement");c&&(a.originalEvent&&a.originalEvent.type===a.type)==("third"==c.activating)&&(a.stopImmediatePropagation(),b[a.type]&&c.isActive!=c.activating&&d(a.target).pause())};q=function(b){d(b).off(a).on(a,g);c.forEach(function(a){e.moveToFirstEvent(b,a)})};q(r)})();d(r).on("emptied",function(b){b=j(b.target);u(b)});n.setActive=function(b,c,a){a||(a=e.data(b,"mediaelement"));if(a&&a.isActive!=c){"html5"!=c&&"third"!=c&&e.warn("wrong type for mediaelement activating: "+ c);var g=e.data(b,"shadowData");a.activating=c;d(b).pause();a.isActive=c;"third"==c?(g.shadowElement=g.shadowFocusElement=a.shadowElem[0],d(b).addClass("yt-api-active nonnative-api-active").hide().getShadowElement().show()):(clearInterval(a._timeInterval),d(b).removeClass("yt-api-active nonnative-api-active").show().getShadowElement().hide(),g.shadowElement=g.shadowFocusElement=!1);d(b).trigger("mediaelementapichange")}};var o=function(b,c){c._ppFlag=!0;if("playing"==b){o("play",c);if(3>c.readyState)c.readyState= 3,k(c._elem,"canplay");d(c._elem).trigger("playing")}if("play"==b&&c.paused)c.paused=!1,k(c._elem,"play");else if("pause"==b&&!c.paused)c.paused=!0,k(c._elem,"pause")},z=function(b,c,a,e){p.done(function(){var h=function(){var c,f;if(a._metadata&&a._ytAPI.getVideoLoadedFraction){f=a._ytAPI.getVideoLoadedFraction();c=f*a.duration;if(a._buffered!==c)a._buffered=c,a.buffered.length=1,d(b).trigger("progress");if(0.99a.readyState&&a.currentTime&&(9a.readyState)a.readyState=1;if(1>a.networkState)a.networkState= 2;e=!0}}e&&d(b).trigger("durationchange").trigger("loadedmetadata");setTimeout(f,9);if(1==c.data)o("playing",a),l();else if(2==c.data)clearInterval(a._timeInterval),o("pause",a);else if(3==c.data){if(2
').css({position:"relative",overflow:"hidden"}),a=e.data(b,"mediaelement",e.objectCreate(w,{shadowElem:{value:f},_elem:{value:b},currentSrc:{value:c.srcProp},buffered:{value:{start:function(b){if(b>=a.buffered.length)e.error("buffered index size error"); else return 0},end:function(b){if(b>=a.buffered.length)e.error("buffered index size error");else return a._buffered},length:0}}}));t(a);f.insertBefore(b);e.addShadowDom(b,f);n.setActive(b,"third",a);q(b);z(b,h,a,g);d(b).on("updatemediaelementdimensions updateshadowdom",function(){t(a)})}};(function(){var b=function(a){clearTimeout(a.updateDataTimer);a.updateDataTimer=setTimeout(function(){d(a._elem).triggerHandler("updateytdata")},9)},c={},a,g=function(b){c[b]={get:function(){var c=j(this);return c? c[b]:a[b].prop._supget.apply(this)},writeable:!1}},h=function(a,b){g(a);delete c[a].writeable;c[a].set=b};v.forEach(g);h("currentTime",function(c){var d=j(this);if(d)c*=1,!isNaN(c)&&d._ytAPI&&d._ytAPI.seekTo&&(d._ytAPI.seekTo(c),b(d));else return a.currentTime.prop._supset.apply(this,arguments)});h("muted",function(c){var d=j(this);if(d)d._ytAPI&&d._ytAPI.mute&&(d._ytAPI[c?"mute":"unMute"](),b(d));else return a.muted.prop._supset.apply(this,arguments)});h("volume",function(c){var d=j(this);if(d)c*= 100,!isNaN(c)&&d._ytAPI&&d._ytAPI.setVolume&&((0>c||100