// source --> https://myworstinvestmentever.com/wp-content/plugins/simple-podcast-press/responsive_audio_player/js/soundmanager2.js?ver=5.7.10 !function(a,b){"use strict";function d(c,d){function mb(a){return f.preferFlash&&Ka&&!f.ignoreFlash&&f.flash[a]!==b&&f.flash[a]}function nb(a){return function(b){var d,c=this._s;return c&&c._a?d=a.call(this,b):(c&&c.id?f._wD(c.id+": Ignoring "+b.type):f._wD(k+"Ignoring "+b.type),d=null),d}}this.setupOptions={url:c||null,flashVersion:8,debugMode:!1,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!0,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1e3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,forceUseGlobalHTML5Audio:!1,ignoreMobileRestrictions:!1,html5Test:/^(probably|maybe)$/i,preferFlash:!1,noSWFCache:!1,idPrefix:"sound"},this.defaultOptions={autoLoad:!1,autoPlay:!1,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:!0,multiShotEvents:!1,position:null,pan:0,playbackRate:1,stream:!0,to:null,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.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],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},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}},this.movieID="sm2-container",this.id=d||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20150601",this.version=null,this.movieURL=null,this.altURL=null,this.swfLoaded=!1,this.enabled=!1,this.oMC=null,this.sounds={},this.soundIDs=[],this.muted=!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={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.html5={usingFlash:null},this.flash={},this.html5Only=!1,this.ignoreFlash=!1;var e,l,p,q,r,s,v,B,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,_,aa,ba,ea,fa,ga,ha,ia,ja,ka,la,ma,pa,qa,ra,ua,wa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ja,Ka,La,Ma,Na,Oa,Pa,Qa,Sa,f=this,g=null,h=null,i="soundManager",j=i+": ",k="HTML5::",m=navigator.userAgent,n=a.location.href.toString(),o=document,t=[],u=!0,w=!1,x=!1,y=!1,z=!1,A=!1,C=0,Z=["log","info","warn","error"],$=8,ca=null,da=null,na=!1,oa=!1,sa=0,ta=null,va=[],xa=null,Ha=Array.prototype.slice,Ia=!1,Ra=0,Ta=1e3,Ua=m.match(/(ipad|iphone|ipod)/i),Va=m.match(/android/i),Wa=m.match(/(msie|trident)/i),Xa=m.match(/webkit/i),Ya=m.match(/safari/i)&&!m.match(/chrome/i),Za=m.match(/opera/i),$a=m.match(/(mobile|pre\/|xoom)/i)||Ua||Va,_a=!n.match(/usehtml5audio/i)&&!n.match(/sm2\-ignorebadua/i)&&Ya&&!m.match(/silk/i)&&m.match(/OS X 10_6_([3-7])/i),ab=a.console!==b&&console.log!==b,bb=o.hasFocus!==b?o.hasFocus():null,cb=Ya&&(o.hasFocus===b||!o.hasFocus()),db=!cb,eb=/(mp3|mp4|mpa|m4a|m4b)/i,fb="about:blank",gb="data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==",hb=o.location?o.location.protocol.match(/http/i):null,ib=hb?"":"http://",jb=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,kb=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],lb=new RegExp("\\.("+kb.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!hb,ha={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"},Ba=[null,"MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"],this.hasHTML5=function(){try{return Audio!==b&&(Za&&opera!==b&&opera.version()<10?new Audio(null):new Audio).canPlayType!==b}catch(a){return!1}}(),this.setup=function(a){var c=!f.url;return a!==b&&y&&xa&&f.ok()&&(a.flashVersion!==b||a.url!==b||a.html5Test!==b)&&la(ea("setupLate")),F(a),Ia||($a?f.setupOptions.ignoreMobileRestrictions&&!f.setupOptions.forceUseGlobalHTML5Audio||(va.push(P.globalHTML5),Ia=!0):f.setupOptions.forceUseGlobalHTML5Audio&&(va.push(P.globalHTML5),Ia=!0)),!Sa&&$a&&(f.setupOptions.ignoreMobileRestrictions?va.push(P.ignoreMobile):(f.setupOptions.useHTML5Audio&&!f.setupOptions.preferFlash||f._wD(P.mobileUA),f.setupOptions.useHTML5Audio=!0,f.setupOptions.preferFlash=!1,Ua?f.ignoreFlash=!0:(Va&&!m.match(/android\s2\.3/i)||!Va)&&(f._wD(P.globalHTML5),Ia=!0))),a&&(c&&T&&a.url!==b&&f.beginDelayedInit(),T||a.url===b||"complete"!==o.readyState||setTimeout(R,1)),Sa=!0,f},this.ok=function(){return xa?y&&!z:f.useHTML5Audio&&f.hasHTML5},this.supported=this.ok,this.getMovie=function(b){return l(b)||o[b]||a[b]},this.createSound=function(a,c){function l(){return j=ja(j),f.sounds[j.id]=new e(j),f.soundIDs.push(j.id),f.sounds[j.id]}var d,g,j,k=null;if(d=i+".createSound(): ",g=d+ea(y?"notOK":"notReady"),!y||!f.ok())return la(g),!1;if(c!==b&&(a={id:a,url:c}),j=E(a),j.url=ua(j.url),j.id===b&&(j.id=f.setupOptions.idPrefix+Ra++),j.id.toString().charAt(0).match(/^[0-9]$/)&&f._wD(d+ea("badID",j.id),2),f._wD(d+j.id+(j.url?" ("+j.url+")":""),1),ma(j.id,!0))return f._wD(d+j.id+" exists",1),f.sounds[j.id];if(za(j))k=l(),f.html5Only||f._wD(j.id+": Using HTML5"),k._setup_html5(j);else{if(f.html5Only)return f._wD(j.id+": No HTML5 support for this sound, and no Flash. Exiting."),l();if(f.html5.usingFlash&&j.url&&j.url.match(/data\:/i))return f._wD(j.id+": data: URIs not supported via Flash. Exiting."),l();s>8&&(null===j.isMovieStar&&(j.isMovieStar=!!(j.serverURL||!!j.type&&j.type.match(jb)||j.url&&j.url.match(lb))),j.isMovieStar&&(f._wD(d+"using MovieStar handling"),j.loops>1&&B("noNSLoop"))),j=ka(j,d),k=l(),8===s?h._createSound(j.id,j.loops||1,j.usePolicyFile):(h._createSound(j.id,j.url,j.usePeakData,j.useWaveformData,j.useEQData,j.isMovieStar,!!j.isMovieStar&&j.bufferTime,j.loops||1,j.serverURL,j.duration||null,j.autoPlay,!0,j.autoLoad,j.usePolicyFile),j.serverURL||(k.connected=!0,j.onconnect&&j.onconnect.apply(k))),j.serverURL||!j.autoLoad&&!j.autoPlay||k.load(j)}return!j.serverURL&&j.autoPlay&&k.play(),k},this.destroySound=function(a,b){if(!ma(a))return!1;var d,c=f.sounds[a];for(c.stop(),c._iO={},c.unload(),d=0;d=0;a--)f.sounds[f.soundIDs[a]].pause()},this.resume=function(a){return!!ma(a)&&f.sounds[a].resume()},this.resumeAll=function(){var a;for(a=f.soundIDs.length-1;a>=0;a--)f.sounds[f.soundIDs[a]].resume()},this.togglePause=function(a){return!!ma(a)&&f.sounds[a].togglePause()},this.setPan=function(a,b){return!!ma(a)&&f.sounds[a].setPan(b)},this.setVolume=function(a,c){var d,e;{if(a===b||isNaN(a)||c!==b)return!!ma(a)&&f.sounds[a].setVolume(c);for(d=0,e=f.soundIDs.length;d=0;b--)f.sounds[f.soundIDs[b]].mute();return f.muted=!0,!0},this.muteAll=function(){f.mute()},this.unmute=function(a){var b;if(a instanceof String&&(a=null),a)return!!ma(a)&&(f._wD(i+'.unmute(): Unmuting "'+a+'"'),f.sounds[a].unmute());for(f._wD(i+".unmute(): Unmuting all sounds"),b=f.soundIDs.length-1;b>=0;b--)f.sounds[f.soundIDs[b]].unmute();return f.muted=!1,!0},this.unmuteAll=function(){f.unmute()},this.toggleMute=function(a){return!!ma(a)&&f.sounds[a].toggleMute()},this.getMemoryUse=function(){var a=0;return h&&8!==s&&(a=parseInt(h._getMemoryUse(),10)),a},this.disable=function(c){var d;if(c===b&&(c=!1),z)return!1;for(z=!0,B("shutdown",1),d=f.soundIDs.length-1;d>=0;d--)_(f.sounds[f.soundIDs[d]]);return _(f),D(c),Ga.remove(a,"load",J),!0},this.canPlayMIME=function(a){var b;return f.hasHTML5&&(b=Aa({type:a})),!b&&xa&&(b=a&&f.ok()?!!((s>8?a.match(jb):null)||a.match(f.mimePattern)):null),b},this.canPlayURL=function(a){var b;return f.hasHTML5&&(b=Aa({url:a})),!b&&xa&&(b=a&&f.ok()?!!a.match(f.filePattern):null),b},this.canPlayLink=function(a){return!(a.type===b||!a.type||!f.canPlayMIME(a.type))||f.canPlayURL(a.href)},this.getSoundById=function(a,b){if(!a)return null;var c=f.sounds[a];return c||b||f._wD(i+'.getSoundById(): Sound "'+a+'" not found.',2),c},this.onready=function(b,c){var d="onready",e=!1;if("function"!=typeof b)throw ea("needFunction",d);return y&&f._wD(ea("queue",d)),c||(c=a),H(d,b,c),I(),e=!0,e},this.ontimeout=function(b,c){var d="ontimeout",e=!1;if("function"!=typeof b)throw ea("needFunction",d);return y&&f._wD(ea("queue",d)),c||(c=a),H(d,b,c),I({type:d}),e=!0,e},this._writeDebug=function(a,c){var e,g,d="soundmanager-debug";return!!f.setupOptions.debugMode&&(!!(ab&&f.useConsole&&(c&&"object"==typeof c?console.log(a,c):Z[c]!==b?console[Z[c]](a):console.log(a),f.consoleOnly))||!!(e=l(d))&&(g=o.createElement("div"),++C%2===0&&(g.className="sm2-alt"),c=c===b?0:parseInt(c,10),g.appendChild(o.createTextNode(a)),c&&(c>=2&&(g.style.fontWeight="bold"),3===c&&(g.style.color="#ff3333")),e.insertBefore(g,e.firstChild),e=null,!0))},n.indexOf("sm2-debug=alert")!==-1&&(this._writeDebug=function(b){a.alert(b)}),this._wD=this._writeDebug,this._debug=function(){var a,b;for(B("currentObj",1),a=0,b=f.soundIDs.length;a=0;d--)f.sounds[f.soundIDs[d]].destruct();if(h)try{Wa&&(da=h.innerHTML),ca=h.parentNode.removeChild(h)}catch(a){B("badRemove",2)}if(da=ca=xa=h=null,f.enabled=T=y=na=oa=w=x=z=Ia=f.swfLoaded=!1,f.soundIDs=[],f.sounds={},Ra=0,Sa=!1,b)t=[];else for(d in t)if(t.hasOwnProperty(d))for(e=0,g=t[d].length;e0&&c.position===c.duration&&(f._wD(e+"Sound at end, resetting to position: 0"),a.position=0),c.paused&&c.position>=0&&(!c._iO.serverURL||c.position>0))f._wD(e+"Resuming from paused state",1),c.resume();else{if(c._iO=E(a,c._iO),(!c.isHTML5&&null!==c._iO.position&&c._iO.position>0||null!==c._iO.from&&c._iO.from>0||null!==c._iO.to)&&0===c.instanceCount&&0===c.playState&&!c._iO.serverURL){if(j=function(){c._iO=E(a,c._iO),c.play(c._iO)},c.isHTML5&&!c._html5_canplay?(f._wD(e+"Beginning load for non-zero offset case"),c.load({_oncanplay:j}),t=!1):c.isHTML5||c.loaded||c.readyState&&2===c.readyState||(f._wD(e+"Preloading for non-zero offset case"),c.load({onload:j}),t=!1),null!==t)return t;c._iO=q()}(!c.instanceCount||c._iO.multiShotEvents||c.isHTML5&&c._iO.multiShot&&!Ia||!c.isHTML5&&s>8&&!c.getAutoPlay())&&c.instanceCount++,c._iO.onposition&&0===c.playState&&l(c),c.playState=1,c.paused=!1,c.position=c._iO.position===b||isNaN(c._iO.position)?0:c._iO.position,c.isHTML5||(c._iO=ka(ja(c._iO))),c._iO.onplay&&d&&(c._iO.onplay.apply(c),m=!0),c.setVolume(c._iO.volume,!0),c.setPan(c._iO.pan,!0),1!==c._iO.playbackRate&&c.setPlaybackRate(c._iO.playbackRate),c.isHTML5?c.instanceCount<2?(k(),i=c._setup_html5(),c.setPosition(c._iO.position),i.play()):(f._wD(c.id+": Cloning Audio() for instance #"+c.instanceCount+"..."),n=new Audio(c._iO.url),o=function(){Ga.remove(n,"ended",o),c._onfinish(c),Da(n),n=null},p=function(){Ga.remove(n,"canplay",p);try{n.currentTime=c._iO.position/Ta}catch(a){la(c.id+": multiShot play() failed to apply position of "+c._iO.position/Ta)}n.play()},Ga.add(n,"ended",o),c._iO.volume!==b&&(n.volume=Math.max(0,Math.min(1,c._iO.volume/100))),c.muted&&(n.muted=!0),c._iO.position?Ga.add(n,"canplay",p):n.play()):(r=h._start(c.id,c._iO.loops||1,9===s?c.position:c.position/Ta,c._iO.multiShot||!1),9!==s||r||(f._wD(e+"No sound hardware, or 32-sound ceiling hit",2),c._iO.onplayerror&&c._iO.onplayerror.apply(c)))}return c},this.start=this.play,this.stop=function(a){var d,b=c._iO;return 1===c.playState&&(f._wD(c.id+": stop()"),c._onbufferchange(0),c._resetOnPosition(0),c.paused=!1,c.isHTML5||(c.playState=0),p(),b.to&&c.clearOnPosition(b.to),c.isHTML5?c._a&&(d=c.position,c.setPosition(0),c.position=d,c._a.pause(),c.playState=0,c._onTimer(),j()):(h._stop(c.id,a),b.serverURL&&c.unload()),c.instanceCount=0,c._iO={},b.onstop&&b.onstop.apply(c)),c},this.setAutoPlay=function(a){f._wD(c.id+": Autoplay turned "+(a?"on":"off")),c._iO.autoPlay=a,c.isHTML5||(h._setAutoPlay(c.id,a),a&&(c.instanceCount||1!==c.readyState||(c.instanceCount++,f._wD(c.id+": Incremented instance count to "+c.instanceCount))))},this.getAutoPlay=function(){return c._iO.autoPlay},this.setPlaybackRate=function(a){var b=Math.max(.5,Math.min(4,a));if(b!==a&&f._wD(c.id+": setPlaybackRate("+a+"): limiting rate to "+b,2),c.isHTML5)try{c._iO.playbackRate=b,c._a.playbackRate=b}catch(a){f._wD(c.id+": setPlaybackRate("+b+") failed: "+a.message,2)}return c},this.setPosition=function(a){a===b&&(a=0);var d,e,g=c.isHTML5?Math.max(a,0):Math.min(c.duration||c._iO.duration,Math.max(a,0));if(c.position=g,e=c.position/Ta,c._resetOnPosition(c.position),c._iO.position=g,c.isHTML5){if(c._a){if(c._html5_canplay){if(c._a.currentTime!==e){f._wD(c.id+": setPosition("+e+")");try{c._a.currentTime=e,(0===c.playState||c.paused)&&c._a.pause()}catch(a){f._wD(c.id+": setPosition("+e+") failed: "+a.message,2)}}}else if(e)return f._wD(c.id+": setPosition("+e+"): Cannot seek yet, sound not ready",2),c;c.paused&&c._onTimer(!0)}}else d=9===s?c.position:e,c.readyState&&2!==c.readyState&&h._setPosition(c.id,d,c.paused||!c.playState,c._iO.multiShot);return c},this.pause=function(a){return c.paused||0===c.playState&&1!==c.readyState?c:(f._wD(c.id+": pause()"),c.paused=!0,c.isHTML5?(c._setup_html5().pause(),j()):(a||a===b)&&h._pause(c.id,c._iO.multiShot),c._iO.onpause&&c._iO.onpause.apply(c),c)},this.resume=function(){var a=c._iO;return c.paused?(f._wD(c.id+": resume()"),c.paused=!1,c.playState=1,c.isHTML5?(c._setup_html5().play(),k()):(a.isMovieStar&&!a.serverURL&&c.setPosition(c.position),h._pause(c.id,a.multiShot)),!m&&a.onplay?(a.onplay.apply(c),m=!0):a.onresume&&a.onresume.apply(c),c):c},this.togglePause=function(){return f._wD(c.id+": togglePause()"),0===c.playState?(c.play({position:9!==s||c.isHTML5?c.position/Ta:c.position}),c):(c.paused?c.resume():c.pause(),c)},this.setPan=function(a,d){return a===b&&(a=0),d===b&&(d=!1),c.isHTML5||h._setPan(c.id,a),c._iO.pan=a,d||(c.pan=a,c.options.pan=a),c},this.setVolume=function(a,d){return a===b&&(a=100),d===b&&(d=!1),c.isHTML5?c._a&&(f.muted&&!c.muted&&(c.muted=!0,c._a.muted=!0),c._a.volume=Math.max(0,Math.min(1,a/100))):h._setVolume(c.id,f.muted&&!c.muted||c.muted?0:a),c._iO.volume=a,d||(c.volume=a,c.options.volume=a),c},this.mute=function(){return c.muted=!0,c.isHTML5?c._a&&(c._a.muted=!0):h._setVolume(c.id,0),c},this.unmute=function(){c.muted=!1;var a=c._iO.volume!==b;return c.isHTML5?c._a&&(c._a.muted=!1):h._setVolume(c.id,a?c._iO.volume:c.options.volume),c},this.toggleMute=function(){return c.muted?c.unmute():c.mute()},this.onPosition=function(a,d,e){return n.push({position:parseInt(a,10),method:d,scope:e!==b?e:c,fired:!1}),c},this.onposition=this.onPosition,this.clearOnPosition=function(a,b){var c;if(a=parseInt(a,10),isNaN(a))return!1;for(c=0;c=d)return!1;for(a=d-1;a>=0;a--)b=n[a],!b.fired&&c.position>=b.position&&(b.fired=!0,o++,b.method.apply(b.scope,[b.position]),d=n.length);return!0},this._resetOnPosition=function(a){var b,c,d=n.length;if(!d)return!1;for(b=d-1;b>=0;b--)c=n[b],c.fired&&a<=c.position&&(c.fired=!1,o--);return!0},q=function(){var e,g,a=c._iO,b=a.from,d=a.to;return g=function(){f._wD(c.id+': "To" time of '+d+" reached."),c.clearOnPosition(d,g),c.stop()},e=function(){f._wD(c.id+': Playing "from" '+b),null===d||isNaN(d)||c.onPosition(d,g)},null===b||isNaN(b)||(a.position=b,a.multiShot=!1,e()),a},l=function(){var a,b=c._iO.onposition;if(b)for(a in b)b.hasOwnProperty(a)&&c.onPosition(parseInt(a,10),b[a])},p=function(){var a,b=c._iO.onposition;if(b)for(a in b)b.hasOwnProperty(a)&&c.clearOnPosition(parseInt(a,10))},k=function(){c.isHTML5&&pa(c)},j=function(){c.isHTML5&&qa(c)},d=function(a){a||(n=[],o=0),m=!1,c._hasTimer=null,c._a=null,c._html5_canplay=!1,c.bytesLoaded=null,c.bytesTotal=null,c.duration=c._iO&&c._iO.duration?c._iO.duration:null,c.durationEstimate=null,c.buffered=[],c.eqData=[],c.eqData.left=[],c.eqData.right=[],c.failures=0,c.isBuffering=!1,c.instanceOptions={},c.instanceCount=0,c.loaded=!1,c.metadata={},c.readyState=0,c.muted=!1,c.paused=!1,c.peakData={left:0,right:0},c.waveformData={left:[],right:[]},c.playState=0,c.position=null,c.id3={}},d(),this._onTimer=function(a){var b,e,d=!1,f={};if(c._hasTimer||a)return c._a&&(a||(c.playState>0||1===c.readyState)&&!c.paused)&&(b=c._get_html5_duration(),b!==t.duration&&(t.duration=b,c.duration=b,d=!0),c.durationEstimate=c.duration,e=c._a.currentTime*Ta||0,e!==t.time&&(t.time=e,d=!0),(d||a)&&c._whileplaying(e,f,f,f,f)),d},this._get_html5_duration=function(){var a=c._iO,b=c._a&&c._a.duration?c._a.duration*Ta:a&&a.duration?a.duration:null,d=b&&!isNaN(b)&&b!==1/0?b:null;return d},this._apply_loop=function(a,b){!a.loop&&b>1&&f._wD("Note: Native HTML5 looping is infinite.",1),a.loop=b>1?"loop":""},this._setup_html5=function(a){var i,b=E(c._iO,a),f=Ia?g:c._a,h=decodeURI(b.url);if(Ia?h===decodeURI(Ja)&&(i=!0):h===decodeURI(r)&&(i=!0),f){if(f._s)if(Ia)f._s&&f._s.playState&&!i&&f._s.stop();else if(!Ia&&h===decodeURI(r))return c._apply_loop(f,b.loops),f;i||(r&&d(!1),f.src=b.url,c.url=b.url,r=b.url,Ja=b.url,f._called_load=!1)}else b.autoLoad||b.autoPlay?(c._a=new Audio(b.url),c._a.load()):c._a=Za&&opera.version()<10?new Audio(null):new Audio,f=c._a,f._called_load=!1,Ia&&(g=f);return c.isHTML5=!0,c._a=f,f._s=c,e(),c._apply_loop(f,b.loops),b.autoLoad||b.autoPlay?c.load():(f.autobuffer=!1,f.preload="auto"),f},e=function(){function b(a,b,d){return c._a?c._a.addEventListener(a,b,d||!1):null}if(c._a._added_events)return!1;var a;c._a._added_events=!0;for(a in Na)Na.hasOwnProperty(a)&&b(a,Na[a]);return!0},i=function(){function b(a,b,d){return c._a?c._a.removeEventListener(a,b,d||!1):null}var a;f._wD(c.id+": Removing event listeners"),c._a._added_events=!1;for(a in Na)Na.hasOwnProperty(a)&&b(a,Na[a])},this._onload=function(a){var b,d=!!a||!c.isHTML5&&8===s&&c.duration;return b=c.id+": ",f._wD(b+(d?"onload()":"Failed to load / invalid sound?"+(c.duration?" -":" Zero-length duration reported.")+" ("+c.url+")"),d?1:2),d||c.isHTML5||(f.sandbox.noRemote===!0&&f._wD(b+ea("noNet"),1),f.sandbox.noLocal===!0&&f._wD(b+ea("noLocal"),1)),c.loaded=d,c.readyState=d?3:2,c._onbufferchange(0),c._iO.onload&&Qa(c,function(){c._iO.onload.apply(c,[d])}),!0},this._onbufferchange=function(a){return 0!==c.playState&&(!(a&&c.isBuffering||!a&&!c.isBuffering)&&(c.isBuffering=1===a,c._iO.onbufferchange&&(f._wD(c.id+": Buffer state change: "+a),c._iO.onbufferchange.apply(c,[a])),!0))},this._onsuspend=function(){return c._iO.onsuspend&&(f._wD(c.id+": Playback suspended"),c._iO.onsuspend.apply(c)),!0},this._onfailure=function(a,b,d){c.failures++,f._wD(c.id+": Failure ("+c.failures+"): "+a),c._iO.onfailure&&1===c.failures?c._iO.onfailure(a,b,d):f._wD(c.id+": Ignoring failure")},this._onwarning=function(a,b,d){c._iO.onwarning&&c._iO.onwarning(a,b,d)},this._onfinish=function(){var a=c._iO.onfinish;c._onbufferchange(0),c._resetOnPosition(0),c.instanceCount&&(c.instanceCount--,c.instanceCount||(p(),c.playState=0,c.paused=!1,c.instanceCount=0,c.instanceOptions={},c._iO={},j(),c.isHTML5&&(c.position=0)),c.instanceCount&&!c._iO.multiShotEvents||a&&(f._wD(c.id+": onfinish()"),Qa(c,function(){a.apply(c)})))},this._whileloading=function(a,b,d,e){var f=c._iO;c.bytesLoaded=a,c.bytesTotal=b,c.duration=Math.floor(d),c.bufferLength=e,c.isHTML5||f.isMovieStar?c.durationEstimate=c.duration:f.duration?c.durationEstimate=c.duration>f.duration?c.duration:f.duration:c.durationEstimate=parseInt(c.bytesTotal/c.bytesLoaded*c.duration,10),c.isHTML5||(c.buffered=[{start:0,end:c.duration}]),(3!==c.readyState||c.isHTML5)&&f.whileloading&&f.whileloading.apply(c)},this._whileplaying=function(a,d,e,f,g){var i,h=c._iO;return!isNaN(a)&&null!==a&&(c.position=Math.max(0,a),c._processOnPosition(),!c.isHTML5&&s>8&&(h.usePeakData&&d!==b&&d&&(c.peakData={left:d.leftPeak,right:d.rightPeak}),h.useWaveformData&&e!==b&&e&&(c.waveformData={left:e.split(","),right:f.split(",")}),h.useEQData&&g!==b&&g&&g.leftEQ&&(i=g.leftEQ.split(","),c.eqData=i,c.eqData.left=i,g.rightEQ!==b&&g.rightEQ&&(c.eqData.right=g.rightEQ.split(",")))),1===c.playState&&(c.isHTML5||8!==s||c.position||!c.isBuffering||c._onbufferchange(0),h.whileplaying&&h.whileplaying.apply(c)),!0)},this._oncaptiondata=function(a){f._wD(c.id+": Caption data received."),c.captiondata=a,c._iO.oncaptiondata&&c._iO.oncaptiondata.apply(c,[a])},this._onmetadata=function(a,b){f._wD(c.id+": Metadata received.");var e,g,d={};for(e=0,g=a.length;e0&&(f._wD(c.id+": Data error: "+a),c._iO.ondataerror&&c._iO.ondataerror.apply(c))},this._debug()},U=function(){return o.body||o.getElementsByTagName("div")[0]},l=function(a){return o.getElementById(a)},E=function(a,c){var e,g,d=a||{};e=c===b?f.defaultOptions:c;for(g in e)e.hasOwnProperty(g)&&d[g]===b&&("object"!=typeof e[g]||null===e[g]?d[g]=e[g]:d[g]=E(d[g],e[g]));return d},Qa=function(b,c){b.isHTML5||8!==s?c():a.setTimeout(c,0)},G={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},F=function(a,c){var d,e=!0,g=c!==b,h=f.setupOptions,i=G;if(a===b){e=[];for(d in h)h.hasOwnProperty(d)&&e.push(d);for(d in i)i.hasOwnProperty(d)&&("object"==typeof f[d]?e.push(d+": {...}"):f[d]instanceof Function?e.push(d+": function() {...}"):e.push(d));return f._wD(ea("setup",e.join(", "))),!1}for(d in a)if(a.hasOwnProperty(d))if("object"!=typeof a[d]||null===a[d]||a[d]instanceof Array||a[d]instanceof RegExp)g&&i[c]!==b?f[c][d]=a[d]:h[d]!==b?(f.setupOptions[d]=a[d],f[d]=a[d]):i[d]===b?(la(ea(f[d]===b?"setupUndef":"setupError",d),2),e=!1):f[d]instanceof Function?f[d].apply(f,a[d]instanceof Array?a[d]:[a[d]]):f[d]=a[d];else{if(i[d]!==b)return F(a[d],d);la(ea(f[d]===b?"setupUndef":"setupError",d),2),e=!1}return e},Ga=function(){function d(a){var c=Ha.call(a),d=c.length;return b?(c[1]="on"+c[1],d>3&&c.pop()):3===d&&c.push(!1),c}function e(a,d){var e=a.shift(),f=[c[d]];b?e[f](a[0],a[1]):e[f].apply(e,a)}function f(){e(d(arguments),"add")}function g(){e(d(arguments),"remove")}var b=a.attachEvent,c={add:b?"attachEvent":"addEventListener",remove:b?"detachEvent":"removeEventListener"};return{add:f,remove:g}}(),Na={abort:nb(function(){f._wD(this._s.id+": abort")}),canplay:nb(function(){var c,a=this._s;if(a._html5_canplay)return!0;if(a._html5_canplay=!0,f._wD(a.id+": canplay"),a._onbufferchange(0),c=a._iO.position===b||isNaN(a._iO.position)?null:a._iO.position/Ta,this.currentTime!==c){f._wD(a.id+": canplay: Setting position to "+c);try{this.currentTime=c}catch(b){f._wD(a.id+": canplay: Setting position of "+c+" failed: "+b.message,2)}}a._iO._oncanplay&&a._iO._oncanplay()}),canplaythrough:nb(function(){var a=this._s;a.loaded||(a._onbufferchange(0),a._whileloading(a.bytesLoaded,a.bytesTotal,a._get_html5_duration()),a._onload(!0))}),durationchange:nb(function(){var b,a=this._s;b=a._get_html5_duration(),isNaN(b)||b===a.duration||(f._wD(this._s.id+": durationchange ("+b+")"+(a.duration?", previously "+a.duration:"")),a.durationEstimate=a.duration=b)}),ended:nb(function(){var a=this._s;f._wD(a.id+": ended"),a._onfinish()}),error:nb(function(){f._wD(this._s.id+": HTML5 error, code "+this.error.code),this._s._onload(!1)}),loadeddata:nb(function(){var a=this._s;f._wD(a.id+": loadeddata"),a._loaded||Ya||(a.duration=a._get_html5_duration())}),loadedmetadata:nb(function(){f._wD(this._s.id+": loadedmetadata")}),loadstart:nb(function(){f._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)}),play:nb(function(){this._s._onbufferchange(0)}),playing:nb(function(){f._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)}),progress:nb(function(a){var c,d,e,b=this._s,g=0,h="progress"===a.type,i=a.target.buffered,j=a.loaded||0,k=a.total||1;if(b.buffered=[],i&&i.length){for(c=0,d=i.length;c1){for(e=[],d=i.length,c=0;c=0;h--)e["audio/"+g[c].related[h]]=e[c],f.html5[g[c].related[h]]=e[c],f.flash[g[c].related[h]]=e[c];return e.canPlayType=a?i:null,f.html5=E(f.html5,e),f.html5.usingFlash=ya(),xa=f.html5.usingFlash,!0},P={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:i+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:j+"Verify that %s is a valid path.",tryDebug:"Try "+i+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:j+"Non-HTTP page ("+o.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:j+"Special case: Waiting for SWF to load with window focus...",waitForever:j+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:j+"Waiting for 100% SWF load...",needFunction:j+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:j+"_debug(): Current sound objects",waitOnload:j+"Waiting for window.onload()",docLoaded:j+"Document already loaded",onload:j+"initComplete(): calling soundManager.onload()",onloadOK:i+".onload() complete",didInit:j+"init(): Already called?",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:j+"Failed to remove Flash node.",shutdown:i+".disable(): Shutting down",queue:j+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+ha.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:j+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:i+".load(): current URL already assigned.",badFV:i+'.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",needFlash:j+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:j+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:i+".setup(): allowed parameters: %s",setupError:i+'.setup(): "%s" cannot be assigned with this method.',setupUndef:i+'.setup(): Could not find option "%s"',setupLate:i+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:j+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:i+".reset(): Removing event callbacks",mobileUA:"Mobile UA detected, preferring HTML5 by default.",globalHTML5:"Using singleton HTML5 Audio() pattern for this device.",ignoreMobile:"Ignoring mobile restrictions for this device."},ea=function(){var a,b,c,d,e;if(a=Ha.call(arguments),d=a.shift(),e=P&&P[d]?P[d]:"",e&&a&&a.length)for(b=0,c=a.length;b1&&a.stream&&(B("as2loop"),a.stream=!1),a},ka=function(a,b){return a&&!a.usePolicyFile&&(a.onid3||a.usePeakData||a.useWaveformData||a.useEQData)&&(f._wD((b||"")+ea("policy")),a.usePolicyFile=!0),a},la=function(a){ab&&console.warn!==b?console.warn(a):f._wD(a)},p=function(){return!1},_=function(a){var b;for(b in a)a.hasOwnProperty(b)&&"function"==typeof a[b]&&(a[b]=p);b=null},aa=function(a){a===b&&(a=!1),(z||a)&&f.disable(a)},ba=function(a){var c,b=null;if(a)if(a.match(/\.swf(\?.*)?$/i)){if(b=a.substr(a.toLowerCase().lastIndexOf(".swf?")+4))return a}else a.lastIndexOf("/")!==a.length-1&&(a+="/");return c=(a&&a.lastIndexOf("/")!==-1?a.substr(0,a.lastIndexOf("/")+1):"./")+f.movieURL,f.noSWFCache&&(c+="?ts="+(new Date).getTime()),c},N=function(){s=parseInt(f.flashVersion,10),8!==s&&9!==s&&(f._wD(ea("badFV",s,$)),f.flashVersion=s=$);var a=f.debugMode||f.debugFlash?"_debug.swf":".swf";f.useHTML5Audio&&!f.html5Only&&f.audioFormats.mp4.required&&s<9&&(f._wD(ea("needfl9")),f.flashVersion=s=9),f.version=f.versionNumber+(f.html5Only?" (HTML5-only mode)":9===s?" (AS3/Flash 9)":" (AS2/Flash 8)"),s>8?(f.defaultOptions=E(f.defaultOptions,f.flash9Options),f.features.buffering=!0,f.defaultOptions=E(f.defaultOptions,f.movieStarOptions),f.filePatterns.flash9=new RegExp("\\.(mp3|"+kb.join("|")+")(\\?.*)?$","i"),f.features.movieStar=!0):f.features.movieStar=!1,f.filePattern=f.filePatterns[8!==s?"flash9":"flash8"],f.movieURL=(8===s?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",a),f.features.peakData=f.features.waveformData=f.features.eqData=s>8},X=function(a,b){return!!h&&void h._setPolling(a,b)},Y=function(){if(f.debugURLParam.test(n)&&(f.setupOptions.debugMode=f.debugMode=!0),l(f.debugID))return!1;var a,b,c,d,e;if(f.debugMode&&!l(f.debugID)&&(!ab||!f.useConsole||!f.consoleOnly)){a=o.createElement("div"),a.id=f.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(o.createTextNode("-")),a.onclick=ia,a.title="Toggle SM2 debug console",m.match(/msie 6/i)&&(a.style.position="absolute",a.style.cursor="hand");for(e in d)d.hasOwnProperty(e)&&(a.style[e]=d[e]);if(b=o.createElement("div"),b.id=f.debugID,b.style.display=f.debugMode?"block":"none",f.debugMode&&!l(a.id)){try{c=U(),c.appendChild(a)}catch(a){throw new Error(ea("domError")+" \n"+a.toString())}c.appendChild(b)}}c=null},ma=this.getSoundById,B=function(a,b){return a?f._wD(ea(a),b):""},ia=function(){var a=l(f.debugID),b=l(f.debugID+"-toggle");return!!a&&(u?(b.innerHTML="+",a.style.display="none"):(b.innerHTML="-",a.style.display="block"),void(u=!u))},v=function(c,d,e){if(a.sm2Debugger!==b)try{sm2Debugger.handleEvent(c,d,e)}catch(a){return!1}return!0},ga=function(){var a=[];return f.debugMode&&a.push(ha.sm2Debug),f.debugFlash&&a.push(ha.flashDebug),f.useHighPerformance&&a.push(ha.highPerf),a.join(" ")},fa=function(){var a=ea("fbHandler"),b=f.getMoviePercent(),c=ha,d={type:"FLASHBLOCK"};return!f.html5Only&&void(f.ok()?(f.didFlashBlock&&f._wD(a+": Unblocked"),f.oMC&&(f.oMC.className=[ga(),c.swfDefault,c.swfLoaded+(f.didFlashBlock?" "+c.swfUnblocked:"")].join(" "))):(xa&&(f.oMC.className=ga()+" "+c.swfDefault+" "+(null===b?c.swfTimedout:c.swfError),f._wD(a+": "+ea("fbTimeout")+(b?" ("+ea("fbLoaded")+")":""))),f.didFlashBlock=!0,I({type:"ontimeout",ignoreInit:!0,error:d}),W(d)))},H=function(a,c,d){t[a]===b&&(t[a]=[]),t[a].push({method:c,scope:d||null,fired:!1})},I=function(a){if(a||(a={type:f.ok()?"onready":"ontimeout"}),!y&&a&&!a.ignoreInit)return!1;if("ontimeout"===a.type&&(f.ok()||z&&!a.ignoreInit))return!1;var e,g,b={success:a&&a.ignoreInit?f.ok():!z},c=a&&a.type?t[a.type]||[]:[],d=[],h=[b],i=xa&&!f.ok();for(a.error&&(h[0].error=a.error),e=0,g=c.length;e=0;a--)f.sounds[f.soundIDs[a]].isHTML5&&f.sounds[f.soundIDs[a]]._hasTimer&&f.sounds[f.soundIDs[a]]._onTimer()},W=function(c){c=c!==b?c:{},"function"==typeof f.onerror&&f.onerror.apply(a,[{type:c.type!==b?c.type:null}]),c.fatal!==b&&c.fatal&&f.disable()},Ma=function(){if(!_a||!La())return!1;var b,c,a=f.audioFormats;for(c in a)if(a.hasOwnProperty(c)&&("mp3"===c||"mp4"===c)&&(f._wD(i+": Using flash fallback for "+c+" format"),f.html5[c]=!1,a[c]&&a[c].related))for(b=a[c].related.length-1;b>=0;b--)f.html5[a[c].related[b]]=!1},this._setSandboxType=function(a){var c=f.sandbox;c.type=a,c.description=c.types[c.types[a]!==b?a:"unknown"],"localWithFile"===c.type?(c.noRemote=!0,c.noLocal=!1,B("secNote",2)):"localWithNetwork"===c.type?(c.noRemote=!1,c.noLocal=!0):"localTrusted"===c.type&&(c.noRemote=!1,c.noLocal=!1)},this._externalInterfaceOK=function(a){if(f.swfLoaded)return!1;var b;return v("swf",!0),v("flashtojs",!0),f.swfLoaded=!0,cb=!1,_a&&Ma(),a&&a.replace(/\+dev/i,"")===f.versionNumber.replace(/\+dev/i,"")?void setTimeout(r,Wa?100:1):(b=i+': Fatal: JavaScript file build "'+f.versionNumber+'" does not match Flash SWF build "'+a+'" at '+f.url+". Ensure both are up-to-date.",setTimeout(function(){throw new Error(b)},0),!1)},V=function(a,c){function d(){var b,a=[],c=[],d=" + ";b="SoundManager "+f.version+(!f.html5Only&&f.useHTML5Audio?f.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),f.html5Only?f.html5PollingInterval&&a.push("html5PollingInterval ("+f.html5PollingInterval+"ms)"):(f.preferFlash&&a.push("preferFlash"),f.useHighPerformance&&a.push("useHighPerformance"),f.flashPollingInterval&&a.push("flashPollingInterval ("+f.flashPollingInterval+"ms)"),f.html5PollingInterval&&a.push("html5PollingInterval ("+f.html5PollingInterval+"ms)"),f.wmode&&a.push("wmode ("+f.wmode+")"),f.debugFlash&&a.push("debugFlash"),f.useFlashBlock&&a.push("flashBlock")),a.length&&(c=c.concat([a.join(d)])),f._wD(b+(c.length?d+c.join(", "):""),1),Oa()}function A(a,b){return''}if(w&&x)return!1;if(f.html5Only)return N(),d(),f.oMC=l(f.movieID),r(),w=!0,x=!0,!1;var p,q,s,t,u,v,y,z,e=c||f.url,g=f.altURL||e,h="JS/Flash audio component (SoundManager 2)",i=U(),j=ga(),k=null,n=o.getElementsByTagName("html")[0];if(k=n&&n.dir&&n.dir.match(/rtl/i),a=a===b?f.id:a,N(),f.url=ba(hb?e:g),c=f.url,f.wmode=!f.wmode&&f.useHighPerformance?"transparent":f.wmode,null!==f.wmode&&(m.match(/msie 8/i)||!Wa&&!f.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(va.push(P.spcWmode),f.wmode=null),p={name:a,id:a,src:c,quality:"high",allowScriptAccess:f.allowScriptAccess,bgcolor:f.bgColor,pluginspage:ib+"www.macromedia.com/go/getflashplayer",title:h,type:"application/x-shockwave-flash",wmode:f.wmode,hasPriority:"true"},f.debugFlash&&(p.FlashVars="debug=1"),f.wmode||delete p.wmode,Wa)q=o.createElement("div"),t=['',A("movie",c),A("AllowScriptAccess",f.allowScriptAccess),A("quality",p.quality),f.wmode?A("wmode",f.wmode):"",A("bgcolor",f.bgColor),A("hasPriority","true"),f.debugFlash?A("FlashVars",p.FlashVars):"",""].join("");else{q=o.createElement("embed");for(s in p)p.hasOwnProperty(s)&&q.setAttribute(s,p[s])}if(Y(),j=ga(),i=U())if(f.oMC=l(f.movieID)||o.createElement("div"),f.oMC.id)z=f.oMC.className,f.oMC.className=(z?z+" ":ha.swfDefault)+(j?" "+j:""),f.oMC.appendChild(q),Wa&&(u=f.oMC.appendChild(o.createElement("div")),u.className=ha.swfBox,u.innerHTML=t),x=!0;else{if(f.oMC.id=f.movieID,f.oMC.className=ha.swfDefault+" "+j,v=null,u=null,f.useFlashBlock||(f.useHighPerformance?v={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(v={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},k&&(v.left=Math.abs(parseInt(v.left,10))+"px"))),Xa&&(f.oMC.style.zIndex=1e4),!f.debugFlash)for(y in v)v.hasOwnProperty(y)&&(f.oMC.style[y]=v[y]);try{Wa||f.oMC.appendChild(q),i.appendChild(f.oMC),Wa&&(u=f.oMC.appendChild(o.createElement("div")),u.className=ha.swfBox,u.innerHTML=t),x=!0}catch(a){throw new Error(ea("domError")+" \n"+a.toString())}}return w=!0,d(),!0},Q=function(){return f.html5Only?(V(),!1):!h&&(f.url?(h=f.getMovie(f.id),h||(ca?(Wa?f.oMC.innerHTML=da:f.oMC.appendChild(ca),ca=null,w=!0):V(f.id,f.url),h=f.getMovie(f.id)),"function"==typeof f.oninitmovie&&setTimeout(f.oninitmovie,1),Pa(),!0):(B("noURL"),!1))},K=function(){setTimeout(L,1e3)},M=function(){a.setTimeout(function(){la(j+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),f.setup({preferFlash:!1}).reboot(),f.didFlashBlock=!0,f.beginDelayedInit()},1)},L=function(){var b,c=!1;return!!f.url&&(!na&&(na=!0,Ga.remove(a,"load",K),Ka&&cb&&!bb?(B("waitFocus"),!1):(y||(b=f.getMoviePercent(),b>0&&b<100&&(c=!0)),void setTimeout(function(){return b=f.getMoviePercent(),c?(na=!1,f._wD(ea("waitSWF")),a.setTimeout(K,1),!1):(y||(f._wD(i+": No Flash response within expected time. Likely causes: "+(0===b?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(f.debugFlash?" "+ea("checkSWF"):""),2),!hb&&b&&(B("localFail",2),f.debugFlash||B("tryDebug",2)),0===b&&f._wD(ea("swf404",f.url),1),v("flashtojs",!1,": Timed out"+(hb?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),void(!y&&db&&(null===b?f.useFlashBlock||0===f.flashLoadTimeout?(f.useFlashBlock&&fa(),B("waitForever")):!f.useFlashBlock&&wa?M():(B("waitForever"),I({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===f.flashLoadTimeout?B("waitForever"):!f.useFlashBlock&&wa?M():aa(!0))))},f.flashLoadTimeout))))},O=function(){function b(){Ga.remove(a,"focus",O)}return bb||!cb?(b(),!0):(db=!0,bb=!0,B("gotFocus"),na=!1,K(),b(),!0)},Pa=function(){va.length&&(f._wD("SoundManager 2: "+va.join(" "),1),va=[])},Oa=function(){Pa();var a,b=[];if(f.useHTML5Audio&&f.hasHTML5){for(a in f.audioFormats)f.audioFormats.hasOwnProperty(a)&&b.push(a+" = "+f.html5[a]+(!f.html5[a]&&xa&&f.flash[a]?" (using flash)":f.preferFlash&&f.flash[a]&&xa?" (preferring flash)":f.html5[a]?"":" ("+(f.audioFormats[a].required?"required, ":"")+"and no flash support)"));f._wD("SoundManager 2 HTML5 support: "+b.join(", "),1)}},D=function(b){if(y)return!1;if(f.html5Only)return B("sm2Loaded",1),y=!0,J(),v("onload",!0),!0;var e,c=f.useFlashBlock&&f.flashLoadTimeout&&!f.getMoviePercent(),d=!0;return c||(y=!0),e={type:!Ka&&xa?"NO_FLASH":"INIT_TIMEOUT"},f._wD("SoundManager 2 "+(z?"failed to load":"loaded")+" ("+(z?"Flash security/load error":"OK")+") "+String.fromCharCode(z?10006:10003),z?2:1),z||b?(f.useFlashBlock&&f.oMC&&(f.oMC.className=ga()+" "+(null===f.getMoviePercent()?ha.swfTimedout:ha.swfError)),I({type:"ontimeout",error:e,ignoreInit:!0}),v("onload",!1),W(e),d=!1):v("onload",!0),z||(f.waitForWindowLoad&&!A?(B("waitOnload"),Ga.add(a,"load",J)):(f.waitForWindowLoad&&A&&B("docLoaded"),J())),d},q=function(){var a,c=f.setupOptions;for(a in c)c.hasOwnProperty(a)&&(f[a]===b?f[a]=c[a]:f[a]!==c[a]&&(f.setupOptions[a]=f[a]))},r=function(){function b(){Ga.remove(a,"load",f.beginDelayedInit)}if(y)return B("didInit"),!1;if(f.html5Only)return y||(b(),f.enabled=!0,D()),!0;Q();try{h._externalInterfaceTest(!1),X(!0,f.flashPollingInterval||(f.useHighPerformance?10:50)),f.debugMode||h._disableDebug(),f.enabled=!0,v("jstoflash",!0),f.html5Only||Ga.add(a,"unload",p)}catch(a){return f._wD("js/flash exception: "+a.toString()),v("jstoflash",!1),W({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),aa(!0),D(),!1}return D(),b(),!0},R=function(){return!T&&(T=!0,q(),Y(),!Ka&&f.hasHTML5&&(f._wD("SoundManager 2: No Flash detected"+(f.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),f.setup({useHTML5Audio:!0,preferFlash:!1})),Fa(),!Ka&&xa&&(va.push(P.needFlash),f.setup({flashLoadTimeout:1})),o.removeEventListener&&o.removeEventListener("DOMContentLoaded",R,!1),Q(),!0)},Ea=function(){return"complete"===o.readyState&&(R(),o.detachEvent("onreadystatechange",Ea)),!0},S=function(){A=!0,R(),Ga.remove(a,"load",S)},La(),Ga.add(a,"focus",O),Ga.add(a,"load",K),Ga.add(a,"load",S),o.addEventListener?o.addEventListener("DOMContentLoaded",R,!1):o.attachEvent?o.attachEvent("onreadystatechange",Ea):(v("onload",!1),W({type:"NO_DOM2_EVENTS",fatal:!0}))}if(!a||!a.document)throw new Error("SoundManager requires a browser with window and document objects.");var c=null;a.SM2_DEFER!==b&&SM2_DEFER||(c=new d),"object"==typeof module&&module&&"object"==typeof module.exports?(module.exports.SoundManager=d,module.exports.soundManager=c):"function"==typeof define&&define.amd&&define(function(){function b(b){if(!a.soundManager&&b instanceof Function){var c=b(d);c instanceof d&&(a.soundManager=c)}return a.soundManager}return{constructor:d,getInstance:b}}),a.SoundManager=d,a.soundManager=c}(window); // source --> https://myworstinvestmentever.com/wp-content/plugins/simple-podcast-press/responsive_audio_player/js/bar-ui.js?ver=5.7.10 /*jslint plusplus: true, white: true, nomen: true */ /*global console, document, navigator, soundManager, window */ (function(window) { /** * SoundManager 2: "Bar UI" player * Copyright (c) 2014, Scott Schiller. All rights reserved. * http://www.schillmania.com/projects/soundmanager2/ * Code provided under BSD license. * http://schillmania.com/projects/soundmanager2/license.txt */ "use strict"; var Player, players = [], // CSS selector that will get us the top-level DOM node for the player UI. playerSelector = '.sm2-bar-ui', playerOptions, utils; /** * Slightly hackish: event callbacks. * Override globally by setting window.sm2BarPlayers.on = {}, or individually by window.sm2BarPlayers[0].on = {} etc. */ players.on = { /* play: function(player) { console.log('playing', player); }, pause: function(player) { console.log('pause', player); }, error: function(player) { console.log('error', player); }, stop: function(player) { console.log('stop', player); } */ }; playerOptions = { // useful when multiple players are in use, or other SM2 sounds are active etc. stopOtherSounds: true, // CSS class to let the browser load the URL directly e.g., download foo.mp3 excludeClass: 'sm2-exclude' }; soundManager.setup({ // trade-off: higher UI responsiveness (play/progress bar), but may use more CPU. html5PollingInterval: 50, flashVersion: 9 }); soundManager.onready(function() { var nodes, i, j; nodes = utils.dom.getAll(playerSelector); if (nodes && nodes.length) { for (i=0, j=nodes.length; i✖' }; function stopOtherSounds() { if (playerOptions.stopOtherSounds) { soundManager.stopAll(); } } function callback(method) { if (method) { // fire callback, passing current turntable object if (exports.on && exports.on[method]) { exports.on[method](exports); } else if (players.on[method]) { players.on[method](exports); } } } function getTime(millisec, useString) { // convert milliseconds to hh:mm:ss, return as object literal or string var seconds = (millisec / 1000).toFixed(0); var minutes = Math.floor(seconds / 60); var hours = ""; if (minutes > 59) { hours = Math.floor(minutes / 60); hours = (hours >= 10) ? hours : "0" + hours; minutes = minutes - (hours * 60); minutes = (minutes >= 10) ? minutes : "0" + minutes; } seconds = Math.floor(seconds % 60); seconds = (seconds >= 10) ? seconds : "0" + seconds; if (hours != "") { return hours + ":" + minutes + ":" + seconds; } return minutes + ":" + seconds; } function setTitle(item) { // given a link, update the "now playing" UI. // if this is an
  • with an inner link, grab and use the text from that. var links = item.getElementsByTagName('a'); if (links.length) { item = links[0]; } // remove any failed character sequence, also dom.playlistTarget.innerHTML = '
    • ' + item.innerHTML.replace(extras.loadFailedCharacter, '') + '
    '; if (dom.playlistTarget.getElementsByTagName('li')[0].scrollWidth > dom.playlistTarget.offsetWidth) { // this item can use , in fact. dom.playlistTarget.innerHTML = '
    • ' + item.innerHTML + '
    '; } } function makeSound(url) { var sound = soundManager.createSound({ url: url, volume: defaultVolume, whileplaying: function() { var progressMaxLeft = 100, left, width; left = Math.min(progressMaxLeft, Math.max(0, (progressMaxLeft * (this.position / this.durationEstimate)))) + '%'; width = Math.min(100, Math.max(0, (100 * this.position / this.durationEstimate))) + '%'; if (this.duration) { dom.progress.style.left = left; dom.progressBar.style.width = width; // TODO: only write changes dom.time.innerHTML = getTime(this.position, true); } }, onbufferchange: function(isBuffering) { if (isBuffering) { utils.css.add(dom.o, 'buffering'); } else { utils.css.remove(dom.o, 'buffering'); } }, onplay: function() { utils.css.swap(dom.o, 'paused', 'playing'); callback('play'); }, onpause: function() { utils.css.swap(dom.o, 'playing', 'paused'); callback('pause'); }, onresume: function() { utils.css.swap(dom.o, 'paused', 'playing'); }, whileloading: function() { if (!this.isHTML5) { dom.duration.innerHTML = getTime(this.durationEstimate, true); } }, onload: function(ok) { if (ok) { dom.duration.innerHTML = getTime(this.duration, true); } else if (this._iO && this._iO.onerror) { this._iO.onerror(); } }, onerror: function() { // sound failed to load. var item, element, html; item = playlistController.getItem(); if (item) { // note error, delay 2 seconds and advance? // playlistTarget.innerHTML = '
    • ' + item.innerHTML + '
    '; if (extras.loadFailedCharacter) { dom.playlistTarget.innerHTML = dom.playlistTarget.innerHTML.replace('
  • ' ,'
  • ' + extras.loadFailedCharacter + ' '); if (playlistController.data.playlist && playlistController.data.playlist[playlistController.data.selectedIndex]) { element = playlistController.data.playlist[playlistController.data.selectedIndex].getElementsByTagName('a')[0]; html = element.innerHTML; if (html.indexOf(extras.loadFailedCharacter) === -1) { element.innerHTML = extras.loadFailedCharacter + ' ' + html; } } } } callback('error'); // load next, possibly with delay. if (navigator.userAgent.match(/mobile/i)) { // mobile will likely block the next play() call if there is a setTimeout() - so don't use one here. actions.next(); } else { if (playlistController.data.timer) { window.clearTimeout(playlistController.data.timer); } playlistController.data.timer = window.setTimeout(actions.next, 2000); } }, onstop: function() { utils.css.remove(dom.o, 'playing'); callback('stop'); }, onfinish: function() { var lastIndex, item; utils.css.remove(dom.o, 'playing'); dom.progress.style.left = '0%'; lastIndex = playlistController.data.selectedIndex; // next track? item = playlistController.getNext(); // don't play the same item over and over again, if at end of playlist etc. if (item && playlistController.data.selectedIndex !== lastIndex) { playlistController.select(item); setTitle(item); stopOtherSounds(); // play next this.play({ url: playlistController.getURL() }); }/* else { // explicitly stop? // this.stop(); }*/ } }); return sound; } function playLink(link) { // if a link is OK, play it. if (soundManager.canPlayURL(link.href)) { // if there's a timer due to failure to play one track, cancel it. // catches case when user may use previous/next after an error. if (playlistController.data.timer) { window.clearTimeout(playlistController.data.timer); playlistController.data.timer = null; } if (!soundObject) { soundObject = makeSound(link.href); } // required to reset pause/play state on iOS so whileplaying() works? odd. soundObject.stop(); playlistController.select(link.parentNode); // TODO: ancestor('li') setTitle(link.parentNode); // reset the UI // TODO: function that also resets/hides timing info. dom.progress.style.left = '0px'; dom.progressBar.style.width = '0px'; stopOtherSounds(); soundObject.play({ url: link.href, position: 0 }); } } function PlaylistController() { var data; data = { // list of nodes? playlist: [], // shuffledIndex: [], // selection selectedIndex: 0, // shuffleMode: false, loopMode: false, timer: null }; function getPlaylist() { return data.playlist; } function getItem(offset) { var list, item; // given the current selection (or an offset), return the current item. // if currently null, may be end of list case. bail. if (data.selectedIndex === null) { return offset; } list = getPlaylist(); // use offset if provided, otherwise take default selected. offset = (offset !== undefined ? offset : data.selectedIndex); // safety check - limit to between 0 and list length offset = Math.max(0, Math.min(offset, list.length)); item = list[offset]; return item; } function findOffsetFromItem(item) { // given an
  • item, find it in the playlist array and return the index. var list, i, j, offset; offset = -1; list = getPlaylist(); if (list) { for (i=0, j=list.length; i 1) { if (data.selectedIndex >= data.playlist.length) { if (data.loopMode) { // loop to beginning data.selectedIndex = 0; } else { // no change data.selectedIndex--; // end playback // data.selectedIndex = null; } } } else { data.selectedIndex = null; } return getItem(); } function getPrevious() { data.selectedIndex--; if (data.selectedIndex < 0) { // wrapping around beginning of list? loop or exit. if (data.loopMode) { data.selectedIndex = data.playlist.length - 1; } else { // undo data.selectedIndex++; } } return getItem(); } function resetLastSelected() { // remove UI highlight(s) on selected items. var items, i, j; items = utils.dom.getAll(dom.playlist, '.' + css.selected); for (i=0, j=items.length; i containerHeight + scrollTop) { // bottom-align dom.playlist.scrollTop = itemBottom - containerHeight + itemPadding; } else if (itemTop < scrollTop) { // top-align dom.playlist.scrollTop = item.offsetTop - itemPadding; } } // update selected offset, too. offset = findOffsetFromItem(item); data.selectedIndex = offset; } function playItemByOffset(offset) { var item; offset = (offset || 0); item = getItem(offset); if (item) { playLink(item.getElementsByTagName('a')[0]); } } function getURL() { // return URL of currently-selected item var item, url; item = getItem(); if (item) { url = item.getElementsByTagName('a')[0].href; } return url; } function refreshDOM() { // get / update playlist from DOM if (!dom.playlist) { if (window.console && console.warn) { console.warn('refreshDOM(): playlist node not found?'); } return false; } data.playlist = dom.playlist.getElementsByTagName('li'); } function initDOM() { dom.playlistTarget = utils.dom.get(dom.o, '.sm2-playlist-target'); dom.playlistContainer = utils.dom.get(dom.o, '.sm2-playlist-drawer'); dom.playlist = utils.dom.get(dom.o, '.sm2-playlist-bd'); } function init() { // inherit the default SM2 volume defaultVolume = soundManager.defaultOptions.volume; initDOM(); refreshDOM(); // animate playlist open, if HTML classname indicates so. if (utils.css.has(dom.o, css.playlistOpen)) { // hackish: run this after API has returned window.setTimeout(function() { actions.menu(true); }, 1); } } init(); return { data: data, refresh: refreshDOM, getNext: getNext, getPrevious: getPrevious, getItem: getItem, getURL: getURL, playItemByOffset: playItemByOffset, select: select }; } function isRightClick(e) { // only pay attention to left clicks. old IE differs where there's no e.which, but e.button is 1 on left click. if (e && ((e.which && e.which === 2) || (e.which === undefined && e.button !== 1))) { // http://www.quirksmode.org/js/events_properties.html#button return true; } } function getActionData(target) { // DOM measurements for volume slider if (!target) { return false; } actionData.volume.x = utils.position.getOffX(target); actionData.volume.y = utils.position.getOffY(target); actionData.volume.width = target.offsetWidth; actionData.volume.height = target.offsetHeight; // potentially dangerous: this should, but may not be a percentage-based value. actionData.volume.backgroundSize = parseInt(utils.style.get(target, 'background-size'), 10); // IE gives pixels even if background-size specified as % in CSS. Boourns. if (window.navigator.userAgent.match(/msie|trident/i)) { actionData.volume.backgroundSize = (actionData.volume.backgroundSize / actionData.volume.width) * 100; } } function handleMouseDown(e) { var links, target; target = e.target || e.srcElement; if (isRightClick(e)) { return true; } // normalize to , if applicable. if (target.nodeName.toLowerCase() !== 'a') { links = target.getElementsByTagName('a'); if (links && links.length) { target = target.getElementsByTagName('a')[0]; } } if (utils.css.has(target, 'sm2-volume-control')) { // drag case for volume getActionData(target); utils.events.add(document, 'mousemove', actions.adjustVolume); utils.events.add(document, 'mouseup', actions.releaseVolume); // and apply right away return actions.adjustVolume(e); } } function handleClick(e) { var evt, target, offset, targetNodeName, methodName, href, handled; evt = (e || window.event); target = evt.target || evt.srcElement; if (target && target.nodeName) { targetNodeName = target.nodeName.toLowerCase(); if (targetNodeName !== 'a') { // old IE (IE 8) might return nested elements inside the , eg., etc. Try to find the parent . if (target.parentNode) { do { target = target.parentNode; targetNodeName = target.nodeName.toLowerCase(); } while (targetNodeName !== 'a' && target.parentNode); if (!target) { // something went wrong. bail. return false; } } } if (targetNodeName === 'a') { // yep, it's a link. href = target.href; if (soundManager.canPlayURL(href)) { // not excluded if (!utils.css.has(target, playerOptions.excludeClass)) { // find this in the playlist playLink(target); handled = true; } } else { // is this one of the action buttons, eg., play/pause, volume, etc.? offset = target.href.lastIndexOf('#'); if (offset !== -1) { methodName = target.href.substr(offset+1); if (methodName && actions[methodName]) { handled = true; actions[methodName](e); } } } // fall-through case if (handled) { // prevent browser fall-through return utils.events.preventDefault(evt); } } } } function handleMouse(e) { var target, barX, barWidth, x, newPosition, sound; target = dom.progressTrack; barX = utils.position.getOffX(target); barWidth = target.offsetWidth; x = (e.clientX - barX); newPosition = (x / barWidth); sound = soundObject; if (sound && sound.duration) { sound.setPosition(sound.duration * newPosition); // a little hackish: ensure UI updates immediately with current position, even if audio is buffering and hasn't moved there yet. if (sound._iO && sound._iO.whileplaying) { sound._iO.whileplaying.apply(sound); } } if (e.preventDefault) { e.preventDefault(); } return false; } function releaseMouse(e) { utils.events.remove(document, 'mousemove', handleMouse); utils.css.remove(dom.o, 'grabbing'); utils.events.remove(document, 'mouseup', releaseMouse); utils.events.preventDefault(e); return false; } function init() { // init DOM? if (!playerNode) { console.warn('init(): No playerNode element?'); } dom.o = playerNode; // are we dealing with a crap browser? apply legacy CSS if so. if (window.navigator.userAgent.match(/msie [678]/i)) { utils.css.add(dom.o, css.legacy); } if (window.navigator.userAgent.match(/mobile/i)) { // majority of mobile devices don't let HTML5 audio set volume. utils.css.add(dom.o, css.noVolume); } dom.progress = utils.dom.get(dom.o, '.sm2-progress-ball'); dom.progressTrack = utils.dom.get(dom.o, '.sm2-progress-track'); dom.progressBar = utils.dom.get(dom.o, '.sm2-progress-bar'); dom.volume = utils.dom.get(dom.o, 'a.sm2-volume-control'); // measure volume control dimensions if (dom.volume) { getActionData(dom.volume); } dom.duration = utils.dom.get(dom.o, '.sm2-inline-duration'); dom.time = utils.dom.get(dom.o, '.sm2-inline-time'); playlistController = new PlaylistController(); defaultItem = playlistController.getItem(0); playlistController.select(defaultItem); setTitle(defaultItem); utils.events.add(dom.o, 'mousedown', handleMouseDown); utils.events.add(dom.o, 'click', handleClick); utils.events.add(dom.progressTrack, 'mousedown', function(e) { if (isRightClick(e)) { return true; } utils.css.add(dom.o, 'grabbing'); utils.events.add(document, 'mousemove', handleMouse); utils.events.add(document, 'mouseup', releaseMouse); return handleMouse(e); }); } // --- actionData = { volume: { x: 0, y: 0, width: 0, height: 0, backgroundSize: 0 } }; actions = { play: function(offsetOrEvent) { /** * This is an overloaded function that takes mouse/touch events or offset-based item indices. * Remember, "auto-play" will not work on mobile devices unless this function is called immediately from a touch or click event. * If you have the link but not the offset, you can also pass a fake event object with a target of an inside the playlist - e.g. { target: someMP3Link } */ var target, href, e; if (offsetOrEvent !== undefined && !isNaN(offsetOrEvent)) { // smells like a number. return playlistController.playItemByOffset(offsetOrEvent); } // DRY things a bit e = offsetOrEvent; if (e && e.target) { target = e.target || e.srcElement; href = target.href; } // haaaack - if null due to no event, OR '#' due to play/pause link, get first link from playlist if (!href || href.indexOf('#') !== -1) { href = dom.playlist.getElementsByTagName('a')[0].href; } if (!soundObject) { soundObject = makeSound(href); } // edge case: if the current sound is not playing, stop all others. if (!soundObject.playState) { stopOtherSounds(); } // TODO: if user pauses + unpauses a sound that had an error, try to play next? soundObject.togglePause(); // special case: clear "play next" timeout, if one exists. // edge case: user pauses after a song failed to load. if (soundObject.paused && playlistController.data.timer) { window.clearTimeout(playlistController.data.timer); playlistController.data.timer = null; } }, pause: function() { if (soundObject && soundObject.readyState) { soundObject.pause(); } }, resume: function() { if (soundObject && soundObject.readyState) { soundObject.resume(); } }, stop: function() { // just an alias for pause, really. // don't actually stop because that will mess up some UI state, i.e., dragging the slider. return actions.pause(); }, next: function(/* e */) { var item, lastIndex; // special case: clear "play next" timeout, if one exists. if (playlistController.data.timer) { window.clearTimeout(playlistController.data.timer); playlistController.data.timer = null; } lastIndex = playlistController.data.selectedIndex; item = playlistController.getNext(true); // don't play the same item again if (item && playlistController.data.selectedIndex !== lastIndex) { playLink(item.getElementsByTagName('a')[0]); } }, prev: function(/* e */) { var item, lastIndex; lastIndex = playlistController.data.selectedIndex; item = playlistController.getPrevious(); // don't play the same item again if (item && playlistController.data.selectedIndex !== lastIndex) { playLink(item.getElementsByTagName('a')[0]); } }, shuffle: function(e) { // NOTE: not implemented yet. var target = (e ? e.target || e.srcElement : utils.dom.get(dom.o, '.shuffle')); if (target && !utils.css.has(target, css.disabled)) { utils.css.toggle(target.parentNode, css.active); playlistController.data.shuffleMode = !playlistController.data.shuffleMode; } }, repeat: function(e) { var target = (e ? e.target || e.srcElement : utils.dom.get(dom.o, '.repeat')); if (target && !utils.css.has(target, css.disabled)) { utils.css.toggle(target.parentNode, css.active); playlistController.data.loopMode = !playlistController.data.loopMode; } }, menu: function(ignoreToggle) { var isOpen; isOpen = utils.css.has(dom.o, css.playlistOpen); // hackish: reset scrollTop in default first open case. odd, but some browsers have a non-zero scroll offset the first time the playlist opens. if (playlistController && !playlistController.data.selectedIndex && !firstOpen) { dom.playlist.scrollTop = 0; firstOpen = true; } // sniff out booleans from mouse events, as this is referenced directly by event handlers. if (typeof ignoreToggle !== 'boolean' || !ignoreToggle) { if (!isOpen) { jQuery(".sm2-bar-ui .sm2-inline-element:first-of-type").css('border-bottom-left-radius', '0px'); } if (isOpen) { jQuery(".sm2-bar-ui .sm2-inline-element:first-of-type").css('border-bottom-left-radius', '6px'); } if (!isOpen) { // explicitly set height:0, so the first closed -> open animation runs properly dom.playlistContainer.style.height = '0px'; } isOpen = utils.css.toggle(dom.o, css.playlistOpen); } // playlist dom.playlistContainer.style.height = (isOpen ? dom.playlistContainer.scrollHeight : 0) + 'px'; }, adjustVolume: function(e) { /** * NOTE: this is the mousemove() event handler version. * Use setVolume(50), etc., to assign volume directly. */ var backgroundMargin, pixelMargin, target, value, volume; value = 0; target = dom.volume; // safety net if (e === undefined) { return false; } if (!e || e.clientX === undefined) { // called directly or with a non-mouseEvent object, etc. // proxy to the proper method. if (arguments.length && window.console && window.console.warn) { console.warn('Bar UI: call setVolume(' + e + ') instead of adjustVolume(' + e + ').'); } return actions.setVolume.apply(this, arguments); } // based on getStyle() result // figure out spacing around background image based on background size, eg. 60% background size. // 60% wide means 20% margin on each side. backgroundMargin = (100 - actionData.volume.backgroundSize) / 2; // relative position of mouse over element value = Math.max(0, Math.min(1, (e.clientX - actionData.volume.x) / actionData.volume.width)); target.style.clip = 'rect(0px, ' + (actionData.volume.width * value) + 'px, ' + actionData.volume.height + 'px, ' + (actionData.volume.width * (backgroundMargin/100)) + 'px)'; // determine logical volume, including background margin pixelMargin = ((backgroundMargin/100) * actionData.volume.width); volume = Math.max(0, Math.min(1, ((e.clientX - actionData.volume.x) - pixelMargin) / (actionData.volume.width - (pixelMargin*2)))) * 100; // set volume if (soundObject) { soundObject.setVolume(volume); } defaultVolume = volume; return utils.events.preventDefault(e); }, releaseVolume: function(/* e */) { utils.events.remove(document, 'mousemove', actions.adjustVolume); utils.events.remove(document, 'mouseup', actions.releaseVolume); }, setVolume: function(volume) { // set volume (0-100) and update volume slider UI. var backgroundSize, backgroundMargin, backgroundOffset, target, from, to; if (volume === undefined || isNaN(volume)) { return; } if (dom.volume) { target = dom.volume; // based on getStyle() result backgroundSize = actionData.volume.backgroundSize; // figure out spacing around background image based on background size, eg. 60% background size. // 60% wide means 20% margin on each side. backgroundMargin = (100 - backgroundSize) / 2; // margin as pixel value relative to width backgroundOffset = actionData.volume.width * (backgroundMargin/100); from = backgroundOffset; to = from + ((actionData.volume.width - (backgroundOffset*2)) * (volume/100)); target.style.clip = 'rect(0px, ' + to + 'px, ' + actionData.volume.height + 'px, ' + from + 'px)'; } // apply volume to sound, as applicable if (soundObject) { soundObject.setVolume(volume); } defaultVolume = volume; } }; init(); // TODO: mixin actions -> exports exports = { // Per-instance events: window.sm2BarPlayers[0].on = { ... } etc. See global players.on example above for reference. on: null, actions: actions, dom: dom, playlistController: playlistController }; soundObject = makeSound(playlistController.getURL()); return exports; }; // barebones utilities for logic, CSS, DOM, events etc. utils = { array: (function() { function compare(property) { var result; return function(a, b) { if (a[property] < b[property]) { result = -1; } else if (a[property] > b[property]) { result = 1; } else { result = 0; } return result; }; } function shuffle(array) { // Fisher-Yates shuffle algo var i, j, temp; for (i = array.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i+1)); temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; } return { compare: compare, shuffle: shuffle }; }()), css: (function() { function hasClass(o, cStr) { return (o.className !== undefined ? new RegExp('(^|\\s)' + cStr + '(\\s|$)').test(o.className) : false); } function addClass(o, cStr) { if (!o || !cStr || hasClass(o, cStr)) { return false; // safety net } o.className = (o.className ? o.className + ' ' : '') + cStr; } function removeClass(o, cStr) { if (!o || !cStr || !hasClass(o, cStr)) { return false; } o.className = o.className.replace(new RegExp('( ' + cStr + ')|(' + cStr + ')', 'g'), ''); } function swapClass(o, cStr1, cStr2) { var tmpClass = { className: o.className }; removeClass(tmpClass, cStr1); addClass(tmpClass, cStr2); o.className = tmpClass.className; } function toggleClass(o, cStr) { var found, method; found = hasClass(o, cStr); method = (found ? removeClass : addClass); method(o, cStr); // indicate the new state... return !found; } return { has: hasClass, add: addClass, remove: removeClass, swap: swapClass, toggle: toggleClass }; }()), dom: (function() { function getAll(param1, param2) { var node, selector, results; if (arguments.length === 1) { // .selector case node = document.documentElement; // first param is actually the selector selector = param1; } else { // node, .selector node = param1; selector = param2; } // sorry, IE 7 users; IE 8+ required. if (node && node.querySelectorAll) { results = node.querySelectorAll(selector); } return results; } function get(/* parentNode, selector */) { var results = getAll.apply(this, arguments); // hackish: if an array, return the last item. if (results && results.length) { return results[results.length-1]; } // handle "not found" case return results && results.length === 0 ? null : results; } return { get: get, getAll: getAll }; }()), position: (function() { function getOffX(o) { // http://www.xs4all.nl/~ppk/js/findpos.html var curleft = 0; if (o.offsetParent) { while (o.offsetParent) { curleft += o.offsetLeft; o = o.offsetParent; } } else if (o.x) { curleft += o.x; } return curleft; } function getOffY(o) { // http://www.xs4all.nl/~ppk/js/findpos.html var curtop = 0; if (o.offsetParent) { while (o.offsetParent) { curtop += o.offsetTop; o = o.offsetParent; } } else if (o.y) { curtop += o.y; } return curtop; } return { getOffX: getOffX, getOffY: getOffY }; }()), style: (function() { function get(node, styleProp) { // http://www.quirksmode.org/dom/getstyles.html var value; if (node.currentStyle) { value = node.currentStyle[styleProp]; } else if (window.getComputedStyle) { value = document.defaultView.getComputedStyle(node, null).getPropertyValue(styleProp); } return value; } return { get: get }; }()), events: (function() { var add, remove, preventDefault; add = function(o, evtName, evtHandler) { // return an object with a convenient detach method. var eventObject = { detach: function() { return remove(o, evtName, evtHandler); } }; if (window.addEventListener) { o.addEventListener(evtName, evtHandler, false); } else { o.attachEvent('on' + evtName, evtHandler); } return eventObject; }; remove = (window.removeEventListener !== undefined ? function(o, evtName, evtHandler) { return o.removeEventListener(evtName, evtHandler, false); } : function(o, evtName, evtHandler) { return o.detachEvent('on' + evtName, evtHandler); }); preventDefault = function(e) { if (e.preventDefault) { e.preventDefault(); } else { e.returnValue = false; e.cancelBubble = true; } return false; }; return { add: add, preventDefault: preventDefault, remove: remove }; }()), features: (function() { var getAnimationFrame, localAnimationFrame, localFeatures, prop, styles, testDiv, transform; testDiv = document.createElement('div'); /** * hat tip: paul irish * http://paulirish.com/2011/requestanimationframe-for-smart-animating/ * https://gist.github.com/838785 */ localAnimationFrame = (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || null); // apply to window, avoid "illegal invocation" errors in Chrome getAnimationFrame = localAnimationFrame ? function() { return localAnimationFrame.apply(window, arguments); } : null; function has(prop) { // test for feature support var result = testDiv.style[prop]; return (result !== undefined ? prop : null); } // note local scope. localFeatures = { transform: { ie: has('-ms-transform'), moz: has('MozTransform'), opera: has('OTransform'), webkit: has('webkitTransform'), w3: has('transform'), prop: null // the normalized property value }, rotate: { has3D: false, prop: null }, getAnimationFrame: getAnimationFrame }; localFeatures.transform.prop = ( localFeatures.transform.w3 || localFeatures.transform.moz || localFeatures.transform.webkit || localFeatures.transform.ie || localFeatures.transform.opera ); function attempt(style) { try { testDiv.style[transform] = style; } catch(e) { // that *definitely* didn't work. return false; } // if we can read back the style, it should be cool. return !!testDiv.style[transform]; } if (localFeatures.transform.prop) { // try to derive the rotate/3D support. transform = localFeatures.transform.prop; styles = { css_2d: 'rotate(0deg)', css_3d: 'rotate3d(0,0,0,0deg)' }; if (attempt(styles.css_3d)) { localFeatures.rotate.has3D = true; prop = 'rotate3d'; } else if (attempt(styles.css_2d)) { prop = 'rotate'; } localFeatures.rotate.prop = prop; } testDiv = null; return localFeatures; }()) }; // --- // expose to global window.sm2BarPlayers = players; window.sm2BarPlayerOptions = playerOptions; window.SM2BarPlayer = Player; //if (playervars.autoplay == 1){ // //} }(window)); // source --> https://myworstinvestmentever.com/wp-content/plugins/simple-podcast-press/responsive_audio_player/js/sm_timestamp.js?ver=5.7.10 jQuery(document).ready(function ($) { $("a.spp-timestamp").click(function(){ var time = $(this).attr("time"); var listSoundIds = window.soundManager.soundIDs; var soundId = window.soundManager.soundIDs[0]; if (listSoundIds[0] == null) { $( ".sm2-inline-button")[0].click(); soundId = window.soundManager.soundIDs[0]; soundManager.getSoundById(soundId).setPosition(time*1000); } else if (soundManager.getSoundById(soundId).paused) { soundManager.getSoundById(soundId).setPosition(time*1000); setTimeout(function(){ soundManager.resume(soundId); },500); } // Either playing or never started else { $( ".sm2-inline-button")[0].click(); soundManager.resume(soundId); soundManager.getSoundById(soundId).setPosition(time*1000); } }); }); // source --> https://myworstinvestmentever.com/wp-content/plugins/simple-podcast-press/responsive_audio_player/js/transcript.js?ver=5.7.10 jQuery(document).ready(function ($) { $('.accordion-toggle').on('click', function(event){ event.preventDefault(); // create accordion variables var accordion = $(this); var accordionaccordion_content = accordion.next('.accordion-accordion_content'); var accordionToggleIcon = $(this).children('.toggle-icon'); // toggle accordion link open class accordion.toggleClass("open"); // toggle accordion accordion_content accordionaccordion_content.slideToggle(250); // change plus/minus icon if (accordion.hasClass("open")) { accordionToggleIcon.html(""); } else { accordionToggleIcon.html(""); } }); }); // source --> https://myworstinvestmentever.com/wp-content/plugins/simple-podcast-press/responsive_audio_player/js/jquery.webui-popover.min.js?ver=5.7.10 /* * webui popover plugin - v1.2.0 * A lightWeight popover plugin with jquery ,enchance the popover plugin of bootstrap with some awesome new features. It works well with bootstrap ,but bootstrap is not necessary! * https://github.com/sandywalker/webui-popover * * Made by Sandy Duan * Under MIT License */ !function(a,b,c){"use strict";function d(b,c){this.$element=a(b),c&&("string"===a.type(c.delay)||"number"===a.type(c.delay))&&(c.delay={show:c.delay,hide:c.delay}),this.options=a.extend({},h,c),this._defaults=h,this._name=e,this._targetclick=!1,this.init(),i.push(this.$element)}var e="webuiPopover",f="webui-popover",g="webui.popover",h={placement:"auto",width:"auto",height:"auto",trigger:"click",style:"",delay:{show:null,hide:null},async:{before:null,success:null},cache:!0,multi:!1,arrow:!0,title:"",content:"",closeable:!1,padding:!0,url:"",type:"html",animation:null,template:'
    x

     

    ',backdrop:!1,dismissible:!0,onShow:null,onHide:null,abortXHR:!0,autoHide:!1,offsetTop:0,offsetLeft:0},i=[],j=a('
    '),k=0,l=!1,m=-2e3,n=a(c),o=function(a,b){return isNaN(a)?b||0:Number(a)};d.prototype={init:function(){"click"===this.getTrigger()?this.$element.off("click touchend").on("click touchend",a.proxy(this.toggle,this)):"hover"===this.getTrigger()&&this.$element.off("mouseenter mouseleave click").on("mouseenter",a.proxy(this.mouseenterHandler,this)).on("mouseleave",a.proxy(this.mouseleaveHandler,this)),this._poped=!1,this._inited=!0,this._opened=!1,this._idSeed=k,this.options.backdrop&&j.appendTo(c.body).hide(),k++,"sticky"===this.getTrigger()&&this.show()},destroy:function(){for(var a=-1,b=0;b').attr("src",this.getUrl());break;case"html":try{this.content=a(this.getUrl()),this.content.is(":visible")||this.content.show()}catch(b){throw new Error("Unable to get popover content. Invalid selector specified.")}}else if(!this.content){var c="";if(c=a.isFunction(this.options.content)?this.options.content.apply(this.$element[0],[this]):this.options.content,this.content=this.$element.attr("data-content")||c,!this.content){var d=this.$element.next();d&&d.hasClass(f+"-content")&&(this.content=d)}}return this.content},setContent:function(a){var b=this.getTarget(),c=this.getContentElement();"string"==typeof a?c.html(a):a instanceof jQuery&&(a.removeClass(f+"-content"),c.html(""),a.appendTo(c)),this.$target=b},isAsync:function(){return"async"===this.options.type},setContentASync:function(b){var c=this;this.xhr||(this.xhr=a.ajax({url:this.getUrl(),type:"GET",cache:this.getCache(),beforeSend:function(a){c.options.async.before&&c.options.async.before(c,a)},success:function(d){c.bindBodyEvents(),c.content=b&&a.isFunction(b)?b.apply(c.$element[0],[d]):d,c.setContent(c.content);var e=c.getContentElement();e.removeAttr("style"),c.displayContent(),c.options.async.success&&c.options.async.success(c,d)},complete:function(){c.xhr=null}}))},bindBodyEvents:function(){this.options.dismissible&&"click"===this.getTrigger()&&!l&&(n.off("keyup.webui-popover").on("keyup.webui-popover",a.proxy(this.escapeHandler,this)),n.off("click.webui-popover touchend.webui-popover").on("click.webui-popover touchend.webui-popover",a.proxy(this.bodyClickHandler,this)))},mouseenterHandler:function(){var a=this;a._timeout&&clearTimeout(a._timeout),a._enterTimeout=setTimeout(function(){a.getTarget().is(":visible")||a.show()},this.getDelayShow())},mouseleaveHandler:function(){var a=this;clearTimeout(a._enterTimeout),a._timeout=setTimeout(function(){a.hide()},this.getHideDelay())},escapeHandler:function(a){27===a.keyCode&&this.hideAll()},bodyClickHandler:function(){l=!0,"click"===this.getTrigger()&&(this._targetclick?this._targetclick=!1:this.hideAll())},targetClickHandler:function(){this._targetclick=!0},initTargetEvents:function(){"hover"===this.getTrigger()&&this.$target.off("mouseenter mouseleave").on("mouseenter",a.proxy(this.mouseenterHandler,this)).on("mouseleave",a.proxy(this.mouseleaveHandler,this)),this.$target.find(".close").off("click").on("click",a.proxy(this.hide,this,!0)),this.$target.off("click.webui-popover").on("click.webui-popover",a.proxy(this.targetClickHandler,this))},getPlacement:function(a){var b,d=c.documentElement,e=c.body,f=d.clientWidth,g=d.clientHeight,h=Math.max(e.scrollTop,d.scrollTop),i=Math.max(e.scrollLeft,d.scrollLeft),j=Math.max(0,a.left-i),k=Math.max(0,a.top-h);b="function"==typeof this.options.placement?this.options.placement.call(this,this.getTarget()[0],this.$element[0]):this.$element.data("placement")||this.options.placement;var l="horizontal"===b,m="vertical"===b,n="auto"===b||l||m;return n?b=f/3>j?g/3>k?l?"right-bottom":"bottom-right":2*g/3>k?m?g/2>=k?"bottom-right":"top-right":"right":l?"right-top":"top-right":2*f/3>j?g/3>k?l?f/2>=j?"right-bottom":"left-bottom":"bottom":2*g/3>k?l?f/2>=j?"right":"left":g/2>=k?"bottom":"top":l?f/2>=j?"right-top":"left-top":"top":g/3>k?l?"left-bottom":"bottom-left":2*g/3>k?m?g/2>=k?"bottom-left":"top-left":"left":l?"left-top":"top-left":"auto-top"===b?b=f/3>j?"top-right":2*f/3>j?"top":"top-left":"auto-bottom"===b?b=f/3>j?"bottom-right":2*f/3>j?"bottom":"bottom-left":"auto-left"===b?b=g/3>k?"left-top":2*g/3>k?"left":"left-bottom":"auto-right"===b&&(b=g/3>k?"right-top":2*g/3>k?"right":"right-bottom"),b},getElementPosition:function(){return a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTargetPositin:function(a,b,d,e){var f=a,g=c.documentElement,h=c.body,i=g.clientWidth,j=g.clientHeight,k=this.$element.outerWidth(),l=this.$element.outerHeight(),n=Math.max(h.scrollTop,g.scrollTop),o=Math.max(h.scrollLeft,g.scrollLeft),p={},q=null,r=this.options.arrow?20:0,s=10,t=r+s>k?r:0,u=r+s>l?r:0,v=0,w=j+n,x=i+o,y=f.left+f.width/2-t>0,z=f.left+f.width/2+t0,B=f.top+f.height/2+u https://myworstinvestmentever.com/wp-content/plugins/simple-podcast-press/responsive_audio_player/js/clammrit.js?ver=5.7.10 function sppClammrIt(starttime,endtime, audio_file, chnale_image, post_title, post_content) { var sppCurrentTime = document.getElementsByClassName("audioplayer-time audioplayer-time-current"); var sppCurStartTime = starttime; var sppCurEndTime = endtime; var sppReferralName = 'SimplePodcastPress'; var p = sppCurStartTime.split(':'), s = 0, m = 1; while (p.length > 0) { s += m * parseInt(p.pop(), 10); m *= 60; } var p1 = sppCurEndTime.split(':'), s1 = 0, m1 = 1; while (p1.length > 0) { s1 += m1 * parseInt(p1.pop(), 10); m1 *= 60; } var sppCurStartTimeMs = s * 1000; var sppCurEndTimeMs = s1 * 1000; // var sppCurEndTimeMs = sppCurStartTimeMs + 24000; var clammrUrlEncoded = "https://www.clammr.com/app/clammr/crop"; clammrUrlEncoded += "?audioUrl=" + encodeURIComponent(audio_file); clammrUrlEncoded += "&imageUrl=" + encodeURIComponent(chnale_image); clammrUrlEncoded += "&audioStartTime=" + encodeURIComponent(sppCurStartTimeMs); clammrUrlEncoded += "&audioEndTime=" + encodeURIComponent(sppCurEndTimeMs); clammrUrlEncoded += "&title=" + post_title; clammrUrlEncoded += "&description=" + encodeURIComponent(post_content); clammrUrlEncoded += "&referralName=" + encodeURIComponent("SimplePodcastPress"); if (document.getElementsByClassName("sppaudioplayer").item(0) != null) jQuery('.sppaudioplayer').trigger("pause"); // SM players else if (window.soundManager) { var soundId = window.soundManager.soundIDs[0]; if (soundId != null) { soundManager.getSoundById(soundId).pause(); jQuery("div.smart-track-player").removeClass("spp-playing"); } } window.open(clammrUrlEncoded, 'cropPlugin', 'width=1000, height=750, top=50, left=200'); }; // source --> https://myworstinvestmentever.com/wp-content/plugins/simple-podcast-press/responsive_audio_player/js/jquery.reveal.js?ver=5.7.10 /* * jQuery Reveal Plugin 1.0 * www.ZURB.com * Copyright 2010, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function($) { /*--------------------------- Defaults for Reveal ----------------------------*/ /*--------------------------- Listener for data-reveal-id attributes ----------------------------*/ $('a[data-reveal-id]').live('click', function(e) { e.preventDefault(); var modalLocation = $(this).attr('data-reveal-id'); $('#'+modalLocation).reveal($(this).data()); }); /*--------------------------- Extend and Execute ----------------------------*/ $.fn.reveal = function(options) { var defaults = { animation: 'fadeAndPop', //fade, fadeAndPop, none animationspeed: 300, //how fast animtions are closeonbackgroundclick: true, //if you click background will modal close? dismissmodalclass: 'close-reveal-modal' //the class of a button or element that will close an open modal }; //Extend dem' options var options = $.extend({}, defaults, options); return this.each(function() { /*--------------------------- Global Variables ----------------------------*/ var modal = $(this), topMeasure = parseInt(modal.css('top')), topOffset = modal.height() + topMeasure, locked = false, modalBG = $('.reveal-modal-bg'); /*--------------------------- Create Modal BG ----------------------------*/ if(modalBG.length == 0) { modalBG = $('
    ').insertAfter(modal); } /*--------------------------- Open & Close Animations ----------------------------*/ //Entrance Animations modal.bind('reveal:open', function () { modalBG.unbind('click.modalEvent'); $('.' + options.dismissmodalclass).unbind('click.modalEvent'); if(!locked) { lockModal(); if(options.animation == "fadeAndPop") { modal.css({'top': $(document).scrollTop()-topOffset, 'opacity' : 0, 'visibility' : 'visible'}); modalBG.fadeIn(options.animationspeed/2); modal.delay(options.animationspeed/2).animate({ "top": $(document).scrollTop()+topMeasure + 'px', "opacity" : 1 }, options.animationspeed,unlockModal()); } if(options.animation == "fade") { modal.css({'opacity' : 0, 'visibility' : 'visible', 'top': $(document).scrollTop()+topMeasure}); modalBG.fadeIn(options.animationspeed/2); modal.delay(options.animationspeed/2).animate({ "opacity" : 1 }, options.animationspeed,unlockModal()); } if(options.animation == "none") { modal.css({'visibility' : 'visible', 'top':$(document).scrollTop()+topMeasure}); modalBG.css({"display":"block"}); unlockModal() } } modal.unbind('reveal:open'); }); //Closing Animation modal.bind('reveal:close', function () { if(!locked) { lockModal(); if(options.animation == "fadeAndPop") { modalBG.delay(options.animationspeed).fadeOut(options.animationspeed); modal.animate({ "top": $(document).scrollTop()-topOffset + 'px', "opacity" : 0 }, options.animationspeed/2, function() { modal.css({'top':topMeasure, 'opacity' : 1, 'visibility' : 'hidden'}); unlockModal(); }); } if(options.animation == "fade") { modalBG.delay(options.animationspeed).fadeOut(options.animationspeed); modal.animate({ "opacity" : 0 }, options.animationspeed, function() { modal.css({'opacity' : 1, 'visibility' : 'hidden', 'top' : topMeasure}); unlockModal(); }); } if(options.animation == "none") { modal.css({'visibility' : 'hidden', 'top' : topMeasure}); modalBG.css({'display' : 'none'}); } } modal.unbind('reveal:close'); }); /*--------------------------- Open and add Closing Listeners ----------------------------*/ //Open Modal Immediately modal.trigger('reveal:open') //Close Modal Listeners var closeButton = $('.' + options.dismissmodalclass).bind('click.modalEvent', function () { modal.trigger('reveal:close') }); if(options.closeonbackgroundclick) { modalBG.css({"cursor":"pointer"}) modalBG.bind('click.modalEvent', function () { modal.trigger('reveal:close') }); } $('body').keyup(function(e) { if(e.which===27){ modal.trigger('reveal:close'); } // 27 is the keycode for the Escape key }); /*--------------------------- Animations Locks ----------------------------*/ function unlockModal() { locked = false; } function lockModal() { locked = true; } });//each call }//orbit plugin call })(jQuery); // source --> https://myworstinvestmentever.com/wp-content/plugins/simple-podcast-press/responsive_audio_player/js/rotator.js?ver=5.7.10 jQuery(document).ready(function(){ jQuery(".reviews_view").each(function(){ var format = jQuery(this).attr("style"); if(format == 'slideshow'){ var obj = this; jQuery(this).find('li').css({"display":"none"}); jQuery(this).find('li').eq(0).css({"display":"block"}); setInterval(function(){ var count = jQuery(obj).children('li').length; var rand = Math.floor(Math.random()*count); var current = parseInt(jQuery(obj).attr("current"),10); jQuery(obj).find("li").eq(current).fadeOut("slow","linear",function(){ jQuery(obj).find("li").eq(rand).fadeIn("slow","linear",function(){ jQuery(obj).attr({"current":rand}); }); }); },10000); } }); }); // source --> https://myworstinvestmentever.com/wp-content/plugins/simple-social-icons/svgxuse.js?ver=1.1.21 /*! * @copyright Copyright (c) 2016 IcoMoon.io * @license Licensed under MIT license * See https://github.com/Keyamoon/svgxuse * @version 1.1.21 */ /*jslint browser: true */ /*global XDomainRequest, MutationObserver, window */ (function () { 'use strict'; if (window && window.addEventListener) { var cache = Object.create(null); // holds xhr objects to prevent multiple requests var checkUseElems; var tid; // timeout id var debouncedCheck = function () { clearTimeout(tid); tid = setTimeout(checkUseElems, 100); }; var unobserveChanges = function () { return; }; var observeChanges = function () { var observer; window.addEventListener('resize', debouncedCheck, false); window.addEventListener('orientationchange', debouncedCheck, false); if (window.MutationObserver) { observer = new MutationObserver(debouncedCheck); observer.observe(document.documentElement, { childList: true, subtree: true, attributes: true }); unobserveChanges = function () { try { observer.disconnect(); window.removeEventListener('resize', debouncedCheck, false); window.removeEventListener('orientationchange', debouncedCheck, false); } catch (ignore) {} }; } else { document.documentElement.addEventListener('DOMSubtreeModified', debouncedCheck, false); unobserveChanges = function () { document.documentElement.removeEventListener('DOMSubtreeModified', debouncedCheck, false); window.removeEventListener('resize', debouncedCheck, false); window.removeEventListener('orientationchange', debouncedCheck, false); }; } }; var createRequest = function (url) { // In IE 9, cross domain requests can only be sent using XDomainRequest. // XDomainRequest would fail if CORS headers are not set. // Therefore, XDomainRequest should only be used with cross domain requests. function getHostname(href) { var a = document.createElement('a'); a.href = href; return a.hostname; } var Request; var hname = location.hostname; var hname2; if (window.XMLHttpRequest) { Request = new XMLHttpRequest(); hname2 = getHostname(url); if (Request.withCredentials === undefined && hname2 !== '' && hname2 !== hname) { Request = XDomainRequest || undefined; } else { Request = XMLHttpRequest; } } return Request; }; var xlinkNS = 'http://www.w3.org/1999/xlink'; checkUseElems = function () { var base; var bcr; var fallback = ''; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found. var hash; var href; var i; var inProgressCount = 0; var isHidden; var Request; var url; var uses; var xhr; function observeIfDone() { // If done with making changes, start watching for chagnes in DOM again inProgressCount -= 1; if (inProgressCount === 0) { // if all xhrs were resolved unobserveChanges(); // make sure to remove old handlers observeChanges(); // watch for changes to DOM } } function attrUpdateFunc(spec) { return function () { if (cache[spec.base] !== true) { spec.useEl.setAttributeNS(xlinkNS, 'xlink:href', '#' + spec.hash); } }; } function onloadFunc(xhr) { return function () { var body = document.body; var x = document.createElement('x'); var svg; xhr.onload = null; x.innerHTML = xhr.responseText; svg = x.getElementsByTagName('svg')[0]; if (svg) { svg.setAttribute('aria-hidden', 'true'); svg.style.position = 'absolute'; svg.style.width = 0; svg.style.height = 0; svg.style.overflow = 'hidden'; body.insertBefore(svg, body.firstChild); } observeIfDone(); }; } function onErrorTimeout(xhr) { return function () { xhr.onerror = null; xhr.ontimeout = null; observeIfDone(); }; } unobserveChanges(); // stop watching for changes to DOM // find all use elements uses = document.getElementsByTagName('use'); for (i = 0; i < uses.length; i += 1) { try { bcr = uses[i].getBoundingClientRect(); } catch (ignore) { // failed to get bounding rectangle of the use element bcr = false; } href = uses[i].getAttributeNS(xlinkNS, 'href'); if (href && href.split) { url = href.split('#'); } else { url = ["", ""]; } base = url[0]; hash = url[1]; isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0; if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) { // the use element is empty // if there is a reference to an external SVG, try to fetch it // use the optional fallback URL if there is no reference to an external SVG if (fallback && !base.length && hash && !document.getElementById(hash)) { base = fallback; } if (base.length) { // schedule updating xlink:href xhr = cache[base]; if (xhr !== true) { // true signifies that prepending the SVG was not required setTimeout(attrUpdateFunc({ useEl: uses[i], base: base, hash: hash }), 0); } if (xhr === undefined) { Request = createRequest(base); if (Request !== undefined) { xhr = new Request(); cache[base] = xhr; xhr.onload = onloadFunc(xhr); xhr.onerror = onErrorTimeout(xhr); xhr.ontimeout = onErrorTimeout(xhr); xhr.open('GET', base); xhr.send(); inProgressCount += 1; } } } } else { if (!isHidden) { if (cache[base] === undefined) { // remember this URL if the use element was not empty and no request was sent cache[base] = true; } else if (cache[base].onload) { // if it turns out that prepending the SVG is not necessary, // abort the in-progress xhr. cache[base].abort(); delete cache[base].onload; cache[base] = true; } } else if (base.length && cache[base]) { attrUpdateFunc({ useEl: uses[i], base: base, hash: hash })(); } } } uses = ''; inProgressCount += 1; observeIfDone(); }; // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty. window.addEventListener('load', function winLoad() { window.removeEventListener('load', winLoad, false); // to prevent memory leaks tid = setTimeout(checkUseElems, 0); }, false); } }()); // source --> https://myworstinvestmentever.com/wp-includes/js/imagesloaded.min.js?ver=5.7.10 /*! This file is auto-generated */ /*! * imagesLoaded PACKAGED v4.1.4 * JavaScript is all like "You images are done yet or what?" * MIT License */ !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o