/*


 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.20110306
*/
(function(f){function j(j,e){function i(c){return function(a){return!this._t||!this._t._a?null:c.call(this,a)}}function pa(){if(c.debugURLParam.test(Q))c.debugMode=!0}this.flashVersion=8;this.debugFlash=this.debugMode=!1;this.useConsole=!0;this.waitForWindowLoad=this.consoleOnly=!1;this.nullURL="about:blank";this.allowPolling=!0;this.useFastPolling=!1;this.useMovieStar=!0;this.bgColor="#ffffff";this.useHighPerformance=!1;this.flashPollingInterval=null;this.flashLoadTimeout=1E3;this.wmode=null;this.allowScriptAccess=
"always";this.useHTML5Audio=this.useFlashBlock=!1;this.html5Test=/^probably$/i;this.useGlobalHTML5Audio=!0;this.requireFlash=!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:!0},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,onbeforefinish:null,onbeforefinishtime:5E3,onbeforefinishcomplete:null,onjustbeforefinish:null,onjustbeforefinishtime:200,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.version=null;this.versionNumber="V2.97a.20110306";this.movieURL=null;this.url=j||null;this.altURL=null;this.enabled=this.swfLoaded=!1;this.o=null;this.movieID="sm2-container";this.id=e||"sm2movie";this.swfCSS={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug",
highPerf:"high_performance",flashDebug:"flash_debug"};this.oMC=null;this.sounds={};this.soundIDs=[];this.muted=!1;this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.didFlashBlock=this.specialWmodeCase=!1;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:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1};this.sandbox={};this.hasHTML5=null;this.html5={usingFlash:null};this.ignoreFlash=!1;var o,c=this,p,t=navigator.userAgent,k=f,Q=k.location.href.toString(),m=this.flashVersion,l=document,$,R,w=[],I=!1,J=!1,r=!1,y=!1,qa=!1,K,s,aa,z,D,ba,S,ra,ca,A,sa,L,E,da,ea,T,fa,ta,ua,U,
va,M=null,ga=null,B,ha,F,V,W,ia,n,X=!1,ja=!1,wa,xa,C=null,ya,Y,u=!1,N,x,ka,za,q,Ea=Array.prototype.slice,O=!1,la,G,Aa,Ba=t.match(/pre\//i),Fa=t.match(/(ipad|iphone|ipod)/i);t.match(/mobile/i);var v=t.match(/msie/i),Ga=t.match(/webkit/i),P=t.match(/safari/i)&&!t.match(/chrome/i),ma=!Q.match(/usehtml5audio/i)&&!Q.match(/sm2\-ignorebadua/i)&&P&&t.match(/OS X 10_6_(3|4|5|6)/i),na=typeof l.hasFocus!=="undefined"?l.hasFocus():null,H=typeof l.hasFocus==="undefined"&&P,Ca=!H;this._use_maybe=Q.match(/sm2\-useHTML5Maybe\=1/i);
this._overHTTP=l.location?l.location.protocol.match(/http/i):null;this.useAltURL=!this._overHTTP;this._global_a=null;if(Fa||Ba)c.useHTML5Audio=!0,c.ignoreFlash=!0,c.useGlobalHTML5Audio&&(O=!0);if(Ba||this._use_maybe)c.html5Test=/^(probably|maybe)$/i;this.supported=this.ok=function(){return C?r&&!y:c.useHTML5Audio&&c.hasHTML5};this.getMovie=function(c){return v?k[c]:P?p(c)||l[c]:p(c)};this.createSound=function(b){function a(){g=V(g);c.sounds[d.id]=new o(d);c.soundIDs.push(d.id);return c.sounds[d.id]}
var g=null,h=null,d=null;if(!r||!c.ok())return ia("soundManager.createSound(): "+B(!r?"notReady":"notOK")),!1;arguments.length===2&&(b={id:arguments[0],url:arguments[1]});d=g=s(b);if(n(d.id,!0))return c.sounds[d.id];if(Y(d))h=a(),h._setup_html5(d);else{if(m>8&&c.useMovieStar){if(d.isMovieStar===null)d.isMovieStar=d.serverURL||d.type&&d.type.match(c.netStreamPattern)||d.url.match(c.netStreamPattern)?!0:!1;if(d.isMovieStar&&d.usePeakData)d.usePeakData=!1}d=W(d,"soundManager.createSound(): ");h=a();
if(m===8)c.o._createSound(d.id,d.onjustbeforefinishtime,d.loops||1,d.usePolicyFile);else if(c.o._createSound(d.id,d.url,d.onjustbeforefinishtime,d.usePeakData,d.useWaveformData,d.useEQData,d.isMovieStar,d.isMovieStar?d.bufferTime:!1,d.loops||1,d.serverURL,d.duration||null,d.autoPlay,!0,d.autoLoad,d.usePolicyFile),!d.serverURL)h.connected=!0,d.onconnect&&d.onconnect.apply(h);(d.autoLoad||d.autoPlay)&&!d.serverURL&&h.load(d)}d.autoPlay&&!d.serverURL&&h.play();return h};this.destroySound=function(b,
a){if(!n(b))return!1;var g=c.sounds[b],h;g._iO={};g.stop();g.unload();for(h=0;h<c.soundIDs.length;h++)if(c.soundIDs[h]===b){c.soundIDs.splice(h,1);break}a||g.destruct(!0);delete c.sounds[b];return!0};this.load=function(b,a){if(!n(b))return!1;return c.sounds[b].load(a)};this.unload=function(b){if(!n(b))return!1;return c.sounds[b].unload()};this.start=this.play=function(b,a){if(!r||!c.ok())return ia("soundManager.play(): "+B(!r?"notReady":"notOK")),!1;if(!n(b))return a instanceof Object||(a={url:a}),
a&&a.url?(a.id=b,c.createSound(a).play()):!1;return c.sounds[b].play(a)};this.setPosition=function(b,a){if(!n(b))return!1;return c.sounds[b].setPosition(a)};this.stop=function(b){if(!n(b))return!1;return c.sounds[b].stop()};this.stopAll=function(){for(var b in c.sounds)c.sounds[b]instanceof o&&c.sounds[b].stop()};this.pause=function(b){if(!n(b))return!1;return c.sounds[b].pause()};this.pauseAll=function(){for(var b=c.soundIDs.length;b--;)c.sounds[c.soundIDs[b]].pause()};this.resume=function(b){if(!n(b))return!1;
return c.sounds[b].resume()};this.resumeAll=function(){for(var b=c.soundIDs.length;b--;)c.sounds[c.soundIDs[b]].resume()};this.togglePause=function(b){if(!n(b))return!1;return c.sounds[b].togglePause()};this.setPan=function(b,a){if(!n(b))return!1;return c.sounds[b].setPan(a)};this.setVolume=function(b,a){if(!n(b))return!1;return c.sounds[b].setVolume(a)};this.mute=function(b){var a=0;typeof b!=="string"&&(b=null);if(b){if(!n(b))return!1;return c.sounds[b].mute()}else{for(a=c.soundIDs.length;a--;)c.sounds[c.soundIDs[a]].mute();
c.muted=!0}return!0};this.muteAll=function(){c.mute()};this.unmute=function(b){typeof b!=="string"&&(b=null);if(b){if(!n(b))return!1;return c.sounds[b].unmute()}else{for(b=c.soundIDs.length;b--;)c.sounds[c.soundIDs[b]].unmute();c.muted=!1}return!0};this.unmuteAll=function(){c.unmute()};this.toggleMute=function(b){if(!n(b))return!1;return c.sounds[b].toggleMute()};this.getMemoryUse=function(){if(m===8)return 0;if(c.o)return parseInt(c.o._getMemoryUse(),10)};this.disable=function(b){typeof b==="undefined"&&
(b=!1);if(y)return!1;y=!0;for(var a=c.soundIDs.length;a--;)ua(c.sounds[c.soundIDs[a]]);K(b);q.remove(k,"load",D);return!0};this.canPlayMIME=function(b){var a;c.hasHTML5&&(a=N({type:b}));return!C||a?a:b?b.match(c.mimePattern)?!0:!1:null};this.canPlayURL=function(b){var a;c.hasHTML5&&(a=N(b));return!C||a?a:b?b.match(c.filePattern)?!0:!1:null};this.canPlayLink=function(b){if(typeof b.type!=="undefined"&&b.type&&c.canPlayMIME(b.type))return!0;return c.canPlayURL(b.href)};this.getSoundById=function(b){if(!b)throw Error("soundManager.getSoundById(): sID is null/undefined");
return c.sounds[b]};this.onready=function(c,a){if(c&&c instanceof Function)return a||(a=k),aa("onready",c,a),z(),!0;else throw B("needFunction","onready");};this.ontimeout=function(c,a){if(c&&c instanceof Function)return a||(a=k),aa("ontimeout",c,a),z({type:"ontimeout"}),!0;else throw B("needFunction","ontimeout");};this.getMoviePercent=function(){return c.o&&typeof c.o.PercentLoaded!=="undefined"?c.o.PercentLoaded():null};this._wD=this._writeDebug=function(){return!0};this._debug=function(){};this.reboot=
function(){var b,a;for(b=c.soundIDs.length;b--;)c.sounds[c.soundIDs[b]].destruct();try{if(v)ga=c.o.innerHTML;M=c.o.parentNode.removeChild(c.o)}catch(g){}ga=M=null;c.enabled=r=X=ja=I=J=y=c.swfLoaded=!1;c.soundIDs=c.sounds=[];c.o=null;for(b in w)if(w.hasOwnProperty(b))for(a=w[b].length;a--;)w[b][a].fired=!1;k.setTimeout(function(){c.beginDelayedInit()},20)};this.destruct=function(){c.disable(!0)};this.beginDelayedInit=function(){qa=!0;E();setTimeout(sa,20);S()};this._html5_events={abort:i(function(){}),
canplay:i(function(){this._t._onbufferchange(0);var c=!isNaN(this._t.position)?this._t.position/1E3:null;this._t._html5_canplay=!0;if(this._t.position&&this.currentTime!==c)try{this.currentTime=c}catch(a){}}),load:i(function(){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:i(function(){}),ended:i(function(){this._t._onfinish()}),error:i(function(){this._t._onload(!1)}),loadeddata:i(function(){}),
loadedmetadata:i(function(){}),loadstart:i(function(){this._t._onbufferchange(1)}),play:i(function(){this._t._onbufferchange(0)}),playing:i(function(){this._t._onbufferchange(0)}),progress:i(function(b){if(this._t.loaded)return!1;var a,g=0,h=b.type==="progress",d=b.target.buffered;a=b.loaded||0;var oa=b.total||1;if(d&&d.length){for(a=d.length;a--;)g=d.end(a)-d.start(a);a=g/b.target.duration;h&&isNaN(a)}isNaN(a)||(this._t._onbufferchange(0),this._t._whileloading(a,oa,this._t._get_html5_duration()),
a&&oa&&a===oa&&c._html5_events.load.call(this,b))}),ratechange:i(function(){}),suspend:i(function(b){c._html5_events.progress.call(this,b)}),stalled:i(function(){}),timeupdate:i(function(){this._t._onTimer()}),waiting:i(function(){this._t._onbufferchange(1)})};o=function(b){var a=this,g,h,d;this.sID=b.id;this.url=b.url;this._iO=this.instanceOptions=this.options=s(b);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._debug();this.load=function(b){var d=null;if(typeof b!=="undefined")a._iO=s(b),a.instanceOptions=a._iO;else if(b=a.options,a._iO=b,a.instanceOptions=a._iO,a._lastURL&&a._lastURL!==a.url)a._iO.url=a.url,a.url=null;if(!a._iO.url)a._iO.url=a.url;if(a._iO.url===a.url&&a.readyState!==0&&a.readyState!==2)return a;a._lastURL=a.url;a.loaded=!1;a.readyState=1;a.playState=0;if(Y(a._iO)){if(d=a._setup_html5(a._iO),!d._called_load)d.load(),d._called_load=!0,a._iO.autoPlay&&a.play()}else try{a.isHTML5=!1,
a._iO=W(V(a._iO)),m===8?c.o._load(a.sID,a._iO.url,a._iO.stream,a._iO.autoPlay,a._iO.whileloading?1:0,a._iO.loops||1,a._iO.usePolicyFile):c.o._load(a.sID,a._iO.url,a._iO.stream?!0:!1,a._iO.autoPlay?!0:!1,a._iO.loops||1,a._iO.autoLoad?!0:!1,a._iO.usePolicyFile)}catch(g){fa()}return a};this.unload=function(){if(a.readyState!==0){if(a.isHTML5){if(h(),a._a)a._a.pause(),a._a.src=""}else m===8?c.o._unload(a.sID,c.nullURL):c.o._unload(a.sID);g()}return a};this.destruct=function(b){if(a.isHTML5){if(h(),a._a)a._a.pause(),
a._a.src="",O||a._remove_html5_events()}else a._iO.onfailure=null,c.o._destroySound(a.sID);b||c.destroySound(a.sID,!0)};this.start=this.play=function(b,Z){Z=Z===void 0?!0:Z;b||(b={});a._iO=s(b,a._iO);a._iO=s(a._iO,a.options);a.instanceOptions=a._iO;if(a._iO.serverURL&&!a.connected)return a.getAutoPlay()||a.setAutoPlay(!0),a;Y(a._iO)&&(a._setup_html5(a._iO),d());if(a.playState===1&&!a.paused)if(a._iO.multiShot)a.isHTML5&&a.setPosition(a._iO.position);else return a;if(!a.loaded)if(a.readyState===0){if(!a.isHTML5)a._iO.autoPlay=
!0;a.load(a._iO)}else if(a.readyState===2)return a;if(a.paused&&a.position&&a.position>0)a.resume();else{a.playState=1;a.paused=!1;(!a.instanceCount||a._iO.multiShotEvents||m>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=W(V(a._iO));if(a._iO.onplay&&Z)a._iO.onplay.apply(a),a._onplay_called=!0;a.setVolume(a._iO.volume,!0);a.setPan(a._iO.pan,!0);a.isHTML5?(d(),a._setup_html5().play()):c.o._start(a.sID,
a._iO.loops||1,m===9?a.position:a.position/1E3)}return a};this.stop=function(b){if(a.playState===1){a._onbufferchange(0);a.resetOnPosition(0);if(!a.isHTML5)a.playState=0;a.paused=!1;a._iO.onstop&&a._iO.onstop.apply(a);if(a.isHTML5){if(a._a)a.setPosition(0),a._a.pause(),a.playState=0,a._onTimer(),h(),a.unload()}else c.o._stop(a.sID,b),a._iO.serverURL&&a.unload();a.instanceCount=0;a._iO={}}return a};this.setAutoPlay=function(b){a._iO.autoPlay=b;a.isHTML5?a._a&&b&&a.play():c.o._setAutoPlay(a.sID,b);
b&&!a.instanceCount&&a.readyState===1&&a.instanceCount++};this.getAutoPlay=function(){return a._iO.autoPlay};this.setPosition=function(b){b===void 0&&(b=0);var d=a.isHTML5?Math.max(b,0):Math.min(a.duration||a._iO.duration,Math.max(b,0));a.position=d;b=a.position/1E3;a.resetOnPosition(a.position);a._iO.position=d;if(a.isHTML5){if(a._a&&a._html5_canplay&&a._a.currentTime!==b)try{a._a.currentTime=b}catch(g){}}else b=m===9?a.position:b,a.readyState&&a.readyState!==2&&c.o._setPosition(a.sID,b,a.paused||
!a.playState);a.isHTML5&&a.paused&&a._onTimer(!0);return a};this.pause=function(b){if(a.paused||a.playState===0&&a.readyState!==1)return a;a.paused=!0;a.isHTML5?(a._setup_html5().pause(),h()):(b||b===void 0)&&c.o._pause(a.sID);a._iO.onpause&&a._iO.onpause.apply(a);return a};this.resume=function(){if(!a.paused)return a;a.paused=!1;a.playState=1;a.isHTML5?(a._setup_html5().play(),d()):(a._iO.isMovieStar&&a.setPosition(a.position),c.o._pause(a.sID));!a._onplay_called&&a._iO.onplay?(a._iO.onplay.apply(a),
a._onplay_called=!0):a._iO.onresume&&a._iO.onresume.apply(a);return a};this.togglePause=function(){if(a.playState===0)return a.play({position:m===9&&!a.isHTML5?a.position:a.position/1E3}),a;a.paused?a.resume():a.pause();return a};this.setPan=function(b,d){typeof b==="undefined"&&(b=0);typeof d==="undefined"&&(d=!1);a.isHTML5||c.o._setPan(a.sID,b);a._iO.pan=b;if(!d)a.pan=b;return a};this.setVolume=function(b,d){typeof b==="undefined"&&(b=100);typeof d==="undefined"&&(d=!1);if(a.isHTML5){if(a._a)a._a.volume=
b/100}else c.o._setVolume(a.sID,c.muted&&!a.muted||a.muted?0:b);a._iO.volume=b;if(!d)a.volume=b;return a};this.mute=function(){a.muted=!0;if(a.isHTML5){if(a._a)a._a.muted=!0}else c.o._setVolume(a.sID,0);return a};this.unmute=function(){a.muted=!1;var b=typeof a._iO.volume!=="undefined";if(a.isHTML5){if(a._a)a._a.muted=!1}else c.o._setVolume(a.sID,b?a._iO.volume:a.options.volume);return a};this.toggleMute=function(){return a.muted?a.unmute():a.mute()};this.onposition=function(c,b,d){a._onPositionItems.push({position:c,
method:b,scope:typeof d!=="undefined"?d:a,fired:!1});return a};this.processOnPosition=function(){var b,d;b=a._onPositionItems.length;if(!b||!a.playState||a._onPositionFired>=b)return!1;for(;b--;)if(d=a._onPositionItems[b],!d.fired&&a.position>=d.position)d.method.apply(d.scope,[d.position]),d.fired=!0,c._onPositionFired++;return!0};this.resetOnPosition=function(b){var d,g;d=a._onPositionItems.length;if(!d)return!1;for(;d--;)if(g=a._onPositionItems[d],g.fired&&b<=g.position)g.fired=!1,c._onPositionFired--;
return!0};this._onTimer=function(c){var b={};if(a._hasTimer||c)return a._a&&(c||(a.playState>0||a.readyState===1)&&!a.paused)?(a.duration=a._get_html5_duration(),a.durationEstimate=a.duration,c=a._a.currentTime?a._a.currentTime*1E3:0,a._whileplaying(c,b,b,b,b),!0):!1};this._get_html5_duration=function(){var c=a._a?a._a.duration*1E3:a._iO?a._iO.duration:void 0;return c&&!isNaN(c)&&c!==Infinity?c:a._iO?a._iO.duration:null};d=function(){a.isHTML5&&wa(a)};h=function(){a.isHTML5&&xa(a)};g=function(){a._onPositionItems=
[];a._onPositionFired=0;a._hasTimer=null;a._onplay_called=!1;a._a=null;a._html5_canplay=!1;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=!1;a.playState=0;a.paused=!1;a.readyState=0;a.muted=!1;a.didBeforeFinish=!1;a.didJustBeforeFinish=!1;a.isBuffering=!1;a.instanceOptions={};a.instanceCount=0;a.peakData={left:0,right:0};a.waveformData={left:[],right:[]};a.eqData=[];a.eqData.left=[];a.eqData.right=
[]};g();this._setup_html5=function(b){var b=s(a._iO,b),d=O?c._global_a:a._a;decodeURI(b.url);var h=d&&d._t?d._t.instanceOptions:null;if(d){if(d._t&&h.url===b.url)return d;O&&d._t.playState&&d._t&&b.url!==h.url&&d._t.stop();g();d.src=b.url}else if(d=new Audio(b.url),O)c._global_a=d;d._called_load=!1;a.isHTML5=!0;a._a=d;d._t=a;a._add_html5_events();d.loop=b.loops>1?"loop":"";b.autoLoad||b.autoPlay?(d.autobuffer="auto",d.preload="auto",a.load()):(d.autobuffer=!1,d.preload="none");d.loop=b.loops>1?"loop":
"";return d};this._add_html5_events=function(){if(a._a._added_events)return!1;var b;a._a._added_events=!0;for(b in c._html5_events)c._html5_events.hasOwnProperty(b)&&a._a&&a._a.addEventListener(b,c._html5_events[b],!1);return!0};this._remove_html5_events=function(){a._a._added_events=!1;for(var b in c._html5_events)c._html5_events.hasOwnProperty(b)&&a._a&&a._a.removeEventListener(b,c._html5_events[b],!1)};this._whileloading=function(c,b,d,g){a.bytesLoaded=c;a.bytesTotal=b;a.duration=Math.floor(d);
a.bufferLength=g;if(a._iO.isMovieStar)a.durationEstimate=a.duration;else if(a.durationEstimate=a._iO.duration?a.duration>a._iO.duration?a.duration:a._iO.duration:parseInt(a.bytesTotal/a.bytesLoaded*a.duration,10),a.durationEstimate===void 0)a.durationEstimate=a.duration;a.readyState!==3&&a._iO.whileloading&&a._iO.whileloading.apply(a)};this._onid3=function(c,b){var d=[],g,h;g=0;for(h=c.length;g<h;g++)d[c[g]]=b[g];a.id3=s(a.id3,d);a._iO.onid3&&a._iO.onid3.apply(a)};this._whileplaying=function(b,d,
g,h,e){if(isNaN(b)||b===null)return!1;a.playState===0&&b>0&&(b=0);a.position=b;a.processOnPosition();if(m>8&&!a.isHTML5){if(a._iO.usePeakData&&typeof d!=="undefined"&&d)a.peakData={left:d.leftPeak,right:d.rightPeak};if(a._iO.useWaveformData&&typeof g!=="undefined"&&g)a.waveformData={left:g.split(","),right:h.split(",")};if(a._iO.useEQData&&typeof e!=="undefined"&&e&&e.leftEQ&&(b=e.leftEQ.split(","),a.eqData=b,a.eqData.left=b,typeof e.rightEQ!=="undefined"&&e.rightEQ))a.eqData.right=e.rightEQ.split(",")}a.playState===
1&&(!a.isHTML5&&c.flashVersion===8&&!a.position&&a.isBuffering&&a._onbufferchange(0),a._iO.whileplaying&&a._iO.whileplaying.apply(a),(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!0};this._onconnect=function(b){b=b===1;if(a.connected=b)a.failures=0,n(a.sID)&&(a.getAutoPlay()?a.play(void 0,a.getAutoPlay()):a._iO.autoLoad&&a.load()),a._iO.onconnect&&a._iO.onconnect.apply(a,
[b])};this._onload=function(b){b=b?!0:!1;a.loaded=b;a.readyState=b?3:2;a._onbufferchange(0);a._iO.onload&&a._iO.onload.apply(a,[b]);return!0};this._onfailure=function(b,c,d){a.failures++;a._iO.onfailure&&a.failures===1&&a._iO.onfailure(a,b,c,d)};this._onbeforefinish=function(){if(!a.didBeforeFinish)a.didBeforeFinish=!0,a._iO.onbeforefinish&&a._iO.onbeforefinish.apply(a)};this._onjustbeforefinish=function(){if(!a.didJustBeforeFinish)a.didJustBeforeFinish=!0,a._iO.onjustbeforefinish&&a._iO.onjustbeforefinish.apply(a)};
this._onfinish=function(){var b=a._iO.onfinish;a._onbufferchange(0);a.resetOnPosition(0);a._iO.onbeforefinishcomplete&&a._iO.onbeforefinishcomplete.apply(a);a.didBeforeFinish=!1;a.didJustBeforeFinish=!1;if(a.instanceCount){a.instanceCount--;if(!a.instanceCount)a.playState=0,a.paused=!1,a.instanceCount=0,a.instanceOptions={},a._iO={},h();(!a.instanceCount||a._iO.multiShotEvents)&&b&&b.apply(a)}};this._onbufferchange=function(b){if(a.playState===0)return!1;if(b&&a.isBuffering||!b&&!a.isBuffering)return!1;
a.isBuffering=b===1;a._iO.onbufferchange&&a._iO.onbufferchange.apply(a);return!0};this._ondataerror=function(){a.playState>0&&a._iO.ondataerror&&a._iO.ondataerror.apply(a)}};ea=function(){return l.body?l.body:l._docElement?l.documentElement:l.getElementsByTagName("div")[0]};p=function(b){return l.getElementById(b)};s=function(b,a){var g={},h,d;for(h in b)b.hasOwnProperty(h)&&(g[h]=b[h]);h=typeof a==="undefined"?c.defaultOptions:a;for(d in h)h.hasOwnProperty(d)&&typeof g[d]==="undefined"&&(g[d]=h[d]);
return g};q=function(){function b(a){var a=Ea.call(a),b=a.length;c?(a[1]="on"+a[1],b>3&&a.pop()):b===3&&a.push(!1);return a}function a(a,b){var e=a.shift(),i=[h[b]];c?e[i](a[0],a[1]):e[i].apply(e,a)}var c=k.attachEvent,h={add:c?"attachEvent":"addEventListener",remove:c?"detachEvent":"removeEventListener"};return{add:function(){a(b(arguments),"add")},remove:function(){a(b(arguments),"remove")}}}();Y=function(b){return!b.serverURL&&(b.type?N({type:b.type}):N(b.url)||u)};N=function(b){if(!c.useHTML5Audio||
!c.hasHTML5)return!1;var a,g=c.audioFormats;if(!x){x=[];for(a in g)g.hasOwnProperty(a)&&(x.push(a),g[a].related&&(x=x.concat(g[a].related)));x=RegExp("\\.("+x.join("|")+")","i")}a=typeof b.type!=="undefined"?b.type:null;b=typeof b==="string"?b.toLowerCase().match(x):null;if(!b||!b.length)if(a)b=a.indexOf(";"),b=(b!==-1?a.substr(0,b):a).substr(6);else return!1;else b=b[0].substr(1);if(b&&typeof c.html5[b]!=="undefined")return c.html5[b];else{if(!a)if(b&&c.html5[b])return c.html5[b];else a="audio/"+
b;a=c.html5.canPlayType(a);return c.html5[b]=a}};za=function(){function b(b){var d,g,e=!1;if(!a||typeof a.canPlayType!=="function")return!1;if(b instanceof Array){d=0;for(g=b.length;d<g&&!e;d++)if(c.html5[b[d]]||a.canPlayType(b[d]).match(c.html5Test))e=!0,c.html5[b[d]]=!0;return e}else return(b=a&&typeof a.canPlayType==="function"?a.canPlayType(b):!1)&&(b.match(c.html5Test)?!0:!1)}if(!c.useHTML5Audio||typeof Audio==="undefined")return!1;var a=typeof Audio!=="undefined"?new Audio(null):null,g,h={},
d,e;G();d=c.audioFormats;for(g in d)if(d.hasOwnProperty(g)&&(h[g]=b(d[g].type),d[g]&&d[g].related))for(e=d[g].related.length;e--;)c.html5[d[g].related[e]]=h[g];h.canPlayType=a?b:null;c.html5=s(c.html5,h);return!0};B=function(){};V=function(b){if(m===8&&b.loops>1&&b.stream)b.stream=!1;return b};W=function(b){if(b&&!b.usePolicyFile&&(b.onid3||b.usePeakData||b.useWaveformData||b.useEQData))b.usePolicyFile=!0;return b};ia=function(b){typeof console!=="undefined"&&typeof console.warn!=="undefined"&&console.warn(b)};
$=function(){return!1};ua=function(b){for(var a in b)b.hasOwnProperty(a)&&typeof b[a]==="function"&&(b[a]=$)};U=function(b){typeof b==="undefined"&&(b=!1);(y||b)&&c.disable(b)};va=function(b){if(b)if(b.match(/\.swf(\?.*)?$/i)){if(b.substr(b.toLowerCase().lastIndexOf(".swf?")+4))return b}else b.lastIndexOf("/")!==b.length-1&&(b+="/");return(b&&b.lastIndexOf("/")!==-1?b.substr(0,b.lastIndexOf("/")+1):"./")+c.movieURL};ca=function(){if(m!==8&&m!==9)c.flashVersion=8;var b=c.debugMode||c.debugFlash?"_debug.swf":
".swf";if(c.useHTML5Audio&&!u&&c.audioFormats.mp4.required&&c.flashVersion<9)c.flashVersion=9;m=c.flashVersion;c.version=c.versionNumber+(u?" (HTML5-only mode)":m===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(m>8)c.defaultOptions=s(c.defaultOptions,c.flash9Options),c.features.buffering=!0;m>8&&c.useMovieStar?(c.defaultOptions=s(c.defaultOptions,c.movieStarOptions),c.filePatterns.flash9=RegExp("\\.(mp3|"+c.netStreamTypes.join("|")+")(\\?.*)?$","i"),c.mimePattern=c.netStreamMimeTypes,c.features.movieStar=
!0):(c.useMovieStar=!1,c.features.movieStar=!1);c.filePattern=c.filePatterns[m!==8?"flash9":"flash8"];c.movieURL=(m===8?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",b);c.features.peakData=c.features.waveformData=c.features.eqData=m>8};ta=function(b,a){if(!c.o||!c.allowPolling)return!1;c.o._setPolling(b,a)};T=function(b,a){var g=a?a:c.url,e=c.altURL?c.altURL:g;ea();var d,i,f=F(),k,j=null,j=(j=l.getElementsByTagName("html")[0])&&j.dir&&j.dir.match(/rtl/i),b=typeof b==="undefined"?
c.id:b;if(I&&J)return!1;if(u)return ca(),c.oMC=p(c.movieID),R(),J=I=!0,!1;I=!0;ca();c.url=va(c._overHTTP?g:e);a=c.url;c.wmode=!c.wmode&&c.useHighPerformance&&!c.useMovieStar?"transparent":c.wmode;if(c.wmode!==null&&(t.match(/msie 8/i)||!v&&!c.useHighPerformance)&&navigator.platform.match(/win32|win64/i))c.specialWmodeCase=!0,c.wmode=null;e={name:b,id:b,src:a,width:"100%",height:"100%",quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:"http://www.macromedia.com/go/getflashplayer",
type:"application/x-shockwave-flash",wmode:c.wmode,hasPriority:"true"};if(c.debugFlash)e.FlashVars="debug=1";c.wmode||delete e.wmode;if(v)g=l.createElement("div"),i='<object id="'+b+'" data="'+a+'" type="'+e.type+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+a+'" /><param name="AllowScriptAccess" value="'+c.allowScriptAccess+
'" /><param name="quality" value="'+e.quality+'" />'+(c.wmode?'<param name="wmode" value="'+c.wmode+'" /> ':"")+'<param name="bgcolor" value="'+c.bgColor+'" />'+(c.debugFlash?'<param name="FlashVars" value="'+e.FlashVars+'" />':"")+"</object>";else for(d in g=l.createElement("embed"),e)e.hasOwnProperty(d)&&g.setAttribute(d,e[d]);pa();f=F();if(e=ea())if(c.oMC=p(c.movieID)?p(c.movieID):l.createElement("div"),c.oMC.id){k=c.oMC.className;c.oMC.className=(k?k+" ":c.swfCSS.swfDefault)+(f?" "+f:"");c.oMC.appendChild(g);
if(v)d=c.oMC.appendChild(l.createElement("div")),d.className=c.swfCSS.swfBox,d.innerHTML=i;J=!0}else{c.oMC.id=c.movieID;c.oMC.className=c.swfCSS.swfDefault+" "+f;d=f=null;if(!c.useFlashBlock)if(c.useHighPerformance)f={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else if(f={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},j)f.left=Math.abs(parseInt(f.left,10))+"px";if(Ga)c.oMC.style.zIndex=1E4;if(!c.debugFlash)for(k in f)f.hasOwnProperty(k)&&
(c.oMC.style[k]=f[k]);try{v||c.oMC.appendChild(g);e.appendChild(c.oMC);if(v)d=c.oMC.appendChild(l.createElement("div")),d.className=c.swfCSS.swfBox,d.innerHTML=i;J=!0}catch(m){throw Error(B("appXHTML"));}}return!0};n=this.getSoundById;L=function(){if(u)return T(),!1;if(c.o)return!1;c.o=c.getMovie(c.id);if(!c.o)M?(v?c.oMC.innerHTML=ga:c.oMC.appendChild(M),M=null,I=!0):T(c.id,c.url),c.o=c.getMovie(c.id);c.oninitmovie instanceof Function&&setTimeout(c.oninitmovie,1);return!0};ba=function(b){if(b)c.url=
b;L()};S=function(){setTimeout(ra,500)};ra=function(){if(X)return!1;X=!0;q.remove(k,"load",S);if(H&&!na)return!1;var b;r||(b=c.getMoviePercent());setTimeout(function(){b=c.getMoviePercent();!r&&Ca&&(b===null?c.useFlashBlock||c.flashLoadTimeout===0?c.useFlashBlock&&ha():U(!0):c.flashLoadTimeout!==0&&U(!0))},c.flashLoadTimeout)};ba=function(b){if(b)c.url=b;L()};F=function(){var b=[];c.debugMode&&b.push(c.swfCSS.sm2Debug);c.debugFlash&&b.push(c.swfCSS.flashDebug);c.useHighPerformance&&b.push(c.swfCSS.highPerf);
return b.join(" ")};ha=function(){B("fbHandler");var b=c.getMoviePercent(),a=c.swfCSS;if(c.ok()){if(c.oMC)c.oMC.className=[F(),a.swfDefault,a.swfLoaded+(c.didFlashBlock?" "+a.swfUnblocked:"")].join(" ")}else{if(C)c.oMC.className=F()+" "+a.swfDefault+" "+(b===null?a.swfTimedout:a.swfError);c.didFlashBlock=!0;z({type:"ontimeout",ignoreInit:!0});c.onerror instanceof Function&&c.onerror.apply(k)}};A=function(){function b(){q.remove(k,"focus",A);q.remove(k,"load",A)}if(na||!H)return b(),!0;na=Ca=!0;P&&
H&&q.remove(k,"mousemove",A);X=!1;b();return!0};K=function(b){if(r)return!1;if(u)return r=!0,z(),D(),!0;c.useFlashBlock&&c.flashLoadTimeout&&!c.getMoviePercent()||(r=!0);if(y||b){if(c.useFlashBlock)c.oMC.className=F()+" "+(c.getMoviePercent()===null?c.swfCSS.swfTimedout:c.swfCSS.swfError);z({type:"ontimeout"});c.onerror instanceof Function&&c.onerror.apply(k);return!1}q.add(k,"unload",$);if(c.waitForWindowLoad&&!qa)return q.add(k,"load",D),!1;else D();return!0};aa=function(b,a,c){typeof w[b]==="undefined"&&
(w[b]=[]);w[b].push({method:a,scope:c||null,fired:!1})};z=function(b){b||(b={type:"onready"});if(!r&&b&&!b.ignoreInit)return!1;var a={success:b&&b.ignoreInit?c.ok():!y},e=b&&b.type?w[b.type]||[]:[],b=[],h,d=C&&c.useFlashBlock&&!c.ok();for(h=0;h<e.length;h++)e[h].fired!==!0&&b.push(e[h]);if(b.length){h=0;for(e=b.length;h<e;h++)if(b[h].scope?b[h].method.apply(b[h].scope,[a]):b[h].method(a),!d)b[h].fired=!0}return!0};D=function(){k.setTimeout(function(){c.useFlashBlock&&ha();z();c.onload instanceof Function&&
c.onload.apply(k);c.waitForWindowLoad&&q.add(k,"load",D)},1)};G=function(){if(la!==void 0)return la;var b=!1,a=navigator,c=a.plugins,e,d=k.ActiveXObject;if(c&&c.length){if((a=a.mimeTypes)&&a["application/x-shockwave-flash"]&&a["application/x-shockwave-flash"].enabledPlugin&&a["application/x-shockwave-flash"].enabledPlugin.description)b=!0}else if(typeof d!=="undefined"){try{e=new d("ShockwaveFlash.ShockwaveFlash")}catch(i){}b=!!e}return la=b};ya=function(){var b,a;if(t.match(/iphone os (1|2|3_0|3_1)/i)){c.hasHTML5=
!1;u=!0;if(c.oMC)c.oMC.style.display="none";return!1}if(c.useHTML5Audio){if(!c.html5||!c.html5.canPlayType)return c.hasHTML5=!1,!0;else c.hasHTML5=!0;if(ma&&G())return!0}else return!0;for(a in c.audioFormats)c.audioFormats.hasOwnProperty(a)&&c.audioFormats[a].required&&!c.html5.canPlayType(c.audioFormats[a].type)&&(b=!0);c.ignoreFlash&&(b=!1);u=c.useHTML5Audio&&c.hasHTML5&&!b&&!c.requireFlash;return G()&&b};R=function(){var b,a=[];if(r)return!1;if(c.hasHTML5)for(b in c.audioFormats)c.audioFormats.hasOwnProperty(b)&&
a.push(b+": "+c.html5[b]);if(u){if(!r)q.remove(k,"load",c.beginDelayedInit),c.enabled=!0,K();return!0}L();try{c.o._externalInterfaceTest(!1),c.allowPolling&&ta(!0,c.flashPollingInterval?c.flashPollingInterval:c.useFastPolling?10:50),c.debugMode||c.o._disableDebug(),c.enabled=!0}catch(e){return U(!0),K(),!1}K();q.remove(k,"load",c.beginDelayedInit);return!0};sa=function(){if(ja)return!1;T();L();return ja=!0};E=function(){if(da)return!1;da=!0;pa();if(!c.useHTML5Audio&&!G())c.useHTML5Audio=!0;za();c.html5.usingFlash=
ya();C=c.html5.usingFlash;da=!0;l.removeEventListener&&l.removeEventListener("DOMContentLoaded",E,!1);ba();return!0};wa=function(b){if(!b._hasTimer)b._hasTimer=!0};xa=function(b){if(b._hasTimer)b._hasTimer=!1};fa=function(){c.onerror instanceof Function&&c.onerror();c.disable()};Aa=function(){if(!ma||!G())return!1;var b=c.audioFormats,a,e;for(e in b)if(b.hasOwnProperty(e)&&(e==="mp3"||e==="mp4"))if(c.html5[e]=!1,b[e]&&b[e].related)for(;a--;)c.html5[b[e].related[a]]=!1};this._setSandboxType=function(){};
this._externalInterfaceOK=function(){if(c.swfLoaded)return!1;(new Date).getTime();c.swfLoaded=!0;H=!1;ma&&Aa();v?setTimeout(R,100):R()};ka=function(){l.readyState==="complete"&&(E(),l.detachEvent("onreadystatechange",ka));return!0};if(!c.hasHTML5||C)q.add(k,"focus",A),q.add(k,"load",A),q.add(k,"load",S),P&&H&&q.add(k,"mousemove",A);l.addEventListener?l.addEventListener("DOMContentLoaded",E,!1):l.attachEvent?l.attachEvent("onreadystatechange",ka):fa();l.readyState==="complete"&&setTimeout(E,100)}var p=
null;if(typeof SM2_DEFER==="undefined"||!SM2_DEFER)p=new j;f.SoundManager=j;f.soundManager=p})(window);
function InlinePlayer(){var f=this,j=this,p=soundManager;this.playableClass="inline-playable";this.excludeClass="inline-exclude";this.links=[];this.sounds=[];this.soundsByURL=[];this.indexByURL=[];this.lastSound=null;this.soundCount=0;var Da=navigator.userAgent.match(/msie/i);this.config={playNext:!1,autoPlay:!1};this.css={sDefault:"sm2_link",sLoading:"sm2_loading",sPlaying:"sm2_playing",sPaused:"sm2_paused"};this.addEventHandler=function(e,i,f){typeof attachEvent=="undefined"?e.addEventListener(i,
f,!1):e.attachEvent("on"+i,f)};this.removeEventHandler=function(e,i,f){typeof attachEvent=="undefined"?e.removeEventListener(i,f,!1):e.detachEvent("on"+i,f)};this.classContains=function(e,f){return typeof e.className!="undefined"?e.className.match(RegExp("(\\s|^)"+f+"(\\s|$)")):!1};this.addClass=function(e,i){if(!e||!i||f.classContains(e,i))return!1;e.className=(e.className?e.className+" ":"")+i};this.removeClass=function(e,i){if(!e||!i||!f.classContains(e,i))return!1;e.className=e.className.replace(RegExp("( "+
i+")|("+i+")","g"),"")};this.getSoundByURL=function(e){return typeof f.soundsByURL[e]!="undefined"?f.soundsByURL[e]:null};this.isChildOfNode=function(e,f){if(!e||!e.parentNode)return!1;f=f.toLowerCase();do e=e.parentNode;while(e&&e.parentNode&&e.nodeName.toLowerCase()!=f);return e.nodeName.toLowerCase()==f?e:null};this.events={play:function(){j.removeClass(this._data.oLink,this._data.className);this._data.className=j.css.sPlaying;j.addClass(this._data.oLink,this._data.className)},stop:function(){j.removeClass(this._data.oLink,
this._data.className);this._data.className=""},pause:function(){j.removeClass(this._data.oLink,this._data.className);this._data.className=j.css.sPaused;j.addClass(this._data.oLink,this._data.className)},resume:function(){j.removeClass(this._data.oLink,this._data.className);this._data.className=j.css.sPlaying;j.addClass(this._data.oLink,this._data.className)},finish:function(){j.removeClass(this._data.oLink,this._data.className);this._data.className="";if(j.config.playNext){var e=j.indexByURL[this._data.oLink.href]+
1;e<j.links.length&&j.handleClick({target:j.links[e]})}}};this.stopEvent=function(e){if(typeof e!="undefined"&&typeof e.preventDefault!="undefined")e.preventDefault();else if(typeof event!="undefined"&&typeof event.returnValue!="undefined")event.returnValue=!1;return!1};this.getTheDamnLink=Da?function(e){return e&&e.target?e.target:window.event.srcElement}:function(e){return e.target};this.handleClick=function(e){if(typeof e.button!="undefined"&&e.button>1)return!0;var i=f.getTheDamnLink(e);if(i.nodeName.toLowerCase()!=
"a"&&(i=f.isChildOfNode(i,"a"),!i))return!0;i.getAttribute("href");if(!i.href||!p.canPlayLink(i)&&!f.classContains(i,f.playableClass)||f.classContains(i,f.excludeClass))return!0;var j=i.href,o=f.getSoundByURL(j);o?o==f.lastSound?o.togglePause():(o.togglePause(),p._writeDebug("sound different than last sound: "+f.lastSound.sID),f.lastSound&&f.stopSound(f.lastSound)):(o=p.createSound({id:"inlineMP3Sound"+f.soundCount++,url:j,onplay:f.events.play,onstop:f.events.stop,onpause:f.events.pause,onresume:f.events.resume,
onfinish:f.events.finish}),o._data={oLink:i,className:f.css.sPlaying},f.soundsByURL[j]=o,f.sounds.push(o),f.lastSound&&f.stopSound(f.lastSound),o.play());f.lastSound=o;typeof e!="undefined"&&typeof e.preventDefault!="undefined"?e.preventDefault():event.returnValue=!1;return!1};this.stopSound=function(e){soundManager.stop(e.sID);soundManager.unload(e.sID)};this.init=function(){p._writeDebug("inlinePlayer.init()");for(var e=document.getElementsByTagName("a"),i=0,j=0,o=e.length;j<o;j++)if((p.canPlayLink(e[j])||
f.classContains(e[j],f.playableClass))&&!f.classContains(e[j],f.excludeClass))f.addClass(e[j],f.css.sDefault),f.links[i]=e[j],f.indexByURL[e[j].href]=i,i++;f.addEventHandler(document,"click",f.handleClick);f.config.autoPlay&&f.handleClick({target:f.links[0],preventDefault:function(){}});p._writeDebug("inlinePlayer.init(): Found "+i+" relevant items.")};this.init()}var inlinePlayer=null;soundManager.debugMode=!0;soundManager.useFlashBlock=!0;soundManager.url="../../swf/";
soundManager.flashVersion=9;soundManager.useMovieStar=!0;soundManager.onready(function(){inlinePlayer=new InlinePlayer});soundManager.debugMode=!1;soundManager.url="swf/";

