(function(h,o,g){var p=function(){for(var b=/audio(.min)?.js.*/,a=document.getelementsbytagname("script"),c=0,d=a.length;c ',settings:{autoplay:false,loop:false,preload:true,imagelocation:p+"player-graphics.gif",swflocation:p+"audiojs.swf",useflash:function(){var b=document.createelement("audio");return!(b.canplaytype&&b.canplaytype("audio/mpeg;").replace(/no/,""))}(),hasflash:function(){if(navigator.plugins&&navigator.plugins.length&&navigator.plugins["shockwave flash"])return true;else if(navigator.mimetypes&&navigator.mimetypes.length){var b= navigator.mimetypes["application/x-shockwave-flash"];return b&&b.enabledplugin}else try{new activexobject("shockwaveflash.shockwaveflash");return true}catch(a){}return false}(),createplayer:{markup:'

00:00/00:00
', playpauseclass:"play-pause",scrubberclass:"scrubber",progressclass:"progress",loaderclass:"loaded",timeclass:"time",durationclass:"duration",playedclass:"played",errormessageclass:"error-message",playingclass:"playing",loadingclass:"loading",errorclass:"error"},css:' .audiojs audio { position: absolute; left: -1px; } .audiojs {height: 36px;overflow: hidden; font-family: monospace; font-size: 12px;} .audiojs .play-pause { width: 25px; height: 40px; padding: 4px 6px; margin: 0px; float: left; overflow: hidden;} .audiojs p { display: none; width: 25px; height: 40px; margin: 0px; cursor: pointer; } .audiojs .play { display: block; } .audiojs .scrubber { position: relative; float: left; width: 280px; background: #5a5a5a; height: 14px; margin: 10px; border-top: 1px solid #3f3f3f; border-left: 0px; border-bottom: 0px; overflow: hidden; } .audiojs .progress { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #ccc; z-index: 1; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ccc), color-stop(0.5, #ddd), color-stop(0.51, #ccc), color-stop(1, #ccc)); background-image: -moz-linear-gradient(center top, #ccc 0%, #ddd 50%, #ccc 51%, #ccc 100%); } .audiojs .loaded { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #000; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.5, #333), color-stop(0.51, #222), color-stop(1, #222)); background-image: -moz-linear-gradient(center top, #222 0%, #333 50%, #222 51%, #222 100%); } .audiojs .time { float: left; height: 36px; line-height: 36px; margin: 0px 0px 0px 6px; padding: 0px 6px 0px 12px; border-left: 1px solid #000; color: #ddd; text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5); } .audiojs .time em { padding: 0px 2px 0px 0px; color: #f9f9f9; font-style: normal; } .audiojs .time strong { padding: 0px 0px 0px 2px; font-weight: normal; } .audiojs .error-message { float: left; display: none; margin: 0px 10px; height: 36px; width: 400px; overflow: hidden; line-height: 36px; white-space: nowrap; color: #fff; text-overflow: ellipsis; -o-text-overflow: ellipsis; -icab-text-overflow: ellipsis; -khtml-text-overflow: ellipsis; -moz-text-overflow: ellipsis; -webkit-text-overflow: ellipsis; } .audiojs .error-message a { color: #eee; text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid #999; white-space: wrap; } .audiojs .play { background: url("$1") -2px -1px no-repeat; } .audiojs .loading { background: url("$1") -2px -31px no-repeat; } .audiojs .error { background: url("$1") -2px -61px no-repeat; } .audiojs .pause { background: url("$1") -2px -91px no-repeat; } .playing .play, .playing .loading, .playing .error { display: none; } .playing .pause { display: block; } .loading .play, .loading .pause, .loading .error { display: none; } .loading .loading { display: block; } .error .time, .error .play, .error .pause, .error .scrubber, .error .loading { display: none; } .error .error { display: block; } .error .play-pause p { cursor: auto; } .error .error-message { display: block; }', trackended:function(){},flasherror:function(){var b=this.settings.createplayer,a=j(b.errormessageclass,this.wrapper),c='missing flash player plugin.';if(this.mp3)c+=' download audio file.';g[h].helpers.removeclass(this.wrapper,b.loadingclass);g[h].helpers.addclass(this.wrapper,b.errorclass);a.innerhtml=c},loaderror:function(){var b=this.settings.createplayer,a=j(b.errormessageclass,this.wrapper);g[h].helpers.removeclass(this.wrapper, b.loadingclass);g[h].helpers.addclass(this.wrapper,b.errorclass);a.innerhtml='error loading: "'+this.mp3+'"'},init:function(){g[h].helpers.addclass(this.wrapper,this.settings.createplayer.loadingclass)},loadstarted:function(){var b=this.settings.createplayer,a=j(b.durationclass,this.wrapper),c=math.floor(this.duration/60),d=math.floor(this.duration%60);g[h].helpers.removeclass(this.wrapper,b.loadingclass);a.innerhtml=(c<10?"0":"")+c+":"+(d<10?"0":"")+d},loadprogress:function(b){var a=this.settings.createplayer, c=j(a.scrubberclass,this.wrapper);j(a.loaderclass,this.wrapper).style.width=c.offsetwidth*b+"px"},playpause:function(){this.playing?this.settings.play():this.settings.pause()},play:function(){g[h].helpers.addclass(this.wrapper,this.settings.createplayer.playingclass)},pause:function(){g[h].helpers.removeclass(this.wrapper,this.settings.createplayer.playingclass)},updateplayhead:function(b){var a=this.settings.createplayer,c=j(a.scrubberclass,this.wrapper);j(a.progressclass,this.wrapper).style.width= c.offsetwidth*b+"px";a=j(a.playedclass,this.wrapper);c=this.duration*b;b=math.floor(c/60);c=math.floor(c%60);a.innerhtml=(b<10?"0":"")+b+":"+(c<10?"0":"")+c}},create:function(b,a){a=a||{};return b.length?this.createall(a,b):this.newinstance(b,a)},createall:function(b,a){var c=a||document.getelementsbytagname("audio"),d=[];b=b||{};for(var e=0,i=c.length;ea.loadedpercent)){a.updateplayhead.call(a,[c]);a.element.skipto(c)}};a.updateplayhead=function(c){a.settings.updateplayhead.apply(a,[c])};a.play=function(){if(!a.settings.preload){a.settings.preload=true;a.element.init(a.mp3)}a.playing=true;a.element.pplay();a.settings.play.apply(a)};a.pause=function(){a.playing=false;a.element.ppause();a.settings.pause.apply(a)};a.setvolume=function(c){a.element.setvolume(c)};a.loadstarted=function(){a.swfready= true;a.settings.preload&&a.element.init(a.mp3);a.settings.autoplay&&a.play.apply(a)}},injectflash:function(b,a){var c=this.flashsource.replace(/\$1/g,a);c=c.replace(/\$2/g,b.settings.swflocation);c=c.replace(/\$3/g,+new date+math.random());var d=b.wrapper.innerhtml,e=document.createelement("div");e.innerhtml=c+d;b.wrapper.innerhtml=e.innerhtml;b.element=this.helpers.getswf(a)},helpers:{merge:function(b,a){for(attr in a)if(b.hasownproperty(attr)||a.hasownproperty(attr))b[attr]=a[attr]},clone:function(b){if(b== null||typeof b!=="object")return b;var a=new b.constructor,c;for(c in b)a[c]=arguments.callee(b[c]);return a},addclass:function(b,a){regexp("(\\s|^)"+a+"(\\s|$)").test(b.classname)||(b.classname+=" "+a)},removeclass:function(b,a){b.classname=b.classname.replace(regexp("(\\s|^)"+a+"(\\s|$)")," ")},injectcss:function(b,a){for(var c="",d=document.getelementsbytagname("style"),e=a.replace(/\$1/g,b.settings.imagelocation),i=0,f=d.length;i1?b[b.length-1]:b}},events:{memoryleaking:false,listeners:[],addlistener:function(b,a,c){if(b.addeventlistener)b.addeventlistener(a,c,false);else if(b.attachevent){this.listeners.push(b);if(!this.memoryleaking){window.attachevent("onunload",function(){if(this.listeners)for(var d=0,e=this.listeners.length;d-1)d||b.init.apply(b);if(b.element.readystate>1){b.settings.autoplay&&b.play.apply(b);clearinterval(a);c=setinterval(function(){b.loadprogress.apply(b);b.loadedpercent>=1&&clearinterval(c)})}},10);b.readytimer=a;b.loadtimer=c}},purge:function(b){var a=b.attributes,c;if(a)for(c=0;cthis.loadedpercent)){this.element.currenttime=this.duration*b;this.updateplayhead()}},load:function(b){this.loadstartedcalled=false;this.source.setattribute("src",b);this.element.load();this.mp3=b;g[h].events.trackloadprogress(this)}, loaderror:function(){this.settings.loaderror.apply(this)},init:function(){this.settings.init.apply(this)},loadstarted:function(){if(!this.element.duration)return false;this.duration=this.element.duration;this.updateplayhead();this.settings.loadstarted.apply(this)},loadprogress:function(){if(this.element.buffered!=null&&this.element.buffered.length){if(!this.loadstartedcalled)this.loadstartedcalled=this.loadstarted();this.loadedpercent=this.element.buffered.end(this.element.buffered.length-1)/this.duration; this.settings.loadprogress.apply(this,[this.loadedpercent])}},playpause:function(){this.playing?this.pause():this.play()},play:function(){/(ipod|iphone|ipad)/i.test(navigator.useragent)&&this.element.readystate==0&&this.init.apply(this);if(!this.settings.preload){this.settings.preload=true;this.element.setattribute("preload","auto");g[h].events.trackloadprogress(this)}this.playing=true;this.element.play();this.settings.play.apply(this)},pause:function(){this.playing=false;this.element.pause();this.settings.pause.apply(this)}, setvolume:function(b){this.element.volume=b},trackended:function(){this.skipto.apply(this,[0]);this.settings.loop||this.pause.apply(this);this.settings.trackended.apply(this)}};var j=function(b,a){var c=[];a=a||document;if(a.getelementsbyclassname)c=a.getelementsbyclassname(b);else{var d,e,i=a.getelementsbytagname("*"),f=regexp("(^|\\s)"+b+"(\\s|$)");d=0;for(e=i.length;d1?c:c[0]}})("audiojs","audiojsinstance",this);