text: // ----------------------------------------------------------------------------
  // Buzz, a Javascript HTML5 Audio library
  // v 1.0.6
  // Licensed under the MIT license.
  // http://buzz.jaysalvat.com/
  // ----------------------------------------------------------------------------
  // Copyright (C) 2013 Jay Salvat
  // http://jaysalvat.com/
  // ----------------------------------------------------------------------------
  // Permission is hereby granted, free of charge, to any person obtaining a copy
  // of this software and associated documentation files ( the "Software" ), to deal
  // in the Software without restriction, including without limitation the rights
  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  // copies of the Software, and to permit persons to whom the Software is
  // furnished to do so, subject to the following conditions:
  //
  // The above copyright notice and this permission notice shall be included in
  // all copies or substantial portions of the Software.
  //
  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  // THE SOFTWARE.
  // ----------------------------------------------------------------------------
  
  var buzz={defaults:{autoplay:!1,duration:5E3,formats:[],loop:!1,placeholder:"--",preload:"metadata",volume:80},types:{mp3:"audio/mpeg",ogg:"audio/ogg",wav:"audio/wav",aac:"audio/aac",m4a:"audio/x-m4a"},sounds:[],el:document.createElement("audio"),sound:function(c,a){function f(d){for(var b=[],a=d.length-1,e=0;e<=a;e++)b.push({start:d.start(a),end:d.end(a)});return b}function b(d,a){var b=document.createElement("source");b.src=a;buzz.types[a.split(".").pop()]&&(b.type=buzz.types[a.split(".").pop()]);
  d.appendChild(b)}var a=a||{},g=0,h=[],j={},e=buzz.isSupported();this.load=function(){if(!e)return this;this.sound.load();return this};this.play=function(){if(!e)return this;this.sound.play();return this};this.togglePlay=function(){if(!e)return this;this.sound.paused?this.sound.play():this.sound.pause();return this};this.pause=function(){if(!e)return this;this.sound.pause();return this};this.isPaused=function(){return!e?null:this.sound.paused};this.stop=function(){if(!e)return this;this.setTime(this.getDuration());
  this.sound.pause();return this};this.isEnded=function(){return!e?null:this.sound.ended};this.loop=function(){if(!e)return this;this.sound.loop="loop";this.bind("ended.buzzloop",function(){this.currentTime=0;this.play()});return this};this.unloop=function(){if(!e)return this;this.sound.removeAttribute("loop");this.unbind("ended.buzzloop");return this};this.mute=function(){if(!e)return this;this.sound.muted=!0;return this};this.unmute=function(){if(!e)return this;this.sound.muted=!1;return this};this.toggleMute=
  function(){if(!e)return this;this.sound.muted=!this.sound.muted;return this};this.isMuted=function(){return!e?null:this.sound.muted};this.setVolume=function(d){if(!e)return this;0>d&&(d=0);100<d&&(d=100);this.volume=d;this.sound.volume=d/100;return this};this.getVolume=function(){return!e?this:this.volume};this.increaseVolume=function(d){return this.setVolume(this.volume+(d||1))};this.decreaseVolume=function(d){return this.setVolume(this.volume-(d||1))};this.setTime=function(d){if(!e)return this;
  this.whenReady(function(){this.sound.currentTime=d});return this};this.getTime=function(){if(!e)return null;var d=Math.round(100*this.sound.currentTime)/100;return isNaN(d)?buzz.defaults.placeholder:d};this.setPercent=function(d){return!e?this:this.setTime(buzz.fromPercent(d,this.sound.duration))};this.getPercent=function(){if(!e)return null;var d=Math.round(buzz.toPercent(this.sound.currentTime,this.sound.duration));return isNaN(d)?buzz.defaults.placeholder:d};this.setSpeed=function(d){if(!e)return this;
  this.sound.playbackRate=d};this.getSpeed=function(){return!e?null:this.sound.playbackRate};this.getDuration=function(){if(!e)return null;var d=Math.round(100*this.sound.duration)/100;return isNaN(d)?buzz.defaults.placeholder:d};this.getPlayed=function(){return!e?null:f(this.sound.played)};this.getBuffered=function(){return!e?null:f(this.sound.buffered)};this.getSeekable=function(){return!e?null:f(this.sound.seekable)};this.getErrorCode=function(){return e&&this.sound.error?this.sound.error.code:0};
  this.getErrorMessage=function(){if(!e)return null;switch(this.getErrorCode()){case 1:return"MEDIA_ERR_ABORTED";case 2:return"MEDIA_ERR_NETWORK";case 3:return"MEDIA_ERR_DECODE";case 4:return"MEDIA_ERR_SRC_NOT_SUPPORTED";default:return null}};this.getStateCode=function(){return!e?null:this.sound.readyState};this.getStateMessage=function(){if(!e)return null;switch(this.getStateCode()){case 0:return"HAVE_NOTHING";case 1:return"HAVE_METADATA";case 2:return"HAVE_CURRENT_DATA";case 3:return"HAVE_FUTURE_DATA";
  case 4:return"HAVE_ENOUGH_DATA";default:return null}};this.getNetworkStateCode=function(){return!e?null:this.sound.networkState};this.getNetworkStateMessage=function(){if(!e)return null;switch(this.getNetworkStateCode()){case 0:return"NETWORK_EMPTY";case 1:return"NETWORK_IDLE";case 2:return"NETWORK_LOADING";case 3:return"NETWORK_NO_SOURCE";default:return null}};this.set=function(d,a){if(!e)return this;this.sound[d]=a;return this};this.get=function(d){return!e?null:d?this.sound[d]:this.sound};this.bind=
  function(d,a){if(!e)return this;for(var d=d.split(" "),b=this,g=function(d){a.call(b,d)},c=0;c<d.length;c++){var f=d[c],i=f,f=i.split(".")[0];h.push({idx:i,func:g});this.sound.addEventListener(f,g,!0)}return this};this.unbind=function(d){if(!e)return this;for(var d=d.split(" "),a=0;a<d.length;a++)for(var b=d[a],g=b.split(".")[0],c=0;c<h.length;c++){var f=h[c].idx.split(".");if(h[c].idx==b||f[1]&&f[1]==b.replace(".",""))this.sound.removeEventListener(g,h[c].func,!0),delete h[c]}return this};this.bindOnce=
  function(a,b){if(!e)return this;var c=this;j[g++]=!1;this.bind(g+a,function(){j[g]||(j[g]=!0,b.call(c));c.unbind(g+a)})};this.trigger=function(a){if(!e)return this;for(var a=a.split(" "),b=0;b<a.length;b++)for(var c=a[b],g=0;g<h.length;g++){var f=h[g].idx.split(".");if(h[g].idx==c||f[0]&&f[0]==c.replace(".","")){var j=document.createEvent("HTMLEvents");j.initEvent(f[0],!1,!0);this.sound.dispatchEvent(j)}}return this};this.fadeTo=function(a,b,c){function g(){setTimeout(function(){f<a&&i.volume<a?(i.setVolume(i.volume+=
  1),g()):f>a&&i.volume>a?(i.setVolume(i.volume-=1),g()):c instanceof Function&&c.apply(i)},h)}if(!e)return this;b instanceof Function?(c=b,b=buzz.defaults.duration):b=b||buzz.defaults.duration;var f=this.volume,h=b/Math.abs(f-a),i=this;this.play();this.whenReady(function(){g()});return this};this.fadeIn=function(a,b){return!e?this:this.setVolume(0).fadeTo(100,a,b)};this.fadeOut=function(a,b){return!e?this:this.fadeTo(0,a,b)};this.fadeWith=function(a,b){if(!e)return this;this.fadeOut(b,function(){this.stop()});
  a.play().fadeIn(b);return this};this.whenReady=function(a){if(!e)return null;var b=this;0===this.sound.readyState?this.bind("canplay.buzzwhenready",function(){a.call(b)}):a.call(b)};if(e){for(var k in buzz.defaults)buzz.defaults.hasOwnProperty(k)&&(a[k]=a[k]||buzz.defaults[k]);this.sound=document.createElement("audio");if(c instanceof Array)for(var l in c)c.hasOwnProperty(l)&&b(this.sound,c[l]);else if(a.formats.length)for(var m in a.formats)a.formats.hasOwnProperty(m)&&b(this.sound,c+"."+a.formats[m]);
  else b(this.sound,c);a.loop&&this.loop();a.autoplay&&(this.sound.autoplay="autoplay");this.sound.preload=!0===a.preload?"auto":!1===a.preload?"none":a.preload;this.setVolume(a.volume);buzz.sounds.push(this)}},group:function(c){function a(){for(var a=f(null,arguments),g=a.shift(),h=0;h<c.length;h++)c[h][g].apply(c[h],a)}function f(a,c){return a instanceof Array?a:Array.prototype.slice.call(c)}c=f(c,arguments);this.getSounds=function(){return c};this.add=function(a){for(var a=f(a,arguments),g=0;g<a.length;g++)c.push(a[g])};
  this.remove=function(a){for(var a=f(a,arguments),g=0;g<a.length;g++)for(var h=0;h<c.length;h++)if(c[h]==a[g]){delete c[h];break}};this.load=function(){a("load");return this};this.play=function(){a("play");return this};this.togglePlay=function(){a("togglePlay");return this};this.pause=function(b){a("pause",b);return this};this.stop=function(){a("stop");return this};this.mute=function(){a("mute");return this};this.unmute=function(){a("unmute");return this};this.toggleMute=function(){a("toggleMute");
  return this};this.setVolume=function(b){a("setVolume",b);return this};this.increaseVolume=function(b){a("increaseVolume",b);return this};this.decreaseVolume=function(b){a("decreaseVolume",b);return this};this.loop=function(){a("loop");return this};this.unloop=function(){a("unloop");return this};this.setTime=function(b){a("setTime",b);return this};this.setduration=function(b){a("setduration",b);return this};this.set=function(b,c){a("set",b,c);return this};this.bind=function(b,c){a("bind",b,c);return this};
  this.unbind=function(b){a("unbind",b);return this};this.bindOnce=function(b,c){a("bindOnce",b,c);return this};this.trigger=function(b){a("trigger",b);return this};this.fade=function(b,c,f,j){a("fade",b,c,f,j);return this};this.fadeIn=function(b,c){a("fadeIn",b,c);return this};this.fadeOut=function(b,c){a("fadeOut",b,c);return this}},all:function(){return new buzz.group(buzz.sounds)},isSupported:function(){return!!buzz.el.canPlayType},isOGGSupported:function(){return!!buzz.el.canPlayType&&buzz.el.canPlayType('audio/ogg; codecs="vorbis"')},
  isWAVSupported:function(){return!!buzz.el.canPlayType&&buzz.el.canPlayType('audio/wav; codecs="1"')},isMP3Supported:function(){return!!buzz.el.canPlayType&&buzz.el.canPlayType("audio/mpeg;")},isAACSupported:function(){return!!buzz.el.canPlayType&&(buzz.el.canPlayType("audio/x-m4a;")||buzz.el.canPlayType("audio/aac;"))},toTimer:function(c,a){var f,b,g;f=Math.floor(c/3600);f=isNaN(f)?"--":10<=f?f:"0"+f;b=a?Math.floor(c/60%60):Math.floor(c/60);b=isNaN(b)?"--":10<=b?b:"0"+b;g=Math.floor(c%60);g=isNaN(g)?
  "--":10<=g?g:"0"+g;return a?f+":"+b+":"+g:b+":"+g},fromTimer:function(c){var a=c.toString().split(":");a&&3==a.length&&(c=3600*parseInt(a[0],10)+60*parseInt(a[1],10)+parseInt(a[2],10));a&&2==a.length&&(c=60*parseInt(a[0],10)+parseInt(a[1],10));return c},toPercent:function(c,a,f){f=Math.pow(10,f||0);return Math.round(100*c/a*f)/f},fromPercent:function(c,a,f){f=Math.pow(10,f||0);return Math.round(a/100*c*f)/f}};
  