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