(function(a){function c(b,c){function bV(a){return function(b){return!this._t||!this._t._a?null:a.call(this,b)}}this.flashVersion=8,this.debugMode=!1,this.debugFlash=!1,this.useConsole=!0,this.consoleOnly=!1,this.waitForWindowLoad=!1,this.bgColor="#ffffff",this.useHighPerformance=!1,this.flashPollingInterval=null,this.flashLoadTimeout=1e3,this.wmode=null,this.allowScriptAccess="always",this.useFlashBlock=!1,this.useHTML5Audio=!0,this.html5Test=/^(probably|maybe)$/i,this.preferFlash=!0,this.noSWFCache=!1,this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}},this.defaultOptions={autoLoad:!1,stream:!0,autoPlay:!1,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,type:null,usePolicyFile:!1,volume:100},this.flash9Options={isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null},this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null},this.movieID="sm2-container",this.id=c||"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.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20111030",this.version=null,this.movieURL=null,this.url=b||null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.o=null,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!1,this.specialWmodeCase=!1,this.didFlashBlock=!1,this.filePattern=null,this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i},this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1},this.sandbox={},this.hasHTML5=function(){try{return typeof Audio!="undefined"&&typeof (new Audio).canPlayType!="undefined"}catch(a){return!1}}(),this.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var d,e=this,f="soundManager",g=f+"::",h="HTML5::",i,j=navigator.userAgent,k=a,l=k.location.href.toString(),m=document,n,o,p,q=[],r=!0,s,t=!1,u=!1,v=!1,w=!1,x=!1,y,z=0,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S=["log","info","warn","error"],T=8,U,V,W,X=null,Y=null,Z,$,_,ba,bb,bc,bd,be,bf=!1,bg=!1,bh,bi,bj,bk,bl=null,bm,bn,bo,bp,bq,br,bs,bt,bu=Array.prototype.slice,bv=!1,bw,bx,by,bz,bA,bB=j.match(/(ipad|iphone|ipod)/i),bC=j.match(/firefox/i),bD=j.match(/droid/i),bE=j.match(/msie/i),bF=j.match(/webkit/i),bG=j.match(/safari/i)&&!j.match(/chrome/i),bH=j.match(/opera/i),bI=j.match(/(mobile|pre\/|xoom)/i)||bB,bJ=!l.match(/usehtml5audio/i)&&!l.match(/sm2\-ignorebadua/i)&&bG&&j.match(/OS X 10_6_([3-7])/i),bK=typeof console!="undefined"&&typeof console.log!="undefined",bL=typeof m.hasFocus!="undefined"?m.hasFocus():null,bM=bG&&typeof m.hasFocus=="undefined",bN=!bM,bO=/(mp3|mp4|mpa)/i,bP="about:blank",bQ=m.location?m.location.protocol.match(/http/i):null,bR=bQ?"":"http://",bS=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|mp4v|3gp|3g2)\s*(?:$|;)/i,bT=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","mp4v","3gp","3g2"],bU=new RegExp("\\.("+bT.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!bQ,this._global_a=null,bI&&(e.useHTML5Audio=!0,e.preferFlash=!1,bB&&(e.ignoreFlash=!0,bv=!0)),this.ok=function(){return bl?v&&!w:e.useHTML5Audio&&e.hasHTML5},this.supported=this.ok,this.getMovie=function(a){return i(a)||m[a]||k[a]},this.createSound=function(a){function i(){return c=bb(c),e.sounds[h.id]=new d(h),e.soundIDs.push(h.id),e.sounds[h.id]}var b=f+".createSound(): ",c=null,g=null,h=null;return!v||!e.ok()?(bd(b+Z(v?"notOK":"notReady")),!1):(arguments.length===2&&(a={id:arguments[0],url:arguments[1]}),c=B(a),h=c,be(h.id,!0)?e.sounds[h.id]:(bn(h)?(g=i(),g._setup_html5(h)):(p>8&&(h.isMovieStar===null&&(h.isMovieStar=h.serverURL||(h.type?h.type.match(bS):!1)||h.url.match(bU)),h.isMovieStar&&h.usePeakData&&(h.usePeakData=!1)),h=bc(h,b),g=i(),p===8?e.o._createSound(h.id,h.loops||1,h.usePolicyFile):(e.o._createSound(h.id,h.url,h.usePeakData,h.useWaveformData,h.useEQData,h.isMovieStar,h.isMovieStar?h.bufferTime:!1,h.loops||1,h.serverURL,h.duration||null,h.autoPlay,!0,h.autoLoad,h.usePolicyFile),h.serverURL||(g.connected=!0,h.onconnect&&h.onconnect.apply(g))),!h.serverURL&&(h.autoLoad||h.autoPlay)&&g.load(h)),!h.serverURL&&h.autoPlay&&g.play(),g))},this.destroySound=function(a,b){if(!be(a))return!1;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}return b||c.destruct(!0),c=null,delete e.sounds[a],!0},this.load=function(a,b){return be(a)?e.sounds[a].load(b):!1},this.unload=function(a){return be(a)?e.sounds[a].unload():!1},this.onposition=function(a,b,c,d){return be(a)?e.sounds[a].onposition(b,c,d):!1},this.play=function(a,b){var c=f+".play(): ";return!v||!e.ok()?(bd(c+Z(v?"notOK":"notReady")),!1):be(a)?e.sounds[a].play(b):(b instanceof Object||(b={url:b}),b&&b.url?(b.id=a,e.createSound(b).play()):!1)},this.start=this.play,this.setPosition=function(a,b){return be(a)?e.sounds[a].setPosition(b):!1},this.stop=function(a){return be(a)?e.sounds[a].stop():!1},this.stopAll=function(){var a;for(a in e.sounds)e.sounds.hasOwnProperty(a)&&e.sounds[a].stop()},this.pause=function(a){return be(a)?e.sounds[a].pause():!1},this.pauseAll=function(){var a;for(a=e.soundIDs.length;a--;)e.sounds[e.soundIDs[a]].pause()},this.resume=function(a){return be(a)?e.sounds[a].resume():!1},this.resumeAll=function(){var a;for(a=e.soundIDs.length;a--;)e.sounds[e.soundIDs[a]].resume()},this.togglePause=function(a){return be(a)?e.sounds[a].togglePause():!1},this.setPan=function(a,b){return be(a)?e.sounds[a].setPan(b):!1},this.setVolume=function(a,b){return be(a)?e.sounds[a].setVolume(b):!1},this.mute=function(a){var b=f+".mute(): ",c=0;typeof a!="string"&&(a=null);if(!a){for(c=e.soundIDs.length;c--;)e.sounds[e.soundIDs[c]].mute();return e.muted=!0,!0}return be(a)?e.sounds[a].mute():!1},this.muteAll=function(){e.mute()},this.unmute=function(a){var b=f+".unmute(): ",c;typeof a!="string"&&(a=null);if(!a){for(c=e.soundIDs.length;c--;)e.sounds[e.soundIDs[c]].unmute();return e.muted=!1,!0}return be(a)?e.sounds[a].unmute():!1},this.unmuteAll=function(){e.unmute()},this.toggleMute=function(a){return be(a)?e.sounds[a].toggleMute():!1},this.getMemoryUse=function(){var a=0;return e.o&&p!==8&&(a=parseInt(e.o._getMemoryUse(),10)),a},this.disable=function(a){var b;typeof a=="undefined"&&(a=!1);if(w)return!1;w=!0;for(b=e.soundIDs.length;b--;)U(e.sounds[e.soundIDs[b]]);return A(a),bt.remove(k,"load",E),!0},this.canPlayMIME=function(a){var b;return e.hasHTML5&&(b=bo({type:a})),!bl||b?b:a?!!((p>8?a.match(bS):null)||a.match(e.mimePattern)):null},this.canPlayURL=function(a){var b;return e.hasHTML5&&(b=bo({url:a})),!bl||b?b:a?!!a.match(e.filePattern):null},this.canPlayLink=function(a){return typeof a.type!="undefined"&&a.type&&e.canPlayMIME(a.type)?!0:e.canPlayURL(a.href)},this.getSoundById=function(a,b){if(!a)throw new Error(f+".getSoundById(): sID is null/undefined");var c=e.sounds[a];return c},this.onready=function(a,b){var c="onready";if(a&&a instanceof Function)return b||(b=k),C(c,a,b),D(),!0;throw Z("needFunction",c)},this.ontimeout=function(a,b){var c="ontimeout";if(a&&a instanceof Function)return b||(b=k),C(c,a,b),D({type:c}),!0;throw Z("needFunction",c)},this._writeDebug=function(a,b,c){return!0},this._wD=this._writeDebug,this._debug=function(){},this.reboot=function(){var a,b;for(a=e.soundIDs.length;a--;)e.sounds[e.soundIDs[a]].destruct();try{bE&&(Y=e.o.innerHTML),X=e.o.parentNode.removeChild(e.o)}catch(c){}Y=X=bl=null,e.enabled=M=v=bf=bg=t=u=w=e.swfLoaded=!1,e.soundIDs=e.sounds=[],e.o=null;for(a in q)if(q.hasOwnProperty(a))for(b=q[a].length;b--;)q[a][b].fired=!1;k.setTimeout(e.beginDelayedInit,20)},this.getMoviePercent=function(){return e.o&&typeof e.o.PercentLoaded!="undefined"?e.o.PercentLoaded():null},this.beginDelayedInit=function(){x=!0,L(),setTimeout(function(){return bg?!1:(O(),K(),bg=!0,!0)},20),F()},this.destruct=function(){e.disable(!0)},d=function(a){var b=this,c,d,f;this.sID=a.id,this.url=a.url,this.options=B(a),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this._lastURL=null,this.isHTML5=!1,this._a=null,this.id3={},this._debug=function(){},this.load=function(a){var c=null;typeof a!="undefined"?(b._iO=B(a,b.options),b.instanceOptions=b._iO):(a=b.options,b._iO=a,b.instanceOptions=b._iO,b._lastURL&&b._lastURL!==b.url&&(b._iO.url=b.url,b.url=null)),b._iO.url||(b._iO.url=b.url);if(b._iO.url===b.url&&b.readyState!==0&&b.readyState!==2)return b;b._lastURL=b.url,b.loaded=!1,b.readyState=1,b.playState=0;if(bn(b._iO))c=b._setup_html5(b._iO),c._called_load||(b._html5_canplay=!1,c.load(),c._called_load=!0,b._iO.autoPlay&&b.play());else try{b.isHTML5=!1,b._iO=bc(bb(b._iO)),p===8?e.o._load(b.sID,b._iO.url,b._iO.stream,b._iO.autoPlay,b._iO.whileloading?1:0,b._iO.loops||1,b._iO.usePolicyFile):e.o._load(b.sID,b._iO.url,!!b._iO.stream,!!b._iO.autoPlay,b._iO.loops||1,!!b._iO.autoLoad,b._iO.usePolicyFile)}catch(d){P({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}return b},this.unload=function(){return b.readyState!==0&&(b.isHTML5?(d(),b._a&&(b._a.pause(),bq(b._a))):p===8?e.o._unload(b.sID,bP):e.o._unload(b.sID),c()),b},this.destruct=function(a){b.isHTML5?(d(),b._a&&(b._a.pause(),bq(b._a),bv||b._remove_html5_events(),b._a._t=null,b._a=null)):(b._iO.onfailure=null,e.o._destroySound(b.sID)),a||e.destroySound(b.sID,!0)},this.play=function(a,c){var d="SMSound.play(): ",g,h;c=c===undefined?!0:c,a||(a={}),b._iO=B(a,b._iO),b._iO=B(b._iO,b.options),b.instanceOptions=b._iO;if(b._iO.serverURL&&!b.connected)return b.getAutoPlay()||b.setAutoPlay(!0),b;bn(b._iO)&&(b._setup_html5(b._iO),f());if(b.playState===1&&!b.paused){g=b._iO.multiShot;if(!g)return b}if(!b.loaded)if(b.readyState===0)b.isHTML5||(b._iO.autoPlay=!0),b.load(b._iO);else if(b.readyState===2)return b;return!b.isHTML5&&p===9&&b.position>0&&b.position===b.duration&&(b._iO.position=0),b.paused&&b.position&&b.position>0?b.resume():(b.playState=1,b.paused=!1,(!b.instanceCount||b._iO.multiShotEvents||!b.isHTML5&&p>8&&!b.getAutoPlay())&&b.instanceCount++,b.position=typeof b._iO.position!="undefined"&&!isNaN(b._iO.position)?b._iO.position:0,b.isHTML5||(b._iO=bc(bb(b._iO))),b._iO.onplay&&c&&(b._iO.onplay.apply(b),b._onplay_called=!0),b.setVolume(b._iO.volume,!0),b.setPan(b._iO.pan,!0),b.isHTML5?(f(),h=b._setup_html5(),b.setPosition(b._iO.position),h.play()):e.o._start(b.sID,b._iO.loops||1,p===9?b._iO.position:b._iO.position/1e3)),b},this.start=this.play,this.stop=function(a){return b.playState===1&&(b._onbufferchange(0),b.resetOnPosition(0),b.paused=!1,b.isHTML5||(b.playState=0),b._iO.onstop&&b._iO.onstop.apply(b),b.isHTML5?b._a&&(b.setPosition(0),b._a.pause(),b.playState=0,b._onTimer(),d()):(e.o._stop(b.sID,a),b._iO.serverURL&&b.unload()),b.instanceCount=0,b._iO={}),b},this.setAutoPlay=function(a){b._iO.autoPlay=a,b.isHTML5||(e.o._setAutoPlay(b.sID,a),a&&!b.instanceCount&&b.readyState===1&&b.instanceCount++)},this.getAutoPlay=function(){return b._iO.autoPlay},this.setPosition=function(a){a===undefined&&(a=0);var c,d,f,g=b.isHTML5?Math.max(a,0):Math.min(b.duration||b._iO.duration,Math.max(a,0));c=b.position,b.position=g,f=b.position/1e3,b.resetOnPosition(b.position),b._iO.position=g;if(!b.isHTML5)d=p===9?b.position:f,b.readyState&&b.readyState!==2&&e.o._setPosition(b.sID,d,b.paused||!b.playState);else if(b._a&&b._html5_canplay&&b._a.currentTime!==f)try{b._a.currentTime=f,(b.playState===0||b.paused)&&b._a.pause()}catch(h){}return b.isHTML5&&b.paused&&b._onTimer(!0),b},this.pause=function(a){return b.paused||b.playState===0&&b.readyState!==1?b:(b.paused=!0,b.isHTML5?(b._setup_html5().pause(),d()):(a||a===undefined)&&e.o._pause(b.sID),b._iO.onpause&&b._iO.onpause.apply(b),b)},this.resume=function(){return b.paused?(b.paused=!1,b.playState=1,b.isHTML5?(b._setup_html5().play(),f()):(b._iO.isMovieStar&&b.setPosition(b.position),e.o._pause(b.sID)),!b._onplay_called&&b._iO.onplay?(b._iO.onplay.apply(b),b._onplay_called=!0):b._iO.onresume&&b._iO.onresume.apply(b),b):b},this.togglePause=function(){return b.playState===0?(b.play({position:p===9&&!b.isHTML5?b.position:b.position/1e3}),b):(b.paused?b.resume():b.pause(),b)},this.setPan=function(a,c){return typeof a=="undefined"&&(a=0),typeof c=="undefined"&&(c=!1),b.isHTML5||e.o._setPan(b.sID,a),b._iO.pan=a,c||(b.pan=a,b.options.pan=a),b},this.setVolume=function(a,c){return typeof a=="undefined"&&(a=100),typeof c=="undefined"&&(c=!1),b.isHTML5?b._a&&(b._a.volume=Math.max(0,Math.min(1,a/100))):e.o._setVolume(b.sID,e.muted&&!b.muted||b.muted?0:a),b._iO.volume=a,c||(b.volume=a,b.options.volume=a),b},this.mute=function(){return b.muted=!0,b.isHTML5?b._a&&(b._a.muted=!0):e.o._setVolume(b.sID,0),b},this.unmute=function(){b.muted=!1;var a=typeof b._iO.volume!="undefined";return b.isHTML5?b._a&&(b._a.muted=!1):e.o._setVolume(b.sID,a?b._iO.volume:b.options.volume),b},this.toggleMute=function(){return b.muted?b.unmute():b.mute()},this.onposition=function(a,c,d){return b._onPositionItems.push({position:a,method:c,scope:typeof d!="undefined"?d:b,fired:!1}),b},this.processOnPosition=function(){var a,c,d=b._onPositionItems.length;if(!d||!b.playState||b._onPositionFired>=d)return!1;for(a=d;a--;)c=b._onPositionItems[a],!c.fired&&b.position>=c.position&&(c.fired=!0,e._onPositionFired++,c.method.apply(c.scope,[c.position]));return!0},this.resetOnPosition=function(a){var c,d,f=b._onPositionItems.length;if(!f)return!1;for(c=f;c--;)d=b._onPositionItems[c],d.fired&&a<=d.position&&(d.fired=!1,e._onPositionFired--);return!0},f=function(){b.isHTML5&&bj(b)},d=function(){b.isHTML5&&bk(b)},c=function(){b._onPositionItems=[],b._onPositionFired=0,b._hasTimer=null,b._onplay_called=!1,b._a=null,b._html5_canplay=!1,b.bytesLoaded=null,b.bytesTotal=null,b.position=null,b.duration=b._iO&&b._iO.duration?b._iO.duration:null,b.durationEstimate=null,b.failures=0,b.loaded=!1,b.playState=0,b.paused=!1,b.readyState=0,b.muted=!1,b.isBuffering=!1,b.instanceOptions={},b.instanceCount=0,b.peakData={left:0,right:0},b.waveformData={left:[],right:[]},b.eqData=[],b.eqData.left=[],b.eqData.right=[]},c(),this._onTimer=function(a){var c,d={};if(b._hasTimer||a)return b._a&&(a||(b.playState>0||b.readyState===1)&&!b.paused)?(b.duration=b._get_html5_duration(),b.durationEstimate=b.duration,c=b._a.currentTime?b._a.currentTime*1e3:0,b._whileplaying(c,d,d,d,d),!0):!1},this._get_html5_duration=function(){var a=b._a?b._a.duration*1e3:b._iO?b._iO.duration:undefined,c=a&&!isNaN(a)&&a!==Infinity?a:b._iO?b._iO.duration:null;return c},this._setup_html5=function(a){var d=B(b._iO,a),f=decodeURI,g=bv?e._global_a:b._a,h=f(d.url),i=g&&g._t?g._t.instanceOptions:null;if(g){if(g._t&&i.url===d.url&&(!b._lastURL||b._lastURL===i.url))return g;bv&&g._t&&g._t.playState&&d.url!==i.url&&g._t.stop(),c(),g.src=d.url,b.url=d.url,b._lastURL=d.url,g._called_load=!1}else g=new Audio(d.url),g._called_load=!1,bD&&(g._called_load=!0),bv&&(e._global_a=g);return b.isHTML5=!0,b._a=g,g._t=b,b._add_html5_events(),g.loop=d.loops>1?"loop":"",d.autoLoad||d.autoPlay?(g.autobuffer="auto",g.preload="auto",b.load(),g._called_load=!0):(g.autobuffer=!1,g.preload="none"),g.loop=d.loops>1?"loop":"",g},this._add_html5_events=function(){function c(a,c,d){return b._a?b._a.addEventListener(a,c,d||!1):null}if(b._a._added_events)return!1;var a;b._a._added_events=!0;for(a in bz)bz.hasOwnProperty(a)&&c(a,bz[a]);return!0},this._remove_html5_events=function(){function c(a,c,d){return b._a?b._a.removeEventListener(a,c,d||!1):null}var a;b._a._added_events=!1;for(a in bz)bz.hasOwnProperty(a)&&c(a,bz[a])},this._onload=function(a){var c="SMSound._onload(): ",d=!!a;return b.loaded=d,b.readyState=d?3:2,b._onbufferchange(0),b._iO.onload&&b._iO.onload.apply(b,[d]),!0},this._onbufferchange=function(a){var c="SMSound._onbufferchange()";return b.playState===0?!1:a&&b.isBuffering||!a&&!b.isBuffering?!1:(b.isBuffering=a===1,b._iO.onbufferchange&&b._iO.onbufferchange.apply(b),!0)},this._onsuspend=function(){return b._iO.onsuspend&&b._iO.onsuspend.apply(b),!0},this._onfailure=function(a,c,d){b.failures++,b._iO.onfailure&&b.failures===1&&b._iO.onfailure(b,a,c,d)},this._onfinish=function(){var a=b._iO.onfinish;b._onbufferchange(0),b.resetOnPosition(0),b.instanceCount&&(b.instanceCount--,b.instanceCount||(b.playState=0,b.paused=!1,b.instanceCount=0,b.instanceOptions={},b._iO={},d()),(!b.instanceCount||b._iO.multiShotEvents)&&a&&a.apply(b))},this._whileloading=function(a,c,d,e){b.bytesLoaded=a,b.bytesTotal=c,b.duration=Math.floor(d),b.bufferLength=e,b._iO.isMovieStar?(b.durationEstimate=b.duration,b.readyState!==3&&b._iO.whileloading&&b._iO.whileloading.apply(b)):(b._iO.duration?b.durationEstimate=b.duration>b._iO.duration?b.duration:b._iO.duration:b.durationEstimate=parseInt(b.bytesTotal/b.bytesLoaded*b.duration,10),b.durationEstimate===undefined&&(b.durationEstimate=b.duration),b.readyState!==3&&b._iO.whileloading&&b._iO.whileloading.apply(b))},this._whileplaying=function(a,c,d,e,f){if(isNaN(a)||a===null)return!1;b.position=a,b.processOnPosition();if(!b.isHTML5&&p>8){b._iO.usePeakData&&typeof c!="undefined"&&c&&(b.peakData={left:c.leftPeak,right:c.rightPeak}),b._iO.useWaveformData&&typeof d!="undefined"&&d&&(b.waveformData={left:d.split(","),right:e.split(",")});if(b._iO.useEQData&&typeof f!="undefined"&&f&&f.leftEQ){var g=f.leftEQ.split(",");b.eqData=g,b.eqData.left=g,typeof f.rightEQ!="undefined"&&f.rightEQ&&(b.eqData.right=f.rightEQ.split(","))}}return b.playState===1&&(!b.isHTML5&&p===8&&!b.position&&b.isBuffering&&b._onbufferchange(0),b._iO.whileplaying&&b._iO.whileplaying.apply(b)),!0},this._onid3=function(a,c){var d=[],e,f;for(e=0,f=a.length;e<f;e++)d[a[e]]=c[e];b.id3=B(b.id3,d),b._iO.onid3&&b._iO.onid3.apply(b)},this._onconnect=function(a){var c="SMSound._onconnect(): ";a=a===1,b.connected=a,a&&(b.failures=0,be(b.sID)&&(b.getAutoPlay()?b.play(undefined,b.getAutoPlay()):b._iO.autoLoad&&b.load()),b._iO.onconnect&&b._iO.onconnect.apply(b,[a]))},this._ondataerror=function(a){b.playState>0&&b._iO.ondataerror&&b._iO.ondataerror.apply(b)}},N=function(){return m.body||m._docElement||m.getElementsByTagName("div")[0]},i=function(a){return m.getElementById(a)},B=function(a,b){var c={},d,f,g;for(d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);f=typeof b=="undefined"?e.defaultOptions:b;for(g in f)f.hasOwnProperty(g)&&typeof c[g]=="undefined"&&(c[g]=f[g]);return c},bt=function(){function c(b){var c=bu.call(b),d=c.length;return a?(c[1]="on"+c[1],d>3&&c.pop()):d===3&&c.push(!1),c}function d(c,d){var e=c.shift(),f=[b[d]];a?e[f](c[0],c[1]):e[f].apply(e,c)}function e(){d(c(arguments),"add")}function f(){d(c(arguments),"remove")}var a=k.attachEvent,b={add:a?"attachEvent":"addEventListener",remove:a?"detachEvent":"removeEventListener"};return{add:e,remove:f}}(),bz={abort:bV(function(a){}),canplay:bV(function(a){if(this._t._html5_canplay)return!0;this._t._html5_canplay=!0,this._t._onbufferchange(0);var b=isNaN(this._t.position)?null:this._t.position/1e3;if(this._t.position&&this.currentTime!==b)try{this.currentTime=b}catch(c){}}),load:bV(function(a){this._t.loaded||(this._t._onbufferchange(0),this._t._whileloading(this._t.bytesTotal,this._t.bytesTotal,this._t._get_html5_duration()),this._t._onload(!0))}),emptied:bV(function(a){}),ended:bV(function(a){this._t._onfinish()}),error:bV(function(a){this._t._onload(!1)}),loadeddata:bV(function(a){var b=this._t,c=b.bytesTotal||1;!b._loaded&&!bG&&(b.duration=b._get_html5_duration(),b._whileloading(c,c,b._get_html5_duration()),b._onload(!0))}),loadedmetadata:bV(function(a){}),loadstart:bV(function(a){this._t._onbufferchange(1)}),play:bV(function(a){this._t._onbufferchange(0)}),playing:bV(function(a){this._t._onbufferchange(0)}),progress:bV(function(a){if(this._t.loaded)return!1;var b,c,d,e=0,f=a.type==="progress",g=a.target.buffered,h=a.loaded||0,i=a.total||1;if(g&&g.length){for(b=g.length;b--;)e=g.end(b)-g.start(b);h=e/a.target.duration}isNaN(h)||(this._t._onbufferchange(0),this._t._whileloading(h,i,this._t._get_html5_duration()),h&&i&&h===i&&bz.load.call(this,a))}),ratechange:bV(function(a){}),suspend:bV(function(a){bz.progress.call(this,a),this._t._onsuspend()}),stalled:bV(function(a){}),timeupdate:bV(function(a){this._t._onTimer()}),waiting:bV(function(a){this._t._onbufferchange(1)})},bn=function(a){return!a.serverURL&&(a.type?bo({type:a.type}):bo({url:a.url})||e.html5Only)},bq=function(a){a&&(a.src=bC?"":bP)},bo=function(a){function j(a){return e.preferFlash&&bw&&!e.ignoreFlash&&typeof e.flash[a]!="undefined"&&e.flash[a]}if(!e.useHTML5Audio||!e.hasHTML5)return!1;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(!bp){bp=[];for(i in d)d.hasOwnProperty(i)&&(bp.push(i),d[i].related&&(bp=bp.concat(d[i].related)));bp=new RegExp("\\.("+bp.join("|")+")(\\?.*)?$","i")}h=b?b.toLowerCase().match(bp):null;if(!h||!h.length){if(!c)return!1;g=c.indexOf(";"),h=(g!==-1?c.substr(0,g):c).substr(6)}else h=h[1];return h&&typeof e.html5[h]!="undefined"?e.html5[h]&&!j(h):(c="audio/"+h,f=e.html5.canPlayType({type:c}),e.html5[h]=f,f&&e.html5[c]&&!j(c))},bs=function(){function g(b){var c,d,f,g=!1;if(!a||typeof a.canPlayType!="function")return!1;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=!0,e.html5[b[d]]=!0,e.flash[b[d]]=!!(e.preferFlash&&bw&&b[d].match(bO));return g}return c=a&&typeof a.canPlayType=="function"?a.canPlayType(b):!1,!!c&&!!c.match(e.html5Test)}if(!e.useHTML5Audio||typeof Audio=="undefined")return!1;var a=typeof Audio!="undefined"?bH?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],e.preferFlash&&!e.ignoreFlash&&b.match(bO)?e.flash[b]=!0:e.flash[b]=!1;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]}return c.canPlayType=a?g:null,e.html5=B(e.html5,c),!0},J={},Z=function(){},bb=function(a){return p===8&&a.loops>1&&a.stream&&(a.stream=!1),a},bc=function(a,b){return a&&!a.usePolicyFile&&(a.onid3||a.usePeakData||a.useWaveformData||a.useEQData)&&(a.usePolicyFile=!0),a},bd=function(a){},n=function(){return!1},U=function(a){var b;for(b in a)a.hasOwnProperty(b)&&typeof a[b]=="function"&&(a[b]=n);b=null},V=function(a){typeof a=="undefined"&&(a=!1),(w||a)&&e.disable(a)},W=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 a.lastIndexOf("/")!==a.length-1&&(a+="/");return c=(a&&a.lastIndexOf("/")!==-1?a.substr(0,a.lastIndexOf("/")+1):"./")+e.movieURL,e.noSWFCache&&(c+="?ts="+(new Date).getTime()),c},H=function(){p=parseInt(e.flashVersion,10),p!==8&&p!==9&&(e.flashVersion=p=T);var a=e.debugMode||e.debugFlash?"_debug.swf":".swf";e.useHTML5Audio&&!e.html5Only&&e.audioFormats.mp4.required&&p<9&&(e.flashVersion=p=9),e.version=e.versionNumber+(e.html5Only?" (HTML5-only mode)":p===9?" (AS3/Flash 9)":" (AS2/Flash 8)"),p>8?(e.defaultOptions=B(e.defaultOptions,e.flash9Options),e.features.buffering=!0,e.defaultOptions=B(e.defaultOptions,e.movieStarOptions),e.filePatterns.flash9=new RegExp("\\.(mp3|"+bT.join("|")+")(\\?.*)?$","i"),e.features.movieStar=!0):e.features.movieStar=!1,e.filePattern=e.filePatterns[p!==8?"flash9":"flash8"],e.movieURL=(p===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",a),e.features.peakData=e.features.waveformData=e.features.eqData=p>8},Q=function(a,b){if(!e.o)return!1;e.o._setPolling(a,b)},R=function(){e.debugURLParam.test(l)&&(e.debugMode=!0)},be=this.getSoundById,_=function(){var a=[];return e.debugMode&&a.push(e.swfCSS.sm2Debug),e.debugFlash&&a.push(e.swfCSS.flashDebug),e.useHighPerformance&&a.push(e.swfCSS.highPerf),a.join(" ")},$=function(){var a=Z("fbHandler"),b=e.getMoviePercent(),c=e.swfCSS,d={type:"FLASHBLOCK"};if(e.html5Only)return!1;e.ok()?(!e.didFlashBlock,e.oMC&&(e.oMC.className=[_(),c.swfDefault,c.swfLoaded+(e.didFlashBlock?" "+c.swfUnblocked:"")].join(" "))):(bl&&(e.oMC.className=_()+" "+c.swfDefault+" "+(b===null?c.swfTimedout:c.swfError)),e.didFlashBlock=!0,D({type:"ontimeout",ignoreInit:!0,error:d}),P(d))},C=function(a,b,c){typeof q[a]=="undefined"&&(q[a]=[]),q[a].push({method:b,scope:c||null,fired:!1})},D=function(a){a||(a={type:"onready"});if(!v&&a&&!a.ignoreInit)return!1;if(a.type==="ontimeout"&&e.ok())return!1;var b={success:a&&a.ignoreInit?e.ok():!w},c=a&&a.type?q[a.type]||[]:[],d=[],f,g,h=[b],i=bl&&e.useFlashBlock&&!e.ok();a.error&&(h[0].error=a.error);for(f=0,g=c.length;f<g;f++)c[f].fired!==!0&&d.push(c[f]);if(d.length)for(f=0,g=d.length;f<g;f++)d[f].scope?d[f].method.apply(d[f].scope,h):d[f].method.apply(this,h),i||(d[f].fired=!0);return!0},E=function(){k.setTimeout(function(){e.useFlashBlock&&$(),D(),e.onload instanceof Function&&e.onload.apply(k),e.waitForWindowLoad&&bt.add(k,"load",E)},1)},bx=function(){if(bw!==undefined)return bw;var a=!1,b=navigator,c=b.plugins,d,e,f,g=k.ActiveXObject;if(c&&c.length)e="application/x-shockwave-flash",f=b.mimeTypes,f&&f[e]&&f[e].enabledPlugin&&f[e].enabledPlugin.description&&(a=!0);else if(typeof g!="undefined"){try{d=new g("ShockwaveFlash.ShockwaveFlash")}catch(h){}a=!!d}return bw=a,a},bm=function(){var a,b,c=bB&&!!j.match(/os (1|2|3_0|3_1)/i);if(c)return e.hasHTML5=!1,e.html5Only=!0,e.oMC&&(e.oMC.style.display="none"),!1;if(!e.useHTML5Audio)return!0;if(!e.html5||!e.html5.canPlayType)return e.hasHTML5=!1,!0;e.hasHTML5=!0;if(bJ&&bx())return!0;for(b in e.audioFormats)e.audioFormats.hasOwnProperty(b)&&(e.audioFormats[b].required&&!e.html5.canPlayType(e.audioFormats[b].type)||e.flash[b]||e.flash[e.audioFormats[b].type])&&(a=!0);return e.ignoreFlash&&(a=!1),e.html5Only=e.hasHTML5&&e.useHTML5Audio&&!a,!e.html5Only},bj=function(a){a._hasTimer||(a._hasTimer=!0)},bk=function(a){a._hasTimer&&(a._hasTimer=!1)},P=function(a){a=typeof a!="undefined"?a:{},e.onerror instanceof Function&&e.onerror.apply(k,[{type:typeof a.type!="undefined"?a.type:null}]),typeof a.fatal!="undefined"&&a.fatal&&e.disable()},by=function(){if(!bJ||!bx())return!1;var a=e.audioFormats,b,c;for(c in a)if(a.hasOwnProperty(c))if(c==="mp3"||c==="mp4"){e.html5[c]=!1;if(a[c]&&a[c].related)for(b=a[c].related.length;b--;)e.html5[a[c].related[b]]=!1}},this._setSandboxType=function(a){},this._externalInterfaceOK=function(a){if(e.swfLoaded)return!1;var b=(new Date).getTime();e.swfLoaded=!0,bM=!1,bJ&&by(),bE?setTimeout(o,100):o()},O=function(a,b){function c(){}function A(a,b){return'<param name="'+a+'" value="'+b+'" />'}if(t&&u)return!1;if(e.html5Only)return H(),c(),e.oMC=i(e.movieID),o(),t=!0,u=!0,!1;var d=b||e.url,f=e.altURL||d,g="JS/Flash audio component (SoundManager 2)",h,k,l=N(),n,p,q,r=_(),s,v,w,x="auto",y=null,z=m.getElementsByTagName("html")[0];y=z&&z.dir&&z.dir.match(/rtl/i),a=typeof a=="undefined"?e.id:a,H(),e.url=W(bQ?d:f),b=e.url,e.wmode=!e.wmode&&e.useHighPerformance?"transparent":e.wmode,e.wmode!==null&&(j.match(/msie 8/i)||!bE&&!e.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(e.specialWmodeCase=!0,e.wmode=null),h={name:a,id:a,src:b,width:x,height:x,quality:"high",allowScriptAccess:e.allowScriptAccess,bgcolor:e.bgColor,pluginspage:bR+"www.macromedia.com/go/getflashplayer",title:g,type:"application/x-shockwave-flash",wmode:e.wmode,hasPriority:"true"},e.debugFlash&&(h.FlashVars="debug=1"),e.wmode||delete h.wmode;if(bE)k=m.createElement("div"),p=['<object id="'+a+'" data="'+b+'" type="'+h.type+'" title="'+h.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+bR+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+h.width+'" height="'+h.height+'">',A("movie",b),A("AllowScriptAccess",e.allowScriptAccess),A("quality",h.quality),e.wmode?A("wmode",e.wmode):"",A("bgcolor",e.bgColor),A("hasPriority","true"),e.debugFlash?A("FlashVars",h.FlashVars):"","</object>"].join("");else{k=m.createElement("embed");for(n in h)h.hasOwnProperty(n)&&k.setAttribute(n,h[n])}R(),r=_(),l=N();if(l){e.oMC=i(e.movieID)||m.createElement("div");if(!e.oMC.id){e.oMC.id=e.movieID,e.oMC.className=e.swfCSS.swfDefault+" "+r,s=null,q=null,e.useFlashBlock||(e.useHighPerformance?s={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(s={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},y&&(s.left=Math.abs(parseInt(s.left,10))+"px"))),bF&&(e.oMC.style.zIndex=1e4);if(!e.debugFlash)for(v in s)s.hasOwnProperty(v)&&(e.oMC.style[v]=s[v]);try{bE||e.oMC.appendChild(k),l.appendChild(e.oMC),bE&&(q=e.oMC.appendChild(m.createElement("div")),q.className=e.swfCSS.swfBox,q.innerHTML=p),u=!0}catch(B){throw new Error(Z("domError")+" \n"+B.toString())}}else w=e.oMC.className,e.oMC.className=(w?w+" ":e.swfCSS.swfDefault)+(r?" "+r:""),e.oMC.appendChild(k),bE&&(q=e.oMC.appendChild(m.createElement("div")),q.className=e.swfCSS.swfBox,q.innerHTML=p),u=!0}return t=!0,c(),!0},K=function(){return e.html5Only?(O(),!1):e.o?!1:(e.o=e.getMovie(e.id),e.o||(X?(bE?e.oMC.innerHTML=Y:e.oMC.appendChild(X),X=null,t=!0):O(e.id,e.url),e.o=e.getMovie(e.id)),e.oninitmovie instanceof Function&&setTimeout(e.oninitmovie,1),!0)},F=function(){setTimeout(G,1e3)},G=function(){if(bf)return!1;bf=!0,bt.remove(k,"load",F);if(bM&&!bL)return!1;var a;v||(a=e.getMoviePercent()),setTimeout(function(){a=e.getMoviePercent(),!v&&bN&&(a===null?e.useFlashBlock||e.flashLoadTimeout===0?e.useFlashBlock&&$():V(!0):e.flashLoadTimeout!==0&&V(!0))},e.flashLoadTimeout)},I=function(){function a(){bt.remove(k,"focus",I),bt.remove(k,"load",I)}return bL||!bM?(a(),!0):(bN=!0,bL=!0,bG&&bM&&bt.remove(k,"mousemove",I),bf=!1,a(),!0)},bA=function(){var a,b=[];if(e.useHTML5Audio&&e.hasHTML5)for(a in e.audioFormats)e.audioFormats.hasOwnProperty(a)&&b.push(a+": "+e.html5[a]+(!e.html5[a]&&bw&&e.flash[a]?" (using flash)":e.preferFlash&&e.flash[a]&&bw?" (preferring flash)":e.html5[a]?"":" ("+(e.audioFormats[a].required?"required, ":"")+"and no flash support)"))},A=function(a){if(v)return!1;if(e.html5Only)return v=!0,E(),!0;var b=e.useFlashBlock&&e.flashLoadTimeout&&!e.getMoviePercent(),c;return b||(v=!0,w&&(c={type:!bw&&bl?"NO_FLASH":"INIT_TIMEOUT"})),w||a?(e.useFlashBlock&&e.oMC&&(e.oMC.className=_()+" "+(e.getMoviePercent()===null?e.swfCSS.swfTimedout:e.swfCSS.swfError)),D({type:"ontimeout",error:c}),P(c),!1):e.waitForWindowLoad&&!x?(bt.add(k,"load",E),!1):(E(),!0)},o=function(){function a(){bt.remove(k,"load",e.beginDelayedInit)}if(v)return!1;if(e.html5Only)return v||(a(),e.enabled=!0,A()),!0;K();try{e.o._externalInterfaceTest(!1),Q(!0,e.flashPollingInterval||(e.useHighPerformance?10:50)),e.debugMode||e.o._disableDebug(),e.enabled=!0,e.html5Only||bt.add(k,"unload",n)}catch(b){return P({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),V(!0),A(),!1}return A(),a(),!0},L=function(){return M?!1:(M=!0,R(),!bw&&e.hasHTML5&&(e.useHTML5Audio=!0,e.preferFlash=!1),bs(),e.html5.usingFlash=bm(),bl=e.html5.usingFlash,bA(),!bw&&bl&&(e.flashLoadTimeout=1),m.removeEventListener&&m.removeEventListener("DOMContentLoaded",L,!1),K(),!0)},br=function(){return m.readyState==="complete"&&(L(),m.detachEvent("onreadystatechange",br)),!0},bx(),bt.add(k,"focus",I),bt.add(k,"load",I),bt.add(k,"load",F),bG&&bM&&bt.add(k,"mousemove",I),m.addEventListener?m.addEventListener("DOMContentLoaded",L,!1):m.attachEvent?m.attachEvent("onreadystatechange",br):P({type:"NO_DOM2_EVENTS",fatal:!0}),m.readyState==="complete"&&setTimeout(L,100)}var b=null;if(typeof SM2_DEFER=="undefined"||!SM2_DEFER)b=new c;a.SoundManager=c,a.soundManager=b})(window)
