(function(){var a=Function.prototype.call,c=Object.prototype,i=Array.prototype.slice,j,g;if(!Function.prototype.bind)Function.prototype.bind=function(a){var f=this;if("function"!=typeof f)throw new TypeError;var m=i.call(arguments,1),d=function(){if(this instanceof d){var b=function(){};b.prototype=f.prototype;var b=new b,g=f.apply(b,m.concat(i.call(arguments)));return null!==g&&Object(g)===g?g:b}return f.apply(a,m.concat(i.call(arguments)))};return d};g=a.bind(c.toString);j=a.bind(c.hasOwnProperty); if(!Array.isArray)Array.isArray=function(a){return"[object Array]"==g(a)};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,f){var m=p(this),d=0,b=m.length>>>0;if("[object Function]"!=g(a))throw new TypeError;for(;d>>0,c=Array(d);if("[object Function]"!=g(a))throw new TypeError;for(var h=0;h>>0,c=[];if("[object Function]"!=g(a))throw new TypeError;for(var h=0;h>>0;if("[object Function]"!=g(a))throw new TypeError;for(var c=0;c>>0;if("[object Function]"!=g(a))throw new TypeError; for(var c=0;c>>0;if("[object Function]"!=g(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 f){c=f[d++];break}if(++d>=b)throw new TypeError;}while(1)}for(;d>>0;if("[object Function]"!=g(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 f){d=f[b--];break}if(0>--b)throw new TypeError;}while(1)}do b in this&&(d=a.call(void 0,d,f[b],b,f));while(b--);return d};if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){var f=p(this),b=f.length>>>0;if(!b)return-1;var d=0;1>>0;if(!b)return-1;var d=b-1;1b&&(a[f]="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+"]",z=RegExp("^"+a+a+"*"),h= RegExp(a+a+"*$");String.prototype.trim=function(){return(""+this).replace(z,"").replace(h,"")}}var v=function(a){a=+a;a!==a?a=-1:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(0=l.duration||l.duration===l._lastDuration)l.duration=c}catch(f){}l.duration&& l.duration!=l._lastDuration?(d(l._elem,"durationchange"),("audio"==l._elemNodeName||l._callMeta)&&b.jwEvents.Model.META(a.extend({duration:l.duration},e),l),l._durationCalcs--):l._durationCalcs++}},q=function(a,e){3>a&&clearTimeout(e._canplaythroughTimer);if(3<=a&&3>e.readyState)e.readyState=a,d(e._elem,"canplay"),clearTimeout(e._canplaythroughTimer),e._canplaythroughTimer=setTimeout(function(){q(4,e)},4E3);if(4<=a&&4>e.readyState)e.readyState=a,d(e._elem,"canplaythrough");e.readyState=a};b.jwEvents= {View:{PLAY:function(a){var e=n(a.id);if(e&&!e.stopPlayPause&&(e._ppFlag=!0,e.paused==a.state)){e.paused=!a.state;if(e.ended)e.ended=!1;d(e._elem,a.state?"play":"pause")}}},Model:{BUFFER:function(l){var e=n(l.id);if(e&&"percentage"in l&&e._bufferedEnd!=l.percentage){e.networkState=100==l.percentage?1:2;(isNaN(e.duration)||5l.percentage||100===l.percentage)&&D(e,l);if(e.ended)e.ended=!1;if(e.duration){2l.percentage?q(3,e):20l.percentage)e._bufferedStart=e.currentTime||0;e._bufferedEnd=l.percentage;e.buffered.length=1;if(100==l.percentage)e.networkState=1,q(4,e);a.event.trigger("progress",g,e._elem,!0)}}},META:function(a,e){if(e=e&&e.networkState?e:n(a.id))if("duration"in a){if(!e._metadata||!((!a.height||e.videoHeight==a.height)&&a.duration===e.duration)){e._metadata=!0;var b=e.duration;if(a.duration)e.duration=a.duration;e._lastDuration=e.duration;if(a.height||a.width)e.videoHeight=a.height||0,e.videoWidth= a.width||0;if(!e.networkState)e.networkState=2;1>e.readyState&&q(1,e);e.duration&&b!==e.duration&&d(e._elem,"durationchange");d(e._elem,"loadedmetadata")}}else e._callMeta=!0},TIME:function(a){var e=n(a.id);if(e&&e.currentTime!==a.position){e.currentTime=a.position;e.duration&&e.duratione.readyState&&q(2,e);if(e.ended)e.ended=!1;d(e._elem,"timeupdate")}},STATE:function(a){var e=n(a.id);if(e)switch(a.newstate){case "BUFFERING":if(e.ended)e.ended=!1;q(1,e);d(e._elem,"waiting"); break;case "PLAYING":e.paused=!1;e._ppFlag=!0;e.duration||D(e,a);3>e.readyState&&q(3,e);if(e.ended)e.ended=!1;d(e._elem,"playing");break;case "PAUSED":if(!e.paused&&!e.stopPlayPause)e.paused=!0,e._ppFlag=!0,d(e._elem,"pause");break;case "COMPLETED":4>e.readyState&&q(4,e),e.ended=!0,d(e._elem,"ended")}}},Controller:{ERROR:function(a){var e=n(a.id);e&&b.setError(e._elem,a.message)},SEEK:function(a){var e=n(a.id);if(e){if(e.ended)e.ended=!1;if(e.paused)try{e.jwapi.sendEvent("play","false")}catch(b){}if(e.currentTime!= a.position)e.currentTime=a.position,d(e._elem,"timeupdate")}},VOLUME:function(a){var e=n(a.id);if(e&&(a=a.percentage/100,e.volume!=a))e.volume=a,d(e._elem,"volumechange")},MUTE:function(a){if(!a.state){var e=n(a.id);if(e&&e.muted!=a.state)e.muted=a.state,d(e._elem,"volumechange")}}}};var J=function(c){var e=!0;a.each(b.jwEvents,function(b,d){a.each(d,function(a){try{c.jwapi["add"+b+"Listener"](a,"jQuery.webshims.mediaelement.jwEvents."+b+"."+a)}catch(d){return e=!1}})});return e},o=function(a){var e= a.actionQueue.length,b=0,c;if(e&&"flash"==a.isActive)for(;a.actionQueue.length&&e>b;)b++,c=a.actionQueue.shift(),a.jwapi[c.fn].apply(a.jwapi,c.args);if(a.actionQueue.length)a.actionQueue=[]},G=function(b){b&&(b._ppFlag===g&&a.prop(b._elem,"autoplay")||!b.paused)&&setTimeout(function(){if("flash"==b.isActive&&(b._ppFlag===g||!b.paused))try{a(b._elem).play()}catch(e){}},1)},K=function(b){if(b&&"video"==b._elemNodeName){var e,c,d,f,h,r,g,k,i=function(i,j){if(j&&i&&!(1>j||1>i||"flash"!=b.isActive))if(e&& (e.remove(),e=!1),f=i,h=j,clearTimeout(g),c="auto"==b._elem.style.width,d="auto"==b._elem.style.height,c||d){r=r||a(b._elem).getShadowElement();var m;c&&!d?(m=r.height(),i*=m/j,j=m):!c&&d&&(m=r.width(),j*=m/i,i=m);k=!0;setTimeout(function(){k=!1},9);r.css({width:i,height:j})}},j=function(){if(!("flash"!=b.isActive||a.prop(b._elem,"readyState")&&a.prop(this,"videoWidth"))){var f=a.prop(b._elem,"poster");if(f&&(c="auto"==b._elem.style.width,d="auto"==b._elem.style.height,c||d))e&&(e.remove(),e=!1), e=a(''),e.bind("load error alreadycomplete",function(){clearTimeout(g);var b=this,c=b.naturalWidth||b.width||b.offsetWidth,d=b.naturalHeight||b.height||b.offsetHeight;d&&c?(i(c,d),b=null):setTimeout(function(){c=b.naturalWidth||b.width||b.offsetWidth;d=b.naturalHeight||b.height||b.offsetHeight;i(c,d);e&&(e.remove(),e=!1);b=null},9);a(this).unbind()}).prop("src",f).appendTo("body").each(function(){this.complete|| this.error?a(this).triggerHandler("alreadycomplete"):(clearTimeout(g),g=setTimeout(function(){a(b._elem).triggerHandler("error")},9999))})}};a(b._elem).bind("loadedmetadata",function(){i(a.prop(this,"videoWidth"),a.prop(this,"videoHeight"))}).bind("emptied",j).bind("swfstageresize updatemediaelementdimensions",function(){k||i(f,h)}).bind("emptied",function(){f=void 0;h=void 0}).triggerHandler("swfstageresize");j();a.prop(b._elem,"readyState")&&i(a.prop(b._elem,"videoWidth"),a.prop(b._elem,"videoHeight"))}}; b.playerResize=function(b){b&&(b=j.getElementById(b.replace(x,"")))&&a(b).triggerHandler("swfstageresize")};a(j).bind("emptied",function(a){a=m(a.target);G(a)});var A;b.jwPlayerReady=function(b){var e=n(b.id),d=0,f=function(){if(!(9h||6<=h)&&c.warn("mediaelement-swf is only testet with jwplayer 5.6+")}e.wasSwfReady=!0;e.tryedReframeing=0;o(e);G(e)}else clearTimeout(e.reframeTimer),e.reframeTimer=setTimeout(f, 9*d),2e.tryedReframeing&&(e.tryedReframeing++,e.shadowElem.css({overflow:"visible"}),setTimeout(function(){e.shadowElem.css({overflow:"hidden"})},16))};if(e&&e.jwapi){if(!e.tryedReframeing)e.tryedReframeing=0;clearTimeout(A);e.jwData=b;e.shadowElem.removeClass("flashblocker-assumed");a.prop(e._elem,"volume",e.volume);a.prop(e._elem,"muted",e.muted);f()}};var E=a.noop;if(k){var L={play:1,playing:1},H="play,pause,playing,canplay,progress,waiting,ended,loadedmetadata,durationchange,emptied".split(","), I=H.map(function(a){return a+".webshimspolyfill"}).join(" "),M=function(b){var e=c.data(b.target,"mediaelement");e&&(b.originalEvent&&b.originalEvent.type===b.type)==("flash"==e.activating)&&(b.stopImmediatePropagation(),L[b.type]&&e.isActive!=e.activating&&a(b.target).pause())},E=function(b){a(b).unbind(I).bind(I,M);H.forEach(function(a){c.moveToFirstEvent(b,a)})};E(j)}b.setActive=function(b,e,d){d||(d=c.data(b,"mediaelement"));if(d&&d.isActive!=e){"html5"!=e&&"flash"!=e&&c.warn("wrong type for mediaelement activating: "+ e);var f=c.data(b,"shadowData");d.activating=e;a(b).pause();d.isActive=e;"flash"==e?(f.shadowElement=f.shadowFocusElement=d.shadowElem[0],a(b).hide().getShadowElement().show()):(a(b).show().getShadowElement().hide(),f.shadowElement=f.shadowFocusElement=!1)}};var N=function(){var a="_bufferedEnd,_bufferedStart,_metadata,_ppFlag,currentSrc,currentTime,duration,ended,networkState,paused,videoHeight,videoWidth,_callMeta,_durationCalcs".split(","),b=a.length;return function(c){if(c){var f=b,h=c.networkState; for(q(0,c);--f;)delete c[a[f]];c.actionQueue=[];c.buffered.length=0;h&&d(c._elem,"emptied")}}}(),F=function(b,e){var c=b._elem,d=b.shadowElem;a(c)[e?"addClass":"removeClass"]("webshims-controls");"audio"==b._elemNodeName&&!e?d.css({width:0,height:0}):d.css({width:c.style.width||a(c).width(),height:c.style.height||a(c).height()})};b.createSWF=function(d,e,g){if(z){1>h?h=1:h++;var i=a.extend({},f.jwVars,{image:a.prop(d,"poster")||"",file:e.srcProp}),j=a(d).data("jwvars")||{};g||(g=c.data(d,"mediaelement")); if(g&&g.swfCreated)b.setActive(d,"flash",g),N(g),g.currentSrc=e.srcProp,a.extend(i,j),f.changeJW(i,d,e,g,"load"),w(d,"sendEvent",["LOAD",i]);else{var B=a.prop(d,"controls"),r="jwplayer-"+c.getID(d),m=a.extend({},f.jwParams,a(d).data("jwparams")),n=d.nodeName.toLowerCase(),o=a.extend({},f.jwAttrs,{name:r,id:r},a(d).data("jwattrs")),q=a('
').css({position:"relative",overflow:"hidden"}),g=c.data(d,"mediaelement", c.objectCreate(p,{actionQueue:{value:[]},shadowElem:{value:q},_elemNodeName:{value:n},_elem:{value:d},currentSrc:{value:e.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(a){if(a>=g.buffered.length)c.error("buffered index size error");else return 0},end:function(a){if(a>=g.buffered.length)c.error("buffered index size error");else return(g.duration-g._bufferedStart)*g._bufferedEnd/100+g._bufferedStart},length:0}}}));F(g,B);q.insertBefore(d);k&&a.extend(g,{volume:a.prop(d,"volume"),muted:a.prop(d, "muted")});a.extend(i,{id:r,controlbar:B?f.jwVars.controlbar||("video"==n?"over":"bottom"):"video"==n?"none":"bottom",icons:""+(B&&"video"==n)},j,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"});i.plugins=i.plugins?i.plugins+(","+u):u;c.addShadowDom(d,q);E(d);b.setActive(d,"flash",g);f.changeJW(i,d,e,g,"embed");a(d).bind("updatemediaelementdimensions",function(){F(g,a.prop(d,"controls"))});K(g);y.embedSWF(C,r,"100%","100%","9.0.0",!1,i,m,o,function(b){if(b.success)g.jwapi=b.ref,B||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(d).trigger("flashblocker"),c.warn("flashblocker assumed");a(b.ref).css({minHeight:"2px",minWidth:"2px",display:"block"})},9),A||(clearTimeout(A),A=setTimeout(function(){var e=a(b.ref);1e[0].offsetWidth||2>e[0].offsetHeight)&&c.info("JS-SWF connection can't be established on hidden or unconnected flash objects")},8E3))})}}else setTimeout(function(){a(d).mediaLoad()},1)};var w=function(a,b,c,d){return(d=d||m(a))?(d.jwapi&&d.jwapi[b]?d.jwapi[b].apply(d.jwapi,c||[]):(d.actionQueue.push({fn:b,args:c}),10a||100c.browserVersion,Q={object:1,OBJECT:1};a.cleanData=function(a){var b,c,d;if(a&&(c=a.length)&&h)for(b=0;b