/**!
* Part of the jMediaelement-Project v1.3.4 | http://github.com/aFarkas/jMediaelement
* @author Alexander Farkas
* Copyright 2010, Alexander Farkas
* Dual licensed under the MIT or GPL Version 2 licenses.
*/
(function(a){function w(){a.event.special.mediaerror.handler.apply(a(this).closest("video, audio")[0],arguments)}function x(c){if(a.support.mediaElements){var e=a.data(this,"mediaElemSupport");if(e&&e.apis){c&&c.type&&a.data(this,"calledMediaError",false);e=e.apis;c=this;var g=a.attr(this,"srces");if(c.error||g.length&&!e.nativ.canPlaySrces(g)){a.event.special.mediaerror.handler.call(this,a.Event("mediaerror"));try{c.pause()}catch(m){}}a("source",this).unbind("error",w).filter(":last").bind("error",
w)}}}function y(c,e){var g=c.nodeName.toLowerCase();e=r.getSuitedPlayers(c,e.apiOrder);var m=a.data(c,"mediaElemSupport");if(e)if(e==="noSource")m.noSource=true;else if(r._setAPIActive(c,e.name))m.apis[e.name]._mmload&&m.apis[e.name]._mmload(e.src,a.attr(c,"poster"));else r._embedApi(c,e,m,g);else{m.apis.nativ._trigger({type:"totalerror"});try{c.pause()}catch(n){}}}a.multimediaSupport={};var r=a.multimediaSupport,i=(new Date).getTime(),f=document,b=a("")[0],h=!("webkitPreservesPitch"in b&&
parseFloat(a.browser.version,10)<534.7&&(navigator.userAgent.indexOf("Chrome")!==-1||navigator.userAgent.indexOf("Mac")===-1));a.support.video=!!b.canPlayType;a.support.autoBuffer=!!("autobuffer"in b);a.support.audio=!!a("")[0].canPlayType;b=null;a("");a("");a.support.mediaElements=a.support.video&&a.support.audio;a.support.dynamicHTML5=!!a("")[0].innerHTML;a.support.mediaLoop="loop"in a("")[0];a.browser.deprecatedPoster=!h;a.fixHTML5=
function(){var c,e;return a.support.dynamicHTML5?function(g){return g}:function(g){if(!c){e=document.body;c=document.createElement("div");c.style.display="none"}var m=c.cloneNode(false);e.appendChild(m);m.innerHTML=g;e.removeChild(m);return m.childNodes}}();var k=["float"];a.each(["Top","Left","Right","Bottom"],function(c,e){k.push("margin"+e);k.push("padding"+e);k.push("border"+e+"Width");setTimeout(function(){r._transferStyles.push("border"+e+"Color");r._transferStyles.push("border"+e+"Style")},
1)});a.fn.getDimensions=function(){var c={width:0,height:0};if(this[0]){var e=this,g=this[0].style;c.height=g.height||this.innerHeight();c.width=g.width||this.innerWidth();a.each(k,function(m,n){c[n]=g[n]||e.css(n)})}return c};var d=a.attr,j=/video|audio|source/i,l={src:1,poster:1},q={loop:1,autoplay:1,controls:1},o={srces:1,getConfig:1,preload:1},s={auto:1,metadata:1,none:1},u={change:function(c,e,g){if(a.support.mediaElements){var m=c.getAttribute("preload")||"metadata3";if(g||e!==m)if(h){if(a.support.autoBuffer)c.autobuffer=
e==="auto"}else if(e==="none"||m==="none"&&(e==="auto"||!c.getAttribute("poster"))){a(c).unbind("play",u.changePlayMode);e==="none"&&a(c).bind("play",u.changePlayMode);a.attr(c,"srces",a.attr(c,"srces"),e)}}},changeAutoplay:function(c,e){if(a.support.mediaElements&&!h&&a.attr(c,"preload")==="none"&&e!==a.attr(c,"autoplay")){var g=a.attr(c,"srces");a.attr(c,"srces",g,"auto");g.length&&e&&setTimeout(function(){c.play&&a(c).getMediaAPI()==="nativ"&&c.play()},9)}},changePlayMode:function(){u.changeAutoplay(this,
true)},addSrces:function(c,e,g){if(h||!a.support.mediaElements)return false;g=g||a.attr(c,"preload");a(c).unbind("play",u.changePlayMode);if(g==="auto"||a.attr(c,"autoplay"))return a.data(c,"jme-srces",false);a(c).bind("play",u.changePlayMode);a.data(c,"jme-srces",e);return true}};a.attr=function(c,e,g,m){if(!(c.nodeName&&j.test(c.nodeName)&&(o[e]||q[e]||l[e])))return d(c,e,g,m);var n;if(g===undefined){if(q[e])return typeof c[e]==="boolean"?c[e]:!!(c.attributes[e]||{}).specified;if(l[e])return a.support.video&&
c[e]||r.makeAbsURI(c.getAttribute(e));switch(e){case "srces":if(n=a.data(c,"jme-srces"))break;if(n=a.attr(c,"src"))n=[{src:n,type:c.getAttribute("type"),media:c.getAttribute("media")}];else{n=[];a("source",c).each(function(){n.push({src:a.attr(this,"src"),type:this.getAttribute("type"),media:this.getAttribute("media")})});n.length||a("a.source",c).each(function(){n.push({src:this.href,type:this.getAttribute("type"),media:this.getAttribute("data-media")})})}break;case "getConfig":n={};a.each(["autoplay",
"loop","controls","poster","preload"],function(p,t){n[t]=a.attr(c,t)});break;case "preload":n=c.preload||c.getAttribute("preload");if(n==="")n="auto";s[n]||(n="metadata");break}return n}else if(q[e]){g=!!g;c[e]=g;e==="autoplay"&&u.changeAutoplay(c,g);if(g){c[e]=g;c.setAttribute(e,e)}else{c[e]=g;c.removeAttribute(e)}}else if(l[e])c.setAttribute(e,g);else if(e==="srces"){a("source, a.source",c).remove();c.removeAttribute("src");g=a.isArray(g)?g:[g];u.addSrces(c,g,m)||a.each(g,function(p,t){n=f.createElement("source");
if(typeof t==="string")t={src:t};n.setAttribute("src",t.src);t.type&&n.setAttribute("type",t.type);t.media&&n.setAttribute("media",t.media);c.appendChild(n)})}else if(e==="getConfig")a.each(g,function(p,t){a.attr(c,p,t)});else if(e==="preload"){if(g==="")g="auto";else s[g]||(g="metadata");u.change(c,g,m);c.setAttribute(e,g)}};a.event.special.mediaerror={setup:function(){var c=a(this).bind("error",a.event.special.mediaerror.handler).bind("native_mediareset",x);setTimeout(function(){c.each(x)},0)},
teardown:function(){a(this).unbind("error",a.event.special.mediaerror.handler).find("source").unbind("error",w)},handler:function(c){if(!a.data(this,"calledMediaError")){c=a.extend({},c||{},{type:"mediaerror"});a.data(this,"calledMediaError",true);return a.event.handle.apply(this,arguments)}}};r.getExt=function(c){var e=c.indexOf("?"),g="";c=e>0?c.substring(0,e):c;e=c.lastIndexOf(".")+1;return(g=c.substr(e))&&g.toLowerCase?g.toLowerCase():g};var A=r.getExt,z={audio:{"audio/ogg":["ogg","oga","ogm"],
"audio/mpeg":["mp2","mp3","mpga","mpega"],"audio/mp4":["mp4","mpg4","m4r"],"audio/wav":["wav"],"audio/x-m4a":["m4a"],"audio/x-m4p":["m4p"],"audio/3gpp":["3gp","3gpp"],"audio/webm":["webm"]},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"]}};a.extend(r,{jsPath:function(){var c=a("script");
c=c[c.length-1].src.split("?")[0];return c.slice(0,c.lastIndexOf("/")+1)}(),extendWithData:function(){var c={string:1,number:1,"boolean":1};return function(e,g,m){m||(m=g);a.each(m,a.isArray(m)?function(n,p){r.getData(e,p,g)}:function(n,p){c[typeof p]&&r.getData(e,n,g)});return g}}(),getData:function(){var c=function(e,g){e=e.getAttribute("data-"+g);if(!(!e&&e!==""))return e*1==e?parseFloat(e,10):e==="false"?false:e==="true"?true:e};return function(e,g,m){var n=g;m=m||{};if(typeof g==="string")g=
[n];a.each(g,a.isArray(g)?function(p,t){p=c(e,t);if(p!==undefined)m[t]=p}:function(p){var t=c(e,p);if(t!==undefined)m[p]=t});return m}}(),registerMimetype:function(c,e){arguments.length===1?a.each(z,function(g){r.registerMimetype(g,c)}):a.each(e,function(g,m){if(z[c][g])z[c][g]=[];z[c][g]=z[c][g].concat(m)})},_showMimeTypes:function(){window.console&&console.log(z)},add:function(c,e,g){if(!this.apis[e][c]){this.apis[e][c]=r.beget(this.fn);c!=="nativ"&&a.inArray(c,a.fn.jmeEmbed.defaults.apiOrder)===
-1&&a.fn.jmeEmbed.defaults.apiOrder.push(c)}a.extend(true,this.apis[e][c],g)},fn:{_init:a.noop,canPlayType:function(c){var e=this.apiElem,g;if(e&&e.canPlayType){g=e.canPlayType(c);return g==="no"?"":g}c=r.extractContainerCodecsFormType(c);var m=this;g="probably";if(!c[1])return this.canPlayContainer&&a.inArray(c[0],this.canPlayContainer)!==-1?"maybe":"";a.each(c[1],function(n,p){if(!m.canPlayCodecs||a.inArray(p,m.canPlayCodecs)===-1){g="";return false}});return g},canPlaySrc:function(c){var e=this;
if(typeof c!=="string"){if(c.type)return this.canPlayType(c.type);c=c.src}var g=A(c),m="";a.each(z[this.nodeName],function(n,p){if(a.inArray(g,p)!==-1){m=e.canPlayType(n);return false}});return m},canPlaySrces:function(c){c=c||a.attr(this.element,"srces");a.isArray(c)||(c=[c]);var e=this,g=false,m="";a.each(c,function(n,p){if(g=e.canPlaySrc(p)){m=p;return false}});return m},_setActive:a.noop,_setInactive:a.noop,_trigger:function(c){a(this.element).triggerHandler(c,c)}},apis:{audio:{},video:{}},extractContainerCodecsFormType:function(c){c=
c.split(/\s*;\s*/g);if(c[1]&&c[1].indexOf("codecs")!==-1)c[1]=c[1].replace(/["|']$/,"").replace(/^\s*codecs=('|")/,"").split(/\s*,\s*/g);return c},makeAbsURI:function(){return function(c){if(c&&typeof c==="string")c=a('')[0].href;return c}}(),beget:function(c){var e=function(){};e.prototype=c;return new e},_create:function(c,e,g,m){var n=a.data(g,"mediaElemSupport")||a.data(g,"mediaElemSupport",{apis:{},nodeName:c});if(!n.apis[e]){n.apis[e]=r.beget(r.apis[c][e]);n.apis[e].element=
g;n.apis[e].nodeName=c;n.apis[e].name=e;n.apis[e].data={};n.apis[e].embedOpts=m}return n},_transferStyles:["backgroundColor","backgroundPosition","backgroundImage","backgroundRepeat","background-attachment"],_setAPIActive:function(c,e){var g=a.data(c,"mediaElemSupport"),m=g.name;if(m===e)return true;var n=g.apis[m].apiElem,p=g.apis[e]&&g.apis[e].apiElem,t=false;if(p&&p.nodeName){if(g.nodeName!=="audio"||a.attr(c,"controls"))e==="nativ"?g.apis[e].visualElem.css({display:""}):g.apis[e].visualElem.css(a.extend({visibility:""},
g.apis[m].visualElem.getDimensions()));g.apis[e]._setActive(m);t=true;g.apis[e]._trigger({type:"apiActivated",api:e});if(g.apis[m]){g.apis[m]._volumelevelState!==undefined&&a(c).volumelevel(g.apis[m]._volumelevelState);g.apis[m]._muteState!==undefined&&a(c).muted(g.apis[m]._muteState);g.apis[m].visualElem&&a.each(r._transferStyles,function(v,C){g.apis[e].visualElem.css(C,g.apis[m].visualElem.css(C))})}}g.apis[e].isAPIActive=true;if(n&&n.nodeName){if(m==="nativ")n.style.display="none";else g.apis[m].visualElem.css({height:0,
width:0,visibility:"hidden"});g.apis[m]._setInactive(e);g.apis[m].isAPIActive=false;g.apis[e]._trigger({type:"apiDeActivated",api:m})}g.name=e;return t},getSuitedPlayers:function(c,e){var g=a.data(c,"mediaElemSupport");if(g&&g.apis){g=g.apis;var m=a.attr(c,"srces"),n=false,p=function(t,v){if(!(typeof v.isTechAvailable==="boolean"&&!v.isTechAvailable||a.isFunction(v.isTechAvailable)&&!v.isTechAvailable())){if(v=v.canPlaySrces(m))n={src:v.src||v,name:t};return n}};if(!m.length)return"noSource";e?a.each(e,
function(t,v){return!p(v,g[v])}):a.each(g,function(t,v){return!p(t,v)});return n}},_embedApi:function(c,e,g){var m=a.attr(c,"getConfig"),n=a(c),p=c.id,t=n.attr("aria-labelledby");if(!p){i++;p=g.nodeName+"-"+i;c.id=p}g.apis[e.name].visualElem=a('
').insertBefore(c);t&&g.apis[e.name].visualElem.attr({role:"group","aria-labelledby":t});if(g.nodeName==="audio"&&!m.controls)g.apis[e.name].visualElem.css({height:0,width:0});
else{g.apis[e.name].visualElem.css(n.getDimensions());a.each(r._transferStyles,function(v,C){g.apis[e.name].visualElem.css(C,n.css(C))})}g.apis[e.name]._embed(e.src,g.name+"-"+p,m,function(v){g.apis[e.name].apiElem=v;a(v).addClass(g.nodeName);m.controls||a(v).attr({tabindex:"-1",role:"presentation"});g.apis[e.name]._init();g.apis[e.name]._trigger({type:"apiActivated",api:e.name})})},getPluginVersion:function(c,e){e=e||navigator.plugins&&navigator.plugins[c];c=[-1,0];if(e)if((e=(e.description||"").replace(/,/g,
".").match(/(\d+)/g)||["0"])&&e[0]){c[0]=e[0];if(e[1])c[0]+="."+e[1];c[0]=parseFloat(c[0],10);if(e[2])c[1]=parseInt(e[2],10)}return c},embedObject:function(c,e,g,m,n){c.style.overflow="hidden";c=a("").prependTo(c)[0];var p;if(navigator.plugins&&navigator.plugins.length){p=f.createElement("object");a.each(g,function(t,v){p.setAttribute(t,v)});a.each(m,function(t,v){var C=f.createElement("param");C.setAttribute("name",t);C.setAttribute("value",v);p.appendChild(C)});p.setAttribute("id",e);p.setAttribute("name",
e);if(m.wmode==="transparent"){p.style.minHeight="1px";p.style.minHeight="1px"}c.parentNode.replaceChild(p,c)}else if(window.ActiveXObject){p='";c.outerHTML=p;p=f.getElementById(e)}if(p){p.setAttribute("width","100%");p.setAttribute("height","100%")}a(window).unload(function(){jQuery.cleanData([p]);
p=null});setTimeout(function(){if(p&&p.style){p.style.width="100%";p.style.height="100%"}},0);return p}});r.add("nativ","video",{});r.add("nativ","audio",{});var B=function(){var c=a(this).hide().children(":not(source, track)").clone().insertAfter(this);a(this).one("mediareset",function(){a(this).show();c.remove()})};a.fn.jmeEmbed=function(c){c=a.extend(true,{},a.fn.jmeEmbed.defaults,c);c.showFallback&&a.support.mediaElements&&this.bind("totalerror",B);return this.each(function(){var e=this.nodeName.toLowerCase(),
g=false,m=this;if(!(e!=="video"&&e!=="audio"||a.support.flash9&&a.nodeName(m.parentNode,"object"))){a("object, embed",this).each(function(){a("> *:not(param, embed, object)",this).appendTo(m)}).remove();a(this).trigger("jmeBeforeEmbed",{options:c,nodeName:e});c.removeControls&&a.attr(this,"controls",false);var n=r._create(e,"nativ",this,c);n.name="nativ";n.apis.nativ.apiElem=this;n.apis.nativ.visualElem=a(this);n.apis.nativ.isAPIActive=true;a.each(r.apis[e],function(p){p!=="nativ"&&r._create(e,p,
m,c)});a(this).bind("mediaerror",function(){n.name==="nativ"&&y(this,c)});if(a.support.flash9&&c.activateFlash){g=r.getSuitedPlayers(m,["jwPlayer"]);if(g=="noSource")g={name:"jwPlayer"};n.apis.nativ.isAPIReady=true;if(g.name=="jwPlayer"&&!r._setAPIActive(this,"jwPlayer"))r._embedApi(this,g,n,e);else g=false}if(!g)if(c.debug||!a.support.mediaElements){y(this,c);n.apis.nativ.isAPIReady=true}else n.apis.nativ._init();a.attr(this,"preload",a.attr(this,"preload"),true);a(this).trigger("jmeEmbed",{options:c,
nodeName:e,data:n})}})};a.fn.jmeEmbed.defaults={debug:false,removeControls:false,showFallback:false,apiOrder:[],activateFlash:false};a.fn.mediaElementEmbed=a.fn.jmeEmbed;if(a.cleanData&&window.ActiveXObject){var D=a.cleanData;a.cleanData=function(c){D(c);for(var e=0,g=c.length;e=s)break}return z},l=function(s){var u={type:"progresschange"},
A;if(this.buffered&&this.buffered.length){if(s=this.duration){A=j();u.relStart=A.start/s*100;u.relLoaded=A.end/s*100}d._trigger(u)}else if(s.originalEvent&&"lengthComputable"in s.originalEvent&&s.originalEvent.loaded){if(s.originalEvent.lengthComputable&&s.originalEvent.total){u.relStart=0;u.relLoaded=s.originalEvent.loaded/s.originalEvent.total*100}d._trigger(u)}if(!u.relLoaded&&this.readyState===4){u.relStart=0;u.relLoaded=100;d._trigger(u)}return u.relLoaded},q=function(){if(l.call(d.element,{type:"ipadprogress"})>=
100||d.element.readyState===1)clearInterval(o)},o;a(d.element).bind("progress load",l);"buffered"in d.element&&a(d.element).bind("play waiting loadstart",function(){clearInterval(o);if(d.isAPIActive){o=setInterval(q,333);q()}})},b={isTechAvailable:a.support.mediaElements,_init:function(){var d=this,j=this.apiElem.muted,l=false,q=function(o){clearInterval(l);if(!d.element.error&&d.element.mozLoadFrom&&d.isAPIActive&&!d.element.readyState&&d.element.networkState===2&&a.support.flash9)if(o===true)d.element.load();
else l=setTimeout(function(){q(true)},o==="initial"?2E4:9E3)};f(this);a(this.element).bind({volumechange:function(){if(j!==d.apiElem.muted){j=d.apiElem.muted;d._trigger.call(d,{type:"mute",isMuted:j})}else d._trigger.call(d,{type:"volumelevelchange",volumelevel:d.apiElem.volume*100})},ended:function(){if(d.isAPIActive&&this.ended&&!this.paused&&!a.attr(this,"loop")){d._stopEvent("pause",true);this.pause()}},timeupdate:function(){var o={type:"timechange",time:this.currentTime};if(this.duration){o.duration=
this.duration;o.timeProgress=o.time/o.duration*100}d._trigger(o)},progress:function(){!d.loadedmeta&&this.duration&&d._trigger({type:"loadedmeta",duration:this.duration})},loadedmetadata:function(){d._trigger({type:"loadedmeta",duration:this.duration})}}).bind("play playing",function(o){if(!d.isAPIActive&&o.originalEvent&&!d.element.paused&&!d.element.ended)try{d.element.pause()}catch(s){}}).bind("mediareset",q).bind("ended play pause waiting playing",function(o){if(!d.isAPIActive&&o.originalEvent&&
(o.originalEvent.mediaAPI==="nativ"||!o.originalEvent.mediaAPI)||d._stoppedEvents[o.type])o.stopImmediatePropagation()});q("initial");a.support.mediaLoop||a(this.element).bind("ended",function(){if(d.isAPIActive&&a.attr(this,"loop")){var o=this;setTimeout(function(){a.attr(o,"loop")&&o.play()},0)}});if(!this.element.error)if(this.element.readyState>0)this._trigger({type:"loadedmeta",duration:this.element.duration});else if(this.element.networkState!==2||"webkitPreservesPitch"in this.element)this._trigger("mmAPIReady")},
play:function(){this.element.play()},pause:function(){this._allowEvent("pause");this.element.pause()},muted:function(d){if(typeof d!=="boolean")return this.element.muted;this.element.muted=d},volume:function(d){if(!isFinite(d))return this.element.volume*100;this.element.volume=d/100},currentTime:function(d){if(!isFinite(d))return this.element.currentTime;try{this.element.currentTime=d}catch(j){}},_mmload:function(){this.element.load?this.element.load():a(this.element).triggerHandler("error")},_isPlaying:function(){return!this.element.paused&&
this.element.readyState>1&&!this.element.error&&!this.element.ended},getDuration:function(){return this.element.duration},getCurrentSrc:function(){return this.element.currentSrc}};x.add("nativ","video",a.extend({_videoFullscreen:a.support.videoFullscreen,enterFullScreen:function(){if(!this._videoFullscreen)return false;try{this.element[i.enter]()}catch(d){return false}return true},exitFullScreen:function(){if(!this._videoFullscreen)return false;try{this.element[i.exit]()}catch(d){return false}return true}},
b));x.add("nativ","audio",b);a.fn.getJMEAPI=function(d){if(this[0]){var j=a.data(this[0],"mediaElemSupport");return d||!j||!j.name||!j.apis?j:j.apis[j.name]}};var h={jmeReady:1,getJMEVisual:1,jmeReady:1,isJMEReady:1,getMediaAPI:1,supportsFullScreen:1};x.registerAPI=function(d){if(typeof d==="string")d=[d];a.each(d,function(j,l){if((j=x.apis.video.nativ[l])&&!a.fn[l]&&a.isFunction(j)&&l.indexOf("_")!==0)a.fn[l]=function(){var q=arguments,o;this.each(function(){var s=a(this).getJMEAPI();if(s)if(h[l]||
l=="loadSrc"&&a.data(this,"mediaElemSupport").noSource||s.isJMEReady()&&!s.totalerror&&(s.name!=="nativ"||a.support.mediaElements)){o=s[l].apply(s,q);return o===undefined}else{s.unAPIReady(l+"queue");s.jmeReady.call(s,function(){s[l].apply(s,q)},l+"queue")}});return o===undefined?this:o}})};var k=[];a.each(x.apis.video.nativ,function(d){k.push(d)});x.registerAPI(k);a.fn.onAPIReady=a.fn.jmeReady;a.fn.getMMAPI=a.fn.getJMEAPI;x.fn._extend=function(d,j){var l=[];a.each(d,function(q,o){x.fn[q]=o;l.push(q);
if(j)h[q]=true});x.registerAPI(l)}})(jQuery);
(function(a){function w(i,f){i=a(i);var b={},h=i.attr("data-controls");b.mm=h?a("#"+h):a("video, audio",i).filter(":first");b.api=b.mm.getJMEAPI(true)||b.mm.jmeEmbed(f.embed).getJMEAPI(true);if(!b.api)return b;if(i.is(f.controlSel))b.controls=i;if(!b.controls||b.controls.hasClass(f.classPrefix+"media-controls")){if(i[0]&&!b.api.controlWrapper&&a.contains(i[0],b.mm[0]))b.api.controlWrapper=i;b.controls=b.controls?a(f.controlSel,i).add(b.controls):a(f.controlSel,i)}return b}function x(i,f,b,h){if(!i.data("jmePlayer")){r.addStateClasses(i,
f,h.classPrefix);i.data("jmePlayer",{mediaelement:f,api:b});a.fn.videoOverlay&&i.videoOverlay({video:f,startCSS:{width:"auto",height:"auto",zIndex:99998,padding:0,margin:0,borderWidth:0},position:{bottom:0,left:0,right:0,top:0,width:0,height:0}});a.ui&&a.ui.keyCode&&i.bind("keydown",function(k){if(!k.jmeHandledEvent){k.jmeHandledEvent=true;if({40:1,37:1,39:1,38:1}[k.keyCode]){if(!a(k.target).is(".ui-slider-handle")){var d=5;switch(k.keyCode){case a.ui.keyCode.UP:if(k.ctrlKey)d+=5;f.volume(Math.min(100,
f.volume()+d));break;case a.ui.keyCode.DOWN:if(k.ctrlKey)d+=5;f.volume(Math.max(0,f.volume()-d));break;case a.ui.keyCode.LEFT:if(k.ctrlKey)d+=55;f.currentTime(Math.max(0,f.currentTime()-d));break;case a.ui.keyCode.RIGHT:if(k.ctrlKey)d+=55;f.currentTime(Math.min(f.getDuration(),f.currentTime()+d));break}k.preventDefault()}}else if(k.keyCode===a.ui.keyCode.SPACE&&(!a.nodeName(k.target,"button")&&a.attr(k.target,"role")!=="button"||i.hasClass("wraps-fullscreen"))){f.togglePlay();k.preventDefault()}}})}}
a.event.special.ariaclick||function(){var i=false,f=function(b){if(!i&&(!b.keyCode||b.keyCode===13||b.keyCode===32&&a.attr(b.target,"role")==="button")){i=true;setTimeout(function(){i=false},1);return a.event.special.ariaclick.handler.apply(this,arguments)}else if(i&&b.type=="click"){b.preventDefault();return false}};a.event.special.ariaclick={setup:function(){a(this).bind("click keydown",f);return true},teardown:function(){a(this).unbind("click keydown",f);return true},handler:function(b){b.type=
"ariaclick";return a.event.handle.apply(this,arguments)}}}();var y={},r=a.multimediaSupport;a.fn.jmeControl=function(i){function f(){var b=w(this,i);if(b.api){b.api.controls=b.api.controls||[];if(b.api){b.controls.each(function(){var h=a(this);if(a.inArray(this,b.api.controls)===-1){b.api.controls.push(this);a.each(y,function(k,d){if(h.hasClass(i.classPrefix+k)){k=a.extend(true,{},i);k[d.optionsName]=r.extendWithData(h[0],k[d.optionsName],i[d.optionsName]);d(h,b.mm,b.api,k);return false}})}});b.api.controlWrapper&&
b.api.controlWrapper[0]&&x(b.api.controlWrapper,b.mm,b.api,i)}}}i=a.extend(true,{},a.fn.jmeControl.defaults,i);i.controlSel=[];a.each(y,function(b){b!=="media-controls"&&i.controlSel.push("."+i.classPrefix+b)});i.controlSel.push("."+i.classPrefix+"media-controls");i.controlSel=i.controlSel.join(", ");return this.each(f)};a.fn.jmeControl.defaults={embed:{removeControls:true},classPrefix:"",addThemeRoller:true};a.support.waiaria=!a.browser.msie||a.browser.version>7;a.fn.jmeControl.getBtn=function(){var i=
/\s*\/\s*|\s*\|\s*|\s*\,\s*/g;return function(f){var b={icon:a(".ui-icon",f),text:a(".button-text",f),title:f};if(!f.is(":button")&&!f.attr("role")){a.support.waiaria&&f.removeAttr("href");f.attr({role:"button",tabindex:0})}if(!b.icon[0]&&!b.text[0]&&!a("*",f)[0]){b.icon=f;b.text=f}b.names=b.text.text().split(i);b.titleText=(f.attr("title")||"").split(i);if(b.names.length!==2)b.text=a([]);if(b.titleText.length!==2)b.title=a([]);return b}}();r.camelCase=function(){var i=/-([a-z])/ig,f=function(b,h){return h.toUpperCase()};
return function(b){return b.replace(i,f)}}();a.fn.jmeControl.addControl=function(i,f,b,h){b=b||{};h=h||r.camelCase(i);a.fn.jmeControl.defaults[h]=b;f.optionsName=h;y[i]=f};a.fn.jmeControl.addControls=function(i){a.each(i,function(f,b){a.fn.jmeControl.addControl(b.name,b.fn,b.options,b.optionName)})};a.fn.registerMMControl=a.fn.jmeControl;a.each({"play-pause":{stateMethod:"isPlaying",actionMethod:"togglePlay",evts:"play playing pause ended loadedmeta mediareset",trueClass:"ui-icon-pause",falseClass:"ui-icon-play"},
"mute-unmute":{stateMethod:"muted",actionMethod:"toggleMuted",evts:"mute loadedmeta",trueClass:"ui-icon-volume-off",falseClass:"ui-icon-volume-on"}},function(i,f){a.fn.jmeControl.addControl(i,function(b,h,k,d){function j(q){if(i=="play-pause"&&q&&q.type=="playing"?true:h[f.stateMethod]()){l.text.text(l.names[1]);l.title.attr("title",l.titleText[1]);l.icon.addClass(f.trueClass).removeClass(f.falseClass)}else{l.text.text(l.names[0]);l.title.attr("title",l.titleText[0]);l.icon.addClass(f.falseClass).removeClass(f.trueClass)}}
var l=a.fn.jmeControl.getBtn(b);d.addThemeRoller&&b.addClass("ui-state-default ui-corner-all");j();h.bind(f.evts,j).jmeReady(j);b.bind("ariaclick",function(q){h[f.actionMethod]();q.preventDefault()})})});a.each(["current-time","remaining-time"],function(i,f){a.fn.jmeControl.addControl(f,function(b,h,k,d){var j=f=="remaining-time"?function(q,o){b.html(k.apis[k.name]._format(l-o.time))}:function(q,o){b.html(k.apis[k.name]._format(o.time))},l=Number.MIN_VALUE;d.addThemeRoller&&b.addClass("ui-widget-content ui-corner-all");
b.html("00:00").attr("role","timer");f=="remaining-time"&&h.bind("loadedmeta",function(q,o){l=o.duration||Number.MIN_VALUE;j(false,{time:0})});h.bind("timechange",j).bind("mediareset",function(){b.html("00:00")})})});a.fn.jmeControl.addControls([{name:"duration",fn:function(i,f,b,h){h.addThemeRoller&&i.addClass("ui-widget-content ui-corner-all");i.html("00:00");f.bind("loadedmeta",function(k,d){i.html(b.apis[b.name]._format(d.duration))}).bind("mediareset",function(){i.html("00:00")})}},{name:"media-controls",
options:{dynamicTimeslider:false,timeSliderAdjust:0,excludeSel:false,fullWindowOverlay:false},fn:function(i,f,b,h){function k(){var l=i.width()+h.mediaControls.timeSliderAdjust,q=d.outerWidth(true)-d.innerWidth();a("> *",i).each(function(){if(d[0]!==this&&this.offsetWidth&&a.curCSS(this,"position")!=="absolute"&&(!h.excludeSel||!a(this).is(h.excludeSel)))q+=a(this).outerWidth(true)});d.css("width",l-q)}h.addThemeRoller&&i.addClass("ui-widget ui-widget-header ui-corner-all");i.attr("role","toolbar");
if(h.mediaControls.dynamicTimeslider){var d=a("."+h.classPrefix+"timeline-slider",i),j=setTimeout(k,0);f.jmeReady(function(){clearInterval(j);setTimeout(k,0)});a(window).bind("resize",k);f.bind("resize emchange",k)}h.mediaControls.fullWindowOverlay&&a.fn.videoOverlay&&i.videoOverlay({fullscreenClass:h.classPrefix+"controls-fullscreenvideo",video:f,startCSS:{width:"auto"},position:{bottom:0,left:0,right:0}})}},{name:"media-label",fn:function(){var i=0;return function(f,b,h,k){if(!(!h.controlWrapper||
h.controlWrapper.attr("role"))){b=f.attr("id");var d=a("."+k.classPrefix+"media-name",f);if(!b){i++;b=k.classPrefix+"media-label-"+i;f.attr("id",b)}h.mediaName=d[0]?d:f;h.controlWrapper.attr({role:"group","aria-labelledby":b})}}}()},{name:"fallback",fn:function(i,f,b,h){if(!(h.embed.showFallback||!a.support.mediaElements)){var k=i.clone(true);f.bind("totalerror",function(){f.after(k).hide();a(this).one("mediareset",function(){f.show();k.detach()})})}}},{name:"media-state",options:{click:"togglePlay"},
fn:function(i,f,b,h){r.addStateClasses(i,f,h.classPrefix);h.mediaState.click&&f[h.mediaState.click]&&i.click(function(){f[h.mediaState.click]()})}}]);r.addStateClasses=function(i,f,b){b=b||"";var h=b+"playing "+b+"totalerror "+b+"waiting "+b+"idle "+b+"flashblocker",k=function(){i.removeClass(h)};f.jmeReady(function(){var d=f.isPlaying();if(typeof d==="boolean")i.addClass(b+d?"idle":"playing")});i.addClass(b+f.getMediaAPI());f.bind({apiActivated:function(d,j){i.addClass(b+j.api)},apiDeActivated:function(d,
j){i.removeClass(b+j.api)}}).bind("playing totalerror waiting flashblocker",function(d){k();i.addClass(b+d.type)}).bind("play",function(){i.removeClass(b+"idle")}).bind("pause ended mediareset",function(){k();i.addClass(b+"idle")}).bind("canplay",function(){i.removeClass(b+"waiting")})};(function(){var i=a.fn.a11ySlider?"a11ySlider":"slider",f={range:false,animate:false};a(function(){i=a.fn.a11ySlider?"a11ySlider":"slider"});a.fn.jmeControl.addControls([{name:"timeline-slider",optionName:"timeSlider",
options:f,fn:function(b,h,k,d){var j=false,l=function(){if(k.apis[k.name].loadedmeta&&k.apis[k.name].loadedmeta.duration){b[i]("option","step",100/Math.max(100,b[0].offsetWidth));b[i]("option","disabled",false)}else b[i]("option","disabled",true)};b[i](d.timeSlider)[i]("option","disabled",true);a(window).bind("resize",l);a(document).bind("emchange",l);h.bind("loadedmeta resize",l).bind("timechange",function(q,o){parseInt(o.timeProgress,10);o.timeProgress!==undefined&&!j&&b[i]("value",o.timeProgress)}).bind("mediareset",
function(){b[i]("value",0);l()}).bind("ended",function(){b[i]("value",100)});b.bind("slidestart",function(q){if(q.originalEvent)j=true}).bind("slidestop",function(){j=false}).bind("slide",function(q,o){q.originalEvent&&k.apis[k.name].isAPIReady&&k.apis[k.name].relCurrentTime(o.value)})}},{name:"volume-slider",options:a.extend({mutestate:false},f),fn:function(b,h,k,d){function j(q,o){l||(q.type=="volumelevelchange"?b[i]("value",o.volumelevel):b[i]("value",h.muted()?0:h.volume()))}var l=false;b[i](d.volumeSlider)[i]("option",
"disabled",true);b.bind("slidestart",function(q){if(q.originalEvent)l=true}).bind("slidestop",function(){l=false}).bind("slide",function(q,o){if(q.originalEvent&&k.apis[k.name].isAPIReady){k.apis[k.name].volume(o.value);d.volumeSlider.mutestate&&k.apis[k.name].muted()&&k.apis[k.name].muted(false)}});h.bind("volumelevelchange loadedmeta",j).jmeReady(function(){b[i]("option","disabled",false);j({type:"ready"})});d.volumeSlider.mutestate&&h.bind("mute",j)}},{name:"progressbar",fn:function(b,h,k,d){function j(q,
o){"relLoaded"in o?b.progressbar("option","disabled",false).progressbar("value",o.relLoaded):b.progressbar("option","disabled",true)}function l(){b.progressbar("option","disabled",true).progressbar("value",0)}b.progressbar(d.progressbar).progressbar("option","disabled",true);h.bind("progresschange",j).bind("mediareset",l)}}])})()})(jQuery);
(function(a){var w={type:"application/x-shockwave-flash"},x={classid:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},y=a.multimediaSupport;a.extend(a.fn.jmeEmbed.defaults,{jwPlayer:{path:y.jsPath+"player.swf",hideIcons:"auto",vars:{},attrs:{},plugins:{},params:{allowscriptaccess:"always",allowfullscreen:"true"}}});a(function(){var h=(a("script.jwPlayer")[0]||{}).src;if(h)a.fn.jmeEmbed.defaults.jwPlayer.path=h});var r={A:/&/g,a:/&/g,e:/\=/g,q:/\?/g},i={audio:"sound",video:"video"},f=function(h){return h.replace?
h.replace(r.A,"%26").replace(r.a,"%26").replace(r.e,"%3D").replace(r.q,"%3F"):h};(function(){a.support.flash9=false;a.support.flashVersion=0;var h=y.getPluginVersion("Shockwave Flash"),k=function(j){a.support.flash9=false;try{if(j&&typeof j.GetVariable!=="undefined"){var l=j.GetVariable("$version");j=y.getPluginVersion("",{description:l});a.support.flashVersion=j[0];a.support.flash9=!!(j[0]>9||j[0]===9&&j[1]>=115)}}catch(q){}};if(h&&h[0])a.support.flashVersion=h[0];if(h[0]>9||h[0]===9&&h[1]>=115){a.support.flash9=
true;a(function(){h=a("",w).appendTo("body");k(h[0]);h.remove()})}else if(window.ActiveXObject)try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");k(h);h=null}catch(d){}})();var b={isTechAvailable:function(){return a.support.flash9},_extendJWLoad:function(h,k,d){if(h){d=d||this.element;y.extendWithData(d,k,["type","provider","stretching","bufferlength"]);d=y.getExt(h);var j=d=="m4r"?"video":this.nodeName;if(d=="m4r"||!this.canPlaySrc(h)){if(!k.provider)k.provider=i[j];if(!k.type)k.type=
i[j]}return k}},_embed:function(h,k,d,j){var l=this.embedOpts.jwPlayer,q=a.extend({},l.vars,{file:h,id:k}),o=a.extend({name:k},l.attrs,w,!window.ActiveXObject?{data:l.path}:{}),s=a.extend({movie:l.path},l.params),u=[],A=this;this._extendJWLoad(h,q);if(d.poster)q.image=d.poster;q.autostart=""+d.autoplay;q.repeat=d.loop?"single":"false";q.controlbar=d.controls?"bottom":"none";if(!d.controls&&this.nodeName!=="audio"&&s.wmode===undefined)s.wmode="transparent";if(!d.controls&&l.hideIcons&&s.wmode==="transparent"||
l.hideIcons===true){q.icons="false";q.showicons="false"}if(s.wmode==="transparent"&&!q.screencolor&&!o.bgcolor){q.screencolor="ffffffff";o.bgcolor="#000000"}s.flashvars=[];a.each(q,function(z,B){s.flashvars.push(f(z)+"="+f(B))});a.each(l.plugins,function(z,B){u.push(B)});u.length&&s.flashvars.push("plugins="+u.join(","));s.flashvars=s.flashvars.join("&");j(y.embedObject(this.visualElem[0],k,o,s,x,"Shockwave Flash"));setTimeout(function(){var z=a("object",A.visualElem)[0];if(!z||z.style.display===
"none"&&a("> *",A.visualElem).length>1){a("div[bgactive]",A.visualElem).css({width:"100%",height:"100%"});A._trigger("flashblocker")}},9)},canPlaySrc:function(h){var k=y.fn.canPlaySrc.apply(this,arguments),d=-1;d=h.src||h;if(!k&&typeof d==="string"){d=d.indexOf("youtube.com/");if(d<15&&d>6)k="maybe"}return k},canPlayCodecs:["avc1.42E01E","mp4a.40.2","avc1.58A01E","avc1.4D401E","avc1.64001E","VP6","mp3","AAC"],canPlayContainer:["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"]};y.add("jwPlayer","video",b);y.add("jwPlayer","audio",b)})(jQuery);
(function(a){function w(f){if(f){f=f.replace(r,"");return a.data(x.getElementById(f),"mediaElemSupport").apis.jwPlayer}}var x=document,y=a.multimediaSupport,r=/^jwPlayer-/;window.jwEvents={View:{PLAY:function(f){if(f=f.state&&w(f.id)){f._trigger("play");f._$isPlaystate=true}}},Model:{BUFFER:function(f){var b=w(f.id);if(b){if(b._$timeProgress&&f.percentage+b._$startBuffer+1