//_mini.js eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$=u(a,b){b=b||M;q(F a!=\'2d\'){q(F a==\'1w\'){q(G.1Z===V&&a.W&&a.W==1){C c=G.H;Q(C d 1D c){a[d]=c[d]}}E q(F a.18==\'u\'&&a.18()==\'z.19\'){a.3m()}}B a}C e=14 z.19();e.3n(a);q(M.3o){e.1a(b.3o(a))}E{$.3p(e,b)}q(e.I()===0&&e.1N.K(/^\\#\\w+$/)){B 1d}E q(e.I()==1&&(e.1N.K(/^\\#\\w+$/)||z.19.3q.2e(u(v){B v===e.1N}))){B e.X[0]}E{B e}};$.3p=u(g,h){h=h||M;C i=[h];C j=[],s=0;C l=g.1N.1k(",");C m=l.I;C n=[];Q(s=0;s")+1){i=$.3r(b);q(k+1==a.I){g.1a(i)}B V}E q(b.1b(\'[\')+1){i=$.3s(i,b);q(k+1==a.I){g.1a(i)}B V}E q(b.1b("~")+1){i=$.3t(i,b);q(k+1==a.I){g.1a(i)}B V}E q(b.1b("+")+1){i=$.3u(i,b);q(k+1==a.I){g.1a(i)}B V}E q(b.1b(":")+1){i=$.3v(i,b);q(k+1==a.I){g.1a(i)}B V}E q((b.1b("#")===0&&b.K(/^\\#\\w+$/))||b.K(/\\w+\\#\\w+/)){C c=$.2C(b);q(c){i=(c 1E 1x)?c:[c];q(k+1==a.I){g.1a(i)}}B V}E q(b.1b(".")!==T){C d=b.1b(".");C e=b.1b("[");C f=b.1b("]");q(d+1&&!(d>e&&d");C c=$.1p([M.1z],b[1]);C d=14 1c(b[0],\'i\');C e=[];C f=c.I;Q(C n=0;n1){c+=\'.\'}c+=b[m];1g{23=23[b[m]]}1h(e){}q(F 23==\'O\'){9.3L.N(c);2P=c.1i(/\\./g,"/");z.3M(z.2M+\'/\'+2P+\'.2Q\')}}},3M:u(b){C c=0;(u(){C a=14 z.1j({1H:b,1s:0,1t:\'2R\',1l:\'2Q\',2l:z.5c?1:0,2m:u(r){1g{c=1}1h(e){c=0;24 e.5d;z.3K.2N(z.3N[13]+"\\3O: "+b+"\\n"+z.Y.3P(e))}a=1d}}).3Q()}());B c},5e:{},3N:[],3R:[],3S:[],5f:u(o){C a=[];C b=o.I;Q(C x=0;x\'+28+\'\'}},R:u(a){Q(C b 1D 9){q(9.49(b)&&!z.Y[b]||b==\'27\'){a(9[b],b,9)}}}};z.19=u(b){Q(C c 1D b){9[c]=b[c]}9.X=[];9.2X={};C d=9;[\'R\',\'5L\',\'1P\',\'5M\',\'2e\',\'1b\',\'3B\',\'2r\'].R(u(v,k,a){d[v]=u(a){B d.X[v](a)}})};z.19.H={1N:\'\',3m:u(){q(G.1Z){C x,2s,2Y=G.H,1O=9.X.I;Q(x=0;x<1O;x++){Q(2s 1D 2Y){9.X[x][2s]=2Y[2s]}}}},3H:u(){9.X=[]},3n:u(a){9.1N=z.19.4a(a)},1a:u(a){a=a 1E 1x||(a 1E 5N||a 1E 5O)?a:[a];C b=a.I;C c,x=0,L;C d=G.1Z;C e=G.H;Q(x=0;x~\\+])\\s*/g,"$1");B a};z.19.1T=0;z.19.3q=[\'2t\',\'1z\',\'2M\',\'4e\',\'5Q\'];z.1j=u(a){1g{9.o=14 J.2T()}1h(e){1g{9.o=14 J.5R("5S.5T")}1h(5U){2Z(\'5V 17 5W 2L 5X 3J\');}}z.Y.27(a,9);q(z.18(a.11)==\'1w\'){9.11=z.Y.2o(a.11)}};z.1j.1f=u(){};z.1j.4f=\'4g\';z.1j.4h=\'30\';z.1j.4i=\'\';z.1j.H={2u:0,2l:9.2l||0,11:9.11||\'\',1l:9.1l||\'\',1s:9.1s,31:9.31||0,2v:u(){C a=\'\';C b=\'\';q(9.o.5Y!=4||9.2u==1){B V}q(F 9.4j==\'u\'){9.2m=9.4j}9.2u=1;9.1U=9.o.32("33-4k");9.4l=9.o.32("33-5Z");q(9.4l>9.60){q(F 9.4m==\'u\'){9.4m()}9.o.29();B}q(9.1l===\'\'){q(9.1U){q(9.1U.K(\'4n/34\')){9.1l=\'34\'}E q(9.1U.K(\'30/4o\')){9.1l=\'4o\'}E q(9.1U.K(\'30/35\')){9.1l=\'35\'}E q(9.1U.K(\'2n/1e\')){9.1l=\'2n\'}}E{9.1l=z.1j.4h}}9.1f(2,"\\61\\4p: "+9.o.36+"\\4p 62: "+9.o.4q+"\\n"+9.o.4r()+"\\63: \\n"+(9.o.1J||\'64 65 66 ;(\')+"\\n");C c=V;q(F 9.1o!=\'O\'){J.4s(9.1o)}c=9.4t.1B(9.o,9.o.36,9.o.4q);q(c===T||(9.o.36!=67&&9.31!==1)){B T}2g(9.1l){U\'4e\':q(F 9.4u===\'O\'){9.1K=9.o.4r()}E{9.1K=9.o.32(9.4u)}S;U\'35\':q(9.o.4v!==1d){9.1K=9.o.4v.1R}E{9.1f(3)}S;U\'2Q\':b=9.o.1J;S;U\'34\':b=\'9.1K=\'+9.o.1J;S;U\'2n\':9.1K=(9.o.1J===0)?0:1;S;2F:9.1K=9.o.1J}q(b!==\'\'){1g{68(b)}1h(69){9.1f(4)}}9.2m(9.1K);q(F 9.L!=\'O\'){q(z.$(9.L)){9.L=z.$(9.L);q(F 9.L.1e!=\'O\'){9.L.1e=9.o.1J}E{9.L.2J=9.o.1J}}E{9.6a(5)}}9.o.29();B 9},1f:u(a,b){q(9.2l==1){C c=(b||\'\')+"\\6b\\3O: ";q(9.1t==\'2R\'){c+=\'\'+9.1H+\'?\'+9.11+\'\'}E{c+=9.1H}c+="\\6d: "+9.1t+"\\6e: "+9.1l+"\\6f: "+9.1s+"\\6g: "+9.11;z.1j.1f(a,c);q(F 9.4w==\'u\'){9.4w(a,c)}}},37:0,3Q:u(a){9.2u=0;9.1t=(F 9.1t!=\'O\')?9.1t:z.1j.4f;C t=9;a=a||t.1H||z.1j.4i;t.1H=a;q(!t.o){B T}q(F t.1s==\'O\'){t.1s=V}E{t.1s=T}t.1f(1);t.o.2v=u(){t.2v()};q(z.18(t.11)==\'1w\'){t.11=z.Y.2o(t.11)}q(t.1t==\'2R\'&&t.11!==O){a=a+\'?\'+t.11}q(t.37){t.1L=0;t.1o=J.4x(u(){q(t.1L>=t.37){t.29();t.1L=0;q(F t.2a==\'u\'){t.2a()}J.4s(t.1o)}E{t.1L++}},1)}q(!a){2Z(\'A z.1j 6h 6i 6j 1H 6k? 6l 4y 6m 6n 4z 4A 6o 11: \'+t.11);}t.o.6p(t.1t,a,t.1s);q(t.1t==\'4g\'){1g{t.o.6q("33-4k","4n/x-6r-6s-6t")}1h(e){}}1g{t.o.4z(t.11)}1h(6u){}q(!t.1s){t.2v()}},29:u(){9.o.29();q(F 9.6v!=\'O\'){9.1o.6w()}9.4B()},2m:u(){},2a:u(){},4t:u(a,b){},4B:u(){}};z.1V={1M:u(o){C a=0,1o,1L=0;o.38=o.38||[];o.39=o.39||10;o.1W=o.1W||2U;q(o.1W==-1){o.1W=6x}q(F o.1M==\'u\'){1o=J.4x(u(){1L+=1;q(1L>=o.1W){J.3a(1o);q(F o.2a==\'u\'){o.2a(o.1C)}B}q(o.1C==\'1z\'&&M.1z){J.3a(1o);a=1;o.1C=M.1z}E q(o.1C!=\'1z\'&&z.$(o.1C)){J.3a(1o);a=1}q(a==1){o.1M.4d(z.$(o.1C),o.38)}},o.39)}E{2Z(\'z.1V.1M: 6y 1w 6z 6A 6B a 1M 6C 6D 6E 6F 4A 1V 1A "\'+o.1C+\'" 4y 6G\');}}};1x.H.2r=u(a){B 9.2e(u(v){B v===a})};1x.H.1X=u(a){B 9.1P(u(v){q(z.18(a)!=\'25\'){B v!=a}E{B!a.2r(v)}})};1G.H.3b=u(a){C c=9.1i(/(^\\s+|\\s+$)/).1i("#","");C d=3U(c,16);C r=(d>>16)&3c;C g=(d>>8)&3c;C b=d&3c;q(a){B[r,g,b]}E{B\'6H(\'+r+\', \'+g+\', \'+b+\')\'}};1G.H.3d=u(){B 1G(9).1i(/-\\D/6I,u(m){B m.6J(m.I-1).3F()})};z.1n={6K:1,6L:[],4C:[\'6M\',\'4D\',\'6N\',\'2q\',\'1S\',\'2p\',\'2b\',\'6O\']};z.P={1a:u(){q(J.4E){B u(a,b,c){a=z.$(a);C d={12:a,1Y:b,2w:c};a.4E(b,c,T);B z.P.3e(d)}}E q(J.4F){B u(a,b,c){a=z.$(a);C f=u(){c.1B(a,J.2x)};C d={12:a,1Y:b,2w:f};a.4F(\'4G\'+b,f);B z.P.3e(d)}}}(),1f:[],3f:u(e){q(F e.2c==\'u\'){e.3f()}E{e.6P=T}},3e:u(a){z.P.1f.N(a);B a},3g:u(e){C a=T;2g(e.1Y){U\'6Q\':a=e.3g||e.6R;S;U\'6S\':a=e.3g||e.6T;S}1g{q(a.W&&(a.W==3||a.1F==\'4H\')){a=a.1m}}1h(2N){a=z.P.2y(e)}B $(a)},1X:u(a){q(a.12.4I){a.12.4I(a.1Y,a.2w,T)}E q(a.12.4J){a.12.4J("4G"+a.1Y,a.2w)}},4K:u(){z.P.1f.R(u(a){z.P.1X(a)});z.P.1f=[]},6U:u(e){z.P.2c(e);z.P.3f(e)},2c:u(e){q(F e.2c==\'u\'){e.2c()}E{e.6V=V}},2y:u(e){C a=(e.2y!==O)?e.2y:e.6W;q(a.W&&(a.W==3||a.1F==\'4H\')){a=a.1m}B $(a)}};z.1A=u(o){C d,c;q(z.18(o)==\'z.1A\'){B o}q(F o==\'1w\'){q(o.3h==\'6X\'&&z.1V.4L){d=14 z.1V.4L(o.1Y,o.6Y,o.6Z)}E{d=M.70(o.3h)}}q(G.1Z){z.Y.27(G.H,d);o=z.Y.46(o)}q(F o.3i!=\'O\'){d.1n(o.3i);24 o.3i}q(F o.1n!=\'O\'){d.1n(o.1n);24 o.1n}q(F o.2z!=\'O\'){C e=o.2z.I;Q(c=0;c=1){b=1}9.1v.2B=b;q(F 9.1v.1P==\'2d\'&&9.1v.4V){9.1v.4V=1;9.1v.1P="7m(2B:"+b*7n+")"}}E{a=a.3d();1g{9.1v[a]=b}1h(e){}}};G.H.18=u(){B\'z.1A\'};q(!1x.H.R){z.2O(\'7o\')}q(z.17.1Q){z.2O(\'1Q\')}E{z.1Q={7p:u(){},7q:u(a){}}}z.1V.1M({1C:\'1z\',1M:u(){z.3R.R(u(v){q(F v==\'u\'){v()}})},1W:2U,7r:u(){q(F z.4W==\'u\'){z.4W()}}});z.P.1a(J,\'7s\',z.17.2V);z.P.1a(J,\'7t\',u(e){z.3S.R(u(v){q(F(v)==\'u\'){v(e)}});z.P.4K()});',62,464,'|||||||||this|||||||||||||||||if||||function|||||sb||return|var||else|typeof|Element|prototype|length|window|match|node|document|push|undefined|events|for|forEach|break|false|case|true|nodeType|nodes|objects|||data|el||new|elements||browser|typeOf|nodeList|add|indexOf|RegExp|null|value|log|try|catch|replace|ajax|split|format|parentNode|styles|timer|getElementsByTagName|while|attrVal|async|method|agent|style|object|Array|className|body|element|call|id|in|instanceof|nodeName|String|url|version|responseText|response|count|onReady|selector|len|filter|ie6|documentElement|border|sb_id|contentType|dom|tries|remove|type|emulated|cur_class_name|getNextSibling|toLowerCase|unit|delete|array|arr|infuse|str|abort|onTimeout|left|stopPropagation|string|some|attr|switch|nextSibling|getPreviousSibling|nn|colors|debug|onResponse|boolean|serialize|margin|padding|inArray|prop|html|completed|onreadystatechange|fn|event|target|children|eventsAdded|opacity|getElementById|len2|operator|default|uniqueID|notSelector|parts|innerHTML|child|not|base|error|include|file|js|get|number|XMLHttpRequest|600|measure|encodeURIComponent|sb_ids|ep|throw|text|local|getResponseHeader|Content|json|xml|status|timeout|args|interval|clearTimeout|hex2rgb|0xFF|toCamel|record|preventDefault|relatedTarget|tag|addAttributes|appendChild|appendTo|defaultView|getElementPrototypes|setSelector|querySelectorAll|parseSelectors|singleTags|getElementsByParent|getElementsByAttributes|getElementsBySiblingCombinator|getElementsByAdjacentSibling|parsePseudoSelectors|getElementsByClassName|test|len1|attrConvert|getAttribute|lastIndexOf|firstChild|sbid|siblingNodeName|toUpperCase|appendToTop|empty|sbBase|surebert|consol|included|load|messages|nURL|dump|fetch|onbodyload|onleavepage|uid|parseInt|getAgent|opera|childNodes|all|compatMode|ie|innerWidth|clientWidth|clientHeight|init|join|copy|pre|5px|hasOwnProperty|cleanSelector|firePerNode|arguments|apply|head|defaultMethod|post|defaultFormat|defaultURL|handler|Type|contentLength|onContentLengthExceeded|application|javascript|nStatus|statusText|getAllResponseHeaders|clearInterval|onHeaders|header|responseXML|onLog|setInterval|is|send|the|onAbort|pxProps|width|addEventListener|attachEvent|on|EMBED|removeEventListener|detachEvent|removeAll|createNamedElement|appendBefore|insertBefore|offsetParent|lastEventAdded|setStyle|color|currentStyle|getComputedStyle|px|zoom|onbodynotready|do|concat|previousSibling|getFirstChild|getLastChild|lastChild|before|span|ddd|first|last|only|write|createIfNotExists|css|loadDebug|stack|math|toArray|Function|float|textnode|uid_|unixTime|Date|getTime|substring|functions|utils|widget|forms|safari|firefox|navigator|userAgent|op|ff|sf|iphone|_iphone|ipod|_ipod|400|500|other|innerHeight|CANNOT|PROCESS|VALUE|1px|map|every|NodeList|StaticNodeList|drop|title|ActiveXObject|Microsoft|XMLHTTP|e3|This|does|support|readyState|Length|maxContentLength|nHEADERS|Text|nRESPONSE|PAGE|WAS|BLANK|200|eval|e2|addToLog|nSENT|href|nMETHOD|nFORMAT|nASYNC|nDATA|instance|has|no|set|But|trying|to|following|open|setRequestHeader|www|form|urlencoded|e1|onmillisec|reset|99999999|You|argument|must|have|property|that|runs|when|available|rgb|gi|charAt|numRules|sheets|fontSize|height|top|returnValue|mouseout|toElement|mouseover|fromElement|stopAndPrevent|cancelBubble|srcElement|input|name|checked|createElement|removeAttribute|addClassName|append|appendAfter|getX|offsetLeft|getY|offsetTop|hasClassName|removeChild|removeClassName|replaceChild|eventRemove|eventsRemoveAll|getStyle|getPropertyValue|rgba|transparent|em|cm|pt|alpha|100|js1_5|pngFix|pngFixBg|ontimeout|resize|unload'.split('|'),0,{})) //cookies.js /** @Name: sb.cookies @Author: Paul Visco @Version: 1.3 07/08/08 @Description: Used to handle cookies - which can set values between client visits */ sb.cookies ={ path : '/', domain : '', onlog : '', /** @Name: sb.cookies.get @Description: Used to get cookie values @Param: String name The name of the cookie who's value you are trying to get @Return: String Returns the value stored for the cookie or false if the cookie is not found @Example: sb.cookies.get('myCookie', 'paul'); */ get : function(name){ var i,n, parts = document.cookie.split(';'); for(i=0;iYou need at least flashplayer 8 to play the swf' }); */ sb.swf = function(params){ if(typeof params == 'object'){ sb.objects.infuse(params, this); } this.width = this.width || '400px'; this.height = this.height || '300px'; this.bgColor = this.bgColor || '#FFFFFF'; this.version = this.version || 5; this.allowFullScreen = this.allowFullScreen || 'true'; this.alt = this.alt || ''; this.src = this.src || ''; this.wmode = this.wmode || ''; if(typeof this.id =='undefined'){ this.id = 'sb_swf_'+sb.swf.instanceId; sb.swf.instanceId++; } }; /** @Name: sb.swf.prototype @Description: The properties of any sb.swf instance. All sb.swf.prototype examples below assume the following sb.swf example object was created @Example: var mySwf = new sb.swf({ src : 'surebert.swf', bgColor : '#000000', wmode : 'transparent', width : 400, height : 300, version : 8, id : 'swify', alt : '
You need at least flashplayer 8 to play the swf
' }); */ sb.swf.prototype = { getInterface : function(){ var movieName = this.id; if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieName]; } else { return document.getElementById(movieName); } }, /** @Name: sb.swf.prototype.toHTML @Description: Converts the sb.swf into the appropriate swf code for the browser being used by the client @Return: String The HTML code required to embed the flash swf into the DOM, can be used as the innerHTML of another element @Example: var string = mySwf.toHTML(); //on embed style browsers returns //on explorer returns */ toHTML : function(){ var html=''; if(this.version > sb.swf.version){ return this.alt; } if(sb.swf.format=='embed'){ html = ''; } else if(sb.swf.format=='object'){ html = ''; if(typeof this.flashvars =='object'){ html +=''; } html +=''; } return html; }, /** @Name: sb.swf.prototype.embed @Description: Converts the sb.swf into the appropriate swf code for the browser being used by the client and inserts that code into the element specified @Param: element el Either an object reference to a dom element or a string reference that can be passed through sb.$ e.g. use the elements id '#someElement' @Return: String The HTML code required to embed the flash swf into the DOM, can be used as the innerHTML of another element @Example: mySwf.embed('#someElement'); */ embed : function(el){ el = $(el); el.innerHTML = this.toHTML(); return el; } }; sb.swf.infuse = sb.objects.infuse; sb.swf.infuse({ /** @Name: sb.swf.version @Description: Used Internally */ version : 4, /** @Name: sb.swf.swfs @Description: Used Internally */ swfs : [], /** @Name: sb.swf.instanceId @Description: Used Internally */ instanceId : 0, /** @Name: sb.swf.check @Description: Used Internally */ check : function(){ var version, description; try{ version = new RegExp("\\d{1}\.\\d{0,5}", "i"); if(window.navigator.plugins["Shockwave Flash"]){ description = window.navigator.plugins["Shockwave Flash"].description; if(description.match(version)){ sb.swf.version = description.match(version); } } } catch(e){sb.swf.version=0;} return sb.swf.version; }, /** @Name: sb.swf.testIe @Description: Used Internally */ testIe : function(){ try{ if(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash." + sb.swf.version)){ return false; } } catch(e){return true;} }, /** @Name: sb.swf.ieCheck @Description: Used Internally */ ieCheck : function(){ try{ //THERE MUST BE A BETTER SOLUTION while(!sb.swf.testIe()){ sb.swf.version++; } sb.swf.version--; return sb.swf.version; } catch(e){ return true; } }, /** @Name: sb.swf.cleanup @Description: Used Internally */ cleanup : function() { try{ sb.$('object').forEach(function(obj){ obj.style.display='none'; for(var prop in obj){ if(typeof obj == 'function'){obj[prop] = function(){};} } }); }catch(e){} }, /** @Name: sb.swf.unload @Description: Used Internally */ unload : function() { __flash_unloadHandler = function(){}; __flash_savedUnloadHandler = function(){}; window.attachEvent( "onunload", sb.swf.cleanup ); }, /** @Name: sb.swf.detect @Description: Used Internally */ detect : function(){ for(var x=0;x>2] >> ((i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); } return str; }, /** @Description: Used Internally. */ hex : function(s){ return this.binl2hex(this.core(this.str2binl(s), s.length * this.chrsz)); }, /** @Description: Used Internally. */ b64 : function(s){ return this.binl2b64(this.core(this.str2binl(s), s.length * this.chrsz)); }, /** @Description: Used Internally. */ str : function(s){ return this.binl2str(this.core(this.str2binl(s), s.length * this.chrsz)); }, /** @Description: Used Internally. */ hex_hmac : function(key, data){ return this.binl2hex(this.core_hmac(key, data)); }, /** @Description: Used Internally. */ b64_hmac : function(key, data) { return this.binl2b64(this.core_hmac(key, data)); }, /** @Description: Used Internally. */ str_hmac : function(key, data) { return this.binl2str(this.core_hmac(key, data)); }, /** @Description: Used Internally. Calculate the MD5 of an array of little-endian words, and a bit length */ core : function(x, len){ /* append padding */ x[len >> 5] |= 0x80 << ((len) % 32); x[(((len + 64) >>> 9) << 4) + 14] = len; var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; for(var i = 0; i < x.length; i += 16){ var olda = a; var oldb = b; var oldc = c; var oldd = d; a = this.ff(a, b, c, d, x[i+ 0], 7 , -680876936); d = this.ff(d, a, b, c, x[i+ 1], 12, -389564586); c = this.ff(c, d, a, b, x[i+ 2], 17, 606105819); b = this.ff(b, c, d, a, x[i+ 3], 22, -1044525330); a = this.ff(a, b, c, d, x[i+ 4], 7 , -176418897); d = this.ff(d, a, b, c, x[i+ 5], 12, 1200080426); c = this.ff(c, d, a, b, x[i+ 6], 17, -1473231341); b = this.ff(b, c, d, a, x[i+ 7], 22, -45705983); a = this.ff(a, b, c, d, x[i+ 8], 7 , 1770035416); d = this.ff(d, a, b, c, x[i+ 9], 12, -1958414417); c = this.ff(c, d, a, b, x[i+10], 17, -42063); b = this.ff(b, c, d, a, x[i+11], 22, -1990404162); a = this.ff(a, b, c, d, x[i+12], 7 , 1804603682); d = this.ff(d, a, b, c, x[i+13], 12, -40341101); c = this.ff(c, d, a, b, x[i+14], 17, -1502002290); b = this.ff(b, c, d, a, x[i+15], 22, 1236535329); a = this.gg(a, b, c, d, x[i+ 1], 5 , -165796510); d = this.gg(d, a, b, c, x[i+ 6], 9 , -1069501632); c = this.gg(c, d, a, b, x[i+11], 14, 643717713); b = this.gg(b, c, d, a, x[i+ 0], 20, -373897302); a = this.gg(a, b, c, d, x[i+ 5], 5 , -701558691); d = this.gg(d, a, b, c, x[i+10], 9 , 38016083); c = this.gg(c, d, a, b, x[i+15], 14, -660478335); b = this.gg(b, c, d, a, x[i+ 4], 20, -405537848); a = this.gg(a, b, c, d, x[i+ 9], 5 , 568446438); d = this.gg(d, a, b, c, x[i+14], 9 , -1019803690); c = this.gg(c, d, a, b, x[i+ 3], 14, -187363961); b = this.gg(b, c, d, a, x[i+ 8], 20, 1163531501); a = this.gg(a, b, c, d, x[i+13], 5 , -1444681467); d = this.gg(d, a, b, c, x[i+ 2], 9 , -51403784); c = this.gg(c, d, a, b, x[i+ 7], 14, 1735328473); b = this.gg(b, c, d, a, x[i+12], 20, -1926607734); a = this.hh(a, b, c, d, x[i+ 5], 4 , -378558); d = this.hh(d, a, b, c, x[i+ 8], 11, -2022574463); c = this.hh(c, d, a, b, x[i+11], 16, 1839030562); b = this.hh(b, c, d, a, x[i+14], 23, -35309556); a = this.hh(a, b, c, d, x[i+ 1], 4 , -1530992060); d = this.hh(d, a, b, c, x[i+ 4], 11, 1272893353); c = this.hh(c, d, a, b, x[i+ 7], 16, -155497632); b = this.hh(b, c, d, a, x[i+10], 23, -1094730640); a = this.hh(a, b, c, d, x[i+13], 4 , 681279174); d = this.hh(d, a, b, c, x[i+ 0], 11, -358537222); c = this.hh(c, d, a, b, x[i+ 3], 16, -722521979); b = this.hh(b, c, d, a, x[i+ 6], 23, 76029189); a = this.hh(a, b, c, d, x[i+ 9], 4 , -640364487); d = this.hh(d, a, b, c, x[i+12], 11, -421815835); c = this.hh(c, d, a, b, x[i+15], 16, 530742520); b = this.hh(b, c, d, a, x[i+ 2], 23, -995338651); a = this.ii(a, b, c, d, x[i+ 0], 6 , -198630844); d = this.ii(d, a, b, c, x[i+ 7], 10, 1126891415); c = this.ii(c, d, a, b, x[i+14], 15, -1416354905); b = this.ii(b, c, d, a, x[i+ 5], 21, -57434055); a = this.ii(a, b, c, d, x[i+12], 6 , 1700485571); d = this.ii(d, a, b, c, x[i+ 3], 10, -1894986606); c = this.ii(c, d, a, b, x[i+10], 15, -1051523); b = this.ii(b, c, d, a, x[i+ 1], 21, -2054922799); a = this.ii(a, b, c, d, x[i+ 8], 6 , 1873313359); d = this.ii(d, a, b, c, x[i+15], 10, -30611744); c = this.ii(c, d, a, b, x[i+ 6], 15, -1560198380); b = this.ii(b, c, d, a, x[i+13], 21, 1309151649); a = this.ii(a, b, c, d, x[i+ 4], 6 , -145523070); d = this.ii(d, a, b, c, x[i+11], 10, -1120210379); c = this.ii(c, d, a, b, x[i+ 2], 15, 718787259); b = this.ii(b, c, d, a, x[i+ 9], 21, -343485551); a = this.safe_add(a, olda); b = this.safe_add(b, oldb); c = this.safe_add(c, oldc); d = this.safe_add(d, oldd); } return [a, b, c, d]; }, /** @Description: Used Internally. */ cmn : function(q, a, b, x, s, t){ return this.safe_add(this.bit_rol(this.safe_add(this.safe_add(a, q), this.safe_add(x, t)), s),b); }, /** @Description: Used Internally. */ ff : function(a, b, c, d, x, s, t){ return this.cmn((b & c) | ((~b) & d), a, b, x, s, t); }, /** @Description: Used Internally. */ gg : function(a, b, c, d, x, s, t){ return this.cmn((b & d) | (c & (~d)), a, b, x, s, t); }, /** @Description: Used Internally. */ hh : function(a, b, c, d, x, s, t){ return this.cmn(b ^ c ^ d, a, b, x, s, t); }, /** @Description: Used Internally. */ ii : function(a, b, c, d, x, s, t){ return this.cmn(c ^ (b | (~d)), a, b, x, s, t); }, /** @Description: Used Internally. Calculate the HMAC-MD5, of a key and some data */ core_hmac : function(key, data){ var bkey = this.str2binl(key); if(bkey.length > 16) { bkey = this.core(bkey, key.length * this.chrsz); } var ipad = new Array(16), opad = new Array(16); for(var i = 0; i < 16; i++){ ipad[i] = bkey[i] ^ 0x36363636; opad[i] = bkey[i] ^ 0x5C5C5C5C; } var hash = this.core(ipad.concat(this.str2binl(data)), 512 + data.length * this.chrsz); return this.core(opad.concat(hash), 512 + 128); }, /** @Description: Used Internally. Add integers, wrapping at 2^32. This uses 16-bit operations internally * to work around bugs in some JS interpreters. */ safe_add : function (x, y){ var lsw = (x & 0xFFFF) + (y & 0xFFFF); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xFFFF); }, /** @Description: Used Internally. Bitwise rotate a 32-bit number to the left. */ bit_rol : function(num, cnt){ return (num << cnt) | (num >>> (32 - cnt)); }, /** @Description: Used Internally. Convert a string to an array of little-endian words. If this.chrsz is ASCII, characters >255 have their hi-byte silently ignored. */ str2binl : function (str){ var bin = []; var mask = (1 << this.chrsz) - 1; for(var i = 0; i < str.length * this.chrsz; i += this.chrsz){ bin[i>>5] |= (str.charCodeAt(i / this.chrsz) & mask) << (i%32); } return bin; }, /** @Description: Used Internally. Convert an array of little-endian words to a string */ binl2str : function (bin){ var str = ""; var mask = (1 << this.chrsz) - 1; for(var i = 0; i < bin.length * 32; i += this.chrsz){ str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); } return str; }, /** @Description: Used Internally. Convert an array of little-endian words to a base-64 string */ binl2b64 : function(binarray){ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var str = ""; for(var i = 0; i < binarray.length * 4; i += 3){ var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) |(((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); for(var j = 0; j < 4; j++){ if(i * 8 + j * 6 > binarray.length * 32) { str += sb.md5.b64pad; } else { str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); } } return str; } } }; /** @Name: String.prototype.md5 @Description: This string prototype allow you to easily convert any string to md5 @Example: 'hello world'.md5(); //return the md5 of the string 'hello world' */ String.prototype.md5 = function(){ return sb.md5.hex(this); }; //effect.js /** @Package: surebert.effects @Description: If you are going to be using color effects make sure to include sb.colors.js by adding a script tag or using sb.include('colors'); or adding it to your surebert cache @Version: v3.11 */ /** @Name: sb.effect @Type: constructor @Description: Used to create time based style effects @Params: object params .el = The element to work with .begin = the beginning value .change = the change from the beginning value. E.g. if the begin value is 10 and you want it to interate through to 20, change would be 10. If you wanted it to interate through to 0, change would be -10 .duration = the duration to use, 2 is the default, higher is slower, lower is faster. .onChange = the function that run for each iteration. It has reference to all of the "this" properties of the effect in addition to this.value which is the current value based on begin and change .onStop = a function which fires when the effect is complete .onEnd = a function which fires when the effect is stopped @Example: //set the DOM el we want to work with var myDiv = $('#accord'); //create an custom effect var myEffect = new sb.effect({ el : myDiv, begin : 10, change : 12, duration : 120, onChange : function(c){ this.el.style.fontSize = this.value+'px'; }, onEnd : function(){ //do something }, onStop : function(){ //do soemthing } }); myEffect.start(); */ sb.effect = function(params){ this.setParams(params ||{}); sb.effects.register(this); }; /** @Name: sb.effect.prototype @Type: prototype @Description: prototype methods and properties for a sb.effect instance */ sb.effect.prototype = { /** @Name: sb.effect.time @Type: integer @Description: used internally */ time : 0, /** @Name: sb.effect.duration @Type: integer @Description: The duration of teh effect from begin to end. Default is 24. Lower numbers are faster, higher numbers are slower. */ duration : 24, /** @Name: sb.effect.count @Type: integer @Description: The number of times the effect has iterated so far between begin and end. You have reference to this in your effect onChange as this.count */ count : 0, /** @Name: sb.effect.tween @Type: string @Description: The type of tweening used, see sb.tween */ tween : 'inQuart', /** @Name: sb.effect.setParams() @Type: method @Description: applies properties from an additional params object with the same structure as the one used in the constructor @Example: myEffect.setParams(); */ setParams : function(params){ sb.objects.infuse(params, this); if(typeof params.el !='undefined'){ this.el = $(this.el); } }, /** @Name: sb.effect.start() @Type: method @Description: starts the effect to run the effect @Example: myEffect.start(); */ start : function(){ var t=this; this.repeater = window.setInterval( function(){ if(t.time < t.duration){ t.time++; t.value = sb.effects.tween[t.tween](t.time,t.begin,t.change,t.duration); t.valueRounded = Math.round(t.value); t.onChange(); } else { t.count++; t.stop(); if(typeof t.onEnd =='function'){t.onEnd();} } }, 12); }, /** @Name: sb.effect.stop() @Type: method @Description: stops the effect from running. Also fires the effects onStop method if you have specified one @Example: myEffect.stop(); */ stop : function(){ if(typeof this.onStop == 'function'){this.onStop();} window.clearInterval(this.repeater); }, /** @Name: sb.effect.reset() @Type: method @Description: reset the effect to count and time to 0 and resets value and valueRounded to this.begin an. Also fires the effects onReset method if you have pecified one @Example: myEffect.reset(); */ reset : function(){ if(typeof this.onReset == 'function'){this.onReset();} this.count=0; this.value = this.begin; this.valueRounded = this.begin; this.time=0; this.stop(); }, /** @Name: sb.effect.restart() @Type: method @Description: restarts the effect. run this.reset() and this.start() @Example: myEffect.restart(); */ restart : function(){ if(typeof this.onRestart == 'function'){this.onRestart();} this.reset(); this.start(); } }; /** @Name: sb.effects @Type: object @Description: A reference to all effects registered ont he page */ sb.effects = { /** @Name: sb.registered @Type: array @Description: Used Internally. A array reference to all effects registered on the page */ registered : [], /** @Name: sb.register() @Type: method @Description: Used internally. Registers an effect on the page */ register : function(effect){ this.registered.push(effect); }, /** @Name: sb.stopAll() @Type: method @Description: Stops all the effects on the page */ stopAll : function(){ sb.effects.registered.forEach(function(v){v.stop();}); }, /** @Name: sb.startAll() @Type: method @Description: Starts all the effects on the page */ startAll : function(){ sb.effects.registered.forEach(function(v){v.start();}); } }; /** @Name: surebert.effects.tween @Type: object @Description: If you are going to be using color effects make sure to include sb.colors.js by adding a script tag or using sb.include('colors.getTweenColor'); or adding it to your surebert cache .Tweens Math adapted from http://www.synthesisters.com/hypermail/max-msp/Nov05/34305.html */ sb.effects.tween = { /** @Name: surebert.effects.tween.linear @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.linear(100, 0, 50, 5); */ linear : function(t,b,c,d) { return c*t/d + b; }, /** @Name: surebert.effects.tween.outQuint @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.outQuint(100, 0, 50, 5); */ outQuint : function(t,b,c,d) { return c*(Math.pow(t/d-1,5)+1)+b; }, /** @Name: surebert.effects.tween.inOutQuint @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inOutQuint(100, 0, 50, 5); */ inOutQuint : function(t,b,c,d) { if ((t/=d/2)<1){ return c/2*Math.pow(t,5)+b; } return c/2*(Math.pow(t-2,5)+2)+b; }, /** @Name: surebert.effects.tween.inQuad @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inQuad(100, 0, 50, 5); */ inQuad : function(t,b,c,d) { return c*(t/=d)*t + b; }, /** @Name: surebert.effects.tween.outQuad @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.outQuad(100, 0, 50, 5); */ outQuad : function(t,b,c,d) { return -c*(t/=d)*(t-2) + b; }, /** @Name: surebert.effects.tween.inOutQuad @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inOutQuad(100, 0, 50, 5); */ inOutQuad : function(t,b,c,d) { if ((t/=d/2) < 1) { return c/2*t*t + b; } return -c/2 * ((--t)*(t-2)-1)+b; }, /** @Name: surebert.effects.tween.inCubic @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inCubic(100, 0, 50, 5); */ inCubic : function(t,b,c,d) { return c*Math.pow(t/d,3)+b; }, /** @Name: surebert.effects.tween.outCubic @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.outCubic(100, 0, 50, 5); */ outCubic : function(t,b,c,d) { return c*(Math.pow(t/d-1,3)+1)+b; }, /** @Name: surebert.effects.tween.inOutCubic @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inOutCubic(100, 0, 50, 5); */ inOutCubic : function(t,b,c,d) { if ((t/=d/2)<1){ return c/2*Math.pow(t,3)+b; } return c/2*(Math.pow(t-2,3)+2)+b; }, /** @Name: surebert.effects.tween.inQuart @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inQuart(100, 0, 50, 5); */ inQuart : function(t,b,c,d) { return c* Math.pow(t/d,4) + b; }, /** @Name: surebert.effects.tween.outQuart @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.outQuart(100, 0, 50, 5); */ outQuart : function(t,b,c,d) { return -c*(Math.pow(t/d-1,4)-1)+b; }, /** @Name: surebert.effects.tween.inOutQuart @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inOutQuart(100, 0, 50, 5); */ inOutQuart : function(t,b,c,d) { if ((t/=d/2)<1){ return c/2*Math.pow(t,4)+b; } return -c/2*(Math.pow(t-2,4)-2)+b; }, /** @Name: surebert.effects.tween.inSine @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inSine(100, 0, 50, 5); */ inSine : function(t,b,c,d) { return c* (1 - Math.cos(t/d*(Math.PI/2))) + b; }, /** @Name: surebert.effects.tween.outSine @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.outSine(100, 0, 50, 5); */ outSine : function(t,b,c,d) { return c* Math.sin(t/d*(Math.PI/2)) + b; }, /** @Name: surebert.effects.tween.inOutSine @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inOutSine(100, 0, 50, 5); */ inOutSine : function(t,b,c,d) { return c/2* (1-Math.cos(Math.PI*t/d)) +b; }, /** @Name: surebert.effects.tween.inExpo @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inExpo(100, 0, 50, 5); */ inExpo : function(t,b,c,d) { return c* Math.pow(2,10*(t/d - 1)) +b; }, /** @Name: surebert.effects.tween.outExpo @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.outExpo(100, 0, 50, 5); */ outExpo : function(t,b,c,d) { return c* (-Math.pow(2,-10*t/d) + 1) + b; }, /** @Name: surebert.effects.tween.inOutExpo @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inOutExpo(100, 0, 50, 5); */ inOutExpo : function(t,b,c,d) { if ((t/=d/2) < 1){ return c/2 * Math.pow(2, 10*(t-1))+b; } return c/2 * (-Math.pow(2, -10 * --t) + 2) +b; }, /** @Name: surebert.effects.tween.inCirc @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inCirc(100, 0, 50, 5); */ inCirc : function(t,b,c,d) { return c* (1-Math.sqrt(1- (t/=d)*t)) + b; }, /** @Name: surebert.effects.tween.outCirc @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.outCirc(100, 0, 50, 5); */ outCirc : function(t,b,c,d) { return c* Math.sqrt(1-(t=t/d-1)*t) + b; }, /** @Name: surebert.effects.tween.inOutCirc @Type: method @Description: A method for interpolating between two values over time @Param float t time (elapsed since tween began) @Param float b beginning (value) @Param float b change (in value) @Param float d duration @Example: var myValue = sb.effects.tween.inOutCirc(100, 0, 50, 5); */ inOutCirc : function(t,b,c,d) { if ((t/=d/2) < 1){ return c/2 * (1-Math.sqrt(1-t*t))+b; } return c/2 * (Math.sqrt(1- (t-=2)*t)+1) +b; }, /** @Name: surebert.effects.infuse @Type: method @Example: var myValue = sb.effects.tween.infuse({ inOutCirc : function(t,b,c,d) { if ((t/=d/2) < 1){ return c/2 * (1-Math.sqrt(1-t*t))+b; } return c/2 * (Math.sqrt(1- (t-=2)*t)+1) +b; } }); */ infuse : sb.objects.infuse }; //browser/getScrollPosition.js /** @Name: sb.browser.getScrollPosition @Description: Gets the window scroll data It is automatically populated on window.onscroll. @Return Array Returns the an array of x and y scroll pos. @Example: var pos = sb.browser.getScrollPosition(); //pos = [400, 300] */ sb.browser.getScrollPosition = function(){ var x=0,y=0; if(window.pageYOffset){ y = window.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop){ y= document.documentElement.scrollTop; } sb.browser.scrollY = y; if(window.pageXSOffset){ x = window.pageXOffset; } else if (document.documentElement && document.documentElement.scrollLeft){ x = document.documentElement.scrollLeft; } sb.browser.scrollX = x; return [sb.browser.scrollX, sb.browser.scrollY]; }; sb.events.add(window, 'scroll', sb.browser.getScrollPosition); //sound.js sb.include('flashGate'); /** @Name: sb.sound @Author: Paul Visco @Description: A constructor for creating new sound object instances. Allows javascript to load, play and stop mp3 sounds. @Param String url The url of the file to play @Example: var yellow = new sb.sound( url : 'yellow.mp3', debug : true, onID3 : function(){}, onProgress : function(){} ); yellow.play(); */ sb.sound = function(params){ if(!params.url){ throw('You must pass a url to the sb.sound'); } for(var prop in params){ this[prop] = params[prop]; } this.id = sb.flashGate.getInterface().sound_create(this.url, this.debug); sb.sound.sounds[this.id] = this; }; /** @Name: sb.sound.sounds @Description: Used Internally */ sb.sound.sounds = []; /** @Name: sb.sound.stopAll @Description: Stops all sounds playing on the page @Param String url Optional The url of the file to stop @Example: sb.sound.stopAll(); //or sb.sound.stopAll('yellow.mp3'); */ sb.sound.stopAll = function(url){ url = url || ''; sb.flashGate.getInterface().sounds_stop_all(url); }; /** @Name: sb.sound.stopAll @Description: Sets the global volume of all sounds @Param Float A float between 0 and 1 @Example: sb.sound.setGlobalVolume(0.5); */ sb.sound.setGlobalVolume = function(volume){ sb.flashGate.getInterface().sounds_set_global_volume(volume); }; /** @Name: sb.sound.muteAll @Description: Mutes all sounds playing on the page @Param String url Optional The url of the file to mute @Example: sb.sound.muteAll(); //or sb.sound.muteAll('yellow.mp3'); */ sb.sound.muteAll = function(){ sb.flashGate.getInterface().sounds_mute_all(); }; /** @Name: sb.sound.muted @Description: When set to 1, sounds will not play @Example: sb.sound.mute = 1; */ sb.sound.muted = 0; /** @Name: sb.sound.prototype @Description: The methods of sb.sound instances */ sb.sound.prototype = { duration : -1, /** @Name: sb.sound.prototype.url @Description: String The url of the mp3 file */ url : '', /** @Name: sb.sound.prototype.id @Description: Used Internally */ id : 0, /** @Name: sb.sound.prototype.play @Param Number position The position to start the file at in milliseconds @Param Number loops The number of times to repeat the sound @Description: Plays the sound file @Example: mySound.play(); */ play : function(position, loops){ if(!sb.sound.muted){ position = position || 0; loops = loops || 0; return sb.flashGate.getInterface().sound_play(this.id, position, loops); } }, /** @Name: sb.sound.prototype.stop @Description: Stops the sound file @Example: mySound.play(); */ stop : function(){ return sb.flashGate.getInterface().sound_stop(this.id); }, /** @Name: sb.sound.prototype.getPosition @Description: Gets the current position in milliseconds @Return: Number return the current position in milliseconds @Example: mySound.getPosition(); */ getPosition : function(){ return sb.flashGate.getInterface().sound_get_position(this.id); }, /** @Name: sb.sound.prototype.setPositionPercent @Description: Moves the playhead to a certain position in percent of total @Example: mySound.setPositionPercent(40); */ setPositionPercent : function(percent){ return sb.flashGate.getInterface().sound_set_position_percent(this.id, percent); }, /** @Name: sb.sound.prototype.getPositionPercent @Description: Gets the current position in percent of total @Return: Number return the current position in percent of total @Example: mySound.getPositionPercent(); */ getPositionPercent : function(){ return sb.flashGate.getInterface().sound_get_position_percent(this.id); }, /** @Name: sb.sound.prototype.setPosition @Description: Moves the playhead to a certain position in milliseconds @Example: mySound.setPosition(4135); */ setPosition : function(position){ return sb.flashGate.getInterface().sound_set_position(this.id, position); }, /** @Name: sb.sound.prototype.getVolume @Description: Gets the current volume @Return: float between 0 and 1 @Example: mySound.getVolume(); */ getVolume : function(volume){ return sb.flashGate.getInterface().sound_get_volume(this.id); }, /** @Name: sb.sound.prototype.getVolume @Description: Gets the current volume @Param: Float volume between 0 and 1 @Example: mySound.setVolume(0.5); */ setVolume : function(volume){ sb.flashGate.getInterface().sound_set_volume(this.id, volume); }, /** @Name: sb.sound.prototype.getPan @Description: Gets the current pan position @Return: float between -1 (left) and 1 (right) @Example: mySound.getPan(); */ getPan : function(){ return sb.flashGate.getInterface().sound_get_pan(this.id); }, /** @Name: sb.sound.prototype.setPan @Description: sets the current pan position @Param: float pan between -1 (left) and 1 (right) @Example: mySound.setPan(0.5); */ setPan : function(pan){ sb.flashGate.getInterface().sound_set_pan(this.id, pan); }, /** @Name: sb.sound.prototype.mute @Description: sets the volume to zero for this sound but keeps playing @Example: mySound.mute(); */ mute : function(){ this.setVolume(0); }, //tags.album, tags.year, tags.artist, tags.songName, tags.comment, tags.track, tags.genre onID3 : function(){}, //song.sizeK, song.bytesLoaded, song.bytesTotal onLoad : function(){}, //message onError : function(){}, //song.position, song.length, song.percent onProgress : function(data){} }; //uploadButton.js if(typeof sb.swf =='undefined'){ sb.include('swf'); } /* @Name: sb.uploadButton @Description: Instantiates a new upload @Example: var uploader = new sb.uploadButton({ debug : true, maxFiles : 5, maxFileSizeK : 5000000, url : 'http://frameworkdev.sv/uploads/test', data : { friend : 'tim', nano : "Hello there timmy's dog" }, onReturnData : function(file){ sb.objects.alert(file); }, onBeforeBrowse : function(){ return true; }, onSelect : function(filenames){ return true; }, onExceedsMaxFiles : function(){}, onExceedsMaxFileSizeK : function(file){}, onError : function(data){ alert(data.message); }, styles : { backgroundColor : '0x00FF00', backgroundColorRoll : '0xFFFF00', borderColor : '0xFF0000', color : '0xFF0000', cornerRadius : '15', borderThickness : '0', fontSize : 16, width : 62, height : 24, fontSize : 16, font : 'Tahoma' } }); uploader.embed('#chicken'); */ sb.uploadButton = function(parameters){ this.id = sb.uploadButton.uploads.length; for(var prop in parameters){ this[prop] = parameters[prop]; } sb.uploadButton.uploads.push(this); //create swf and associate call to thei sb.uploadButton for event handling this.swf = new sb.swf({ src : sb.base+"/UploadButton.swf?id="+this.id, width : this.styles.width || 62, height : this.styles.height || 24, id : 'upload'+this.id, bgcolor : '#000000', wmode: 'transparent', flashvars : { debug : (this.debug != null) ? this.debug : true, innerHTML : this.innerHTML || 'upload', debugLevel : this.debugLevel || 1 }, version : 9, alt : parameters.alt || '

