var soundManager=null;
function SoundManager(o,n){this.flashVersion=8;this.debugFlash=this.debugMode=false;this.useConsole=true;this.waitForWindowLoad=this.consoleOnly=false;this.nullURL="index.php?version="+EXTERN_CACHE_VERSION+"&extern=libs/eyeSound/null.mp3";this.allowPolling=true;this.useMovieStar=this.useFastPolling=false;this.bgColor="#ffffff";this.useHighPerformance=false;this.flashLoadTimeout=1E3;this.wmode=null;this.allowFullScreen=true;this.allowScriptAccess="always";this.defaultOptions={autoLoad:false,stream:true,
autoPlay:false,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5E3,onbeforefinishcomplete:null,onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:true,multiShotEvents:false,position:null,pan:0,volume:50};this.flash9Options={isMovieStar:null,usePeakData:false,useWaveformData:false,useEQData:false,onbufferchange:null,ondataerror:null};this.movieStarOptions={onmetadata:null,useVideo:false,
bufferTime:null};var l=null,a=this;this.version=null;this.versionNumber="V2.95b.20100101";this.altURL=this.url=this.movieURL=null;this.enabled=this.swfLoaded=false;this.o=null;this.id=n||"sm2movie";this.oMC=null;this.sounds={};this.soundIDs=[];this.isFullScreen=this.muted=false;this.isIE=navigator.userAgent.match(/MSIE/i);this.isSafari=navigator.userAgent.match(/safari/i);this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.specialWmodeCase=false;this._onready=[];this._debugOpen=
true;this._windowLoaded=this._disabled=this._didInit=this._appendSuccess=this._didAppend=false;this._hasConsole=typeof console!="undefined"&&typeof console.log!="undefined";this._debugLevels=["log","info","warn","error"];this._defaultFlashVersion=8;this._oRemovedHTML=this._oRemoved=null;var j=function(c){return document.getElementById(c)};this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.netStreamTypes=["aac","flv","mov","mp4","m4v","f4v","m4a","mp4v","3gp","3g2"];this.netStreamPattern=
new RegExp("\\.("+this.netStreamTypes.join("|")+")(\\?.*)?$","i");this.filePattern=null;this.features={buffering:false,peakData:false,waveformData:false,eqData:false,movieStar:false};this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null};this._setVersionInfo=
function(){if(a.flashVersion!=8&&a.flashVersion!=9)a.flashVersion=a._defaultFlashVersion;a.version=a.versionNumber+(a.flashVersion==9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(a.flashVersion>8){a.defaultOptions=a._mergeObjects(a.defaultOptions,a.flash9Options);a.features.buffering=true}if(a.flashVersion>8&&a.useMovieStar){a.defaultOptions=a._mergeObjects(a.defaultOptions,a.movieStarOptions);a.filePatterns.flash9=new RegExp("\\.(mp3|"+a.netStreamTypes.join("|")+")(\\?.*)?$","i");a.features.movieStar=true}else{a.useMovieStar=
false;a.features.movieStar=false}a.filePattern=a.filePatterns[a.flashVersion!=8?"flash9":"flash8"];a.movieURL=a.flashVersion==8?"soundmanager2.swf":"soundmanager2_flash9.swf";a.features.peakData=a.features.waveformData=a.features.eqData=a.flashVersion>8};this._overHTTP=document.location?document.location.protocol.match(/http/i):null;this._initPending=this._waitingforEI=false;this._tryInitOnFocus=this.isSafari&&typeof document.hasFocus=="undefined";this._isFocused=typeof document.hasFocus!="undefined"?
document.hasFocus():null;this._okToDisable=!this._tryInitOnFocus;this.useAltURL=!this._overHTTP;this.strings={notReady:"Not loaded yet - wait for soundManager.onload() before calling sound-related methods",appXHTML:"soundManager_createMovie(): appendChild/innerHTML set failed. May be app/xhtml+xml DOM-related.",swf404:"soundManager: Verify that %s is a valid path.",tryDebug:"Try soundManager.debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",
localFail:"soundManager: Non-HTTP page ("+document.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:"soundManager: Special case: Waiting for focus-related event..",waitImpatient:"soundManager: Getting impatient, still waiting for Flash%s...",waitForever:"soundManager: Waiting indefinitely for Flash...",
needFunction:"soundManager.onready(): Function object expected",badID:'Warning: Sound ID "%s" should be a string, starting with a non-numeric character',fl9Vid:"flash 9 required for video. Exiting.",noMS:"MovieStar mode not enabled. Exiting.",spcWmode:"soundManager._createMovie(): Removing wmode, preventing win32 below-the-fold SWF loading issue",currentObj:"--- soundManager._debug(): Current sound objects ---",waitEI:"soundManager._initMovie(): Waiting for ExternalInterface call from Flash..",waitOnload:"soundManager: Waiting for window.onload()",
docLoaded:"soundManager: Document already loaded",onload:"soundManager.initComplete(): calling soundManager.onload()",onloadOK:"soundManager.onload() complete",init:"-- soundManager.init() --",didInit:"soundManager.init(): Already called?",flashJS:"soundManager: Attempting to call Flash from JS..",noPolling:"soundManager: Polling (whileloading()/whileplaying() support) is disabled.",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html",
badRemove:"Warning: Failed to remove flash movie.",peakWave:"Warning: peak/waveform/eqData features unsupported for non-MP3 formats",shutdown:"soundManager.disable(): Shutting down",queue:"soundManager.onready(): Queueing handler",smFail:"soundManager: Failed to initialise.",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",manURL:"SMSound.load(): Using manually-assigned URL",onURL:"soundManager.load(): current URL already assigned.",badFV:'soundManager.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.'};
this._str=function(){var c=Array.prototype.slice.call(arguments),b=c.shift();if((b=a.strings&&a.strings[b]?a.strings[b]:"")&&c&&c.length)for(var d=0,e=c.length;d<e;d++)b=b.replace("%s",c[d]);return b};this.supported=function(){return a._didInit&&!a._disabled};this.getMovie=function(c){return a.isIE?window[c]:a.isSafari?j(c)||document[c]:j(c)};this.loadFromXML=function(c){try{a.o._loadFromXML(c)}catch(b){a._failSafely();return true}};this.createSound=function(c){if(!a._didInit)throw a._complain("soundManager.createSound(): "+
a._str("notReady"),arguments.callee.caller);if(arguments.length==2)c={id:arguments[0],url:arguments[1]};var b=a._mergeObjects(c);b.id.toString().charAt(0).match(/^[0-9]$/)&&a._wD("soundManager.createSound(): "+a._str("badID",b.id),2);a._wD("soundManager.createSound(): "+b.id+" ("+b.url+")",1);if(a._idCheck(b.id,true)){a._wD("soundManager.createSound(): "+b.id+" exists",1);return a.sounds[b.id]}if(a.flashVersion>8&&a.useMovieStar){if(b.isMovieStar===null)b.isMovieStar=b.url.match(a.netStreamPattern)?
true:false;b.isMovieStar&&a._wD("soundManager.createSound(): using MovieStar handling");if(b.isMovieStar&&(b.usePeakData||b.useWaveformData||b.useEQData)){a._wDS("peakWave");b.usePeakData=false;b.useWaveformData=false;b.useEQData=false}}a.sounds[b.id]=new l(b);a.soundIDs[a.soundIDs.length]=b.id;a.flashVersion==8?a.o._createSound(b.id,b.onjustbeforefinishtime):a.o._createSound(b.id,b.url,b.onjustbeforefinishtime,b.usePeakData,b.useWaveformData,b.useEQData,b.isMovieStar,b.isMovieStar?b.useVideo:false,
b.isMovieStar?b.bufferTime:false);if(b.autoLoad||b.autoPlay)a.sounds[b.id]&&a.sounds[b.id].load(b);b.autoPlay&&a.sounds[b.id].play();return a.sounds[b.id]};this.createVideo=function(c){if(arguments.length==2)c={id:arguments[0],url:arguments[1]};if(a.flashVersion>=9){c.isMovieStar=true;c.useVideo=true}else{a._wD("soundManager.createVideo(): "+a._str("f9Vid"),2);return false}a.useMovieStar||a._wD("soundManager.createVideo(): "+a._str("noMS"),2);return a.createSound(c)};this.destroyVideo=this.destroySound=
function(c,b){if(!a._idCheck(c))return false;for(var d=0;d<a.soundIDs.length;d++)a.soundIDs[d]==c&&a.soundIDs.splice(d,1);a.sounds[c].unload();b||a.sounds[c].destruct();delete a.sounds[c]};this.load=function(c,b){if(!a._idCheck(c))return false;a.sounds[c].load(b)};this.unload=function(c){if(!a._idCheck(c))return false;a.sounds[c].unload()};this.start=this.play=function(c,b){if(!a._didInit)throw a._complain("soundManager.play(): "+a._str("notReady"),arguments.callee.caller);if(!a._idCheck(c)){if(typeof b!=
"Object")b={url:b};if(b&&b.url){a._wD('soundManager.play(): attempting to create "'+c+'"',1);b.id=c;a.createSound(b)}else return false}a.sounds[c].play(b)};this.setPosition=function(c,b){if(!a._idCheck(c))return false;a.sounds[c].setPosition(b)};this.stop=function(c){if(!a._idCheck(c))return false;a._wD("soundManager.stop("+c+")",1);a.sounds[c].stop()};this.stopAll=function(){a._wD("soundManager.stopAll()",1);for(var c in a.sounds)a.sounds[c]instanceof l&&a.sounds[c].stop()};this.pause=function(c){if(!a._idCheck(c))return false;
a.sounds[c].pause()};this.pauseAll=function(){for(var c=a.soundIDs.length;c--;)a.sounds[a.soundIDs[c]].pause()};this.resume=function(c){if(!a._idCheck(c))return false;a.sounds[c].resume()};this.resumeAll=function(){for(var c=a.soundIDs.length;c--;)a.sounds[a.soundIDs[c]].resume()};this.togglePause=function(c){if(!a._idCheck(c))return false;a.sounds[c].togglePause()};this.setPan=function(c,b){if(!a._idCheck(c))return false;a.sounds[c].setPan(b)};this.setVolume=function(c,b){if(!a._idCheck(c))return false;
a.sounds[c].setVolume(b)};this.mute=function(c){if(typeof c!="string")c=null;if(c){if(!a._idCheck(c))return false;a._wD('soundManager.mute(): Muting "'+c+'"');a.sounds[c].mute()}else{a._wD("soundManager.mute(): Muting all sounds");for(c=a.soundIDs.length;c--;)a.sounds[a.soundIDs[c]].mute();a.muted=true}};this.muteAll=function(){a.mute()};this.unmute=function(c){if(typeof c!="string")c=null;if(c){if(!a._idCheck(c))return false;a._wD('soundManager.unmute(): Unmuting "'+c+'"');a.sounds[c].unmute()}else{a._wD("soundManager.unmute(): Unmuting all sounds");
for(c=a.soundIDs.length;c--;)a.sounds[a.soundIDs[c]].unmute();a.muted=false}};this.unmuteAll=function(){a.unmute()};this.toggleMute=function(c){if(!a._idCheck(c))return false;a.sounds[c].toggleMute()};this.getMemoryUse=function(){if(a.flashVersion==8)return 0;if(a.o)return parseInt(a.o._getMemoryUse(),10)};this.disable=function(c){if(typeof c=="undefined")c=false;if(a._disabled)return false;a._disabled=true;a._wDS("shutdown",1);for(var b=a.soundIDs.length;b--;)a._disableObject(a.sounds[a.soundIDs[b]]);
a.initComplete(c)};this.canPlayURL=function(c){return c?c.match(a.filePattern)?true:false:null};this.getSoundById=function(c,b){if(!c)throw new Error("SoundManager.getSoundById(): sID is null/undefined");var d=a.sounds[c];!d&&!b&&a._wD('"'+c+'" is an invalid sound ID.',2);return d};this.onready=function(c,b){if(c&&c instanceof Function){a._didInit&&a._wDS("queue");b||(b=window);a._addOnReady(c,b);a._processOnReady();return true}else throw a._str("needFunction");};this.oninitmovie=function(){};this.onload=
function(){soundManager._wD("soundManager.onload()",1)};this.onerror=function(){};this._idCheck=this.getSoundById;this._complain=function(c,b){if(!b)return new Error("Error: "+c);var d=new Error(""),e=null;if(d.stack)try{e=d.stack.split("@")[4]}catch(f){e=d.stack}typeof console!="undefined"&&typeof console.trace!="undefined"&&console.trace();c="Error: "+c+". \nCaller: "+b.toString()+(d.stack?" \nTop of stacktrace: "+e:d.message?" \nMessage: "+d.message:"");return new Error(c)};var m=function(){return false};
m._protected=true;this._disableObject=function(c){for(var b in c)if(typeof c[b]=="function"&&typeof c[b]._protected=="undefined")c[b]=m};this._failSafely=function(c){if(typeof c=="undefined")c=false;if(!a._disabled||c){a._wDS("smFail",2);a.disable(c)}};this._normalizeMovieURL=function(){return"index.php?version="+EXTERN_CACHE_VERSION+"&extern=libs/eyeSound/"+a.movieURL};this._getDocument=function(){return document.body?document.body:document.documentElement?document.documentElement:document.getElementsByTagName("div")[0]};
this._getDocument._protected=true;this._setPolling=function(c,b){if(!a.o||!a.allowPolling)return false;a.o._setPolling(c,b)};this._createMovie=function(c,b){var d=null;b=b?b:a.url;var e=a.altURL?a.altURL:b;if(a.debugURLParam.test(window.location.href.toString()))a.debugMode=true;if(a._didAppend&&a._appendSuccess)return false;a._didAppend=true;a._setVersionInfo();a.url=a._normalizeMovieURL(a._overHTTP?b:e);b=a.url;if(a.useHighPerformance&&a.useMovieStar&&a.defaultOptions.useVideo===true){d="soundManager note: disabling highPerformance, not applicable with movieStar mode+useVideo";
a.useHighPerformance=false}a.wmode=!a.wmode&&a.useHighPerformance&&!a.useMovieStar?"transparent":a.wmode;if(a.wmode!==null&&a.flashLoadTimeout!==0&&(!a.useHighPerformance||a.debugFlash)&&!a.isIE&&navigator.platform.match(/win32/i)){a.specialWmodeCase=true;a._wDS("spcWmode");a.wmode=null}if(a.flashVersion==8)a.allowFullScreen=false;var f={name:c,id:c,src:b,width:"100%",height:"100%",quality:"high",allowScriptAccess:a.allowScriptAccess,bgcolor:a.bgColor,pluginspage:"http://www.macromedia.com/go/getflashplayer",
type:"application/x-shockwave-flash",wmode:a.wmode,allowfullscreen:a.allowFullScreen?"true":"false"};if(a.debugFlash)f.FlashVars="debug=1";a.wmode||delete f.wmode;var g=e=null,i=null,h=null;if(a.isIE){e=document.createElement("div");i='<object id="'+c+'" data="'+b+'" type="'+f.type+'" width="'+f.width+'" height="'+f.height+'"><param name="movie" value="'+b+'" /><param name="AllowScriptAccess" value="'+a.allowScriptAccess+'" /><param name="quality" value="'+f.quality+'" />'+(a.wmode?'<param name="wmode" value="'+
a.wmode+'" /> ':"")+'<param name="bgcolor" value="'+a.bgColor+'" /><param name="allowFullScreen" value="'+f.allowFullScreen+'" />'+(a.debugFlash?'<param name="FlashVars" value="'+f.FlashVars+'" />':"")+"<!-- --\></object>"}else{e=document.createElement("embed");for(g in f)f.hasOwnProperty(g)&&e.setAttribute(g,f[g])}h=c=null;if(a.debugMode){c=document.createElement("div");c.id=a.debugID+"-toggle";h={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",
textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001};c.appendChild(document.createTextNode("-"));c.onclick=a._toggleDebug;c.title="Toggle SM2 debug console";if(navigator.userAgent.match(/msie 6/i)){c.style.position="absolute";c.style.cursor="hand"}for(g in h)if(h.hasOwnProperty(g))c.style[g]=h[g]}if(g=a._getDocument()){a.oMC=j("sm2-container")?j("sm2-container"):document.createElement("div");h=(a.debugMode?" sm2-debug":"")+(a.debugFlash?" flash-debug":
"");if(a.oMC.id){if(a.debugMode||a.debugFlash)a.oMC.className+=h;a.oMC.appendChild(e);if(a.isIE){h=a.oMC.appendChild(document.createElement("div"));h.className="sm2-object-box";h.innerHTML=i}a._appendSuccess=true}else{a.oMC.id="sm2-container";a.oMC.className="movieContainer"+h;h=f=null;f=a.useHighPerformance?{position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:{position:"absolute",width:"8px",height:"8px",top:"-9999px",left:"-9999px"};var k=null;if(!a.debugFlash)for(k in f)if(f.hasOwnProperty(k))a.oMC.style[k]=
f[k];try{a.isIE||a.oMC.appendChild(e);g.appendChild(a.oMC);if(a.isIE){h=a.oMC.appendChild(document.createElement("div"));h.className="sm2-object-box";h.innerHTML=i}a._appendSuccess=true}catch(p){throw new Error(a._str("appXHTML"));}}if(a.debugMode&&!j(a.debugID)&&(!a._hasConsole||!a.useConsole||a.useConsole&&a._hasConsole&&!a.consoleOnly)){e=document.createElement("div");e.id=a.debugID;e.style.display=a.debugMode?"block":"none";if(a.debugMode&&!j(c.id)){try{g.appendChild(c)}catch(q){throw new Error(a._str("appXHTML"));
}g.appendChild(e)}}}d&&a._wD(d);a._wD("-- SoundManager 2 "+a.version+(a.useMovieStar?", MovieStar mode":"")+(a.useHighPerformance?", high performance mode, ":", ")+((a.useFastPolling?"fast":"normal")+" polling")+(a.wmode?", wmode: "+a.wmode:"")+(a.debugFlash?", flash debug mode":"")+" --",1);a._wD("soundManager._createMovie(): Trying to load "+b+(!a._overHTTP&&a.altURL?" (alternate URL)":""),1)};this._writeDebug=function(c,b,d){if(!a.debugMode)return false;if(typeof d!="undefined"&&d)c=c+" | "+(new Date).getTime();
if(a._hasConsole&&a.useConsole){d=a._debugLevels[b];typeof console[d]!="undefined"?console[d](c):console.log(c);if(a.useConsoleOnly)return true}d=null;try{d=j("soundmanager-debug");if(!d)return false;var e=document.createElement("div");if(++a._wdCount%2===0)e.className="sm2-alt";b=typeof b=="undefined"?0:parseInt(b,10);e.appendChild(document.createTextNode(c));if(b){if(b>=2)e.style.fontWeight="bold";if(b==3)e.style.color="#ff3333"}d.insertBefore(e,d.firstChild)}catch(f){}};this._writeDebug._protected=
true;this._wdCount=0;this._wdCount._protected=true;this._wD=this._writeDebug;this._wDS=function(c,b){return c?a._wD(a._str(c),b):""};this._wDS._protected=true;this._wDAlert=function(c){alert(c)};if(window.location.href.indexOf("debug=alert")+1&&a.debugMode)a._wD=a._wDAlert;this._toggleDebug=function(){var c=j(a.debugID),b=j(a.debugID+"-toggle");if(!c)return false;if(a._debugOpen){b.innerHTML="+";c.style.display="none"}else{b.innerHTML="-";c.style.display="block"}a._debugOpen=!a._debugOpen};this._toggleDebug._protected=
true;this._debug=function(){a._wDS("currentObj",1);for(var c=0,b=a.soundIDs.length;c<b;c++)a.sounds[a.soundIDs[c]]._debug()};this._debugTS=function(c,b,d){if(typeof sm2Debugger!="undefined")try{sm2Debugger.handleEvent(c,b,d)}catch(e){}};this._debugTS._protected=true;this._mergeObjects=function(c,b){var d={};for(var e in c)if(c.hasOwnProperty(e))d[e]=c[e];c=typeof b=="undefined"?a.defaultOptions:b;for(var f in c)if(c.hasOwnProperty(f)&&typeof d[f]=="undefined")d[f]=c[f];return d};this.go=this.createMovie=
function(c){if(c)a.url=c;a._initMovie()};this._initMovie=function(){if(a.o)return false;a.o=a.getMovie(a.id);if(!a.o){if(a.oRemoved){if(a.isIE)a.oMC.innerHTML=a.oRemovedHTML;else a.oMC.appendChild(a.oRemoved);a.oRemoved=null;a._didAppend=true}else a._createMovie(a.id,a.url);a.o=a.getMovie(a.id)}a.o&&a.flashLoadTimeout>0&&a._wDS("waitEI");typeof a.oninitmovie=="function"&&setTimeout(a.oninitmovie,1)};this.waitForExternalInterface=function(){if(a._waitingForEI)return false;a._waitingForEI=true;if(a._tryInitOnFocus&&
!a._isFocused){a._wDS("waitFocus");return false}if(a.flashLoadTimeout>0){if(!a._didInit){var c=a.getMoviePercent();a._wD(a._str("waitImpatient",c==100?" (SWF loaded)":c>0?" (SWF "+c+"% loaded)":""))}setTimeout(function(){var b=a.getMoviePercent();if(!a._didInit){a._wD("soundManager: No Flash response within reasonable time after document load.\nLikely causes: "+(b===null||b===0?"Loading "+a.movieURL+" may have failed (and/or Flash "+a.flashVersion+"+ not present?), ":"")+"Flash blocked or JS-Flash security error."+
(a.debugFlash?" "+a._str("checkSWF"):""),2);if(!a._overHTTP){a._wDS("localFail",2);a.debugFlash||a._wDS("tryDebug",2)}b===0&&a._wD(a._str("swf404",a.url));a._debugTS("flashtojs",false,": Timed out"+a._overHTTP?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)")}!a._didInit&&a._okToDisable&&a._failSafely(true)},a.flashLoadTimeout)}else a._didInit||a._wDS("waitForever")};this.getMoviePercent=function(){return a.o&&typeof a.o.PercentLoaded!="undefined"?a.o.PercentLoaded():null};
this.handleFocus=function(){if(a._isFocused||!a._tryInitOnFocus)return true;a._okToDisable=true;a._isFocused=true;a._wD("soundManager.handleFocus()");a._tryInitOnFocus&&window.removeEventListener("mousemove",a.handleFocus,false);a._waitingForEI=false;setTimeout(a.waitForExternalInterface,500);if(window.removeEventListener)window.removeEventListener("focus",a.handleFocus,false);else window.detachEvent&&window.detachEvent("onfocus",a.handleFocus)};this.initComplete=function(c){if(a._didInit)return false;
a._didInit=true;a._wD("-- SoundManager 2 "+(a._disabled?"failed to load":"loaded")+" ("+(a._disabled?"security/load error":"OK")+") --",1);if(a._disabled||c){a._processOnReady();a._debugTS("onload",false);a.onerror.apply(window);return false}else a._debugTS("onload",true);if(a.waitForWindowLoad&&!a._windowLoaded){a._wDS("waitOnload");if(window.addEventListener)window.addEventListener("load",a._initUserOnload,false);else window.attachEvent&&window.attachEvent("onload",a._initUserOnload);return false}else{a.waitForWindowLoad&&
a._windowLoaded&&a._wDS("docLoaded");a._initUserOnload()}};this._addOnReady=function(c,b){a._onready.push({method:c,scope:b||null,fired:false})};this._processOnReady=function(){if(!a._didInit)return false;for(var c={success:!a._disabled},b=[],d=0,e=a._onready.length;d<e;d++)a._onready[d].fired!==true&&b.push(a._onready[d]);if(b.length){a._wD("soundManager: Firing "+b.length+" onready() item"+(b.length>1?"s":""));d=0;for(e=b.length;d<e;d++){b[d].scope?b[d].method.apply(b[d].scope,[c]):b[d].method(c);
b[d].fired=true}}};this._initUserOnload=function(){window.setTimeout(function(){a._processOnReady();a._wDS("onload",1);a.onload.apply(window);a._wDS("onloadOK",1)})};this.init=function(){a._wDS("init");a._initMovie();if(a._didInit){a._wDS("didInit");return false}if(window.removeEventListener)window.removeEventListener("load",a.beginDelayedInit,false);else window.detachEvent&&window.detachEvent("onload",a.beginDelayedInit);try{a._wDS("flashJS");a.o._externalInterfaceTest(false);a.allowPolling?a._setPolling(true,
a.useFastPolling?true:false):a._wDS("noPolling",1);a.debugMode||a.o._disableDebug();a.enabled=true;a._debugTS("jstoflash",true)}catch(c){a._wD("js/flash exception: "+c.toString());a._debugTS("jstoflash",false);a._failSafely(true);a.initComplete();return false}a.initComplete()};this.beginDelayedInit=function(){a._windowLoaded=true;setTimeout(a.waitForExternalInterface,500);setTimeout(a.beginInit,20)};this.beginInit=function(){if(a._initPending)return false;a.createMovie();a._initMovie();return a._initPending=
true};this.domContentLoaded=function(){document.removeEventListener&&document.removeEventListener("DOMContentLoaded",a.domContentLoaded,false);a.go()};this._externalInterfaceOK=function(c){if(a.swfLoaded)return false;var b=(new Date).getTime();a._wD("soundManager._externalInterfaceOK()"+(c?" (~"+(b-c)+" ms)":""));a._debugTS("swf",true);a._debugTS("flashtojs",true);a.swfLoaded=true;a._tryInitOnFocus=false;a.isIE?setTimeout(a.init,100):a.init()};this._setSandboxType=function(c){var b=a.sandbox;b.type=
c;b.description=b.types[typeof b.types[c]!="undefined"?c:"unknown"];a._wD("Flash security sandbox type: "+b.type);if(b.type=="localWithFile"){b.noRemote=true;b.noLocal=false;a._wDS("secNote",2)}else if(b.type=="localWithNetwork"){b.noRemote=false;b.noLocal=true}else if(b.type=="localTrusted"){b.noRemote=false;b.noLocal=false}};this.reboot=function(){a._wD("soundManager.reboot()");a.soundIDs.length&&a._wD("Destroying "+a.soundIDs.length+" SMSound objects...");for(var c=a.soundIDs.length;c--;)a.sounds[a.soundIDs[c]].destruct();
try{if(a.isIE)a.oRemovedHTML=a.o.innerHTML;a.oRemoved=a.o.parentNode.removeChild(a.o);a._wD("Flash movie removed.")}catch(b){a._wDS("badRemove",2)}a.oRemovedHTML=null;a.oRemoved=null;a.enabled=false;a._didInit=false;a._waitingForEI=false;a._initPending=false;a._didAppend=false;a._appendSuccess=false;a._disabled=false;a._waitingforEI=true;a.swfLoaded=false;a.soundIDs={};a.sounds=[];a.o=null;for(c=a._onready.length;c--;)a._onready[c].fired=false;a._wD("soundManager: Rebooting...");window.setTimeout(soundManager.beginDelayedInit,
20)};this.destruct=function(){a._wD("soundManager.destruct()");a.disable(true)};l=function(c){var b=this;this.sID=c.id;this.url=c.url;this._iO=this.instanceOptions=this.options=a._mergeObjects(c);this.pan=this.options.pan;this.volume=this.options.volume;this._lastURL=null;this._debug=function(){if(a.debugMode){var d=null,e=[],f=null,g=null;for(d in b.options)if(b.options[d]!==null)if(b.options[d]instanceof Function){f=b.options[d].toString();f=f.replace(/\s\s+/g," ");g=f.indexOf("{");e[e.length]=
" "+d+": {"+f.substr(g+1,Math.min(Math.max(f.indexOf("\n")-1,64),64)).replace(/\n/g,"")+"... }"}else e[e.length]=" "+d+": "+b.options[d];a._wD("SMSound() merged options: {\n"+e.join(", \n")+"\n}")}};this._debug();this.id3={};this.resetProperties=function(){b.bytesLoaded=null;b.bytesTotal=null;b.position=null;b.duration=null;b.durationEstimate=null;b.loaded=false;b.playState=0;b.paused=false;b.readyState=0;b.muted=false;b.didBeforeFinish=false;b.didJustBeforeFinish=false;b.isBuffering=false;b.instanceOptions=
{};b.instanceCount=0;b.peakData={left:0,right:0};b.waveformData={left:[],right:[]};b.eqData=[];b.eqData.left=[];b.eqData.right=[]};b.resetProperties();this.load=function(d){if(typeof d!="undefined"){b._iO=a._mergeObjects(d);b.instanceOptions=b._iO}else{d=b.options;b._iO=d;b.instanceOptions=b._iO;if(b._lastURL&&b._lastURL!=b.url){a._wDS("manURL");b._iO.url=b.url;b.url=null}}if(typeof b._iO.url=="undefined")b._iO.url=b.url;a._wD("soundManager.load(): "+b._iO.url,1);if(b._iO.url==b.url&&b.readyState!==
0&&b.readyState!=2){a._wDS("onURL",1);return false}b.url=b._iO.url;b._lastURL=b._iO.url;b.loaded=false;b.readyState=1;b.playState=0;try{if(a.flashVersion==8)a.o._load(b.sID,b._iO.url,b._iO.stream,b._iO.autoPlay,b._iO.whileloading?1:0);else{a.o._load(b.sID,b._iO.url,b._iO.stream?true:false,b._iO.autoPlay?true:false);b._iO.isMovieStar&&b._iO.autoLoad&&!b._iO.autoPlay&&b.pause()}}catch(e){a._wDS("smError",2);a._debugTS("onload",false);a.onerror();a.disable()}};this.unload=function(){if(b.readyState!==
0){a._wD('SMSound.unload(): "'+b.sID+'"');b.readyState!=2&&b.setPosition(0,true);a.o._unload(b.sID,a.nullURL);b.resetProperties()}};this.destruct=function(){a._wD('SMSound.destruct(): "'+b.sID+'"');a.o._destroySound(b.sID);a.destroySound(b.sID,true)};this.start=this.play=function(d){d||(d={});b._iO=a._mergeObjects(d,b._iO);b._iO=a._mergeObjects(b._iO,b.options);b.instanceOptions=b._iO;if(b.playState==1)if(b._iO.multiShot)a._wD('SMSound.play(): "'+b.sID+'" already playing (multi-shot)',1);else{a._wD('SMSound.play(): "'+
b.sID+'" already playing (one-shot)',1);return false}if(b.loaded)a._wD('SMSound.play(): "'+b.sID+'"');else if(b.readyState===0){a._wD('SMSound.play(): Attempting to load "'+b.sID+'"',1);b._iO.autoPlay=true;b.load(b._iO)}else if(b.readyState==2){a._wD('SMSound.play(): Could not load "'+b.sID+'" - exiting',2);return false}else a._wD('SMSound.play(): "'+b.sID+'" is loading - attempting to play..',1);if(b.paused)b.resume();else{b.playState=1;if(!b.instanceCount||a.flashVersion>8)b.instanceCount++;b.position=
typeof b._iO.position!="undefined"&&!isNaN(b._iO.position)?b._iO.position:0;b._iO.onplay&&b._iO.onplay.apply(b);b.setVolume(b._iO.volume,true);b.setPan(b._iO.pan,true);a.o._start(b.sID,b._iO.loop||1,a.flashVersion==9?b.position:b.position/1E3)}};this.stop=function(d){if(b.playState==1){b.playState=0;b.paused=false;b._iO.onstop&&b._iO.onstop.apply(b);a.o._stop(b.sID,d);b.instanceCount=0;b._iO={}}};this.setPosition=function(d){if(typeof d=="undefined")d=0;d=Math.min(b.duration,Math.max(d,0));b._iO.position=
d;a.o._setPosition(b.sID,a.flashVersion==9?b._iO.position:b._iO.position/1E3,b.paused||!b.playState)};this.pause=function(){if(b.paused||b.playState===0)return false;a._wD("SMSound.pause()");b.paused=true;a.o._pause(b.sID);b._iO.onpause&&b._iO.onpause.apply(b)};this.resume=function(){if(!b.paused||b.playState===0)return false;a._wD("SMSound.resume()");b.paused=false;a.o._pause(b.sID);b._iO.onresume&&b._iO.onresume.apply(b)};this.togglePause=function(){a._wD("SMSound.togglePause()");if(b.playState===
0){b.play({position:a.flashVersion==9?b.position:b.position/1E3});return false}b.paused?b.resume():b.pause()};this.setPan=function(d,e){if(typeof d=="undefined")d=0;if(typeof e=="undefined")e=false;a.o._setPan(b.sID,d);b._iO.pan=d;if(!e)b.pan=d};this.setVolume=function(d,e){if(typeof d=="undefined")d=100;if(typeof e=="undefined")e=false;a.o._setVolume(b.sID,a.muted&&!b.muted||b.muted?0:d);b._iO.volume=d;if(!e)b.volume=d};this.mute=function(){b.muted=true;a.o._setVolume(b.sID,0)};this.unmute=function(){b.muted=
false;a.o._setVolume(b.sID,typeof b._iO.volume!="undefined"?b._iO.volume:b.options.volume)};this.toggleMute=function(){b.muted?b.unmute():b.mute()};this._whileloading=function(d,e,f){if(b._iO.isMovieStar){b.bytesLoaded=d;b.bytesTotal=e;b.duration=Math.floor(f);b.durationEstimate=b.duration}else{b.bytesLoaded=d;b.bytesTotal=e;b.duration=Math.floor(f);b.durationEstimate=parseInt(b.bytesTotal/b.bytesLoaded*b.duration,10);if(b.durationEstimate===undefined)b.durationEstimate=b.duration}b.readyState!=3&&
b._iO.whileloading&&b._iO.whileloading.apply(b)};this._onid3=function(d,e){a._wD('SMSound._onid3(): "'+this.sID+'" ID3 data received.');for(var f=[],g=0,i=d.length;g<i;g++)f[d[g]]=e[g];b.id3=a._mergeObjects(b.id3,f);b._iO.onid3&&b._iO.onid3.apply(b)};this._whileplaying=function(d,e,f,g,i){if(isNaN(d)||d===null)return false;if(b.playState===0&&d>0)d=0;b.position=d;if(a.flashVersion>8){if(b._iO.usePeakData&&typeof e!="undefined"&&e)b.peakData={left:e.leftPeak,right:e.rightPeak};if(b._iO.useWaveformData&&
typeof f!="undefined"&&f)b.waveformData={left:f.split(","),right:g.split(",")};if(b._iO.useEQData)if(typeof i!="undefined"&&i.leftEQ){d=i.leftEQ.split(",");b.eqData=d;b.eqData.left=d;if(typeof i.rightEQ!="undefined"&&i.rightEQ)b.eqData.right=i.rightEQ.split(",")}}if(b.playState==1){b.isBuffering&&b._onbufferchange(0);b._iO.whileplaying&&b._iO.whileplaying.apply(b);if(b.loaded&&b._iO.onbeforefinish&&b._iO.onbeforefinishtime&&!b.didBeforeFinish&&b.duration-b.position<=b._iO.onbeforefinishtime){a._wD("duration-position &lt;= onbeforefinishtime: "+
b.duration+" - "+b.position+" &lt= "+b._iO.onbeforefinishtime+" ("+(b.duration-b.position)+")");b._onbeforefinish()}}};this._onload=function(d){d=d==1?true:false;a._wD('SMSound._onload(): "'+b.sID+'"'+(d?" loaded.":" failed to load? - "+b.url),d?1:2);if(!d){a.sandbox.noRemote===true&&a._wD("SMSound._onload(): "+a._str("noNet"),1);a.sandbox.noLocal===true&&a._wD("SMSound._onload(): "+a._str("noLocal"),1)}b.loaded=d;b.readyState=d?3:2;b._iO.onload&&b._iO.onload.apply(b)};this._onbeforefinish=function(){if(!b.didBeforeFinish){b.didBeforeFinish=
true;if(b._iO.onbeforefinish){a._wD('SMSound._onbeforefinish(): "'+b.sID+'"');b._iO.onbeforefinish.apply(b)}}};this._onjustbeforefinish=function(){if(!b.didJustBeforeFinish){b.didJustBeforeFinish=true;if(b._iO.onjustbeforefinish){a._wD('SMSound._onjustbeforefinish(): "'+b.sID+'"');b._iO.onjustbeforefinish.apply(b)}}};this._onfinish=function(){b._iO.onbeforefinishcomplete&&b._iO.onbeforefinishcomplete.apply(b);b.didBeforeFinish=false;b.didJustBeforeFinish=false;if(b.instanceCount){b.instanceCount--;
if(!b.instanceCount){b.playState=0;b.paused=false;b.instanceCount=0;b.instanceOptions={}}if(!b.instanceCount||b._iO.multiShotEvents)if(b._iO.onfinish){a._wD('SMSound._onfinish(): "'+b.sID+'"');b._iO.onfinish.apply(b)}}};this._onmetadata=function(d){a._wD("SMSound.onmetadata()");if(!d.width&&!d.height){a._wDS("noWH");d.width=320;d.height=240}b.metadata=d;b.width=d.width;b.height=d.height;if(b._iO.onmetadata){a._wD('SMSound.onmetadata(): "'+b.sID+'"');b._iO.onmetadata.apply(b)}a._wD("SMSound.onmetadata() complete")};
this._onbufferchange=function(d){if(b.playState===0)return false;if(d==b.isBuffering){a._wD("SMSound._onbufferchange(): ignoring false default / loaded sound");return false}b.isBuffering=d==1?true:false;if(b._iO.onbufferchange){a._wD("SMSound._onbufferchange(): "+d);b._iO.onbufferchange.apply(b)}};this._ondataerror=function(d){if(b.playState>0){a._wD("SMSound._ondataerror(): "+d);b._iO.ondataerror&&b._iO.ondataerror.apply(b)}}};this._onfullscreenchange=function(c){a._wD("onfullscreenchange(): "+c);
a.isFullScreen=c==1?true:false;if(!a.isFullScreen)try{window.focus();a._wD("window.focus()")}catch(b){}};if(window.addEventListener){window.addEventListener("focus",a.handleFocus,false);window.addEventListener("load",a.beginDelayedInit,false);window.addEventListener("unload",a.destruct,false);a._tryInitOnFocus&&window.addEventListener("mousemove",a.handleFocus,false)}else if(window.attachEvent){window.attachEvent("onfocus",a.handleFocus);window.attachEvent("onload",a.beginDelayedInit);window.attachEvent("unload",
a.destruct)}else{a._debugTS("onload",false);soundManager.onerror();soundManager.disable()}document.addEventListener&&document.addEventListener("DOMContentLoaded",a.domContentLoaded,false)}if(FlashDetect.installed)soundManager=new SoundManager;
