(function(a,b){a.fn.jPlayer=function(c){var d=typeof c==="string",e=Array.prototype.slice.call(arguments,1),f=this;c=!d&&e.length?a.extend.apply(null,[true,c].concat(e)):c;if(d&&c.charAt(0)==="_")return f;d?this.each(function(){var d=a.data(this,"jPlayer"),g=d&&a.isFunction(d[c])?d[c].apply(d,e):d;if(g!==d&&g!==b){f=g;return false}}):this.each(function(){var b=a.data(this,"jPlayer");if(b){b.option(c||{})._init();b.option(c||{})}else a.data(this,"jPlayer",new a.jPlayer(c,this))});return f};a.jPlayer=function(b,c){if(arguments.length){this.element=a(c);this.options=a.extend(true,{},this.options,b);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};a.jPlayer.event={ready:"jPlayer_ready",resize:"jPlayer_resize",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked",timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};a.jPlayer.htmlEvent=["loadstart","abort","emptied","stalled","loadedmetadata","loadeddata","canplaythrough","ratechange"];a.jPlayer.pause=function(){a.each(a.jPlayer.prototype.instances,function(a,b){b.data("jPlayer").status.srcSet&&b.jPlayer("pause")})};a.jPlayer.timeFormat={showHour:false,showMin:true,showSec:true,padHour:false,padMin:true,padSec:true,sepHour:":",sepMin:":",sepSec:""};a.jPlayer.convertTime=function(b){b=new Date(b*1e3);var c=b.getUTCHours(),d=b.getUTCMinutes();b=b.getUTCSeconds();c=a.jPlayer.timeFormat.padHour&&c<10?"0"+c:c;d=a.jPlayer.timeFormat.padMin&&d<10?"0"+d:d;b=a.jPlayer.timeFormat.padSec&&b<10?"0"+b:b;return(a.jPlayer.timeFormat.showHour?c+a.jPlayer.timeFormat.sepHour:"")+(a.jPlayer.timeFormat.showMin?d+a.jPlayer.timeFormat.sepMin:"")+(a.jPlayer.timeFormat.showSec?b+a.jPlayer.timeFormat.sepSec:"")};a.jPlayer.uaMatch=function(a){a=a.toLowerCase();var b=/(opera)(?:.*version)?[ \/]([\w.]+)/,c=/(msie) ([\w.]+)/,d=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||b.exec(a)||c.exec(a)||a.indexOf("compatible")<0&&d.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};a.jPlayer.browser={};var c=a.jPlayer.uaMatch(navigator.userAgent);if(c.browser){a.jPlayer.browser[c.browser]=true;a.jPlayer.browser.version=c.version}a.jPlayer.prototype={count:0,version:{script:"2.0.0",needFlash:"2.0.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash",supplied:"mp3",preload:"metadata",volume:.8,muted:false,backgroundColor:"#000000",cssSelectorAncestor:"#jp_interface_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",currentTime:".jp-current-time",duration:".jp-duration"},idPrefix:"jp",errorAlerts:false,warningAlerts:false},instances:{},status:{src:"",media:{},paused:true,format:{},formatType:"",waitForPlay:true,waitForLoad:true,srcSet:false,video:false,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0},_status:{volume:b,muted:false,width:0,height:0},internal:{ready:false,instance:b,htmlDlyCmdId:b},solution:{html:true,flash:true},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:true,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:true,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:false,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:false,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:false,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:true,media:"video"},ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:false,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:false,media:"video"}},_init:function(){var c=this;this.element.empty();this.status=a.extend({},this.status,this._status);this.internal=a.extend({},this.internal);this.formats=[];this.solutions=[];this.require={};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.status.volume=this._limitValue(this.options.volume,0,1);this.status.muted=this.options.muted;this.status.width=this.element.css("width");this.status.height=this.element.css("height");this.element.css({"background-color":this.options.backgroundColor});a.each(this.options.supplied.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.format[e]){var f=false;a.each(c.formats,function(a,b){if(e===b){f=true;return false}});f||c.formats.push(e)}});a.each(this.options.solution.toLowerCase().split(","),function(b,d){var e=d.replace(/^\s+|\s+$/g,"");if(c.solution[e]){var f=false;a.each(c.solutions,function(a,b){if(e===b){f=true;return false}});f||c.solutions.push(e)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")===""&&this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=a.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=a.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:b});this.internal.video=a.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:b});this.internal.flash=a.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:b,swf:this.options.swfPath+(this.options.swfPath!==""&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf"});this.internal.poster=a.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:b});a.each(a.jPlayer.event,function(a,d){if(c.options[a]!==b){c.element.bind(d+".jPlayer",c.options[a]);c.options[a]=b}});this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){if(!c.status.video||c.status.waitForPlay)c.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=a("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.require.audio=false;this.require.video=false;a.each(this.formats,function(a,b){c.require[c.format[b].media]=true});this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType}this.flash.available=this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};a.each(this.formats,function(a,b){c.html.canPlay[b]=c.html[c.format[b].media].available&&""!==c.htmlElement[c.format[b].media].canPlayType(c.format[b].codec);c.flash.canPlay[b]=c.format[b].flashCanPlay&&c.flash.available});this.html.desired=false;this.flash.desired=false;a.each(this.solutions,function(b,d){if(b===0)c[d].desired=true;else{var e=false,f=false;a.each(c.formats,function(a,b){if(c[c.solutions[0]].canPlay[b])if(c.format[b].media==="video")f=true;else e=true});c[d].desired=c.require.audio&&!e||c.require.video&&!f}});this.html.support={};this.flash.support={};a.each(this.formats,function(a,b){c.html.support[b]=c.html.canPlay[b]&&c.html.desired;c.flash.support[b]=c.flash.canPlay[b]&&c.flash.desired});this.html.used=false;this.flash.used=false;a.each(this.solutions,function(b,d){a.each(c.formats,function(a,b){if(c[d].support[b]){c[d].used=true;return false}})});this.html.used||this.flash.used||this._error({type:a.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SOLUTION,hint:a.jPlayer.errorHint.NO_SOLUTION});this.html.active=false;this.html.audio.gate=false;this.html.video.gate=false;this.flash.active=false;this.flash.gate=false;if(this.flash.used){var d="id="+escape(this.internal.self.id)+"&vol="+this.status.volume+"&muted="+this.status.muted;if(a.browser.msie&&Number(a.browser.version)<=8){var e='<object id="'+this.internal.flash.id+'"';e+=' classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';e+=' codebase="'+document.URL.substring(0,document.URL.indexOf(":"))+'://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"';e+=' type="application/x-shockwave-flash"';e+=' width="0" height="0">';e+="</object>";var f=[];f[0]='<param name="movie" value="'+this.internal.flash.swf+'" />';f[1]='<param name="quality" value="high" />';f[2]='<param name="FlashVars" value="'+d+'" />';f[3]='<param name="allowScriptAccess" value="always" />';f[4]='<param name="bgcolor" value="'+this.options.backgroundColor+'" />';d=document.createElement(e);for(e=0;e<f.length;e++)d.appendChild(document.createElement(f[e]));this.element.append(d)}else{f='<embed name="'+this.internal.flash.id+'" id="'+this.internal.flash.id+'" src="'+this.internal.flash.swf+'"';f+=' width="0" height="0" bgcolor="'+this.options.backgroundColor+'"';f+=' quality="high" FlashVars="'+d+'"';f+=' allowScriptAccess="always"';f+=' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';this.element.append(f)}this.internal.flash.jq=a("#"+this.internal.flash.id);this.internal.flash.jq.css({width:"0px",height:"0px"})}if(this.html.used){if(this.html.audio.available){this._addHtmlEventListeners(this.htmlElement.audio,this.html.audio);this.element.append(this.htmlElement.audio);this.internal.audio.jq=a("#"+this.internal.audio.id)}if(this.html.video.available){this._addHtmlEventListeners(this.htmlElement.video,this.html.video);this.element.append(this.htmlElement.video);this.internal.video.jq=a("#"+this.internal.video.id);this.internal.video.jq.css({width:"0px",height:"0px"})}}this.html.used&&!this.flash.used&&window.setTimeout(function(){c.internal.ready=true;c.version.flash="n/a";c._trigger(a.jPlayer.event.ready)},100);a.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)});this._updateInterface();this._updateButtons(false);this._updateVolume(this.status.volume);this._updateMute(this.status.muted);this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();a.jPlayer.prototype.count++},destroy:function(){this._resetStatus();this._updateInterface();this._seeked();this.css.jq.currentTime.length&&this.css.jq.currentTime.text("");this.css.jq.duration.length&&this.css.jq.duration.text("");this.status.srcSet&&this.pause();a.each(this.css.jq,function(a,b){b.unbind(".jPlayer")});this.element.removeData("jPlayer");this.element.unbind(".jPlayer");this.element.empty();this.instances[this.internal.instance]=b},enable:function(){},disable:function(){},_addHtmlEventListeners:function(b,c){var d=this;b.preload=this.options.preload;b.muted=this.options.muted;b.addEventListener("progress",function(){if(c.gate&&!d.status.waitForLoad){d._getHtmlStatus(b);d._updateInterface();d._trigger(a.jPlayer.event.progress)}},false);b.addEventListener("timeupdate",function(){if(c.gate&&!d.status.waitForLoad){d._getHtmlStatus(b);d._updateInterface();d._trigger(a.jPlayer.event.timeupdate)}},false);b.addEventListener("durationchange",function(){if(c.gate&&!d.status.waitForLoad){d.status.duration=this.duration;d._getHtmlStatus(b);d._updateInterface();d._trigger(a.jPlayer.event.durationchange)}},false);b.addEventListener("play",function(){if(c.gate&&!d.status.waitForLoad){d._updateButtons(true);d._trigger(a.jPlayer.event.play)}},false);b.addEventListener("playing",function(){if(c.gate&&!d.status.waitForLoad){d._updateButtons(true);d._seeked();d._trigger(a.jPlayer.event.playing)}},false);b.addEventListener("pause",function(){if(c.gate&&!d.status.waitForLoad){d._updateButtons(false);d._trigger(a.jPlayer.event.pause)}},false);b.addEventListener("waiting",function(){if(c.gate&&!d.status.waitForLoad){d._seeking();d._trigger(a.jPlayer.event.waiting)}},false);b.addEventListener("canplay",function(){if(c.gate&&!d.status.waitForLoad){b.volume=d._volumeFix(d.status.volume);d._trigger(a.jPlayer.event.canplay)}},false);b.addEventListener("seeking",function(){if(c.gate&&!d.status.waitForLoad){d._seeking();d._trigger(a.jPlayer.event.seeking)}},false);b.addEventListener("seeked",function(){if(c.gate&&!d.status.waitForLoad){d._seeked();d._trigger(a.jPlayer.event.seeked)}},false);b.addEventListener("suspend",function(){if(c.gate&&!d.status.waitForLoad){d._seeked();d._trigger(a.jPlayer.event.suspend)}},false);b.addEventListener("ended",function(){if(c.gate&&!d.status.waitForLoad){if(!a.jPlayer.browser.webkit)d.htmlElement.media.currentTime=0;d.htmlElement.media.pause();d._updateButtons(false);d._getHtmlStatus(b,true);d._updateInterface();d._trigger(a.jPlayer.event.ended)}},false);b.addEventListener("error",function(){if(c.gate&&!d.status.waitForLoad){d._updateButtons(false);d._seeked();if(d.status.srcSet){d.status.waitForLoad=true;d.status.waitForPlay=true;d.status.video&&d.internal.video.jq.css({width:"0px",height:"0px"});d._validString(d.status.media.poster)&&d.internal.poster.jq.show();d.css.jq.videoPlay.length&&d.css.jq.videoPlay.show();d._error({type:a.jPlayer.error.URL,context:d.status.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL})}}},false);a.each(a.jPlayer.htmlEvent,function(e,f){b.addEventListener(this,function(){c.gate&&!d.status.waitForLoad&&d._trigger(a.jPlayer.event[f])},false)})},_getHtmlStatus:function(a,b){var c=0,d=0,e=0,f=0;c=a.currentTime;d=this.status.duration>0?100*c/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){e=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;f=100*a.currentTime/a.seekable.end(a.seekable.length-1)}else{e=100;f=d}if(b)d=f=c=0;this.status.seekPercent=e;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=d;this.status.currentTime=c},_resetStatus:function(){this.status=a.extend({},this.status,a.jPlayer.prototype.status)},_trigger:function(b,c,d){b=a.Event(b);b.jPlayer={};b.jPlayer.version=a.extend({},this.version);b.jPlayer.status=a.extend(true,{},this.status);b.jPlayer.html=a.extend(true,{},this.html);b.jPlayer.flash=a.extend(true,{},this.flash);if(c)b.jPlayer.error=a.extend({},c);if(d)b.jPlayer.warning=a.extend({},d);this.element.trigger(b)},jPlayerFlashEvent:function(b,c){if(b===a.jPlayer.event.ready&&!this.internal.ready){this.internal.ready=true;this.version.flash=c.version;this.version.needFlash!==this.version.flash&&this._error({type:a.jPlayer.error.VERSION,context:this.version.flash,message:a.jPlayer.errorMsg.VERSION+this.version.flash,hint:a.jPlayer.errorHint.VERSION});this._trigger(b)}if(this.flash.gate)switch(b){case a.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(b);break;case a.jPlayer.event.timeupdate:this._getFlashStatus(c);this._updateInterface();this._trigger(b);break;case a.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(b);break;case a.jPlayer.event.pause:this._updateButtons(false);this._trigger(b);break;case a.jPlayer.event.ended:this._updateButtons(false);this._trigger(b);break;case a.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&&this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._error({type:a.jPlayer.error.URL,context:c.src,message:a.jPlayer.errorMsg.URL,hint:a.jPlayer.errorHint.URL});break;case a.jPlayer.event.seeking:this._seeking();this._trigger(b);break;case a.jPlayer.event.seeked:this._seeked();this._trigger(b);break;default:this._trigger(b)}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration},_updateButtons:function(a){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide();this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(a.jPlayer.convertTime(this.status.currentTime));this.css.jq.duration.length&&this.css.jq.duration.text(a.jPlayer.convertTime(this.status.duration))},_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},setMedia:function(b){var c=this;this._seeked();clearTimeout(this.internal.htmlDlyCmdId);var d=this.html.audio.gate,e=this.html.video.gate,f=false;a.each(this.formats,function(g,h){var i=c.format[h].media==="video";a.each(c.solutions,function(a,g){if(c[g].support[h]&&c._validString(b[h])){var k=g==="html";if(i)if(k){c.html.audio.gate=false;c.html.video.gate=true;c.flash.gate=false}else{c.html.audio.gate=false;c.html.video.gate=false;c.flash.gate=true}else if(k){c.html.audio.gate=true;c.html.video.gate=false;c.flash.gate=false}else{c.html.audio.gate=false;c.html.video.gate=false;c.flash.gate=true}if(c.flash.active||c.html.active&&c.flash.gate||d===c.html.audio.gate&&e===c.html.video.gate)c.clearMedia();else if(d!==c.html.audio.gate&&e!==c.html.video.gate){c._html_pause();c.status.video&&c.internal.video.jq.css({width:"0px",height:"0px"});c._resetStatus()}if(i){if(k){c._html_setVideo(b);c.html.active=true;c.flash.active=false}else{c._flash_setVideo(b);c.html.active=false;c.flash.active=true}c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show();c.status.video=true}else{if(k){c._html_setAudio(b);c.html.active=true;c.flash.active=false}else{c._flash_setAudio(b);c.html.active=false;c.flash.active=true}c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide();c.status.video=false}f=true;return false}});if(f)return false});if(f){if(this._validString(b.poster))if(this.htmlElement.poster.src!==b.poster)this.htmlElement.poster.src=b.poster;else this.internal.poster.jq.show();else this.internal.poster.jq.hide();this.status.srcSet=true;this.status.media=a.extend({},b);this._updateButtons(false);this._updateInterface()}else{this.status.srcSet&&!this.status.waitForPlay&&this.pause();this.html.audio.gate=false;this.html.video.gate=false;this.flash.gate=false;this.html.active=false;this.flash.active=false;this._resetStatus();this._updateInterface();this._updateButtons(false);this.internal.poster.jq.hide();this.html.used&&this.require.video&&this.internal.video.jq.css({width:"0px",height:"0px"});this.flash.used&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._error({type:a.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:a.jPlayer.errorMsg.NO_SUPPORT,hint:a.jPlayer.errorHint.NO_SUPPORT})}},clearMedia:function(){this._resetStatus();this._updateButtons(false);this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);if(this.html.active)this._html_clearMedia();else this.flash.active&&this._flash_clearMedia()},load:function(){if(this.status.srcSet)if(this.html.active)this._html_load();else this.flash.active&&this._flash_load();else this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_play(a);else this.flash.active&&this._flash_play(a);else this._urlNotSetError("play")},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;if(this.status.srcSet)if(this.html.active)this._html_pause(a);else this.flash.active&&this._flash_pause(a);else this._urlNotSetError("pause")},pauseOthers:function(){var b=this;a.each(this.instances,function(a,c){b.element!==c&&c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})},stop:function(){if(this.status.srcSet)if(this.html.active)this._html_pause(0);else this.flash.active&&this._flash_pause(0);else this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);if(this.status.srcSet)if(this.html.active)this._html_playHead(a);else this.flash.active&&this._flash_playHead(a);else this._urlNotSetError("playHead")},mute:function(){this.status.muted=true;this.html.used&&this._html_mute(true);this.flash.used&&this._flash_mute(true);this._updateMute(true);this._updateVolume(0);this._trigger(a.jPlayer.event.volumechange)},unmute:function(){this.status.muted=false;this.html.used&&this._html_mute(false);this.flash.used&&this._flash_mute(false);this._updateMute(false);this._updateVolume(this.status.volume);this._trigger(a.jPlayer.event.volumechange)},_updateMute:function(a){if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(a){this.css.jq.mute.hide();this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(b){b=this._limitValue(b,0,1);this.status.volume=b;this.html.used&&this._html_volume(b);this.flash.used&&this._flash_volume(b);this.status.muted||this._updateVolume(b);this._trigger(a.jPlayer.event.volumechange)},volumeBar:function(a){if(!this.status.muted&&this.css.jq.volumeBar){var b=this.css.jq.volumeBar.offset();a=a.pageX-b.left;b=this.css.jq.volumeBar.width();this.volume(a/b)}},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.width(a*100+"%")},_volumeFix:function(a){var b=.001*Math.random();return a+(a<.5?b:-b)},_cssSelectorAncestor:function(b,c){this.options.cssSelectorAncestor=b;c&&a.each(this.options.cssSelector,function(a,b){self._cssSelector(a,b)})},_cssSelector:function(b,c){var d=this;if(typeof c==="string")if(a.jPlayer.prototype.options.cssSelector[b]){this.css.jq[b]&&this.css.jq[b].length&&this.css.jq[b].unbind(".jPlayer");this.options.cssSelector[b]=c;this.css.cs[b]=this.options.cssSelectorAncestor+" "+c;this.css.jq[b]=c?a(this.css.cs[b]):[];this.css.jq[b].length&&this.css.jq[b].bind("click.jPlayer",function(c){d[b](c);a(this).blur();return false});c&&this.css.jq[b].length!==1&&this._warning({type:a.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[b],message:a.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[b].length+" found for "+b+" method.",hint:a.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_METHOD,context:b,message:a.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:a.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:a.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:a.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:a.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset();a=a.pageX-b.left;b=this.css.jq.seekBar.width();this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},currentTime:function(){},duration:function(){},option:function(c,d){var e=c;if(arguments.length===0)return a.extend(true,{},this.options);if(typeof c==="string"){var f=c.split(".");if(d===b){for(var g=a.extend(true,{},this.options),i=0;i<f.length;i++)if(g[f[i]]!==b)g=g[f[i]];else{this._warning({type:a.jPlayer.warning.OPTION_KEY,context:c,message:a.jPlayer.warningMsg.OPTION_KEY,hint:a.jPlayer.warningHint.OPTION_KEY});return b}return g}g=e={};for(i=0;i<f.length;i++)if(i<f.length-1){g[f[i]]={};g=g[f[i]]}else g[f[i]]=d}this._setOptions(e);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(b,c){var d=this;switch(b){case"cssSelectorAncestor":this.options[b]=c;a.each(d.options.cssSelector,function(a,b){d._cssSelector(a,b)});break;case"cssSelector":a.each(c,function(a,b){d._cssSelector(a,b)})}return this},resize:function(b){this.html.active&&this._resizeHtml(b);this.flash.active&&this._resizeFlash(b);this._trigger(a.jPlayer.event.resize)},_resizePoster:function(){},_resizeHtml:function(){},_resizeFlash:function(a){this.internal.flash.jq.css({width:a.width,height:a.height})},_html_initMedia:function(){this.status.srcSet&&!this.status.waitForPlay&&this.htmlElement.media.pause();this.options.preload!=="none"&&this._html_load();this._trigger(a.jPlayer.event.timeupdate)},_html_setAudio:function(b){var c=this;a.each(this.formats,function(a,d){if(c.html.support[d]&&b[d]){c.status.src=b[d];c.status.format[d]=true;c.status.formatType=d;return false}});this.htmlElement.media=this.htmlElement.audio;this._html_initMedia()},_html_setVideo:function(b){var c=this;a.each(this.formats,function(a,d){if(c.html.support[d]&&b[d]){c.status.src=b[d];c.status.format[d]=true;c.status.formatType=d;return false}});this.htmlElement.media=this.htmlElement.video;this._html_initMedia()},_html_clearMedia:function(){if(this.htmlElement.media){this.htmlElement.media.id===this.internal.video.id&&this.internal.video.jq.css({width:"0px",height:"0px"});this.htmlElement.media.pause();this.htmlElement.media.src="";a.browser.msie&&Number(a.browser.version)>=9||this.htmlElement.media.load()}},_html_load:function(){if(this.status.waitForLoad){this.status.waitForLoad=false;this.htmlElement.media.src=this.status.src;try{this.htmlElement.media.load()}catch(a){}}clearTimeout(this.internal.htmlDlyCmdId)},_html_play:function(a){var b=this;this._html_load();this.htmlElement.media.play();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(c){this.internal.htmlDlyCmdId=setTimeout(function(){b.play(a)},100);return}this._html_checkWaitForPlay()},_html_pause:function(a){var b=this;a>0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime=a}catch(c){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime=a*this.htmlElement.media.duration/100;else throw"e"}catch(c){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume=a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4a":c._getMovie().fl_setAudio_m4a(b[d]);break;case"mp3":c._getMovie().fl_setAudio_mp3(b[d])}c.status.src=b[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(b){var c=this;try{a.each(this.formats,function(a,d){if(c.flash.support[d]&&b[d]){switch(d){case"m4v":c._getMovie().fl_setVideo_m4v(b[d])}c.status.src=b[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_clearMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad=false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(b){var c=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);c=true}catch(e){}else if(navigator.plugins&&navigator.mimeTypes.length>0)if(d=navigator.plugins["Shockwave Flash"])if(navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=b)c=true;return a.browser.msie&&Number(a.browser.version)>=9?false:c},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,c){return a<b?b:a>c?c:a},_urlNotSetError:function(b){this._error({type:a.jPlayer.error.URL_NOT_SET,context:b,message:a.jPlayer.errorMsg.URL_NOT_SET,hint:a.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(b){this._error({type:a.jPlayer.error.FLASH,context:this.internal.flash.swf,message:a.jPlayer.errorMsg.FLASH+b.message,hint:a.jPlayer.errorHint.FLASH})},_error:function(b){this._trigger(a.jPlayer.event.error,b);if(this.options.errorAlerts)this._alert("Error!"+(b.message?"\n\n"+b.message:"")+(b.hint?"\n\n"+b.hint:"")+"\n\nContext: "+b.context)},_warning:function(c){this._trigger(a.jPlayer.event.warning,b,c);if(this.options.errorAlerts)this._alert("Warning!"+(c.message?"\n\n"+c.message:"")+(c.hint?"\n\n"+c.hint:"")+"\n\nContext: "+c.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)}};a.jPlayer.error={FLASH:"e_flash",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};a.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+a.jPlayer.prototype.version.script+" needs Jplayer.swf version "+a.jPlayer.prototype.version.needFlash+" but found "};a.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};a.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};a.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of methodCssSelectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};a.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery)
