//MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, , MIT Style License. eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('o bF={\'bG\':1.1};k $8a(O){m(O!=b9)};k $F(O){B(!$8a(O))m N;B(O.4Y)m\'G\';o F=7g O;B(F==\'2C\'&&O.c4){23(O.7s){12 1:m\'G\';12 3:m/\\S/.2t(O.8Z)?\'bk\':\'bu\'}}B(F==\'2C\'||F==\'k\'){23(O.aR){12 2I:m\'1B\';12 7V:m\'5n\';12 18:m\'4O\'}B(7g O.V==\'4S\'){B(O.3h)m\'cT\';B(O.8r)m\'1c\'}}m F};k $2c(){o 4R={};M(o i=0;i<1c.V;i++){M(o K 1b 1c[i]){o ap=1c[i][K];o 6R=4R[K];B(6R&&$F(ap)==\'2C\'&&$F(6R)==\'2C\')4R[K]=$2c(6R,ap);17 4R[K]=ap}}m 4R};o $R=7c.R=k(){o 1q=1c;B(!1q[1])1q=[c,1q[0]];M(o K 1b 1q[1])1q[0][K]=1q[1][K];m 1q[0]};o $4Q=7c.cW=k(){M(o i=0,l=1c.V;i-1:c.3S(2E)>-1},aK:k(){m c.3l(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});2I.R({5I:k(1B){B(c.V<3)m N;B(c.V==4&&c[3]==0&&!1B)m\'c5\';o 3C=[];M(o i=0;i<3;i++){o 52=(c[i]-0).4u(16);3C.1k((52.V==1)?\'0\'+52:52)}m 1B?3C:\'#\'+3C.2h(\'\')},5H:k(1B){B(c.V!=3)m N;o 1v=[];M(o i=0;i<3;i++){1v.1k(5X((c[i].V==1)?c[i]+c[i]:c[i],16))}m 1B?1v:\'1v(\'+1v.2h(\',\')+\')\'}});7S.R({3a:k(C){o W=c;C=$2c({\'Y\':W,\'I\':N,\'1c\':1F,\'2k\':N,\'4f\':N,\'6J\':N},C);B($2B(C.1c)&&$F(C.1c)!=\'1B\')C.1c=[C.1c];m k(I){o 1q;B(C.I){I=I||U.I;1q=[(C.I===1e)?I:L C.I(I)];B(C.1c)1q.R(C.1c)}17 1q=C.1c||1c;o 3P=k(){m W.3U($5F(C.Y,W),1q)};B(C.2k)m 9H(3P,C.2k);B(C.4f)m cI(3P,C.4f);B(C.6J)5f{m 3P()}4X(cE){m N};m 3P()}},cL:k(1q,Y){m c.3a({\'1c\':1q,\'Y\':Y})},6J:k(1q,Y){m c.3a({\'1c\':1q,\'Y\':Y,\'6J\':1e})()},Y:k(Y,1q){m c.3a({\'Y\':Y,\'1c\':1q})},cU:k(Y,1q){m c.3a({\'Y\':Y,\'I\':1e,\'1c\':1q})},2k:k(2k,Y,1q){m c.3a({\'2k\':2k,\'Y\':Y,\'1c\':1q})()},4f:k(at,Y,1q){m c.3a({\'4f\':at,\'Y\':Y,\'1c\':1q})()}});ao.R({3c:k(){m 5X(c)},b4:k(){m 69(c)},1E:k(3p,1z){m 1d.3p(1z,1d.1z(3p,c))},2r:k(5L){5L=1d.3J(10,5L||0);m 1d.2r(c*5L)/5L},cN:k(W){M(o i=0;i\'}el=P.aq(el)}el=$(el);m(!1W||!el)?el:el.2i(1W)}});o 29=L 18({1j:k(T){m(T)?$R(T,c):c}});29.R=k(1W){M(o 1V 1b 1W){c.1L[1V]=1W[1V];c[1V]=$4Q.6P(1V)}};k $(el){B(!el)m N;B(el.4Y)m 33.4V(el);B([U,P].1l(el))m el;o F=$F(el);B(F==\'2E\'){el=P.7f(el);F=(el)?\'G\':N}B(F!=\'G\')m N;B(el.4Y)m 33.4V(el);B([\'2C\',\'cx\'].1l(el.6k.5B()))m el;$R(el,Q.1L);el.4Y=1e;m 33.4V(el)};P.77=P.35;k $$(){o T=[];M(o i=0,j=1c.V;i0&&7i<13)c.1s=\'f\'+7i}c.1s=c.1s||6W.bP(c.6Q).5B()}17 B(c.F.2t(/(8p|3i|bO)/)){c.1M={\'x\':I.7p||I.9h+P.2X.67,\'y\':I.7q||I.9R+P.2X.6a};c.9d={\'x\':I.7p?I.7p-U.9v:I.9h,\'y\':I.7q?I.7q-U.9t:I.9R};c.dw=(I.9P==3)||(I.eJ==2);23(c.F){12\'9E\':c.2p=I.2p||I.eK;1D;12\'9D\':c.2p=I.2p||I.8z}c.9U()}m c},1R:k(){m c.6V().76()},6V:k(){B(c.I.6V)c.I.6V();17 c.I.eI=1e;m c},76:k(){B(c.I.76)c.I.76();17 c.I.eH=N;m c}});2R.6d={2p:k(){B(c.2p&&c.2p.7s==3)c.2p=c.2p.3r},9Y:k(){5f{2R.6d.2p.1S(c)}4X(e){c.2p=c.3u}}};2R.1L.9U=(U.7W)?2R.6d.9Y:2R.6d.2p;2R.1P=L 3y({\'eG\':13,\'8B\':38,\'8C\':40,\'1t\':37,\'4k\':39,\'eL\':27,\'eM\':32,\'eR\':8,\'eS\':9,\'5j\':46});Q.2F.2q={1I:k(F,W){c.$19=c.$19||{};c.$19[F]=c.$19[F]||{\'1P\':[],\'1J\':[]};B(c.$19[F].1P.1l(W))m c;c.$19[F].1P.1k(W);o 7u=F;o 2w=Q.2q[F];B(2w){B(2w.7I)2w.7I.1S(c,W);B(2w.2K)W=2w.2K;B(2w.F)7u=2w.F}B(!c.7v)W=W.3a({\'Y\':c,\'I\':1e});c.$19[F].1J.1k(W);m c.2A(7u,W)},3Z:k(F,W){B(!c.$19||!c.$19[F])m c;o 1p=c.$19[F].1P.3S(W);B(1p==-1)m c;o 1s=c.$19[F].1P.6y(1p,1)[0];o J=c.$19[F].1J.6y(1p,1)[0];o 2w=Q.2q[F];B(2w){B(2w.2H)2w.2H.1S(c,W);B(2w.F)F=2w.F}m c.3j(F,J)},6B:k(1Y){m Q.6w(c,\'1I\',1Y)},6G:k(F){B(!c.$19)m c;B(!F){M(o 6t 1b c.$19)c.6G(6t);c.$19=1F}17 B(c.$19[F]){c.$19[F].1P.1o(k(W){c.3Z(F,W)},c);c.$19[F]=1F}m c},1i:k(F,1q,2k){B(!c.$19||!c.$19[F])m c;c.$19[F].1P.1o(k(W){W.3a({\'Y\':c,\'2k\':2k,\'1c\':1q})()},c);m c},9G:k(15,F){B(!15.$19)m c;B(!F){M(o 6t 1b 15.$19)c.9G(15,6t)}17 B(15.$19[F]){15.$19[F].1P.1o(k(W){c.1I(F,W)},c)}m c}};U.R(Q.2F.2q);P.R(Q.2F.2q);Q.R(Q.2F.2q);Q.2q=L 3y({\'8k\':{F:\'9E\',2K:k(I){I=L 2R(I);B(I.2p==c||c.7Z(I.2p))m;c.1i(\'8k\',I)}},\'8h\':{F:\'9D\',2K:k(I){I=L 2R(I);B(I.2p==c||c.7Z(I.2p))m;c.1i(\'8h\',I)}},\'5r\':{F:(U.7W)?\'9L\':\'5r\'}});7S.R({3g:k(Y,1q){m c.3a({\'Y\':Y,\'1c\':1q,\'I\':2R})}});29.R({eQ:k(a0){m L 29(c.3f(k(el){m(Q.57(el)==a0)}))},ai:k(1A,2D){o T=c.3f(k(el){m(el.1A&&el.1A.1l(1A,\' \'))});m(2D)?T:L 29(T)},ah:k(4w,2D){o T=c.3f(k(el){m(el.4w==4w)});m(2D)?T:L 29(T)},al:k(1w,7x,J,2D){o T=c.3f(k(el){o 2a=Q.6n(el,1w);B(!2a)m N;B(!7x)m 1e;23(7x){12\'=\':m(2a==J);12\'*=\':m(2a.1l(J));12\'^=\':m(2a.6p(0,J.V)==J);12\'$=\':m(2a.6p(2a.V-J.V)==J);12\'!=\':m(2a!=J);12\'~=\':m 2a.1l(J,\' \')}m N});m(2D)?T:L 29(T)}});k $E(1Q,3f){m($(3f)||P).a5(1Q)};k $eP(1Q,3f){m($(3f)||P).77(1Q)};$$.3M={\'5n\':/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([!*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/,\'43\':{7C:k(1y,36,1f,i){o 2s=[36.eN?\'87:\':\'\',1f[1]];B(1f[2])2s.1k(\'[@4w="\',1f[2],\'"]\');B(1f[3])2s.1k(\'[1l(7y(" ", @4O, " "), " \',1f[3],\' ")]\');B(1f[4]){B(1f[5]&&1f[6]){23(1f[5]){12\'*=\':2s.1k(\'[1l(@\',1f[4],\', "\',1f[6],\'")]\');1D;12\'^=\':2s.1k(\'[cZ-eO(@\',1f[4],\', "\',1f[6],\'")]\');1D;12\'$=\':2s.1k(\'[eE(@\',1f[4],\', 2E-V(@\',1f[4],\') - \',1f[6].V,\' + 1) = "\',1f[6],\'"]\');1D;12\'=\':2s.1k(\'[@\',1f[4],\'="\',1f[6],\'"]\');1D;12\'!=\':2s.1k(\'[@\',1f[4],\'!="\',1f[6],\'"]\')}}17{2s.1k(\'[@\',1f[4],\']\')}}1y.1k(2s.2h(\'\'));m 1y},7B:k(1y,36,2D){o T=[];o 43=P.5M(\'.//\'+1y.2h(\'//\'),36,$$.3M.ak,eD.et,1F);M(o i=0,j=43.eu;i<\\/2W>\');$(\'7J\').6c=k(){B(c.5c==\'8q\')5V()}}}17{U.2A("4r",5V);P.2A("eV",5V)}}};U.f2=k(W){m c.1I(\'7K\',W)};U.R({8f:k(){B(c.65)m c.f0;B(c.8Y)m P.4H.90;m P.2X.90},8l:k(){B(c.65)m c.eZ;B(c.8Y)m P.4H.9e;m P.2X.9e},9w:k(){B(c.31)m 1d.1z(P.2X.42,P.2X.6H);B(c.4M)m P.4H.6H;m P.2X.6H},9x:k(){B(c.31)m 1d.1z(P.2X.3T,P.2X.5N);B(c.4M)m P.4H.5N;m P.2X.5N},8s:k(){m c.9v||P.2X.67},8u:k(){m c.9t||P.2X.6a},6N:k(){m{\'3n\':{\'x\':c.8f(),\'y\':c.8l()},\'6M\':{\'x\':c.9w(),\'y\':c.9x()},\'2J\':{\'x\':c.8s(),\'y\':c.8u()}}},3o:k(){m{\'x\':0,\'y\':0}}});o 1g={f8:{}};1g.2O=L 18({C:{45:18.1m,1T:18.1m,7m:18.1m,2b:k(p){m-(1d.as(1d.85*p)-1)/2},49:eY,2u:\'5a\',3Q:1e,9z:50},1j:k(C){c.G=c.G||1F;c.2U(C);B(c.C.1j)c.C.1j.1S(c)},2l:k(){o 3A=$3A();B(3A=(7-4*a)/11){J=-1d.3J((11-6*a-11*p)/4,2)+b*b;1D}}m J},d2:k(p,x){m 1d.3J(2,10*--p)*1d.as(20*p*1d.85*(x[0]||1)/3)}});[\'d9\',\'da\',\'dg\',\'dh\'].1o(k(2b,i){1g.3m[2b]=L 1g.86(k(p){m 1d.3J(p,[i+2])});1g.3m.88(2b)});o 3Y={};3Y.2O=L 18({C:{3K:N,2u:\'5a\',45:18.1m,au:18.1m,1T:18.1m,av:18.1m,8M:18.1m,1E:N,3F:{x:\'1t\',y:\'1n\'},4E:N,6u:6},1j:k(el,C){c.2U(C);c.G=$(el);c.3K=$(c.C.3K)||c.G;c.3i={\'1a\':{},\'1p\':{}};c.J={\'1h\':{},\'1a\':{}};c.1G={\'1h\':c.1h.3g(c),\'3V\':c.3V.3g(c),\'3L\':c.3L.3g(c),\'1R\':c.1R.Y(c)};c.6K();B(c.C.1j)c.C.1j.1S(c)},6K:k(){c.3K.1I(\'64\',c.1G.1h);m c},9K:k(){c.3K.3Z(\'64\',c.1G.1h);m c},1h:k(I){c.1i(\'au\',c.G);c.3i.1h=I.1M;o 1E=c.C.1E;c.1E={\'x\':[],\'y\':[]};M(o z 1b c.C.3F){B(!c.C.3F[z])6C;c.J.1a[z]=c.G.2j(c.C.3F[z]).3c();c.3i.1p[z]=I.1M[z]-c.J.1a[z];B(1E&&1E[z]){M(o i=0;i<2;i++){B($2B(1E[z][i]))c.1E[z][i]=($F(1E[z][i])==\'k\')?1E[z][i]():1E[z][i]}}}B($F(c.C.4E)==\'4S\')c.C.4E={\'x\':c.C.4E,\'y\':c.C.4E};P.2A(\'2V\',c.1G.3V);P.2A(\'6S\',c.1G.1R);c.1i(\'45\',c.G);I.1R()},3V:k(I){o aw=1d.2r(1d.dd(1d.3J(I.1M.x-c.3i.1h.x,2)+1d.3J(I.1M.y-c.3i.1h.y,2)));B(aw>c.C.6u){P.3j(\'2V\',c.1G.3V);P.2A(\'2V\',c.1G.3L);c.3L(I);c.1i(\'av\',c.G)}I.1R()},3L:k(I){c.5K=N;c.3i.1a=I.1M;M(o z 1b c.C.3F){B(!c.C.3F[z])6C;c.J.1a[z]=c.3i.1a[z]-c.3i.1p[z];B(c.1E[z]){B($2B(c.1E[z][1])&&(c.J.1a[z]>c.1E[z][1])){c.J.1a[z]=c.1E[z][1];c.5K=1e}17 B($2B(c.1E[z][0])&&(c.J.1a[z]el.1t&&1a.xel.1n)},1R:k(){B(c.3e&&!c.5K)c.3e.1i(\'eb\',[c.G,c]);17 c.G.1i(\'ec\',c);c.1r();m c}});Q.R({ei:k(C){m L 3Y.aM(c,C)}});o 6h=L 18({C:{28:\'4T\',9p:1e,93:18.1m,4L:18.1m,6E:18.1m,aS:1e,5J:\'ej-8\',9m:N,4B:{}},7r:k(){c.2y=(U.7d)?L 7d():(U.31?L aO(\'ek.eh\'):N);m c},1j:k(C){c.7r().2U(C);c.C.5G=c.C.5G||c.5G;c.4B={};B(c.C.aS&&c.C.28==\'4T\'){o 5J=(c.C.5J)?\'; eg=\'+c.C.5J:\'\';c.5i(\'9Q-F\',\'ab/x-aQ-ed-ee\'+5J)}B(c.C.1j)c.C.1j.1S(c)},9g:k(){B(c.2y.5c!=4||!c.4W)m;c.4W=N;o 4C=0;5f{4C=c.2y.4C}4X(e){};B(c.C.5G.1S(c,4C))c.4L();17 c.6E();c.2y.6c=18.1m},5G:k(4C){m((4C>=e0)&&(4C]*>([\\s\\S]*?)<\\/2W>/dS;6Y((2W=5n.dV(c.3w.21)))4d.1k(2W[1]);4d=4d.2h(\'\\n\')}B(4d)(U.9N)?U.9N(4d):U.9H(4d,0)},9Z:k(1w){5f{m c.2y.dW(1w)}4X(e){};m 1F}});7c.5l=k(1Y){o 51=[];M(o K 1b 1Y)51.1k(6e(K)+\'=\'+6e(1Y[K]));m 51.2h(\'&\')};Q.R({5y:k(C){m L a9(c.6n(\'dQ\'),$2c({a7:c.5l()},C,{28:\'4T\'})).9C()}});o 3I=L 3y({C:{6f:N,6i:N,49:N,56:N},2i:k(1s,J,C){C=$2c(c.C,C);J=6e(J);B(C.6f)J+=\'; 6f=\'+C.6f;B(C.6i)J+=\'; 6i=\'+C.6i;B(C.49){o 6x=L 97();6x.dK(6x.bf()+C.49*24*60*60*ax);J+=\'; e1=\'+6x.ef()}B(C.56)J+=\'; 56\';P.4D=1s+\'=\'+J;m $R(C,{\'1s\':1s,\'J\':J})},4N:k(1s){o J=P.4D.2T(\'(?:^|;)\\\\s*\'+1s.aK()+\'=([^;]*)\');m J?e5(J[1]):N},2H:k(4D,C){B($F(4D)==\'2C\')c.2i(4D.1s,\'\',$2c(4D,{49:-1}));17 c.2i(4D,\'\',$2c(C,{49:-1}))}});o 3G={4u:k(O){23($F(O)){12\'2E\':m\'"\'+O.3l(/(["\\\\])/g,\'\\\\$1\')+\'"\';12\'1B\':m\'[\'+O.2K(3G.4u).2h(\',\')+\']\';12\'2C\':o 2E=[];M(o K 1b O)2E.1k(3G.4u(K)+\':\'+3G.4u(O[K]));m\'{\'+2E.2h(\',\')+\'}\'}m 6W(O)},5M:k(4q,56){m(($F(4q)!=\'2E\')||(56&&!4q.2t(/^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+e4-u \\n\\r\\t])+?$/)))?N:e6(\'(\'+4q+\')\')}};3G.e7=6h.R({1j:k(2L,C){c.2L=2L;c.1I(\'4L\',c.1T);c.1r(C);c.5i(\'X-ea\',\'e9\')},5y:k(O){m c.1r(c.2L,\'dG=\'+3G.4u(O))},1T:k(){c.1i(\'1T\',3G.5M(c.3w.21,c.C.56))}});o bb=L 3y({8n:k(1Y,1K){1K=$2c({\'5A\':18.1m},1K);o 2W=L Q(\'2W\',{\'59\':1Y}).6B({\'4r\':1K.5A,\'dF\':k(){B(c.5c==\'8q\')c.1i(\'4r\')}});5j 1K.5A;m 2W.6j(1K).25(P.6s)},1x:k(1Y,1K){m L Q(\'4m\',$2c({\'95\':\'dc\',\'db\':\'de\',\'F\':\'21/1x\',\'5h\':1Y},1K)).25(P.6s)},58:k(1Y,1K){1K=$2c({\'5A\':18.1m,\'df\':18.1m,\'di\':18.1m},1K);o 58=L d3();58.59=1Y;o G=L Q(\'8t\',{\'59\':1Y});[\'4r\',\'aC\',\'dz\'].1o(k(F){o I=1K[\'5C\'+F];5j 1K[\'5C\'+F];G.1I(F,k(){c.3Z(F,1c.8r);I.1S(c)})});B(58.2z&&58.2N)G.1i(\'4r\',G,1);m G.6j(1K)},6F:k(5e,C){C=$2c({1T:18.1m,b6:18.1m},C);B(!5e.1k)5e=[5e];o 6F=[];o 6m=0;5e.1o(k(1Y){o 8t=L bb.58(1Y,{\'5A\':k(){C.b6.1S(c,6m);6m++;B(6m==5e.V)C.1T()}});6F.1k(8t)});m L 29(6F)}});o 3H=L 18({V:0,1j:k(2C){c.O=2C||{};c.5u()},4N:k(1s){m(c.6L(1s))?c.O[1s]:1F},6L:k(1s){m(1s 1b c.O)},2i:k(1s,J){B(!c.6L(1s))c.V++;c.O[1s]=J;m c},5u:k(){c.V=0;M(o p 1b c.O)c.V++;m c},2H:k(1s){B(!c.6L(1s))m c;5j c.O[1s];c.V--;m c},1o:k(W,Y){$1o(c.O,W,Y)},R:k(O){$R(c.O,O);m c.5u()},2c:k(){c.O=$2c.3U(1F,[c.O].R(1c));m c.5u()},1m:k(){c.O={};c.V=0;m c},1P:k(){o 1P=[];M(o K 1b c.O)1P.1k(K);m 1P},1J:k(){o 1J=[];M(o K 1b c.O)1J.1k(c.O[K]);m 1J}});k $H(O){m L 3H(O)};3H.3I=3H.R({1j:k(1w,C){c.1w=1w;c.C=$R({\'bj\':1e},C||{});c.4r()},bd:k(){B(c.V==0){3I.2H(c.1w,c.C);m 1e}o 4q=3G.4u(c.O);B(4q.V>dv)m N;3I.2i(c.1w,4q,c.C);m 1e},4r:k(){c.O=3G.5M(3I.4N(c.1w),1e)||{};c.5u()}});3H.3I.2F={};[\'R\',\'2i\',\'2c\',\'1m\',\'2H\'].1o(k(28){3H.3I.2F[28]=k(){3H.1L[28].3U(c,1c);B(c.C.bj)c.bd();m c}});3H.3I.3q(3H.3I.2F);o 2M=L 18({1j:k(2G,F){F=F||(2G.1k?\'1v\':\'3C\');o 1v,2n;23(F){12\'1v\':1v=2G;2n=1v.8d();1D;12\'2n\':1v=2G.9r();2n=2G;1D;5D:1v=2G.5H(1e);2n=1v.8d()}1v.2n=2n;1v.3C=1v.5I();m $R(1v,2M.1L)},4R:k(){o 5m=$A(1c);o 6Z=($F(5m[5m.V-1])==\'4S\')?5m.dp():50;o 1v=c.8m();5m.1o(k(2G){2G=L 2M(2G);M(o i=0;i<3;i++)1v[i]=1d.2r((1v[i]/ 3b * (3b - 6Z)) + (2G[i] /3b*6Z))});m L 2M(1v,\'1v\')},du:k(){m L 2M(c.2K(k(J){m 53-J}))},dt:k(J){m L 2M([J,c.2n[1],c.2n[2]],\'2n\')},ds:k(6X){m L 2M([c.2n[0],6X,c.2n[2]],\'2n\')},em:k(6X){m L 2M([c.2n[0],c.2n[1],6X],\'2n\')}});k $eq(r,g,b){m L 2M([r,g,b],\'1v\')};k $f6(h,s,b){m L 2M([h,s,b],\'2n\')};2I.R({8d:k(){o 5t=c[0],5v=c[1],73=c[2];o 2Z,6l,8g;o 1z=1d.1z(5t,5v,73),3p=1d.3p(5t,5v,73);o 4l=1z-3p;8g=1z/53;6l=(1z!=0)?4l/1z:0;B(6l==0){2Z=0}17{o 8c=(1z-5t)/4l;o 8R=(1z-5v)/4l;o br=(1z-73)/4l;B(5t==1z)2Z=br-8R;17 B(5v==1z)2Z=2+8c-br;17 2Z=4+8R-8c;2Z/=6;B(2Z<0)2Z++}m[1d.2r(2Z*9y),1d.2r(6l*3b),1d.2r(8g*3b)]},9r:k(){o br=1d.2r(c[2]/3b*53);B(c[1]==0){m[br,br,br]}17{o 2Z=c[0]%9y;o f=2Z%60;o p=1d.2r((c[2]*(3b-c[1]))/f4*53);o q=1d.2r((c[2]*(9s-c[1]*f))/9u*53);o t=1d.2r((c[2]*(9s-c[1]*(60-f)))/9u*53);23(1d.an(2Z/60)){12 0:m[br,t,p];12 1:m[q,br,p];12 2:m[p,br,t];12 3:m[p,q,br];12 4:m[t,p,br];12 5:m[br,p,q]}}m N}});o 9B=L 18({C:{5W:20,8w:1,79:k(x,y){c.G.3x(x,y)}},1j:k(G,C){c.2U(C);c.G=$(G);c.8j=([U,P].1l(G))?$(P.4H):c.G},1h:k(){c.8i=c.9a.3g(c);c.8j.2A(\'2V\',c.8i)},1R:k(){c.8j.3j(\'2V\',c.8i);c.1H=$4Z(c.1H)},9a:k(I){c.1M=(c.G==U)?I.9d:I.1M;B(!c.1H)c.1H=c.2J.4f(50,c)},2J:k(){o el=c.G.6N();o 1p=c.G.3o();o 4h={\'x\':0,\'y\':0};M(o z 1b c.1M){B(c.1M[z]<(c.C.5W+1p[z])&&el.2J[z]!=0)4h[z]=(c.1M[z]-c.C.5W-1p[z])*c.C.8w;17 B(c.1M[z]+c.C.5W>(el.3n[z]+1p[z])&&el.2J[z]+el.3n[z]!=el.6M[z])4h[z]=(c.1M[z]-el.3n[z]+c.C.5W-1p[z])*c.C.8w}B(4h.y||4h.x)c.1i(\'79\',[el.2J.x+4h.x,el.2J.y+4h.y])}});9B.3q(L 2q,L 4i);o 8G=L 18({C:{79:18.1m,1T:18.1m,8P:k(1p){c.48.1O(c.p,1p)},2d:\'8K\',6r:3b,1C:0},1j:k(el,48,C){c.G=$(el);c.48=$(48);c.2U(C);c.8O=-1;c.8N=-1;c.2l=-1;c.G.1I(\'64\',c.aa.3g(c));o 7j,1C;23(c.C.2d){12\'8K\':c.z=\'x\';c.p=\'1t\';7j={\'x\':\'1t\',\'y\':N};1C=\'42\';1D;12\'8J\':c.z=\'y\';c.p=\'1n\';7j={\'x\':N,\'y\':\'1n\'};1C=\'3T\'}c.1z=c.G[1C]-c.48[1C]+(c.C.1C*2);c.a1=c.48[1C]/2;c.a6=c.G[\'4N\'+c.p.8I()].Y(c.G);c.48.1O(\'1u\',\'7h\').1O(c.p,-c.C.1C);o 8L={};8L[c.z]=[-c.C.1C,c.1z-c.C.1C];c.3L=L 3Y.2O(c.48,{1E:8L,3F:7j,6u:0,45:k(){c.75()}.Y(c),8M:k(){c.75()}.Y(c),1T:k(){c.75();c.2f()}.Y(c)});B(c.C.1j)c.C.1j.1S(c)},2i:k(2l){c.2l=2l.1E(0,c.C.6r);c.78();c.2f();c.1i(\'8P\',c.a4(c.2l));m c},aa:k(I){o 1u=I.1M[c.z]-c.a6()-c.a1;1u=1u.1E(-c.C.1C,c.1z-c.C.1C);c.2l=c.8H(1u);c.78();c.2f();c.1i(\'8P\',1u)},75:k(){c.2l=c.8H(c.3L.J.1a[c.z]);c.78()},78:k(){B(c.8O!=c.2l){c.8O=c.2l;c.1i(\'79\',c.2l)}},2f:k(){B(c.8N!==c.2l){c.8N=c.2l;c.1i(\'1T\',c.2l+\'\')}},8H:k(1u){m 1d.2r((1u+c.C.1C)/c.1z*c.C.6r)},a4:k(2l){m c.1z*2l/c.C.6r}});8G.3q(L 2q);8G.3q(L 4i);o ev=1g.ac.R({1j:k(C){c.1r(U,C);c.68=(c.C.68)?$$(c.C.68):$$(P.68);o 5b=U.5b.5h.2T(/^[^#]*/)[0]+\'#\';c.68.1o(k(4m){B(4m.5h.3S(5b)!=0)m;o 3E=4m.5h.6p(5b.V);B(3E&&$(3E))c.ag(4m,3E)},c);B(!U.65)c.1I(\'1T\',k(){U.5b.eU=c.3E})},ag:k(4m,3E){4m.1I(\'8p\',k(I){c.3E=3E;c.8z(3E);I.1R()}.3g(c))}});o 9S=L 18({C:{4I:N,45:18.1m,1T:18.1m,2Q:1e,6u:3,9I:k(G,2Q){2Q.1O(\'22\',0.7);G.1O(\'22\',0.7)},9T:k(G,2Q){G.1O(\'22\',1);2Q.2H();c.44.2H()}},1j:k(4U,C){c.2U(C);c.4U=$(4U);c.T=c.4U.8F();c.4I=(c.C.4I)?$$(c.C.4I):c.T;c.1G={\'1h\':[],\'62\':c.62.3g(c)};M(o i=0,l=c.4I.V;i9V.1n)c.3R.6O(3v)}c.2o=I.1M.y},eF:k(){o 8E=[];c.4U.8F().1o(k(el,i){8E[i]=c.T.3S(el)},c);m 8E},2f:k(){c.2o=1F;P.3j(\'2V\',c.1G.61);P.3j(\'6S\',c.1G.2f);B(c.C.2Q){P.3j(\'2V\',c.1G.62);c.1i(\'9T\',[c.3R,c.2Q])}c.1i(\'1T\',c.3R)}});9S.3q(L 2q,L 4i);o ar=L 18({C:{az:k(4c){4c.1O(\'4G\',\'8D\')},ay:k(4c){4c.1O(\'4G\',\'4y\')},8v:30,9j:3b,9k:3b,1A:\'bJ\',5P:{\'x\':16,\'y\':16},5S:N},1j:k(T,C){c.2U(C);c.4g=L Q(\'4K\',{\'4O\':c.C.1A+\'-4c\',\'8A\':{\'1u\':\'3X\',\'1n\':\'0\',\'1t\':\'0\',\'4G\':\'4y\'}}).25(P.4H);c.3d=L Q(\'4K\').25(c.4g);$$(T).1o(c.ae,c);B(c.C.1j)c.C.1j.1S(c)},ae:k(el){el.$1X.47=(el.5h&&el.57()==\'a\')?el.5h.3l(\'96://\',\'\'):(el.95||N);B(el.5g){o 6b=el.5g.66(\'::\');B(6b.V>1){el.$1X.47=6b[0].5Y();el.$1X.5T=6b[1].5Y()}17{el.$1X.5T=el.5g}el.94(\'5g\')}17{el.$1X.5T=N}B(el.$1X.47&&el.$1X.47.V>c.C.8v)el.$1X.47=el.$1X.47.6p(0,c.C.8v-1)+"&cu;";el.1I(\'8k\',k(I){c.1h(el);B(!c.C.5S)c.8e(I);17 c.1u(el)}.Y(c));B(!c.C.5S)el.1I(\'2V\',c.8e.3g(c));o 2f=c.2f.Y(c);el.1I(\'8h\',2f);el.1I(\'44\',2f)},1h:k(el){c.3d.1m();B(el.$1X.47){c.5g=L Q(\'9f\').25(L Q(\'4K\',{\'4O\':c.C.1A+\'-5g\'}).25(c.3d)).5Q(el.$1X.47)}B(el.$1X.5T){c.21=L Q(\'9f\').25(L Q(\'4K\',{\'4O\':c.C.1A+\'-21\'}).25(c.3d)).5Q(el.$1X.5T)}$4Z(c.1H);c.1H=c.41.2k(c.C.9j,c)},2f:k(I){$4Z(c.1H);c.1H=c.5k.2k(c.C.9k,c)},1u:k(G){o 1p=G.3o();c.4g.4z({\'1t\':1p.x+c.C.5P.x,\'1n\':1p.y+c.C.5P.y})},8e:k(I){o aE={\'x\':U.8f(),\'y\':U.8l()};o 2J={\'x\':U.8s(),\'y\':U.8u()};o 4c={\'x\':c.4g.42,\'y\':c.4g.3T};o 1V={\'x\':\'1t\',\'y\':\'1n\'};M(o z 1b 1V){o 1p=I.1M[z]+c.C.5P[z];B((1p+4c[z]-2J[z])>aE[z])1p=I.1M[z]-c.C.5P[z]-4c[z];c.4g.1O(1V[z],1p)}},41:k(){B(c.C.aG)c.1H=c.5k.2k(c.C.aG,c);c.1i(\'az\',[c.4g])},5k:k(){c.1i(\'ay\',[c.4g])}});ar.3q(L 2q,L 4i);o cd=L 18({1j:k(){c.5E=$A(1c);c.19={};c.4P={}},1I:k(F,W){c.4P[F]=c.4P[F]||{};c.19[F]=c.19[F]||[];B(c.19[F].1l(W))m N;17 c.19[F].1k(W);c.5E.1o(k(5x,i){5x.1I(F,c.3V.Y(c,[F,5x,i]))},c);m c},3V:k(F,5x,i){c.4P[F][i]=1e;o 4v=c.5E.4v(k(2a,j){m c.4P[F][j]||N},c);B(!4v)m;c.5E.1o(k(2a,j){c.4P[F][j]=N},c);c.19[F].1o(k(I){I.1S(c,c.5E,5x)},c)}});o 7n=1g.29.R({C:{8Q:18.1m,aN:18.1m,3D:0,41:N,2N:1e,2z:N,22:1e,6g:N,6A:N,3Q:N,74:N},1j:k(){o C,2v,T,2g;$1o(1c,k(4n,i){23($F(4n)){12\'2C\':C=4n;1D;12\'G\':2g=$(4n);1D;5D:o 2s=$$(4n);B(!2v)2v=2s;17 T=2s}});c.2v=2v||[];c.T=T||[];c.2g=$(2g);c.2U(C);c.2o=-1;B(c.C.74)c.C.3Q=1e;B($2B(c.C.41)){c.C.3D=N;c.2o=c.C.41}B(c.C.1h){c.C.3D=N;c.C.41=N}c.3t={};B(c.C.22)c.3t.22=\'b2\';B(c.C.2z)c.3t.2z=c.C.6A?\'b0\':\'42\';B(c.C.2N)c.3t.2N=c.C.6g?\'aU\':\'5N\';M(o i=0,l=c.2v.V;i0))){c.1i(\'aN\',[c.2v[i],el]);M(o 2x 1b c.3t)O[i][2x]=0}17{c.1i(\'8Q\',[c.2v[i],el]);M(o 2x 1b c.3t)O[i][2x]=el[c.3t[2x]]}},c);m c.1h(O)},cV:k(26){m c.3D(26)}});1g.7n=7n;',62,940,'||||||||||||this||||||||function||return||var|||||||||||||if|options|||type|element||event|value|property|new|for|false|obj|document|Element|extend||elements|window|length|fn||bind||||case||to|from||else|Class|events|now|in|arguments|Math|true|param|Fx|start|fireEvent|initialize|push|contains|empty|top|each|pos|args|parent|key|left|position|rgb|name|css|items|max|className|array|offset|break|limit|null|bound|timer|addEvent|values|properties|prototype|page|result|setStyle|keys|selector|stop|call|onComplete|data|prop|props|tmp|source|style||text|opacity|switch||inject|index||method|Elements|current|transition|merge|mode|parsed|end|container|join|set|getStyle|delay|step|overflown|hsb|previous|relatedTarget|Events|round|temp|test|unit|togglers|custom|fx|transport|width|addListener|chk|object|nocash|string|Methods|color|remove|Array|scroll|map|url|Color|height|Base|parse|ghost|Event|params|match|setOptions|mousemove|script|documentElement|border|hue||ie||Garbage|margin|getElementsByTagName|context||||create|100|toInt|wrapper|overed|filter|bindWithEvent|item|mouse|removeListener|toggler|replace|Transitions|size|getPosition|min|implement|parentNode|CSS|effects|target|next|response|scrollTo|Abstract|iCss|time|option|hex|display|anchor|modifiers|Json|Hash|Cookie|pow|handle|drag|shared|len|bottom|returns|wait|active|indexOf|offsetHeight|apply|check|iterable|absolute|Drag|removeEvent||show|offsetWidth|xpath|trash|onStart||myTitle|knob|duration|iTo|getValue|tip|scripts|Styles|periodical|toolTip|change|Options|chains|right|delta|link|argument|select|increase|str|load|setNow|compute|toString|every|id|val|hidden|setStyles|getCoordinates|headers|status|cookie|grid|padding|visibility|body|handles|cont|div|onSuccess|webkit|get|class|checker|native|mix|number|post|list|collect|running|catch|htmlElement|clear||queryString|bit|255|results|getNow|secure|getTag|image|src|px|location|readyState|fromTo|sources|try|title|href|setHeader|delete|hide|toQueryString|colors|regexp|iFrom|_method|xml|mousewheel|iNow|red|setLength|green|include|instance|send|layout|onload|toLowerCase|on|default|instances|pick|isSuccess|hexToRgb|rgbToHex|encoding|out|precision|evaluate|scrollHeight|HTMLElement|offsets|setHTML|unique|fixed|myText|walk|domReady|area|parseInt|trim|direction||move|moveGhost|klass|mousedown|webkit419|split|scrollLeft|links|parseFloat|scrollTop|dual|onreadystatechange|fix|encodeURIComponent|domain|fixedHeight|XHR|path|setProperties|tagName|saturation|counter|getProperty|regex|substr|droppables|steps|head|evType|snap|prev|setMany|date|splice|Properties|fixedWidth|addEvents|continue|Multi|onFailure|images|removeEvents|scrollWidth|none|attempt|attach|hasKey|scrollSize|getSize|injectAfter|generic|code|mp|mouseup|included|brother|stopPropagation|String|percent|while|alpha|loaded|currentStyle|evalScripts|blue|alwaysHide|draggedKnob|preventDefault|getElementsBySelector|checkStep|onChange|Listeners|setProperty|Object|XMLHttpRequest|getElements|getElementById|typeof|relative|fKey|mod|proto|forEach|onCancel|Accordion|update|pageX|pageY|setTransport|nodeType|callChain|realType|addEventListener|clean|operator|concat|node|iProps|getItems|getParam|getMany|merged|hasClass|insertBefore|Dom|add|ie_ready|domready|qs|disabled|camelCase|multiple|checked|found|transitions|Function|charAt|evalResponse|RegExp|gecko|random|getLast|hasChild|pairs|appendChild|Style|easeType|first|PI|Transition|xhtml|compat|newArray|defined|Chain|rr|rgbToHsb|locate|getWidth|brightness|mouseleave|coord|mousemover|mouseenter|getHeight|copy|javascript|injectBefore|click|complete|callee|getScrollLeft|img|getScrollTop|maxTitleChars|velocity|getNext|coordinates|toElement|styles|up|down|visible|serial|getChildren|Slider|toStep|capitalize|vertical|horizontal|lim|onDrag|previousEnd|previousChange|onTick|onActive|gr|Top|Right|Bottom|Left|0px|Width|opera|nodeValue|clientWidth|fixStyle|borderShort|onRequest|removeAttribute|rel|http|Date|cancel|input|getCoords|getFormElements|textarea|client|clientHeight|span|onStateChange|clientX|firstChild|showDelay|hideDelay|iParsed|autoCancel|defaultView|hyphenate|async|Single|hsbToRgb|6000|pageYOffset|600000|pageXOffset|getScrollWidth|getScrollHeight|360|fps|childNodes|Scroller|request|mouseout|mouseover|getPrevious|cloneEvents|setTimeout|onDragStart|extended|detach|DOMMouseScroll|clone|execScript|prevPos|which|Content|clientY|Sortables|onDragComplete|fixRelatedTarget|nextPos|shift|wheelDelta|relatedTargetGecko|getHeader|tag|half|sel|normal|toPosition|getElement|getPos|postBody|picked|Ajax|clickedElement|application|Scroll|removeEventListener|build|unload|useLink|filterById|filterByClass|prefix|resolver|filterByAttribute|zoom|floor|Number||createElement|Tips|cos|interval|onBeforeStart|onSnap|distance|1000|onHide|onShow|before|after|abort|sin|win|elementsProperty|timeout|where|slice|toUpperCase|escapeRegExp|Merge|Move|onBackground|ActiveXObject|pp|www|constructor|urlEncoded|overflow|fullHeight|addSection|getLeft|getTop|ie6|idx|fullWidth|checkAgainst|fullOpacity|contents|toFloat|removeClass|onProgress|cssText|adopt|undefined|getStyles|Asset|slideIn|save|slideOut|getTime|full|addClass|setOpacity|autoSave|textnode|navigator|associate|styleFloat|some|getRandom|getFirst||srcElement|beforeunload|whitespace|detachEvent|attachEvent|lastChild|float|all|DOMElement|CollectGarbage|clearChain|chain|111|MooTools|version|zIndex|keydown|tool|execCommand|getComputedStyle|taintEnabled|getPropertyValue|menu|fromCharCode|keyCode|detail|control|ctrlKey|shiftKey|readOnly|cssFloat|alt|altKey|Sibling|120|wheel|metaKey|meta|nodeName|transparent|styleSheet|createTextNode|removeProperty|getProperties|injectInside|getBoxObjectFor|BackgroundImageCache|Group|boolean|htmlFor|webkit420|toggleClass|clearTimeout|borderColor|replaceWith|ie7|replaceChild|clearInterval|appendText|cloneNode|setAttribute|borderWidth|borderStyle|injectTop|hellip|removeChild|colspan|embed|tabindex|tabIndex|accessKey|accesskey|rowSpan|getParent|err|maxlength|maxLength|innerHTML|setInterval|iframe|getAttribute|pass|Document|times|attributes|rowspan|colSpan|hasLayout|khtml|collection|bindAsEventListener|showThisHideOpen|Native|Window|readonly|starts|618|Bounce|Elastic|Image|Back|Sine|Expo|Circ|acos|Quad|Cubic|media|stylesheet|sqrt|screen|onabort|Quart|Quint|onerror|Pow|ease|toLeft|toRight|Slide||pop|toBottom|toTop|setSaturation|setHue|invert|4096|rightClick|Out|InOut|error|In|linear|easeIn|easeOut|easeInOut|readystatechange|json|Connection|close|setRequestHeader|setTime|overrideMimeType|open|300|responseText|responseXML|action|Requested|gi|ecma|java|exec|getResponseHeader|With|Accept|html|200|expires|leave|over|Eaeflnr|decodeURIComponent|eval|Remote|makeResizable|JSON|Request|drop|emptydrop|form|urlencoded|toGMTString|charset|XMLHTTP|makeDraggable|utf|Microsoft||setBrightness|toggle|org|1999|RGB|w3|snapshotItem|UNORDERED_NODE_SNAPSHOT_TYPE|snapshotLength|SmoothScroll|getElementsByClassName|offsetLeft|offsetTop|password|radio|selected|checkbox|XPathResult|substring|serialize|enter|returnValue|cancelBubble|button|fromElement|esc|space|namespaceURI|with|ES|filterByTag|backspace|tab|offsetParent|hash|DOMContentLoaded|clearTimer|defer|500|innerHeight|innerWidth|effect|onDomReady|write|10000|protocol|HSB|https|Shared|void'.split('|'),0,{})) // JavaScript Document function display_track_menu() { $('track_menu').style.display='block'; } function create_caroussel( content_block, prev_button, next_button, klass_item, item_size ) { new iCarousel(content_block, { idPrevious: prev_button, idNext: next_button, item: { klass: klass_item, size: item_size }, animation: { duration: 500, amount:1 } }); } var track_navi = function() { var list = $$('#track_menu ul.gamelist li'); var list2 = $$('#track_menu ul.gamelist li a'); list.each(function(element) { var fx = new Fx.Styles(element, {duration:400, wait:false}); element.addEvent('mouseenter', function(){ display_track_menu() fx.start({'background-color':'#9e9e9e'}); }); element.addEvent('mouseleave', function(){ fx.start({'background-color':'#090909'}); }); }); list2.each(function(element) { var fx = new Fx.Styles(element, {duration:600, wait:false}); element.addEvent('mouseenter', function(){ display_track_menu() fx.start({'color':'#000'}); }); element.addEvent('mouseleave', function(){ fx.start({'color':'#686868'}); }); }); mySlide = new Fx.Slide('track_menu', {mode: 'horizontal',duration:300, wait:false}); mySlide.hide(); $('track_menu_link').addEvent('mouseover', function(e) { e = new Event(e); this.style.background='url(/images/games/submenu_02_on.gif)' mySlide.slideIn(); e.stop(); }); $('track_menu_link').addEvent('mouseleave', function(e) { this.style.background='url(/images/games/submenu_02_off.gif)'; }); $('bar').addEvent('mouseover', function(e) { e = new Event(e); mySlide.slideOut(); e.stop(); }); $('track_menu').addEvent('mouseover', function(e) { $('track_menu_link').style.background='url(/images/games/submenu_02_on.gif)' }); $('track_menu').addEvent('mouseleave', function(e) { $('track_menu_link').style.background='url(/images/games/submenu_02_off.gif)'; e = new Event(e); mySlide.slideOut(); e.stop(); }); } /************************************************************** Script : Overlay Version : 1.2 Authors : Samuel birch Desc : Covers the window with a semi-transparent layer. Licence : Open Source MIT Licence **************************************************************/ var Overlay = new Class({ getOptions: function(){ return { colour: '#000', opacity: 0.7, zIndex: 1, container: document.body, onClick: Class.empty }; }, initialize: function(options){ this.setOptions(this.getOptions(), options); this.options.container = $(this.options.container); this.container = new Element('div').setProperty('id', 'OverlayContainer').setStyles({ position: 'absolute', left: '0px', top: '0px', width: '100%', zIndex: this.options.zIndex }).injectInside(this.options.container); this.iframe = new Element('iframe').setProperties({ 'id': 'OverlayIframe', 'name': 'OverlayIframe', 'src': 'javascript:void(0);', 'frameborder': 1, 'scrolling': 'no' }).setStyles({ 'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'height': '100%', 'filter': 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)', 'opacity': 0, 'zIndex': 1 }).injectInside(this.container); this.overlay = new Element('div').setProperty('id', 'Overlay').setStyles({ position: 'absolute', left: '0px', top: '0px', width: '100%', height: '100%', zIndex: 2, backgroundColor: this.options.colour }).injectInside(this.container); this.container.addEvent('click', function(){ this.options.onClick(); }.bind(this)); this.fade = new Fx.Style(this.container, 'opacity').set(0); this.position(); window.addEvent('resize', this.position.bind(this)); }, position: function(){ if(this.options.container == document.body){ var h = window.getScrollHeight()+'px'; this.container.setStyles({top: '0px', height: h}); }else{ var myCoords = this.options.container.getCoordinates(); this.container.setStyles({ top: myCoords.top+'px', height: myCoords.height+'px', left: myCoords.left+'px', width: myCoords.width+'px' }); } }, show: function(){ this.fade.start(0,this.options.opacity); }, hide: function(){ this.fade.start(this.options.opacity,0); } }); Overlay.implement(new Options); /*************************************************************/ /* ************************************************************************************* *\ * The MIT License * Copyright (c) 2007 Fabio Zendhi Nagao - http://zend.lojcomm.com.br * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be included in all copies * or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * \* ************************************************************************************* */ var iCarousel = new Class({ options: { animation: { type: "scroll",// fadeNscroll, scroll, fade direction: "left",// if type = scroll, set: top || left amount: 1,// if type = scroll, set the amount to scroll transition: Fx.Transitions.Cubic.easeInOut, duration: 500, rotate: { type: "manual",// auto || manual interval: 5000,// if type = auto, set the interval (ms) onMouseOver: "stop"// if type = auto, set the onmouseover behavior: stop || proceed } }, item: { klass: "item", size: 100 }, idPrevious: "previous", idNext: "next", idToggle: "toggle", onClickPrevious: Class.empty, onClickNext: Class.empty, onPrevious: Class.empty, onNext: Class.empty, onGoTo: Class.empty }, initialize: function(container, options) { this.setOptions(options); this.container = $(container); this.aItems = $A($$('.'+ this.options.item.klass)); this.isMouseOver = false; if(this.options.idPrevious != "undefined" && $(this.options.idPrevious)) $(this.options.idPrevious).addEvent("click", function(event) { new Event(event).stop(); this._previous(); this.fireEvent("onClickPrevious", this, 20); }.bind(this)); // check if value is not "undefined" before start search the dom with $() if(this.options.idNext != "undefined" && $(this.options.idNext)) $(this.options.idNext).addEvent("click", function(event) { new Event(event).stop(); this._next(); this.fireEvent("onClickNext", this, 20); }.bind(this)); if(this.options.idToggle != "undefined" && $(this.options.idToggle)) $(this.options.idToggle).addEvent("click", function(event) {new Event(event).stop(); this._toggle()}.bind(this)); var oAn = this.options.animation; // short hand switch(this.options.animation.type.toLowerCase()) { case "fade": this.aItems.each(function(item) { item.fx = item.effect("opacity", {duration: oAn.duration, transition: oAn.transition}); item.setStyle("opacity", 0); item.addEvents({ "mouseenter": function() { this.isMouseOver = true; if(this.options.animation.rotate.type == "auto") this.timer = $clear(this.timer); }.bind(this), "mouseleave": function() { this.isMouseOver = false; if(this.options.animation.rotate.type == "auto") this.timer = this._autoRotate.periodical(this.options.animation.rotate.interval, this); }.bind(this) }); }.bind(this)); this.height = this.container.getStyle("height").toInt(); this.atScreen = 0; this._animate(this.atScreen); break; default: (2).times(function() { this.aItems.each(function(item) { item.clone().injectInside(this.container); }.bind(this)); }.bind(this)); this.aItems = $A($$('.'+ this.options.item.klass)); this.aItems.each(function(item) { item.addEvents({ "mouseenter": function() { this.isMouseOver = true; if(this.options.animation.rotate.type == "auto") this.timer = $clear(this.timer); }.bind(this), "mouseleave": function() { this.isMouseOver = false; if(this.options.animation.rotate.type == "auto") this.timer = this._autoRotate.periodical(this.options.animation.rotate.interval, this); }.bind(this) }); }.bind(this)); this.fx = this.container.effects({duration: oAn.duration, transition: oAn.transition, wait: false}); this.atScreen = this.aItems.length / 3; this.container.setStyle(oAn.direction, - this.atScreen * this.options.item.size); break; } if(this.options.animation.rotate.type == "auto") this.timer = this._autoRotate.periodical(this.options.animation.rotate.interval, this); }, goTo: function(n) { switch(this.options.animation.type.toLowerCase()) { case "fade": var lastIndex = this.atScreen; this.atScreen = Math.abs(n % (this.aItems.length / 3)); this._animate(this.atScreen, lastIndex); break; default: this.atScreen = Math.abs(n % (this.aItems.length / 3)); this.atScreen += this.aItems.length / 3; this._animate(this.atScreen); break; } this.fireEvent("onGoTo", this, 20); }, _previous: function() { switch(this.options.animation.type.toLowerCase()) { case "fade": var lastIndex = this.atScreen; this.atScreen -= this.options.animation.amount; if(this.atScreen < 0) this.atScreen = (this.aItems.length - 1); this._animate(this.atScreen, lastIndex); break; default: this.atScreen -= this.options.animation.amount; if(this.atScreen < this.aItems.length / 3) { this.container.setStyle(this.options.animation.direction, - this.options.item.size * this.aItems.length * 2 / 3); this.atScreen = this.aItems.length * 2 / 3 - this.options.animation.amount; } this._animate(this.atScreen); break; } this.fireEvent("onPrevious", this, 20); }, _next: function() { switch(this.options.animation.type.toLowerCase()) { case "fade": var lastIndex = this.atScreen; this.atScreen += this.options.animation.amount; //if(this.atScreen >= this.aItems.length) this.atScreen = 0; this._animate(this.atScreen, lastIndex); break; default: this.atScreen += this.options.animation.amount; if(this.atScreen > this.aItems.length * 2 / 3) { this.container.setStyle(this.options.animation.direction, - this.options.item.size * this.aItems.length / 3); this.atScreen = this.aItems.length / 3 + this.options.animation.amount; } this._animate(this.atScreen); break; } this.fireEvent("onNext", this, 20); }, _toggle: function() { (this.container.getStyle("height").toInt() == 0) ? this.container.effect("height", { duration:1000, transition: Fx.Transitions.Sine.easeInOut }).start(this.height): this.container.effect("height", { duration:1000, transition: Fx.Transitions.Sine.easeInOut }).start(0); }, _autoRotate: function() { if(this.options.animation.rotate.onMouseOver == "stop" && !this.isMouseOver) this._next(); }, _animate: function(a, b) { switch(this.options.animation.type) { case "fade": if($defined(b)) { this.aItems[b].fx.start(0).chain(function() { this.aItems[a].fx.start(1);}.bind(this)); } else { this.aItems[a].fx.start(1); } break; case "scroll": var that = this; if(that.options.animation.direction == "top") { that.fx.start({"top" : - a * that.options.item.size}); } else { that.fx.start({"left" : - a * that.options.item.size}); } break; case "fadeNscroll": var that = this; if(that.options.animation.direction == "top") { that.fx.start({"opacity":0.75}).chain(function() { that.fx.start({"top" : - a * that.options.item.size}).chain(function() { that.fx.start({"opacity": 1}); }); }); } else { that.fx.start({"opacity":0.75}).chain(function() { that.fx.start({"left" : - a * that.options.item.size}).chain(function() { that.fx.start({"opacity": 1}); }); }); } break; } } }); iCarousel.implement(new Events); // Implements addEvent(type, fn), fireEvent(type, [args], delay) and removeEvent(type, fn) iCarousel.implement(new Options);// Implements setOptions(defaults, options) /************************************************************** Script : MultiBox Version : 1.3.1 Authors : Samuel Birch Desc : Supports jpg, gif, png, flash, flv, mov, wmv, mp3, html, iframe Licence : Open Source MIT Licence **************************************************************/ var MultiBox = new Class({ getOptions: function(){ return { initialWidth: 250, initialHeight: 250, container: document.body, useOverlay: false, contentColor: '#FFF', showNumbers: true, showControls: true, //showThumbnails: false, //autoPlay: false, waitDuration: 2000, descClassName: false, descMinWidth: 400, descMaxWidth: 600, movieWidth: 400, movieHeight: 300, offset: {x:0, y:0}, fixedTop: false, path: '/js/files/', onOpen: Class.empty, onClose: Class.empty, openFromLink: true, relativeToWindow: true }; }, initialize: function(className, options){ this.setOptions(this.getOptions(), options); this.openClosePos = {}; this.timer = 0; this.contentToLoad = {}; this.index = 0; this.opened = false; this.contentObj = {}; this.containerDefaults = {}; if(this.options.useOverlay){ this.overlay = new Overlay({container: this.options.container, onClick:this.close.bind(this)}); } this.content = $$('.'+className); if(this.options.descClassName){ this.descriptions = $$('.'+this.options.descClassName); this.descriptions.each(function(el){ el.setStyle('display', 'none'); }); } this.container = new Element('div').addClass('MultiBoxContainer').injectInside(this.options.container); this.iframe = new Element('iframe').setProperties({ 'id': 'multiBoxIframe', 'name': 'mulitBoxIframe', 'src': 'javascript:void(0);', 'frameborder': 1, 'scrolling': 'no' }).setStyles({ 'position': 'absolute', 'top': -20, 'left': -20, 'width': '115%', 'height': '115%', 'filter': 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)', 'opacity': 0 }).injectInside(this.container); this.box = new Element('div').addClass('MultiBoxContent').injectInside(this.container); this.closeButton = new Element('div').addClass('MultiBoxClose').injectInside(this.container).addEvent('click', this.close.bind(this)); this.controlsContainer = new Element('div').addClass('MultiBoxControlsContainer').injectInside(this.container); this.controls = new Element('div').addClass('MultiBoxControls').injectInside(this.controlsContainer); this.previousButton = new Element('div').addClass('MultiBoxPrevious').injectInside(this.controls).addEvent('click', this.previous.bind(this)); this.nextButton = new Element('div').addClass('MultiBoxNext').injectInside(this.controls).addEvent('click', this.next.bind(this)); this.title = new Element('div').addClass('MultiBoxTitle').injectInside(this.controls); this.number = new Element('div').addClass('MultiBoxNumber').injectInside(this.controls); this.description = new Element('div').addClass('MultiBoxDescription').injectInside(this.controls); if(this.content.length == 1){ this.title.setStyles({ 'margin-left': 0 }); this.description.setStyles({ 'margin-left': 0 }); this.previousButton.setStyle('display', 'none'); this.nextButton.setStyle('display', 'none'); this.number.setStyle('display', 'none'); } new Element('div').setStyle('clear', 'both').injectInside(this.controls); this.content.each(function(el,i){ el.index = i; el.addEvent('click', function(e){ new Event(e).stop(); this.open(el); }.bind(this)); if(el.href.indexOf('#') > -1){ el.content = $(el.href.substr(el.href.indexOf('#')+1)); if(el.content){el.content.setStyle('display','none');} } }, this); this.containerEffects = new Fx.Styles(this.container, {duration: 400, transition: Fx.Transitions.sineInOut}); this.controlEffects = new Fx.Styles(this.controlsContainer, {duration: 300, transition: Fx.Transitions.sineInOut}); this.reset(); }, setContentType: function(link){ var str = link.href.substr(link.href.lastIndexOf('.')+1).toLowerCase(); var contentOptions = {}; if($chk(link.rel)){ var optArr = link.rel.split(','); optArr.each(function(el){ var ta = el.split(':'); contentOptions[ta[0]] = ta[1]; }); } if(contentOptions.type != undefined){ str = contentOptions.type; } this.contentObj = {}; this.contentObj.url = link.href; this.contentObj.xH = 0; if(contentOptions.width){ this.contentObj.width = contentOptions.width; }else{ this.contentObj.width = this.options.movieWidth; } if(contentOptions.height){ this.contentObj.height = contentOptions.height; }else{ this.contentObj.height = this.options.movieHeight; } if(contentOptions.panel){ this.panelPosition = contentOptions.panel; }else{ this.panelPosition = this.options.panel; } switch(str){ case 'jpg': case 'gif': case 'png': this.type = 'image'; break; case 'swf': this.type = 'flash'; break; case 'flv': this.type = 'flashVideo'; this.contentObj.xH = 70; break; case 'mov': this.type = 'quicktime'; break; case 'wmv': this.type = 'windowsMedia'; break; case 'rv': case 'rm': case 'rmvb': this.type = 'real'; break; case 'mp3': this.type = 'flashMp3'; this.contentObj.width = 320; this.contentObj.height = 70; break; case 'element': this.type = 'htmlelement'; this.elementContent = link.content; this.elementContent.setStyles({ display: 'block', opacity: 0 }) if(this.elementContent.getStyle('width') != 'auto'){ this.contentObj.width = this.elementContent.getStyle('width'); } this.contentObj.height = this.elementContent.getSize().size.y; this.elementContent.setStyles({ display: 'none', opacity: 1 }) break; default: this.type = 'iframe'; if(contentOptions.ajax){ this.type = 'ajax'; } break; } }, reset: function(){ this.container.setStyles({ 'opacity': 0, 'display': 'none' }); this.controlsContainer.setStyles({ 'height': 0 }); this.removeContent(); this.previousButton.removeClass('MultiBoxButtonDisabled'); this.nextButton.removeClass('MultiBoxButtonDisabled'); this.opened = false; }, getOpenClosePos: function(el){ if (this.options.openFromLink) { if (el.getFirst()) { var w = el.getFirst().getCoordinates().width - (this.container.getStyle('border').toInt() * 2); if (w < 0) { w = 0 } var h = el.getFirst().getCoordinates().height - (this.container.getStyle('border').toInt() * 2); if (h < 0) { h = 0 } this.openClosePos = { width: w, height: h, top: el.getFirst().getCoordinates().top, left: el.getFirst().getCoordinates().left }; } else { var w = el.getCoordinates().width - (this.container.getStyle('border').toInt() * 2); if (w < 0) { w = 0 } var h = el.getCoordinates().height - (this.container.getStyle('border').toInt() * 2); if (h < 0) { h = 0 } this.openClosePos = { width: w, height: h, top: el.getCoordinates().top, left: el.getCoordinates().left }; } }else{ if(this.options.fixedTop){ var top = this.options.fixedTop; }else{ var top = ((window.getHeight()/2)-(this.options.initialHeight/2)-this.container.getStyle('border').toInt())+this.options.offset.y; } this.openClosePos = { width: this.options.initialWidth, height: this.options.initialHeight, top: top, left: ((window.getWidth()/2)-(this.options.initialWidth/2)-this.container.getStyle('border').toInt())+this.options.offset.x }; } return this.openClosePos; }, open: function(el){ this.options.onOpen(); this.index = this.content.indexOf(el); this.openId = el.getProperty('id'); if(!this.opened){ this.opened = true; if(this.options.useOverlay){ this.overlay.show(); } this.container.setStyles(this.getOpenClosePos(el)); this.container.setStyles({ opacity: 0, display: 'block' }); if(this.options.fixedTop){ var top = this.options.fixedTop; }else{ var top = ((window.getHeight()/2)-(this.options.initialHeight/2)-this.container.getStyle('border').toInt())+this.options.offset.y; } this.containerEffects.start({ width: this.options.initialWidth, height: this.options.initialHeight, top: top, left: ((window.getWidth()/2)-(this.options.initialWidth/2)-this.container.getStyle('border').toInt())+this.options.offset.x, opacity: [0, 1] }); this.load(this.index); }else{ if (this.options.showControls) { this.hideControls(); } this.getOpenClosePos(this.content[this.index]); this.timer = this.hideContent.bind(this).delay(500); this.timer = this.load.pass(this.index, this).delay(1100); } }, getContent: function(index){ this.setContentType(this.content[index]); var desc = {}; if(this.options.descClassName){ this.descriptions.each(function(el,i){ if(el.hasClass(this.openId)){ desc = el.clone(); } },this); } //var title = this.content[index].title; this.contentToLoad = { title: this.content[index].title || ' ', //desc: $(this.options.descClassName+this.content[index].id).clone(), desc: desc, number: index+1 }; }, close: function(){ if(this.options.useOverlay){ this.overlay.hide(); } if (this.options.showControls) { this.hideControls(); } this.hideContent(); this.containerEffects.stop(); this.zoomOut.bind(this).delay(500); this.options.onClose(); }, zoomOut: function(){ this.containerEffects.start({ width: this.openClosePos.width, height: this.openClosePos.height, top: this.openClosePos.top, left: this.openClosePos.left, opacity: 0 }); this.reset.bind(this).delay(500); }, load: function(index){ this.box.addClass('MultiBoxLoading'); this.getContent(index); if(this.type == 'image'){ var xH = this.contentObj.xH; this.contentObj = new Asset.image(this.content[index].href, {onload: this.resize.bind(this)}); this.contentObj.xH = xH; /*this.contentObj = new Image(); this.contentObj.onload = this.resize.bind(this); this.contentObj.src = this.content[index].href;*/ }else{ this.resize(); } }, resize: function(){ if (this.options.fixedTop) { var top = this.options.fixedTop; } else { var top = ((window.getHeight() / 2) - ((Number(this.contentObj.height) + this.contentObj.xH) / 2) - this.container.getStyle('border').toInt() + window.getScrollTop()) + this.options.offset.y; } var left = ((window.getWidth() / 2) - (this.contentObj.width / 2) - this.container.getStyle('border').toInt()) + this.options.offset.x; if (top < 0) { top = 0 } if (left < 0) { left = 0 } this.containerEffects.stop(); this.containerEffects.start({ width: this.contentObj.width, height: Number(this.contentObj.height) + this.contentObj.xH, top: top, left: left, opacity: 1 }); this.timer = this.showContent.bind(this).delay(500); }, showContent: function(){ this.box.removeClass('MultiBoxLoading'); this.removeContent(); this.contentContainer = new Element('div').setProperties({id: 'MultiBoxContentContainer'}).setStyles({opacity: 0, width: this.contentObj.width+'px', height: (Number(this.contentObj.height)+this.contentObj.xH)+'px'}).injectInside(this.box); if(this.type == 'image'){ this.contentObj.injectInside(this.contentContainer); }else if(this.type == 'iframe'){ new Element('iframe').setProperties({ id: 'iFrame'+new Date().getTime(), width: this.contentObj.width, height: this.contentObj.height, src: this.contentObj.url, frameborder: 0, scrolling: 'auto' }).injectInside(this.contentContainer); }else if(this.type == 'htmlelement'){ this.elementContent.clone().setStyle('display','block').injectInside(this.contentContainer); }else if(this.type == 'ajax'){ new Ajax(this.contentObj.url, { method: 'get', update: 'MultiBoxContentContainer', evalScripts: true, autoCancel: true }).request(); }else{ var obj = this.createEmbedObject().injectInside(this.contentContainer); if(this.str != ''){ $('MultiBoxMediaObject').innerHTML = this.str; } } this.contentEffects = new Fx.Styles(this.contentContainer, {duration: 500, transition: Fx.Transitions.linear}); this.contentEffects.start({ opacity: 1 }); this.title.setHTML(this.contentToLoad.title); this.number.setHTML(this.contentToLoad.number+' of '+this.content.length); if (this.options.descClassName) { if (this.description.getFirst()) { this.description.getFirst().remove(); } this.contentToLoad.desc.injectInside(this.description).setStyles({ display: 'block' }); } //this.removeContent.bind(this).delay(500); if (this.options.showControls) { this.timer = this.showControls.bind(this).delay(800); } }, hideContent: function(){ this.box.addClass('MultiBoxLoading'); this.contentEffects.start({ opacity: 0 }); this.removeContent.bind(this).delay(500); }, removeContent: function(){ if($('MultiBoxMediaObject')){ $('MultiBoxMediaObject').empty(); $('MultiBoxMediaObject').remove(); } if($('MultiBoxContentContainer')){ //$('MultiBoxContentContainer').empty(); $('MultiBoxContentContainer').remove(); } }, showControls: function(){ this.clicked = false; if(this.container.getStyle('height') != 'auto'){ this.containerDefaults.height = this.container.getStyle('height') this.containerDefaults.backgroundColor = this.options.contentColor; } this.container.setStyles({ //'backgroundColor': this.controls.getStyle('backgroundColor'), 'height': 'auto' }); if(this.contentToLoad.number == 1){ this.previousButton.addClass('MultiBoxPreviousDisabled'); }else{ this.previousButton.removeClass('MultiBoxPreviousDisabled'); } if(this.contentToLoad.number == this.content.length){ this.nextButton.addClass('MultiBoxNextDisabled'); }else{ this.nextButton.removeClass('MultiBoxNextDisabled'); } this.controlEffects.start({'height': this.controls.getStyle('height')}); }, hideControls: function(num){ this.controlEffects.start({'height': 0}).chain(function(){ this.container.setStyles(this.containerDefaults); }.bind(this)); }, showThumbnails: function(){ }, next: function(){ if(this.index < this.content.length-1){ this.index++; this.openId = this.content[this.index].getProperty('id'); if (this.options.showControls) { this.hideControls(); } this.getOpenClosePos(this.content[this.index]); //this.getContent(this.index); this.timer = this.hideContent.bind(this).delay(500); this.timer = this.load.pass(this.index, this).delay(1100); } }, previous: function(){ if(this.index > 0){ this.index--; this.openId = this.content[this.index].getProperty('id'); if (this.options.showControls) { this.hideControls(); } this.getOpenClosePos(this.content[this.index]); //this.getContent(this.index); this.timer = this.hideContent.bind(this).delay(500); this.timer = this.load.pass(this.index, this).delay(1000); } }, createEmbedObject: function(){ if(this.type == 'flash'){ var url = this.contentObj.url; var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = '' this.str += ''; this.str += ''; this.str += ''; } if(this.type == 'flashVideo'){ //var url = this.contentObj.url.substring(0, this.contentObj.url.lastIndexOf('.')); var url = this.contentObj.url; var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = '' this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += '' this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; } if(this.type == 'windowsMedia'){ var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; } if(this.type == 'real'){ var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; } return obj; } }); MultiBox.implement(new Options); MultiBox.implement(new Events); /*************************************************************/