(function(b){function a(ae,f){function aH(){if(a2.debugURLParam.test(an)){a2.debugMode=true}var r,k,p,n;if(a2.debugMode){r=document.createElement("div");r.id=a2.debugID+"-toggle";k={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};r.appendChild(document.createTextNode("-"));r.onclick=aC;r.title="Toggle SM2 debug console";if(aw.match(/msie 6/i)){r.style.position="absolute";r.style.cursor="hand"}for(n in k){if(k.hasOwnProperty(n)){r.style[n]=k[n]}}}if(a2.debugMode&&!aT(a2.debugID)&&(!ax||!a2.useConsole||a2.useConsole&&ax&&!a2.consoleOnly)){k=document.createElement("div");k.id=a2.debugID;k.style.display=a2.debugMode?"block":"none";if(a2.debugMode&&!aT(r.id)){try{p=a3();p.appendChild(r)}catch(q){throw new Error(aY("appXHTML"))}p.appendChild(k)}}p=null;aH=function(){}}this.flashVersion=8;this.debugMode=true;this.debugFlash=false;this.useConsole=true;this.waitForWindowLoad=this.consoleOnly=false;this.nullURL="about:blank";this.allowPolling=true;this.useFastPolling=false;this.useMovieStar=true;this.bgColor="#ffffff";this.useHighPerformance=false;this.flashLoadTimeout=1000;this.wmode=null;this.allowFullScreen=true;this.allowScriptAccess="always";this.useHTML5Audio=this.useFlashBlock=false;this.html5Test=/^probably$/i;this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:true},mp4:{related:["aac","m4a"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:true},ogg:{type:["audio/ogg; codecs=vorbis"],required:false},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:false}};this.defaultOptions={autoLoad:false,stream:true,autoPlay:false,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5000,onbeforefinishcomplete:null,onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:true,multiShotEvents:false,position:null,pan:0,type:null,volume:100};this.flash9Options={isMovieStar:null,usePeakData:false,useWaveformData:false,useEQData:false,onbufferchange:null,ondataerror:null};this.movieStarOptions={onmetadata:null,useVideo:false,bufferTime:3,serverURL:null,onconnect:null};this.version=null;this.versionNumber="V2.96a.20100606";this.movieURL=null;this.url=ae||null;this.altURL=null;this.enabled=this.swfLoaded=false;this.o=null;this.movieID="sm2-container";this.id=f||"sm2movie";this.swfCSS={swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"};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.didFlashBlock=this.specialWmodeCase=false;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.baseMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamTypes=["aac","flv","mov","mp4","m4v","f4v","m4a","mp4v","3gp","3g2"];this.netStreamPattern=new RegExp("\\.("+this.netStreamTypes.join("|")+")(\\?.*)?$","i");this.mimePattern=this.baseMimeTypes;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.hasHTML5=null;this.html5={usingFlash:null};this.ignoreFlash=false;var aI,a2=this,aT,aw=navigator.userAgent,an=b.location.href.toString(),a0=this.flashVersion,o,ac,au=[],ay=true,aP,at=false,am=false,aW=false,aO=false,d=false,a1,aS,al,aR,aE,ar,aq,Y,aJ,az,av,aV,ab,w,ak,e,a3,m,aF,aU=["log","info","warn","error"],ad,aj,aZ,ai=null,aL=null,aY,aA,ah,aC,l,g,aX,j=false,aN=false,aG,ag,ap=null,aQ,h,aM=false,af,aK,aB,aD;ae=aw.match(/pre\//i);f=aw.match(/(ipad|iphone)/i);aw.match(/mobile/i);var ax=typeof console!=="undefined"&&typeof console.log!=="undefined",i=typeof document.hasFocus!=="undefined"?document.hasFocus():null,ao=typeof document.hasFocus==="undefined"&&this.isSafari,s=!ao;this._use_maybe=an.match(/sm2\-useHTML5Maybe\=1/i);this._overHTTP=document.location?document.location.protocol.match(/http/i):null;this.useAltURL=!this._overHTTP;if(f||ae){a2.useHTML5Audio=true;a2.ignoreFlash=true}if(ae||this._use_maybe){a2.html5Test=/^(probably|maybe)$/i}(function(){var n=an,k=null;if(n.indexOf("#sm2-usehtml5audio=")!==-1){k=n.substr(n.indexOf("#sm2-usehtml5audio=")+19)==="1";if(typeof console!=="undefined"&&typeof console.log!=="undefined"){console.log((k?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter")}a2.useHTML5Audio=k}})();this.supported=function(){return ap?aW&&!aO:a2.useHTML5Audio&&a2.hasHTML5};this.getMovie=function(k){return a2.isIE?b[k]:a2.isSafari?aT(k)||document[k]:aT(k)};this.loadFromXML=function(n){try{a2.o._loadFromXML(n)}catch(k){aj();return true}};this.createSound=function(r){function k(){p=l(p);a2.sounds[q.id]=new aI(q);a2.soundIDs.push(q.id);return a2.sounds[q.id]}var p=null,n=null,q=null;if(!aW){throw g("soundManager.createSound(): "+aY("notReady"),arguments.callee.caller)}if(arguments.length===2){r={id:arguments[0],url:arguments[1]}}q=p=aR(r);q.id.toString().charAt(0).match(/^[0-9]$/)&&a2._wD("soundManager.createSound(): "+aY("badID",q.id),2);a2._wD("soundManager.createSound(): "+q.id+" ("+q.url+")",1);if(aX(q.id,true)){a2._wD("soundManager.createSound(): "+q.id+" exists",1);return a2.sounds[q.id]}if(h(q)){n=k();a2._wD("Loading sound "+q.id+" from HTML5");n._setup_html5(q)}else{if(a0>8&&a2.useMovieStar){if(q.isMovieStar===null){q.isMovieStar=q.serverURL||(q.type?q.type.match(a2.netStreamPattern):false)||q.url.match(a2.netStreamPattern)?true:false}q.isMovieStar&&a2._wD("soundManager.createSound(): using MovieStar handling");if(q.isMovieStar){if(q.usePeakData){a1("noPeak");q.usePeakData=false}q.loops>1&&a1("noNSLoop")}}n=k();if(a0===8){a2.o._createSound(q.id,q.onjustbeforefinishtime,q.loops||1)}else{a2.o._createSound(q.id,q.url,q.onjustbeforefinishtime,q.usePeakData,q.useWaveformData,q.useEQData,q.isMovieStar,q.isMovieStar?q.useVideo:false,q.isMovieStar?q.bufferTime:false,q.loops||1,q.serverURL,q.duration||null,q.totalBytes||null,q.autoPlay,true);if(!q.serverURL){n.connected=true;q.onconnect&&q.onconnect.apply(n)}}}if(q.autoLoad||q.autoPlay){if(n){if(a2.isHTML5){n.autobuffer="auto";n.preload="auto"}else{n.load(q)}}}q.autoPlay&&n.play();return n};this.createVideo=function(k){if(arguments.length===2){k={id:arguments[0],url:arguments[1]}}if(a0>=9){k.isMovieStar=true;k.useVideo=true}else{a2._wD("soundManager.createVideo(): "+aY("f9Vid"),2);return false}a2.useMovieStar||a2._wD("soundManager.createVideo(): "+aY("noMS"),2);return a2.createSound(k)};this.destroyVideo=this.destroySound=function(p,k){if(!aX(p)){return false}for(var n=0;n<a2.soundIDs.length;n++){a2.soundIDs[n]===p&&a2.soundIDs.splice(n,1)}a2.sounds[p].unload();k||a2.sounds[p].destruct();delete a2.sounds[p]};this.load=function(n,k){if(!aX(n)){return false}return a2.sounds[n].load(k)};this.unload=function(k){if(!aX(k)){return false}return a2.sounds[k].unload()};this.start=this.play=function(n,k){if(!aW){throw g("soundManager.play(): "+aY("notReady"),arguments.callee.caller)}if(!aX(n)){k instanceof Object||(k={url:k});if(k&&k.url){a2._wD('soundManager.play(): attempting to create "'+n+'"',1);k.id=n;return a2.createSound(k).play()}else{return false}}return a2.sounds[n].play(k)};this.setPosition=function(n,k){if(!aX(n)){return false}return a2.sounds[n].setPosition(k)};this.stop=function(k){if(!aX(k)){return false}a2._wD("soundManager.stop("+k+")",1);return a2.sounds[k].stop()};this.stopAll=function(){a2._wD("soundManager.stopAll()",1);for(var k in a2.sounds){a2.sounds[k] instanceof aI&&a2.sounds[k].stop()}};this.pause=function(k){if(!aX(k)){return false}return a2.sounds[k].pause()};this.pauseAll=function(){for(var k=a2.soundIDs.length;k--;){a2.sounds[a2.soundIDs[k]].pause()}};this.resume=function(k){if(!aX(k)){return false}return a2.sounds[k].resume()};this.resumeAll=function(){for(var k=a2.soundIDs.length;k--;){a2.sounds[a2.soundIDs[k]].resume()}};this.togglePause=function(k){if(!aX(k)){return false}return a2.sounds[k].togglePause()};this.setPan=function(n,k){if(!aX(n)){return false}return a2.sounds[n].setPan(k)};this.setVolume=function(n,k){if(!aX(n)){return false}return a2.sounds[n].setVolume(k)};this.mute=function(n){var k=0;if(typeof n!=="string"){n=null}if(n){if(!aX(n)){return false}a2._wD('soundManager.mute(): Muting "'+n+'"');return a2.sounds[n].mute()}else{a2._wD("soundManager.mute(): Muting all sounds");for(k=a2.soundIDs.length;k--;){a2.sounds[a2.soundIDs[k]].mute()}a2.muted=true}};this.muteAll=function(){a2.mute()};this.unmute=function(k){if(typeof k!=="string"){k=null}if(k){if(!aX(k)){return false}a2._wD('soundManager.unmute(): Unmuting "'+k+'"');return a2.sounds[k].unmute()}else{a2._wD("soundManager.unmute(): Unmuting all sounds");for(k=a2.soundIDs.length;k--;){a2.sounds[a2.soundIDs[k]].unmute()}a2.muted=false}};this.unmuteAll=function(){a2.unmute()};this.toggleMute=function(k){if(!aX(k)){return false}return a2.sounds[k].toggleMute()};this.getMemoryUse=function(){if(a0===8){return 0}if(a2.o){return parseInt(a2.o._getMemoryUse(),10)}};this.disable=function(n){if(typeof n==="undefined"){n=false}if(aO){return false}aO=true;a1("shutdown",1);for(var k=a2.soundIDs.length;k--;){ad(a2.sounds[a2.soundIDs[k]])}al(n);b.removeEventListener&&b.removeEventListener("load",aq,false)
};this.canPlayMIME=function(n){var k;if(a2.hasHTML5){k=af({type:n})}return !ap||k?k:n?n.match(a2.mimePattern)?true:false:null};this.canPlayURL=function(n){var k;if(a2.hasHTML5){k=af(n)}return !ap||k?k:n?n.match(a2.filePattern)?true:false:null};this.canPlayLink=function(k){if(typeof k.type!=="undefined"&&k.type){if(a2.canPlayMIME(k.type)){return true}}return a2.canPlayURL(k.href)};this.getSoundById=function(p,k){if(!p){throw new Error("SoundManager.getSoundById(): sID is null/undefined")}var n=a2.sounds[p];!n&&!k&&a2._wD('"'+p+'" is an invalid sound ID.',2);return n};this.onready=function(n,k){if(n&&n instanceof Function){aW&&a1("queue");k||(k=b);aE(n,k);ar();return true}else{throw aY("needFunction")}};this.oninitmovie=function(){};this.onload=function(){a2._wD("soundManager.onload()",1)};this.onerror=function(){};this.getMoviePercent=function(){return a2.o&&typeof a2.o.PercentLoaded!=="undefined"?a2.o.PercentLoaded():null};this._wD=this._writeDebug=function(t,n,q){var p,r;if(!a2.debugMode){return false}if(typeof q!=="undefined"&&q){t=t+" | "+(new Date).getTime()}if(ax&&a2.useConsole){q=aU[n];typeof console[q]!=="undefined"?console[q](t):console.log(t);if(a2.useConsoleOnly){return true}}try{p=aT("soundmanager-debug");if(!p){return false}r=document.createElement("div");if(++aS%2===0){r.className="sm2-alt"}n=typeof n==="undefined"?0:parseInt(n,10);r.appendChild(document.createTextNode(t));if(n){if(n>=2){r.style.fontWeight="bold"}if(n===3){r.style.color="#ff3333"}}p.insertBefore(r,p.firstChild)}catch(k){}};this._debug=function(){a1("currentObj",1);for(var n=0,k=a2.soundIDs.length;n<k;n++){a2.sounds[a2.soundIDs[n]]._debug()}};this.reboot=function(){a2._wD("soundManager.reboot()");a2.soundIDs.length&&a2._wD("Destroying "+a2.soundIDs.length+" SMSound objects...");for(var n=a2.soundIDs.length;n--;){a2.sounds[a2.soundIDs[n]].destruct()}try{if(a2.isIE){aL=a2.o.innerHTML}ai=a2.o.parentNode.removeChild(a2.o);a2._wD("Flash movie removed.")}catch(k){a1("badRemove",2)}ai=aL=null;aO=am=at=aN=j=aW=a2.enabled=false;a2.swfLoaded=false;a2.soundIDs={};a2.sounds=[];a2.o=null;for(n=au.length;n--;){au[n].fired=false}a2._wD("soundManager: Rebooting...");b.setTimeout(function(){a2.beginDelayedInit()},20)};this.destruct=function(){a2._wD("soundManager.destruct()");a2.disable(true)};this.beginDelayedInit=function(){d=true;ak();setTimeout(aJ,500);setTimeout(aV,20)};h=function(k){return(k.type?af({type:k.type}):false)||af(k.url)};af=function(p){if(!a2.useHTML5Audio||!a2.hasHTML5){return false}var k,n=a2.audioFormats;if(!aK){aK=[];for(k in n){if(n.hasOwnProperty(k)){aK.push(k);if(n[k].related){aK=aK.concat(n[k].related)}}}aK=new RegExp("\\.("+aK.join("|")+")","i")}k=typeof p.type!=="undefined"?p.type:null;p=typeof p==="string"?p.match(aK):null;if(!p||!p.length){if(!k){return false}}else{p=p[0].substr(1)}if(p&&typeof a2.html5[p]!=="undefined"){return a2.html5[p]}else{if(!k){if(p&&a2.html5[p]){return a2.html5[p]}else{k="audio/"+p}}k=a2.html5.canPlayType(k);return a2.html5[p]=k}};aD=function(){function t(u){var v,y,x=false;if(!n||typeof n.canPlayType!=="function"){return false}if(u instanceof Array){v=0;for(y=u.length;v<y&&!x;v++){if(a2.html5[u[v]]||n.canPlayType(u[v]).match(a2.html5Test)){x=true;a2.html5[u[v]]=true}}return x}else{return(u=n&&typeof n.canPlayType==="function"?n.canPlayType(u):false)&&(u.match(a2.html5Test)?true:false)}}if(!a2.useHTML5Audio||typeof Audio==="undefined"){return false}var n=typeof Audio!=="undefined"?new Audio:null,q,p={},r,k;r=a2.audioFormats;for(q in r){if(r.hasOwnProperty(q)){p[q]=t(r[q].type);if(r[q]&&r[q].related){for(k=0;k<r[q].related.length;k++){a2.html5[r[q].related[k]]=p[q]}}}}p.canPlayType=n?t:null;a2.html5=aR(a2.html5,p)};ab={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.",spcWmode:"soundManager::createMovie(): Removing wmode, preventing win32 below-the-fold SWF loading issue",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 (will recover if unblocked)...",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.",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.",noPeak:"Warning: peakData features unsupported for movieStar 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.",fbTimeout:"No flash response, applying ."+a2.swfCSS.swfTimedout+" CSS..",fbLoaded:"Flash loaded",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.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats."};aT=function(k){return document.getElementById(k)};aS=0;aY=function(){var q=Array.prototype.slice.call(arguments),k=q.shift();k=ab&&ab[k]?ab[k]:"";var p,n;if(k&&q&&q.length){p=0;for(n=q.length;p<n;p++){k=k.replace("%s",q[p])}}return k};l=function(k){if(a0===8&&k.loops>1&&k.stream){a1("as2loop");k.stream=false}return k};g=function(n,k){if(!k){return new Error("Error: "+n)}typeof console!=="undefined"&&typeof console.trace!=="undefined"&&console.trace();n="Error: "+n+". \nCaller: "+k.toString();return new Error(n)};o=function(){return false};ad=function(n){for(var k in n){if(n.hasOwnProperty(k)&&typeof n[k]==="function"){n[k]=o}}};aj=function(k){if(typeof k==="undefined"){k=false}if(aO||k){a1("smFail",2);a2.disable(k)}};aZ=function(n){var k=null;if(n){if(n.match(/\.swf(\?\.*)?$/i)){if(k=n.substr(n.toLowerCase().lastIndexOf(".swf?")+4)){return n}}else{if(n.lastIndexOf("/")!==n.length-1){n+="/"}}}return(n&&n.lastIndexOf("/")!==-1?n.substr(0,n.lastIndexOf("/")+1):"./")+a2.movieURL};az=function(){if(a0!==8&&a0!==9){a2._wD(aY("badFV",a0,8));a2.flashVersion=8}var k=a2.debugMode||a2.debugFlash?"_debug.swf":".swf";if(a2.flashVersion<9&&a2.useHTML5Audio&&a2.audioFormats.mp4.required){a2._wD(aY("needfl9"));a2.flashVersion=9}a0=a2.flashVersion;a2.version=a2.versionNumber+(aM?" (HTML5-only mode)":a0===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(a0>8){a2.defaultOptions=aR(a2.defaultOptions,a2.flash9Options);a2.features.buffering=true}if(a0>8&&a2.useMovieStar){a2.defaultOptions=aR(a2.defaultOptions,a2.movieStarOptions);a2.filePatterns.flash9=new RegExp("\\.(mp3|"+a2.netStreamTypes.join("|")+")(\\?.*)?$","i");a2.mimePattern=a2.netStreamMimeTypes;a2.features.movieStar=true}else{a2.features.movieStar=false}a2.filePattern=a2.filePatterns[a0!==8?"flash9":"flash8"];a2.movieURL=(a0===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",k);a2.features.peakData=a2.features.waveformData=a2.features.eqData=a0>8};a3=function(){return document.body?document.body:document.documentElement?document.documentElement:document.getElementsByTagName("div")[0]};aF=function(n,k){if(!a2.o||!a2.allowPolling){return false}a2.o._setPolling(n,k)};m=function(x,y){function t(){a2._wD("-- SoundManager 2 "+a2.version+(!aM&&a2.useHTML5Audio?a2.hasHTML5?" + HTML5 audio":", no HTML5 audio support":"")+(a2.useMovieStar?", MovieStar mode":"")+(a2.useHighPerformance?", high performance mode, ":", ")+((a2.useFastPolling?"fast":"normal")+" polling")+(a2.wmode?", wmode: "+a2.wmode:"")+(a2.debugFlash?", flash debug mode":"")+(a2.useFlashBlock?", flashBlock mode":"")+" --",1)}var q=null;y=y?y:a2.url;var u=a2.altURL?a2.altURL:y,k,n,p,v;x=typeof x==="undefined"?a2.id:x;if(at&&am){return false}if(aM){az();t();a2.oMC=aT(a2.movieID);ac();am=at=true;return false}at=true;az();a2.url=aZ(this._overHTTP?y:u);y=a2.url;if(a2.useHighPerformance&&a2.useMovieStar&&a2.defaultOptions.useVideo===true){q="soundManager note: disabling highPerformance, not applicable with movieStar mode+useVideo";a2.useHighPerformance=false}a2.wmode=!a2.wmode&&a2.useHighPerformance&&!a2.useMovieStar?"transparent":a2.wmode;if(a2.wmode!==null&&!a2.isIE&&!a2.useHighPerformance&&navigator.platform.match(/win32/i)){a2.specialWmodeCase=true;a1("spcWmode");a2.wmode=null}if(a0===8){a2.allowFullScreen=false}k={name:x,id:x,src:y,width:"100%",height:"100%",quality:"high",allowScriptAccess:a2.allowScriptAccess,bgcolor:a2.bgColor,pluginspage:"http://www.macromedia.com/go/getflashplayer",type:"application/x-shockwave-flash",wmode:a2.wmode,allowfullscreen:a2.allowFullScreen?"true":"false"};
if(a2.debugFlash){k.FlashVars="debug=1"}a2.wmode||delete k.wmode;if(a2.isIE){u=document.createElement("div");p='<object id="'+x+'" data="'+y+'" type="'+k.type+'" width="'+k.width+'" height="'+k.height+'"><param name="movie" value="'+y+'" /><param name="AllowScriptAccess" value="'+a2.allowScriptAccess+'" /><param name="quality" value="'+k.quality+'" />'+(a2.wmode?'<param name="wmode" value="'+a2.wmode+'" /> ':"")+'<param name="bgcolor" value="'+a2.bgColor+'" /><param name="allowFullScreen" value="'+k.allowFullScreen+'" />'+(a2.debugFlash?'<param name="FlashVars" value="'+k.FlashVars+'" />':"")+"<!-- --></object>"}else{u=document.createElement("embed");for(n in k){k.hasOwnProperty(n)&&u.setAttribute(n,k[n])}}aH();n=ah();if(x=a3()){a2.oMC=aT(a2.movieID)?aT(a2.movieID):document.createElement("div");if(a2.oMC.id){x=a2.oMC.className;a2.oMC.className=(x?x+" ":a2.swfCSS.swfDefault)+(n?" "+n:"");a2.oMC.appendChild(u);if(a2.isIE){n=a2.oMC.appendChild(document.createElement("div"));n.className="sm2-object-box";n.innerHTML=p}am=true}else{a2.oMC.id=a2.movieID;a2.oMC.className=a2.swfCSS.swfDefault+" "+n;n=k=null;a2.useFlashBlock||(k=a2.useHighPerformance?{position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:{position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"});v=null;if(!a2.debugFlash){for(v in k){if(k.hasOwnProperty(v)){a2.oMC.style[v]=k[v]}}}try{a2.isIE||a2.oMC.appendChild(u);x.appendChild(a2.oMC);if(a2.isIE){n=a2.oMC.appendChild(document.createElement("div"));n.className="sm2-object-box";n.innerHTML=p}am=true}catch(r){throw new Error(aY("appXHTML"))}}}q&&a2._wD(q);t();a2._wD("soundManager::createMovie(): Trying to load "+y+(!this._overHTTP&&a2.altURL?" (alternate URL)":""),1)};aX=this.getSoundById;a1=function(n,k){return n?a2._wD(aY(n),k):""};if(an.indexOf("debug=alert")+1&&a2.debugMode){a2._wD=function(k){alert(k)}}aC=function(){var n=aT(a2.debugID),k=aT(a2.debugID+"-toggle");if(!n){return false}if(ay){k.innerHTML="+";n.style.display="none"}else{k.innerHTML="-";n.style.display="block"}ay=!ay};aP=function(q,k,p){if(typeof sm2Debugger!=="undefined"){try{sm2Debugger.handleEvent(q,k,p)}catch(n){}}};aR=function(r,k){var p={},n,q;for(n in r){if(r.hasOwnProperty(n)){p[n]=r[n]}}r=typeof k==="undefined"?a2.defaultOptions:k;for(q in r){if(r.hasOwnProperty(q)&&typeof p[q]==="undefined"){p[q]=r[q]}}return p};w=function(){if(aM){m();return false}if(a2.o){return false}a2.o=a2.getMovie(a2.id);if(!a2.o){if(ai){if(a2.isIE){a2.oMC.innerHTML=aL}else{a2.oMC.appendChild(ai)}ai=null;at=true}else{m(a2.id,a2.url)}a2.o=a2.getMovie(a2.id)}if(a2.o){a2._wD("soundManager::initMovie(): Got "+a2.o.nodeName+" element ("+(at?"created via JS":"static HTML")+")");a1("waitEI")}typeof a2.oninitmovie==="function"&&setTimeout(a2.oninitmovie,1)};Y=function(k){if(k){a2.url=k}w()};aJ=function(){if(j){return false}j=true;if(ao&&!i){a1("waitFocus");return false}var k;if(!aW){k=a2.getMoviePercent();a2._wD(aY("waitImpatient",k===100?" (SWF loaded)":k>0?" (SWF "+k+"% loaded)":""))}setTimeout(function(){k=a2.getMoviePercent();if(!aW){a2._wD("soundManager: No Flash response within expected time.\nLikely causes: "+(k===0?"Loading "+a2.movieURL+" may have failed (and/or Flash "+a0+"+ not present?), ":"")+"Flash blocked or JS-Flash security error."+(a2.debugFlash?" "+aY("checkSWF"):""),2);if(!this._overHTTP&&k){a1("localFail",2);a2.debugFlash||a1("tryDebug",2)}k===0&&a2._wD(aY("swf404",a2.url));aP("flashtojs",false,": Timed out"+this._overHTTP?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)")}if(!aW&&s){if(k===null){if(a2.useFlashBlock||a2.flashLoadTimeout===0){a2.useFlashBlock&&aA();a1("waitForever")}else{aj(true)}}else{a2.flashLoadTimeout===0?a1("waitForever"):aj(true)}}},a2.flashLoadTimeout)};ah=function(){var k=[];a2.debugMode&&k.push(a2.swfCSS.sm2Debug);a2.debugFlash&&k.push(a2.swfCSS.flashDebug);a2.useHighPerformance&&k.push(a2.swfCSS.highPerf);return k.join(" ")};aA=function(){var k=a2.getMoviePercent();if(a2.supported()){a2.didFlashBlock&&a2._wD("soundManager::flashBlockHandler(): Unblocked");if(a2.oMC){a2.oMC.className=ah()+" "+a2.swfCSS.swfDefault+(" "+a2.swfCSS.swfUnblocked)}}else{if(ap){a2.oMC.className=ah()+" "+a2.swfCSS.swfDefault+" "+(k===null?a2.swfCSS.swfTimedout:a2.swfCSS.swfError);a2._wD("soundManager::flashBlockHandler(): "+aY("fbTimeout")+(k?" ("+aY("fbLoaded")+")":""))}a2.didFlashBlock=true;ar(true);a2.onerror instanceof Function&&a2.onerror.apply(b)}};av=function(){if(i||!ao){return true}i=s=true;a2._wD("soundManager::handleFocus()");ao&&b.removeEventListener("mousemove",av,false);j=false;setTimeout(aJ,500);if(b.removeEventListener){b.removeEventListener("focus",av,false)}else{b.detachEvent&&b.detachEvent("onfocus",av)}};al=function(k){if(aW){return false}if(aM){a2._wD("-- SoundManager 2: loaded --");aW=true;ar();aq();return true}a2.useFlashBlock&&a2.flashLoadTimeout&&!a2.getMoviePercent()||(aW=true);a2._wD("-- SoundManager 2 "+(aO?"failed to load":"loaded")+" ("+(aO?"security/load error":"OK")+") --",1);if(aO||k){if(a2.useFlashBlock){a2.oMC.className=ah()+" "+(a2.getMoviePercent()===null?a2.swfCSS.swfTimedout:a2.swfCSS.swfError)}ar();aP("onload",false);a2.onerror instanceof Function&&a2.onerror.apply(b);return false}else{aP("onload",true)}if(a2.waitForWindowLoad&&!d){a1("waitOnload");if(b.addEventListener){b.addEventListener("load",aq,false)}else{b.attachEvent&&b.attachEvent("onload",aq)}return false}else{a2.waitForWindowLoad&&d&&a1("docLoaded");aq()}};aE=function(n,k){au.push({method:n,scope:k||null,fired:false})};ar=function(r){if(!aW&&!r){return false}r={success:r?a2.supported():!aO};var k=[],p,n,q=!a2.useFlashBlock||a2.useFlashBlock&&!a2.supported();p=0;for(n=au.length;p<n;p++){au[p].fired!==true&&k.push(au[p])}if(k.length){a2._wD("soundManager: Firing "+k.length+" onready() item"+(k.length>1?"s":""));p=0;for(n=k.length;p<n;p++){k[p].scope?k[p].method.apply(k[p].scope,[r]):k[p].method(r);if(!q){k[p].fired=true}}}};aq=function(){b.setTimeout(function(){a2.useFlashBlock&&aA();ar();a1("onload",1);a2.onload.apply(b);a1("onloadOK",1)},1)};aQ=function(){var p,k,n=!an.match(/usehtml5audio/i)&&a2.isSafari&&aw.match(/OS X 10_6_3/i)&&aw.match(/531\.22\.7/i);if(aw.match(/iphone os (1|2|3_0|3_1)/i)?true:false){a2.hasHTML5=false;aM=true;if(a2.oMC){a2.oMC.style.display="none"}return false}if(a2.useHTML5Audio){if(!a2.html5||!a2.html5.canPlayType){a2._wD("SoundManager: No HTML5 Audio() support detected.");a2.hasHTML5=false;return true}else{a2.hasHTML5=true}if(n){a2._wD("Note: Buggy HTML5 in this version of Safari, see https://bugs.webkit.org/show_bug.cgi?id=32159 - disabling HTML5",1);a2.useHTML5Audio=false;a2.hasHTML5=false;return true}}else{return true}for(k in a2.audioFormats){if(a2.audioFormats.hasOwnProperty(k)){if(a2.audioFormats[k].required&&!a2.html5.canPlayType(a2.audioFormats[k].type)){p=true}}}if(a2.ignoreFlash){p=false}aM=a2.useHTML5Audio&&a2.hasHTML5&&!p;return p};ac=function(){function q(){if(b.removeEventListener){b.removeEventListener("load",a2.beginDelayedInit,false)}else{b.detachEvent&&b.detachEvent("onload",a2.beginDelayedInit)}}var k,p=[];a1("init");if(aW){a1("didInit");return false}if(a2.hasHTML5){for(k in a2.audioFormats){a2.audioFormats.hasOwnProperty(k)&&p.push(k+": "+a2.html5[k])}a2._wD("-- SoundManager 2: HTML5 support tests ("+a2.html5Test+"): "+p.join(", ")+" --",1)}if(aM){if(!aW){q();a2.enabled=true;al()}return true}w();try{a1("flashJS");a2.o._externalInterfaceTest(false);a2.allowPolling?aF(true,a2.useFastPolling?true:false):a1("noPolling",1);a2.debugMode||a2.o._disableDebug();a2.enabled=true;aP("jstoflash",true)}catch(n){a2._wD("js/flash exception: "+n.toString());aP("jstoflash",false);aj(true);al();return false}al();q()};aV=function(){if(aN){return false}m();w();return aN=true};ak=function(){if(e){return false}e=true;aH();aD();a2.html5.usingFlash=aQ();ap=a2.html5.usingFlash;e=true;Y()};aG=function(k){if(!k._hasTimer){k._hasTimer=true}};ag=function(k){if(k._hasTimer){k._hasTimer=false}};this._setSandboxType=function(n){var k=a2.sandbox;k.type=n;k.description=k.types[typeof k.types[n]!=="undefined"?n:"unknown"];a2._wD("Flash security sandbox type: "+k.type);if(k.type==="localWithFile"){k.noRemote=true;k.noLocal=false;a1("secNote",2)}else{if(k.type==="localWithNetwork"){k.noRemote=false;k.noLocal=true}else{if(k.type==="localTrusted"){k.noRemote=false;k.noLocal=false}}}};this._externalInterfaceOK=function(n){if(a2.swfLoaded){return false}var k=(new Date).getTime();a2._wD("soundManager::externalInterfaceOK()"+(n?" (~"+(k-n)+" ms)":""));aP("swf",true);aP("flashtojs",true);a2.swfLoaded=true;ao=false;a2.isIE?setTimeout(ac,100):ac()};this._onfullscreenchange=function(n){a2._wD("onfullscreenchange(): "+n);a2.isFullScreen=n===1?true:false;if(!a2.isFullScreen){try{b.focus();a2._wD("window.focus()")}catch(k){}}};aI=function(v){var p=this,t,r,u,k,n,q;this.sID=v.id;this.url=v.url;this._iO=this.instanceOptions=this.options=aR(v);this.pan=this.options.pan;this.volume=this.options.volume;this._lastURL=null;this.isHTML5=false;this.id3={};this._debug=function(){if(a2.debugMode){var A=null,y=[],z,x;for(A in p.options){if(p.options[A]!==null){if(p.options[A] instanceof Function){z=p.options[A].toString();z=z.replace(/\s\s+/g," ");x=z.indexOf("{");y.push(" "+A+": {"+z.substr(x+1,Math.min(Math.max(z.indexOf("\n")-1,64),64)).replace(/\n/g,"")+"... }")}else{y.push(" "+A+": "+p.options[A])}}}a2._wD("SMSound() merged options: {\n"+y.join(", \n")+"\n}")}};this._debug();this.load=function(y){if(typeof y!=="undefined"){p._iO=aR(y);p.instanceOptions=p._iO}else{y=p.options;p._iO=y;p.instanceOptions=p._iO;if(p._lastURL&&p._lastURL!==p.url){a1("manURL");p._iO.url=p.url;p.url=null}}if(typeof p._iO.url==="undefined"){p._iO.url=p.url}a2._wD("soundManager.load(): "+p._iO.url,1);if(p._iO.url===p.url&&p.readyState!==0&&p.readyState!==2){a1("onURL",1);return p}p.url=p._iO.url;p._lastURL=p._iO.url;p.loaded=false;p.readyState=1;p.playState=0;if(h(p._iO)){a2._wD("HTML 5 load: "+p._iO.url);p._setup_html5(p._iO);
p._iO.autoPlay&&p.play()}else{try{p.isHTML5=false;p._iO=l(p._iO);if(a0===8){a2.o._load(p.sID,p._iO.url,p._iO.stream,p._iO.autoPlay,p._iO.whileloading?1:0,p._iO.loops||1)}else{a2.o._load(p.sID,p._iO.url,p._iO.stream?true:false,p._iO.autoPlay?true:false,p._iO.loops||1);p._iO.isMovieStar&&p._iO.autoLoad&&!p._iO.autoPlay&&p.pause()}}catch(x){a1("smError",2);aP("onload",false);a2.onerror();a2.disable()}}return p};this.unload=function(){if(p.readyState!==0){a2._wD('SMSound.unload(): "'+p.sID+'"');p.readyState!==2&&p.setPosition(0,true);if(p.isHTML5){u();if(q){q.pause();q.src=a2.nullURL;q.load();q=p._audio=null}}else{if(a0===8){a2.o._unload(p.sID,a2.nullURL)}else{p.setAutoPlay(false);a2.o._unload(p.sID)}}t()}return p};this.destruct=function(){a2._wD('SMSound.destruct(): "'+p.sID+'"');if(p.isHTML5){u();if(q){q.pause();q.src="about:blank";q.load();q=p._audio=null}}else{p._iO.onfailure=null;a2.o._destroySound(p.sID)}a2.destroySound(p.sID,true)};this.start=this.play=function(x){x||(x={});p._iO=aR(x,p._iO);p._iO=aR(p._iO,p.options);p.instanceOptions=p._iO;if(p._iO.serverURL){if(!p.connected){a2._wD("SMSound.play():  Netstream not connected yet - setting autoPlay");p.setAutoPlay(true);return p}}if(h(p._iO)){p._setup_html5(p._iO);k()}if(p.playState===1){if(x=p._iO.multiShot){a2._wD('SMSound.play(): "'+p.sID+'" already playing (multi-shot)',1);p.isHTML5&&p.setPosition(p._iO.position)}else{a2._wD('SMSound.play(): "'+p.sID+'" already playing (one-shot)',1);return p}}if(p.loaded){a2._wD('SMSound.play(): "'+p.sID+'"')}else{if(p.readyState===0){a2._wD('SMSound.play(): Attempting to load "'+p.sID+'"',1);if(p.isHTML5){p.readyState=1}else{if(!p._iO.serverURL){p._iO.autoPlay=true;p.load(p._iO)}}}else{if(p.readyState===2){a2._wD('SMSound.play(): Could not load "'+p.sID+'" - exiting',2);return p}else{a2._wD('SMSound.play(): "'+p.sID+'" is loading - attempting to play..',1)}}}if(p.paused){a2._wD('SMSound.play(): "'+p.sID+'" is resuming from paused state',1);p.resume()}else{a2._wD('SMSound.play(): "'+p.sID+'" is starting to play');p.playState=1;if(!p.instanceCount||a0>8&&!p.isHTML5){p.instanceCount++}p.position=typeof p._iO.position!=="undefined"&&!isNaN(p._iO.position)?p._iO.position:0;p._iO=l(p._iO);p._iO.onplay&&p._iO.onplay.apply(p);p.setVolume(p._iO.volume,true);p.setPan(p._iO.pan,true);if(p.isHTML5){k();p._setup_html5().play()}else{a0===9&&p._iO.serverURL&&p.setAutoPlay(true);a2.o._start(p.sID,p._iO.loops||1,a0===9?p.position:p.position/1000)}}return p};this.stop=function(x){if(p.playState===1){p._onbufferchange(0);p.resetOnPosition(0);if(!p.isHTML5){p.playState=0}p.paused=false;p._iO.onstop&&p._iO.onstop.apply(p);if(p.isHTML5){if(q){p.setPosition(0);q.pause();p.playState=0;p._onTimer();u();p.unload()}}else{a2.o._stop(p.sID,x);p._iO.serverURL&&p.unload()}p.instanceCount=0;p._iO={}}return p};this.setAutoPlay=function(x){a2._wD("setAutoPlay("+x+")");p._iO.autoPlay=x;a2.o._setAutoPlay(p.sID,x);if(x){p.instanceCount||p.instanceCount++}};this.setPosition=function(y){if(typeof y==="undefined"){y=0}y=p.isHTML5?Math.max(y,0):Math.min(p.duration,Math.max(y,0));p._iO.position=y;p.resetOnPosition(p._iO.position);if(p.isHTML5){if(q){a2._wD("setPosition(): setting position to "+p._iO.position/1000);if(p.playState){try{q.currentTime=p._iO.position/1000}catch(x){a2._wD("setPosition("+p._iO.position+"): WARN: Caught exception: "+x.message,2)}}else{a2._wD("HTML 5 warning: cannot set position while playState == 0 (not playing)",2)}if(p.paused){p._onTimer(true);p._iO.useMovieStar&&p.resume()}}}else{a2.o._setPosition(p.sID,a0===9?p._iO.position:p._iO.position/1000,p.paused||!p.playState)}return p};this.pause=function(x){if(p.paused||p.playState===0&&p.readyState!==1){return p}a2._wD("SMSound.pause()");p.paused=true;if(p.isHTML5){p._setup_html5().pause();u()}else{if(x||x===undefined){a2.o._pause(p.sID)}}p._iO.onpause&&p._iO.onpause.apply(p);return p};this.resume=function(){if(!p.paused||p.playState===0){return p}a2._wD("SMSound.resume()");p.paused=false;p.playState=1;if(p.isHTML5){p._setup_html5().play();k()}else{a2.o._pause(p.sID)}p._iO.onresume&&p._iO.onresume.apply(p);return p};this.togglePause=function(){a2._wD("SMSound.togglePause()");if(p.playState===0){p.play({position:a0===9&&!p.isHTML5?p.position:p.position/1000});return p}p.paused?p.resume():p.pause();return p};this.setPan=function(y,x){if(typeof y==="undefined"){y=0}if(typeof x==="undefined"){x=false}p.isHTML5||a2.o._setPan(p.sID,y);p._iO.pan=y;if(!x){p.pan=y}return p};this.setVolume=function(y,x){if(typeof y==="undefined"){y=100}if(typeof x==="undefined"){x=false}if(p.isHTML5){if(q){q.volume=y/100}}else{a2.o._setVolume(p.sID,a2.muted&&!p.muted||p.muted?0:y)}p._iO.volume=y;if(!x){p.volume=y}return p};this.mute=function(){p.muted=true;if(p.isHTML5){if(q){q.muted=true}}else{a2.o._setVolume(p.sID,0)}return p};this.unmute=function(){p.muted=false;var x=typeof p._iO.volume!=="undefined";if(p.isHTML5){if(q){q.muted=false}}else{a2.o._setVolume(p.sID,x?p._iO.volume:p.options.volume)}return p};this.toggleMute=function(){return p.muted?p.unmute():p.mute()};this.onposition=function(z,x,y){p._onPositionItems.push({position:z,method:x,scope:typeof y!=="undefined"?y:p,fired:false});return p};this.processOnPosition=function(){var y,x;y=p._onPositionItems.length;if(!y||!p.playState||p._onPositionFired>=y){return false}for(y=y;y--;){x=p._onPositionItems[y];if(!x.fired&&p.position>=x.position){x.method.apply(x.scope,[x.position]);x.fired=true;a2._onPositionFired++}}};this.resetOnPosition=function(z){var x,y;x=p._onPositionItems.length;if(!x){return false}for(x=x;x--;){y=p._onPositionItems[x];if(y.fired&&z<=y.position){y.fired=false;a2._onPositionFired--}}};this._onTimer=function(x){if(p._hasTimer||x){if(q&&(x||(p.playState>0||p.readyState===1)&&!p.paused)){p.duration=n();p.durationEstimate=p.duration;x=q.currentTime?q.currentTime*1000:0;p._whileplaying(x,{},{},{},{});return true}else{a2._wD('_onTimer: Warn for "'+p.sID+'": '+(!q?"Could not find element. ":"")+(p.playState===0?"playState bad, 0?":"playState = "+p.playState+", OK"));return false}}};n=function(){var x=q?q.duration*1000:undefined;if(x){return !isNaN(x)?x:null}};k=function(){p.isHTML5&&aG(p)};u=function(){p.isHTML5&&ag(p)};t=function(){p._onPositionItems=[];p._onPositionFired=0;p._hasTimer=null;p._added_events=null;q=p._audio=null;p.bytesLoaded=null;p.bytesTotal=null;p.position=null;p.duration=null;p.durationEstimate=null;p.failures=0;p.loaded=false;p.playState=0;p.paused=false;p.readyState=0;p.muted=false;p.didBeforeFinish=false;p.didJustBeforeFinish=false;p.isBuffering=false;p.instanceOptions={};p.instanceCount=0;p.peakData={left:0,right:0};p.waveformData={left:[],right:[]};p.eqData=[];p.eqData.left=[];p.eqData.right=[]};t();this._setup_html5=function(x){x=aR(p._iO,x);if(q){if(p.url!==x.url){a2._wD("setting new URL on existing object: "+x.url);q.src=x.url}}else{a2._wD("creating HTML 5 audio element with URL: "+x.url);p._audio=new Audio(x.url);q=p._audio;p.isHTML5=true;r()}q.loop=x.loops>1?"loop":"";return p._audio};r=function(){function x(z,A,y){return q?q.addEventListener(z,A,y||false):null}if(p._added_events){return false}p._added_events=true;x("load",function(){a2._wD("HTML5::load: "+p.sID);if(q){p._onbufferchange(0);p._whileloading(p.bytesTotal,p.bytesTotal,n());p._onload(1)}},false);x("canplay",function(){a2._wD("HTML5::canplay: "+p.sID);p._onbufferchange(0)},false);x("waiting",function(){a2._wD("HTML5::waiting: "+p.sID);p._onbufferchange(1)},false);x("progress",function(y){a2._wD("HTML5::progress: "+p.sID+": loaded/total: "+(y.loaded||0)+","+(y.total||1));if(!p.loaded&&q){p._onbufferchange(0);p._whileloading(y.loaded||0,y.total||1,n())}},false);x("end",function(){a2._wD("HTML5::end: "+p.sID);p._onfinish()},false);x("error",function(){if(q){a2._wD("HTML5::error: "+q.error.code);p._onload(0)}},false);x("loadstart",function(){a2._wD("HTML5::loadstart: "+p.sID);p._onbufferchange(1)},false);x("play",function(){a2._wD("HTML5::play: "+p.sID);p._onbufferchange(0)},false);x("playing",function(){a2._wD("HTML5::playing: "+p.sID);p._onbufferchange(0)},false);x("timeupdate",function(){p._onTimer()},false);setTimeout(function(){p&&q&&x("ended",function(){a2._wD("HTML5::ended: "+p.sID);p._onfinish()},false)},250)};this._whileloading=function(A,y,z,x){p.bytesLoaded=A;p.bytesTotal=y;p.duration=Math.floor(z);if(p._iO.isMovieStar){p.durationEstimate=p.duration;p.readyState!==3&&p._iO.whileloading&&p._iO.whileloading.apply(p)}else{p.durationEstimate=parseInt(p.bytesTotal/p.bytesLoaded*p.duration,10);if(p.durationEstimate===undefined){p.durationEstimate=p.duration}p.bufferLength=x;if((p._iO.isMovieStar||p.readyState!==3)&&p._iO.whileloading){p._iO.whileloading.apply(p)}}};this._onid3=function(B,z){a2._wD('SMSound._onid3(): "'+this.sID+'" ID3 data received.');var A=[],y,x;y=0;for(x=B.length;y<x;y++){A[B[y]]=z[y]}p.id3=aR(p.id3,A);p._iO.onid3&&p._iO.onid3.apply(p)};this._whileplaying=function(B,z,A,y,x){if(isNaN(B)||B===null){return false}if(p.playState===0&&B>0){B=0}p.position=B;p.processOnPosition();if(a0>8&&!p.isHTML5){if(p._iO.usePeakData&&typeof z!=="undefined"&&z){p.peakData={left:z.leftPeak,right:z.rightPeak}}if(p._iO.useWaveformData&&typeof A!=="undefined"&&A){p.waveformData={left:A.split(","),right:y.split(",")}}if(p._iO.useEQData){if(typeof x!=="undefined"&&x&&x.leftEQ){B=x.leftEQ.split(",");p.eqData=B;p.eqData.left=B;if(typeof x.rightEQ!=="undefined"&&x.rightEQ){p.eqData.right=x.rightEQ.split(",")}}}}if(p.playState===1){!p.isHTML5&&p.isBuffering&&p._onbufferchange(0);p._iO.whileplaying&&p._iO.whileplaying.apply(p);if((p.loaded||!p.loaded&&p._iO.isMovieStar)&&p._iO.onbeforefinish&&p._iO.onbeforefinishtime&&!p.didBeforeFinish&&p.duration-p.position<=p._iO.onbeforefinishtime){a2._wD("duration-position &lt;= onbeforefinishtime: "+p.duration+" - "+p.position+" &lt= "+p._iO.onbeforefinishtime+" ("+(p.duration-p.position)+")");p._onbeforefinish()}}};this._onconnect=function(x){x=x===1;a2._wD('SMSound._onconnect(): "'+p.sID+'"'+(x?" connected.":" failed to connect? - "+p.url),x?1:2);
if(p.connected=x){p.failures=0;if(p._iO.autoLoad||p._iO.autoPlay){p.load(p._iO)}p._iO.autoPlay&&p.play();p._iO.onconnect&&p._iO.onconnect.apply(p,[x])}};this._onload=function(x){x=x===1?true:false;a2._wD('SMSound._onload(): "'+p.sID+'"'+(x?" loaded.":" failed to load? - "+p.url),x?1:2);if(!x&&!p.isHTML5){a2.sandbox.noRemote===true&&a2._wD("SMSound._onload(): "+aY("noNet"),1);a2.sandbox.noLocal===true&&a2._wD("SMSound._onload(): "+aY("noLocal"),1)}p.loaded=x;p.readyState=x?3:2;p._iO.onload&&p._iO.onload.apply(p)};this._onfailure=function(x){p.failures++;a2._wD('SMSound._onfailure(): "'+p.sID+'" count '+p.failures);p._iO.onfailure&&p.failures===1?p._iO.onfailure(p,x):a2._wD("SMSound._onfailure(): ignoring")};this._onbeforefinish=function(){if(!p.didBeforeFinish){p.didBeforeFinish=true;if(p._iO.onbeforefinish){a2._wD('SMSound._onbeforefinish(): "'+p.sID+'"');p._iO.onbeforefinish.apply(p)}}};this._onjustbeforefinish=function(){if(!p.didJustBeforeFinish){p.didJustBeforeFinish=true;if(p._iO.onjustbeforefinish){a2._wD('SMSound._onjustbeforefinish(): "'+p.sID+'"');p._iO.onjustbeforefinish.apply(p)}}};this._onfinish=function(){p._onbufferchange(0);p.resetOnPosition(0);p._iO.onbeforefinishcomplete&&p._iO.onbeforefinishcomplete.apply(p);p.didBeforeFinish=false;p.didJustBeforeFinish=false;if(p.instanceCount){p.instanceCount--;if(!p.instanceCount){p.playState=0;p.paused=false;p.instanceCount=0;p.instanceOptions={};u()}if(!p.instanceCount||p._iO.multiShotEvents){if(p._iO.onfinish){a2._wD('SMSound._onfinish(): "'+p.sID+'"');p._iO.onfinish.apply(p)}}p.isHTML5&&p.unload()}};this._onmetadata=function(x){a2._wD("SMSound.onmetadata()");if(!x.width&&!x.height){a1("noWH");x.width=320;x.height=240}p.metadata=x;p.width=x.width;p.height=x.height;if(p._iO.onmetadata){a2._wD('SMSound.onmetadata(): "'+p.sID+'"');p._iO.onmetadata.apply(p)}a2._wD("SMSound.onmetadata() complete")};this._onbufferchange=function(x){if(p.playState===0){return false}if(x&&p.isBuffering||!x&&!p.isBuffering){return false}p.isBuffering=x===1?true:false;if(p._iO.onbufferchange){a2._wD("SMSound._onbufferchange(): "+x);p._iO.onbufferchange.apply(p)}};this._ondataerror=function(x){if(p.playState>0){a2._wD("SMSound._ondataerror(): "+x);p._iO.ondataerror&&p._iO.ondataerror.apply(p)}}};if(!a2.hasHTML5||ap){if(b.addEventListener){b.addEventListener("focus",av,false);b.addEventListener("load",a2.beginDelayedInit,false);b.addEventListener("unload",a2.destruct,false);ao&&b.addEventListener("mousemove",av,false)}else{if(b.attachEvent){b.attachEvent("onfocus",av);b.attachEvent("onload",a2.beginDelayedInit);b.attachEvent("unload",a2.destruct)}else{aP("onload",false);c.onerror();c.disable()}}}aB=function(){if(document.readyState==="complete"){ak();document.detachEvent("onreadystatechange",aB)}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",ak,false)}else{document.attachEvent&&document.attachEvent("onreadystatechange",aB)}document.readyState==="complete"&&setTimeout(ak,100)}var c=null;if(typeof SM2_DEFER==="undefined"||!SM2_DEFER){c=new a}b.SoundManager=a;b.soundManager=c})(window);
