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