13 lines
74 KiB
JavaScript
13 lines
74 KiB
JavaScript
/*main.min and several others*/
|
|
!function(e){skel.breakpoints({desktop:"(min-width: 737px)",tablet:"(min-width: 737px) and (max-width: 1200px)",mobile:"(max-width: 736px)"}).viewport({breakpoints:{tablet:{width:1080}}}),e(function(){var a=e(window),i=e("body");i.addClass("is-loading"),a.on("load",function(){i.removeClass("is-loading")}),e("form").placeholder(),skel.on("+mobile -mobile",function(){e.prioritize(".important\\28 mobile\\29",skel.breakpoint("mobile").active)}),skel.vars.IEVersion<9&&e(":last-child").addClass("last-child"),e("#nav > ul").dropotron({mode:"fade",noOpenerFade:!0,hoverDelay:150,hideDelay:350}),e('<div id="titleBar"><a href="#navPanel" class="toggle"></a></div>').appendTo(i),e('<div id="navPanel"><nav>'+e("#nav").navList()+"</nav></div>").appendTo(i).panel({delay:500,hideOnClick:!0,hideOnSwipe:!0,resetScroll:!0,resetForms:!0,side:"left",target:i,visibleClass:"navPanel-visible"}),"wp"==skel.vars.os&&skel.vars.osVersion<10&&e("#titleBar, #navPanel, #page-wrapper").css("transition","none")})}(jQuery);
|
|
/*soundmaster2*/
|
|
!function(e,t){"use strict";function n(n,o){function i(e){return _e.preferFlash&&le&&!_e.ignoreFlash&&_e.flash[e]!==t&&_e.flash[e]}function a(e){return function(t){var n,o=this._s;return o&&o._a?n=e.call(this,t):(o&&o.id?_e._wD(o.id+": Ignoring "+t.type):_e._wD(be+"Ignoring "+t.type),n=null),n}}this.setupOptions={url:n||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,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,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=o||"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 s,r,l,u,d,f,h,c,p,m,_,g,y,w,v,b,O,D,M,L,T,P,S,F,I,H,A,E,C,k,R,x,N,U,B,j,W,q,V,Q,K,$,G,J,X,z,Z,Y,ee,te,ne,oe,ie,ae,se,re,le,ue,de,fe,he,ce,pe,me,_e=this,ge=null,ye=null,we="soundManager",ve=we+": ",be="HTML5::",Oe=navigator.userAgent,De=e.location.href.toString(),Me=document,Le=[],Te=!0,Pe=!1,Se=!1,Fe=!1,Ie=!1,He=!1,Ae=0,Ee=["log","info","warn","error"],Ce=8,ke=null,Re=null,xe=!1,Ne=!1,Ue=0,Be=null,je=[],We=null,qe=Array.prototype.slice,Ve=!1,Qe=0,Ke=1e3,$e=Oe.match(/(ipad|iphone|ipod)/i),Ge=Oe.match(/android/i),Je=Oe.match(/msie/i),Xe=Oe.match(/webkit/i),ze=Oe.match(/safari/i)&&!Oe.match(/chrome/i),Ze=Oe.match(/opera/i),Ye=Oe.match(/(mobile|pre\/|xoom)/i)||$e||Ge,et=!De.match(/usehtml5audio/i)&&!De.match(/sm2\-ignorebadua/i)&&ze&&!Oe.match(/silk/i)&&Oe.match(/OS X 10_6_([3-7])/i),tt=e.console!==t&&console.log!==t,nt=Me.hasFocus!==t?Me.hasFocus():null,ot=ze&&(Me.hasFocus===t||!Me.hasFocus()),it=!ot,at=/(mp3|mp4|mpa|m4a|m4b)/i,st="about:blank",rt="data:audio/wave;base64,/UklGRiYAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQIAAAD//w==",lt=Me.location?Me.location.protocol.match(/http/i):null,ut=lt?"":"http://",dt=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,ft=["mpeg4","aac","flv","mov","mp4","m4v","f4v","m4a","m4b","mp4v","3gp","3g2"],ht=new RegExp("\\.("+ft.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!lt,W={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.hasHTML5=function(){try{return Audio!==t&&(Ze&&opera!==t&&opera.version()<10?new Audio(null):new Audio).canPlayType!==t}catch(e){return!1}}(),this.setup=function(e){var n=!_e.url;return e!==t&&Fe&&We&&_e.ok()&&(e.flashVersion!==t||e.url!==t||e.html5Test!==t)&&K(U("setupLate")),_(e),Ve||(Ye?(!_e.setupOptions.ignoreMobileRestrictions||_e.setupOptions.forceUseGlobalHTML5Audio)&&(je.push(T.globalHTML5),Ve=!0):_e.setupOptions.forceUseGlobalHTML5Audio&&(je.push(T.globalHTML5),Ve=!0)),!me&&Ye&&(_e.setupOptions.ignoreMobileRestrictions?je.push(T.ignoreMobile):((!_e.setupOptions.useHTML5Audio||_e.setupOptions.preferFlash)&&_e._wD(T.mobileUA),_e.setupOptions.useHTML5Audio=!0,_e.setupOptions.preferFlash=!1,$e?_e.ignoreFlash=!0:(Ge&&!Oe.match(/android\s2\.3/i)||!Ge)&&(_e._wD(T.globalHTML5),Ve=!0))),e&&(n&&I&&e.url!==t&&_e.beginDelayedInit(),I||e.url===t||"complete"!==Me.readyState||setTimeout(S,1)),me=!0,_e},this.ok=function(){return We?Fe&&!Ie:_e.useHTML5Audio&&_e.hasHTML5},this.supported=this.ok,this.getMovie=function(t){return r(t)||Me[t]||e[t]},this.createSound=function(e,n){function o(){return r=V(r),_e.sounds[r.id]=new s(r),_e.soundIDs.push(r.id),_e.sounds[r.id]}var i,a,r,l=null;if(i=we+".createSound(): ",a=i+U(Fe?"notOK":"notReady"),!Fe||!_e.ok())return K(a),!1;if(n!==t&&(e={id:e,url:n}),r=m(e),r.url=z(r.url),r.id===t&&(r.id=_e.setupOptions.idPrefix+Qe++),r.id.toString().charAt(0).match(/^[0-9]$/)&&_e._wD(i+U("badID",r.id),2),_e._wD(i+r.id+(r.url?" ("+r.url+")":""),1),$(r.id,!0))return _e._wD(i+r.id+" exists",1),_e.sounds[r.id];if(ee(r))l=o(),_e.html5Only||_e._wD(r.id+": Using HTML5"),l._setup_html5(r);else{if(_e.html5Only)return _e._wD(r.id+": No HTML5 support for this sound, and no Flash. Exiting."),o();if(_e.html5.usingFlash&&r.url&&r.url.match(/data\:/i))return _e._wD(r.id+": data: URIs not supported via Flash. Exiting."),o();f>8&&(null===r.isMovieStar&&(r.isMovieStar=!!(r.serverURL||(r.type?r.type.match(dt):!1)||r.url&&r.url.match(ht))),r.isMovieStar&&(_e._wD(i+"using MovieStar handling"),r.loops>1&&c("noNSLoop"))),r=Q(r,i),l=o(),8===f?ye._createSound(r.id,r.loops||1,r.usePolicyFile):(ye._createSound(r.id,r.url,r.usePeakData,r.useWaveformData,r.useEQData,r.isMovieStar,r.isMovieStar?r.bufferTime:!1,r.loops||1,r.serverURL,r.duration||null,r.autoPlay,!0,r.autoLoad,r.usePolicyFile),r.serverURL||(l.connected=!0,r.onconnect&&r.onconnect.apply(l))),r.serverURL||!r.autoLoad&&!r.autoPlay||l.load(r)}return!r.serverURL&&r.autoPlay&&l.play(),l},this.destroySound=function(e,t){if(!$(e))return!1;var n,o=_e.sounds[e];for(o.stop(),o._iO={},o.unload(),n=0;n<_e.soundIDs.length;n++)if(_e.soundIDs[n]===e){_e.soundIDs.splice(n,1);break}return t||o.destruct(!0),o=null,delete _e.sounds[e],!0},this.load=function(e,t){return $(e)?_e.sounds[e].load(t):!1},this.unload=function(e){return $(e)?_e.sounds[e].unload():!1},this.onPosition=function(e,t,n,o){return $(e)?_e.sounds[e].onposition(t,n,o):!1},this.onposition=this.onPosition,this.clearOnPosition=function(e,t,n){return $(e)?_e.sounds[e].clearOnPosition(t,n):!1},this.play=function(e,t){var n=null,o=t&&!(t instanceof Object);if(!Fe||!_e.ok())return K(we+".play(): "+U(Fe?"notOK":"notReady")),!1;if($(e,o))o&&(t={url:t});else{if(!o)return!1;o&&(t={url:t}),t&&t.url&&(_e._wD(we+'.play(): Attempting to create "'+e+'"',1),t.id=e,n=_e.createSound(t).play())}return null===n&&(n=_e.sounds[e].play(t)),n},this.start=this.play,this.setPosition=function(e,t){return $(e)?_e.sounds[e].setPosition(t):!1},this.stop=function(e){return $(e)?(_e._wD(we+".stop("+e+")",1),_e.sounds[e].stop()):!1},this.stopAll=function(){var e;_e._wD(we+".stopAll()",1);for(e in _e.sounds)_e.sounds.hasOwnProperty(e)&&_e.sounds[e].stop()},this.pause=function(e){return $(e)?_e.sounds[e].pause():!1},this.pauseAll=function(){var e;for(e=_e.soundIDs.length-1;e>=0;e--)_e.sounds[_e.soundIDs[e]].pause()},this.resume=function(e){return $(e)?_e.sounds[e].resume():!1},this.resumeAll=function(){var e;for(e=_e.soundIDs.length-1;e>=0;e--)_e.sounds[_e.soundIDs[e]].resume()},this.togglePause=function(e){return $(e)?_e.sounds[e].togglePause():!1},this.setPan=function(e,t){return $(e)?_e.sounds[e].setPan(t):!1},this.setVolume=function(e,n){var o,i;{if(e===t||isNaN(e)||n!==t)return $(e)?_e.sounds[e].setVolume(n):!1;for(o=0,i=_e.soundIDs.length;i>o;o++)_e.sounds[_e.soundIDs[o]].setVolume(e)}},this.mute=function(e){var t=0;if(e instanceof String&&(e=null),e)return $(e)?(_e._wD(we+'.mute(): Muting "'+e+'"'),_e.sounds[e].mute()):!1;for(_e._wD(we+".mute(): Muting all sounds"),t=_e.soundIDs.length-1;t>=0;t--)_e.sounds[_e.soundIDs[t]].mute();return _e.muted=!0,!0},this.muteAll=function(){_e.mute()},this.unmute=function(e){var t;if(e instanceof String&&(e=null),e)return $(e)?(_e._wD(we+'.unmute(): Unmuting "'+e+'"'),_e.sounds[e].unmute()):!1;for(_e._wD(we+".unmute(): Unmuting all sounds"),t=_e.soundIDs.length-1;t>=0;t--)_e.sounds[_e.soundIDs[t]].unmute();return _e.muted=!1,!0},this.unmuteAll=function(){_e.unmute()},this.toggleMute=function(e){return $(e)?_e.sounds[e].toggleMute():!1},this.getMemoryUse=function(){var e=0;return ye&&8!==f&&(e=parseInt(ye._getMemoryUse(),10)),e},this.disable=function(n){var o;if(n===t&&(n=!1),Ie)return!1;for(Ie=!0,c("shutdown",1),o=_e.soundIDs.length-1;o>=0;o--)R(_e.sounds[_e.soundIDs[o]]);return p(n),se.remove(e,"load",v),!0},this.canPlayMIME=function(e){var t;return _e.hasHTML5&&(t=te({type:e})),!t&&We&&(t=e&&_e.ok()?!!((f>8?e.match(dt):null)||e.match(_e.mimePattern)):null),t},this.canPlayURL=function(e){var t;return _e.hasHTML5&&(t=te({url:e})),!t&&We&&(t=e&&_e.ok()?!!e.match(_e.filePattern):null),t},this.canPlayLink=function(e){return e.type!==t&&e.type&&_e.canPlayMIME(e.type)?!0:_e.canPlayURL(e.href)},this.getSoundById=function(e,t){if(!e)return null;var n=_e.sounds[e];return n||t||_e._wD(we+'.getSoundById(): Sound "'+e+'" not found.',2),n},this.onready=function(t,n){var o="onready",i=!1;if("function"!=typeof t)throw U("needFunction",o);return Fe&&_e._wD(U("queue",o)),n||(n=e),y(o,t,n),w(),i=!0,i},this.ontimeout=function(t,n){var o="ontimeout",i=!1;if("function"!=typeof t)throw U("needFunction",o);return Fe&&_e._wD(U("queue",o)),n||(n=e),y(o,t,n),w({type:o}),i=!0,i},this._writeDebug=function(e,n){var o,i,a="soundmanager-debug";return _e.setupOptions.debugMode?tt&&_e.useConsole&&(n&&"object"==typeof n?console.log(e,n):Ee[n]!==t?console[Ee[n]](e):console.log(e),_e.consoleOnly)?!0:(o=r(a))?(i=Me.createElement("div"),++Ae%2===0&&(i.className="sm2-alt"),n=n===t?0:parseInt(n,10),i.appendChild(Me.createTextNode(e)),n&&(n>=2&&(i.style.fontWeight="bold"),3===n&&(i.style.color="#ff3333")),o.insertBefore(i,o.firstChild),o=null,!0):!1:!1},-1!==De.indexOf("sm2-debug=alert")&&(this._writeDebug=function(t){e.alert(t)}),this._wD=this._writeDebug,this._debug=function(){var e,t;for(c("currentObj",1),e=0,t=_e.soundIDs.length;t>e;e++)_e.sounds[_e.soundIDs[e]]._debug()},this.reboot=function(t,n){_e.soundIDs.length&&_e._wD("Destroying "+_e.soundIDs.length+" SMSound object"+(1!==_e.soundIDs.length?"s":"")+"...");var o,i,a;for(o=_e.soundIDs.length-1;o>=0;o--)_e.sounds[_e.soundIDs[o]].destruct();if(ye)try{Je&&(Re=ye.innerHTML),ke=ye.parentNode.removeChild(ye)}catch(s){c("badRemove",2)}if(Re=ke=We=ye=null,_e.enabled=I=Fe=xe=Ne=Pe=Se=Ie=Ve=_e.swfLoaded=!1,_e.soundIDs=[],_e.sounds={},Qe=0,me=!1,t)Le=[];else for(o in Le)if(Le.hasOwnProperty(o))for(i=0,a=Le[o].length;a>i;i++)Le[o][i].fired=!1;return n||_e._wD(we+": Rebooting..."),_e.html5={usingFlash:null},_e.flash={},_e.html5Only=!1,_e.ignoreFlash=!1,e.setTimeout(function(){n||_e.beginDelayedInit()},20),_e},this.reset=function(){return c("reset"),_e.reboot(!0,!0)},this.getMoviePercent=function(){return ye&&"PercentLoaded"in ye?ye.PercentLoaded():null},this.beginDelayedInit=function(){He=!0,S(),setTimeout(function(){return Ne?!1:(A(),P(),Ne=!0,!0)},20),b()},this.destruct=function(){_e._wD(we+".destruct()"),_e.disable(!0)},s=function(e){var n,o,i,a,s,r,l,u,d,p,_=this,g=!1,y=[],w=0,v=null;d={duration:null,time:null},this.id=e.id,this.sID=this.id,this.url=e.url,this.options=m(e),this.instanceOptions=this.options,this._iO=this.instanceOptions,this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,p=this.url?!1:!0,this.id3={},this._debug=function(){_e._wD(_.id+": Merged options:",_.options)},this.load=function(e){var n,o=null;if(e!==t?_._iO=m(e,_.options):(e=_.options,_._iO=e,v&&v!==_.url&&(c("manURL"),_._iO.url=_.url,_.url=null)),_._iO.url||(_._iO.url=_.url),_._iO.url=z(_._iO.url),_.instanceOptions=_._iO,n=_._iO,_e._wD(_.id+": load ("+n.url+")"),!n.url&&!_.url)return _e._wD(_.id+": load(): url is unassigned. Exiting.",2),_;if(_.isHTML5||8!==f||_.url||n.autoPlay||_e._wD(_.id+": Flash 8 load() limitation: Wait for onload() before calling play().",1),n.url===_.url&&0!==_.readyState&&2!==_.readyState)return c("onURL",1),3===_.readyState&&n.onload&&pe(_,function(){n.onload.apply(_,[!!_.duration])}),_;if(_.loaded=!1,_.readyState=1,_.playState=0,_.id3={},ee(n))o=_._setup_html5(n),o._called_load?_e._wD(_.id+": Ignoring request to load again"):(_._html5_canplay=!1,_.url!==n.url&&(_e._wD(c("manURL")+": "+n.url),_._a.src=n.url,_.setPosition(0)),_._a.autobuffer="auto",_._a.preload="auto",_._a._called_load=!0);else{if(_e.html5Only)return _e._wD(_.id+": No flash support. Exiting."),_;if(_._iO.url&&_._iO.url.match(/data\:/i))return _e._wD(_.id+": data: URIs not supported via Flash. Exiting."),_;try{_.isHTML5=!1,_._iO=Q(V(n)),_._iO.autoPlay&&(_._iO.position||_._iO.from)&&(_e._wD(_.id+": Disabling autoPlay because of non-zero offset case"),_._iO.autoPlay=!1),n=_._iO,8===f?ye._load(_.id,n.url,n.stream,n.autoPlay,n.usePolicyFile):ye._load(_.id,n.url,!!n.stream,!!n.autoPlay,n.loops||1,!!n.autoLoad,n.usePolicyFile)}catch(i){c("smError",2),h("onload",!1),E({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return _.url=n.url,_},this.unload=function(){return 0!==_.readyState&&(_e._wD(_.id+": unload()"),_.isHTML5?(a(),_._a&&(_._a.pause(),v=oe(_._a))):8===f?ye._unload(_.id,st):ye._unload(_.id),n()),_},this.destruct=function(e){_e._wD(_.id+": Destruct"),_.isHTML5?(a(),_._a&&(_._a.pause(),oe(_._a),Ve||i(),_._a._s=null,_._a=null)):(_._iO.onfailure=null,ye._destroySound(_.id)),e||_e.destroySound(_.id,!0)},this.play=function(e,n){var o,i,a,l,d,h,c,y=!0,w=null;if(o=_.id+": play(): ",n=n===t?!0:n,e||(e={}),_.url&&(_._iO.url=_.url),_._iO=m(_._iO,_.options),_._iO=m(e,_._iO),_._iO.url=z(_._iO.url),_.instanceOptions=_._iO,!_.isHTML5&&_._iO.serverURL&&!_.connected)return _.getAutoPlay()||(_e._wD(o+" Netstream not connected yet - setting autoPlay"),_.setAutoPlay(!0)),_;if(ee(_._iO)&&(_._setup_html5(_._iO),s()),1!==_.playState||_.paused||(i=_._iO.multiShot,i?_e._wD(o+"Already playing (multi-shot)",1):(_e._wD(o+"Already playing (one-shot)",1),_.isHTML5&&_.setPosition(_._iO.position),w=_)),null!==w)return w;if(e.url&&e.url!==_.url&&(_.readyState||_.isHTML5||8!==f||!p?_.load(_._iO):p=!1),_.loaded?_e._wD(o.substr(0,o.lastIndexOf(":"))):0===_.readyState?(_e._wD(o+"Attempting to load"),_.isHTML5||_e.html5Only?_.isHTML5?_.load(_._iO):(_e._wD(o+"Unsupported type. Exiting."),w=_):(_._iO.autoPlay=!0,_.load(_._iO)),_.instanceOptions=_._iO):2===_.readyState?(_e._wD(o+"Could not load - exiting",2),w=_):_e._wD(o+"Loading - attempting to play..."),null!==w)return w;if(!_.isHTML5&&9===f&&_.position>0&&_.position===_.duration&&(_e._wD(o+"Sound at end, resetting to position: 0"),e.position=0),_.paused&&_.position>=0&&(!_._iO.serverURL||_.position>0))_e._wD(o+"Resuming from paused state",1),_.resume();else{if(_._iO=m(e,_._iO),(!_.isHTML5&&null!==_._iO.position&&_._iO.position>0||null!==_._iO.from&&_._iO.from>0||null!==_._iO.to)&&0===_.instanceCount&&0===_.playState&&!_._iO.serverURL){if(l=function(){_._iO=m(e,_._iO),_.play(_._iO)},_.isHTML5&&!_._html5_canplay?(_e._wD(o+"Beginning load for non-zero offset case"),_.load({_oncanplay:l}),w=!1):_.isHTML5||_.loaded||_.readyState&&2===_.readyState||(_e._wD(o+"Preloading for non-zero offset case"),_.load({onload:l}),w=!1),null!==w)return w;_._iO=u()}(!_.instanceCount||_._iO.multiShotEvents||_.isHTML5&&_._iO.multiShot&&!Ve||!_.isHTML5&&f>8&&!_.getAutoPlay())&&_.instanceCount++,_._iO.onposition&&0===_.playState&&r(_),_.playState=1,_.paused=!1,_.position=_._iO.position===t||isNaN(_._iO.position)?0:_._iO.position,_.isHTML5||(_._iO=Q(V(_._iO))),_._iO.onplay&&n&&(_._iO.onplay.apply(_),g=!0),_.setVolume(_._iO.volume,!0),_.setPan(_._iO.pan,!0),_.isHTML5?_.instanceCount<2?(s(),a=_._setup_html5(),_.setPosition(_._iO.position),a.play()):(_e._wD(_.id+": Cloning Audio() for instance #"+_.instanceCount+"..."),d=new Audio(_._iO.url),h=function(){se.remove(d,"ended",h),_._onfinish(_),oe(d),d=null},c=function(){se.remove(d,"canplay",c);try{d.currentTime=_._iO.position/Ke}catch(e){K(_.id+": multiShot play() failed to apply position of "+_._iO.position/Ke)}d.play()},se.add(d,"ended",h),_._iO.volume!==t&&(d.volume=Math.max(0,Math.min(1,_._iO.volume/100))),_.muted&&(d.muted=!0),_._iO.position?se.add(d,"canplay",c):d.play()):(y=ye._start(_.id,_._iO.loops||1,9===f?_.position:_.position/Ke,_._iO.multiShot||!1),9!==f||y||(_e._wD(o+"No sound hardware, or 32-sound ceiling hit",2),_._iO.onplayerror&&_._iO.onplayerror.apply(_)))}return _},this.start=this.play,this.stop=function(e){var t,n=_._iO;return 1===_.playState&&(_e._wD(_.id+": stop()"),_._onbufferchange(0),_._resetOnPosition(0),_.paused=!1,_.isHTML5||(_.playState=0),l(),n.to&&_.clearOnPosition(n.to),_.isHTML5?_._a&&(t=_.position,_.setPosition(0),_.position=t,_._a.pause(),_.playState=0,_._onTimer(),a()):(ye._stop(_.id,e),n.serverURL&&_.unload()),_.instanceCount=0,_._iO={},n.onstop&&n.onstop.apply(_)),_},this.setAutoPlay=function(e){_e._wD(_.id+": Autoplay turned "+(e?"on":"off")),_._iO.autoPlay=e,_.isHTML5||(ye._setAutoPlay(_.id,e),e&&(_.instanceCount||1!==_.readyState||(_.instanceCount++,_e._wD(_.id+": Incremented instance count to "+_.instanceCount))))},this.getAutoPlay=function(){return _._iO.autoPlay},this.setPosition=function(e){e===t&&(e=0);var n,o,i=_.isHTML5?Math.max(e,0):Math.min(_.duration||_._iO.duration,Math.max(e,0));if(_.position=i,o=_.position/Ke,_._resetOnPosition(_.position),_._iO.position=i,_.isHTML5){if(_._a){if(_._html5_canplay){if(_._a.currentTime!==o){_e._wD(_.id+": setPosition("+o+")");try{_._a.currentTime=o,(0===_.playState||_.paused)&&_._a.pause()}catch(a){_e._wD(_.id+": setPosition("+o+") failed: "+a.message,2)}}}else if(o)return _e._wD(_.id+": setPosition("+o+"): Cannot seek yet, sound not ready",2),_;_.paused&&_._onTimer(!0)}}else n=9===f?_.position:o,_.readyState&&2!==_.readyState&&ye._setPosition(_.id,n,_.paused||!_.playState,_._iO.multiShot);return _},this.pause=function(e){return _.paused||0===_.playState&&1!==_.readyState?_:(_e._wD(_.id+": pause()"),_.paused=!0,_.isHTML5?(_._setup_html5().pause(),a()):(e||e===t)&&ye._pause(_.id,_._iO.multiShot),_._iO.onpause&&_._iO.onpause.apply(_),_)},this.resume=function(){var e=_._iO;return _.paused?(_e._wD(_.id+": resume()"),_.paused=!1,_.playState=1,_.isHTML5?(_._setup_html5().play(),s()):(e.isMovieStar&&!e.serverURL&&_.setPosition(_.position),ye._pause(_.id,e.multiShot)),!g&&e.onplay?(e.onplay.apply(_),g=!0):e.onresume&&e.onresume.apply(_),_):_},this.togglePause=function(){return _e._wD(_.id+": togglePause()"),0===_.playState?(_.play({position:9!==f||_.isHTML5?_.position/Ke:_.position}),_):(_.paused?_.resume():_.pause(),_)},this.setPan=function(e,n){return e===t&&(e=0),n===t&&(n=!1),_.isHTML5||ye._setPan(_.id,e),_._iO.pan=e,n||(_.pan=e,_.options.pan=e),_},this.setVolume=function(e,n){return e===t&&(e=100),n===t&&(n=!1),_.isHTML5?_._a&&(_e.muted&&!_.muted&&(_.muted=!0,_._a.muted=!0),_._a.volume=Math.max(0,Math.min(1,e/100))):ye._setVolume(_.id,_e.muted&&!_.muted||_.muted?0:e),_._iO.volume=e,n||(_.volume=e,_.options.volume=e),_},this.mute=function(){return _.muted=!0,_.isHTML5?_._a&&(_._a.muted=!0):ye._setVolume(_.id,0),_},this.unmute=function(){_.muted=!1;var e=_._iO.volume!==t;return _.isHTML5?_._a&&(_._a.muted=!1):ye._setVolume(_.id,e?_._iO.volume:_.options.volume),_},this.toggleMute=function(){return _.muted?_.unmute():_.mute()},this.onPosition=function(e,n,o){return y.push({position:parseInt(e,10),method:n,scope:o!==t?o:_,fired:!1}),_},this.onposition=this.onPosition,this.clearOnPosition=function(e,t){var n;if(e=parseInt(e,10),isNaN(e))return!1;for(n=0;n<y.length;n++)e===y[n].position&&(t&&t!==y[n].method||(y[n].fired&&w--,y.splice(n,1)))},this._processOnPosition=function(){var e,t,n=y.length;if(!n||!_.playState||w>=n)return!1;for(e=n-1;e>=0;e--)t=y[e],!t.fired&&_.position>=t.position&&(t.fired=!0,w++,t.method.apply(t.scope,[t.position]),n=y.length);return!0},this._resetOnPosition=function(e){var t,n,o=y.length;if(!o)return!1;for(t=o-1;t>=0;t--)n=y[t],n.fired&&e<=n.position&&(n.fired=!1,w--);return!0},u=function(){var e,t,n=_._iO,o=n.from,i=n.to;return t=function(){_e._wD(_.id+': "To" time of '+i+" reached."),_.clearOnPosition(i,t),_.stop()},e=function(){_e._wD(_.id+': Playing "from" '+o),null===i||isNaN(i)||_.onPosition(i,t)},null===o||isNaN(o)||(n.position=o,n.multiShot=!1,e()),n},r=function(){var e,t=_._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&_.onPosition(parseInt(e,10),t[e])},l=function(){var e,t=_._iO.onposition;if(t)for(e in t)t.hasOwnProperty(e)&&_.clearOnPosition(parseInt(e,10))},s=function(){_.isHTML5&&G(_)},a=function(){_.isHTML5&&J(_)},n=function(e){e||(y=[],w=0),g=!1,_._hasTimer=null,_._a=null,_._html5_canplay=!1,_.bytesLoaded=null,_.bytesTotal=null,_.duration=_._iO&&_._iO.duration?_._iO.duration:null,_.durationEstimate=null,_.buffered=[],_.eqData=[],_.eqData.left=[],_.eqData.right=[],_.failures=0,_.isBuffering=!1,_.instanceOptions={},_.instanceCount=0,_.loaded=!1,_.metadata={},_.readyState=0,_.muted=!1,_.paused=!1,_.peakData={left:0,right:0},_.waveformData={left:[],right:[]},_.playState=0,_.position=null,_.id3={}},n(),this._onTimer=function(e){var t,n,o=!1,i={};return _._hasTimer||e?(_._a&&(e||(_.playState>0||1===_.readyState)&&!_.paused)&&(t=_._get_html5_duration(),t!==d.duration&&(d.duration=t,_.duration=t,o=!0),_.durationEstimate=_.duration,n=_._a.currentTime*Ke||0,n!==d.time&&(d.time=n,o=!0),(o||e)&&_._whileplaying(n,i,i,i,i)),o):void 0},this._get_html5_duration=function(){var e=_._iO,t=_._a&&_._a.duration?_._a.duration*Ke:e&&e.duration?e.duration:null,n=t&&!isNaN(t)&&t!==1/0?t:null;return n},this._apply_loop=function(e,t){!e.loop&&t>1&&_e._wD("Note: Native HTML5 looping is infinite.",1),e.loop=t>1?"loop":""},this._setup_html5=function(e){var t,i=m(_._iO,e),a=Ve?ge:_._a,s=decodeURI(i.url);if(Ve?s===decodeURI(re)&&(t=!0):s===decodeURI(v)&&(t=!0),a){if(a._s)if(Ve)a._s&&a._s.playState&&!t&&a._s.stop();else if(!Ve&&s===decodeURI(v))return _._apply_loop(a,i.loops),a;t||(v&&n(!1),a.src=i.url,_.url=i.url,v=i.url,re=i.url,a._called_load=!1)}else i.autoLoad||i.autoPlay?(_._a=new Audio(i.url),_._a.load()):_._a=Ze&&opera.version()<10?new Audio(null):new Audio,a=_._a,a._called_load=!1,Ve&&(ge=a);return _.isHTML5=!0,_._a=a,a._s=_,o(),_._apply_loop(a,i.loops),i.autoLoad||i.autoPlay?_.load():(a.autobuffer=!1,a.preload="auto"),a},o=function(){function e(e,t,n){return _._a?_._a.addEventListener(e,t,n||!1):null}if(_._a._added_events)return!1;var t;_._a._added_events=!0;for(t in fe)fe.hasOwnProperty(t)&&e(t,fe[t]);return!0},i=function(){function e(e,t,n){return _._a?_._a.removeEventListener(e,t,n||!1):null}var t;_e._wD(_.id+": Removing event listeners"),_._a._added_events=!1;for(t in fe)fe.hasOwnProperty(t)&&e(t,fe[t])},this._onload=function(e){var t,n=!!e||!_.isHTML5&&8===f&&_.duration;return t=_.id+": ",_e._wD(t+(n?"onload()":"Failed to load / invalid sound?"+(_.duration?" -":" Zero-length duration reported.")+" ("+_.url+")"),n?1:2),n||_.isHTML5||(_e.sandbox.noRemote===!0&&_e._wD(t+U("noNet"),1),_e.sandbox.noLocal===!0&&_e._wD(t+U("noLocal"),1)),_.loaded=n,_.readyState=n?3:2,_._onbufferchange(0),_._iO.onload&&pe(_,function(){_._iO.onload.apply(_,[n])}),!0},this._onbufferchange=function(e){return 0===_.playState?!1:e&&_.isBuffering||!e&&!_.isBuffering?!1:(_.isBuffering=1===e,_._iO.onbufferchange&&(_e._wD(_.id+": Buffer state change: "+e),_._iO.onbufferchange.apply(_,[e])),!0)},this._onsuspend=function(){return _._iO.onsuspend&&(_e._wD(_.id+": Playback suspended"),_._iO.onsuspend.apply(_)),!0},this._onfailure=function(e,t,n){_.failures++,_e._wD(_.id+": Failure ("+_.failures+"): "+e),_._iO.onfailure&&1===_.failures?_._iO.onfailure(e,t,n):_e._wD(_.id+": Ignoring failure")},this._onwarning=function(e,t,n){_._iO.onwarning&&_._iO.onwarning(e,t,n)},this._onfinish=function(){var e=_._iO.onfinish;_._onbufferchange(0),_._resetOnPosition(0),_.instanceCount&&(_.instanceCount--,_.instanceCount||(l(),_.playState=0,_.paused=!1,_.instanceCount=0,_.instanceOptions={},_._iO={},a(),_.isHTML5&&(_.position=0)),(!_.instanceCount||_._iO.multiShotEvents)&&e&&(_e._wD(_.id+": onfinish()"),pe(_,function(){e.apply(_)})))},this._whileloading=function(e,t,n,o){var i=_._iO;_.bytesLoaded=e,_.bytesTotal=t,_.duration=Math.floor(n),_.bufferLength=o,_.isHTML5||i.isMovieStar?_.durationEstimate=_.duration:i.duration?_.durationEstimate=_.duration>i.duration?_.duration:i.duration:_.durationEstimate=parseInt(_.bytesTotal/_.bytesLoaded*_.duration,10),_.isHTML5||(_.buffered=[{start:0,end:_.duration}]),(3!==_.readyState||_.isHTML5)&&i.whileloading&&i.whileloading.apply(_)},this._whileplaying=function(e,n,o,i,a){var s,r=_._iO;return isNaN(e)||null===e?!1:(_.position=Math.max(0,e),_._processOnPosition(),!_.isHTML5&&f>8&&(r.usePeakData&&n!==t&&n&&(_.peakData={left:n.leftPeak,right:n.rightPeak}),r.useWaveformData&&o!==t&&o&&(_.waveformData={left:o.split(","),right:i.split(",")}),r.useEQData&&a!==t&&a&&a.leftEQ&&(s=a.leftEQ.split(","),_.eqData=s,_.eqData.left=s,a.rightEQ!==t&&a.rightEQ&&(_.eqData.right=a.rightEQ.split(",")))),1===_.playState&&(_.isHTML5||8!==f||_.position||!_.isBuffering||_._onbufferchange(0),r.whileplaying&&r.whileplaying.apply(_)),!0)},this._oncaptiondata=function(e){_e._wD(_.id+": Caption data received."),_.captiondata=e,_._iO.oncaptiondata&&_._iO.oncaptiondata.apply(_,[e])},this._onmetadata=function(e,t){_e._wD(_.id+": Metadata received.");var n,o,i={};for(n=0,o=e.length;o>n;n++)i[e[n]]=t[n];_.metadata=i,_._iO.onmetadata&&_._iO.onmetadata.call(_,_.metadata)},this._onid3=function(e,t){_e._wD(_.id+": ID3 data received.");var n,o,i=[];for(n=0,o=e.length;o>n;n++)i[e[n]]=t[n];_.id3=m(_.id3,i),_._iO.onid3&&_._iO.onid3.apply(_)},this._onconnect=function(e){e=1===e,_e._wD(_.id+": "+(e?"Connected.":"Failed to connect? - "+_.url),e?1:2),_.connected=e,e&&(_.failures=0,$(_.id)&&(_.getAutoPlay()?_.play(t,_.getAutoPlay()):_._iO.autoLoad&&_.load()),_._iO.onconnect&&_._iO.onconnect.apply(_,[e]))},this._ondataerror=function(e){_.playState>0&&(_e._wD(_.id+": Data error: "+e),_._iO.ondataerror&&_._iO.ondataerror.apply(_))},this._debug()},H=function(){return Me.body||Me.getElementsByTagName("div")[0]},r=function(e){return Me.getElementById(e)},m=function(e,n){var o,i,a=e||{};o=n===t?_e.defaultOptions:n;for(i in o)o.hasOwnProperty(i)&&a[i]===t&&("object"!=typeof o[i]||null===o[i]?a[i]=o[i]:a[i]=m(a[i],o[i]));return a},pe=function(t,n){t.isHTML5||8!==f?n():e.setTimeout(n,0)},g={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},_=function(e,n){var o,i=!0,a=n!==t,s=_e.setupOptions,r=g;if(e===t){i=[];for(o in s)s.hasOwnProperty(o)&&i.push(o);for(o in r)r.hasOwnProperty(o)&&("object"==typeof _e[o]?i.push(o+": {...}"):_e[o]instanceof Function?i.push(o+": function() {...}"):i.push(o));return _e._wD(U("setup",i.join(", "))),!1}for(o in e)if(e.hasOwnProperty(o))if("object"!=typeof e[o]||null===e[o]||e[o]instanceof Array||e[o]instanceof RegExp)a&&r[n]!==t?_e[n][o]=e[o]:s[o]!==t?(_e.setupOptions[o]=e[o],_e[o]=e[o]):r[o]===t?(K(U(_e[o]===t?"setupUndef":"setupError",o),2),i=!1):_e[o]instanceof Function?_e[o].apply(_e,e[o]instanceof Array?e[o]:[e[o]]):_e[o]=e[o];else{if(r[o]!==t)return _(e[o],o);K(U(_e[o]===t?"setupUndef":"setupError",o),2),i=!1}return i},se=function(){function t(e){var t=qe.call(e),n=t.length;return a?(t[1]="on"+t[1],n>3&&t.pop()):3===n&&t.push(!1),t}function n(e,t){var n=e.shift(),o=[s[t]];a?n[o](e[0],e[1]):n[o].apply(n,e)}function o(){n(t(arguments),"add")}function i(){n(t(arguments),"remove")}var a=e.attachEvent,s={add:a?"attachEvent":"addEventListener",remove:a?"detachEvent":"removeEventListener"};return{add:o,remove:i}}(),fe={abort:a(function(){_e._wD(this._s.id+": abort")}),canplay:a(function(){var e,n=this._s;if(n._html5_canplay)return!0;if(n._html5_canplay=!0,_e._wD(n.id+": canplay"),n._onbufferchange(0),e=n._iO.position===t||isNaN(n._iO.position)?null:n._iO.position/Ke,this.currentTime!==e){_e._wD(n.id+": canplay: Setting position to "+e);try{this.currentTime=e}catch(o){_e._wD(n.id+": canplay: Setting position of "+e+" failed: "+o.message,2)}}n._iO._oncanplay&&n._iO._oncanplay()}),canplaythrough:a(function(){var e=this._s;e.loaded||(e._onbufferchange(0),e._whileloading(e.bytesLoaded,e.bytesTotal,e._get_html5_duration()),e._onload(!0))}),durationchange:a(function(){var e,t=this._s;e=t._get_html5_duration(),isNaN(e)||e===t.duration||(_e._wD(this._s.id+": durationchange ("+e+")"+(t.duration?", previously "+t.duration:"")),t.durationEstimate=t.duration=e)}),ended:a(function(){var e=this._s;_e._wD(e.id+": ended"),e._onfinish()}),error:a(function(){_e._wD(this._s.id+": HTML5 error, code "+this.error.code),this._s._onload(!1)}),loadeddata:a(function(){var e=this._s;_e._wD(e.id+": loadeddata"),e._loaded||ze||(e.duration=e._get_html5_duration())}),loadedmetadata:a(function(){_e._wD(this._s.id+": loadedmetadata")}),loadstart:a(function(){_e._wD(this._s.id+": loadstart"),this._s._onbufferchange(1)}),play:a(function(){this._s._onbufferchange(0)}),playing:a(function(){_e._wD(this._s.id+": playing "+String.fromCharCode(9835)),this._s._onbufferchange(0)}),progress:a(function(e){var t,n,o,i=this._s,a=0,s="progress"===e.type,r=e.target.buffered,l=e.loaded||0,u=e.total||1;if(i.buffered=[],r&&r.length){for(t=0,n=r.length;n>t;t++)i.buffered.push({start:r.start(t)*Ke,end:r.end(t)*Ke});if(a=(r.end(0)-r.start(0))*Ke,l=Math.min(1,a/(e.target.duration*Ke)),s&&r.length>1){for(o=[],n=r.length,t=0;n>t;t++)o.push(e.target.buffered.start(t)*Ke+"-"+e.target.buffered.end(t)*Ke);_e._wD(this._s.id+": progress, timeRanges: "+o.join(", "))}s&&!isNaN(l)&&_e._wD(this._s.id+": progress, "+Math.floor(100*l)+"% loaded")}isNaN(l)||(i._whileloading(l,u,i._get_html5_duration()),l&&u&&l===u&&fe.canplaythrough.call(this,e))}),ratechange:a(function(){_e._wD(this._s.id+": ratechange")}),suspend:a(function(e){var t=this._s;_e._wD(this._s.id+": suspend"),fe.progress.call(this,e),t._onsuspend()}),stalled:a(function(){_e._wD(this._s.id+": stalled")}),timeupdate:a(function(){this._s._onTimer()}),waiting:a(function(){var e=this._s;_e._wD(this._s.id+": waiting"),e._onbufferchange(1)})},ee=function(e){var t;return t=e&&(e.type||e.url||e.serverURL)?e.serverURL||e.type&&i(e.type)?!1:e.type?te({type:e.type}):te({url:e.url})||_e.html5Only||e.url.match(/data\:/i):!1},oe=function(e){var n;return e&&(n=ze?st:_e.html5.canPlayType("audio/wav")?rt:st,e.src=n,e._called_unload!==t&&(e._called_load=!1)),Ve&&(re=null),n},te=function(e){if(!_e.useHTML5Audio||!_e.hasHTML5)return!1;var n,o,a,s,r=e.url||null,l=e.type||null,u=_e.audioFormats;if(l&&_e.html5[l]!==t)return _e.html5[l]&&!i(l);if(!ne){ne=[];for(s in u)u.hasOwnProperty(s)&&(ne.push(s),u[s].related&&(ne=ne.concat(u[s].related)));ne=new RegExp("\\.("+ne.join("|")+")(\\?.*)?$","i")}return a=r?r.toLowerCase().match(ne):null,a&&a.length?a=a[1]:l?(o=l.indexOf(";"),a=(-1!==o?l.substr(0,o):l).substr(6)):n=!1,a&&_e.html5[a]!==t?n=_e.html5[a]&&!i(a):(l="audio/"+a,n=_e.html5.canPlayType({type:l}),_e.html5[a]=n,n=n&&_e.html5[l]&&!i(l)),n},ae=function(){function e(e){
|
|
var t,n,o=!1,i=!1;if(!s||"function"!=typeof s.canPlayType)return o;if(e instanceof Array){for(a=0,n=e.length;n>a;a++)(_e.html5[e[a]]||s.canPlayType(e[a]).match(_e.html5Test))&&(i=!0,_e.html5[e[a]]=!0,_e.flash[e[a]]=!!e[a].match(at));o=i}else t=s&&"function"==typeof s.canPlayType?s.canPlayType(e):!1,o=!(!t||!t.match(_e.html5Test));return o}if(!_e.useHTML5Audio||!_e.hasHTML5)return _e.html5.usingFlash=!0,We=!0,!1;var n,o,i,a,s=Audio!==t?Ze&&opera.version()<10?new Audio(null):new Audio:null,r={};i=_e.audioFormats;for(n in i)if(i.hasOwnProperty(n)&&(o="audio/"+n,r[n]=e(i[n].type),r[o]=r[n],n.match(at)?(_e.flash[n]=!0,_e.flash[o]=!0):(_e.flash[n]=!1,_e.flash[o]=!1),i[n]&&i[n].related))for(a=i[n].related.length-1;a>=0;a--)r["audio/"+i[n].related[a]]=r[n],_e.html5[i[n].related[a]]=r[n],_e.flash[i[n].related[a]]=r[n];return r.canPlayType=s?e:null,_e.html5=m(_e.html5,r),_e.html5.usingFlash=Y(),We=_e.html5.usingFlash,!0},T={notReady:"Unavailable - wait until onready() has fired.",notOK:"Audio support is not available.",domError:we+"exception caught while appending SWF to DOM.",spcWmode:"Removing wmode, preventing known SWF loading issue(s)",swf404:ve+"Verify that %s is a valid path.",tryDebug:"Try "+we+".debugFlash = true for more security details (output goes to SWF.)",checkSWF:"See SWF output for more debug info.",localFail:ve+"Non-HTTP page ("+Me.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:ve+"Special case: Waiting for SWF to load with window focus...",waitForever:ve+"Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:ve+"Waiting for 100% SWF load...",needFunction:ve+"Function object expected for %s",badID:'Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:ve+"_debug(): Current sound objects",waitOnload:ve+"Waiting for window.onload()",docLoaded:ve+"Document already loaded",onload:ve+"initComplete(): calling soundManager.onload()",onloadOK:we+".onload() complete",didInit:ve+"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:ve+"Failed to remove Flash node.",shutdown:we+".disable(): Shutting down",queue:ve+"Queueing %s handler",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying ."+W.swfTimedout+" CSS...",fbLoaded:"Flash loaded",fbHandler:ve+"flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:we+".load(): current URL already assigned.",badFV:we+'.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:ve+"Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:ve+"Got window focus.",policy:"Enabling usePolicyFile for data access",setup:we+".setup(): allowed parameters: %s",setupError:we+'.setup(): "%s" cannot be assigned with this method.',setupUndef:we+'.setup(): Could not find option "%s"',setupLate:we+".setup(): url, flashVersion and html5Test property changes will not take effect until reboot().",noURL:ve+"Flash URL required. Call soundManager.setup({url:...}) to get started.",sm2Loaded:"SoundManager 2: Ready. "+String.fromCharCode(10003),reset:we+".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."},U=function(){var e,t,n,o,i;if(e=qe.call(arguments),o=e.shift(),i=T&&T[o]?T[o]:"",i&&e&&e.length)for(t=0,n=e.length;n>t;t++)i=i.replace("%s",e[t]);return i},V=function(e){return 8===f&&e.loops>1&&e.stream&&(c("as2loop"),e.stream=!1),e},Q=function(e,t){return e&&!e.usePolicyFile&&(e.onid3||e.usePeakData||e.useWaveformData||e.useEQData)&&(_e._wD((t||"")+U("policy")),e.usePolicyFile=!0),e},K=function(e){tt&&console.warn!==t?console.warn(e):_e._wD(e)},l=function(){return!1},R=function(e){var t;for(t in e)e.hasOwnProperty(t)&&"function"==typeof e[t]&&(e[t]=l);t=null},x=function(e){e===t&&(e=!1),(Ie||e)&&_e.disable(e)},N=function(e){var t,n=null;if(e)if(e.match(/\.swf(\?.*)?$/i)){if(n=e.substr(e.toLowerCase().lastIndexOf(".swf?")+4))return e}else e.lastIndexOf("/")!==e.length-1&&(e+="/");return t=(e&&-1!==e.lastIndexOf("/")?e.substr(0,e.lastIndexOf("/")+1):"./")+_e.movieURL,_e.noSWFCache&&(t+="?ts="+(new Date).getTime()),t},M=function(){f=parseInt(_e.flashVersion,10),8!==f&&9!==f&&(_e._wD(U("badFV",f,Ce)),_e.flashVersion=f=Ce);var e=_e.debugMode||_e.debugFlash?"_debug.swf":".swf";_e.useHTML5Audio&&!_e.html5Only&&_e.audioFormats.mp4.required&&9>f&&(_e._wD(U("needfl9")),_e.flashVersion=f=9),_e.version=_e.versionNumber+(_e.html5Only?" (HTML5-only mode)":9===f?" (AS3/Flash 9)":" (AS2/Flash 8)"),f>8?(_e.defaultOptions=m(_e.defaultOptions,_e.flash9Options),_e.features.buffering=!0,_e.defaultOptions=m(_e.defaultOptions,_e.movieStarOptions),_e.filePatterns.flash9=new RegExp("\\.(mp3|"+ft.join("|")+")(\\?.*)?$","i"),_e.features.movieStar=!0):_e.features.movieStar=!1,_e.filePattern=_e.filePatterns[8!==f?"flash9":"flash8"],_e.movieURL=(8===f?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",e),_e.features.peakData=_e.features.waveformData=_e.features.eqData=f>8},C=function(e,t){return ye?void ye._setPolling(e,t):!1},k=function(){if(_e.debugURLParam.test(De)&&(_e.setupOptions.debugMode=_e.debugMode=!0),r(_e.debugID))return!1;var e,t,n,o,i;if(_e.debugMode&&!r(_e.debugID)&&(!tt||!_e.useConsole||!_e.consoleOnly)){e=Me.createElement("div"),e.id=_e.debugID+"-toggle",o={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},e.appendChild(Me.createTextNode("-")),e.onclick=q,e.title="Toggle SM2 debug console",Oe.match(/msie 6/i)&&(e.style.position="absolute",e.style.cursor="hand");for(i in o)o.hasOwnProperty(i)&&(e.style[i]=o[i]);if(t=Me.createElement("div"),t.id=_e.debugID,t.style.display=_e.debugMode?"block":"none",_e.debugMode&&!r(e.id)){try{n=H(),n.appendChild(e)}catch(a){throw new Error(U("domError")+" \n"+a.toString())}n.appendChild(t)}}n=null},$=this.getSoundById,c=function(e,t){return e?_e._wD(U(e),t):""},q=function(){var e=r(_e.debugID),t=r(_e.debugID+"-toggle");return e?(Te?(t.innerHTML="+",e.style.display="none"):(t.innerHTML="-",e.style.display="block"),void(Te=!Te)):!1},h=function(n,o,i){if(e.sm2Debugger!==t)try{sm2Debugger.handleEvent(n,o,i)}catch(a){return!1}return!0},j=function(){var e=[];return _e.debugMode&&e.push(W.sm2Debug),_e.debugFlash&&e.push(W.flashDebug),_e.useHighPerformance&&e.push(W.highPerf),e.join(" ")},B=function(){var e=U("fbHandler"),t=_e.getMoviePercent(),n=W,o={type:"FLASHBLOCK"};return _e.html5Only?!1:void(_e.ok()?(_e.didFlashBlock&&_e._wD(e+": Unblocked"),_e.oMC&&(_e.oMC.className=[j(),n.swfDefault,n.swfLoaded+(_e.didFlashBlock?" "+n.swfUnblocked:"")].join(" "))):(We&&(_e.oMC.className=j()+" "+n.swfDefault+" "+(null===t?n.swfTimedout:n.swfError),_e._wD(e+": "+U("fbTimeout")+(t?" ("+U("fbLoaded")+")":""))),_e.didFlashBlock=!0,w({type:"ontimeout",ignoreInit:!0,error:o}),E(o)))},y=function(e,n,o){Le[e]===t&&(Le[e]=[]),Le[e].push({method:n,scope:o||null,fired:!1})},w=function(e){if(e||(e={type:_e.ok()?"onready":"ontimeout"}),!Fe&&e&&!e.ignoreInit)return!1;if("ontimeout"===e.type&&(_e.ok()||Ie&&!e.ignoreInit))return!1;var t,n,o={success:e&&e.ignoreInit?_e.ok():!Ie},i=e&&e.type?Le[e.type]||[]:[],a=[],s=[o],r=We&&!_e.ok();for(e.error&&(s[0].error=e.error),t=0,n=i.length;n>t;t++)i[t].fired!==!0&&a.push(i[t]);if(a.length)for(t=0,n=a.length;n>t;t++)a[t].scope?a[t].method.apply(a[t].scope,s):a[t].method.apply(this,s),r||(a[t].fired=!0);return!0},v=function(){e.setTimeout(function(){_e.useFlashBlock&&B(),w(),"function"==typeof _e.onload&&(c("onload",1),_e.onload.apply(e),c("onloadOK",1)),_e.waitForWindowLoad&&se.add(e,"load",v)},1)},ue=function(){if(le!==t)return le;var n,o,i,a=!1,s=navigator,r=s.plugins,l=e.ActiveXObject;if(r&&r.length)o="application/x-shockwave-flash",i=s.mimeTypes,i&&i[o]&&i[o].enabledPlugin&&i[o].enabledPlugin.description&&(a=!0);else if(l!==t&&!Oe.match(/MSAppHost/i)){try{n=new l("ShockwaveFlash.ShockwaveFlash")}catch(u){n=null}a=!!n,n=null}return le=a,a},Y=function(){var e,t,n=_e.audioFormats,o=$e&&!!Oe.match(/os (1|2|3_0|3_1)\s/i);if(o?(_e.hasHTML5=!1,_e.html5Only=!0,_e.oMC&&(_e.oMC.style.display="none")):_e.useHTML5Audio&&(_e.html5&&_e.html5.canPlayType||(_e._wD("SoundManager: No HTML5 Audio() support detected."),_e.hasHTML5=!1),et&&_e._wD(ve+"Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - "+(le?"will use flash fallback for MP3/MP4, if available":" would use flash fallback for MP3/MP4, but none detected."),1)),_e.useHTML5Audio&&_e.hasHTML5){Z=!0;for(t in n)n.hasOwnProperty(t)&&n[t].required&&(_e.html5.canPlayType(n[t].type)?_e.preferFlash&&(_e.flash[t]||_e.flash[n[t].type])&&(e=!0):(Z=!1,e=!0))}return _e.ignoreFlash&&(e=!1,Z=!0),_e.html5Only=_e.hasHTML5&&_e.useHTML5Audio&&!e,!_e.html5Only},z=function(e){var t,n,o,i=0;if(e instanceof Array){for(t=0,n=e.length;n>t;t++)if(e[t]instanceof Object){if(_e.canPlayMIME(e[t].type)){i=t;break}}else if(_e.canPlayURL(e[t])){i=t;break}e[i].url&&(e[i]=e[i].url),o=e[i]}else o=e;return o},G=function(e){e._hasTimer||(e._hasTimer=!0,!Ye&&_e.html5PollingInterval&&(null===Be&&0===Ue&&(Be=setInterval(X,_e.html5PollingInterval)),Ue++))},J=function(e){e._hasTimer&&(e._hasTimer=!1,!Ye&&_e.html5PollingInterval&&Ue--)},X=function(){var e;if(null!==Be&&!Ue)return clearInterval(Be),Be=null,!1;for(e=_e.soundIDs.length-1;e>=0;e--)_e.sounds[_e.soundIDs[e]].isHTML5&&_e.sounds[_e.soundIDs[e]]._hasTimer&&_e.sounds[_e.soundIDs[e]]._onTimer()},E=function(n){n=n!==t?n:{},"function"==typeof _e.onerror&&_e.onerror.apply(e,[{type:n.type!==t?n.type:null}]),n.fatal!==t&&n.fatal&&_e.disable()},de=function(){if(!et||!ue())return!1;var e,t,n=_e.audioFormats;for(t in n)if(n.hasOwnProperty(t)&&("mp3"===t||"mp4"===t)&&(_e._wD(we+": Using flash fallback for "+t+" format"),_e.html5[t]=!1,n[t]&&n[t].related))for(e=n[t].related.length-1;e>=0;e--)_e.html5[n[t].related[e]]=!1},this._setSandboxType=function(e){var n=_e.sandbox;n.type=e,n.description=n.types[n.types[e]!==t?e:"unknown"],"localWithFile"===n.type?(n.noRemote=!0,n.noLocal=!1,c("secNote",2)):"localWithNetwork"===n.type?(n.noRemote=!1,n.noLocal=!0):"localTrusted"===n.type&&(n.noRemote=!1,n.noLocal=!1)},this._externalInterfaceOK=function(e){if(_e.swfLoaded)return!1;var t;return h("swf",!0),h("flashtojs",!0),_e.swfLoaded=!0,ot=!1,et&&de(),e&&e.replace(/\+dev/i,"")===_e.versionNumber.replace(/\+dev/i,"")?void setTimeout(d,Je?100:1):(t=we+': Fatal: JavaScript file build "'+_e.versionNumber+'" does not match Flash SWF build "'+e+'" at '+_e.url+". Ensure both are up-to-date.",setTimeout(function(){throw new Error(t)},0),!1)},A=function(e,n){function o(){var e,t=[],n=[],o=" + ";e="SoundManager "+_e.version+(!_e.html5Only&&_e.useHTML5Audio?_e.hasHTML5?" + HTML5 audio":", no HTML5 audio support":""),_e.html5Only?_e.html5PollingInterval&&t.push("html5PollingInterval ("+_e.html5PollingInterval+"ms)"):(_e.preferFlash&&t.push("preferFlash"),_e.useHighPerformance&&t.push("useHighPerformance"),_e.flashPollingInterval&&t.push("flashPollingInterval ("+_e.flashPollingInterval+"ms)"),_e.html5PollingInterval&&t.push("html5PollingInterval ("+_e.html5PollingInterval+"ms)"),_e.wmode&&t.push("wmode ("+_e.wmode+")"),_e.debugFlash&&t.push("debugFlash"),_e.useFlashBlock&&t.push("flashBlock")),t.length&&(n=n.concat([t.join(o)])),_e._wD(e+(n.length?o+n.join(", "):""),1),he()}function i(e,t){return'<param name="'+e+'" value="'+t+'" />'}if(Pe&&Se)return!1;if(_e.html5Only)return M(),o(),_e.oMC=r(_e.movieID),d(),Pe=!0,Se=!0,!1;var a,s,l,u,f,h,c,p,m=n||_e.url,_=_e.altURL||m,g="JS/Flash audio component (SoundManager 2)",y=H(),w=j(),v=null,b=Me.getElementsByTagName("html")[0];if(v=b&&b.dir&&b.dir.match(/rtl/i),e=e===t?_e.id:e,M(),_e.url=N(lt?m:_),n=_e.url,_e.wmode=!_e.wmode&&_e.useHighPerformance?"transparent":_e.wmode,null!==_e.wmode&&(Oe.match(/msie 8/i)||!Je&&!_e.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(je.push(T.spcWmode),_e.wmode=null),a={name:e,id:e,src:n,quality:"high",allowScriptAccess:_e.allowScriptAccess,bgcolor:_e.bgColor,pluginspage:ut+"www.macromedia.com/go/getflashplayer",title:g,type:"application/x-shockwave-flash",wmode:_e.wmode,hasPriority:"true"},_e.debugFlash&&(a.FlashVars="debug=1"),_e.wmode||delete a.wmode,Je)s=Me.createElement("div"),u=['<object id="'+e+'" data="'+n+'" type="'+a.type+'" title="'+a.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',i("movie",n),i("AllowScriptAccess",_e.allowScriptAccess),i("quality",a.quality),_e.wmode?i("wmode",_e.wmode):"",i("bgcolor",_e.bgColor),i("hasPriority","true"),_e.debugFlash?i("FlashVars",a.FlashVars):"","</object>"].join("");else{s=Me.createElement("embed");for(l in a)a.hasOwnProperty(l)&&s.setAttribute(l,a[l])}if(k(),w=j(),y=H())if(_e.oMC=r(_e.movieID)||Me.createElement("div"),_e.oMC.id)p=_e.oMC.className,_e.oMC.className=(p?p+" ":W.swfDefault)+(w?" "+w:""),_e.oMC.appendChild(s),Je&&(f=_e.oMC.appendChild(Me.createElement("div")),f.className=W.swfBox,f.innerHTML=u),Se=!0;else{if(_e.oMC.id=_e.movieID,_e.oMC.className=W.swfDefault+" "+w,h=null,f=null,_e.useFlashBlock||(_e.useHighPerformance?h={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(h={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},v&&(h.left=Math.abs(parseInt(h.left,10))+"px"))),Xe&&(_e.oMC.style.zIndex=1e4),!_e.debugFlash)for(c in h)h.hasOwnProperty(c)&&(_e.oMC.style[c]=h[c]);try{Je||_e.oMC.appendChild(s),y.appendChild(_e.oMC),Je&&(f=_e.oMC.appendChild(Me.createElement("div")),f.className=W.swfBox,f.innerHTML=u),Se=!0}catch(O){throw new Error(U("domError")+" \n"+O.toString())}}return Pe=!0,o(),!0},P=function(){return _e.html5Only?(A(),!1):ye?!1:_e.url?(ye=_e.getMovie(_e.id),ye||(ke?(Je?_e.oMC.innerHTML=Re:_e.oMC.appendChild(ke),ke=null,Pe=!0):A(_e.id,_e.url),ye=_e.getMovie(_e.id)),"function"==typeof _e.oninitmovie&&setTimeout(_e.oninitmovie,1),ce(),!0):(c("noURL"),!1)},b=function(){setTimeout(O,1e3)},D=function(){e.setTimeout(function(){K(ve+"useFlashBlock is false, 100% HTML5 mode is possible. Rebooting with preferFlash: false..."),_e.setup({preferFlash:!1}).reboot(),_e.didFlashBlock=!0,_e.beginDelayedInit()},1)},O=function(){var t,n=!1;return _e.url?xe?!1:(xe=!0,se.remove(e,"load",b),le&&ot&&!nt?(c("waitFocus"),!1):(Fe||(t=_e.getMoviePercent(),t>0&&100>t&&(n=!0)),void setTimeout(function(){return t=_e.getMoviePercent(),n?(xe=!1,_e._wD(U("waitSWF")),e.setTimeout(b,1),!1):(Fe||(_e._wD(we+": No Flash response within expected time. Likely causes: "+(0===t?"SWF load failed, ":"")+"Flash blocked or JS-Flash security error."+(_e.debugFlash?" "+U("checkSWF"):""),2),!lt&&t&&(c("localFail",2),_e.debugFlash||c("tryDebug",2)),0===t&&_e._wD(U("swf404",_e.url),1),h("flashtojs",!1,": Timed out"+(lt?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"))),void(!Fe&&it&&(null===t?_e.useFlashBlock||0===_e.flashLoadTimeout?(_e.useFlashBlock&&B(),c("waitForever")):!_e.useFlashBlock&&Z?D():(c("waitForever"),w({type:"ontimeout",ignoreInit:!0,error:{type:"INIT_FLASHBLOCK"}})):0===_e.flashLoadTimeout?c("waitForever"):!_e.useFlashBlock&&Z?D():x(!0))))},_e.flashLoadTimeout))):!1},L=function(){function t(){se.remove(e,"focus",L)}return nt||!ot?(t(),!0):(it=!0,nt=!0,c("gotFocus"),xe=!1,b(),t(),!0)},ce=function(){je.length&&(_e._wD("SoundManager 2: "+je.join(" "),1),je=[])},he=function(){ce();var e,t=[];if(_e.useHTML5Audio&&_e.hasHTML5){for(e in _e.audioFormats)_e.audioFormats.hasOwnProperty(e)&&t.push(e+" = "+_e.html5[e]+(!_e.html5[e]&&We&&_e.flash[e]?" (using flash)":_e.preferFlash&&_e.flash[e]&&We?" (preferring flash)":_e.html5[e]?"":" ("+(_e.audioFormats[e].required?"required, ":"")+"and no flash support)"));_e._wD("SoundManager 2 HTML5 support: "+t.join(", "),1)}},p=function(t){if(Fe)return!1;if(_e.html5Only)return c("sm2Loaded",1),Fe=!0,v(),h("onload",!0),!0;var n,o=_e.useFlashBlock&&_e.flashLoadTimeout&&!_e.getMoviePercent(),i=!0;return o||(Fe=!0),n={type:!le&&We?"NO_FLASH":"INIT_TIMEOUT"},_e._wD("SoundManager 2 "+(Ie?"failed to load":"loaded")+" ("+(Ie?"Flash security/load error":"OK")+") "+String.fromCharCode(Ie?10006:10003),Ie?2:1),Ie||t?(_e.useFlashBlock&&_e.oMC&&(_e.oMC.className=j()+" "+(null===_e.getMoviePercent()?W.swfTimedout:W.swfError)),w({type:"ontimeout",error:n,ignoreInit:!0}),h("onload",!1),E(n),i=!1):h("onload",!0),Ie||(_e.waitForWindowLoad&&!He?(c("waitOnload"),se.add(e,"load",v)):(_e.waitForWindowLoad&&He&&c("docLoaded"),v())),i},u=function(){var e,n=_e.setupOptions;for(e in n)n.hasOwnProperty(e)&&(_e[e]===t?_e[e]=n[e]:_e[e]!==n[e]&&(_e.setupOptions[e]=_e[e]))},d=function(){function t(){se.remove(e,"load",_e.beginDelayedInit)}if(Fe)return c("didInit"),!1;if(_e.html5Only)return Fe||(t(),_e.enabled=!0,p()),!0;P();try{ye._externalInterfaceTest(!1),C(!0,_e.flashPollingInterval||(_e.useHighPerformance?10:50)),_e.debugMode||ye._disableDebug(),_e.enabled=!0,h("jstoflash",!0),_e.html5Only||se.add(e,"unload",l)}catch(n){return _e._wD("js/flash exception: "+n.toString()),h("jstoflash",!1),E({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),x(!0),p(),!1}return p(),t(),!0},S=function(){return I?!1:(I=!0,u(),k(),!le&&_e.hasHTML5&&(_e._wD("SoundManager 2: No Flash detected"+(_e.useHTML5Audio?". Trying HTML5-only mode.":", enabling HTML5."),1),_e.setup({useHTML5Audio:!0,preferFlash:!1})),ae(),!le&&We&&(je.push(T.needFlash),_e.setup({flashLoadTimeout:1})),Me.removeEventListener&&Me.removeEventListener("DOMContentLoaded",S,!1),P(),!0)},ie=function(){return"complete"===Me.readyState&&(S(),Me.detachEvent("onreadystatechange",ie)),!0},F=function(){He=!0,S(),se.remove(e,"load",F)},ue(),se.add(e,"focus",L),se.add(e,"load",b),se.add(e,"load",F),Me.addEventListener?Me.addEventListener("DOMContentLoaded",S,!1):Me.attachEvent?Me.attachEvent("onreadystatechange",ie):(h("onload",!1),E({type:"NO_DOM2_EVENTS",fatal:!0}))}if(!e||!e.document)throw new Error("SoundManager requires a browser with window and document objects.");var o=null;e.SM2_DEFER!==t&&SM2_DEFER||(o=new n),"object"==typeof module&&module&&"object"==typeof module.exports?(module.exports.SoundManager=n,module.exports.soundManager=o):"function"==typeof define&&define.amd&&define(function(){function t(t){if(!e.soundManager&&t instanceof Function){var o=t(n);o instanceof n&&(e.soundManager=o)}return e.soundManager}return{constructor:n,getInstance:t}}),e.SoundManager=n,e.soundManager=o}(window);
|
|
/*page-player.js*/
|
|
function PagePlayer(){var e,t,a=this,s=this,i=soundManager,n=null,o=null,l=document.getElementsByTagName("head")[0],r=null,d=navigator.userAgent,u=d.match(/(opera|firefox)/i),c=d.match(/ipad|ipod|iphone/i);this.config={usePeakData:!1,useWaveformData:!1,useEQData:!1,fillGraph:!1,allowRightClick:!0,useThrottling:!1,autoStart:!1,playNext:!0,updatePageTitle:!0,emptyTime:"-:--",useFavIcon:!1},this.css={sDefault:"sm2_link",sLoading:"sm2_loading",sPlaying:"sm2_playing",sPaused:"sm2_paused"},this.sounds=[],this.soundsByObject=[],this.lastSound=null,this.soundCount=0,this.strings=[],this.dragActive=!1,this.dragExec=new Date,this.dragTimer=null,this.pageTitle=document.title,this.lastWPExec=new Date,this.lastWLExec=new Date,this.vuMeterData=[],this.oControls=null,this._mergeObjects=function(e,t){var a,s,i,n={};for(s in e)e.hasOwnProperty(s)&&(n[s]=e[s]);a="undefined"==typeof t?{}:t;for(i in a)"undefined"==typeof n[i]&&(n[i]=a[i]);return n},e=function(){function e(e){var t=n.call(e),a=t.length;return i?(t[1]="on"+t[1],a>3&&t.pop()):3===a&&t.push(!1),t}function t(e,t){var a=e.shift(),s=[o[t]];i?a[s](e[0],e[1]):a[s].apply(a,e)}function a(){t(e(arguments),"add")}function s(){t(e(arguments),"remove")}var i=window.attachEvent&&!window.addEventListener,n=Array.prototype.slice,o={add:i?"attachEvent":"addEventListener",remove:i?"detachEvent":"removeEventListener"};return{add:a,remove:s}}(),this.hasClass=function(e,t){return"undefined"!=typeof e.className?new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className):!1},this.addClass=function(e,t){return e&&t&&!a.hasClass(e,t)?void(e.className=(e.className?e.className+" ":"")+t):!1},this.removeClass=function(e,t){return e&&t&&a.hasClass(e,t)?void(e.className=e.className.replace(new RegExp("( "+t+")|("+t+")","g"),"")):!1},this.select=function(e,t){var s=a.getByClassName(e,"div",t||null);return s?s[0]:null},this.getByClassName=document.querySelectorAll?function(e,t,a){var s,i="."+e;return t&&(t=t.split(" ")),s=t.length>1?t.join(i+", "):t[0]+i,(a?a:document).querySelectorAll(s)}:function(e,t,s){var i,n,o=s?s:document,l=[],r=[];if(t&&(t=t.split(" ")),t instanceof Array){for(i=t.length;i--;)r&&r[t[i]]||(r[t[i]]=o.getElementsByTagName(t[i]));for(i=t.length;i--;)for(n=r[t[i]].length;n--;)a.hasClass(r[t[i]][n],e)&&l.push(r[t[i]][n])}else for(r=o.all||o.getElementsByTagName("*"),i=0,n=r.length;n>i;i++)a.hasClass(r[i],e)&&l.push(r[i]);return l},this.isChildOfClass=function(e,t){if(!e||!t)return!1;for(;e.parentNode&&!a.hasClass(e,t);)e=e.parentNode;return a.hasClass(e,t)},this.getParentByNodeName=function(e,t){if(!e||!t)return!1;for(t=t.toLowerCase();e.parentNode&&t!==e.parentNode.nodeName.toLowerCase();)e=e.parentNode;return e.parentNode&&t===e.parentNode.nodeName.toLowerCase()?e.parentNode:null},this.getOffX=function(e){var t=0;if(e.offsetParent)for(;e.offsetParent;)t+=e.offsetLeft,e=e.offsetParent;else e.x&&(t+=e.x);return t},this.getTime=function(e,t){var a=Math.floor(e/1e3),s=Math.floor(a/60),i=a-60*s;return t?s+":"+(10>i?"0"+i:i):{min:s,sec:i}},this.getSoundByObject=function(e){return"undefined"!=typeof a.soundsByObject[e.id]?a.soundsByObject[e.id]:null},this.getPreviousItem=function(e){if(e.previousElementSibling)e=e.previousElementSibling;else for(e=e.previousSibling;e&&e.previousSibling&&1!==e.previousSibling.nodeType;)e=e.previousSibling;return"li"!==e.nodeName.toLowerCase()?null:e.getElementsByTagName("a")[0]},this.playPrevious=function(e){if(e||(e=a.lastSound),!e)return!1;var t=a.getPreviousItem(e._data.oLI);return t&&s.handleClick({target:t}),t},this.getNextItem=function(e){if(e.nextElementSibling)e=e.nextElementSibling;else for(e=e.nextSibling;e&&e.nextSibling&&1!==e.nextSibling.nodeType;)e=e.nextSibling;return"li"!==e.nodeName.toLowerCase()?null:e.getElementsByTagName("a")[0]},this.playNext=function(e){if(e||(e=a.lastSound),!e)return!1;var t=a.getNextItem(e._data.oLI);return t&&s.handleClick({target:t}),t},this.setPageTitle=function(e){if(!a.config.updatePageTitle)return!1;try{document.title=(e?e+" - ":"")+a.pageTitle}catch(t){a.setPageTitle=function(){return!1}}},this.events={play:function(){s.removeClass(this._data.oLI,this._data.className),this._data.className=s.css.sPlaying,s.addClass(this._data.oLI,this._data.className),a.setPageTitle(this._data.originalTitle)},stop:function(){s.removeClass(this._data.oLI,this._data.className),this._data.className="",this._data.oPosition.style.width="0px",a.setPageTitle(),a.resetPageIcon()},pause:function(){return s.dragActive?!1:(s.removeClass(this._data.oLI,this._data.className),this._data.className=s.css.sPaused,s.addClass(this._data.oLI,this._data.className),a.setPageTitle(),void a.resetPageIcon())},resume:function(){return s.dragActive?!1:(s.removeClass(this._data.oLI,this._data.className),this._data.className=s.css.sPlaying,void s.addClass(this._data.oLI,this._data.className))},finish:function(){s.removeClass(this._data.oLI,this._data.className),this._data.className="",this._data.oPosition.style.width="0px",a.config.playNext?s.playNext(this):(a.setPageTitle(),a.resetPageIcon())},whileloading:function(){function e(){this._data.oLoading.style.width=this.bytesLoaded/this.bytesTotal*100+"%",!this._data.didRefresh&&this._data.metadata&&(this._data.didRefresh=!0,this._data.metadata.refresh())}if(s.config.useThrottling){var t=new Date;(t&&t-a.lastWLExec>50||this.bytesLoaded===this.bytesTotal)&&(e.apply(this),a.lastWLExec=t)}else e.apply(this)},onload:function(){if(this.loaded)this._data.metadata&&this._data.metadata.refresh();else{var e=this._data.oLI.getElementsByTagName("a")[0],t=e.innerHTML;e.innerHTML=t+' <span style="font-size:0.5em"> | Load failed, d\'oh! '+(i.sandbox.noRemote?" Possible cause: Flash sandbox is denying remote URL access.":i.sandbox.noLocal?"Flash denying local filesystem access":"404?")+"</span>",setTimeout(function(){e.innerHTML=t},5e3)}},whileplaying:function(){var e=null;s.dragActive||!s.config.useThrottling?(a.updateTime.apply(this),i.flashVersion>=9&&(s.config.usePeakData&&this.instanceOptions.usePeakData&&a.updatePeaks.apply(this),(s.config.useWaveformData&&this.instanceOptions.useWaveformData||s.config.useEQData&&this.instanceOptions.useEQData)&&a.updateGraph.apply(this)),this._data.metadata&&(e=new Date,e&&e-a.lastWPExec>500&&(this._data.metadata.refreshMetadata(this),a.lastWPExec=e)),this._data.oPosition.style.width=this.position/a.getDurationEstimate(this)*100+"%"):(e=new Date,e-a.lastWPExec>30&&(a.updateTime.apply(this),i.flashVersion>=9&&(s.config.usePeakData&&this.instanceOptions.usePeakData&&a.updatePeaks.apply(this),(s.config.useWaveformData&&this.instanceOptions.useWaveformData||s.config.useEQData&&this.instanceOptions.useEQData)&&a.updateGraph.apply(this)),this._data.metadata&&this._data.metadata.refreshMetadata(this),this._data.oPosition.style.width=this.position/a.getDurationEstimate(this)*100+"%",a.lastWPExec=e))}},this.setPageIcon=function(e){if(!a.config.useFavIcon||!a.config.usePeakData||!e)return!1;var t=document.getElementById("sm2-favicon");t&&(l.removeChild(t),t=null),t||(t=document.createElement("link"),t.id="sm2-favicon",t.rel="shortcut icon",t.type="image/png",t.href=e,document.getElementsByTagName("head")[0].appendChild(t))},this.resetPageIcon=function(){if(!a.config.useFavIcon)return!1;var e=document.getElementById("favicon");e&&(e.href="/favicon.ico")},this.updatePeaks=function(){var e=this._data.oPeak,t=e.getElementsByTagName("span");t[0].style.marginTop=13-Math.floor(15*this.peakData.left)+"px",t[1].style.marginTop=13-Math.floor(15*this.peakData.right)+"px",i.flashVersion>8&&a.config.useFavIcon&&a.config.usePeakData&&a.setPageIcon(a.vuMeterData[parseInt(16*this.peakData.left,10)][parseInt(16*this.peakData.right,10)])},this.updateGraph=function(){if(s.config.flashVersion<9||!s.config.useWaveformData&&!s.config.useEQData)return!1;var e,t,a,i=this._data.oGraph.getElementsByTagName("div");if(s.config.useWaveformData)for(e=8,t=255;t--;)i[255-t].style.marginTop=1+e+Math.ceil(this.waveformData.left[t]*-e)+"px";else for(a=9,t=255;t--;)i[255-t].style.marginTop=2*a-1+Math.ceil(this.eqData[t]*-a)+"px"},this.resetGraph=function(){if(!s.config.useEQData||s.config.flashVersion<9)return!1;var e,t=this._data.oGraph.getElementsByTagName("div"),a=s.config.useEQData?"17px":"9px",i=s.config.fillGraph?"32px":"1px";for(e=255;e--;)t[255-e].style.marginTop=a,t[255-e].style.height=i},this.updateTime=function(){var e=a.strings.timing.replace("%s1",a.getTime(this.position,!0));e=e.replace("%s2",a.getTime(a.getDurationEstimate(this),!0)),this._data.oTiming.innerHTML=e},this.getTheDamnTarget=function(e){return e.target||(window.event?window.event.srcElement:null)},this.withinStatusBar=function(e){return a.isChildOfClass(e,"playlist")&&a.isChildOfClass(e,"controls")},this.handleClick=function(e){if(2===e.button)return s.config.allowRightClick||s.stopEvent(e),s.config.allowRightClick;var t,n,o,l,d,u,c=a.getTheDamnTarget(e);return c?(a.dragActive&&a.stopDrag(),a.withinStatusBar(c)?!1:("a"!==c.nodeName.toLowerCase()&&(c=a.getParentByNodeName(c,"a")),c?(t=c.getAttribute("href"),!c.href||!i.canPlayLink(c)&&!a.hasClass(c,"playable")||a.hasClass(c,"exclude")?!0:(a.initUL(a.getParentByNodeName(c,"ul")),a.initItem(c),n=c.href,o=a.getSoundByObject(c),o?(a.setPageTitle(o._data.originalTitle),o===a.lastSound?2!==o.readyState?1!==o.playState?o.play():o.togglePause():i._writeDebug("Warning: sound failed to load (security restrictions, 404 or bad format)",2):(a.lastSound&&a.stopSound(a.lastSound),r&&o._data.oTimingBox.appendChild(r),o.togglePause())):(o=i.createSound({id:c.id,url:decodeURI(n),onplay:a.events.play,onstop:a.events.stop,onpause:a.events.pause,onresume:a.events.resume,onfinish:a.events.finish,type:c.type||null,whileloading:a.events.whileloading,whileplaying:a.events.whileplaying,onmetadata:a.events.metadata,onload:a.events.onload}),l=a.oControls.cloneNode(!0),d=c.parentNode,d.appendChild(l),r&&d.appendChild(r),a.soundsByObject[c.id]=o,o._data={oLink:c,oLI:d,oControls:a.select("controls",d),oStatus:a.select("statusbar",d),oLoading:a.select("loading",d),oPosition:a.select("position",d),oTimingBox:a.select("timing",d),oTiming:a.select("timing",d).getElementsByTagName("div")[0],oPeak:a.select("peak",d),oGraph:a.select("spectrum-box",d),className:a.css.sPlaying,originalTitle:c.innerHTML,metadata:null},r&&o._data.oTimingBox.appendChild(r),o._data.oLI.getElementsByTagName("ul").length&&(o._data.metadata=new Metadata(o)),u=a.strings.timing.replace("%s1",a.config.emptyTime),u=u.replace("%s2",a.config.emptyTime),o._data.oTiming.innerHTML=u,a.sounds.push(o),a.lastSound&&a.stopSound(a.lastSound),a.resetGraph.apply(o),o.play()),a.lastSound=o,a.stopEvent(e))):!0)):!0},this.handleMouseDown=function(t){if(c&&t.touches&&(t=t.touches[0]),2===t.button)return s.config.allowRightClick||s.stopEvent(t),s.config.allowRightClick;var i=a.getTheDamnTarget(t);return i&&a.withinStatusBar(i)?(a.dragActive=!0,a.lastSound.pause(),a.setPosition(t),c?e.add(document,"touchmove",a.handleMouseMove):e.add(document,"mousemove",a.handleMouseMove),a.addClass(a.lastSound._data.oControls,"dragging"),a.stopEvent(t)):!0},this.handleMouseMove=function(e){if(c&&e.touches&&(e=e.touches[0]),a.dragActive)if(a.config.useThrottling){var t=new Date;t-a.dragExec>20?a.setPosition(e):(window.clearTimeout(a.dragTimer),a.dragTimer=window.setTimeout(function(){a.setPosition(e)},20)),a.dragExec=t}else a.setPosition(e);else a.stopDrag();return e.stopPropagation=!0,!1},this.stopDrag=function(t){return a.dragActive?(a.removeClass(a.lastSound._data.oControls,"dragging"),c?e.remove(document,"touchmove",a.handleMouseMove):e.remove(document,"mousemove",a.handleMouseMove),s.hasClass(a.lastSound._data.oLI,a.css.sPaused)||a.lastSound.resume(),a.dragActive=!1,a.stopEvent(t)):void 0},this.handleStatusClick=function(e){return a.setPosition(e),s.hasClass(a.lastSound._data.oLI,a.css.sPaused)||a.resume(),a.stopEvent(e)},this.stopEvent=function(e){return"undefined"!=typeof e&&("undefined"!=typeof e.preventDefault?e.preventDefault():(e.stopPropagation=!0,e.returnValue=!1)),!1},this.setPosition=function(e){var t,s,i,n,o=a.getTheDamnTarget(e);if(!o)return!0;for(s=o;!a.hasClass(s,"controls")&&s.parentNode;)s=s.parentNode;i=a.lastSound,t=parseInt(e.clientX,10),n=Math.floor((t-a.getOffX(s)-4)/s.offsetWidth*a.getDurationEstimate(i)),isNaN(n)||(n=Math.min(n,i.duration)),isNaN(n)||i.setPosition(n)},this.stopSound=function(e){i._writeDebug("stopping sound: "+e.id),i.stop(e.id),c||i.unload(e.id)},this.getDurationEstimate=function(e){return e.instanceOptions.isMovieStar?e.duration:e._data.metadata&&e._data.metadata.data.givenDuration?e._data.metadata.data.givenDuration:e.durationEstimate||0},this.createVUData=function(){var e,t,s=0,i=0,o=n.getContext("2d"),l=o.createLinearGradient(0,16,0,0);for(l.addColorStop(0,"rgb(0,192,0)"),l.addColorStop(.3,"rgb(0,255,0)"),l.addColorStop(.625,"rgb(255,255,0)"),l.addColorStop(.85,"rgb(255,0,0)"),e=o.createLinearGradient(0,16,0,0),t="rgba(0,0,0,0.2)",e.addColorStop(0,t),e.addColorStop(1,"rgba(0,0,0,0.5)"),s=0;16>s;s++)a.vuMeterData[s]=[];for(s=0;16>s;s++)for(i=0;16>i;i++)n.setAttribute("width",16),n.setAttribute("height",16),o.fillStyle=e,o.fillRect(0,0,7,15),o.fillRect(8,0,7,15),o.fillStyle=l,o.fillRect(0,15-s,7,16-(16-s)),o.fillRect(8,15-i,7,16-(16-i)),o.clearRect(0,3,16,1),o.clearRect(0,7,16,1),o.clearRect(0,11,16,1),a.vuMeterData[s][i]=n.toDataURL("image/png")},this.testCanvas=function(){var e,t=document.createElement("canvas"),a=null;if(!t||"undefined"==typeof t.getContext)return null;if(a=t.getContext("2d"),!a||"function"!=typeof t.toDataURL)return null;try{e=t.toDataURL("image/png")}catch(s){return null}return t},this.initItem=function(e){e.id||(e.id="pagePlayerMP3Sound"+a.soundCount++),a.addClass(e,a.css.sDefault)},this.initUL=function(e){i.flashVersion>=9&&a.addClass(e,a.cssBase)},this.init=function(l){function d(s){e[s](document,"click",a.handleClick),c?(e[s](document,"touchstart",a.handleMouseDown),e[s](document,"touchend",a.stopDrag)):(e[s](document,"mousedown",a.handleMouseDown),e[s](document,"mouseup",a.stopDrag)),e[s](window,"unload",t)}l?(i._writeDebug("pagePlayer.init(): Using custom configuration"),this.config=this._mergeObjects(l,this.config)):i._writeDebug("pagePlayer.init(): Using default configuration");var h,g,f,p,m,v;if(this.cssBase=[],i.useFlashBlock=!0,i.flashVersion>=9?(i.defaultOptions.usePeakData=this.config.usePeakData,i.defaultOptions.useWaveformData=this.config.useWaveformData,i.defaultOptions.useEQData=this.config.useEQData,this.config.usePeakData&&this.cssBase.push("use-peak"),(this.config.useWaveformData||this.config.useEQData)&&this.cssBase.push("use-spectrum"),this.cssBase=this.cssBase.join(" "),this.config.useFavIcon&&(n=a.testCanvas(),n&&u?a.createVUData():this.config.useFavIcon=!1)):(this.config.usePeakData||this.config.useWaveformData||this.config.useEQData)&&i._writeDebug("Page player: Note: soundManager.flashVersion = 9 is required for peak/waveform/EQ features."),o=document.createElement("div"),o.innerHTML=[' <div class="controls">',' <div class="statusbar">',' <div class="loading"></div>',' <div class="position"></div>'," </div>"," </div>",' <div class="timing">',' <div id="sm2_timing" class="timing-data">',' <span class="sm2_position">%s1</span> / <span class="sm2_total">%s2</span>'," </div>"," </div>",' <div class="peak">',' <div class="peak-box"><span class="l"></span><span class="r"></span></div>'," </div>",' <div class="spectrum-container">',' <div class="spectrum-box">',' <div class="spectrum"></div>'," </div>"," </div>"].join("\n"),i.flashVersion>=9){for(r=a.select("spectrum-container",o),r=o.removeChild(r),g=a.select("spectrum-box",r),f=g.getElementsByTagName("div")[0],p=document.createDocumentFragment(),m=null,h=256;h--;)m=f.cloneNode(!1),m.style.left=h+"px",p.appendChild(m);g.removeChild(f),g.appendChild(p)}else o.removeChild(a.select("spectrum-container",o)),o.removeChild(a.select("peak",o));a.oControls=o.cloneNode(!0),v=a.select("timing-data",o),a.strings.timing=v.innerHTML,v.innerHTML="",v.id="",t=function(){d("remove")},d("add"),i._writeDebug("pagePlayer.init(): Ready",1),a.config.autoStart&&s.handleClick({target:s.getByClassName("playlist","ul")[0].getElementsByTagName("a")[0]})}}var pagePlayer=null;soundManager.useFlashBlock=!0,soundManager.onready(function(){pagePlayer=new PagePlayer,pagePlayer.init("undefined"!=typeof PP_CONFIG?PP_CONFIG:null)});
|
|
/*script.js*/
|
|
$("tr").click(function(){window.location.href=$(this).find("a").attr("href")}),$(document).ready(function(){var n=new Array(".textOptions");n=n.join(",");var t=$(n).css("font-size");$(".resetFont").click(function(){$(n).css("font-size",t)}),$(".increaseFont").click(function(){var t=$(n).css("font-size"),s=parseFloat(t,10),c=1.1*s;return $(n).css("font-size",c),!1}),$(".decreaseFont").click(function(){var t=$(n).css("font-size"),s=parseFloat(t,10),c=.9*s;return $(n).css("font-size",c),!1})});
|
|
/*util.js*/
|
|
!function(e){e.fn.navList=function(){var t=e(this);return $a=t.find("a"),b=[],$a.each(function(){var t=e(this),a=Math.max(0,t.parents("li").length-1),l=t.attr("href"),i=t.attr("target");b.push('<a class="link depth-'+a+'"'+("undefined"!=typeof i&&""!=i?' target="'+i+'"':"")+("undefined"!=typeof l&&""!=l?' href="'+l+'"':"")+'><span class="indent-'+a+'"></span>'+t.text()+"</a>")}),b.join("")},e.fn.panel=function(t){if(0==this.length)return i;if(this.length>1){for(var a=0;a<this.length;a++)e(this[a]).panel(t);return i}var l,i=e(this),n=e("body"),r=e(window),o=i.attr("id");return l=e.extend({delay:0,hideOnClick:!1,hideOnEscape:!1,hideOnSwipe:!1,resetScroll:!1,resetForms:!1,side:null,target:i,visibleClass:"visible"},t),"jQuery"!=typeof l.target&&(l.target=e(l.target)),i._hide=function(e){l.target.hasClass(l.visibleClass)&&(e&&(e.preventDefault(),e.stopPropagation()),l.target.removeClass(l.visibleClass),window.setTimeout(function(){l.resetScroll&&i.scrollTop(0),l.resetForms&&i.find("form").each(function(){this.reset()})},l.delay))},i.css("-ms-overflow-style","-ms-autohiding-scrollbar").css("-webkit-overflow-scrolling","touch"),l.hideOnClick&&(i.find("a").css("-webkit-tap-highlight-color","rgba(0,0,0,0)"),i.on("click","a",function(t){var a=e(this),n=a.attr("href"),r=a.attr("target");n&&"#"!=n&&""!=n&&n!="#"+o&&(t.preventDefault(),t.stopPropagation(),i._hide(),window.setTimeout(function(){"_blank"==r?window.open(n):window.location.href=n},l.delay+10))})),i.on("touchstart",function(e){i.touchPosX=e.originalEvent.touches[0].pageX,i.touchPosY=e.originalEvent.touches[0].pageY}),i.on("touchmove",function(e){if(null!==i.touchPosX&&null!==i.touchPosY){var t=i.touchPosX-e.originalEvent.touches[0].pageX,a=i.touchPosY-e.originalEvent.touches[0].pageY,n=i.outerHeight(),r=i.get(0).scrollHeight-i.scrollTop();if(l.hideOnSwipe){var o=!1,s=20,c=50;switch(l.side){case"left":o=s>a&&a>-1*s&&t>c;break;case"right":o=s>a&&a>-1*s&&-1*c>t;break;case"top":o=s>t&&t>-1*s&&a>c;break;case"bottom":o=s>t&&t>-1*s&&-1*c>a}if(o)return i.touchPosX=null,i.touchPosY=null,i._hide(),!1}(i.scrollTop()<0&&0>a||r>n-2&&n+2>r&&a>0)&&(e.preventDefault(),e.stopPropagation())}}),i.on("click touchend touchstart touchmove",function(e){e.stopPropagation()}),i.on("click",'a[href="#'+o+'"]',function(e){e.preventDefault(),e.stopPropagation(),l.target.removeClass(l.visibleClass)}),n.on("click touchend",function(e){i._hide(e)}),n.on("click",'a[href="#'+o+'"]',function(e){e.preventDefault(),e.stopPropagation(),l.target.toggleClass(l.visibleClass)}),l.hideOnEscape&&r.on("keydown",function(e){27==e.keyCode&&i._hide(e)}),i},e.fn.placeholder=function(){if("undefined"!=typeof document.createElement("input").placeholder)return e(this);if(0==this.length)return a;if(this.length>1){for(var t=0;t<this.length;t++)e(this[t]).placeholder();return a}var a=e(this);return a.find("input[type=text],textarea").each(function(){var t=e(this);(""==t.val()||t.val()==t.attr("placeholder"))&&t.addClass("polyfill-placeholder").val(t.attr("placeholder"))}).on("blur",function(){var t=e(this);t.attr("name").match(/-polyfill-field$/)||""==t.val()&&t.addClass("polyfill-placeholder").val(t.attr("placeholder"))}).on("focus",function(){var t=e(this);t.attr("name").match(/-polyfill-field$/)||t.val()==t.attr("placeholder")&&t.removeClass("polyfill-placeholder").val("")}),a.find("input[type=password]").each(function(){var t=e(this),a=e(e("<div>").append(t.clone()).remove().html().replace(/type="password"/i,'type="text"').replace(/type=password/i,"type=text"));""!=t.attr("id")&&a.attr("id",t.attr("id")+"-polyfill-field"),""!=t.attr("name")&&a.attr("name",t.attr("name")+"-polyfill-field"),a.addClass("polyfill-placeholder").val(a.attr("placeholder")).insertAfter(t),""==t.val()?t.hide():a.hide(),t.on("blur",function(e){e.preventDefault();var a=t.parent().find("input[name="+t.attr("name")+"-polyfill-field]");""==t.val()&&(t.hide(),a.show())}),a.on("focus",function(e){e.preventDefault();var t=a.parent().find("input[name="+a.attr("name").replace("-polyfill-field","")+"]");a.hide(),t.show().focus()}).on("keypress",function(e){e.preventDefault(),a.val("")})}),a.on("submit",function(){a.find("input[type=text],input[type=password],textarea").each(function(){var t=e(this);t.attr("name").match(/-polyfill-field$/)&&t.attr("name",""),t.val()==t.attr("placeholder")&&(t.removeClass("polyfill-placeholder"),t.val(""))})}).on("reset",function(t){t.preventDefault(),a.find("select").val(e("option:first").val()),a.find("input,textarea").each(function(){var t,a=e(this);switch(a.removeClass("polyfill-placeholder"),this.type){case"submit":case"reset":break;case"password":a.val(a.attr("defaultValue")),t=a.parent().find("input[name="+a.attr("name")+"-polyfill-field]"),""==a.val()?(a.hide(),t.show()):(a.show(),t.hide());break;case"checkbox":case"radio":a.attr("checked",a.attr("defaultValue"));break;case"text":case"textarea":a.val(a.attr("defaultValue")),""==a.val()&&(a.addClass("polyfill-placeholder"),a.val(a.attr("placeholder")));break;default:a.val(a.attr("defaultValue"))}})}),a},e.prioritize=function(t,a){var l="__prioritize";"jQuery"!=typeof t&&(t=e(t)),t.each(function(){var t,i=e(this),n=i.parent();if(0!=n.length)if(i.data(l)){if(a)return;t=i.data(l),i.insertAfter(t),i.removeData(l)}else{if(!a)return;if(t=i.prev(),0==t.length)return;i.prependTo(n),i.data(l,t)}})}}(jQuery);
|
|
/*script*/
|
|
$("tr").click(function(){window.location.href=$(this).find("a").attr("href")}),$(document).ready(function(){var n=new Array(".textOptions");n=n.join(",");var t=$(n).css("font-size");$(".resetFont").click(function(){$(n).css("font-size",t)}),$(".increaseFont").click(function(){var t=$(n).css("font-size"),s=parseFloat(t,10),c=1.1*s;return $(n).css("font-size",c),!1}),$(".decreaseFont").click(function(){var t=$(n).css("font-size"),s=parseFloat(t,10),c=.9*s;return $(n).css("font-size",c),!1})}); |