// jQuery.Ion.Sound | version 2.1.3 | https://github.com/IonDen/ion.sound (function(e){var l=function(a){a&&console&&(console.warn&&"function"===typeof console.warn?console.warn(a):console.log&&"function"===typeof console.log&&console.log(a))};if(e.ionSound)l("$.ionSound already exists!");else if("function"!==typeof Audio&&"object"!==typeof Audio){var g=function(){l("HTML5 Audio is not supported in this browser")};e.ionSound=function(){};e.ionSound.play=g;e.ionSound.stop=g;e.ionSound.destroy=g;g()}else{var f,m=/iPad|iPhone/.test(navigator.appVersion),k,d={},b={},n,h,c;m?(f=function(a){this.name=a.name;this.paused=this.loop=!1;this.callback=this.sound=null},f.prototype={init:function(){this.sound=k},play:function(a){a||(a={});a.loop?this.paused?this._playLoop(this.loop+1):this._playLoop(a.loop):(this.loop=!1,this._play());a.onEnded&&"function"===typeof a.onEnded&&(this.callback=a.onEnded)},_play:function(){if(this.paused)this.paused=!1;else try{this.sound.currentTime=0}catch(a){}this.sound.removeEventListener("ended");this.sound.addEventListener("ended",this._ended.bind(this),!1);this.sound.src=d.path+this.name+h;this.sound.load();this.sound.play()}}):(f=function(a){this.name=a.name;this.volume=d.volume||.5;this.preload=d.preload?"auto":"none";this.paused=this.loop=!1;this.callback=this.sound=null;"volume"in a&&(this.volume=+a.volume);"preload"in a&&(this.preload=a.preload?"auto":"none")},f.prototype={init:function(){this.sound=new Audio;this.sound.src=d.path+this.name+h;this.sound.load();this.sound.preload=this.preload;this.sound.volume=this.volume;this.sound.addEventListener("ended",this._ended.bind(this),!1)},play:function(a){a||(a={});if(a.volume||0===a.volume)this.volume=+a.volume,this.sound.volume=this.volume;a.loop?this.paused?this._playLoop(this.loop+1):this._playLoop(a.loop):(this.loop=!1,this._play());a.onEnded&&"function"===typeof a.onEnded&&(this.callback=a.onEnded)},_play:function(){if(this.paused)this.paused=!1;else try{this.sound.currentTime=0}catch(a){}this.sound.play()}});f.prototype._playLoop=function(a){"boolean"===typeof a?(this.loop=9999999,this._play()):"number"===typeof a&&(this.loop=a-1,this._play())};f.prototype._ended=function(){0