You need flash player 9+ to upload

' }); this.load_params = function(){ this.swf.getInterface().create_upload(this.id); }; }; /** @Name: sb.uploadButton.uploads @Description: Used Internally */ sb.uploadButton.uploads = []; sb.uploadButton.prototype = { styles : {}, /** * Returns the HTML of the swf for testing */ toHTML : function(){ return this.swf.toHTML(); }, /** * Embeds the button into another element */ embed : function(el){ this.swf.embed(el); }, /** @Name: sb.uploadButton.prototype.setStyles @Description: Sets the MXML CSS styles for the button @Param: styles Object Hash of css properties @Example: this.setStyles( letterSpacing : '20' ); */ setStyles : function(styles){ this.swf.getInterface().set_button_styles(styles); }, /** @Name: sb.uploadButton.prototype.cancels @Description: Cancels all file uploads for this instance @Name: string name optionally cancels only for files that match the file name given */ cancel : function(name){ name = name || ''; this.swf.getInterface().upload_cancel(name); }, /** @Name: sb.uploadButton.prototype.id @Description: Used Internally */ id: 0, /** @Name: sb.uploadButton.prototype.maxFiles @Description: The maximum number of files the user can select in the browser before it throws an error and fires onMaxFilesExceeded */ maxFiles : 5, /** @Name: sb.uploadButton.prototype.maxFileSizeK @Description: The maximum file size per file that the user can upload before it throws an error and fires onMaxFileSizeExceeded */ maxFileSizeK : 1024, /** @Name: sb.uploadButton.prototype.acceptedFileTypes @Description: The file types to accept for upload */ acceptedFileTypes : '*.*', /** @Name: sb.uploadButton.prototype.method @Description: The default method to send data */ method : 'post', /** @Name: sb.uploadButton.prototype.url @Description: The URL to upload the data to */ url : '', /** @Name: sb.uploadButton.prototype.data @Description: Additional data objectw hich is url encoded into post data and sent with the files */ data : {}, /** @Name: sb.uploadButton.prototype.debug @Description: Determines if file upload debug info is traced to the flash debug player */ debug : true, /** * The verbosity level of the debug data sent to flash debug log - 1 - reports actions, 2 - reports data loaded and sent to js */ debugLevel : 1, /** @Name: sb.uploadButton.prototype.onBeforeBrowse @Description: Fires when the user presses the browse button, but before the file browser opens @Return: boolean true opens file browser, false cancels file browser opening. It does not fire oncancel, you can call it directly before issuing false return if you would like */ onBeforeBrowse : function(data){return true;}, /** @Name: sb.uploadButton.prototype.onSelect @Description: Fires when the user selects files from the browse box that pops up from pressing the button @Param: array names the file names selected @Return: boolean true uploads, false cancels upload before it starts. It does not fire oncancel, you can call it directly before issuing false return if you would like */ onSelect : function(data){return true;}, /** @Name: sb.uploadButton.prototype.onExceedsMaxFileSizeK @Description: Fires when a file exceeds the maximum file size specified and is therefore not uplaoded @Param: object file file.name, file.size, file.sizeK, file.exceededBy, file.limit, file.message */ onExceedsMaxFileSizeK : function(file){}, /** @Name: sb.uploadButton.prototype.onExceedsMaxFiles @Description: Fires when a user selects too many files @Param: object files.chosen, files.limit, files.message */ onExceedsMaxFiles : function(files){}, /** @Name: sb.uploadButton.prototype.onError @Description: Fires if the upload is canceled due to an error @Param: object file.name, file.size, file.sizeK, file.type, file.error */ onError : function(file){}, /** @Name: sb.uploadButton.prototype.onOpen @Description: Fires when the file is opened for upload on the client's computer @Param: object file.name, file.size, file.sizeK, file.type */ onOpen : function(file){}, /** @Name: sb.uploadButton.prototype.onReturnData @Description: Fires when the data is returned from the server, , must beturn something from the serer for this to fire, can be a simple space @Param: object file.name, file.size, file.sizeK, file.type, file.data */ onReturnData : function(file){}, /** @Name: sb.uploadButton.prototype.onAllComplete @Description: Fires when all uploads for this upload instance are complete @Param: object files.total */ onAllComplete : function(files){}, /** @Name: sb.uploadButton.prototype.onComplete @Description: Fires when a file is done uploading, must beturn something from the serer for this to fire, can be a simple space @Param: object file.name, file.size, file.sizeK, file.type */ onComplete : function(files){}, /** @Name: sb.uploadButton.prototype.onAllProgress @Description: Fires each time one more file is uploaded until the que is empty @Param: object files.total, files.remaining */ onAllProgress : function(files){}, /** @Name: sb.uploadButton.prototype.onProgress @Description: Fires periodically as a file uploads alerting you of the progress in percent, deosn't seem to fire for really quick uploads on local server, must return something from the serer for this to fire, can be a simple space @Param: object file.name, file.size, file.sizeK, file.type, file.bytesLoaded, file.bytesTotal, file.percent */ onProgress : function(files){}, //files.remaining /** @Name: sb.uploadButton.prototype.onCancelBrowse @Description: Fires when the user hits cancel in the file browser */ onCancelBrowse : function(){}, /** @Name: sb.uploadButton.prototype.onCancelAll @Description: Fires once when the upload que is canceled using upload.cancel(); */ onCancelAll : function(){}, /** @Name: sb.uploadButton.prototype.onCancelFile @Description: Fires when one file in the que is canceled by filename with upload.cancel(file.name); or once per file when upload.cancel()l is fired without a name specified @Param: object file.name */ onCancelFile : function(){} }; //sharedObject.js sb.include('flashGate'); /** @Name: sb.sharedObject @Author: Paul Visco @Description: gives javascript access to the flash storage */ sb.sharedObject = { /** @Name: sb.sharedObject.load @Description: loads data from the sharedObject @Param: string key The name of the stored data @Example: sb.sharedObject.load('friend'); */ load : function(key){ return sb.flashGate.getInterface().storage_engine_get(key); }, /** @Name: sb.sharedObject.save @Description: saves data in the sharedObject @Param: string key The name of the stored data @Param: string val The value to store @Example: sb.sharedObject.save('friend', 'paul'); */ save : function(key, val){ sb.flashGate.getInterface().storage_engine_set(key, val); }, /** @Name: sb.sharedObject.clear @Description: clears data for a specific key in the sharedObject @Param: string key The name of the stored data @Example: sb.sharedObject.clear('friend'); */ clear : function(key){ this.save(key, ''); }, /** @Name: sb.sharedObject.clearAll @Description: clears all data stored in the sharedObject @Example: sb.sharedObject.clearAll(); */ clearAll : function(){ sb.flashGate.getInterface().storage_engine_clear_all(); } }; //browser/$_GET.js /** @Name: sb.browser.$_GET @Description: An array of all query params e.g. url?name=paul -> $_GET['name'] = 'paul'. There is a global reference to this name $_GET. Keys that are not foudn return false; @Example: //if the url of the page was http://www.surebert.com?name=paul you could reference that query data like this if($_GET['name'] =='paul){ alert('hello paul'); } */ sb.browser.$_GET = []; $_GET = sb.browser.$_GET; /** @Name: sb.browser.populateGET @Description: Used Internally */ sb.browser.populateGET = function (){ var i,s,val,key; var q = window.location.search.substring(1); var v = q.split("&"); for (i=0;i