text: !function(e,t,a){var n,i,o="ontouchstart"in t,u=o?"touchstart":"mousedown",l=o?"touchmove":"mousemove",d=o?"touchcancel":"mouseup";n=function(e){if(e!=1/0){var t=Math.floor(e/3600),a=Math.floor(e%3600/60),n=Math.ceil(e%3600%60);return(0===t?"":t>0&&t.toString().length<2?"0"+t+":":t+":")+(a.toString().length<2?"0"+a:a)+":"+(n.toString().length<2?"0"+n:n)}return"--:--"},i=function(e){var t=a.createElement("audio"),n=!(!t.canPlayType||!t.canPlayType(e+";").replace(/no/,""));return n},e.fn.audioPlayer=function(t){var a,s="audioplayer",r={},v={hideDefault:"__defaultplayer",playPause:"__playpause",playing:"--playing",time:"__time",timeCurrent:"__time--current",timeDuration:"__time--duration",bar:"__bar",barLoaded:"__bar--loaded",barPlayed:"__bar--played",volume:"__volume",volumeButton:"__volume__button",volumeAdjust:"__volume__adjust",noVolume:"--novolume",mute:"--muted",mini:"--mini"},m={preventMixedPlay:!1},c=e.extend({},m,t);for(var p in v)v.hasOwnProperty(p)&&(r[p]=s+v[p]);return a=function(t){e("."+s).not(t).each(function(){var t=e(this),a=t.find("audio");a=a.get(0),t.hasClass(r.playing)&&(t.removeClass(r.playing),a.pause())})},this.each(function(){if("audio"!=e(this).prop("tagName").toLowerCase())return!1;var t,v,m=e(this),p=m.get(0).getAttribute("autoplay"),f=m.get(0).getAttribute("loop"),_=!1;if(p=""===p||"autoplay"===p?!0:!1,f=""===f||"loop"===f?!0:!1,m.find("source").each(function(){var t=e(this).attr("src"),a=e(this).attr("type");return"undefined"!=typeof t&&i(a)?(_=!0,!1):void 0}),_){t=e('<div class="'+s+'">'+e("<div>").append(m.eq(0).clone()).html()+'<button type="button" class="'+r.playPause+'"><i class="icon--play audioplayer__playpause__icon-play"></i><i class="icon--pause audioplayer__playpause__icon-pause"></i></button></div>'),v=t.find("audio"),v=v.get(0),t.find("audio").addClass(r.hideDefault),t.append('<div class="'+r.time+" "+r.timeCurrent+'"></div><div class="'+r.bar+'"><div class="'+r.barLoaded+'"></div><div class="'+r.barPlayed+'"></div></div><div class="'+r.time+" "+r.timeDuration+'"></div><div class="'+r.volume+'"><button type="button" class="'+r.volumeButton+'"><i class="icon--volume-medium audioplayer__volume__button__icon-volume-up"></i><i class="icon--volume-mute audioplayer__volume__button__icon-volume-off"></i></button><div class="'+r.volumeAdjust+'"><div class="audioplayer__volume__adjust__control"><div class="audioplayer__volume__adjust__control__state"></div></div></div></div>');var h,y,g,b=t.find("."+r.bar),C=t.find("."+r.barPlayed),P=t.find("."+r.barLoaded),E=t.find("."+r.timeCurrent),w=t.find("."+r.timeDuration),L=t.find("."+r.volumeButton),M=t.find("."+r.volumeAdjust+" > div"),j=0;h=function(e){theRealEvent=o?e.originalEvent.touches[0]:e,v.currentTime=Math.round(v.duration*(theRealEvent.pageX-b.offset().left)/b.width())},y=function(e){theRealEvent=o?e.originalEvent.touches[0]:e,v.volume=Math.abs((theRealEvent.pageY-(M.offset().top+M.height()))/M.height())},g=setInterval(function(){v.buffered.length>0&&(v.duration>0&&P.width(v.buffered.end(0)/v.duration*100+"%"),v.buffered.end(0)>=v.duration&&clearInterval(g))},100);var x=v.volume,S=v.volume=.111;Math.round(1e3*v.volume)/1e3==S?v.volume=x:t.addClass(r.noVolume),w.html("loading"),E.text(n(0)),v.addEventListener("loadedmetadata",function(){w.text(n(v.duration)),M.find("div").height(100*v.volume+"%"),j=v.volume}),v.addEventListener("timeupdate",function(){E.text(n(v.currentTime)),C.width(v.currentTime/v.duration*100+"%")}),v.addEventListener("volumechange",function(){M.find("div").height(100*v.volume+"%"),v.volume>0&&t.hasClass(r.mute)&&t.removeClass(r.mute),v.volume<=0&&!t.hasClass(r.mute)&&t.addClass(r.mute)}),v.addEventListener("ended",function(){t.removeClass(r.playing)}),b.on(u,function(e){h(e),b.on(l,function(e){h(e)})}).on(d,function(){b.unbind(l)}),L.on("click",function(){return t.hasClass(r.mute)?(t.removeClass(r.mute),v.volume=j):(t.addClass(r.mute),j=v.volume,v.volume=0),!1}),M.on(u,function(e){y(e),M.on(l,function(e){y(e)})}).on(d,function(){M.unbind(l)})}else t=e('<div class="'+s+'"><embed src="'+audioFile+'" width="0" height="0" volume="100" autostart="'+p.toString()+'" loop="'+f.toString()+'" /><button type="button" class="'+r.playPause+'"></button></div>'),v=t.find("embed"),v=v.get(0),t.addClass(r.mini);p&&t.addClass(r.playing),t.find("."+r.playPause).on("click",function(){return t.hasClass(r.playing)?(t.removeClass(r.playing),_?v.pause():v.Stop()):(t.addClass(r.playing),_?(c.preventMixedPlay&&a(t),v.play()):v.Play()),!1}),m.replaceWith(t)}),this}}(jQuery,window,document);