/** @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.20110101 */ (function(P){function xa(Oa,Pa){function ya(){if(b.debugURLParam.test(J))b.debugMode=true;if(x(b.debugID))return false;var c,a,f,h;if(b.debugMode&&!x(b.debugID)&&(!ga||!b.useConsole||b.useConsole&&ga&&!b.consoleOnly)){c=l.createElement("div");c.id=b.debugID+"-toggle";a={position:"fixed",bottom:"0px",right:"0px",width:"1.2em",height:"1.2em",lineHeight:"1.2em",margin:"2px",textAlign:"center",border:"1px solid #999",cursor:"pointer",background:"#fff",color:"#333",zIndex:10001};c.appendChild(l.createTextNode("-")); c.onclick=za;c.title="Toggle SM2 debug console";if(A.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=l.createElement("div");a.id=b.debugID;a.style.display=b.debugMode?"block":"none";if(b.debugMode&&!x(c.id)){try{f=X();f.appendChild(c)}catch(e){throw Error(q("appXHTML"));}f.appendChild(a)}}}this.flashVersion=8;this.debugMode=true;this.debugFlash=false;this.useConsole=true;this.waitForWindowLoad=this.consoleOnly=false;this.nullURL= "about:blank";this.allowPolling=true;this.useFastPolling=false;this.useMovieStar=true;this.bgColor="#ffffff";this.useHighPerformance=false;this.flashPollingInterval=null;this.flashLoadTimeout=1E3;this.wmode=null;this.allowScriptAccess="always";this.useHTML5Audio=this.useFlashBlock=false;this.html5Test=/^probably$/i;this.ondebuglog=false;this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:true},mp4:{related:["aac","m4a"],type:['audio/mp4; codecs="mp4a.40.2"', "audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:true},ogg:{type:["audio/ogg; codecs=vorbis"],required:false},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:false}};this.defaultOptions={autoLoad:false,stream:true,autoPlay:false,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfailure:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5E3,onbeforefinishcomplete:null, onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:true,multiShotEvents:false,position:null,pan:0,type:null,usePolicyFile:false,volume:100};this.flash9Options={isMovieStar:null,usePeakData:false,useWaveformData:false,useEQData:false,onbufferchange:null,ondataerror:null,onstats:null};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,bufferTimes:null,duration:null};this.version=null;this.versionNumber="V2.97a.20110101";this.movieURL=null;this.url=Oa||null;this.altURL=null; this.enabled=this.swfLoaded=false;this.o=null;this.movieID="sm2-container";this.id=Pa||"sm2movie";this.swfCSS={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",highPerf:"high_performance",flashDebug:"flash_debug"};this.oMC=null;this.sounds={};this.soundIDs=[];this.muted=false;this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.didFlashBlock=this.specialWmodeCase=false;this.filePattern= null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.baseMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamTypes=["aac","flv","mov","mp4","m4v","f4v","m4a","mp4v","3gp","3g2"];this.netStreamPattern=RegExp("\\.("+this.netStreamTypes.join("|")+")(\\?.*)?$","i");this.mimePattern=this.baseMimeTypes;this.features={buffering:false,peakData:false,waveformData:false,eqData:false,movieStar:false}; this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null};this.hasHTML5=null;this.html5={usingFlash:null};this.ignoreFlash=false;var ha,b=this,x,A=navigator.userAgent,J=P.location.href.toString(),o=this.flashVersion,l=document,p=P,ia,Y,E=[],ja=true,B,K= false,Q=false,t=false,C=false,ka=false,m,Qa=0,R,y,la,G,L,ma,Z,Aa,na,H,Ba,$,S,M,oa,X,aa,pa,Ca,Ra=["log","info","warn","error"],Da,ba,Ea,T=null,qa=null,q,ra,N,za,ca,da,sa,u,ea=false,ta=false,Fa,Ga,I=null,Ha,fa,z=false,U,F,ua,Ia,v,Ja=Array.prototype.slice,Ka=A.match(/pre\//i),Sa=A.match(/(ipad|iphone|ipod)/i);A.match(/mobile/i);var D=A.match(/MSIE/i),La=A.match(/webkit/i),V=A.match(/safari/i)&&!A.match(/chrome/i),ga=typeof console!=="undefined"&&typeof console.log!=="undefined",va=typeof l.hasFocus!== "undefined"?l.hasFocus():null,O=typeof l.hasFocus==="undefined"&&V,Ma=!O;this._use_maybe=J.match(/sm2\-useHTML5Maybe\=1/i);this._overHTTP=l.location?l.location.protocol.match(/http/i):null;this.useAltURL=!this._overHTTP;if(Sa||Ka){b.useHTML5Audio=true;b.ignoreFlash=true}if(Ka||this._use_maybe)b.html5Test=/^(probably|maybe)$/i;(function(){var c=J,a=null;if(c.indexOf("#sm2-usehtml5audio=")!==-1){a=c.substr(c.indexOf("#sm2-usehtml5audio=")+19)==="1";if(typeof console!=="undefined"&&typeof console.log!== "undefined")console.log((a?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter");b.useHTML5Audio=a}})();this.supported=this.ok=function(){return I?t&&!C:b.useHTML5Audio&&b.hasHTML5};this.getMovie=function(c){return D?p[c]:V?x(c)||l[c]:x(c)};this.createSound=function(c){function a(){f=ca(f);b.sounds[e.id]=new ha(e);b.soundIDs.push(e.id);return b.sounds[e.id]}var f=null,h=null,e=null;if(!t||!b.ok()){sa("soundManager.createSound(): "+q(!t?"notReady":"notOK"));return false}if(arguments.length=== 2)c={id:arguments[0],url:arguments[1]};e=f=y(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(u(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(o>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){m("noPeak");e.usePeakData=false}e.loops>1&&m("noNSLoop")}}e=da(e,"soundManager.createSound(): ");h=a();if(o===8)b.o._createSound(e.id,e.onjustbeforefinishtime,e.loops||1,e.usePolicyFile);else{b.o._createSound(e.id,e.url,e.onjustbeforefinishtime,e.usePeakData,e.useWaveformData,e.useEQData,e.isMovieStar,e.isMovieStar?e.bufferTime:false,e.loops|| 1,e.serverURL,e.duration||null,e.autoPlay,true,e.bufferTimes,e.onstats?true:false,e.autoLoad,e.usePolicyFile);if(!e.serverURL){h.connected=true;e.onconnect&&e.onconnect.apply(h)}}}if(e.autoLoad||e.autoPlay)if(h)if(b.isHTML5){h.autobuffer="auto";h.preload="auto"}else h.load(e);e.autoPlay&&h.play();return h};this.destroySound=function(c,a){if(!u(c))return false;var f=b.sounds[c],h;f._iO={};f.stop();f.unload();for(h=0;h=2)e.style.fontWeight="bold";if(a===3)e.style.color="#ff3333"}h.insertBefore(e,h.firstChild)}catch(k){}return true};this._debug= function(){m("currentObj",1);for(var c=0,a=b.soundIDs.length;c0){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||o>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&&g){a._iO.onplay.apply(a);a._onplay_called=true}a.setVolume(a._iO.volume,true);a.setPan(a._iO.pan,true);if(a.isHTML5){n();a._setup_html5().play()}else b.o._start(a.sID,a._iO.loops||1,o===9?a.position:a.position/1E3)}return a};this.stop=function(d){if(a.playState===1){a._onbufferchange(0);a.resetOnPosition(0);if(!a.isHTML5)a.playState=0;a.paused=false;a._iO.onstop&& a._iO.onstop.apply(a);if(a.isHTML5){if(i){a.setPosition(0);i.pause();a.playState=0;a._onTimer();k();a.unload()}}else{b.o._stop(a.sID,d);a._iO.serverURL&&a.unload()}a.instanceCount=0;a._iO={}}return a};this.setAutoPlay=function(d){b._wD("sound "+a.sID+" turned autoplay "+(d?"on":"off"));a._iO.autoPlay=d;b.o._setAutoPlay(a.sID,d);if(d)if(!a.instanceCount&&a.readyState===1){a.instanceCount++;b._wD("sound "+a.sID+" incremented instance count to "+a.instanceCount)}};this.getAutoPlay=function(){return a._iO.autoPlay}; this.setPosition=function(d){if(d===undefined)d=0;d=a.isHTML5?Math.max(d,0):Math.min(a.duration||a._iO.duration,Math.max(d,0));a.position=d;a.resetOnPosition(a.position);a._iO.position=d;if(a.isHTML5){if(i){b._wD("setPosition(): setting position to "+a.position/1E3);if(a.playState)try{i.currentTime=a.position/1E3}catch(g){b._wD("setPosition("+a.position+"): WARN: Caught exception: "+g.message,2)}else b._wD("HTML5 warning: cannot set position while playState == 0 (not playing)",2);if(a.paused){a._onTimer(true); a._iO.useMovieStar&&a.resume()}}}else{d=o===9?a.position:a.position/1E3;a.serverURL&&a.playState===0?a.play({position:d}):b.o._setPosition(a.sID,d,a.paused||!a.playState)}return a};this.pause=function(d){if(a.paused||a.playState===0&&a.readyState!==1)return a;b._wD("SMSound.pause()");a.paused=true;if(a.isHTML5){a._setup_html5().pause();k()}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();n()}else{b.o._pause(a.sID);a._iO.isMovieStar&&La&&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:o===9&&!a.isHTML5?a.position:a.position/1E3});return a}a.paused?a.resume():a.pause();return a};this.setPan=function(d,g){if(typeof d=== "undefined")d=0;if(typeof g==="undefined")g=false;a.isHTML5||b.o._setPan(a.sID,d);a._iO.pan=d;if(!g)a.pan=d;return a};this.setVolume=function(d,g){if(typeof d==="undefined")d=100;if(typeof g==="undefined")g=false;if(a.isHTML5){if(i)i.volume=d/100}else b.o._setVolume(a.sID,b.muted&&!a.muted||a.muted?0:d);a._iO.volume=d;if(!g)a.volume=d;return a};this.mute=function(){a.muted=true;if(a.isHTML5){if(i)i.muted=true}else b.o._setVolume(a.sID,0);return a};this.unmute=function(){a.muted=false;var d=typeof a._iO.volume!== "undefined";if(a.isHTML5){if(i)i.muted=false}else b.o._setVolume(a.sID,d?a._iO.volume:a.options.volume);return a};this.toggleMute=function(){return a.muted?a.unmute():a.mute()};this.onposition=function(d,g,j){a._onPositionItems.push({position:d,method:g,scope:typeof j!=="undefined"?j:a,fired:false});return a};this.processOnPosition=function(){var d,g;d=a._onPositionItems.length;if(!d||!a.playState||a._onPositionFired>=d)return false;for(d=d;d--;){g=a._onPositionItems[d];if(!g.fired&&a.position>=g.position){g.method.apply(g.scope, [g.position]);g.fired=true;b._onPositionFired++}}return true};this.resetOnPosition=function(d){var g,j;g=a._onPositionItems.length;if(!g)return false;for(g=g;g--;){j=a._onPositionItems[g];if(j.fired&&d<=j.position){j.fired=false;b._onPositionFired--}}return true};this._onTimer=function(d){var g={};if(a._hasTimer||d)if(i&&(d||(a.playState>0||a.readyState===1)&&!a.paused)){a.duration=s();a.durationEstimate=a.duration;d=i.currentTime?i.currentTime*1E3:0;a._whileplaying(d,g,g,g,g);return true}else{b._wD('_onTimer: Warn for "'+ a.sID+'": '+(!i?"Could not find element. ":"")+(a.playState===0?"playState bad, 0?":"playState = "+a.playState+", OK"));return false}};s=function(){var d=i?i.duration*1E3:undefined;return d&&!isNaN(d)?d:null};n=function(){a.isHTML5&&Fa(a)};k=function(){a.isHTML5&&Ga(a)};f=function(){a._onPositionItems=[];a._onPositionFired=0;a._hasTimer=null;a._added_events=null;a._onplay_called=false;i=a._audio=null;a.bytesLoaded=null;a.bytesTotal=null;a.position=null;a.duration=a._iO&&a._iO.duration?a._iO.duration: null;a.durationEstimate=null;a.failures=0;a.loaded=false;a.playState=0;a.paused=false;a.readyState=0;a.muted=false;a.didBeforeFinish=false;a.didJustBeforeFinish=false;a.isBuffering=false;a.instanceOptions={};a.instanceCount=0;a.peakData={left:0,right:0};a.waveformData={left:[],right:[]};a.eqData=[];a.eqData.left=[];a.eqData.right=[]};f();this._setup_html5=function(d){d=y(a._iO,d);if(i){if(a.url!==d.url){b._wD("setting new URL on existing object: "+d.url);i.src=d.url}}else{b._wD("creating HTML5 Audio() element with URL: "+ d.url);a._audio=new Audio(d.url);i=a._audio;a.isHTML5=true;h()}i.loop=d.loops>1?"loop":"";return a._audio};e={canplay:function(){b._wD("HTML5::canplay: "+a.sID);a._onbufferchange(0)},load:function(){if(i&&!a.loaded){a._onbufferchange(0);a._whileloading(a.bytesTotal,a.bytesTotal,s());a._onload(true)}},ended:function(){b._wD("HTML5::ended: "+a.sID);a._onfinish()},error:function(){if(i){b._wD("HTML5::error: "+i.error.code);a._onload(false)}},loadstart:function(){b._wD("HTML5::loadstart: "+a.sID);a._onbufferchange(1)}, play:function(){b._wD("HTML5::play: "+a.sID);a._onbufferchange(0)},playing:function(){b._wD("HTML5::playing: "+a.sID);a._onbufferchange(0)},progress:function(d){if(!i||a.loaded)return false;var g,j,r;r=0;var w=d.type==="progress";j=d.target.buffered;var W=d.loaded||0,wa=d.total||1;if(j&&j.length){for(g=j.length;g--;)r=j.end(g)-j.start(g);W=r/d.target.duration;if(w&&j.length>1){r=[];j=j.length;for(g=0;ga._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,g){b._wD('SMSound._onid3(): "'+this.sID+'" ID3 data received.'); var j=[],r,w;r=0;for(w=d.length;r0)d=0;a.position=d;a.processOnPosition();if(o>8&&!a.isHTML5){if(a._iO.usePeakData&&typeof g!=="undefined"&&g)a.peakData={left:g.leftPeak,right:g.rightPeak};if(a._iO.useWaveformData&&typeof j!=="undefined"&&j)a.waveformData={left:j.split(","),right:r.split(",")};if(a._iO.useEQData)if(typeof w!=="undefined"&& w&&w.leftEQ){d=w.leftEQ.split(",");a.eqData=d;a.eqData.left=d;if(typeof w.rightEQ!=="undefined"&&w.rightEQ)a.eqData.right=w.rightEQ.split(",")}}if(a.playState===1){!a.isHTML5&&b.flashVersion===8&&!a.position&&a.isBuffering&&a._onbufferchange(0);a._iO.whileplaying&&a._iO.whileplaying.apply(a);if((a.loaded||!a.loaded&&a._iO.isMovieStar)&&a._iO.onbeforefinish&&a._iO.onbeforefinishtime&&!a.didBeforeFinish&&a.duration-a.position<=a._iO.onbeforefinishtime)a._onbeforefinish()}return true};this._onconnect= function(d){d=d===1;b._wD('SMSound._onconnect(): "'+a.sID+'"'+(d?" connected.":" failed to connect? - "+a.url),d?1:2);if(a.connected=d){a.failures=0;a._iO.onconnect&&a._iO.onconnect.apply(a,[d]);if(u(a.sID)&&(a.options.autoLoad||a.getAutoPlay()))a.play(undefined,a.getAutoPlay())}};this._onload=function(d){d=d?true:false;b._wD('SMSound._onload(): "'+a.sID+'"'+(d?" loaded.":" failed to load? - "+a.url),d?1:2);if(!d&&!a.isHTML5){b.sandbox.noRemote===true&&b._wD("SMSound._onload(): "+q("noNet"),1);b.sandbox.noLocal=== true&&b._wD("SMSound._onload(): "+q("noLocal"),1)}a.loaded=d;a.readyState=d?3:2;a._onbufferchange(0);a._iO.onload&&a._iO.onload.apply(a,[d]);return true};this._onfailure=function(d,g,j){a.failures++;b._wD('SMSound._onfailure(): "'+a.sID+'" count '+a.failures);a._iO.onfailure&&a.failures===1?a._iO.onfailure(a,d,g,j):b._wD("SMSound._onfailure(): ignoring")};this._onbeforefinish=function(){if(!a.didBeforeFinish){a.didBeforeFinish=true;if(a._iO.onbeforefinish){b._wD('SMSound._onbeforefinish(): "'+a.sID+ '"');a._iO.onbeforefinish.apply(a)}}};this._onjustbeforefinish=function(){if(!a.didJustBeforeFinish){a.didJustBeforeFinish=true;if(a._iO.onjustbeforefinish){b._wD('SMSound._onjustbeforefinish(): "'+a.sID+'"');a._iO.onjustbeforefinish.apply(a)}}};this._onstats=function(d){a._iO.onstats&&a._iO.onstats(a,d)};this._onfinish=function(){a._onbufferchange(0);a.resetOnPosition(0);a._iO.onbeforefinishcomplete&&a._iO.onbeforefinishcomplete.apply(a);a.didBeforeFinish=false;a.didJustBeforeFinish=false;if(a.instanceCount){a.instanceCount--; if(!a.instanceCount){a.playState=0;a.paused=false;a.instanceCount=0;a.instanceOptions={};k()}if(!a.instanceCount||a._iO.multiShotEvents)if(a._iO.onfinish){b._wD('SMSound._onfinish(): "'+a.sID+'"');a._iO.onfinish.apply(a)}}};this._onbufferchange=function(d){if(a.playState===0)return false;if(d&&a.isBuffering||!d&&!a.isBuffering)return false;a.isBuffering=d===1;if(a._iO.onbufferchange){b._wD("SMSound._onbufferchange(): "+d);a._iO.onbufferchange.apply(a)}return true};this._ondataerror=function(d){if(a.playState> 0){b._wD("SMSound._ondataerror(): "+d);a._iO.ondataerror&&a._iO.ondataerror.apply(a)}}};X=function(){return l.body?l.body:l._docElement?l.documentElement:l.getElementsByTagName("div")[0]};x=function(c){return l.getElementById(c)};y=function(c,a){var f={},h,e;for(h in c)if(c.hasOwnProperty(h))f[h]=c[h];h=typeof a==="undefined"?b.defaultOptions:a;for(e in h)if(h.hasOwnProperty(e)&&typeof f[e]==="undefined")f[e]=h[e];return f};v=function(){function c(e){e=Ja.call(e);var k=e.length;if(f){e[1]="on"+e[1]; k>3&&e.pop()}else k===3&&e.push(false);return e}function a(e,k){var n=e.shift(),s=[h[k]];f?n[s](e[0],e[1]):n[s].apply(n,e)}var f=p.attachEvent,h={add:f?"attachEvent":"addEventListener",remove:f?"detachEvent":"removeEventListener"};return{add:function(){a(c(arguments),"add")},remove:function(){a(c(arguments),"remove")}}}();fa=function(c){return c.type?U({type:c.type}):U(c.url)||z};U=function(c){if(!b.useHTML5Audio||!b.hasHTML5)return false;var a,f=b.audioFormats;if(!F){F=[];for(a in f)if(f.hasOwnProperty(a)){F.push(a); if(f[a].related)F=F.concat(f[a].related)}F=RegExp("\\.("+F.join("|")+")","i")}a=typeof c.type!=="undefined"?c.type:null;c=typeof c==="string"?c.toLowerCase().match(F):null;if(!c||!c.length){if(!a)return false}else c=c[0].substr(1);if(c&&typeof b.html5[c]!=="undefined")return b.html5[c];else{if(!a)if(c&&b.html5[c])return b.html5[c];else a="audio/"+c;a=b.html5.canPlayType(a);return b.html5[c]=a}};Ia=function(){function c(n){var s,i,d=false;if(!a||typeof a.canPlayType!=="function")return false;if(n instanceof Array){s=0;for(i=n.length;s1&&c.stream){m("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};Da=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(C||c){m("smFail",2);b.disable(c)}};Ea=function(c){var a=null;if(c)if(c.match(/\.swf(\?.*)?$/i)){if(a=c.substr(c.toLowerCase().lastIndexOf(".swf?")+4))return c}else if(c.lastIndexOf("/")!==c.length-1)c+="/";return(c&&c.lastIndexOf("/")!==-1?c.substr(0,c.lastIndexOf("/")+1):"./")+b.movieURL};na=function(){if(o!==8&&o!==9){b._wD(q("badFV", o,8));b.flashVersion=8}var c=b.debugMode||b.debugFlash?"_debug.swf":".swf";if(b.useHTML5Audio&&!z&&b.audioFormats.mp4.required&&b.flashVersion<9){b._wD(q("needfl9"));b.flashVersion=9}o=b.flashVersion;b.version=b.versionNumber+(z?" (HTML5-only mode)":o===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(o>8){b.defaultOptions=y(b.defaultOptions,b.flash9Options);b.features.buffering=true}if(o>8&&b.useMovieStar){b.defaultOptions=y(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[o!==8?"flash9":"flash8"];b.movieURL=(o===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",c);b.features.peakData=b.features.waveformData=b.features.eqData=o>8};Ca=function(c,a){if(!b.o||!b.allowPolling)return false;b.o._setPolling(c,a)};aa=function(c,a){function f(){b._wD("-- SoundManager 2 "+b.version+(!z&&b.useHTML5Audio? b.hasHTML5?" + HTML5 audio":", no HTML5 audio support":"")+(!z?(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,k;k=X();var n,s,i=N(),d,g=null;g=(g=l.getElementsByTagName("html")[0])&& g.dir&&g.dir.match(/rtl/i);c=typeof c==="undefined"?b.id:c;if(K&&Q)return false;if(z){na();f();b.oMC=x(b.movieID);Y();Q=K=true;return false}K=true;na();b.url=Ea(b._overHTTP?h:e);a=b.url;b.wmode=!b.wmode&&b.useHighPerformance&&!b.useMovieStar?"transparent":b.wmode;if(b.wmode!==null&&!D&&!b.useHighPerformance&&navigator.platform.match(/win32/i)){b.specialWmodeCase=true;m("spcWmode");b.wmode=null}k={name:c,id:c,src:a,width:"100%",height:"100%",quality:"high",allowScriptAccess:b.allowScriptAccess,bgcolor:b.bgColor, pluginspage:"http://www.macromedia.com/go/getflashplayer",type:"application/x-shockwave-flash",wmode:b.wmode};if(b.debugFlash)k.FlashVars="debug=1";b.wmode||delete k.wmode;if(D){h=l.createElement("div");s=''+(b.wmode?' ': "")+''+(b.debugFlash?'':"")+"