/** @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.20110123
*/
(function(E){function ya(Ta,Ua){function r(c){return function(a){if(!this._t||!this._t._a){this._t&&this._t.sID?b._wD(m+"ignoring "+a.type+": "+this._t.sID):b._wD(m+"ignoring "+a.type);return null}else return c.call(this,a)}}function za(){if(b.debugURLParam.test(I))b.debugMode=true;if(v(b.debugID))return false;var c,a,g,h;if(b.debugMode&&!v(b.debugID)&&(!ga||!b.useConsole||b.useConsole&&ga&&!b.consoleOnly)){c=k.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(k.createTextNode("-"));c.onclick=Aa;c.title="Toggle SM2 debug console";if(y.match(/msie 6/i)){c.style.position="absolute";c.style.cursor="hand"}for(h in a)if(a.hasOwnProperty(h))c.style[h]=a[h];a=k.createElement("div");a.id=b.debugID;a.style.display=b.debugMode?"block":"none";if(b.debugMode&&!v(c.id)){try{g=X();g.appendChild(c)}catch(e){throw Error(q("appXHTML"));
}g.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.flashPollingInterval=null;this.flashLoadTimeout=1E3;this.wmode=null;this.allowScriptAccess="always";this.useHTML5Audio=this.useFlashBlock=false;this.html5Test=/^probably$/i;this.useGlobalHTML5Audio=
true;this.requireFlash=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};this.movieStarOptions=
{bufferTime:3,serverURL:null,onconnect:null,duration:null};this.version=null;this.versionNumber="V2.97a.20110123";this.movieURL=null;this.url=Ta||null;this.altURL=null;this.enabled=this.swfLoaded=false;this.o=null;this.movieID="sm2-container";this.id=Ua||"sm2movie";this.swfCSS={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",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 ha,b=this,m="HTML5::",v,y=navigator.userAgent,I=E.location.href.toString(),n=this.flashVersion,k=document,o=E,ia,Y,C=[],ja=true,z,J=false,P=false,s=false,A=false,ka=false,l,Va=0,Q,w,la,F,K,ma,Z,Ba,na,G,Ca,$,R,L,oa,X,aa,pa,Da,Wa=["log","info","warn","error"],Ea,ba,Fa,S=null,qa=null,q,ra,M,Aa,ca,da,sa,t,ea=false,ta=false,Ga,Ha,H=null,Ia,fa,x=false,T,D,ua,Ja,u,Ka=Array.prototype.slice,La,Ma,Na,U=false,N,va,Oa,Pa=y.match(/pre\//i),Xa=y.match(/(ipad|iphone|ipod)/i);
y.match(/mobile/i);var B=y.match(/MSIE/i),Qa=y.match(/webkit/i),V=y.match(/safari/i)&&!y.match(/chrome/i),wa=!I.match(/usehtml5audio/i)&&!I.match(/sm2\-ignorebadua/i)&&V&&y.match(/OS X 10_6_(3|4|5|6)/i),ga=typeof console!=="undefined"&&typeof console.log!=="undefined",xa=typeof k.hasFocus!=="undefined"?k.hasFocus():null,O=typeof k.hasFocus==="undefined"&&V,Ra=!O;this._use_maybe=I.match(/sm2\-useHTML5Maybe\=1/i);this._overHTTP=k.location?k.location.protocol.match(/http/i):null;this.useAltURL=!this._overHTTP;
this._global_a=null;if(Xa||Pa){b.useHTML5Audio=true;b.ignoreFlash=true;if(b.useGlobalHTML5Audio)U=true}if(Pa||this._use_maybe)b.html5Test=/^(probably|maybe)$/i;(function(){var c=I,a=null;if(c.indexOf("#sm2-usehtml5audio=")!==-1){a=c.charAt(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=this.ok=function(){return H?s&&!A:b.useHTML5Audio&&
b.hasHTML5};this.getMovie=function(c){return B?o[c]:V?v(c)||k[c]:v(c)};this.createSound=function(c){function a(){g=ca(g);b.sounds[e.id]=new ha(e);b.soundIDs.push(e.id);return b.sounds[e.id]}var g=null,h=null,e=null;if(!s||!b.ok()){sa("soundManager.createSound(): "+q(!s?"notReady":"notOK"));return false}if(arguments.length===2)c={id:arguments[0],url:arguments[1]};e=g=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(t(e.id,true)){b._wD("soundManager.createSound(): "+e.id+" exists",1);return b.sounds[e.id]}if(fa(e)){h=a();b._wD("Loading sound "+e.id+" via HTML5");h._setup_html5(e)}else{if(n>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){l("noPeak");e.usePeakData=
false}e.loops>1&&l("noNSLoop")}}e=da(e,"soundManager.createSound(): ");h=a();if(n===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.autoLoad,e.usePolicyFile);if(!e.serverURL){h.connected=true;e.onconnect&&e.onconnect.apply(h)}}if((e.autoLoad||e.autoPlay)&&!e.serverURL)h.load(e)}e.autoPlay&&
!e.serverURL&&h.play();return h};this.destroySound=function(c,a){if(!t(c))return false;var g=b.sounds[c],h;g._iO={};g.stop();g.unload();for(h=0;h<b.soundIDs.length;h++)if(b.soundIDs[h]===c){b.soundIDs.splice(h,1);break}a||g.destruct(true);delete b.sounds[c];return true};this.load=function(c,a){if(!t(c))return false;return b.sounds[c].load(a)};this.unload=function(c){if(!t(c))return false;return b.sounds[c].unload()};this.start=this.play=function(c,a){if(!s||!b.ok()){sa("soundManager.play(): "+q(!s?
"notReady":"notOK"));return false}if(!t(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(!t(c))return false;return b.sounds[c].setPosition(a)};this.stop=function(c){if(!t(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
ha&&b.sounds[c].stop()};this.pause=function(c){if(!t(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(!t(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(!t(c))return false;return b.sounds[c].togglePause()};this.setPan=function(c,a){if(!t(c))return false;return b.sounds[c].setPan(a)};
this.setVolume=function(c,a){if(!t(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(!t(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(!t(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(!t(c))return false;return b.sounds[c].toggleMute()};this.getMemoryUse=function(){if(n===8)return 0;if(b.o)return parseInt(b.o._getMemoryUse(),10)};this.disable=function(c){if(typeof c==="undefined")c=false;if(A)return false;A=true;l("shutdown",1);for(var a=
b.soundIDs.length;a--;)Ea(b.sounds[b.soundIDs[a]]);Q(c);u.remove(o,"load",K);return true};this.canPlayMIME=function(c){var a;if(b.hasHTML5)a=T({type:c});return!H||a?a:c?c.match(b.mimePattern)?true:false:null};this.canPlayURL=function(c){var a;if(b.hasHTML5)a=T(c);return!H||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 g=b.sounds[c];!g&&!a&&b._wD('"'+c+'" is an invalid sound ID.',2);return g};this.onready=function(c,a){if(c&&c instanceof Function){s&&l("queue","onready");a||(a=o);la("onready",c,a);F();return true}else throw q("needFunction","onready");};this.ontimeout=function(c,a){if(c&&c instanceof Function){s&&l("queue");a||(a=o);la("ontimeout",c,a);F({type:"ontimeout"});return true}else throw q("needFunction","ontimeout");};this.getMoviePercent=function(){return b.o&&typeof b.o.PercentLoaded!=="undefined"?
b.o.PercentLoaded():null};this._wD=this._writeDebug=function(c,a,g){var h,e;if(!b.debugMode)return false;if(typeof g!=="undefined"&&g)c=c+" | "+(new Date).getTime();if(ga&&b.useConsole){g=Wa[a];typeof console[g]!=="undefined"?console[g](c):console.log(c);if(b.useConsoleOnly)return true}try{h=v("soundmanager-debug");if(!h)return false;e=k.createElement("div");if(++Va%2===0)e.className="sm2-alt";a=typeof a==="undefined"?0:parseInt(a,10);e.appendChild(k.createTextNode(c));if(a){if(a>=2)e.style.fontWeight=
"bold";if(a===3)e.style.color="#ff3333"}h.insertBefore(e,h.firstChild)}catch(d){}return true};this._debug=function(){l("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...");var c,a;for(c=b.soundIDs.length;c--;)b.sounds[b.soundIDs[c]].destruct();try{if(B)qa=b.o.innerHTML;S=b.o.parentNode.removeChild(b.o);b._wD("Flash movie removed.")}catch(g){l("badRemove",
2)}qa=S=null;b.enabled=s=ea=ta=J=P=A=b.swfLoaded=false;b.soundIDs=b.sounds=[];b.o=null;for(c in C)if(C.hasOwnProperty(c))for(a=C[c].length;a--;)C[c][a].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(){ka=true;L();setTimeout(Ca,20);Z()};this._html5_events={abort:r(function(){b._wD(m+"abort: "+this._t.sID)}),canplay:r(function(){b._wD(m+"canplay: "+
this._t.sID+", "+this._t.url);this._t._onbufferchange(0);var c=!isNaN(this._t.position)?this._t.position/1E3:null;this._t._html5_canplay=true;if(this._t.position&&this.currentTime!==c){b._wD(m+"canplay: setting position to "+c+"");try{this.currentTime=c}catch(a){b._wD(m+"setting position failed: "+a.message,2)}}}),load:r(function(){if(!this._t.loaded){this._t._onbufferchange(0);this._t._whileloading(this._t.bytesTotal,this._t.bytesTotal,this._t._get_html5_duration());this._t._onload(true)}}),emptied:r(function(){b._wD(m+
"emptied: "+this._t.sID)}),ended:r(function(){b._wD(m+"ended: "+this._t.sID);this._t._onfinish()}),error:r(function(){b._wD(m+"error: "+this.error.code);this._t._onload(false)}),loadeddata:r(function(){b._wD(m+"loadeddata: "+this._t.sID)}),loadedmetadata:r(function(){b._wD(m+"loadedmetadata: "+this._t.sID)}),loadstart:r(function(){b._wD(m+"loadstart: "+this._t.sID);this._t._onbufferchange(1)}),play:r(function(){b._wD(m+"play: "+this._t.sID+", "+this._t.url);this._t._onbufferchange(0)}),playing:r(function(){b._wD(m+
"playing: "+this._t.sID+", "+this._t.url);this._t._onbufferchange(0)}),progress:r(function(c){if(this._t.loaded)return false;var a,g,h;h=0;var e=c.type==="progress";g=c.target.buffered;var d=c.loaded||0,f=c.total||1;if(g&&g.length){for(a=g.length;a--;)h=g.end(a)-g.start(a);d=h/c.target.duration;if(e&&g.length>1){h=[];g=g.length;for(a=0;a<g;a++)h.push(c.target.buffered.start(a)+"-"+c.target.buffered.end(a));b._wD(m+"progress: timeRanges: "+h.join(", "))}e&&b._wD(m+"progress: "+this._t.sID+": "+Math.floor(d*
100)+"% loaded")}this._t._onbufferchange(0);this._t._whileloading(d,f,this._t._get_html5_duration());d&&f&&d===f&&b._html5_events.load.call(this,c)}),ratechange:r(function(){b._wD(m+"ratechange: "+this._t.sID)}),suspend:r(function(c){b._wD(m+"suspend: "+this._t.sID);b._html5_events.progress.call(this,c)}),stalled:r(function(){b._wD(m+"stalled: "+this._t.sID)}),timeupdate:r(function(){this._t._onTimer()}),waiting:r(function(){b._wD(m+"waiting: "+this._t.sID);this._t._onbufferchange(1)})};La={0:"NETWORK_EMPTY",
1:"NETWORK_IDLE",2:"NETWORK_LOADING",3:"NETWORK_LOADED",4:"NETWORK_NO_SOURCE"};Ma={0:"HAVE_NOTHING",1:"HAVE_METADATA",2:"HAVE_CURRENT_DATA",3:"HAVE_FUTURE_DATA",4:"HAVE_ENOUGH_DATA"};Na={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};ha=function(c){var a=this,g,h,e;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._a=null;
this.id3={};this._debug=function(){if(b.debugMode){var d=null,f=[],i,j;for(d in a.options)if(a.options[d]!==null)if(a.options[d]instanceof Function){i=a.options[d].toString();i=i.replace(/\s\s+/g," ");j=i.indexOf("{");f.push(" "+d+": {"+i.substr(j+1,Math.min(Math.max(i.indexOf("\n")-1,64),64)).replace(/\n/g,"")+"... }")}else f.push(" "+d+": "+a.options[d]);b._wD("SMSound() merged options: {\n"+f.join(", \n")+"\n}")}};this._debug();this.load=function(d){var f=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){l("manURL");a._iO.url=a.url;a.url=null}}if(!a._iO.url)a._iO.url=a.url;b._wD("SMSound.load(): "+a._iO.url,1);if(a._iO.url===a.url&&a.readyState!==0&&a.readyState!==2){l("onURL",1);return a}a._lastURL=a.url;a.loaded=false;a.readyState=1;a.playState=0;if(fa(a._iO)){f=a._setup_html5(a._iO);if(f._called_load)b._wD("HTML5 ignoring request to load again: "+a.sID);else{b._wD(m+"load: "+a.sID);
f.load();f._called_load=true;a._iO.autoPlay&&a.play()}}else try{a.isHTML5=false;a._iO=da(ca(a._iO));n===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(i){l("smError",2);z("onload",false);pa()}return a};this.unload=function(){if(a.readyState!==0){b._wD('SMSound.unload(): "'+a.sID+'"');if(a.isHTML5){h();
if(a._a){a._a.pause();a._a.src=""}}else n===8?b.o._unload(a.sID,b.nullURL):b.o._unload(a.sID);g()}return a};this.destruct=function(d){b._wD('SMSound.destruct(): "'+a.sID+'"');if(a.isHTML5){h();if(a._a){a._a.pause();a._a.src="";U||a._remove_html5_events()}}else{a._iO.onfailure=null;b.o._destroySound(a.sID)}d||b.destroySound(a.sID,true)};this.start=this.play=function(d,f){var i;f=f===undefined?true:f;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(fa(a._iO)){a._setup_html5(a._iO);e()}if(a.playState===1&&!a.paused)if(i=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._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||n>8&&!a.isHTML5&&!a.getAutoPlay())a.instanceCount++;a.position=typeof a._iO.position!=="undefined"&&
!isNaN(a._iO.position)?a._iO.position:0;if(!a.isHTML5)a._iO=da(ca(a._iO));if(a._iO.onplay&&f){a._iO.onplay.apply(a);a._onplay_called=true}a.setVolume(a._iO.volume,true);a.setPan(a._iO.pan,true);if(a.isHTML5){e();a._setup_html5().play()}else b.o._start(a.sID,a._iO.loops||1,n===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(a._a){a.setPosition(0);
a._a.pause();a.playState=0;a._onTimer();h();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;if(a.isHTML5)a._a&&d&&a.play();else 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;var f=a.isHTML5?Math.max(d,0):Math.min(a.duration||a._iO.duration,Math.max(d,0));a.position=f;d=a.position/1E3;a.resetOnPosition(a.position);a._iO.position=f;if(a.isHTML5){if(a._a)if(a._html5_canplay){if(a._a.currentTime!==d){b._wD("setPosition("+d+"): setting position");try{a._a.currentTime=d}catch(i){b._wD("setPosition("+d+"): setting position failed: "+i.message,2)}}}else b._wD("setPosition("+d+"): delaying, sound not ready")}else{d=n===9?a.position:d;b.o._setPosition(a.sID,
d,a.paused||!a.playState)}a.isHTML5&&a.paused&&a._onTimer(true);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();h()}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();e()}else{b.o._pause(a.sID);a._iO.isMovieStar&&
Qa&&a.setPosition(a.position)}if(!a._onplay_called&&a._iO.onplay){a._iO.onplay.apply(a);a._onplay_called=true}else a._iO.onresume&&a._iO.onresume.apply(a);return a};this.togglePause=function(){b._wD("SMSound.togglePause()");if(a.playState===0){a.play({position:n===9&&!a.isHTML5?a.position:a.position/1E3});return a}a.paused?a.resume():a.pause();return a};this.setPan=function(d,f){if(typeof d==="undefined")d=0;if(typeof f==="undefined")f=false;a.isHTML5||b.o._setPan(a.sID,d);a._iO.pan=d;if(!f)a.pan=
d;return a};this.setVolume=function(d,f){if(typeof d==="undefined")d=100;if(typeof f==="undefined")f=false;if(a.isHTML5){if(a._a)a._a.volume=d/100}else b.o._setVolume(a.sID,b.muted&&!a.muted||a.muted?0:d);a._iO.volume=d;if(!f)a.volume=d;return a};this.mute=function(){a.muted=true;if(a.isHTML5){if(a._a)a._a.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(a._a)a._a.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,f,i){a._onPositionItems.push({position:d,method:f,scope:typeof i!=="undefined"?i:a,fired:false});return a};this.processOnPosition=function(){var d,f;d=a._onPositionItems.length;if(!d||!a.playState||a._onPositionFired>=d)return false;for(d=d;d--;){f=a._onPositionItems[d];if(!f.fired&&a.position>=f.position){f.method.apply(f.scope,[f.position]);f.fired=true;b._onPositionFired++}}return true};
this.resetOnPosition=function(d){var f,i;f=a._onPositionItems.length;if(!f)return false;for(f=f;f--;){i=a._onPositionItems[f];if(i.fired&&d<=i.position){i.fired=false;b._onPositionFired--}}return true};this._onTimer=function(d){var f={};if(a._hasTimer||d)if(a._a&&(d||(a.playState>0||a.readyState===1)&&!a.paused)){a.duration=a._get_html5_duration();a.durationEstimate=a.duration;d=a._a.currentTime?a._a.currentTime*1E3:0;a._whileplaying(d,f,f,f,f);return true}else{b._wD('_onTimer: Warn for "'+a.sID+
'": '+(!a._a?"Could not find element. ":"")+(a.playState===0?"playState bad, 0?":"playState = "+a.playState+", OK"));return false}};this._get_html5_duration=function(){var d=a._a?a._a.duration*1E3:a._iO?a._iO.duration:undefined;return d&&!isNaN(d)&&d!==Infinity?d:a._iO?a._iO.duration:null};e=function(){a.isHTML5&&Ga(a)};h=function(){a.isHTML5&&Ha(a)};g=function(){a._onPositionItems=[];a._onPositionFired=0;a._hasTimer=null;a._onplay_called=false;a._a=null;a._html5_canplay=false;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=[]};g();this._setup_html5=function(d){d=w(a._iO,d);var f=decodeURI,i=U?b._global_a:a._a;
if(i){if(i._t&&f(i.src)===f(d.url))return i;b._wD("setting new URL on existing object: "+d.url);U&&i._t.playState&&i._t&&i._t.url&&f(i._t.url)!==f(d.url)&&i._t.stop();i.src=d.url}else{b._wD("creating HTML5 Audio() element with URL: "+d.url);i=new Audio(d.url);if(U)b._global_a=i}i._called_load=false;a.isHTML5=true;a._a=i;i._t=a;a._add_html5_events();i.loop=d.loops>1?"loop":"";if(d.autoLoad||d.autoPlay){i.autobuffer="auto";i.preload="auto";a.load()}else{i.autobuffer=false;i.preload="none"}i.loop=d.loops>
1?"loop":"";return i};this._add_html5_events=function(){if(a._a._added_events)return false;var d;b._wD(m+"adding event listeners: "+a.sID);a._a._added_events=true;for(d in b._html5_events)b._html5_events.hasOwnProperty(d)&&a._a&&a._a.addEventListener(d,b._html5_events[d],false);if(!a._a._debug_interval){a._a._debug_last_values={};a._a._debug_interval=setInterval(function(){var f=a._a,i,j;if(f&&f._t){i=f.readyState;j=f.networkState;if(f._debug_last_values.readyState!==i){f._debug_last_values.readyState=
i;b._wD(m+"readyState "+(Ma[i]||i)+", sound "+a.sID)}if(f._debug_last_values.networkState!==j){f._debug_last_values.networkState=j;b._wD(m+"networkState "+(La[j]||j)+", sound "+a.sID)}if(f.error&&f._debug_last_values.errorCode!==f.error.code){i=f.error.code;f._debug_last_values.errorCode=i;b._wD(m+"errorCode "+(Na[i]||i)+", sound "+a.sID)}}},50)}return true};this._remove_html5_events=function(){b._wD(m+"removing event listeners: "+a.sID);a._a._added_events=false;for(var d in b._html5_events)b._html5_events.hasOwnProperty(d)&&
a._a&&a._a.removeEventListener(d,b._html5_events[d],false);if(a._a._debug_interval){clearInterval(a._a._debug_interval);a._a._debug_interval=undefined}};this._whileloading=function(d,f,i,j){a.bytesLoaded=d;a.bytesTotal=f;a.duration=Math.floor(i);a.bufferLength=j;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.readyState!==3&&a._iO.whileloading&&a._iO.whileloading.apply(a)};this._onid3=function(d,f){b._wD('SMSound._onid3(): "'+this.sID+'" ID3 data received.');var i=[],j,p;j=0;for(p=d.length;j<p;j++)i[d[j]]=f[j];a.id3=w(a.id3,i);a._iO.onid3&&a._iO.onid3.apply(a)};this._whileplaying=function(d,f,i,j,p){if(isNaN(d)||d===null)return false;if(a.playState===0&&d>0)d=0;a.position=d;a.processOnPosition();if(n>8&&!a.isHTML5){if(a._iO.usePeakData&&typeof f!=="undefined"&&f)a.peakData={left:f.leftPeak,
right:f.rightPeak};if(a._iO.useWaveformData&&typeof i!=="undefined"&&i)a.waveformData={left:i.split(","),right:j.split(",")};if(a._iO.useEQData)if(typeof p!=="undefined"&&p&&p.leftEQ){d=p.leftEQ.split(",");a.eqData=d;a.eqData.left=d;if(typeof p.rightEQ!=="undefined"&&p.rightEQ)a.eqData.right=p.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;if(t(a.sID))if(a.getAutoPlay())a.play(undefined,a.getAutoPlay());else a._iO.autoLoad&&a.load();a._iO.onconnect&&a._iO.onconnect.apply(a,[d])}};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,f,i){a.failures++;b._wD('SMSound._onfailure(): "'+a.sID+'" count '+a.failures);a._iO.onfailure&&a.failures===1?a._iO.onfailure(a,d,f,i):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._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={};h()}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 k.body?k.body:k._docElement?k.documentElement:k.getElementsByTagName("div")[0]};v=function(c){return k.getElementById(c)};w=function(c,a){var g={},h,e;for(h in c)if(c.hasOwnProperty(h))g[h]=c[h];h=typeof a==="undefined"?b.defaultOptions:a;for(e in h)if(h.hasOwnProperty(e)&&typeof g[e]==="undefined")g[e]=
h[e];return g};u=function(){function c(e){e=Ka.call(e);var d=e.length;if(g){e[1]="on"+e[1];d>3&&e.pop()}else d===3&&e.push(false);return e}function a(e,d){var f=e.shift(),i=[h[d]];g?f[i](e[0],e[1]):f[i].apply(f,e)}var g=o.attachEvent,h={add:g?"attachEvent":"addEventListener",remove:g?"detachEvent":"removeEventListener"};return{add:function(){a(c(arguments),"add")},remove:function(){a(c(arguments),"remove")}}}();fa=function(c){return!c.serverURL&&(c.type?T({type:c.type}):T(c.url)||x)};T=function(c){if(!b.useHTML5Audio||
!b.hasHTML5)return false;var a,g=b.audioFormats;if(!D){D=[];for(a in g)if(g.hasOwnProperty(a)){D.push(a);if(g[a].related)D=D.concat(g[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){c=a.indexOf(";");c=(c!==-1?a.substr(0,c):a).substr(6)}else 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}};Ja=function(){function c(f){var i,j,p=false;if(!a||typeof a.canPlayType!=="function")return false;if(f instanceof Array){i=0;for(j=f.length;i<j&&!p;i++)if(b.html5[f[i]]||a.canPlayType(f[i]).match(b.html5Test)){p=true;b.html5[f[i]]=true}return p}else return(f=a&&typeof a.canPlayType==="function"?a.canPlayType(f):false)&&(f.match(b.html5Test)?true:false)}if(!b.useHTML5Audio||typeof Audio==="undefined")return false;var a=typeof Audio!=="undefined"?
new Audio:null,g,h={},e,d;va();e=b.audioFormats;for(g in e)if(e.hasOwnProperty(g)){h[g]=c(e[g].type);if(e[g]&&e[g].related)for(d=e[g].related.length;d--;)b.html5[e[g].related[d]]=h[g]}h.canPlayType=a?c:null;b.html5=w(b.html5,h);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 ("+k.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: Function object expected for %s",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: Queueing %s 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"};
q=function(){var c=Ka.call(arguments),a=c.shift();a=$&&$[a]?$[a]:"";var g,h;if(a&&c&&c.length){g=0;for(h=c.length;g<h;g++)a=a.replace("%s",c[g])}return a};ca=function(c){if(n===8&&c.loops>1&&c.stream){l("as2loop");c.stream=false}return c};da=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};sa=function(c){typeof console!=="undefined"&&typeof console.warn!=="undefined"?console.warn(c):b._wD(c)};
ia=function(){return false};Ea=function(c){for(var a in c)if(c.hasOwnProperty(a)&&typeof c[a]==="function")c[a]=ia};ba=function(c){if(typeof c==="undefined")c=false;if(A||c){l("smFail",2);b.disable(c)}};Fa=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};na=function(){if(n!==8&&n!==9){b._wD(q("badFV",
n,8));b.flashVersion=8}var c=b.debugMode||b.debugFlash?"_debug.swf":".swf";if(b.useHTML5Audio&&!x&&b.audioFormats.mp4.required&&b.flashVersion<9){b._wD(q("needfl9"));b.flashVersion=9}n=b.flashVersion;b.version=b.versionNumber+(x?" (HTML5-only mode)":n===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(n>8){b.defaultOptions=w(b.defaultOptions,b.flash9Options);b.features.buffering=true}if(n>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.useMovieStar=false;b.features.movieStar=false}b.filePattern=b.filePatterns[n!==8?"flash9":"flash8"];b.movieURL=(n===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",c);b.features.peakData=b.features.waveformData=b.features.eqData=n>8};Da=function(c,a){if(!b.o||!b.allowPolling)return false;b.o._setPolling(c,a)};aa=function(c,a){function g(){b._wD("-- SoundManager 2 "+b.version+(!x&&b.useHTML5Audio?
b.hasHTML5?" + HTML5 audio":", no HTML5 audio support":"")+(!x?(b.useMovieStar?", MovieStar mode":"")+(b.useHighPerformance?", high performance mode, ":", ")+((b.flashPollingInterval?"custom ("+b.flashPollingInterval+"ms)":b.useFastPolling?"fast":"normal")+" polling")+(b.wmode?", wmode: "+b.wmode:"")+(b.debugFlash?", flash debug mode":"")+(b.useFlashBlock?", flashBlock mode":""):"")+" --",1)}var h=a?a:b.url,e=b.altURL?b.altURL:h,d;d=X();var f,i,j=M(),p,W=null;W=(W=k.getElementsByTagName("html")[0])&&
W.dir&&W.dir.match(/rtl/i);c=typeof c==="undefined"?b.id:c;if(J&&P)return false;if(x){na();g();b.oMC=v(b.movieID);Y();P=J=true;return false}J=true;na();b.url=Fa(b._overHTTP?h: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;l("spcWmode");b.wmode=null}d={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)d.FlashVars="debug=1";b.wmode||delete d.wmode;if(B){h=k.createElement("div");i='<object id="'+c+'" data="'+a+'" type="'+d.type+'" width="'+d.width+'" height="'+d.height+'"><param name="movie" value="'+a+'" /><param name="AllowScriptAccess" value="'+b.allowScriptAccess+'" /><param name="quality" value="'+d.quality+'" />'+(b.wmode?'<param name="wmode" value="'+b.wmode+'" /> ':
"")+'<param name="bgcolor" value="'+b.bgColor+'" />'+(b.debugFlash?'<param name="FlashVars" value="'+d.FlashVars+'" />':"")+"<!-- --\></object>"}else{h=k.createElement("embed");for(f in d)d.hasOwnProperty(f)&&h.setAttribute(f,d[f])}za();j=M();if(d=X()){b.oMC=v(b.movieID)?v(b.movieID):k.createElement("div");if(b.oMC.id){p=b.oMC.className;b.oMC.className=(p?p+" ":b.swfCSS.swfDefault)+(j?" "+j:"");b.oMC.appendChild(h);if(B){f=b.oMC.appendChild(k.createElement("div"));f.className=b.swfCSS.swfBox;f.innerHTML=
i}P=true}else{b.oMC.id=b.movieID;b.oMC.className=b.swfCSS.swfDefault+" "+j;f=j=null;if(!b.useFlashBlock)if(b.useHighPerformance)j={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden",hasPriority:"true"};else{j={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px",hasPriority:"true"};if(W)j.left=Math.abs(parseInt(j.left,10))+"px"}if(Qa)b.oMC.style.zIndex=1E4;if(!b.debugFlash)for(p in j)if(j.hasOwnProperty(p))b.oMC.style[p]=j[p];try{B||b.oMC.appendChild(h);
d.appendChild(b.oMC);if(B){f=b.oMC.appendChild(k.createElement("div"));f.className=b.swfCSS.swfBox;f.innerHTML=i}P=true}catch(Ya){throw Error(q("appXHTML"));}}}g();b._wD("soundManager::createMovie(): Trying to load "+a+(!b._overHTTP&&b.altURL?" (alternate URL)":""),1);return true};t=this.getSoundById;R=function(){if(x){aa();return false}if(b.o)return false;b.o=b.getMovie(b.id);if(!b.o){if(S){if(B)b.oMC.innerHTML=qa;else b.oMC.appendChild(S);S=null;J=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 ("+(J?"created via JS":"static HTML")+")");l("waitEI")}b.oninitmovie instanceof Function&&setTimeout(b.oninitmovie,1);return true};ma=function(c){if(c)b.url=c;R()};Z=function(){setTimeout(Ba,500)};Ba=function(){if(ea)return false;ea=true;u.remove(o,"load",Z);if(O&&!xa){l("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 "+n+"+ not present?), ":"")+"Flash blocked or JS-Flash security error."+(b.debugFlash?" "+q("checkSWF"):""),2);if(!b._overHTTP&&c){l("localFail",2);b.debugFlash||l("tryDebug",2)}c===0&&b._wD(q("swf404",b.url));z("flashtojs",false,": Timed out"+b._overHTTP?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)")}if(!s&&Ra)if(c===null)if(b.useFlashBlock||b.flashLoadTimeout===0){b.useFlashBlock&&ra();l("waitForever")}else ba(true);
else b.flashLoadTimeout===0?l("waitForever"):ba(true)},b.flashLoadTimeout)};ma=function(c){if(c)b.url=c;R()};l=function(c,a){return c?b._wD(q(c),a):""};if(I.indexOf("debug=alert")+1&&b.debugMode)b._wD=function(c){E.alert(c)};Aa=function(){var c=v(b.debugID),a=v(b.debugID+"-toggle");if(!c)return false;if(ja){a.innerHTML="+";c.style.display="none"}else{a.innerHTML="-";c.style.display="block"}ja=!ja};z=function(c,a,g){if(typeof sm2Debugger!=="undefined")try{sm2Debugger.handleEvent(c,a,g)}catch(h){}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(" ")};ra=function(){var c=q("fbHandler"),a=b.getMoviePercent(),g=b.swfCSS;if(b.ok()){b.didFlashBlock&&b._wD(c+": Unblocked");if(b.oMC)b.oMC.className=[M(),g.swfDefault,g.swfLoaded+(b.didFlashBlock?" "+g.swfUnblocked:"")].join(" ")}else{if(H){b.oMC.className=M()+" "+g.swfDefault+" "+(a===null?g.swfTimedout:g.swfError);b._wD(c+": "+q("fbTimeout")+
(a?" ("+q("fbLoaded")+")":""))}b.didFlashBlock=true;F({type:"ontimeout",ignoreInit:true});b.onerror instanceof Function&&b.onerror.apply(o)}};G=function(){function c(){u.remove(o,"focus",G);u.remove(o,"load",G)}if(xa||!O){c();return true}xa=Ra=true;b._wD("soundManager::handleFocus()");V&&O&&u.remove(o,"mousemove",G);ea=false;c();return true};Q=function(c){if(s)return false;if(x){b._wD("-- SoundManager 2: loaded --");s=true;F();K();return true}b.useFlashBlock&&b.flashLoadTimeout&&!b.getMoviePercent()||
(s=true);b._wD("-- SoundManager 2 "+(A?"failed to load":"loaded")+" ("+(A?"security/load error":"OK")+") --",1);if(A||c){if(b.useFlashBlock)b.oMC.className=M()+" "+(b.getMoviePercent()===null?b.swfCSS.swfTimedout:b.swfCSS.swfError);F({type:"ontimeout"});z("onload",false);b.onerror instanceof Function&&b.onerror.apply(o);return false}else z("onload",true);u.add(E,"unload",ia);if(b.waitForWindowLoad&&!ka){l("waitOnload");u.add(o,"load",K);return false}else{b.waitForWindowLoad&&ka&&l("docLoaded");K()}return true};
la=function(c,a,g){if(typeof C[c]==="undefined")C[c]=[];C[c].push({method:a,scope:g||null,fired:false})};F=function(c){c||(c={type:"onready"});if(!s&&c&&!c.ignoreInit)return false;var a={success:c&&c.ignoreInit?b.ok():!A},g=c&&c.type?C[c.type]||[]:[],h=[],e,d=H&&b.useFlashBlock&&!b.ok();for(e=0;e<g.length;e++)g[e].fired!==true&&h.push(g[e]);if(h.length){b._wD("soundManager: Firing "+h.length+" "+c.type+"() item"+(h.length===1?"":"s"));e=0;for(c=h.length;e<c;e++){h[e].scope?h[e].method.apply(h[e].scope,
[a]):h[e].method(a);if(!d)h[e].fired=true}}return true};K=function(){o.setTimeout(function(){b.useFlashBlock&&ra();F();if(b.onload instanceof Function){l("onload",1);b.onload.apply(o);l("onloadOK",1)}b.waitForWindowLoad&&u.add(o,"load",K)},1)};va=function(){if(N!==undefined)return N;var c=false,a=navigator,g=a.plugins,h,e=E.ActiveXObject;if(g&&g.length){if((a=a.mimeTypes)&&a["application/x-shockwave-flash"]&&a["application/x-shockwave-flash"].enabledPlugin&&a["application/x-shockwave-flash"].enabledPlugin.description)c=
true}else if(typeof e!=="undefined"){try{h=new e("ShockwaveFlash.ShockwaveFlash")}catch(d){}c=!!h}return c};Ia=function(){var c,a;if(y.match(/iphone os (1|2|3_0|3_1)/i)?true:false){b.hasHTML5=false;x=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(wa){N=va();b._wD("soundManager::Note: Buggy HTML5 Audio in Safari on OS X 10.6.[3|4|5], see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+
(!N?" would use flash fallback for MP3/MP4, but none detected.":"will use flash fallback for MP3/MP4, if available"),1);if(N)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;x=b.useHTML5Audio&&b.hasHTML5&&!c&&!b.requireFlash;return c};Y=function(){var c,a=[];l("init");if(s){l("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(x){if(!s){u.remove(o,"load",b.beginDelayedInit);b.enabled=true;Q()}return true}R();try{l("flashJS");b.o._externalInterfaceTest(false);b.allowPolling?Da(true,b.flashPollingInterval?b.flashPollingInterval:b.useFastPolling?10:50):l("noPolling",1);b.debugMode||b.o._disableDebug();b.enabled=true;z("jstoflash",true)}catch(g){b._wD("js/flash exception: "+g.toString());z("jstoflash",false);
ba(true);Q();return false}Q();u.remove(o,"load",b.beginDelayedInit);return true};Ca=function(){if(ta)return false;aa();R();return ta=true};L=function(){if(oa)return false;oa=true;za();Ja();b.html5.usingFlash=Ia();H=b.html5.usingFlash;oa=true;k.removeEventListener&&k.removeEventListener("DOMContentLoaded",L,false);ma();return true};Ga=function(c){if(!c._hasTimer)c._hasTimer=true};Ha=function(c){if(c._hasTimer)c._hasTimer=false};pa=function(){b.onerror instanceof Function&&b.onerror();b.disable()};
Oa=function(){if(!wa||!N)return false;var c=b.audioFormats,a,g;for(g in c)if(c.hasOwnProperty(g))if(g==="mp3"||g==="mp4"){b._wD("soundManager: Using flash fallback for "+g+" format");b.html5[g]=false;if(c[g]&&c[g].related)for(;a--;)b.html5[c[g].related[a]]=false}};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;l("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)":""));z("swf",true);z("flashtojs",true);b.swfLoaded=true;O=false;wa&&Oa();B?setTimeout(Y,100):Y()};ua=function(){if(k.readyState==="complete"){L();k.detachEvent("onreadystatechange",ua)}return true};if(!b.hasHTML5||
H){u.add(o,"focus",G);u.add(o,"load",G);u.add(o,"load",Z);V&&O&&u.add(o,"mousemove",G)}if(k.addEventListener)k.addEventListener("DOMContentLoaded",L,false);else if(k.attachEvent)k.attachEvent("onreadystatechange",ua);else{z("onload",false);pa()}k.readyState==="complete"&&setTimeout(L,100)}var Sa=null;if(typeof SM2_DEFER==="undefined"||!SM2_DEFER)Sa=new ya;E.SoundManager=ya;E.soundManager=Sa})(window);

