(function(a){function c(b,c){function ca(a){return function(b){var c=this._t;if(!c||!c._a){if(c&&c.sID){e._wD(i+"ignoring "+b.type+": "+c.sID)}else{e._wD(i+"ignoring "+b.type)}return null}else{return a.call(this,b)}}}this.flashVersion=8;this.debugMode=true;this.debugFlash=false;this.useConsole=true;this.consoleOnly=true;this.waitForWindowLoad=false;this.bgColor="#ffffff";this.useHighPerformance=false;this.flashPollingInterval=null;this.html5PollingInterval=null;this.flashLoadTimeout=1e3;this.wmode=null;this.allowScriptAccess="always";this.useFlashBlock=false;this.useHTML5Audio=true;this.html5Test=/^(probably|maybe)$/i;this.preferFlash=true;this.noSWFCache=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:false},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,autoPlay:false,from:null,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfailure:null,onfinish:null,multiShot:true,multiShotEvents:false,position:null,pan:0,stream:true,to:null,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.movieID="sm2-container";this.id=c||"sm2movie";this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.versionNumber="V2.97a.20111220";this.version=null;this.movieURL=null;this.url=b||null;this.altURL=null;this.swfLoaded=false;this.enabled=false;this.oMC=null;this.sounds={};this.soundIDs=[];this.muted=false;this.didFlashBlock=false;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};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=function(){try{return typeof Audio!=="undefined"&&typeof (new Audio).canPlayType!=="undefined"}catch(a){return false}}();this.html5={usingFlash:null};this.flash={};this.html5Only=false;this.ignoreFlash=false;var d,e=this,f=null,g="soundManager",h=g+"::",i="HTML5::",j,k=navigator.userAgent,l=a,m=l.location.href.toString(),n=document,o,p,q,r=[],s=true,t,u=false,v=false,w=false,x=false,y=false,z,A=0,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U=["log","info","warn","error"],V=8,W,X,Y,Z=null,$=null,_,ba,bb,bc,bd,be,bf,bg,bh,bi=false,bj=false,bk,bl,bm,bn,bo,bp=0,bq=null,br,bs=null,bt,bu,bv,bw,bx,by,bz,bA,bB=Array.prototype.slice,bC=false,bD,bE,bF,bG,bH,bI=k.match(/(ipad|iphone|ipod)/i),bJ=k.match(/firefox/i),bK=k.match(/droid/i),bL=k.match(/msie/i),bM=k.match(/webkit/i),bN=k.match(/safari/i)&&!k.match(/chrome/i),bO=k.match(/opera/i),bP=k.match(/(mobile|pre\/|xoom)/i)||bI,bQ=!m.match(/usehtml5audio/i)&&!m.match(/sm2\-ignorebadua/i)&&bN&&!k.match(/silk/i)&&k.match(/OS X 10_6_([3-7])/i),bR=typeof console!=="undefined"&&typeof console.log!=="undefined",bS=typeof n.hasFocus!=="undefined"?n.hasFocus():null,bT=bN&&typeof n.hasFocus==="undefined",bU=!bT,bV=/(mp3|mp4|mpa)/i,bW="about:blank",bX=n.location?n.location.protocol.match(/http/i):null,bY=!bX?"http:/"+"/":"",bZ=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|mp4v|3gp|3g2)\s*(?:$|;)/i,b$=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","mp4v","3gp","3g2"],b_=new RegExp("\\.("+b$.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.useAltURL=!bX;this._global_a=null;bc={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"};if(bP){e.useHTML5Audio=true;e.preferFlash=false;if(bI){e.ignoreFlash=true;bC=true}}this.ok=function(){return bs?w&&!x:e.useHTML5Audio&&e.hasHTML5};this.supported=this.ok;this.getMovie=function(a){return j(a)||n[a]||l[a]};this.createSound=function(a){function k(){h=be(h);e.sounds[j.id]=new d(j);e.soundIDs.push(j.id);return e.sounds[j.id]}var b,c,h=null,i=null,j=null;b=g+".createSound(): ";c=b+_(!w?"notReady":"notOK");if(!w||!e.ok()){bg(c);return false}if(arguments.length===2){a={id:arguments[0],url:arguments[1]}}h=C(a);h.url=br(h.url);j=h;if(j.id.toString().charAt(0).match(/^[0-9]$/)){e._wD(b+_("badID",j.id),2)}e._wD(b+j.id+" ("+j.url+")",1);if(bh(j.id,true)){e._wD(b+j.id+" exists",1);return e.sounds[j.id]}if(bu(j)){i=k();e._wD("Loading sound "+j.id+" via HTML5");i._setup_html5(j)}else{if(q>8){if(j.isMovieStar===null){j.isMovieStar=j.serverURL||(j.type?j.type.match(bZ):false)||j.url.match(b_)}if(j.isMovieStar){e._wD(b+"using MovieStar handling")}if(j.isMovieStar){if(j.usePeakData){z("noPeak");j.usePeakData=false}if(j.loops>1){z("noNSLoop")}}}j=bf(j,b);i=k();if(q===8){f._createSound(j.id,j.loops||1,j.usePolicyFile)}else{f._createSound(j.id,j.url,j.usePeakData,j.useWaveformData,j.useEQData,j.isMovieStar,j.isMovieStar?j.bufferTime:false,j.loops||1,j.serverURL,j.duration||null,j.autoPlay,true,j.autoLoad,j.usePolicyFile);if(!j.serverURL){i.connected=true;if(j.onconnect){j.onconnect.apply(i)}}}if(!j.serverURL&&(j.autoLoad||j.autoPlay)){i.load(j)}}if(!j.serverURL&&j.autoPlay){i.play()}return i};this.destroySound=function(a,b){if(!bh(a)){return false}var c=e.sounds[a],d;c._iO={};c.stop();c.unload();for(d=0;d<e.soundIDs.length;d++){if(e.soundIDs[d]===a){e.soundIDs.splice(d,1);break}}if(!b){c.destruct(true)}c=null;delete e.sounds[a];return true};this.load=function(a,b){if(!bh(a)){return false}return e.sounds[a].load(b)};this.unload=function(a){if(!bh(a)){return false}return e.sounds[a].unload()};this.onPosition=function(a,b,c,d){if(!bh(a)){return false}return e.sounds[a].onposition(b,c,d)};this.onposition=this.onPosition;this.clearOnPosition=function(a,b,c){if(!bh(a)){return false}return e.sounds[a].clearOnPosition(b,c)};this.play=function(a,b){if(!w||!e.ok()){bg(g+".play(): "+_(!w?"notReady":"notOK"));return false}if(!bh(a)){if(!(b instanceof Object)){b={url:b}}if(b&&b.url){e._wD(g+'.play(): attempting to create "'+a+'"',1);b.id=a;return e.createSound(b).play()}else{return false}}return e.sounds[a].play(b)};this.start=this.play;this.setPosition=function(a,b){if(!bh(a)){return false}return e.sounds[a].setPosition(b)};this.stop=function(a){if(!bh(a)){return false}e._wD(g+".stop("+a+")",1);return e.sounds[a].stop()};this.stopAll=function(){var a;e._wD(g+".stopAll()",1);for(a in e.sounds){if(e.sounds.hasOwnProperty(a)){e.sounds[a].stop()}}};this.pause=function(a){if(!bh(a)){return false}return e.sounds[a].pause()};this.pauseAll=function(){var a;for(a=e.soundIDs.length;a--;){e.sounds[e.soundIDs[a]].pause()}};this.resume=function(a){if(!bh(a)){return false}return e.sounds[a].resume()};this.resumeAll=function(){var a;for(a=e.soundIDs.length;a--;){e.sounds[e.soundIDs[a]].resume()}};this.togglePause=function(a){if(!bh(a)){return false}return e.sounds[a].togglePause()};this.setPan=function(a,b){if(!bh(a)){return false}return e.sounds[a].setPan(b)};this.setVolume=function(a,b){if(!bh(a)){return false}return e.sounds[a].setVolume(b)};this.mute=function(a){var b=0;if(typeof a!=="string"){a=null}if(!a){e._wD(g+".mute(): Muting all sounds");for(b=e.soundIDs.length;b--;){e.sounds[e.soundIDs[b]].mute()}e.muted=true}else{if(!bh(a)){return false}e._wD(g+'.mute(): Muting "'+a+'"');return e.sounds[a].mute()}return true};this.muteAll=function(){e.mute()};this.unmute=function(a){var b;if(typeof a!=="string"){a=null}if(!a){e._wD(g+".unmute(): Unmuting all sounds");for(b=e.soundIDs.length;b--;){e.sounds[e.soundIDs[b]].unmute()}e.muted=false}else{if(!bh(a)){return false}e._wD(g+'.unmute(): Unmuting "'+a+'"');return e.sounds[a].unmute()}return true};this.unmuteAll=function(){e.unmute()};this.toggleMute=function(a){if(!bh(a)){return false}return e.sounds[a].toggleMute()};this.getMemoryUse=function(){var a=0;if(f&&q!==8){a=parseInt(f._getMemoryUse(),10)}return a};this.disable=function(a){var b;if(typeof a==="undefined"){a=false}if(x){return false}x=true;z("shutdown",1);for(b=e.soundIDs.length;b--;){W(e.sounds[e.soundIDs[b]])}B(a);bA.remove(l,"load",F);return true};this.canPlayMIME=function(a){var b;if(e.hasHTML5){b=bv({type:a})}if(!bs||b){return b}else{return a?!!((q>8?a.match(bZ):null)||a.match(e.mimePattern)):null}};this.canPlayURL=function(a){var b;if(e.hasHTML5){b=bv({url:a})}if(!bs||b){return b}else{return a?!!a.match(e.filePattern):null}};this.canPlayLink=function(a){if(typeof a.type!=="undefined"&&a.type){if(e.canPlayMIME(a.type)){return true}}return e.canPlayURL(a.href)};this.getSoundById=function(a,b){if(!a){throw new Error(g+".getSoundById(): sID is null/undefined")}var c=e.sounds[a];if(!c&&!b){e._wD('"'+a+'" is an invalid sound ID.',2)}return c};this.onready=function(a,b){var c="onready";if(a&&a instanceof Function){if(w){e._wD(_("queue",c))}if(!b){b=l}D(c,a,b);E();return true}else{throw _("needFunction",c)}};this.ontimeout=function(a,b){var c="ontimeout";if(a&&a instanceof Function){if(w){e._wD(_("queue",c))}if(!b){b=l}D(c,a,b);E({type:c});return true}else{throw _("needFunction",c)}};this._writeDebug=function(a,b,c){var d="soundmanager-debug",f,g,h;if(!e.debugMode){return false}if(typeof c!=="undefined"&&c){a=a+" | "+(new Date).getTime()}if(bR&&e.useConsole){h=U[b];if(typeof console[h]!=="undefined"){console[h](a)}else{console.log(a)}if(e.consoleOnly){return true}}try{f=j(d);if(!f){return false}g=n.createElement("div");if(++A%2===0){g.className="sm2-alt"}if(typeof b==="undefined"){b=0}else{b=parseInt(b,10)}g.appendChild(n.createTextNode(a));if(b){if(b>=2){g.style.fontWeight="bold"}if(b===3){g.style.color="#ff3333"}}f.insertBefore(g,f.firstChild)}catch(i){}f=null;return true};this._wD=this._writeDebug;this._debug=function(){var a,b;z("currentObj",1);for(a=0,b=e.soundIDs.length;a<b;a++){e.sounds[e.soundIDs[a]]._debug()}};this.reboot=function(){e._wD(g+".reboot()");if(e.soundIDs.length){e._wD("Destroying "+e.soundIDs.length+" SMSound objects...")}var a,b;for(a=e.soundIDs.length;a--;){e.sounds[e.soundIDs[a]].destruct()}try{if(bL){$=f.innerHTML}Z=f.parentNode.removeChild(f);e._wD("Flash movie removed.")}catch(c){z("badRemove",2)}$=Z=bs=null;e.enabled=O=w=bi=bj=u=v=x=e.swfLoaded=false;e.soundIDs=e.sounds=[];f=null;for(a in r){if(r.hasOwnProperty(a)){for(b=r[a].length;b--;){r[a][b].fired=false}}}e._wD(g+": Rebooting...");l.setTimeout(e.beginDelayedInit,20)};this.getMoviePercent=function(){return f&&typeof f.PercentLoaded!=="undefined"?f.PercentLoaded():null};this.beginDelayedInit=function(){y=true;M();setTimeout(function(){if(bj){return false}Q();L();bj=true;return true},20);G()};this.destruct=function(){e._wD(g+".destruct()");e.disable(true)};d=function(a){var b=this,c,d,g,h,j,k,l=false,m=[],n=0,o,p,r=null;var s={duration:null,time:null};this.sID=a.id;this.url=a.url;this.options=C(a);this.instanceOptions=this.options;this._iO=this.instanceOptions;this.pan=this.options.pan;this.volume=this.options.volume;this.isHTML5=false;this._a=null;this.id3={};this._debug=function(){if(e.debugMode){var a=null,c=[],d,f,g=64;for(a in b.options){if(b.options[a]!==null){if(b.options[a]instanceof Function){d=b.options[a].toString();d=d.replace(/\s\s+/g," ");f=d.indexOf("{");c.push(" "+a+": {"+d.substr(f+1,Math.min(Math.max(d.indexOf("\n")-1,g),g)).replace(/\n/g,"")+"... }")}else{c.push(" "+a+": "+b.options[a])}}}e._wD("SMSound() merged options: {\n"+c.join(", \n")+"\n}")}};this._debug();this.load=function(a){var c=null,d;if(typeof a!=="undefined"){b._iO=C(a,b.options);b.instanceOptions=b._iO}else{a=b.options;b._iO=a;b.instanceOptions=b._iO;if(r&&r!==b.url){z("manURL");b._iO.url=b.url;b.url=null}}if(!b._iO.url){b._iO.url=b.url}b._iO.url=br(b._iO.url);e._wD("SMSound.load(): "+b._iO.url,1);if(b._iO.url===b.url&&b.readyState!==0&&b.readyState!==2){z("onURL",1);if(b.readyState===3&&b._iO.onload){b._iO.onload.apply(b,[!!b.duration])}return b}d=b._iO;r=b.url;b.loaded=false;b.readyState=1;b.playState=0;if(bu(d)){c=b._setup_html5(d);if(!c._called_load){e._wD(i+"load: "+b.sID);b._html5_canplay=false;b._a.autobuffer="auto";b._a.preload="auto";c.load();c._called_load=true;if(d.autoPlay){b.play()}}else{e._wD(i+"ignoring request to load again: "+b.sID)}}else{try{b.isHTML5=false;b._iO=bf(be(d));d=b._iO;if(q===8){f._load(b.sID,d.url,d.stream,d.autoPlay,d.whileloading?1:0,d.loops||1,d.usePolicyFile)}else{f._load(b.sID,d.url,!!d.stream,!!d.autoPlay,d.loops||1,!!d.autoLoad,d.usePolicyFile)}}catch(g){z("smError",2);t("onload",false);R({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:true})}}return b};this.unload=function(){if(b.readyState!==0){e._wD('SMSound.unload(): "'+b.sID+'"');if(!b.isHTML5){if(q===8){f._unload(b.sID,bW)}else{f._unload(b.sID)}}else{h();if(b._a){b._a.pause();bx(b._a)}}c()}return b};this.destruct=function(a){e._wD('SMSound.destruct(): "'+b.sID+'"');if(!b.isHTML5){b._iO.onfailure=null;f._destroySound(b.sID)}else{h();if(b._a){b._a.pause();bx(b._a);if(!bC){g()}b._a._t=null;b._a=null}}if(!a){e.destroySound(b.sID,true)}};this.play=function(a,c){var d,g,h,i;d="SMSound.play(): ";c=c===undefined?true:c;if(!a){a={}}b._iO=C(a,b._iO);b._iO=C(b._iO,b.options);b._iO.url=br(b._iO.url);b.instanceOptions=b._iO;if(b._iO.serverURL&&!b.connected){if(!b.getAutoPlay()){e._wD(d+" Netstream not connected yet - setting autoPlay");b.setAutoPlay(true)}return b}if(bu(b._iO)){b._setup_html5(b._iO);j()}if(b.playState===1&&!b.paused){g=b._iO.multiShot;if(!g){e._wD(d+'"'+b.sID+'" already playing (one-shot)',1);return b}else{e._wD(d+'"'+b.sID+'" already playing (multi-shot)',1)}}if(!b.loaded){if(b.readyState===0){e._wD(d+'Attempting to load "'+b.sID+'"',1);if(!b.isHTML5){b._iO.autoPlay=true}b.load(b._iO)}else if(b.readyState===2){e._wD(d+'Could not load "'+b.sID+'" - exiting',2);return b}else{e._wD(d+'"'+b.sID+'" is loading - attempting to play..',1)}}else{e._wD(d+'"'+b.sID+'"')}if(!b.isHTML5&&q===9&&b.position>0&&b.position===b.duration){e._wD(d+'"'+b.sID+'": Sound at end, resetting to position:0');a.position=0}if(b.paused&&b.position&&b.position>0){e._wD(d+'"'+b.sID+'" is resuming from paused state',1);b.resume()}else{b._iO=C(a,b._iO);if(b._iO.from!==null&&b._iO.to!==null&&b.instanceCount===0&&b.playState===0&&!b._iO.serverURL){i=function(){b._iO=C(a,b._iO);b.play(b._iO)};if(b.isHTML5&&!b._html5_canplay){e._wD(d+'Beginning load of "'+b.sID+'" for from/to case');b.load({_oncanplay:i});return false}else if(!b.isHTML5&&!b.loaded&&(!b.readyState||b.readyState!==2)){e._wD(d+'Preloading "'+b.sID+'" for from/to case');b.load({onload:i});return false}b._iO=p()}e._wD(d+'"'+b.sID+'" is starting to play');if(!b.instanceCount||b._iO.multiShotEvents||!b.isHTML5&&q>8&&!b.getAutoPlay()){b.instanceCount++}if(b.playState===0&&b._iO.onposition){k(b)}b.playState=1;b.paused=false;b.position=typeof b._iO.position!=="undefined"&&!isNaN(b._iO.position)?b._iO.position:0;if(!b.isHTML5){b._iO=bf(be(b._iO))}if(b._iO.onplay&&c){b._iO.onplay.apply(b);l=true}b.setVolume(b._iO.volume,true);b.setPan(b._iO.pan,true);if(!b.isHTML5){f._start(b.sID,b._iO.loops||1,q===9?b._iO.position:b._iO.position/1e3)}else{j();h=b._setup_html5();b.setPosition(b._iO.position);h.play()}}return b};this.start=this.play;this.stop=function(a){var c=b._iO,d;if(b.playState===1){b._onbufferchange(0);b._resetOnPosition(0);b.paused=false;if(!b.isHTML5){b.playState=0}o();if(c.to){b.clearOnPosition(c.to)}if(!b.isHTML5){f._stop(b.sID,a);if(c.serverURL){b.unload()}}else{if(b._a){d=b.position;b.setPosition(0);b.position=d;b._a.pause();b.playState=0;b._onTimer();h()}}b.instanceCount=0;b._iO={};if(c.onstop){c.onstop.apply(b)}}return b};this.setAutoPlay=function(a){e._wD("sound "+b.sID+" turned autoplay "+(a?"on":"off"));b._iO.autoPlay=a;if(!b.isHTML5){f._setAutoPlay(b.sID,a);if(a){if(!b.instanceCount&&b.readyState===1){b.instanceCount++;e._wD("sound "+b.sID+" incremented instance count to "+b.instanceCount)}}}};this.getAutoPlay=function(){return b._iO.autoPlay};this.setPosition=function(a){if(a===undefined){a=0}var c,d,g,h=b.isHTML5?Math.max(a,0):Math.min(b.duration||b._iO.duration,Math.max(a,0));c=b.position;b.position=h;g=b.position/1e3;b._resetOnPosition(b.position);b._iO.position=h;if(!b.isHTML5){d=q===9?b.position:g;if(b.readyState&&b.readyState!==2){f._setPosition(b.sID,d,b.paused||!b.playState)}}else if(b._a){if(b._html5_canplay){if(b._a.currentTime!==g){e._wD("setPosition("+g+"): setting position");try{b._a.currentTime=g;if(b.playState===0||b.paused){b._a.pause()}}catch(i){e._wD("setPosition("+g+"): setting position failed: "+i.message,2)}}}else{e._wD("setPosition("+g+"): delaying, sound not ready")}}if(b.isHTML5){if(b.paused){b._onTimer(true)}}return b};this.pause=function(a){if(b.paused||b.playState===0&&b.readyState!==1){return b}e._wD("SMSound.pause()");b.paused=true;if(!b.isHTML5){if(a||a===undefined){f._pause(b.sID)}}else{b._setup_html5().pause();h()}if(b._iO.onpause){b._iO.onpause.apply(b)}return b};this.resume=function(){var a=b._iO;if(!b.paused){return b}e._wD("SMSound.resume()");b.paused=false;b.playState=1;if(!b.isHTML5){if(a.isMovieStar&&!a.serverURL){b.setPosition(b.position)}f._pause(b.sID)}else{b._setup_html5().play();j()}if(l&&a.onplay){a.onplay.apply(b);l=true}else if(a.onresume){a.onresume.apply(b)}return b};this.togglePause=function(){e._wD("SMSound.togglePause()");if(b.playState===0){b.play({position:q===9&&!b.isHTML5?b.position:b.position/1e3});return b}if(b.paused){b.resume()}else{b.pause()}return b};this.setPan=function(a,c){if(typeof a==="undefined"){a=0}if(typeof c==="undefined"){c=false}if(!b.isHTML5){f._setPan(b.sID,a)}b._iO.pan=a;if(!c){b.pan=a;b.options.pan=a}return b};this.setVolume=function(a,c){if(typeof a==="undefined"){a=100}if(typeof c==="undefined"){c=false}if(!b.isHTML5){f._setVolume(b.sID,e.muted&&!b.muted||b.muted?0:a)}else if(b._a){b._a.volume=Math.max(0,Math.min(1,a/100))}b._iO.volume=a;if(!c){b.volume=a;b.options.volume=a}return b};this.mute=function(){b.muted=true;if(!b.isHTML5){f._setVolume(b.sID,0)}else if(b._a){b._a.muted=true}return b};this.unmute=function(){b.muted=false;var a=typeof b._iO.volume!=="undefined";if(!b.isHTML5){f._setVolume(b.sID,a?b._iO.volume:b.options.volume)}else if(b._a){b._a.muted=false}return b};this.toggleMute=function(){return b.muted?b.unmute():b.mute()};this.onPosition=function(a,c,d){m.push({position:a,method:c,scope:typeof d!=="undefined"?d:b,fired:false});return b};this.onposition=this.onPosition;this.clearOnPosition=function(a,b){var c;a=parseInt(a,10);if(isNaN(a)){return false}for(c=0;c<m.length;c++){if(a===m[c].position){if(!b||b===m[c].method){if(m[c].fired){n--}m.splice(c,1)}}}};this._processOnPosition=function(){var a,c,d=m.length;if(!d||!b.playState||n>=d){return false}for(a=d;a--;){c=m[a];if(!c.fired&&b.position>=c.position){c.fired=true;n++;c.method.apply(c.scope,[c.position])}}return true};this._resetOnPosition=function(a){var b,c,d=m.length;if(!d){return false}for(b=d;b--;){c=m[b];if(c.fired&&a<=c.position){c.fired=false;n--}}return true};p=function(){var a=b._iO,c=a.from,d=a.to,f,g;g=function(){e._wD(b.sID+': "to" time of '+d+" reached.");b.clearOnPosition(d,g);b.stop()};f=function(){e._wD(b.sID+': playing "from" '+c);if(d!==null&&!isNaN(d)){b.onPosition(d,g)}};if(c!==null&&!isNaN(c)){a.position=c;a.multiShot=false;f()}return a};k=function(){var a=b._iO.onposition;if(a){var c;for(c in a){if(a.hasOwnProperty(c)){b.onPosition(parseInt(c,10),a[c])}}}};o=function(){var a=b._iO.onposition;if(a){var c;for(c in a){if(a.hasOwnProperty(c)){b.clearOnPosition(parseInt(c,10))}}}};j=function(){if(b.isHTML5){bm(b)}};h=function(){if(b.isHTML5){bn(b)}};c=function(){m=[];n=0;l=false;b._hasTimer=null;b._a=null;b._html5_canplay=false;b.bytesLoaded=null;b.bytesTotal=null;b.duration=b._iO&&b._iO.duration?b._iO.duration:null;b.durationEstimate=null;b.eqData=[];b.eqData.left=[];b.eqData.right=[];b.failures=0;b.isBuffering=false;b.instanceOptions={};b.instanceCount=0;b.loaded=false;b.metadata={};b.readyState=0;b.muted=false;b.paused=false;b.peakData={left:0,right:0};b.waveformData={left:[],right:[]};b.playState=0;b.position=null};c();this._onTimer=function(a){var c,d=false,e,f={};if(b._hasTimer||a){if(b._a&&(a||(b.playState>0||b.readyState===1)&&!b.paused)){c=b._get_html5_duration();if(c!==s.duration){s.duration=c;b.duration=c;d=true}b.durationEstimate=b.duration;e=b._a.currentTime*1e3||0;if(e!==s.time){s.time=e;d=true}if(d||a){b._whileplaying(e,f,f,f,f)}return d}else{return false}}};this._get_html5_duration=function(){var a=b._iO,c=b._a?b._a.duration*1e3:a?a.duration:undefined,d=c&&!isNaN(c)&&c!==Infinity?c:a?a.duration:null;return d};this._setup_html5=function(a){var f=C(b._iO,a),g=decodeURI,h=bC?e._global_a:b._a,i=g(f.url),j=h&&h._t?h._t.instanceOptions:null;if(h){if(h._t){if(!bC&&i===g(r)){return h}else if(bC&&j.url===f.url&&(!r||r===j.url)){return h}}e._wD("setting new URL on existing object: "+i+(r?", old URL: "+r:""));if(bC&&h._t&&h._t.playState&&f.url!==j.url){h._t.stop()}c();h.src=f.url;b.url=f.url;r=f.url;h._called_load=false}else{e._wD("creating HTML5 Audio() element with URL: "+i);h=new Audio(f.url);h._called_load=false;if(bK){h._called_load=true}if(bC){e._global_a=h}}b.isHTML5=true;b._a=h;h._t=b;d();h.loop=f.loops>1?"loop":"";if(f.autoLoad||f.autoPlay){b.load()}else{h.autobuffer=false;h.preload="none"}h.loop=f.loops>1?"loop":"";return h};d=function(){function c(a,c,d){return b._a?b._a.addEventListener(a,c,d||false):null}if(b._a._added_events){return false}var a;e._wD(i+"adding event listeners: "+b.sID);b._a._added_events=true;for(a in bG){if(bG.hasOwnProperty(a)){c(a,bG[a])}}return true};g=function(){function c(a,c,d){return b._a?b._a.removeEventListener(a,c,d||false):null}var a;e._wD(i+"removing event listeners: "+b.sID);b._a._added_events=false;for(a in bG){if(bG.hasOwnProperty(a)){c(a,bG[a])}}};this._onload=function(a){var c,d=!!a;e._wD(c+'"'+b.sID+'"'+(d?" loaded.":" failed to load? - "+b.url),d?1:2);c="SMSound._onload(): ";if(!d&&!b.isHTML5){if(e.sandbox.noRemote===true){e._wD(c+_("noNet"),1)}if(e.sandbox.noLocal===true){e._wD(c+_("noLocal"),1)}}b.loaded=d;b.readyState=d?3:2;b._onbufferchange(0);if(b._iO.onload){b._iO.onload.apply(b,[d])}return true};this._onbufferchange=function(a){if(b.playState===0){return false}if(a&&b.isBuffering||!a&&!b.isBuffering){return false}b.isBuffering=a===1;if(b._iO.onbufferchange){e._wD("SMSound._onbufferchange(): "+a);b._iO.onbufferchange.apply(b)}return true};this._onsuspend=function(){if(b._iO.onsuspend){e._wD("SMSound._onsuspend()");b._iO.onsuspend.apply(b)}return true};this._onfailure=function(a,c,d){b.failures++;e._wD('SMSound._onfailure(): "'+b.sID+'" count '+b.failures);if(b._iO.onfailure&&b.failures===1){b._iO.onfailure(b,a,c,d)}else{e._wD("SMSound._onfailure(): ignoring")}};this._onfinish=function(){var a=b._iO.onfinish;b._onbufferchange(0);b._resetOnPosition(0);if(b.instanceCount){b.instanceCount--;if(!b.instanceCount){o();b.playState=0;b.paused=false;b.instanceCount=0;b.instanceOptions={};b._iO={};h()}if(!b.instanceCount||b._iO.multiShotEvents){if(a){e._wD('SMSound._onfinish(): "'+b.sID+'"');a.apply(b)}}}};this._whileloading=function(a,c,d,e){var f=b._iO;b.bytesLoaded=a;b.bytesTotal=c;b.duration=Math.floor(d);b.bufferLength=e;if(!f.isMovieStar){if(f.duration){b.durationEstimate=b.duration>f.duration?b.duration:f.duration}else{b.durationEstimate=parseInt(b.bytesTotal/b.bytesLoaded*b.duration,10)}if(b.durationEstimate===undefined){b.durationEstimate=b.duration}if(b.readyState!==3&&f.whileloading){f.whileloading.apply(b)}}else{b.durationEstimate=b.duration;if(b.readyState!==3&&f.whileloading){f.whileloading.apply(b)}}};this._whileplaying=function(a,c,d,e,f){var g=b._iO;if(isNaN(a)||a===null){return false}b.position=a;b._processOnPosition();if(!b.isHTML5&&q>8){if(g.usePeakData&&typeof c!=="undefined"&&c){b.peakData={left:c.leftPeak,right:c.rightPeak}}if(g.useWaveformData&&typeof d!=="undefined"&&d){b.waveformData={left:d.split(","),right:e.split(",")}}if(g.useEQData){if(typeof f!=="undefined"&&f&&f.leftEQ){var h=f.leftEQ.split(",");b.eqData=h;b.eqData.left=h;if(typeof f.rightEQ!=="undefined"&&f.rightEQ){b.eqData.right=f.rightEQ.split(",")}}}}if(b.playState===1){if(!b.isHTML5&&q===8&&!b.position&&b.isBuffering){b._onbufferchange(0)}if(g.whileplaying){g.whileplaying.apply(b)}}return true};this._onmetadata=function(a,c){e._wD('SMSound._onmetadata(): "'+this.sID+'" metadata received.');var d={},f,g;for(f=0,g=a.length;f<g;f++){d[a[f]]=c[f]}b.metadata=d;if(b._iO.onmetadata){b._iO.onmetadata.apply(b)}};this._onid3=function(a,c){e._wD('SMSound._onid3(): "'+this.sID+'" ID3 data received.');var d=[],f,g;for(f=0,g=a.length;f<g;f++){d[a[f]]=c[f]}b.id3=C(b.id3,d);if(b._iO.onid3){b._iO.onid3.apply(b)}};this._onconnect=function(a){a=a===1;e._wD('SMSound._onconnect(): "'+b.sID+'"'+(a?" connected.":" failed to connect? - "+b.url),a?1:2);b.connected=a;if(a){b.failures=0;if(bh(b.sID)){if(b.getAutoPlay()){b.play(undefined,b.getAutoPlay())}else if(b._iO.autoLoad){b.load()}}if(b._iO.onconnect){b._iO.onconnect.apply(b,[a])}}};this._ondataerror=function(a){if(b.playState>0){e._wD("SMSound._ondataerror(): "+a);if(b._iO.ondataerror){b._iO.ondataerror.apply(b)}}}};P=function(){return n.body||n._docElement||n.getElementsByTagName("div")[0]};j=function(a){return n.getElementById(a)};C=function(a,b){var c={},d,f,g;for(d in a){if(a.hasOwnProperty(d)){c[d]=a[d]}}f=typeof b==="undefined"?e.defaultOptions:b;for(g in f){if(f.hasOwnProperty(g)&&typeof c[g]==="undefined"){c[g]=f[g]}}return c};bA=function(){function f(){d(c(arguments),"remove")}function e(){d(c(arguments),"add")}function d(c,d){var e=c.shift(),f=[b[d]];if(a){e[f](c[0],c[1])}else{e[f].apply(e,c)}}function c(b){var c=bB.call(b),d=c.length;if(a){c[1]="on"+c[1];if(d>3){c.pop()}}else if(d===3){c.push(false)}return c}var a=l.attachEvent,b={add:a?"attachEvent":"addEventListener",remove:a?"detachEvent":"removeEventListener"};return{add:e,remove:f}}();bG={abort:ca(function(a){e._wD(i+"abort: "+this._t.sID)}),canplay:ca(function(a){var b=this._t;if(b._html5_canplay){return true}b._html5_canplay=true;e._wD(i+"canplay: "+b.sID+", "+b.url);b._onbufferchange(0);var c=!isNaN(b.position)?b.position/1e3:null;if(b.position&&this.currentTime!==c){e._wD(i+"canplay: setting position to "+c);try{this.currentTime=c}catch(d){e._wD(i+"setting position failed: "+d.message,2)}}if(b._iO._oncanplay){b._iO._oncanplay()}}),load:ca(function(a){var b=this._t;if(!b.loaded){b._onbufferchange(0);b._whileloading(b.bytesTotal,b.bytesTotal,b._get_html5_duration());b._onload(true)}}),emptied:ca(function(a){e._wD(i+"emptied: "+this._t.sID)}),ended:ca(function(a){var b=this._t;e._wD(i+"ended: "+b.sID);b._onfinish()}),error:ca(function(a){e._wD(i+"error: "+this.error.code);this._t._onload(false)}),loadeddata:ca(function(a){var b=this._t,c=b.bytesTotal||1;e._wD(i+"loadeddata: "+this._t.sID);if(!b._loaded&&!bN){b.duration=b._get_html5_duration();b._whileloading(c,c,b._get_html5_duration());b._onload(true)}}),loadedmetadata:ca(function(a){e._wD(i+"loadedmetadata: "+this._t.sID)}),loadstart:ca(function(a){e._wD(i+"loadstart: "+this._t.sID);this._t._onbufferchange(1)}),play:ca(function(a){e._wD(i+"play: "+this._t.sID+", "+this._t.url);this._t._onbufferchange(0)}),playing:ca(function(a){e._wD(i+"playing: "+this._t.sID);this._t._onbufferchange(0)}),progress:ca(function(a){var b=this._t;if(b.loaded){return false}var c,d,f,g=0,h=a.type==="progress",j=a.target.buffered,k=a.loaded||0,l=a.total||1;if(j&&j.length){for(c=j.length;c--;){g=j.end(c)-j.start(c)}k=g/a.target.duration;if(h&&j.length>1){f=[];d=j.length;for(c=0;c<d;c++){f.push(a.target.buffered.start(c)+"-"+a.target.buffered.end(c))}e._wD(i+"progress: timeRanges: "+f.join(", "))}if(h&&!isNaN(k)){e._wD(i+"progress: "+b.sID+": "+Math.floor(k*100)+"% loaded")}}if(!isNaN(k)){b._onbufferchange(0);b._whileloading(k,l,b._get_html5_duration());if(k&&l&&k===l){bG.load.call(this,a)}}}),ratechange:ca(function(a){e._wD(i+"ratechange: "+this._t.sID)}),suspend:ca(function(a){var b=this._t;e._wD(i+"suspend: "+b.sID);bG.progress.call(this,a);b._onsuspend()}),stalled:ca(function(a){e._wD(i+"stalled: "+this._t.sID)}),timeupdate:ca(function(a){this._t._onTimer()}),waiting:ca(function(a){var b=this._t;e._wD(i+"waiting: "+b.sID);b._onbufferchange(1)})};bu=function(a){return!a.serverURL&&(a.type?bv({type:a.type}):bv({url:a.url})||e.html5Only)};bx=function(a){if(a){a.src=bJ?"":bW}};bv=function(a){function j(a){return e.preferFlash&&bD&&!e.ignoreFlash&&typeof e.flash[a]!=="undefined"&&e.flash[a]}if(!e.useHTML5Audio||!e.hasHTML5){return false}var b=a.url||null,c=a.type||null,d=e.audioFormats,f,g,h,i;if(c&&e.html5[c]!=="undefined"){return e.html5[c]&&!j(c)}if(!bw){bw=[];for(i in d){if(d.hasOwnProperty(i)){bw.push(i);if(d[i].related){bw=bw.concat(d[i].related)}}}bw=new RegExp("\\.("+bw.join("|")+")(\\?.*)?$","i")}h=b?b.toLowerCase().match(bw):null;if(!h||!h.length){if(!c){return false}else{g=c.indexOf(";");h=(g!==-1?c.substr(0,g):c).substr(6)}}else{h=h[1]}if(h&&typeof e.html5[h]!=="undefined"){return e.html5[h]&&!j(h)}else{c="audio/"+h;f=e.html5.canPlayType({type:c});e.html5[h]=f;return f&&e.html5[c]&&!j(c)}};bz=function(){function g(b){var c,d,f,g=false;if(!a||typeof a.canPlayType!=="function"){return false}if(b instanceof Array){for(d=0,f=b.length;d<f&&!g;d++){if(e.html5[b[d]]||a.canPlayType(b[d]).match(e.html5Test)){g=true;e.html5[b[d]]=true;e.flash[b[d]]=!!(e.preferFlash&&bD&&b[d].match(bV))}}return g}else{c=a&&typeof a.canPlayType==="function"?a.canPlayType(b):false;return!!(c&&c.match(e.html5Test))}}if(!e.useHTML5Audio||typeof Audio==="undefined"){return false}var a=typeof Audio!=="undefined"?bO?new Audio(null):new Audio:null,b,c={},d,f;d=e.audioFormats;for(b in d){if(d.hasOwnProperty(b)){c[b]=g(d[b].type);c["audio/"+b]=c[b];if(e.preferFlash&&!e.ignoreFlash&&b.match(bV)){e.flash[b]=true}else{e.flash[b]=false}if(d[b]&&d[b].related){for(f=d[b].related.length;f--;){c["audio/"+d[b].related[f]]=c[b];e.html5[d[b].related[f]]=c[b];e.flash[d[b].related[f]]=c[b]}}}}c.canPlayType=a?g:null;e.html5=C(e.html5,c);return true};K={notReady:"Not loaded yet - wait for soundManager.onload()/onready()",notOK:"Audio support is not available.",domError:h+"createMovie(): appendChild/innerHTML call failed. DOM not ready or other error.",spcWmode:h+"createMovie(): Removing wmode, preventing known SWF loading issue(s)",swf404:g+": Verify that %s is a valid path.",tryDebug:"Try "+g+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:g+": Non-HTTP page ("+n.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:g+": Special case: Waiting for focus-related event..",waitImpatient:g+": Getting impatient, still waiting for Flash%s...",waitForever:g+": Waiting indefinitely for Flash (will recover if unblocked)...",needFunction:g+": Function object expected for %s",badID:'Warning: Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:"--- "+g+"._debug(): Current sound objects ---",waitEI:h+"initMovie(): Waiting for ExternalInterface call from Flash..",waitOnload:g+": Waiting for window.onload()",docLoaded:g+": Document already loaded",onload:h+"initComplete(): calling soundManager.onload()",onloadOK:g+".onload() complete",init:h+"init()",didInit:h+"init(): Already called?",flashJS:g+": Attempting to call Flash from JS..",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:g+".disable(): Shutting down",queue:g+": Queueing %s handler",smFail:g+": Failed to initialise.",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+bc.swfTimedout+" CSS..",fbLoaded:"Flash loaded",fbHandler:h+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:g+".load(): current URL already assigned.",badFV:g+'.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"};_=function(){var a=bB.call(arguments),b=a.shift(),c=K&&K[b]?K[b]:"",d,e;if(c&&a&&a.length){for(d=0,e=a.length;d<e;d++){c=c.replace("%s",a[d])}}return c};be=function(a){if(q===8&&a.loops>1&&a.stream){z("as2loop");a.stream=false}return a};bf=function(a,b){if(a&&!a.usePolicyFile&&(a.onid3||a.usePeakData||a.useWaveformData||a.useEQData)){e._wD((b||"")+_("policy"));a.usePolicyFile=true}return a};bg=function(a){if(typeof console!=="undefined"&&typeof console.warn!=="undefined"){console.warn(a)}else{e._wD(a)}};o=function(){return false};W=function(a){var b;for(b in a){if(a.hasOwnProperty(b)&&typeof a[b]==="function"){a[b]=o}}b=null};X=function(a){if(typeof a==="undefined"){a=false}if(x||a){z("smFail",2);e.disable(a)}};Y=function(a){var b=null,c;if(a){if(a.match(/\.swf(\?.*)?$/i)){b=a.substr(a.toLowerCase().lastIndexOf(".swf?")+4);if(b){return a}}else if(a.lastIndexOf("/")!==a.length-1){a+="/"}}c=(a&&a.lastIndexOf("/")!==-1?a.substr(0,a.lastIndexOf("/")+1):"./")+e.movieURL;if(e.noSWFCache){c+="?ts="+(new Date).getTime()}return c};I=function(){q=parseInt(e.flashVersion,10);if(q!==8&&q!==9){e._wD(_("badFV",q,V));e.flashVersion=q=V}var a=e.debugMode||e.debugFlash?"_debug.swf":".swf";if(e.useHTML5Audio&&!e.html5Only&&e.audioFormats.mp4.required&&q<9){e._wD(_("needfl9"));e.flashVersion=q=9}e.version=e.versionNumber+(e.html5Only?" (HTML5-only mode)":q===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(q>8){e.defaultOptions=C(e.defaultOptions,e.flash9Options);e.features.buffering=true;e.defaultOptions=C(e.defaultOptions,e.movieStarOptions);e.filePatterns.flash9=new RegExp("\\.(mp3|"+b$.join("|")+")(\\?.*)?$","i");e.features.movieStar=true}else{e.features.movieStar=false}e.filePattern=e.filePatterns[q!==8?"flash9":"flash8"];e.movieURL=(q===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",a);e.features.peakData=e.features.waveformData=e.features.eqData=q>8};S=function(a,b){if(!f){return false}f._setPolling(a,b)};T=function(){if(e.debugURLParam.test(m)){e.debugMode=true}if(j(e.debugID)){return false}var a,b,c,d,f;if(e.debugMode&&!j(e.debugID)&&(!bR||!e.useConsole||!e.consoleOnly)){a=n.createElement("div");a.id=e.debugID+"-toggle";d={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};a.appendChild(n.createTextNode("-"));a.onclick=bd;a.title="Toggle SM2 debug console";if(k.match(/msie 6/i)){a.style.position="absolute";a.style.cursor="hand"}for(f in d){if(d.hasOwnProperty(f)){a.style[f]=d[f]}}b=n.createElement("div");b.id=e.debugID;b.style.display=e.debugMode?"block":"none";if(e.debugMode&&!j(a.id)){try{c=P();c.appendChild(a)}catch(g){throw new Error(_("domError")+" \n"+g.toString())}c.appendChild(b)}}c=null};bh=this.getSoundById;z=function(a,b){if(!a){return""}else{return e._wD(_(a),b)}};if(m.indexOf("sm2-debug=alert")+1&&e.debugMode){e._wD=function(b){a.alert(b)}}bd=function(){var a=j(e.debugID),b=j(e.debugID+"-toggle");if(!a){return false}if(s){b.innerHTML="+";a.style.display="none"}else{b.innerHTML="-";a.style.display="block"}s=!s};t=function(a,b,c){if(typeof sm2Debugger!=="undefined"){try{sm2Debugger.handleEvent(a,b,c)}catch(d){}}return true};bb=function(){var a=[];if(e.debugMode){a.push(bc.sm2Debug)}if(e.debugFlash){a.push(bc.flashDebug)}if(e.useHighPerformance){a.push(bc.highPerf)}return a.join(" ")};ba=function(){var a=_("fbHandler"),b=e.getMoviePercent(),c=bc,d={type:"FLASHBLOCK"};if(e.html5Only){return false}if(!e.ok()){if(bs){e.oMC.className=bb()+" "+c.swfDefault+" "+(b===null?c.swfTimedout:c.swfError);e._wD(a+": "+_("fbTimeout")+(b?" ("+_("fbLoaded")+")":""))}e.didFlashBlock=true;E({type:"ontimeout",ignoreInit:true,error:d});R(d)}else{if(e.didFlashBlock){e._wD(a+": Unblocked")}if(e.oMC){e.oMC.className=[bb(),c.swfDefault,c.swfLoaded+(e.didFlashBlock?" "+c.swfUnblocked:"")].join(" ")}}};D=function(a,b,c){if(typeof r[a]==="undefined"){r[a]=[]}r[a].push({method:b,scope:c||null,fired:false})};E=function(a){if(!a){a={type:"onready"}}if(!w&&a&&!a.ignoreInit){return false}if(a.type==="ontimeout"&&e.ok()){return false}var b={success:a&&a.ignoreInit?e.ok():!x},c=a&&a.type?r[a.type]||[]:[],d=[],f,h,i=[b],j=bs&&e.useFlashBlock&&!e.ok();if(a.error){i[0].error=a.error}for(f=0,h=c.length;f<h;f++){if(c[f].fired!==true){d.push(c[f])}}if(d.length){e._wD(g+": Firing "+d.length+" "+a.type+"() item"+(d.length===1?"":"s"));for(f=0,h=d.length;f<h;f++){if(d[f].scope){d[f].method.apply(d[f].scope,i)}else{d[f].method.apply(this,i)}if(!j){d[f].fired=true}}}return true};F=function(){l.setTimeout(function(){if(e.useFlashBlock){ba()}E();if(e.onload instanceof Function){z("onload",1);e.onload.apply(l);z("onloadOK",1)}if(e.waitForWindowLoad){bA.add(l,"load",F)}},1)};bE=function(){if(bD!==undefined){return bD}var a=false,b=navigator,c=b.plugins,d,e,f,g=l.ActiveXObject;if(c&&c.length){e="application/x-shockwave-flash";f=b.mimeTypes;if(f&&f[e]&&f[e].enabledPlugin&&f[e].enabledPlugin.description){a=true}}else if(typeof g!=="undefined"){try{d=new g("ShockwaveFlash.ShockwaveFlash")}catch(h){}a=!!d}bD=a;return a};bt=function(){var a,b,c=bI&&!!k.match(/os (1|2|3_0|3_1)/i);if(c){e.hasHTML5=false;e.html5Only=true;if(e.oMC){e.oMC.style.display="none"}return false}if(e.useHTML5Audio){if(!e.html5||!e.html5.canPlayType){e._wD("SoundManager: No HTML5 Audio() support detected.");e.hasHTML5=false;return true}else{e.hasHTML5=true}if(bQ){e._wD(h+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(!bD?" would use flash fallback for MP3/MP4, but none detected.":"will use flash fallback for MP3/MP4, if available"),1);if(bE()){return true}}}else{return true}for(b in e.audioFormats){if(e.audioFormats.hasOwnProperty(b)){if(e.audioFormats[b].required&&!e.html5.canPlayType(e.audioFormats[b].type)||e.flash[b]||e.flash[e.audioFormats[b].type]){a=true}}}if(e.ignoreFlash){a=false}e.html5Only=e.hasHTML5&&e.useHTML5Audio&&!a;return!e.html5Only};br=function(a){var b,c,d=0;if(a instanceof Array){for(b=0,c=a.length;b<c;b++){if(a[b]instanceof Object){if(e.canPlayMIME(a[b].type)){d=b;break}}else if(e.canPlayURL(a[b])){d=b;break}}if(a[d].url){a[d]=a[d].url}return a[d]}else{return a}};bm=function(b){if(!b._hasTimer){b._hasTimer=true;if(!bP&&e.html5PollingInterval){if(bq===null&&bp===0){bq=a.setInterval(bo,e.html5PollingInterval)}bp++}}};bn=function(a){if(a._hasTimer){a._hasTimer=false;if(!bP&&e.html5PollingInterval){bp--}}};bo=function(){var b,c;if(bq!==null&&!bp){a.clearInterval(bq);bq=null;return false}for(b=e.soundIDs.length;b--;){if(e.sounds[e.soundIDs[b]].isHTML5&&e.sounds[e.soundIDs[b]]._hasTimer){e.sounds[e.soundIDs[b]]._onTimer()}}};R=function(a){a=typeof a!=="undefined"?a:{};if(e.onerror instanceof Function){e.onerror.apply(l,[{type:typeof a.type!=="undefined"?a.type:null}])}if(typeof a.fatal!=="undefined"&&a.fatal){e.disable()}};bF=function(){if(!bQ||!bE()){return false}var a=e.audioFormats,b,c;for(c in a){if(a.hasOwnProperty(c)){if(c==="mp3"||c==="mp4"){e._wD(g+": Using flash fallback for "+c+" format");e.html5[c]=false;if(a[c]&&a[c].related){for(b=a[c].related.length;b--;){e.html5[a[c].related[b]]=false}}}}}};this._setSandboxType=function(a){var b=e.sandbox;b.type=a;b.description=b.types[typeof b.types[a]!=="undefined"?a:"unknown"];e._wD("Flash security sandbox type: "+b.type);if(b.type==="localWithFile"){b.noRemote=true;b.noLocal=false;z("secNote",2)}else if(b.type==="localWithNetwork"){b.noRemote=false;b.noLocal=true}else if(b.type==="localTrusted"){b.noRemote=false;b.noLocal=false}};this._externalInterfaceOK=function(a,b){if(e.swfLoaded){return false}var c,d=(new Date).getTime();e._wD(h+"externalInterfaceOK()"+(a?" (~"+(d-a)+" ms)":""));t("swf",true);t("flashtojs",true);e.swfLoaded=true;bT=false;if(bQ){bF()}if(!b||b.replace(/\+dev/i,"")!==e.versionNumber.replace(/\+dev/i,"")){c=g+': Fatal: JavaScript file build "'+e.versionNumber+'" does not match Flash SWF build "'+b+'" at '+e.url+". Ensure both are up-to-date.";setTimeout(function f(){throw new Error(c)},0);return false}if(bL){setTimeout(p,100)}else{p()}};Q=function(a,b){function C(a,b){return'<param name="'+a+'" value="'+b+'" />'}function c(){e._wD("-- SoundManager 2 "+e.version+(!e.html5Only&&e.useHTML5Audio?e.hasHTML5?" + HTML5 audio":", no HTML5 audio support":"")+(!e.html5Only?(e.useHighPerformance?", high performance mode, ":", ")+((e.flashPollingInterval?"custom ("+e.flashPollingInterval+"ms)":"normal")+" polling")+(e.wmode?", wmode: "+e.wmode:"")+(e.debugFlash?", flash debug mode":"")+(e.useFlashBlock?", flashBlock mode":""):"")+" --",1)}if(u&&v){return false}if(e.html5Only){I();c();e.oMC=j(e.movieID);p();u=true;v=true;return false}var d=b||e.url,f=e.altURL||d,g="JS/Flash audio component (SoundManager 2)",i,l,m=P(),o,q,r,s=bb(),t,w,x,y="auto",A=null,B=n.getElementsByTagName("html")[0];A=B&&B.dir&&B.dir.match(/rtl/i);a=typeof a==="undefined"?e.id:a;I();e.url=Y(bX?d:f);b=e.url;e.wmode=!e.wmode&&e.useHighPerformance?"transparent":e.wmode;if(e.wmode!==null&&(k.match(/msie 8/i)||!bL&&!e.useHighPerformance)&&navigator.platform.match(/win32|win64/i)){z("spcWmode");e.wmode=null}i={name:a,id:a,src:b,width:y,height:y,quality:"high",allowScriptAccess:e.allowScriptAccess,bgcolor:e.bgColor,pluginspage:bY+"www.macromedia.com/go/getflashplayer",title:g,type:"application/x-shockwave-flash",wmode:e.wmode,hasPriority:"true"};if(e.debugFlash){i.FlashVars="debug=1"}if(!e.wmode){delete i.wmode}if(bL){l=n.createElement("div");q=['<object id="'+a+'" data="'+b+'" type="'+i.type+'" title="'+i.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+bY+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+i.width+'" height="'+i.height+'">',C("movie",b),C("AllowScriptAccess",e.allowScriptAccess),C("quality",i.quality),e.wmode?C("wmode",e.wmode):"",C("bgcolor",e.bgColor),C("hasPriority","true"),e.debugFlash?C("FlashVars",i.FlashVars):"","</object>"].join("")}else{l=n.createElement("embed");for(o in i){if(i.hasOwnProperty(o)){l.setAttribute(o,i[o])}}}T();s=bb();m=P();if(m){e.oMC=j(e.movieID)||n.createElement("div");if(!e.oMC.id){e.oMC.id=e.movieID;e.oMC.className=bc.swfDefault+" "+s;t=null;r=null;if(!e.useFlashBlock){if(e.useHighPerformance){t={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}}else{t={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"};if(A){t.left=Math.abs(parseInt(t.left,10))+"px"}}}if(bM){e.oMC.style.zIndex=1e4}if(!e.debugFlash){for(w in t){if(t.hasOwnProperty(w)){e.oMC.style[w]=t[w]}}}try{if(!bL){e.oMC.appendChild(l)}m.appendChild(e.oMC);if(bL){r=e.oMC.appendChild(n.createElement("div"));r.className=bc.swfBox;r.innerHTML=q}v=true}catch(D){throw new Error(_("domError")+" \n"+D.toString())}}else{x=e.oMC.className;e.oMC.className=(x?x+" ":bc.swfDefault)+(s?" "+s:"");e.oMC.appendChild(l);if(bL){r=e.oMC.appendChild(n.createElement("div"));r.className=bc.swfBox;r.innerHTML=q}v=true}}u=true;c();e._wD(h+"createMovie(): Trying to load "+b+(!bX&&e.altURL?" (alternate URL)":""),1);return true};L=function(){if(e.html5Only){Q();return false}if(f){return false}f=e.getMovie(e.id);if(!f){if(!Z){Q(e.id,e.url)}else{if(!bL){e.oMC.appendChild(Z)}else{e.oMC.innerHTML=$}Z=null;u=true}f=e.getMovie(e.id)}if(f){z("waitEI")}if(e.oninitmovie instanceof Function){setTimeout(e.oninitmovie,1)}return true};G=function(){setTimeout(H,1e3)};H=function(){if(bi){return false}bi=true;bA.remove(l,"load",G);if(bT&&!bS){z("waitFocus");return false}var a;if(!w){a=e.getMoviePercent();e._wD(_("waitImpatient",a===100?" (SWF loaded)":a>0?" (SWF "+a+"% loaded)":""))}setTimeout(function(){a=e.getMoviePercent();if(!w){e._wD(g+": No Flash response within expected time.\nLikely causes: "+(a===0?"Loading "+e.movieURL+" may have failed (and/or Flash "+q+"+ not present?), ":"")+"Flash blocked or JS-Flash security error."+(e.debugFlash?" "+_("checkSWF"):""),2);if(!bX&&a){z("localFail",2);if(!e.debugFlash){z("tryDebug",2)}}if(a===0){e._wD(_("swf404",e.url))}t("flashtojs",false,": Timed out"+bX?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)")}if(!w&&bU){if(a===null){if(e.useFlashBlock||e.flashLoadTimeout===0){if(e.useFlashBlock){ba()}z("waitForever")}else{X(true)}}else{if(e.flashLoadTimeout===0){z("waitForever")}else{X(true)}}}},e.flashLoadTimeout)};J=function(){function a(){bA.remove(l,"focus",J);bA.remove(l,"load",J)}if(bS||!bT){a();return true}bU=true;bS=true;e._wD(h+"handleFocus()");if(bN&&bT){bA.remove(l,"mousemove",J)}bi=false;a();return true};bH=function(){var a,b=[];if(e.useHTML5Audio&&e.hasHTML5){for(a in e.audioFormats){if(e.audioFormats.hasOwnProperty(a)){b.push(a+": "+e.html5[a]+(!e.html5[a]&&bD&&e.flash[a]?" (using flash)":e.preferFlash&&e.flash[a]&&bD?" (preferring flash)":!e.html5[a]?" ("+(e.audioFormats[a].required?"required, ":"")+"and no flash support)":""))}}e._wD("-- SoundManager 2: HTML5 support tests ("+e.html5Test+"): "+b.join(", ")+" --",1)}};B=function(a){if(w){return false}if(e.html5Only){e._wD("-- SoundManager 2: loaded --");w=true;F();t("onload",true);return true}var b=e.useFlashBlock&&e.flashLoadTimeout&&!e.getMoviePercent(),c;if(!b){w=true;if(x){c={type:!bD&&bs?"NO_FLASH":"INIT_TIMEOUT"}}}e._wD("-- SoundManager 2 "+(x?"failed to load":"loaded")+" ("+(x?"security/load error":"OK")+") --",1);if(x||a){if(e.useFlashBlock&&e.oMC){e.oMC.className=bb()+" "+(e.getMoviePercent()===null?bc.swfTimedout:bc.swfError)}E({type:"ontimeout",error:c});t("onload",false);R(c);return false}else{t("onload",true)}if(e.waitForWindowLoad&&!y){z("waitOnload");bA.add(l,"load",F);return false}else{if(e.waitForWindowLoad&&y){z("docLoaded")}F()}return true};p=function(){function a(){bA.remove(l,"load",e.beginDelayedInit)}z("init");if(w){z("didInit");return false}if(e.html5Only){if(!w){a();e.enabled=true;B()}return true}L();try{z("flashJS");f._externalInterfaceTest(false);S(true,e.flashPollingInterval||(e.useHighPerformance?10:50));if(!e.debugMode){f._disableDebug()}e.enabled=true;t("jstoflash",true);if(!e.html5Only){bA.add(l,"unload",o)}}catch(b){e._wD("js/flash exception: "+b.toString());t("jstoflash",false);R({type:"JS_TO_FLASH_EXCEPTION",fatal:true});X(true);B();return false}B();a();return true};M=function(){if(O){return false}O=true;T();(function(){var a="sm2-usehtml5audio=",b=m.toLowerCase(),c=null,d="sm2-preferflash=",f=null,g=typeof console!=="undefined"&&typeof console.log!=="undefined";if(b.indexOf(a)!==-1){c=b.charAt(b.indexOf(a)+a.length)==="1";if(g){console.log((c?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter")}e.useHTML5Audio=c}if(b.indexOf(d)!==-1){f=b.charAt(b.indexOf(d)+d.length)==="1";if(g){console.log((f?"Enabling ":"Disabling ")+"preferFlash via URL parameter")}e.preferFlash=f}})();if(!bD&&e.hasHTML5){e._wD("SoundManager: No Flash detected"+(!e.useHTML5Audio?", enabling HTML5.":". Trying HTML5-only mode."));e.useHTML5Audio=true;e.preferFlash=false}bz();e.html5.usingFlash=bt();bs=e.html5.usingFlash;bH();if(!bD&&bs){e._wD("SoundManager: Fatal error: Flash is needed to play some required formats, but is not available.");e.flashLoadTimeout=1}if(n.removeEventListener){n.removeEventListener("DOMContentLoaded",M,false)}L();return true};by=function(){if(n.readyState==="complete"){M();n.detachEvent("onreadystatechange",by)}return true};N=function(){y=true;bA.remove(l,"load",N)};bE();bA.add(l,"focus",J);bA.add(l,"load",J);bA.add(l,"load",G);bA.add(l,"load",N);if(bN&&bT){bA.add(l,"mousemove",J)}if(n.addEventListener){n.addEventListener("DOMContentLoaded",M,false)}else if(n.attachEvent){n.attachEvent("onreadystatechange",by)}else{t("onload",false);R({type:"NO_DOM2_EVENTS",fatal:true})}if(n.readyState==="complete"){setTimeout(M,100)}}var b=null;if(typeof SM2_DEFER==="undefined"||!SM2_DEFER){b=new c}a.SoundManager=c;a.soundManager=b})(window)

