diff options
| author | Jules Laplace <carbon@melanarchy.org> | 2013-08-02 17:19:21 -0500 |
|---|---|---|
| committer | Jules Laplace <carbon@melanarchy.org> | 2013-08-02 17:19:21 -0500 |
| commit | 753f60c7d4769fa72d3b910e491f37db6f130898 (patch) | |
| tree | ea7b7a2cc8775e2d9b8e3375f0da5188ca0298f4 /docs/dymaxion/soundmanagerv297a-20101010/script/soundmanager2-jsmin.js | |
| parent | d5e6bf6609012e61f82d812d44bc1ff8104c97fb (diff) | |
dymaxion
Diffstat (limited to 'docs/dymaxion/soundmanagerv297a-20101010/script/soundmanager2-jsmin.js')
| -rwxr-xr-x | docs/dymaxion/soundmanagerv297a-20101010/script/soundmanager2-jsmin.js | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/script/soundmanager2-jsmin.js b/docs/dymaxion/soundmanagerv297a-20101010/script/soundmanager2-jsmin.js new file mode 100755 index 0000000..91c77ed --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/script/soundmanager2-jsmin.js @@ -0,0 +1,96 @@ +/** @license + + SoundManager 2: Javascript Sound for the Web + -------------------------------------------- + http://schillmania.com/projects/soundmanager2/ + + Copyright (c) 2007, Scott Schiller. All rights reserved. + Code provided under the BSD License: + http://schillmania.com/projects/soundmanager2/license.txt + + V2.97a.20101010 +*/ +(function(W){function va(Ma,Na){function wa(){if(b.debugURLParam.test(G))b.debugMode=true;if(u(b.debugID))return false;var c,a,f,g;if(b.debugMode&&!u(b.debugID)&&(!fa||!b.useConsole||b.useConsole&&fa&&!b.consoleOnly)){c=l.createElement("div");c.id=b.debugID+"-toggle";a={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(l.createTextNode("-")); +c.onclick=xa;c.title="Toggle SM2 debug console";if(v.match(/msie 6/i)){c.style.position="absolute";c.style.cursor="hand"}for(g in a)if(a.hasOwnProperty(g))c.style[g]=a[g];a=l.createElement("div");a.id=b.debugID;a.style.display=b.debugMode?"block":"none";if(b.debugMode&&!u(c.id)){try{f=X();f.appendChild(c)}catch(e){throw Error(q("appXHTML"));}f.appendChild(a)}}}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=1E3;this.wmode=null;this.allowScriptAccess="always";this.useHTML5Audio=this.useFlashBlock=false;this.html5Test=/^probably$/i;this.ondebuglog=false;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,onfailure:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5E3,onbeforefinishcomplete:null, +onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:true,multiShotEvents:false,position:null,pan:0,type:null,usePolicyFile:false,volume:100};this.flash9Options={isMovieStar:null,usePeakData:false,useWaveformData:false,useEQData:false,onbufferchange:null,ondataerror:null,onstats:null};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,bufferTimes:null,duration:null};this.version=null;this.versionNumber="V2.97a.20101010";this.movieURL=null;this.url=Ma||null;this.altURL=null; +this.enabled=this.swfLoaded=false;this.o=null;this.movieID="sm2-container";this.id=Na||"sm2movie";this.swfCSS={swfBox:"sm2-object-box",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.muted=false;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=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 ga,b=this,u,v=navigator.userAgent,G=W.location.href.toString(),p=this.flashVersion,l=document,o=W,ya,Y,H=[],ha=true,x,I= +false,P=false,s=false,z=false,ia=false,n,Oa=0,Q,w,za,J,K,ja,Z,Aa,ka,F,Ba,$,R,L,la,X,aa,ma,na,Ca,Pa=["log","info","warn","error"],Da,S,Ea,T=null,oa=null,q,pa,M,xa,ba,ca,qa,r,da=false,ra=false,Fa,Ga,N=null,Ha,ea,C=false,U,D,sa,Ia,E,A,ta=Array.prototype.slice,Ja=v.match(/pre\//i),Qa=v.match(/(ipad|iphone)/i);v.match(/mobile/i);var B=v.match(/MSIE/i),V=v.match(/safari/i)&&!v.match(/chrome/i),fa=typeof console!=="undefined"&&typeof console.log!=="undefined",ua=typeof l.hasFocus!=="undefined"?l.hasFocus(): +null,O=typeof l.hasFocus==="undefined"&&V,Ka=!O;this._use_maybe=G.match(/sm2\-useHTML5Maybe\=1/i);this._overHTTP=l.location?l.location.protocol.match(/http/i):null;this.useAltURL=!this._overHTTP;if(Qa||Ja){b.useHTML5Audio=true;b.ignoreFlash=true}if(Ja||this._use_maybe)b.html5Test=/^(probably|maybe)$/i;(function(){var c=G,a=null;if(c.indexOf("#sm2-usehtml5audio=")!==-1){a=c.substr(c.indexOf("#sm2-usehtml5audio=")+19)==="1";if(typeof console!=="undefined"&&typeof console.log!=="undefined")console.log((a? +"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter");b.useHTML5Audio=a}})();this.supported=function(){return N?s&&!z:b.useHTML5Audio&&b.hasHTML5};this.getMovie=function(c){return B?o[c]:V?u(c)||l[c]:u(c)};this.loadFromXML=function(c){try{b.o._loadFromXML(c)}catch(a){S()}return true};this.createSound=function(c){function a(){f=ba(f);b.sounds[e.id]=new ga(e);b.soundIDs.push(e.id);return b.sounds[e.id]}var f=null,g=null,e=null;if(!s||!b.supported()){qa("soundManager.createSound(): "+q(!s?"notReady": +"notOK"));return false}if(arguments.length===2)c={id:arguments[0],url:arguments[1]};e=f=w(c);e.id.toString().charAt(0).match(/^[0-9]$/)&&b._wD("soundManager.createSound(): "+q("badID",e.id),2);b._wD("soundManager.createSound(): "+e.id+" ("+e.url+")",1);if(r(e.id,true)){b._wD("soundManager.createSound(): "+e.id+" exists",1);return b.sounds[e.id]}if(ea(e)){g=a();b._wD("Loading sound "+e.id+" from HTML5");g._setup_html5(e)}else{if(p>8&&b.useMovieStar){if(e.isMovieStar===null)e.isMovieStar=e.serverURL|| +(e.type?e.type.match(b.netStreamPattern):false)||e.url.match(b.netStreamPattern)?true:false;e.isMovieStar&&b._wD("soundManager.createSound(): using MovieStar handling");if(e.isMovieStar){if(e.usePeakData){n("noPeak");e.usePeakData=false}e.loops>1&&n("noNSLoop")}}e=ca(e,"soundManager.createSound(): ");g=a();if(p===8)b.o._createSound(e.id,e.onjustbeforefinishtime,e.loops||1,e.usePolicyFile);else{b.o._createSound(e.id,e.url,e.onjustbeforefinishtime,e.usePeakData,e.useWaveformData,e.useEQData,e.isMovieStar, +e.isMovieStar?e.bufferTime:false,e.loops||1,e.serverURL,e.duration||null,e.autoPlay,true,e.bufferTimes,e.onstats?true:false,e.autoLoad,e.usePolicyFile);if(!e.serverURL){g.connected=true;e.onconnect&&e.onconnect.apply(g)}}}if(e.autoLoad||e.autoPlay)if(g)if(b.isHTML5){g.autobuffer="auto";g.preload="auto"}else g.load(e);e.autoPlay&&g.play();return g};this.destroySound=function(c,a){if(!r(c))return false;var f=b.sounds[c],g;f._iO={};f.stop();f.unload();for(g=0;g<b.soundIDs.length;g++)if(b.soundIDs[g]=== +c){b.soundIDs.splice(g,1);break}a||f.destruct(true);delete b.sounds[c];return true};this.load=function(c,a){if(!r(c))return false;return b.sounds[c].load(a)};this.unload=function(c){if(!r(c))return false;return b.sounds[c].unload()};this.start=this.play=function(c,a){if(!s||!b.supported()){qa("soundManager.play(): "+q(!s?"notReady":"notOK"));return false}if(!r(c)){a instanceof Object||(a={url:a});if(a&&a.url){b._wD('soundManager.play(): attempting to create "'+c+'"',1);a.id=c;return b.createSound(a).play()}else return false}return b.sounds[c].play(a)}; +this.setPosition=function(c,a){if(!r(c))return false;return b.sounds[c].setPosition(a)};this.stop=function(c){if(!r(c))return false;b._wD("soundManager.stop("+c+")",1);return b.sounds[c].stop()};this.stopAll=function(){b._wD("soundManager.stopAll()",1);for(var c in b.sounds)b.sounds[c]instanceof ga&&b.sounds[c].stop()};this.pause=function(c){if(!r(c))return false;return b.sounds[c].pause()};this.pauseAll=function(){for(var c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].pause()};this.resume=function(c){if(!r(c))return false; +return b.sounds[c].resume()};this.resumeAll=function(){for(var c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].resume()};this.togglePause=function(c){if(!r(c))return false;return b.sounds[c].togglePause()};this.setPan=function(c,a){if(!r(c))return false;return b.sounds[c].setPan(a)};this.setVolume=function(c,a){if(!r(c))return false;return b.sounds[c].setVolume(a)};this.mute=function(c){var a=0;if(typeof c!=="string")c=null;if(c){if(!r(c))return false;b._wD('soundManager.mute(): Muting "'+c+'"'); +return b.sounds[c].mute()}else{b._wD("soundManager.mute(): Muting all sounds");for(a=b.soundIDs.length;a--;)b.sounds[b.soundIDs[a]].mute();b.muted=true}return true};this.muteAll=function(){b.mute()};this.unmute=function(c){if(typeof c!=="string")c=null;if(c){if(!r(c))return false;b._wD('soundManager.unmute(): Unmuting "'+c+'"');return b.sounds[c].unmute()}else{b._wD("soundManager.unmute(): Unmuting all sounds");for(c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].unmute();b.muted=false}return true}; +this.unmuteAll=function(){b.unmute()};this.toggleMute=function(c){if(!r(c))return false;return b.sounds[c].toggleMute()};this.getMemoryUse=function(){if(p===8)return 0;if(b.o)return parseInt(b.o._getMemoryUse(),10)};this.disable=function(c){if(typeof c==="undefined")c=false;if(z)return false;z=true;n("shutdown",1);for(var a=b.soundIDs.length;a--;)Da(b.sounds[b.soundIDs[a]]);Q(c);A(o,"load",K);return true};this.canPlayMIME=function(c){var a;if(b.hasHTML5)a=U({type:c});return!N||a?a:c?c.match(b.mimePattern)? +true:false:null};this.canPlayURL=function(c){var a;if(b.hasHTML5)a=U(c);return!N||a?a:c?c.match(b.filePattern)?true:false:null};this.canPlayLink=function(c){if(typeof c.type!=="undefined"&&c.type)if(b.canPlayMIME(c.type))return true;return b.canPlayURL(c.href)};this.getSoundById=function(c,a){if(!c)throw Error("SoundManager.getSoundById(): sID is null/undefined");var f=b.sounds[c];!f&&!a&&b._wD('"'+c+'" is an invalid sound ID.',2);return f};this.onready=function(c,a){if(c&&c instanceof Function){s&& +n("queue");a||(a=o);za(c,a);J();return true}else throw q("needFunction");};this.getMoviePercent=function(){return b.o&&typeof b.o.PercentLoaded!=="undefined"?b.o.PercentLoaded():null};this._wD=this._writeDebug=function(c,a,f){b.ondebuglog&&b.ondebuglog(c,a,f);var g,e;if(!b.debugMode)return false;if(typeof f!=="undefined"&&f)c=c+" | "+(new Date).getTime();if(fa&&b.useConsole){f=Pa[a];typeof console[f]!=="undefined"?console[f](c):console.log(c);if(b.useConsoleOnly)return true}try{g=u("soundmanager-debug"); +if(!g)return false;e=l.createElement("div");if(++Oa%2===0)e.className="sm2-alt";a=typeof a==="undefined"?0:parseInt(a,10);e.appendChild(l.createTextNode(c));if(a){if(a>=2)e.style.fontWeight="bold";if(a===3)e.style.color="#ff3333"}g.insertBefore(e,g.firstChild)}catch(k){}return true};this._debug=function(){n("currentObj",1);for(var c=0,a=b.soundIDs.length;c<a;c++)b.sounds[b.soundIDs[c]]._debug()};this.reboot=function(){b._wD("soundManager.reboot()");b.soundIDs.length&&b._wD("Destroying "+b.soundIDs.length+ +" SMSound objects...");for(var c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].destruct();try{if(B)oa=b.o.innerHTML;T=b.o.parentNode.removeChild(b.o);b._wD("Flash movie removed.")}catch(a){n("badRemove",2)}oa=T=null;b.enabled=s=da=ra=I=P=z=b.swfLoaded=false;b.soundIDs=b.sounds=[];b.o=null;for(c=H.length;c--;)H[c].fired=false;b._wD("soundManager: Rebooting...");o.setTimeout(function(){b.beginDelayedInit()},20)};this.destruct=function(){b._wD("soundManager.destruct()");b.disable(true)};this.beginDelayedInit= +function(){ia=true;L();setTimeout(Ba,20);Z()};ga=function(c){var a=this,f,g,e,k,m,i;this.sID=c.id;this.url=c.url;this._iO=this.instanceOptions=this.options=w(c);this.pan=this.options.pan;this.volume=this.options.volume;this._lastURL=null;this.isHTML5=false;this.id3={};this._debug=function(){if(b.debugMode){var d=null,h=[],j,t;for(d in a.options)if(a.options[d]!==null)if(a.options[d]instanceof Function){j=a.options[d].toString();j=j.replace(/\s\s+/g," ");t=j.indexOf("{");h.push(" "+d+": {"+j.substr(t+ +1,Math.min(Math.max(j.indexOf("\n")-1,64),64)).replace(/\n/g,"")+"... }")}else h.push(" "+d+": "+a.options[d]);b._wD("SMSound() merged options: {\n"+h.join(", \n")+"\n}")}};this._debug();this.load=function(d){var h=null;if(typeof d!=="undefined"){a._iO=w(d);a.instanceOptions=a._iO}else{d=a.options;a._iO=d;a.instanceOptions=a._iO;if(a._lastURL&&a._lastURL!==a.url){n("manURL");a._iO.url=a.url;a.url=null}}b._wD("soundManager.load(): "+a._iO.url,1);if(a._iO.url===a.url&&a.readyState!==0&&a.readyState!== +2){n("onURL",1);return a}a._lastURL=a.url;a.loaded=false;a.readyState=1;a.playState=0;if(ea(a._iO)){b._wD("HTML 5 load: "+a._iO.url);h=a._setup_html5(a._iO);h.load();a._iO.autoPlay&&a.play()}else try{a.isHTML5=false;a._iO=ca(ba(a._iO));p===8?b.o._load(a.sID,a._iO.url,a._iO.stream,a._iO.autoPlay,a._iO.whileloading?1:0,a._iO.loops||1,a._iO.usePolicyFile):b.o._load(a.sID,a._iO.url,a._iO.stream?true:false,a._iO.autoPlay?true:false,a._iO.loops||1,a._iO.autoLoad?true:false,a._iO.usePolicyFile)}catch(j){n("smError", +2);x("onload",false);ma()}return a};this.unload=function(){if(a.readyState!==0){b._wD('SMSound.unload(): "'+a.sID+'"');if(a.isHTML5){e();if(i){i.pause();i.src=b.nullURL;i.load();i=a._audio=null}}else p===8?b.o._unload(a.sID,b.nullURL):b.o._unload(a.sID);f()}return a};this.destruct=function(d){b._wD('SMSound.destruct(): "'+a.sID+'"');if(a.isHTML5){e();if(i){i.pause();i.src="about:blank";i.load();i=a._audio=null}}else{a._iO.onfailure=null;b.o._destroySound(a.sID)}d||b.destroySound(a.sID,true)};this.start= +this.play=function(d,h){var j;h=typeof h==="undefined"?true:h;d||(d={});a._iO=w(d,a._iO);a._iO=w(a._iO,a.options);a.instanceOptions=a._iO;if(a._iO.serverURL)if(!a.connected){if(!a.getAutoPlay()){b._wD("SMSound.play(): Netstream not connected yet - setting autoPlay");a.setAutoPlay(true)}return a}if(ea(a._iO)){a._setup_html5(a._iO);k()}if(a.playState===1&&!a.paused)if(j=a._iO.multiShot){b._wD('SMSound.play(): "'+a.sID+'" already playing (multi-shot)',1);a.isHTML5&&a.setPosition(a._iO.position)}else{b._wD('SMSound.play(): "'+ +a.sID+'" already playing (one-shot)',1);return a}if(a.loaded)b._wD('SMSound.play(): "'+a.sID+'"');else if(a.readyState===0){b._wD('SMSound.play(): Attempting to load "'+a.sID+'"',1);if(a.isHTML5){a.load(a._iO);a.readyState=1}else if(!a._iO.serverURL){a._iO.autoPlay=true;a.load(a._iO)}}else if(a.readyState===2){b._wD('SMSound.play(): Could not load "'+a.sID+'" - exiting',2);return a}else b._wD('SMSound.play(): "'+a.sID+'" is loading - attempting to play..',1);if(a.paused&&a.position&&a.position>0){b._wD('SMSound.play(): "'+ +a.sID+'" is resuming from paused state',1);a.resume()}else{b._wD('SMSound.play(): "'+a.sID+'" is starting to play');a.playState=1;a.paused=false;if(!a.instanceCount||a._iO.multiShotEvents||p>8&&!a.isHTML5&&!a.getAutoPlay())a.instanceCount++;a.position=typeof a._iO.position!=="undefined"&&!isNaN(a._iO.position)?a._iO.position:0;a._iO=ca(ba(a._iO));a._iO.onplay&&h&&a._iO.onplay.apply(a);a.setVolume(a._iO.volume,true);a.setPan(a._iO.pan,true);if(a.isHTML5){k();a._setup_html5().play()}else b.o._start(a.sID, +a._iO.loops||1,p===9?a.position:a.position/1E3)}return a};this.stop=function(d){if(a.playState===1){a._onbufferchange(0);a.resetOnPosition(0);if(!a.isHTML5)a.playState=0;a.paused=false;a._iO.onstop&&a._iO.onstop.apply(a);if(a.isHTML5){if(i){a.setPosition(0);i.pause();a.playState=0;a._onTimer();e();a.unload()}}else{b.o._stop(a.sID,d);a._iO.serverURL&&a.unload()}a.instanceCount=0;a._iO={}}return a};this.setAutoPlay=function(d){b._wD("sound "+a.sID+" turned autoplay "+(d?"on":"off"));a._iO.autoPlay= +d;b.o._setAutoPlay(a.sID,d);if(d)if(!a.instanceCount&&a.readyState===1){a.instanceCount++;b._wD("sound "+a.sID+" incremented instance count to "+a.instanceCount)}};this.getAutoPlay=function(){return a._iO.autoPlay};this.setPosition=function(d){if(d===undefined)d=0;a.position=a.isHTML5?Math.max(d,0):Math.min(a.duration||a._iO.duration,Math.max(d,0));a.resetOnPosition(a.position);if(a.isHTML5){if(i){b._wD("setPosition(): setting position to "+a.position/1E3);if(a.playState)try{i.currentTime=a.position/ +1E3}catch(h){b._wD("setPosition("+a.position+"): WARN: Caught exception: "+h.message,2)}else b._wD("HTML 5 warning: cannot set position while playState == 0 (not playing)",2);if(a.paused){a._onTimer(true);a._iO.useMovieStar&&a.resume()}}}else{d=p===9?a.position:a.position/1E3;a.playState===0?a.play({position:d}):b.o._setPosition(a.sID,d,a.paused||!a.playState)}return a};this.pause=function(d){if(a.paused||a.playState===0&&a.readyState!==1)return a;b._wD("SMSound.pause()");a.paused=true;if(a.isHTML5){a._setup_html5().pause(); +e()}else if(d||d===undefined)b.o._pause(a.sID);a._iO.onpause&&a._iO.onpause.apply(a);return a};this.resume=function(){if(!a.paused)return a;b._wD("SMSound.resume()");a.paused=false;a.playState=1;if(a.isHTML5){a._setup_html5().play();k()}else b.o._pause(a.sID);a._iO.onresume&&a._iO.onresume.apply(a);return a};this.togglePause=function(){b._wD("SMSound.togglePause()");if(a.playState===0){a.play({position:p===9&&!a.isHTML5?a.position:a.position/1E3});return a}a.paused?a.resume():a.pause();return a}; +this.setPan=function(d,h){if(typeof d==="undefined")d=0;if(typeof h==="undefined")h=false;a.isHTML5||b.o._setPan(a.sID,d);a._iO.pan=d;if(!h)a.pan=d;return a};this.setVolume=function(d,h){if(typeof d==="undefined")d=100;if(typeof h==="undefined")h=false;if(a.isHTML5){if(i)i.volume=d/100}else b.o._setVolume(a.sID,b.muted&&!a.muted||a.muted?0:d);a._iO.volume=d;if(!h)a.volume=d;return a};this.mute=function(){a.muted=true;if(a.isHTML5){if(i)i.muted=true}else b.o._setVolume(a.sID,0);return a};this.unmute= +function(){a.muted=false;var d=typeof a._iO.volume!=="undefined";if(a.isHTML5){if(i)i.muted=false}else b.o._setVolume(a.sID,d?a._iO.volume:a.options.volume);return a};this.toggleMute=function(){return a.muted?a.unmute():a.mute()};this.onposition=function(d,h,j){a._onPositionItems.push({position:d,method:h,scope:typeof j!=="undefined"?j:a,fired:false});return a};this.processOnPosition=function(){var d,h;d=a._onPositionItems.length;if(!d||!a.playState||a._onPositionFired>=d)return false;for(d=d;d--;){h= +a._onPositionItems[d];if(!h.fired&&a.position>=h.position){h.method.apply(h.scope,[h.position]);h.fired=true;b._onPositionFired++}}return true};this.resetOnPosition=function(d){var h,j;h=a._onPositionItems.length;if(!h)return false;for(h=h;h--;){j=a._onPositionItems[h];if(j.fired&&d<=j.position){j.fired=false;b._onPositionFired--}}return true};this._onTimer=function(d){var h={};if(a._hasTimer||d)if(i&&(d||(a.playState>0||a.readyState===1)&&!a.paused)){a.duration=m();a.durationEstimate=a.duration; +d=i.currentTime?i.currentTime*1E3:0;a._whileplaying(d,h,h,h,h);return true}else{b._wD('_onTimer: Warn for "'+a.sID+'": '+(!i?"Could not find element. ":"")+(a.playState===0?"playState bad, 0?":"playState = "+a.playState+", OK"));return false}};m=function(){var d=i?i.duration*1E3:undefined;return d&&!isNaN(d)?d:null};k=function(){a.isHTML5&&Fa(a)};e=function(){a.isHTML5&&Ga(a)};f=function(){a._onPositionItems=[];a._onPositionFired=0;a._hasTimer=null;a._added_events=null;i=a._audio=null;a.bytesLoaded= +null;a.bytesTotal=null;a.position=null;a.duration=a._iO&&a._iO.duration?a._iO.duration:null;a.durationEstimate=null;a.failures=0;a.loaded=false;a.playState=0;a.paused=false;a.readyState=0;a.muted=false;a.didBeforeFinish=false;a.didJustBeforeFinish=false;a.isBuffering=false;a.instanceOptions={};a.instanceCount=0;a.peakData={left:0,right:0};a.waveformData={left:[],right:[]};a.eqData=[];a.eqData.left=[];a.eqData.right=[]};f();this._setup_html5=function(d){d=w(a._iO,d);if(i){if(a.url!==d.url){b._wD("setting new URL on existing object: "+ +d.url);i.src=d.url}}else{b._wD("creating HTML 5 audio element with URL: "+d.url);a._audio=new Audio(d.url);i=a._audio;a.isHTML5=true;g()}i.loop=d.loops>1?"loop":"";return a._audio};g=function(){function d(h,j,t){return i?i.addEventListener(h,j,t||false):null}if(a._added_events)return false;a._added_events=true;d("load",function(){b._wD("HTML5::load: "+a.sID);if(i){a._onbufferchange(0);a._whileloading(a.bytesTotal,a.bytesTotal,m());a._onload(true)}},false);d("canplay",function(){b._wD("HTML5::canplay: "+ +a.sID);a._onbufferchange(0)},false);d("waiting",function(){b._wD("HTML5::waiting: "+a.sID);a._onbufferchange(1)},false);d("progress",function(h){b._wD("HTML5::progress: "+a.sID+": loaded/total: "+(h.loaded||0)+"/"+(h.total||1));if(!a.loaded&&i){a._onbufferchange(0);a._whileloading(h.loaded||0,h.total||1,m())}},false);d("error",function(){if(i){b._wD("HTML5::error: "+i.error.code);a._onload(false)}},false);d("loadstart",function(){b._wD("HTML5::loadstart: "+a.sID);a._onbufferchange(1)},false);d("play", +function(){b._wD("HTML5::play: "+a.sID);a._onbufferchange(0)},false);d("playing",function(){b._wD("HTML5::playing: "+a.sID);a._onbufferchange(0)},false);d("timeupdate",function(){a._onTimer()},false);setTimeout(function(){a&&i&&d("ended",function(){b._wD("HTML5::ended: "+a.sID);a._onfinish()},false)},250);return true};this._whileloading=function(d,h,j,t){a.bytesLoaded=d;a.bytesTotal=h;a.duration=Math.floor(j);a.bufferLength=t;if(a._iO.isMovieStar)a.durationEstimate=a.duration;else{a.durationEstimate= +a._iO.duration?a.duration>a._iO.duration?a.duration:a._iO.duration:parseInt(a.bytesTotal/a.bytesLoaded*a.duration,10);if(a.durationEstimate===undefined)a.durationEstimate=a.duration;a.bufferLength=t}a.readyState!==3&&a._iO.whileloading&&a._iO.whileloading.apply(a)};this._onid3=function(d,h){b._wD('SMSound._onid3(): "'+this.sID+'" ID3 data received.');var j=[],t,y;t=0;for(y=d.length;t<y;t++)j[d[t]]=h[t];a.id3=w(a.id3,j);a._iO.onid3&&a._iO.onid3.apply(a)};this._whileplaying=function(d,h,j,t,y){if(isNaN(d)|| +d===null)return false;if(a.playState===0&&d>0)d=0;a.position=d;a.processOnPosition();if(p>8&&!a.isHTML5){if(a._iO.usePeakData&&typeof h!=="undefined"&&h)a.peakData={left:h.leftPeak,right:h.rightPeak};if(a._iO.useWaveformData&&typeof j!=="undefined"&&j)a.waveformData={left:j.split(","),right:t.split(",")};if(a._iO.useEQData)if(typeof y!=="undefined"&&y&&y.leftEQ){d=y.leftEQ.split(",");a.eqData=d;a.eqData.left=d;if(typeof y.rightEQ!=="undefined"&&y.rightEQ)a.eqData.right=y.rightEQ.split(",")}}if(a.playState=== +1){!a.isHTML5&&b.flashVersion===8&&!a.position&&a.isBuffering&&a._onbufferchange(0);a._iO.whileplaying&&a._iO.whileplaying.apply(a);if((a.loaded||!a.loaded&&a._iO.isMovieStar)&&a._iO.onbeforefinish&&a._iO.onbeforefinishtime&&!a.didBeforeFinish&&a.duration-a.position<=a._iO.onbeforefinishtime)a._onbeforefinish()}return true};this._onconnect=function(d){d=d===1;b._wD('SMSound._onconnect(): "'+a.sID+'"'+(d?" connected.":" failed to connect? - "+a.url),d?1:2);if(a.connected=d){a.failures=0;a._iO.onconnect&& +a._iO.onconnect.apply(a,[d]);if(r(a.sID)&&(a.options.autoLoad||a.getAutoPlay()))a.play(undefined,a.getAutoPlay())}};this._onload=function(d){d=d?true:false;b._wD('SMSound._onload(): "'+a.sID+'"'+(d?" loaded.":" failed to load? - "+a.url),d?1:2);if(!d&&!a.isHTML5){b.sandbox.noRemote===true&&b._wD("SMSound._onload(): "+q("noNet"),1);b.sandbox.noLocal===true&&b._wD("SMSound._onload(): "+q("noLocal"),1)}a.loaded=d;a.readyState=d?3:2;a._onbufferchange(0);a._iO.onload&&a._iO.onload.apply(a,[d]);return true}; +this._onfailure=function(d,h,j){a.failures++;b._wD('SMSound._onfailure(): "'+a.sID+'" count '+a.failures);a._iO.onfailure&&a.failures===1?a._iO.onfailure(a,d,h,j):b._wD("SMSound._onfailure(): ignoring")};this._onbeforefinish=function(){if(!a.didBeforeFinish){a.didBeforeFinish=true;if(a._iO.onbeforefinish){b._wD('SMSound._onbeforefinish(): "'+a.sID+'"');a._iO.onbeforefinish.apply(a)}}};this._onjustbeforefinish=function(){if(!a.didJustBeforeFinish){a.didJustBeforeFinish=true;if(a._iO.onjustbeforefinish){b._wD('SMSound._onjustbeforefinish(): "'+ +a.sID+'"');a._iO.onjustbeforefinish.apply(a)}}};this._onstats=function(d){a._iO.onstats&&a._iO.onstats(a,d)};this._onfinish=function(){a._onbufferchange(0);a.resetOnPosition(0);a._iO.onbeforefinishcomplete&&a._iO.onbeforefinishcomplete.apply(a);a.didBeforeFinish=false;a.didJustBeforeFinish=false;if(a.instanceCount){a.instanceCount--;if(!a.instanceCount){a.playState=0;a.paused=false;a.instanceCount=0;a.instanceOptions={};e()}if(!a.instanceCount||a._iO.multiShotEvents)if(a._iO.onfinish){b._wD('SMSound._onfinish(): "'+ +a.sID+'"');a._iO.onfinish.apply(a)}}};this._onbufferchange=function(d){if(a.playState===0)return false;if(d&&a.isBuffering||!d&&!a.isBuffering)return false;a.isBuffering=d===1;if(a._iO.onbufferchange){b._wD("SMSound._onbufferchange(): "+d);a._iO.onbufferchange.apply(a)}return true};this._ondataerror=function(d){if(a.playState>0){b._wD("SMSound._ondataerror(): "+d);a._iO.ondataerror&&a._iO.ondataerror.apply(a)}}};X=function(){return l.body?l.body:l._docElement?l.documentElement:l.getElementsByTagName("div")[0]}; +u=function(c){return l.getElementById(c)};w=function(c,a){var f={},g,e;for(g in c)if(c.hasOwnProperty(g))f[g]=c[g];g=typeof a==="undefined"?b.defaultOptions:a;for(e in g)if(g.hasOwnProperty(e)&&typeof f[e]==="undefined")f[e]=g[e];return f};(function(){function c(e){e=ta.call(e);var k=e.length;if(f){e[1]="on"+e[1];k>3&&e.pop()}else k===3&&e.push(false);return e}function a(e,k){var m=e.shift()[g[k]];f?m(e[0],e[1]):m.apply(this,e)}var f=o.attachEvent,g={add:f?"attachEvent":"addEventListener",remove:f? +"detachEvent":"removeEventListener"};E=function(){a(c(arguments),"add")};A=function(){a(c(arguments),"remove")}})();ea=function(c){return(c.type?U({type:c.type}):false)||U(c.url)};U=function(c){if(!b.useHTML5Audio||!b.hasHTML5)return false;var a,f=b.audioFormats;if(!D){D=[];for(a in f)if(f.hasOwnProperty(a)){D.push(a);if(f[a].related)D=D.concat(f[a].related)}D=RegExp("\\.("+D.join("|")+")","i")}a=typeof c.type!=="undefined"?c.type:null;c=typeof c==="string"?c.toLowerCase().match(D):null;if(!c||!c.length){if(!a)return false}else c= +c[0].substr(1);if(c&&typeof b.html5[c]!=="undefined")return b.html5[c];else{if(!a)if(c&&b.html5[c])return b.html5[c];else a="audio/"+c;a=b.html5.canPlayType(a);return b.html5[c]=a}};Ia=function(){function c(m){var i,d,h=false;if(!a||typeof a.canPlayType!=="function")return false;if(m instanceof Array){i=0;for(d=m.length;i<d&&!h;i++)if(b.html5[m[i]]||a.canPlayType(m[i]).match(b.html5Test)){h=true;b.html5[m[i]]=true}return h}else return(m=a&&typeof a.canPlayType==="function"?a.canPlayType(m):false)&& +(m.match(b.html5Test)?true:false)}if(!b.useHTML5Audio||typeof Audio==="undefined")return false;var a=typeof Audio!=="undefined"?new Audio:null,f,g={},e,k;e=b.audioFormats;for(f in e)if(e.hasOwnProperty(f)){g[f]=c(e[f].type);if(e[f]&&e[f].related)for(k=0;k<e[f].related.length;k++)b.html5[e[f].related[k]]=g[f]}g.canPlayType=a?c:null;b.html5=w(b.html5,g);return true};$={notReady:"Not loaded yet - wait for soundManager.onload()/onready()",notOK:"Audio support is not available.",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 ("+l.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',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 ."+b.swfCSS.swfTimedout+" CSS..",fbLoaded:"Flash loaded",fbHandler:"soundManager::flashBlockHandler()",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.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",mfOn:"mobileFlash::enabling on-screen flash repositioning",policy:"Enabling usePolicyFile for data access"};u=function(c){return l.getElementById(c)};q=function(){var c=ta.call(arguments),a=c.shift();a=$&&$[a]?$[a]:"";var f,g;if(a&&c&&c.length){f=0;for(g=c.length;f<g;f++)a=a.replace("%s",c[f])}return a};ba=function(c){if(p===8&&c.loops>1&&c.stream){n("as2loop"); +c.stream=false}return c};ca=function(c,a){if(c&&!c.usePolicyFile&&(c.onid3||c.usePeakData||c.useWaveformData||c.useEQData)){b._wD((a?a+":":"")+q("policy"));c.usePolicyFile=true}return c};qa=function(c){typeof console!=="undefined"&&typeof console.warn!=="undefined"?console.warn(c):b._wD(c)};ya=function(){return false};Da=function(c){for(var a in c)if(c.hasOwnProperty(a)&&typeof c[a]==="function")c[a]=ya};S=function(c){if(typeof c==="undefined")c=false;if(z||c){n("smFail",2);b.disable(c)}};Ea=function(c){var a= +null;if(c)if(c.match(/\.swf(\?\.*)?$/i)){if(a=c.substr(c.toLowerCase().lastIndexOf(".swf?")+4))return c}else if(c.lastIndexOf("/")!==c.length-1)c+="/";return(c&&c.lastIndexOf("/")!==-1?c.substr(0,c.lastIndexOf("/")+1):"./")+b.movieURL};ka=function(){if(p!==8&&p!==9){b._wD(q("badFV",p,8));b.flashVersion=8}var c=b.debugMode||b.debugFlash?"_debug.swf":".swf";if(b.flashVersion<9&&b.useHTML5Audio&&b.audioFormats.mp4.required){b._wD(q("needfl9"));b.flashVersion=9}p=b.flashVersion;b.version=b.versionNumber+ +(C?" (HTML5-only mode)":p===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(p>8){b.defaultOptions=w(b.defaultOptions,b.flash9Options);b.features.buffering=true}if(p>8&&b.useMovieStar){b.defaultOptions=w(b.defaultOptions,b.movieStarOptions);b.filePatterns.flash9=RegExp("\\.(mp3|"+b.netStreamTypes.join("|")+")(\\?.*)?$","i");b.mimePattern=b.netStreamMimeTypes;b.features.movieStar=true}else b.features.movieStar=false;b.filePattern=b.filePatterns[p!==8?"flash9":"flash8"];b.movieURL=(p===8?"soundmanager2.swf": +"soundmanager2_flash9.swf").replace(".swf",c);b.features.peakData=b.features.waveformData=b.features.eqData=p>8};Ca=function(c,a){if(!b.o||!b.allowPolling)return false;b.o._setPolling(c,a)};(function(){function c(e){e=ta.call(e);var k=e.length;if(f){e[1]="on"+e[1];k>3&&e.pop()}else k===3&&e.push(false);return e}function a(e,k){var m=e.shift()[g[k]];f?m(e[0],e[1]):m.apply(this,e)}var f=o.attachEvent,g={add:f?"attachEvent":"addEventListener",remove:f?"detachEvent":"removeEventListener"};E=function(){a(c(arguments), +"add")};A=function(){a(c(arguments),"remove")}})();na=function(){function c(){f.left=o.scrollX+"px";f.top=o.scrollY+"px"}function a(g){b._wD("mobileFlash::flash on-screen hack: "+(g?"ON":"OFF"));g=o[(g?"add":"remove")+"EventListener"];g("resize",c,false);g("scroll",c,false)}var f=null;return{check:function(g){f=b.oMC.style;if(v.match(/android/i)){if(g){if(b.flashLoadTimeout){b._wDS("mfTimeout");b.flashLoadTimeout=0}return false}b._wD("mfOn");f.position="absolute";f.left=f.top="0px";a(true);b.onready(function(){a(false); +if(f)f.left=f.top="-9999px"});c()}return true}}}();aa=function(c,a){function f(){b._wD("-- SoundManager 2 "+b.version+(!C&&b.useHTML5Audio?b.hasHTML5?" + HTML5 audio":", no HTML5 audio support":"")+(b.useMovieStar?", MovieStar mode":"")+(b.useHighPerformance?", high performance mode, ":", ")+((b.useFastPolling?"fast":"normal")+" polling")+(b.wmode?", wmode: "+b.wmode:"")+(b.debugFlash?", flash debug mode":"")+(b.useFlashBlock?", flashBlock mode":"")+" --",1)}var g=a?a:b.url,e=b.altURL?b.altURL:g, +k;k=X();var m,i,d=M(),h,j=null;j=(j=l.getElementsByTagName("html")[0])&&j.dir&&j.dir.match(/rtl/i);c=typeof c==="undefined"?b.id:c;if(I&&P)return false;if(C){ka();f();b.oMC=u(b.movieID);Y();P=I=true;return false}I=true;ka();b.url=Ea(this._overHTTP?g:e);a=b.url;b.wmode=!b.wmode&&b.useHighPerformance&&!b.useMovieStar?"transparent":b.wmode;if(b.wmode!==null&&!B&&!b.useHighPerformance&&navigator.platform.match(/win32/i)){b.specialWmodeCase=true;n("spcWmode");b.wmode=null}k={name:c,id:c,src:a,width:"100%", +height:"100%",quality:"high",allowScriptAccess:b.allowScriptAccess,bgcolor:b.bgColor,pluginspage:"http://www.macromedia.com/go/getflashplayer",type:"application/x-shockwave-flash",wmode:b.wmode};if(b.debugFlash)k.FlashVars="debug=1";b.wmode||delete k.wmode;if(B){g=l.createElement("div");i='<object id="'+c+'" data="'+a+'" type="'+k.type+'" width="'+k.width+'" height="'+k.height+'"><param name="movie" value="'+a+'" /><param name="AllowScriptAccess" value="'+b.allowScriptAccess+'" /><param name="quality" value="'+ +k.quality+'" />'+(b.wmode?'<param name="wmode" value="'+b.wmode+'" /> ':"")+'<param name="bgcolor" value="'+b.bgColor+'" />'+(b.debugFlash?'<param name="FlashVars" value="'+k.FlashVars+'" />':"")+"<!-- --\></object>"}else{g=l.createElement("embed");for(m in k)k.hasOwnProperty(m)&&g.setAttribute(m,k[m])}wa();d=M();if(k=X()){b.oMC=u(b.movieID)?u(b.movieID):l.createElement("div");if(b.oMC.id){h=b.oMC.className;b.oMC.className=(h?h+" ":b.swfCSS.swfDefault)+(d?" "+d:"");b.oMC.appendChild(g);if(B){m=b.oMC.appendChild(l.createElement("div")); +m.className=b.swfCSS.swfBox;m.innerHTML=i}P=true;na.check(true)}else{b.oMC.id=b.movieID;b.oMC.className=b.swfCSS.swfDefault+" "+d;m=d=null;if(!b.useFlashBlock)if(b.useHighPerformance)d={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else{d={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"};if(j)d.left=Math.abs(parseInt(d.left,10))+"px"}if(v.match(/webkit/i))b.oMC.style.zIndex=1E4;if(!b.debugFlash)for(h in d)if(d.hasOwnProperty(h))b.oMC.style[h]= +d[h];try{B||b.oMC.appendChild(g);k.appendChild(b.oMC);if(B){m=b.oMC.appendChild(l.createElement("div"));m.className=b.swfCSS.swfBox;m.innerHTML=i}P=true}catch(t){throw Error(q("appXHTML"));}na.check()}}f();b._wD("soundManager::createMovie(): Trying to load "+a+(!this._overHTTP&&b.altURL?" (alternate URL)":""),1);return true};r=this.getSoundById;R=function(){if(C){aa();return false}if(b.o)return false;b.o=b.getMovie(b.id);if(!b.o){if(T){if(B)b.oMC.innerHTML=oa;else b.oMC.appendChild(T);T=null;I=true}else aa(b.id, +b.url);b.o=b.getMovie(b.id)}if(b.o){b._wD("soundManager::initMovie(): Got "+b.o.nodeName+" element ("+(I?"created via JS":"static HTML")+")");n("waitEI")}b.oninitmovie instanceof Function&&setTimeout(b.oninitmovie,1);return true};ja=function(c){if(c)b.url=c;R()};Z=function(){setTimeout(Aa,500)};Aa=function(){if(da)return false;da=true;A(o,"load",Z);if(O&&!ua){n("waitFocus");return false}var c;if(!s){c=b.getMoviePercent();b._wD(q("waitImpatient",c===100?" (SWF loaded)":c>0?" (SWF "+c+"% loaded)":""))}setTimeout(function(){c= +b.getMoviePercent();if(!s){b._wD("soundManager: No Flash response within expected time.\nLikely causes: "+(c===0?"Loading "+b.movieURL+" may have failed (and/or Flash "+p+"+ not present?), ":"")+"Flash blocked or JS-Flash security error."+(b.debugFlash?" "+q("checkSWF"):""),2);if(!this._overHTTP&&c){n("localFail",2);b.debugFlash||n("tryDebug",2)}c===0&&b._wD(q("swf404",b.url));x("flashtojs",false,": Timed out"+this._overHTTP?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)")}if(!s&& +Ka)if(c===null)if(b.useFlashBlock||b.flashLoadTimeout===0){b.useFlashBlock&&pa();n("waitForever")}else S(true);else b.flashLoadTimeout===0?n("waitForever"):S(true)},b.flashLoadTimeout)};ja=function(c){if(c)b.url=c;R()};n=function(c,a){return c?b._wD(q(c),a):""};if(G.indexOf("debug=alert")+1&&b.debugMode)b._wD=function(c){alert(c)};xa=function(){var c=u(b.debugID),a=u(b.debugID+"-toggle");if(!c)return false;if(ha){a.innerHTML="+";c.style.display="none"}else{a.innerHTML="-";c.style.display="block"}ha= +!ha};x=function(c,a,f){if(typeof sm2Debugger!=="undefined")try{sm2Debugger.handleEvent(c,a,f)}catch(g){}return true};M=function(){var c=[];b.debugMode&&c.push(b.swfCSS.sm2Debug);b.debugFlash&&c.push(b.swfCSS.flashDebug);b.useHighPerformance&&c.push(b.swfCSS.highPerf);return c.join(" ")};pa=function(){var c=q("fbHandler"),a=b.getMoviePercent();if(b.supported()){b.didFlashBlock&&b._wD(c+": Unblocked");if(b.oMC)b.oMC.className=M()+" "+b.swfCSS.swfDefault+(" "+b.swfCSS.swfUnblocked)}else{if(N){b.oMC.className= +M()+" "+b.swfCSS.swfDefault+" "+(a===null?b.swfCSS.swfTimedout:b.swfCSS.swfError);b._wD(c+": "+q("fbTimeout")+(a?" ("+q("fbLoaded")+")":""))}b.didFlashBlock=true;J(true);b.onerror instanceof Function&&b.onerror.apply(o)}};F=function(){function c(){A(o,"focus",F);A(o,"load",F)}if(ua||!O){c();return true}ua=Ka=true;b._wD("soundManager::handleFocus()");V&&O&&A(o,"mousemove",F);da=false;c();return true};Q=function(c){if(s)return false;if(C){b._wD("-- SoundManager 2: loaded --");s=true;J();K();return true}b.useFlashBlock&& +b.flashLoadTimeout&&!b.getMoviePercent()||(s=true);b._wD("-- SoundManager 2 "+(z?"failed to load":"loaded")+" ("+(z?"security/load error":"OK")+") --",1);if(z||c){if(b.useFlashBlock)b.oMC.className=M()+" "+(b.getMoviePercent()===null?b.swfCSS.swfTimedout:b.swfCSS.swfError);J();x("onload",false);b.onerror instanceof Function&&b.onerror.apply(o);return false}else x("onload",true);if(b.waitForWindowLoad&&!ia){n("waitOnload");E(o,"load",K);return false}else{b.waitForWindowLoad&&ia&&n("docLoaded");K()}return true}; +za=function(c,a){H.push({method:c,scope:a||null,fired:false})};J=function(c){if(!s&&!c)return false;c={success:c?b.supported():!z};var a=[],f,g,e=!b.useFlashBlock||b.useFlashBlock&&!b.supported();f=0;for(g=H.length;f<g;f++)H[f].fired!==true&&a.push(H[f]);if(a.length){b._wD("soundManager: Firing "+a.length+" onready() item"+(a.length>1?"s":""));f=0;for(g=a.length;f<g;f++){a[f].scope?a[f].method.apply(a[f].scope,[c]):a[f].method(c);if(!e)a[f].fired=true}}return true};K=function(){o.setTimeout(function(){b.useFlashBlock&& +pa();J();n("onload",1);b.onload instanceof Function&&b.onload.apply(o);n("onloadOK",1);b.waitForWindowLoad&&E(o,"load",K)},1)};Ha=function(){var c,a,f=!G.match(/usehtml5audio/i)&&!G.match(/sm2\-ignorebadua/i)&&V&&v.match(/OS X 10_6_(3|4)/i);if(v.match(/iphone os (1|2|3_0|3_1)/i)?true:false){b.hasHTML5=false;C=true;if(b.oMC)b.oMC.style.display="none";return false}if(b.useHTML5Audio){if(!b.html5||!b.html5.canPlayType){b._wD("SoundManager: No HTML5 Audio() support detected.");b.hasHTML5=false;return true}else b.hasHTML5= +true;if(f){b._wD("SoundManager::Note: Buggy HTML5 Audio in Safari on OS X 10.6.[3|4], see https://bugs.webkit.org/show_bug.cgi?id=32159 - disabling HTML5 audio",1);b.useHTML5Audio=false;b.hasHTML5=false;return true}}else return true;for(a in b.audioFormats)if(b.audioFormats.hasOwnProperty(a)&&b.audioFormats[a].required&&!b.html5.canPlayType(b.audioFormats[a].type))c=true;if(b.ignoreFlash)c=false;C=b.useHTML5Audio&&b.hasHTML5&&!c;return c};Y=function(){var c,a=[];n("init");if(s){n("didInit");return false}if(b.hasHTML5){for(c in b.audioFormats)b.audioFormats.hasOwnProperty(c)&& +a.push(c+": "+b.html5[c]);b._wD("-- SoundManager 2: HTML5 support tests ("+b.html5Test+"): "+a.join(", ")+" --",1)}if(C){if(!s){A(o,"load",b.beginDelayedInit);b.enabled=true;Q()}return true}R();try{n("flashJS");b.o._externalInterfaceTest(false);b.allowPolling?Ca(true,b.useFastPolling?true:false):n("noPolling",1);b.debugMode||b.o._disableDebug();b.enabled=true;x("jstoflash",true)}catch(f){b._wD("js/flash exception: "+f.toString());x("jstoflash",false);S(true);Q();return false}Q();A(o,"load",b.beginDelayedInit); +return true};Ba=function(){if(ra)return false;aa();R();return ra=true};L=function(){if(la)return false;la=true;wa();Ia();b.html5.usingFlash=Ha();N=b.html5.usingFlash;la=true;l.removeEventListener&&l.removeEventListener("DOMContentLoaded",L,false);ja();return true};Fa=function(c){if(!c._hasTimer)c._hasTimer=true};Ga=function(c){if(c._hasTimer)c._hasTimer=false};ma=function(){b.onerror instanceof Function&&b.onerror();b.disable()};this._setSandboxType=function(c){var a=b.sandbox;a.type=c;a.description= +a.types[typeof a.types[c]!=="undefined"?c:"unknown"];b._wD("Flash security sandbox type: "+a.type);if(a.type==="localWithFile"){a.noRemote=true;a.noLocal=false;n("secNote",2)}else if(a.type==="localWithNetwork"){a.noRemote=false;a.noLocal=true}else if(a.type==="localTrusted"){a.noRemote=false;a.noLocal=false}};this._externalInterfaceOK=function(c){if(b.swfLoaded)return false;var a=(new Date).getTime();b._wD("soundManager::externalInterfaceOK()"+(c?" (~"+(a-c)+" ms)":""));x("swf",true);x("flashtojs", +true);b.swfLoaded=true;O=false;B?setTimeout(Y,100):Y()};sa=function(){if(l.readyState==="complete"){L();l.detachEvent("onreadystatechange",sa)}return true};if(!b.hasHTML5||N){E(o,"focus",F);E(o,"load",F);E(o,"load",Z);V&&O&&E(o,"mousemove",F)}if(l.addEventListener)l.addEventListener("DOMContentLoaded",L,false);else if(l.attachEvent)l.attachEvent("onreadystatechange",sa);else{x("onload",false);ma()}l.readyState==="complete"&&setTimeout(L,100)}var La=null;if(typeof SM2_DEFER==="undefined"||!SM2_DEFER)La= +new va;W.SoundManager=va;W.soundManager=La})(window); |
