/* jq_last.js */

eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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}('(v(){B 87=1q.7;B 7=1q.7=v(M,1g){y 31 7.I.6m(M,1g)};B 8q=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,6q=/^.[^:#\\[\\.]*$/,15;7.I=7.4O={6m:v(M,1g){M=M||S;k(M.18){b[0]=M;b.J=1;y b}k(1F M=="2p"){B 1r=8q.3f(M);k(1r&&(1r[1]||!1g)){k(1r[1])M=7.5C([1r[1]],1g);O{B u=S.5Z(1r[3]);k(u){k(u.1d!=1r[3])y 7().2Z(M);y 7(u)}M=[]}}O y 7(1g).2Z(M)}O k(7.1W(M))y 7(S)[7.I.2B?"2B":"4o"](M);y b.8k(7.2M(M))},7:"1.2.6",47:v(){y b.J},J:0,4c:v(1R){y 1R==15?7.2M(b):b[1R]},3e:v(1j){B H=7(1j);H.6r=b;y H},8k:v(1j){b.J=0;2Y.4O.1J.1Q(b,1j);y b},P:v(N,1Z){y 7.P(b,N,1Z)},38:v(u){B H=-1;y 7.3d(u&&u.7?u[0]:u,b)},1M:v(E,K,C){B V=E;k(E.1N==6t)k(K===15)y b[0]&&7[C||"1M"](b[0],E);O{V={};V[E]=K}y b.P(v(i){Q(E 1D V)7.1M(C?b.T:b,E,7.19(b,V[E],C,i,E))})},1v:v(2H,K){k((2H==\'2N\'||2H==\'2m\')&&3t(K)<0)K=15;y b.1M(2H,K,"2w")},1m:v(1m){k(1F 1m!="1S"&&1m!=U)y b.50().4h((b[0]&&b[0].32||S).64(1m));B H="";7.P(1m||b,v(){7.P(b.45,v(){k(b.18!=8)H+=b.18!=1?b.7b:7.I.1m([b])})});y H},5X:v(26){k(b[0])7(26,b[0].32).39().3P(b[0]).2V(v(){B u=b;1Y(u.1P)u=u.1P;y u}).4h(b);y b},96:v(26){y b.P(v(){7(b).80().5X(26)})},4a:v(26){y b.P(v(){7(b).5X(26)})},4h:v(){y b.4p(1i,L,R,v(u){k(b.18==1)b.4v(u)})},7c:v(){y b.4p(1i,L,L,v(u){k(b.18==1)b.3P(u,b.1P)})},7i:v(){y b.4p(1i,R,R,v(u){b.1l.3P(u,b)})},6x:v(){y b.4p(1i,R,L,v(u){b.1l.3P(u,b.3l)})},2s:v(){y b.6r||7([])},2Z:v(M){B 1j=7.2V(b,v(u){y 7.2Z(M,u)});y b.3e(/[^+>] [^+>]/.14(M)||M.1C("..")>-1?7.5e(1j):1j)},39:v(1f){B H=b.2V(v(){k(7.17.1o&&!7.5i(b)){B 39=b.8l(L),63=S.44("1T");63.4v(39);y 7.5C([63.4X])[0]}O y b.8l(L)});B 39=H.2Z("*").69().P(v(){k(b[2C]!=15)b[2C]=U});k(1f===L)b.2Z("*").69().P(v(i){k(b.18==3)y;B 1f=7.F(b,"1f");Q(B C 1D 1f)Q(B 16 1D 1f[C])7.G.1c(39[i],C,1f[C][16],1f[C][16].F)});y H},1K:v(M){y b.3e(7.1W(M)&&7.4i(b,v(u,i){y M.1G(u,i)})||7.4e(M,b))},24:v(M){k(M.1N==6t)k(6q.14(M))y b.3e(7.4e(M,b,L));O M=7.4e(M,b);B 8m=M.J&&M[M.J-1]!==15&&!M.18;y b.1K(v(){y 8m?7.3d(b,M)<0:b!=M})},1c:v(M){y b.3e(7.5e(7.2d(b.4c(),1F M==\'2p\'?7(M):7.2M(M))))},4P:v(M){y!!M&&7.4e(M,b).J>0},90:v(M){y b.4P("."+M)},11:v(K){k(K==15){k(b.J){B u=b[0];k(7.12(u,"30")){B 38=u.5S,3O=[],V=u.V,2Q=u.C=="30-2Q";k(38<0)y U;Q(B i=2Q?38:0,2P=2Q?38+1:V.J;i<2P;i++){B 4b=V[i];k(4b.3H){K=7.17.1o&&!4b.92.K.8X?4b.1m:4b.K;k(2Q)y K;3O.1J(K)}}y 3O}O y(b[0].K||"").1L(/\\r/g,"")}y 15}k(K.1N==5a)K+=\'\';y b.P(v(){k(b.18!=1)y;k(K.1N==2Y&&/6j|6h/.14(b.C))b.5c=(7.3d(b.K,K)>=0||7.3d(b.E,K)>=0);O k(7.12(b,"30")){B 3O=7.2M(K);7("4b",b).P(v(){b.3H=(7.3d(b.K,3O)>=0||7.3d(b.1m,3O)>=0)});k(!3O.J)b.5S=-1}O b.K=K})},26:v(K){y K==15?(b[0]?b[0].4X:U):b.50().4h(K)},72:v(K){y b.6x(K).2r()},7Y:v(i){y b.46(i,i+1)},46:v(){y b.3e(2Y.4O.46.1Q(b,1i))},2V:v(N){y b.3e(7.2V(b,v(u,i){y N.1G(u,i,u)}))},69:v(){y b.1c(b.6r)},F:v(2H,K){B 1p=2H.2g(".");1p[1]=1p[1]?"."+1p[1]:"";k(K===15){B F=b.6a("9R"+1p[1]+"!",[1p[0]]);k(F===15&&b.J)F=7.F(b[0],2H);y F===15&&1p[1]?b.F(1p[0]):F}O y b.2f("9O"+1p[1]+"!",[1p[0],K]).P(v(){7.F(b,2H,K)})},3w:v(2H){y b.P(v(){7.3w(b,2H)})},4p:v(1Z,27,6l,N){B 39=b.J>1,1j;y b.P(v(){k(!1j){1j=7.5C(1Z,b.32);k(6l)1j.6l()}B 6c=b;k(27&&7.12(b,"27")&&7.12(1j[0],"5o"))6c=b.4G("1I")[0]||b.4v(b.32.44("1I"));B 4f=7([]);7.P(1j,v(){B u=39?7(b).39(L)[0]:b;k(7.12(u,"1e"))4f=4f.1c(u);O{k(u.18==1)4f=4f.1c(7("1e",u).2r());N.1G(6c,u)}});4f.P(8t)})}};7.I.6m.4O=7.I;v 8t(i,u){k(u.3F)7.4l({W:u.3F,3v:R,28:"1e"});O 7.6E(u.1m||u.7X||u.4X||"");k(u.1l)u.1l.3D(u)}v 1V(){y+31 9L}7.1H=7.I.1H=v(){B 1y=1i[0]||{},i=1,J=1i.J,4x=R,V;k(1y.1N==9M){4x=1y;1y=1i[1]||{};i=2}k(1F 1y!="1S"&&1F 1y!="v")1y={};k(J==i){1y=b;--i}Q(;i<J;i++)k((V=1i[i])!=U)Q(B E 1D V){B 3F=1y[E],3c=V[E];k(1y===3c)7S;k(4x&&3c&&1F 3c=="1S"&&!3c.18)1y[E]=7.1H(4x,3F||(3c.J!=U?[]:{}),3c);O k(3c!==15)1y[E]=3c}y 1y};B 2C="7"+1V(),86=0,5U={},8a=/z-?38|9U-?9V|1O|7P|9W-?2m/i,4t=S.4t||{};7.1H({9I:v(4x){1q.7=87;y 7},1W:v(I){y!!I&&1F I!="2p"&&!I.12&&I.1N!=2Y&&/^[\\s[]?v/.14(I+"")},5i:v(u){y u.22&&!u.1n||u.2T&&u.32&&!u.32.1n},6E:v(F){F=7.3S(F);k(F){B 2D=S.4G("2D")[0]||S.22,1e=S.44("1e");1e.C="1m/5l";k(7.17.1o)1e.1m=F;O 1e.4v(S.64(F));2D.3P(1e,2D.1P);2D.3D(1e)}},12:v(u,E){y u.12&&u.12.3a()==E.3a()},2v:{},F:v(u,E,F){u=u==1q?5U:u;B 1d=u[2C];k(!1d)1d=u[2C]=++86;k(E&&!7.2v[1d])7.2v[1d]={};k(F!==15)7.2v[1d][E]=F;y E?7.2v[1d][E]:1d},3w:v(u,E){u=u==1q?5U:u;B 1d=u[2C];k(E){k(7.2v[1d]){3E 7.2v[1d][E];E="";Q(E 1D 7.2v[1d])2k;k(!E)7.3w(u)}}O{2i{3E u[2C]}2o(e){k(u.6w)u.6w(2C)}3E 7.2v[1d]}},P:v(1S,N,1Z){B E,i=0,J=1S.J;k(1Z){k(J==15){Q(E 1D 1S)k(N.1Q(1S[E],1Z)===R)2k}O Q(;i<J;)k(N.1Q(1S[i++],1Z)===R)2k}O{k(J==15){Q(E 1D 1S)k(N.1G(1S[E],E,1S[E])===R)2k}O Q(B K=1S[0];i<J&&N.1G(K,i,K)!==R;K=1S[++i]){}}y 1S},19:v(u,K,C,i,E){k(7.1W(K))K=K.1G(u,i);y K&&K.1N==5a&&C=="2w"&&!8a.14(E)?K+"3B":K},1w:{1c:v(u,2q){7.P((2q||"").2g(/\\s+/),v(i,1w){k(u.18==1&&!7.1w.4L(u.1w,1w))u.1w+=(u.1w?" ":"")+1w})},2r:v(u,2q){k(u.18==1)u.1w=2q!=15?7.4i(u.1w.2g(/\\s+/),v(1w){y!7.1w.4L(2q,1w)}).7y(" "):""},4L:v(u,1w){y 7.3d(1w,(u.1w||u).7R().2g(/\\s+/))>-1}},3p:v(u,V,N){B 34={};Q(B E 1D V){34[E]=u.T[E];u.T[E]=V[E]}N.1G(u);Q(B E 1D V)u.T[E]=34[E]},1v:v(u,E,49){k(E=="2N"||E=="2m"){B 11,36={3L:"6D",6k:"1X",1h:"4n"},3A=E=="2N"?["6p","8D"]:["6s","82"];v 68(){11=E=="2N"?u.9y:u.9z;B 4g=0,2W=0;7.P(3A,v(){4g+=3t(7.2w(u,"4g"+b,L))||0;2W+=3t(7.2w(u,"2W"+b+"4J",L))||0});11-=2E.9G(4g+2W)}k(7(u).4P(":5H"))68();O 7.3p(u,36,68);y 2E.2P(0,11)}y 7.2w(u,E,49)},2w:v(u,E,49){B H,T=u.T;v 4H(u){k(!7.17.2K)y R;B H=4t.6f(u,U);y!H||H.5M("4H")==""}k(E=="1O"&&7.17.1o){H=7.1M(T,"1O");y H==""?"1":H}k(7.17.3k&&E=="1h"){B 8c=T.6o;T.6o="0 9A 9C";T.6o=8c}k(E.1r(/58/i))E=3M;k(!49&&T&&T[E])H=T[E];O k(4t.6f){k(E.1r(/58/i))E="58";E=E.1L(/([A-Z])/g,"-$1").3U();B 4I=4t.6f(u,U);k(4I&&!4H(u))H=4I.5M(E);O{B 3p=[],3o=[],a=u,i=0;Q(;a&&4H(a);a=a.1l)3o.7p(a);Q(;i<3o.J;i++)k(4H(3o[i])){3p[i]=3o[i].T.1h;3o[i].T.1h="4n"}H=E=="1h"&&3p[3o.J-1]!=U?"3q":(4I&&4I.5M(E))||"";Q(i=0;i<3p.J;i++)k(3p[i]!=U)3o[i].T.1h=3p[i]}k(E=="1O"&&H=="")H="1"}O k(u.5z){B 8E=E.1L(/\\-(\\w)/g,v(3G,5b){y 5b.3a()});H=u.5z[E]||u.5z[8E];k(!/^\\d+(3B)?$/i.14(H)&&/^\\d/.14(H)){B 1u=T.1u,8L=u.5W.1u;u.5W.1u=u.5z.1u;T.1u=H||0;H=T.9s+"3B";T.1u=1u;u.5W.1u=8L}}y H},5C:v(1j,1g){B H=[];1g=1g||S;k(1F 1g.44==\'15\')1g=1g.32||1g[0]&&1g[0].32||S;7.P(1j,v(i,u){k(!u)y;k(u.1N==5a)u+=\'\';k(1F u=="2p"){u=u.1L(/(<(\\w+)[^>]*?)\\/>/g,v(3G,7V,3C){y 3C.1r(/^(9K|br|7j|8T|51|8i|8Y|3W|8N|9c|9J)$/i)?3G:7V+"></"+3C+">"});B 2y=7.3S(u).3U(),1T=1g.44("1T");B 4a=!2y.1C("<1x")&&[1,"<30 7l=\'7l\'>","</30>"]||!2y.1C("<9b")&&[1,"<7m>","</7m>"]||2y.1r(/^<(9d|1I|9a|99|9n)/)&&[1,"<27>","</27>"]||!2y.1C("<5o")&&[2,"<27><1I>","</1I></27>"]||(!2y.1C("<9k")||!2y.1C("<9j"))&&[3,"<27><1I><5o>","</5o></1I></27>"]||!2y.1C("<7j")&&[2,"<27><1I></1I><7h>","</7h></27>"]||7.17.1o&&[1,"1T<1T>","</1T>"]||[0,"",""];1T.4X=4a[1]+u+4a[2];1Y(4a[0]--)1T=1T.6b;k(7.17.1o){B 1I=!2y.1C("<27")&&2y.1C("<1I")<0?1T.1P&&1T.1P.45:4a[1]=="<27>"&&2y.1C("<1I")<0?1T.45:[];Q(B j=1I.J-1;j>=0;--j)k(7.12(1I[j],"1I")&&!1I[j].45.J)1I[j].1l.3D(1I[j]);k(/^\\s/.14(u))1T.3P(1g.64(u.1r(/^\\s*/)[0]),1T.1P)}u=7.2M(1T.45)}k(u.J===0&&(!7.12(u,"4m")&&!7.12(u,"30")))y;k(u[0]==15||7.12(u,"4m")||u.V)H.1J(u);O H=7.2d(H,u)});y H},1M:v(u,E,K){k(!u||u.18==3||u.18==8)y 15;B 4K=!7.5i(u),4j=K!==15,1o=7.17.1o;E=4K&&7.36[E]||E;k(u.2T){B 2l=/71|3F|T/.14(E);k(E=="3H"&&7.17.2K)u.1l.5S;k(E 1D u&&4K&&!2l){k(4j){k(E=="C"&&7.12(u,"51")&&u.1l)7M"C 9w 9t\'t be 9B";u[E]=K}k(7.12(u,"4m")&&u.7e(E))y u.7e(E).7b;y u[E]}k(1o&&4K&&E=="T")y 7.1M(u.T,"9D",K);k(4j)u.9E(E,""+K);B 1M=1o&&4K&&2l?u.5L(E,2):u.5L(E);y 1M===U?15:1M}k(1o&&E=="1O"){k(4j){u.7P=1;u.1K=(u.1K||"").1L(/7O\\([^)]*\\)/,"")+(48(K)+\'\'=="9r"?"":"7O(1O="+K*7T+")")}y u.1K&&u.1K.1C("1O=")>=0?(3t(u.1K.1r(/1O=([^)]*)/)[1])/7T)+\'\':""}E=E.1L(/-([a-z])/9u,v(3G,5b){y 5b.3a()});k(4j)u[E]=K;y u[E]},3S:v(1m){y(1m||"").1L(/^\\s+|\\s+$/g,"")},2M:v(1E){B H=[];k(1E!=U){B i=1E.J;k(i==U||1E.2g||1E.5t||1E.1G)H[0]=1E;O 1Y(i)H[--i]=1E[i]}y H},3d:v(u,1E){Q(B i=0,J=1E.J;i<J;i++)k(1E[i]===u)y i;y-1},2d:v(2A,66){B i=0,u,3r=2A.J;k(7.17.1o){1Y(u=66[i++])k(u.18!=8)2A[3r++]=u}O 1Y(u=66[i++])2A[3r++]=u;y 2A},5e:v(1E){B H=[],1U={};2i{Q(B i=0,J=1E.J;i<J;i++){B 1d=7.F(1E[i]);k(!1U[1d]){1U[1d]=L;H.1J(1E[i])}}}2o(e){H=1E}y H},4i:v(1j,N,7x){B H=[];Q(B i=0,J=1j.J;i<J;i++)k(!7x!=!N(1j[i],i))H.1J(1j[i]);y H},2V:v(1j,N){B H=[];Q(B i=0,J=1j.J;i<J;i++){B K=N(1j[i],i);k(K!=U)H[H.J]=K}y H.7s.1Q([],H)}});B 2R=9Y.2R.3U();7.17={6G:(2R.1r(/.+(?:a1|9T|9S|9Q)[\\/: ]([\\d.]+)/)||[])[1],2K:/7I/.14(2R),3k:/3k/.14(2R),1o:/1o/.14(2R)&&!/3k/.14(2R),4T:/4T/.14(2R)&&!/(a2|7I)/.14(2R)};B 3M=7.17.1o?"3M":"7A";7.1H({8n:!7.17.1o||S.79=="81",36:{"Q":"8W","8V":"1w","58":3M,7A:3M,3M:3M,91:"8S",8Z:"93",8M:"8O"}});7.P({1A:v(u){y u.1l},8Q:v(u){y 7.33(u,"1l")},8R:v(u){y 7.3I(u,2,"3l")},8P:v(u){y 7.3I(u,2,"4W")},9o:v(u){y 7.33(u,"3l")},9i:v(u){y 7.33(u,"4W")},94:v(u){y 7.67(u.1l.1P,u)},9g:v(u){y 7.67(u.1P)},80:v(u){y 7.12(u,"9m")?u.9e||u.98.S:7.2M(u.45)}},v(E,I){7.I[E]=v(M){B H=7.2V(b,I);k(M&&1F M=="2p")H=7.4e(M,H);y b.3e(7.5e(H))}});7.P({7E:"4h",95:"7c",3P:"7i",a0:"6x",bw:"72"},v(E,77){7.I[E]=v(){B 1Z=1i;y b.P(v(){Q(B i=0,J=1Z.J;i<J;i++)7(1Z[i])[77](b)})}});7.P({bt:v(E){7.1M(b,E,"");k(b.18==1)b.6w(E)},bC:v(2q){7.1w.1c(b,2q)},bb:v(2q){7.1w.2r(b,2q)},bc:v(2q){7.1w[7.1w.4L(b,2q)?"2r":"1c"](b,2q)},2r:v(M){k(!M||7.1K(M,[b]).r.J){7("*",b).1c(b).P(v(){7.G.2r(b);7.3w(b)});k(b.1l)b.1l.3D(b)}},50:v(){7(">*",b).2r();1Y(b.1P)b.3D(b.1P)}},v(E,I){7.I[E]=v(){y b.P(I,1i)}});7.P(["89","4J"],v(i,E){B C=E.3U();7.I[C]=v(47){y b[0]==1q?7.17.3k&&S.1n["6v"+E]||7.17.2K&&1q["5T"+E]||S.79=="81"&&S.22["6v"+E]||S.1n["6v"+E]:b[0]==S?2E.2P(2E.2P(S.1n["5B"+E],S.22["5B"+E]),2E.2P(S.1n["2L"+E],S.22["2L"+E])):47==15?(b.J?7.1v(b[0],C):U):b.1v(C,47.1N==6t?47:47+"3B")}});v 1R(u,19){y u[0]&&48(7.2w(u[0],19,L),10)||0}B 43=7.17.2K&&48(7.17.6G)<b6?"(?:[\\\\w*55-]|\\\\\\\\.)":"(?:[\\\\w\\bf-\\bl*55-]|\\\\\\\\.)",7G=31 5n("^>\\\\s*("+43+"+)"),7K=31 5n("^("+43+"+)(#)("+43+"+)"),7J=31 5n("^([#.]?)("+43+"*)");7.1H({3h:{"":v(a,i,m){y m[2]=="*"||7.12(a,m[2])},"#":v(a,i,m){y a.5L("1d")==m[2]},":":{bm:v(a,i,m){y i<m[3]-0},bk:v(a,i,m){y i>m[3]-0},3I:v(a,i,m){y m[3]-0==i},7Y:v(a,i,m){y m[3]-0==i},2A:v(a,i){y i==0},2t:v(a,i,m,r){y i==r.J-1},7Z:v(a,i){y i%2==0},7U:v(a,i){y i%2},"2A-5w":v(a){y a.1l.4G("*")[0]==a},"2t-5w":v(a){y 7.3I(a.1l.6b,1,"4W")==a},"bj-5w":v(a){y!7.3I(a.1l.6b,2,"4W")},1A:v(a){y a.1P},50:v(a){y!a.1P},ba:v(a,i,m){y(a.7X||a.b8||7(a).1m()||"").1C(m[3])>=0},5H:v(a){y"1X"!=a.C&&7.1v(a,"1h")!="3q"&&7.1v(a,"6k")!="1X"},1X:v(a){y"1X"==a.C||7.1v(a,"1h")=="3q"||7.1v(a,"6k")=="1X"},bp:v(a){y!a.4N},4N:v(a){y a.4N},5c:v(a){y a.5c},3H:v(a){y a.3H||7.1M(a,"3H")},1m:v(a){y"1m"==a.C},6j:v(a){y"6j"==a.C},6h:v(a){y"6h"==a.C},6U:v(a){y"6U"==a.C},4B:v(a){y"4B"==a.C},5V:v(a){y"5V"==a.C},7L:v(a){y"7L"==a.C},7B:v(a){y"7B"==a.C},37:v(a){y"37"==a.C||7.12(a,"37")},51:v(a){y/51|30|8o|37/i.14(a.12)},4L:v(a,i,m){y 7.2Z(m[3],a).J},b5:v(a){y/h\\d/i.14(a.12)},a3:v(a){y 7.4i(7.21,v(I){y a==I.u}).J}}},7C:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,31 5n("^([:.#]*)("+43+"+)")],4e:v(3h,1j,24){B 34,1s=[];1Y(3h&&3h!=34){34=3h;B f=7.1K(3h,1j,24);3h=f.t.1L(/^\\s*,\\s*/,"");1s=24?1j=f.r:7.2d(1s,f.r)}y 1s},2Z:v(t,1g){k(1F t!="2p")y[t];k(1g&&1g.18!=1&&1g.18!=9)y[];1g=1g||S;B H=[1g],1U=[],2t,12;1Y(t&&2t!=t){B r=[];2t=t;t=7.3S(t);B 53=R,41=7G,m=41.3f(t);k(m){12=m[1].3a();Q(B i=0;H[i];i++)Q(B c=H[i].1P;c;c=c.3l)k(c.18==1&&(12=="*"||c.12.3a()==12))r.1J(c);H=r;t=t.1L(41,"");k(t.1C(" ")==0)7S;53=L}O{41=/^([>+~])\\s*(\\w*)/i;k((m=41.3f(t))!=U){r=[];B 2d={};12=m[2].3a();m=m[1];Q(B j=0,3X=H.J;j<3X;j++){B n=m=="~"||m=="+"?H[j].3l:H[j].1P;Q(;n;n=n.3l)k(n.18==1){B 1d=7.F(n);k(m=="~"&&2d[1d])2k;k(!12||n.12.3a()==12){k(m=="~")2d[1d]=L;r.1J(n)}k(m=="+")2k}}H=r;t=7.3S(t.1L(41,""));53=L}}k(t&&!53){k(!t.1C(",")){k(1g==H[0])H.59();1U=7.2d(1U,H);r=H=[1g];t=" "+t.7W(1,t.J)}O{B 4R=7K;B m=4R.3f(t);k(m){m=[0,m[2],m[3],m[1]]}O{4R=7J;m=4R.3f(t)}m[2]=m[2].1L(/\\\\/g,"");B u=H[H.J-1];k(m[1]=="#"&&u&&u.5Z&&!7.5i(u)){B 3j=u.5Z(m[2]);k((7.17.1o||7.17.3k)&&3j&&1F 3j.1d=="2p"&&3j.1d!=m[2])3j=7(\'[@1d="\'+m[2]+\'"]\',u)[0];H=r=3j&&(!m[3]||7.12(3j,m[3]))?[3j]:[]}O{Q(B i=0;H[i];i++){B 3C=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];k(3C=="*"&&H[i].12.3U()=="1S")3C="3W";r=7.2d(r,H[i].4G(3C))}k(m[1]==".")r=7.5O(r,m[2]);k(m[1]=="#"){B 2a=[];Q(B i=0;r[i];i++)k(r[i].5L("1d")==m[2]){2a=[r[i]];2k}r=2a}H=r}t=t.1L(4R,"")}}k(t){B 11=7.1K(t,r);H=r=11.r;t=7.3S(11.t)}}k(t)H=[];k(H&&1g==H[0])H.59();1U=7.2d(1U,H);y 1U},5O:v(r,m,24){m=" "+m+" ";B 2a=[];Q(B i=0;r[i];i++){B 6g=(" "+r[i].1w+" ").1C(m)>=0;k(!24&&6g||24&&!6g)2a.1J(r[i])}y 2a},1K:v(t,r,24){B 2t;1Y(t&&t!=2t){2t=t;B p=7.7C,m;Q(B i=0;p[i];i++){m=p[i].3f(t);k(m){t=t.bd(m[0].J);m[2]=m[2].1L(/\\\\/g,"");2k}}k(!m)2k;k(m[1]==":"&&m[2]=="24")r=6q.14(m[3])?7.1K(m[3],r,L).r:7(r).24(m[3]);O k(m[1]==".")r=7.5O(r,m[2],24);O k(m[1]=="["){B 2a=[],C=m[3];Q(B i=0,3X=r.J;i<3X;i++){B a=r[i],z=a[7.36[m[2]]||m[2]];k(z==U||/71|3F|3H/.14(m[2]))z=7.1M(a,m[2])||\'\';k((C==""&&!!z||C=="="&&z==m[5]||C=="!="&&z!=m[5]||C=="^="&&z&&!z.1C(m[5])||C=="$="&&z.7W(z.J-m[5].J)==m[5]||(C=="*="||C=="~=")&&z.1C(m[5])>=0)^24)2a.1J(a)}r=2a}O k(m[1]==":"&&m[2]=="3I-5w"){B 2d={},2a=[],14=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.3f(m[3]=="7Z"&&"2n"||m[3]=="7U"&&"2n+1"||!/\\D/.14(m[3])&&"bn+"+m[3]||m[3]),2A=(14[1]+(14[2]||1))-0,2t=14[3]-0;Q(B i=0,3X=r.J;i<3X;i++){B 3T=r[i],1l=3T.1l,1d=7.F(1l);k(!2d[1d]){B c=1;Q(B n=1l.1P;n;n=n.3l)k(n.18==1)n.5y=c++;2d[1d]=L}B 1c=R;k(2A==0){k(3T.5y==2t)1c=L}O k((3T.5y-2t)%2A==0&&(3T.5y-2t)/2A>=0)1c=L;k(1c^24)2a.1J(3T)}r=2a}O{B I=7.3h[m[1]];k(1F I=="1S")I=I[m[2]];k(1F I=="2p")I=7z("R||v(a,i){y "+I+";}");r=7.4i(r,v(u,i){y I(u,i,m,r)},24)}}y{r:r,t:t}},33:v(u,33){B 60=[],1s=u[33];1Y(1s&&1s!=S){k(1s.18==1)60.1J(1s);1s=1s[33]}y 60},3I:v(1s,5A,33,u){5A=5A||1;B 1R=0;Q(;1s;1s=1s[33])k(1s.18==1&&++1R==5A)2k;y 1s},67:v(n,u){B r=[];Q(;n;n=n.3l){k(n.18==1&&n!=u)r.1J(n)}y r}});7.G={1c:v(u,2j,16,F){k(u.18==3||u.18==8)y;k(7.17.1o&&u.5t)u=1q;k(!16.2x)16.2x=b.2x++;k(F!=15){B I=16;16=b.35(I,v(){y I.1Q(b,1i)});16.F=F}B 1f=7.F(u,"1f")||7.F(u,"1f",{}),1z=7.F(u,"1z")||7.F(u,"1z",v(){k(1F 7!="15"&&!7.G.6e)y 7.G.1z.1Q(1i.4k.u,1i)});1z.u=u;7.P(2j.2g(/\\s+/),v(38,C){B 1p=C.2g(".");C=1p[0];16.C=1p[1];B 3g=1f[C];k(!3g){3g=1f[C]={};k(!7.G.2l[C]||7.G.2l[C].4Y.1G(u)===R){k(u.4s)u.4s(C,1z,R);O k(u.73)u.73("5p"+C,1z)}}3g[16.2x]=16;7.G.2z[C]=L});u=U},2x:1,2z:{},2r:v(u,2j,16){k(u.18==3||u.18==8)y;B 1f=7.F(u,"1f"),H,38;k(1f){k(2j==15||(1F 2j=="2p"&&2j.bz(0)=="."))Q(B C 1D 1f)b.2r(u,C+(2j||""));O{k(2j.C){16=2j.16;2j=2j.C}7.P(2j.2g(/\\s+/),v(38,C){B 1p=C.2g(".");C=1p[0];k(1f[C]){k(16)3E 1f[C][16.2x];O Q(16 1D 1f[C])k(!1p[1]||1f[C][16].C==1p[1])3E 1f[C][16];Q(H 1D 1f[C])2k;k(!H){k(!7.G.2l[C]||7.G.2l[C].4Z.1G(u)===R){k(u.75)u.75(C,7.F(u,"1z"),R);O k(u.7v)u.7v("5p"+C,7.F(u,"1z"))}H=U;3E 1f[C]}}})}Q(H 1D 1f)2k;k(!H){B 1z=7.F(u,"1z");k(1z)1z.u=U;7.3w(u,"1f");7.3w(u,"1z")}}},2f:v(C,F,u,7u,5F){F=7.2M(F);k(C.1C("!")>=0){C=C.46(0,-1);B 5u=L}k(!u){k(b.2z[C])7("*").1c([1q,S]).2f(C,F)}O{k(u.18==3||u.18==8)y 15;B 11,H,I=7.1W(u[C]||U),G=!F[0]||!F[0].3z;k(G){F.7p({C:C,1y:u,3z:v(){},4w:v(){},5K:1V()});F[0][2C]=L}F[0].C=C;k(5u)F[0].5u=L;B 1z=7.F(u,"1z");k(1z)11=1z.1Q(u,F);k((!I||(7.12(u,\'a\')&&C=="5j"))&&u["5p"+C]&&u["5p"+C].1Q(u,F)===R)11=R;k(G)F.59();k(5F&&7.1W(5F)){H=5F.1Q(u,11==U?F:F.7s(11));k(H!==15)11=H}k(I&&7u!==R&&11!==R&&!(7.12(u,\'a\')&&C=="5j")){b.6e=L;2i{u[C]()}2o(e){}}b.6e=R}y 11},1z:v(G){B 11,H,3y,3G,3g;G=1i[0]=7.G.7g(G||1q.G);3y=G.C.2g(".");G.C=3y[0];3y=3y[1];3G=!3y&&!G.5u;3g=(7.F(b,"1f")||{})[G.C];Q(B j 1D 3g){B 16=3g[j];k(3G||16.C==3y){G.16=16;G.F=16.F;H=16.1Q(b,1i);k(11!==R)11=H;k(H===R){G.3z();G.4w()}}}y 11},7g:v(G){k(G[2C]==L)y G;B 2S=G;G={2S:2S};B 36="b3 ao ap an 37 am 4y 61 8J 65 ak F al b4 5G 16 5Y 62 ar aw 6u 8H ax av 5f au as at 8B 1y 5K 8F C aj ai 3A".2g(" ");Q(B i=36.J;i;i--)G[36[i]]=2S[36[i]];G[2C]=L;G.3z=v(){k(2S.3z)2S.3z();2S.a8=R};G.4w=v(){k(2S.4w)2S.4w();2S.a7=L};G.5K=G.5K||1V();k(!G.1y)G.1y=G.8B||S;k(G.1y.18==3)G.1y=G.1y.1l;k(!G.5f&&G.5G)G.5f=G.5G==G.1y?G.8F:G.5G;k(G.6u==U&&G.61!=U){B 1B=S.22,1n=S.1n;G.6u=G.61+(1B&&1B.2U||1n&&1n.2U||0)-(1B.8d||0);G.8H=G.8J+(1B&&1B.2I||1n&&1n.2I||0)-(1B.8z||0)}k(!G.3A&&((G.4y||G.4y===0)?G.4y:G.5Y))G.3A=G.4y||G.5Y;k(!G.62&&G.65)G.62=G.65;k(!G.3A&&G.37)G.3A=(G.37&1?1:(G.37&2?3:(G.37&4?2:0)));y G},35:v(I,35){35.2x=I.2x=I.2x||35.2x||b.2x++;y 35},2l:{2B:{4Y:v(){6d();y},4Z:v(){y}},4z:{4Y:v(){k(7.17.1o)y R;7(b).3m("5R",7.G.2l.4z.16);y L},4Z:v(){k(7.17.1o)y R;7(b).4q("5R",7.G.2l.4z.16);y L},16:v(G){k(5P(G,b))y L;G.C="4z";y 7.G.1z.1Q(b,1i)}},4A:{4Y:v(){k(7.17.1o)y R;7(b).3m("5Q",7.G.2l.4A.16);y L},4Z:v(){k(7.17.1o)y R;7(b).4q("5Q",7.G.2l.4A.16);y L},16:v(G){k(5P(G,b))y L;G.C="4A";y 7.G.1z.1Q(b,1i)}}}};7.I.1H({3m:v(C,F,I){y C=="5N"?b.2Q(C,F,I):b.P(v(){7.G.1c(b,C,I||F,I&&F)})},2Q:v(C,F,I){B 2Q=7.G.35(I||F,v(G){7(b).4q(G,2Q);y(I||F).1Q(b,1i)});y b.P(v(){7.G.1c(b,C,2Q,I&&F)})},4q:v(C,I){y b.P(v(){7.G.2r(b,C,I)})},2f:v(C,F,I){y b.P(v(){7.G.2f(C,F,b,L,I)})},6a:v(C,F,I){y b[0]&&7.G.2f(C,F,b[0],R,I)},2X:v(I){B 1Z=1i,i=1;1Y(i<1Z.J)7.G.35(I,1Z[i++]);y b.5j(7.G.35(I,v(G){b.6i=(b.6i||0)%i;G.3z();y 1Z[b.6i++].1Q(b,1i)||R}))},aU:v(85,83){y b.3m(\'4z\',85).3m(\'4A\',83)},2B:v(I){6d();k(7.3u)I.1G(S,7);O 7.4F.1J(v(){y I.1G(b,7)});y b}});7.1H({3u:R,4F:[],2B:v(){k(!7.3u){7.3u=L;k(7.4F){7.P(7.4F,v(){b.1G(S)});7.4F=U}7(S).6a("2B")}}});B 6y=R;v 6d(){k(6y)y;6y=L;k(S.4s&&!7.17.3k)S.4s("88",7.2B,R);k(7.17.1o&&1q==2h)(v(){k(7.3u)y;2i{S.22.aQ("1u")}2o(40){4D(1i.4k,0);y}7.2B()})();k(7.17.3k)S.4s("88",v(){k(7.3u)y;Q(B i=0;i<S.6n.J;i++)k(S.6n[i].4N){4D(1i.4k,0);y}7.2B()},R);k(7.17.2K){B 5g;(v(){k(7.3u)y;k(S.3V!="8b"&&S.3V!="23"){4D(1i.4k,0);y}k(5g===15)5g=7("T, 8i[aW=aX]").J;k(S.6n.J!=5g){4D(1i.4k,0);y}7.2B()})()}7.G.1c(1q,"4o",7.2B)}7.P(("b1,b0,4o,aY,5B,5N,5j,aP,"+"aO,aE,aF,5R,5Q,aA,30,"+"5V,aB,aG,aH,40").2g(","),v(i,E){7.I[E]=v(I){y I?b.3m(E,I):b.2f(E)}});B 5P=v(G,u){B 1A=G.5f;1Y(1A&&1A!=u)2i{1A=1A.1l}2o(40){1A=u}y 1A==u};7(1q).3m("5N",v(){7("*").1c(S).4q()});7.I.1H({8r:7.I.4o,4o:v(W,3i,N){k(1F W!=\'2p\')y b.8r(W);B 57=W.1C(" ");k(57>=0){B M=W.46(57,W.J);W=W.46(0,57)}N=N||v(){};B C="3s";k(3i)k(7.1W(3i)){N=3i;3i=U}O{3i=7.3W(3i);C="8s"}B 2G=b;7.4l({W:W,C:C,28:"26",F:3i,23:v(4r,1t){k(1t=="2u"||1t=="7n")2G.26(M?7("<1T/>").4h(4r.5v.1L(/<1e(.|\\s)*?\\/1e>/g,"")).2Z(M):4r.5v);2G.P(N,[4r.5v,1t,4r])}});y b},aJ:v(){y 7.3W(b.8p())},8p:v(){y b.2V(v(){y 7.12(b,"4m")?7.2M(b.bg):b}).1K(v(){y b.E&&!b.4N&&(b.5c||/30|8o/i.14(b.12)||/1m|1X|4B/i.14(b.C))}).2V(v(i,u){B 11=7(b).11();y 11==U?U:11.1N==2Y?7.2V(11,v(11,i){y{E:u.E,K:11}}):{E:u.E,K:11}}).4c()}});7.P("8A,74,76,78,7f,8I".2g(","),v(i,o){7.I[o]=v(f){y b.3m(o,f)}});B 8j=1V();7.1H({4c:v(W,F,N,C){k(7.1W(F)){N=F;F=U}y 7.4l({C:"3s",W:W,F:F,2u:N,28:C})},aK:v(W,N){y 7.4c(W,U,N,"1e")},aL:v(W,F,N){y 7.4c(W,F,N,"3Z")},aN:v(W,F,N,C){k(7.1W(F)){N=F;F={}}y 7.4l({C:"8s",W:W,F:F,2u:N,28:C})},aM:v(8x){7.1H(7.6I,8x)},6I:{W:6Q.71,2z:L,C:"3s",3x:0,8e:"5k/x-aC-4m-aD",8u:L,3v:L,F:U,6S:U,4B:U,5I:{3n:"5k/3n, 1m/3n",26:"1m/26",1e:"1m/5l, 5k/5l",3Z:"5k/3Z, 1m/5l",1m:"1m/b2",5d:"*/*"}},5D:{},4l:v(s){s=7.1H(L,s,7.1H(L,{},7.6I,s));B 2b,3R=/=\\?(&|$)/g,1t,F,C=s.C.3a();k(s.F&&s.8u&&1F s.F!="2p")s.F=7.3W(s.F);k(s.28=="2b"){k(C=="3s"){k(!s.W.1r(3R))s.W+=(s.W.1r(/\\?/)?"&":"?")+(s.2b||"N")+"=?"}O k(!s.F||!s.F.1r(3R))s.F=(s.F?s.F+"&":"")+(s.2b||"N")+"=?";s.28="3Z"}k(s.28=="3Z"&&(s.F&&s.F.1r(3R)||s.W.1r(3R))){2b="2b"+8j++;k(s.F)s.F=(s.F+"").1L(3R,"="+2b+"$1");s.W=s.W.1L(3R,"="+2b+"$1");s.28="1e";1q[2b]=v(2a){F=2a;2u();23();1q[2b]=15;2i{3E 1q[2b]}2o(e){}k(2D)2D.3D(1e)}}k(s.28=="1e"&&s.2v==U)s.2v=R;k(s.2v===R&&C=="3s"){B 6A=1V();B H=s.W.1L(/(\\?|&)55=.*?(&|$)/,"$aR="+6A+"$2");s.W=H+((H==s.W)?(s.W.1r(/\\?/)?"&":"?")+"55="+6A:"")}k(s.F&&C=="3s"){s.W+=(s.W.1r(/\\?/)?"&":"?")+s.F;s.F=U}k(s.2z&&!7.5x++)7.G.2f("8A");B 6C=/^(?:\\w+:)?\\/\\/([^\\/?#]+)/;k(s.28=="1e"&&C=="3s"&&6C.14(s.W)&&6C.3f(s.W)[1]!=6Q.aS){B 2D=S.4G("2D")[0];B 1e=S.44("1e");1e.3F=s.W;k(s.84)1e.aT=s.84;k(!2b){B 1U=R;1e.aV=1e.4C=v(){k(!1U&&(!b.3V||b.3V=="8b"||b.3V=="23")){1U=L;2u();23();2D.3D(1e)}}}2D.4v(1e);y 15}B 5q=R;B Y=1q.8g?31 8g("az.ay"):31 8K();k(s.6S)Y.8h(C,s.W,s.3v,s.6S,s.4B);O Y.8h(C,s.W,s.3v);2i{k(s.F)Y.5J("ad-ac",s.8e);k(s.6N)Y.5J("ae-6T-af",7.5D[s.W]||"ah, ag ab aa 6M:6M:6M a5");Y.5J("X-a4-a6","8K");Y.5J("a9",s.28&&s.5I[s.28]?s.5I[s.28]+", */*":s.5I.5d)}2o(e){}k(s.8C&&s.8C(Y,s)===R){s.2z&&7.5x--;Y.7r();y R}k(s.2z)7.G.2f("8I",[Y,s]);B 4C=v(6O){k(!5q&&Y&&(Y.3V==4||6O=="3x")){5q=L;k(5r){8G(5r);5r=U}1t=6O=="3x"&&"3x"||!7.7d(Y)&&"40"||s.6N&&7.7a(Y,s.W)&&"7n"||"2u";k(1t=="2u"){2i{F=7.7N(Y,s.28,s.bv)}2o(e){1t="6z"}}k(1t=="2u"){B 5s;2i{5s=Y.6R("7q-6T")}2o(e){}k(s.6N&&5s)7.5D[s.W]=5s;k(!2b)2u()}O 7.6L(s,Y,1t);23();k(s.3v)Y=U}};k(s.3v){B 5r=5t(4C,13);k(s.3x>0)4D(v(){k(Y){Y.7r();k(!5q)4C("3x")}},s.3x)}2i{Y.bs(s.F)}2o(e){7.6L(s,Y,U,e)}k(!s.3v)4C();v 2u(){k(s.2u)s.2u(F,1t);k(s.2z)7.G.2f("7f",[Y,s])}v 23(){k(s.23)s.23(Y,1t);k(s.2z)7.G.2f("76",[Y,s]);k(s.2z&&!--7.5x)7.G.2f("74")}y Y},6L:v(s,Y,1t,e){k(s.40)s.40(Y,1t,e);k(s.2z)7.G.2f("78",[Y,s,e])},5x:0,7d:v(Y){2i{y!Y.1t&&6Q.bG=="6U:"||(Y.1t>=8w&&Y.1t<bD)||Y.1t==7w||Y.1t==bA||7.17.2K&&Y.1t==15}2o(e){}y R},7a:v(Y,W){2i{B 7Q=Y.6R("7q-6T");y Y.1t==7w||7Q==7.5D[W]||7.17.2K&&Y.1t==15}2o(e){}y R},7N:v(Y,C,1K){B 6K=Y.6R("bo-C"),3n=C=="3n"||!C&&6K&&6K.1C("3n")>=0,F=3n?Y.b7:Y.5v;k(3n&&F.22.2T=="6z")7M"6z";k(1K)F=1K(F,C);k(C=="1e")7.6E(F);k(C=="3Z")F=7z("("+F+")");y F},3W:v(a){B s=[];k(a.1N==2Y||a.7)7.P(a,v(){s.1J(42(b.E)+"="+42(b.K))});O Q(B j 1D a)k(a[j]&&a[j].1N==2Y)7.P(a[j],v(){s.1J(42(j)+"="+42(b))});O s.1J(42(j)+"="+42(7.1W(a[j])?a[j]():a[j]));y s.7y("&").1L(/%20/g,"+")}});7.I.1H({25:v(1a,N){y 1a?b.2J({2m:"25",2N:"25",1O:"25"},1a,N):b.1K(":1X").P(v(){b.T.1h=b.6V||"";k(7.1v(b,"1h")=="3q"){B u=7("<"+b.2T+" />").7E("1n");b.T.1h=u.1v("1h");k(b.T.1h=="3q")b.T.1h="4n";u.2r()}}).2s()},29:v(1a,N){y 1a?b.2J({2m:"29",2N:"29",1O:"29"},1a,N):b.1K(":5H").P(v(){b.6V=b.6V||7.1v(b,"1h");b.T.1h="3q"}).2s()},7F:7.I.2X,2X:v(I,70){y 7.1W(I)&&7.1W(70)?b.7F.1Q(b,1i):I?b.2J({2m:"2X",2N:"2X",1O:"2X"},I,70):b.P(v(){7(b)[7(b).4P(":1X")?"25":"29"]()})},b9:v(1a,N){y b.2J({2m:"25"},1a,N)},bE:v(1a,N){y b.2J({2m:"29"},1a,N)},by:v(1a,N){y b.2J({2m:"2X"},1a,N)},bq:v(1a,N){y b.2J({1O:"25"},1a,N)},bu:v(1a,N){y b.2J({1O:"29"},1a,N)},bH:v(1a,4V,N){y b.2J({1O:4V},1a,N)},2J:v(19,1a,2e,N){B 6Y=7.1a(1a,2e,N);y b[6Y.2c===R?"P":"2c"](v(){k(b.18!=1)y R;B 1x=7.1H({},6Y),p,1X=7(b).4P(":1X"),2G=b;Q(p 1D 19){k(19[p]=="29"&&1X||19[p]=="25"&&!1X)y 1x.23.1G(b);k(p=="2m"||p=="2N"){1x.1h=7.1v(b,"1h");1x.3N=b.T.3N}}k(1x.3N!=U)b.T.3N="1X";1x.4E=7.1H({},19);7.P(19,v(E,11){B e=31 7.1k(2G,1x,E);k(/2X|25|29/.14(11))e[11=="2X"?1X?"25":"29":11](19);O{B 1p=11.7R().1r(/^([+-]=)?([\\d+-.]+)(.*)$/),2F=e.1s(L)||0;k(1p){B 2s=3t(1p[2]),2O=1p[3]||"3B";k(2O!="3B"){2G.T[E]=(2s||1)+2O;2F=((2s||1)/e.1s(L))*2F;2G.T[E]=2F+2O}k(1p[1])2s=((1p[1]=="-="?-1:1)*2s)+2F;e.4Q(2F,2s,2O)}O e.4Q(2F,11,"")}});y L})},2c:v(C,I){k(7.1W(C)||(C&&C.1N==2Y)){I=C;C="1k"}k(!C||(1F C=="2p"&&!I))y 2c(b[0],C);y b.P(v(){k(I.1N==2Y)2c(b,C,I);O{2c(b,C).1J(I);k(2c(b,C).J==1)I.1G(b)}})},aq:v(7t,3K){B 21=7.21;k(7t)b.2c([]);b.P(v(){Q(B i=21.J-1;i>=0;i--)k(21[i].u==b){k(3K)21[i](L);21.7k(i,1)}});k(!3K)b.6B();y b}});B 2c=v(u,C,1E){k(u){C=C||"1k";B q=7.F(u,C+"2c");k(!q||1E)q=7.F(u,C+"2c",7.2M(1E))}y q};7.I.6B=v(C){C=C||"1k";y b.P(v(){B q=2c(b,C);q.59();k(q.J)q[0].1G(b)})};7.1H({1a:v(1a,2e,I){B 1x=1a&&1a.1N==97?1a:{23:I||!I&&2e||7.1W(1a)&&1a,3b:1a,2e:I&&2e||2e&&2e.1N!=8U&&2e};1x.3b=(1x.3b&&1x.3b.1N==5a?1x.3b:7.1k.6F[1x.3b])||7.1k.6F.8y;1x.34=1x.23;1x.23=v(){k(1x.2c!==R)7(b).6B();k(7.1W(1x.34))1x.34.1G(b)};y 1x},2e:{8v:v(p,n,5h,56){y 5h+56*p},6H:v(p,n,5h,56){y((-2E.9x(p*2E.9H)/2)+0.5)*56+5h}},21:[],4S:U,1k:v(u,V,19){b.V=V;b.u=u;b.19=19;k(!V.4u)V.4u={}}});7.1k.4O={5m:v(){k(b.V.3Q)b.V.3Q.1G(b.u,b.1V,b);(7.1k.3Q[b.19]||7.1k.3Q.5d)(b);k(b.19=="2m"||b.19=="2N")b.u.T.1h="4n"},1s:v(49){k(b.u[b.19]!=U&&b.u.T[b.19]==U)y b.u[b.19];B r=3t(7.1v(b.u,b.19,49));y r&&r>-9v?r:3t(7.2w(b.u,b.19))||0},4Q:v(7o,4V,2O){b.6W=1V();b.2F=7o;b.2s=4V;b.2O=2O||b.2O||"3B";b.1V=b.2F;b.3r=b.52=0;b.5m();B 2G=b;v t(3K){y 2G.3Q(3K)}t.u=b.u;7.21.1J(t);k(7.4S==U){7.4S=5t(v(){B 21=7.21;Q(B i=0;i<21.J;i++)k(!21[i]())21.7k(i--,1);k(!21.J){8G(7.4S);7.4S=U}},13)}},25:v(){b.V.4u[b.19]=7.1M(b.u.T,b.19);b.V.25=L;b.4Q(0,b.1s());k(b.19=="2N"||b.19=="2m")b.u.T[b.19]="9F";7(b.u).25()},29:v(){b.V.4u[b.19]=7.1M(b.u.T,b.19);b.V.29=L;b.4Q(b.1s(),0)},3Q:v(3K){B t=1V();k(3K||t>b.V.3b+b.6W){b.1V=b.2s;b.3r=b.52=1;b.5m();b.V.4E[b.19]=L;B 1U=L;Q(B i 1D b.V.4E)k(b.V.4E[i]!==L)1U=R;k(1U){k(b.V.1h!=U){b.u.T.3N=b.V.3N;b.u.T.1h=b.V.1h;k(7.1v(b.u,"1h")=="3q")b.u.T.1h="4n"}k(b.V.29)b.u.T.1h="3q";k(b.V.29||b.V.25)Q(B p 1D b.V.4E)7.1M(b.u.T,p,b.V.4u[p])}k(1U)b.V.23.1G(b.u);y R}O{B n=t-b.6W;b.52=n/b.V.3b;b.3r=7.2e[b.V.2e||(7.2e.6H?"6H":"8v")](b.52,n,0,1,b.V.3b);b.1V=b.2F+((b.2s-b.2F)*b.3r);b.5m()}y L}};7.1H(7.1k,{6F:{9p:9P,9h:8w,8y:9l},3Q:{2U:v(1k){1k.u.2U=1k.1V},2I:v(1k){1k.u.2I=1k.1V},1O:v(1k){7.1M(1k.u.T,"1O",1k.1V)},5d:v(1k){1k.u.T[1k.19]=1k.1V+1k.2O}}});7.I.2L=v(){B 1u=0,2h=0,u=b[0],3Y;k(u)9f(7.17){B 1A=u.1l,4U=u,1b=u.1b,1B=u.32,6J=2K&&48(6G)<9Z&&!/9q/i.14(2R),1v=7.2w,3J=1v(u,"3L")=="3J";k(u.8f){B 6P=u.8f();1c(6P.1u+2E.2P(1B.22.2U,1B.1n.2U),6P.2h+2E.2P(1B.22.2I,1B.1n.2I));1c(-1B.22.8d,-1B.22.8z)}O{1c(u.6X,u.6Z);1Y(1b){1c(1b.6X,1b.6Z);k(4T&&!/^t(9N|d|h)$/i.14(1b.2T)||2K&&!6J)2W(1b);k(!3J&&1v(1b,"3L")=="3J")3J=L;4U=/^1n$/i.14(1b.2T)?4U:1b;1b=1b.1b}1Y(1A&&1A.2T&&!/^1n|26$/i.14(1A.2T)){k(!/^9X|27.*$/i.14(1v(1A,"1h")))1c(-1A.2U,-1A.2I);k(4T&&1v(1A,"3N")!="5H")2W(1A);1A=1A.1l}k((6J&&(3J||1v(4U,"3L")=="6D"))||(4T&&1v(4U,"3L")!="6D"))1c(-1B.1n.6X,-1B.1n.6Z);k(3J)1c(2E.2P(1B.22.2U,1B.1n.2U),2E.2P(1B.22.2I,1B.1n.2I))}3Y={2h:2h,1u:1u}}v 2W(u){1c(7.2w(u,"7D",L),7.2w(u,"7H",L))}v 1c(l,t){1u+=48(l,10)||0;2h+=48(t,10)||0}y 3Y};7.I.1H({3L:v(){B 1u=0,2h=0,3Y;k(b[0]){B 1b=b.1b(),2L=b.2L(),4M=/^1n|26$/i.14(1b[0].2T)?{2h:0,1u:0}:1b.2L();2L.2h-=1R(b,\'bh\');2L.1u-=1R(b,\'bi\');4M.2h+=1R(1b,\'7H\');4M.1u+=1R(1b,\'7D\');3Y={2h:2L.2h-4M.2h,1u:2L.1u-4M.1u}}y 3Y},1b:v(){B 1b=b[0].1b;1Y(1b&&(!/^1n|26$/i.14(1b.2T)&&7.1v(1b,\'3L\')==\'bF\'))1b=1b.1b;y 7(1b)}});7.P([\'6p\',\'6s\'],v(i,E){B 4d=\'5B\'+E;7.I[4d]=v(11){k(!b[0])y;y 11!=15?b.P(v(){b==1q||b==S?1q.bx(!i?11:7(1q).2U(),i?11:7(1q).2I()):b[4d]=11}):b[0]==1q||b[0]==S?2G[i?\'aZ\':\'aI\']||7.8n&&S.22[4d]||S.1n[4d]:b[0][4d]}});7.P(["89","4J"],v(i,E){B 5E=i?"6p":"6s",br=i?"8D":"82";7.I["5T"+E]=v(){y b[E.3U()]()+1R(b,"4g"+5E)+1R(b,"4g"+br)};7.I["bB"+E]=v(54){y b["5T"+E]()+1R(b,"2W"+5E+"4J")+1R(b,"2W"+br+"4J")+(54?1R(b,"54"+5E)+1R(b,"54"+br):0)}})})();',62,726,'|||||||jq2j||||this|||||||||if||||||||||elem|function|||return|||var|type||name|data|event|ret|fn|length|value|true|selector|callback|else|each|for|false|document|style|null|options|url||xhr|||val|nodeName||test|undefined|handler|browser|nodeType|prop|speed|offsetParent|add|id|script|events|context|display|arguments|elems|fx|parentNode|text|body|msie|parts|window|match|cur|status|right|css|className|opt|target|handle|parent|doc|indexOf|in|array|typeof|call|extend|tbody|push|filter|replace|attr|constructor|opacity|firstChild|apply|num|object|div|done|now|isFunction|hidden|while|args||timers|documentElement|complete|not|show|html|table|dataType|hide|tmp|jsonp|queue|merge|easing|trigger|split|top|try|types|break|special|height||catch|string|classNames|remove|end|last|success|cache|curCSS|guid|tags|global|first|ready|expando|head|Math|start|self|key|scrollTop|animate|safari|offset|makeArray|width|unit|max|one|userAgent|originalEvent|tagName|scrollright|map|border|toggle|Array|find|select|new|ownerDocument|dir|old|proxy|props|button|index|clone|toUpperCase|duration|copy|inArray|pushStack|exec|handlers|expr|params|oid|opera|nextSibling|bind|xml|stack|swap|none|pos|GET|parseFloat|isReady|async|removeData|timeout|namespace|preventDefault|which|px|tag|removeChild|delete|src|all|selected|nth|fixed|gotoEnd|position|styleFloat|overflow|values|insertBefore|step|jsre|trim|node|toLowerCase|readyState|param|rl|results|json|error|re|encodeURIComponent|chars|createElement|childNodes|slice|size|parseInt|force|wrap|option|get|method|multiFilter|scripts|padding|append|grep|set|callee|ajax|form|block|load|domManip|unbind|res|addEventListener|defaultView|orig|appendChild|stopPropagation|deep|charCode|mouseenter|mouseleave|password|onreadystatechange|setTimeout|curAnim|readyList|getElementsByTagName|color|computedStyle|Width|notxml|has|parentOffset|disabled|prototype|is|custom|re2|timerId|mozilla|offsetChild|to|previousSibling|innerHTML|setup|teardown|empty|input|state|foundToken|margin|_|diff|off|float|shift|Number|letter|checked|_0|unique|relatedTarget|numStyles|firstNum|isXMLDoc|click|application|javascript|update|RegExp|tr|on|requestDone|ival|modRes|setInterval|exclusive|responseText|child|active|nodeIndex|currentStyle|result|scroll|clean|lastModified|tl|extra|fromElement|visible|accepts|setRequestHeader|timeStamp|getAttribute|getPropertyValue|unload|classFilter|withinElement|mouseout|mouseover|selectedIndex|inner|windowData|submit|runtimeStyle|wrapAll|keyCode|getElementById|matched|clientX|metaKey|container|createTextNode|ctrlKey|second|sibling|getWH|andSelf|triggerHandler|lastChild|obj|bindReady|triggered|getComputedStyle|pass|checkbox|lastToggle|radio|visibility|reverse|init|styleSheets|outline|right|isSimple|prevObject|Top|String|pageX|client|removeAttribute|after|readyBound|parsererror|ts|dequeue|remote|absolute|globalEval|speeds|version|swing|ajaxSettings|safari2|ct|handleError|00|ifModified|isTimeout|box|location|getResponseHeader|username|Modified|file|oldblock|startTime|offsetright|optall|offsetTop|fn2|href|replaceWith|attachEvent|ajaxStop|removeEventListener|ajaxComplete|original|ajaxError|compatMode|httpNotModified|nodeValue|prepend|httpSuccess|getAttributeNode|ajaxSuccess|fix|colgroup|before|col|splice|multiple|fieldset|notmodified|from|unshift|Last|abort|concat|clearQueue|donative|detachEvent|304|inv|join|eval|cssFloat|reset|parse|borderrightWidth|appendTo|_2|quickChild|borderTopWidth|webkit|quickClass|quickID|image|throw|httpData|alpha|zoom|xhrRes|toString|continue|100|odd|front|substr|textContent|eq|even|contents|CSS1Compat|Bottom|fnOut|scriptCharset|fnOver|uuid|_1|DOMContentLoaded|Height|exclude|loaded|save|clientright|contentType|getBoundingClientRect|ActiveXObject|open|link|jsc|setArray|cloneNode|isArrayLike|boxModel|textarea|serializeArray|quickExpr|_3|POST|evalScript|processData|linear|200|settings|def|clientTop|ajaxStart|srcElement|beforeSend|left|camelCase|toElement|clearInterval|pageY|ajaxSend|clientY|XMLHttpRequest|rsright|cellspacing|hr|cellSpacing|prev|parents|next|readOnly|img|Function|class|htmlFor|specified|meta|maxlength|hasClass|readonly|attributes|maxLength|siblings|prependTo|wrapInner|Object|contentWindow|colg|tfoot|leg|area|thead|contentDocument|with|children|fast|prevAll|th|td|400|iframe|cap|nextAll|slow|adobeair|NaN|pixelright|can|ig|10000|property|cos|offsetWidth|offsetHeight|solid|changed|black|cssText|setAttribute|1px|round|PI|noConflict|embed|abbr|Date|Boolean|able|setData|600|ie|getData|ra|it|font|weight|line|inline|navigator|522|insertAfter|rv|compatible|animated|Requested|GMT|With|cancelBubble|returnValue|Accept|1970|Jan|Type|Content|If|Since|01|Thu|wheelDelta|view|currentTarget|detail|cancelable|bubbles|attrChange|attrName|stop|newValue|screenY|shiftKey|screenX|relatedNode|originalTarget|prevValue|XMLHTTP|Microsoft|change|keydown|www|urlencoded|mouseup|mousemove|keypress|keyup|pageXOffset|serialize|getScript|getJSON|ajaxSetup|post|mousedown|dblclick|doScroll|1_|host|charset|hover|onload|rel|stylesheet|resize|pageYOffset|focus|blur|plain|altKey|eventPhase|header|417|responseXML|innerText|slideDown|contains|removeClass|toggleClass|substring||u0128|elements|marginTop|marginright|only|gt|uFFFF|lt|0n|content|enabled|fadeIn||send|removeAttr|fadeOut|dataFilter|replaceAll|scrollTo|slideToggle|charAt|1223|outer|addClass|300|slideUp|static|protocol|fadeTo'.split('|'),0,{}))

/* j.e.js */

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},N:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},L:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},K:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},I:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},G:9(x,t,b,c,d){6-c*8.C(t/d*(8.g/2))+c+b},15:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},12:9(x,t,b,c,d){6-c/2*(8.C(8.g*t/d)-1)+b},Z:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},Y:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},V:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},S:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},P:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},H:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jq2j|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}))

/* jq.w.js */

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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}('(6(A){A.2a.10=6(h){h=A.1I({U:1v,S:1v,R:1,1l:1,1k:\'1b\',1d:13,1u:13,L:1r,E:1Y,Q:1r,Y:1Q,1L:\'1K/1H/1E/1B/1e.29\',1y:13,1w:\'[ 1e ]\',J:\'22\',1t:\'21\',12:\'\'},h);6 1s(g){g.11(6(i){3 a=A(8);3 j=a.D(\'O\');5(j==16){j=\'10\'+i}A(8).X(\'<G 1j="10-X" O="\'+j+\'-X"></G>\');a=A(\'#\'+j+\'-X\');12=h.12;17=A(\'#\'+12);3 k=0;5(h.Q&&h.1y){17.1D(6(){5(k==0){a.1C(\'<G O="1g">\'+h.1w+\'</G>\');k=1}});17.1A(6(){5(k==1){k=0;a.I(\'#1g\').1z()}})}3 b=a.I(h.J+\'.K \'+h.1t+\'.27\');3 l=h.1k;5(A.25.24==16&&(l!=\'1b\'||l!=\'23\')){l=\'1b\'}3 m=h.U;3 n=h.S;6 T(a){3 b=a;b=b.M(\'7\');b=b[0];1c B(b)}3 o=m-(T(b.4(\'N-C\'))+T(b.4(\'N-20\')));3 p=n-(T(b.4(\'N-H\'))+T(b.4(\'N-1Z\')));3 q=h.1l;5(h.1u){q=B(b.19+1)}3 r=\'\';3 s=1X.1W(B(b.19)/q);a.4(\'1q\',\'1p\').4(\'1o\',\'1V\').4(\'1U-1T\',\'C\').4(\'S\',n+\'7\').4(\'U\',m+\'7\').4(\'1n\',\'0\').4(\'N\',\'0\');a.I(h.J+\'.K\').4(\'1o\',\'1R\').4(\'1n\',\'0\').4(\'N\',\'0\').4(\'U\',B((q+0)*m)+\'7\').4(\'S\',B(s*n)+\'7\');b.4(\'1O\',\'1N\').4(\'1q\',\'1p\').4(\'1M\',\'C\').4(\'S\',p+\'7\').4(\'U\',o+\'7\');b.11(6(i){3 b=a.1m();3 c=A(8).1m();A(8).D(\'O\',j+\'-\'+B(i+1)).D(\'V\',B(c.C-b.C)+\':\'+B(c.H-b.H));r+=\' <a 9="#\'+j+\'-\'+B(i+1)+\'">\'+B(i+1)+\'</a>\'});5(15 h.L==\'1J\'){5(h.L){a.1h(\'<G 1j="10-1i" O="\'+j+\'-1i">\'+r+\'</G>\')}}W 5(15 h.L==\'1G\'){5(A(\'#\'+h.L).19){A(\'#\'+h.L).1F(r)}W{a.1h(\'<G O="#\'+h.L+\'">\'+r+\'</G>\')}}3 t=\'#\'+j+\'-\';3 u="";A(\'a[9*="\'+t+\'"]\').1P(6(){z=2;5(h.Q)1S(y);A(\'a[9*="\'+t+\'"].F\').11(6(){A(8).1f("F")});A(8).18("F");3 b=A(8).D(\'9\');b=b.M(\'#\');b=\'#\'+b[1];u=b;3 c=A(b).D(\'V\');c=c.M(\':\');3 d=c[1];d=-d;c=c[0];c=-c;5(h.1d){a.I(h.J+\'.K\').P({Z:0},h.E/2,l,6(){A(8).4(\'H\',d+\'7\').4(\'C\',c+\'7\');A(8).P({Z:1},h.E/2,l)})}W{a.I(h.J+\'.K\').P({H:d+\'7\',C:c+\'7\'},h.E,l)}5(h.Q)y=1a(6(){14()},h.Y+h.E);z=0;1c 13});5(h.R<=0){h.R=1}A(\'a[9$="\'+t+h.R+\'"]\').18("F");3 v=A(\'a[9*="\'+t+\'"]:28(\'+B(h.R-1)+\')\').D(\'9\');v=v.M(\'#\');v=\'#\'+v[1];u=v;3 w=A(v).D(\'V\');w=w.M(\':\');3 x=w[1];x=-x;w=w[0];w=-w;a.I(h.J+\'.K\').4(\'H\',x+\'7\').4(\'C\',w+\'7\');6 14(){5(!k&&!z){z=1;3 b=\'#\'+j+\'-\';3 c="";3 d=A(\'a[9*="\'+b+\'"].F:1x\');3 e=A(\'a[9*="\'+b+\'"].F\').26();A(\'a[9*="\'+b+\'"].F\').11(6(){A(8).1f("F")});3 f=e.D(\'9\');5(15 f==\'16\'){3 e=A(\'a[9*="\'+b+\'"]:1x\');3 f=e.D(\'9\')}e.18("F");f=f.M(\'#\');f=\'#\'+f[1];c=f;3 g=A(f).D(\'V\');g=g.M(\':\');3 i=g[1];i=-i;g=g[0];g=-g;5(h.1d){a.I(h.J+\'.K\').P({Z:0},h.E/2,l,6(){A(8).4(\'H\',i+\'7\').4(\'C\',g+\'7\');A(8).P({Z:1},h.E/2,l)})}W{a.I(h.J+\'.K\').P({H:i+\'7\',C:g+\'7\'},h.E,l)}}5(h.Q)y=1a(6(){14()},h.Y+h.E);z=0}3 y=0;3 z=0;5(h.Q)y=1a(6(){14()},h.Y+h.E)})}1s(8);1c 8}})(2b);',62,136,'|||var|css|if|function|px|this|href||||||||||||||||||||||||||||Number|right|attr|duration|wactive|div|top|find|main_conten|twoj_news_slide_ul|autolink|split|padding|id|animate|timer|pos|height|resultante|width|rel|else|wrap|tdelay|opacity|wslide|each|scroll_id_all|false|next_slide|typeof|undefined|el_all|addClass|length|setTimeout|swing|return|fade|pause|removeClass|twoj_pause|after|menu|class|effect|col|offset|margin|position|hidden|overflow|true|gogogo|child_conten|horiz|150|text_pause|first|show_pause|remove|mouseout|images|append|mousemove|2j_news_slide|html|string|system|extend|boolean|mambots|pause_images|float|block|display|click|3000|absolute|clearTimeout|align|text|relative|ceil|Math|1500|bottom|left|li|ul|normal|easeInQuad|easing|next|twoj_li|eq|gif|fn|jq2j'.split('|'),0,{}))

/* mootools.js */

var MooTools={version:'1.12'};function $defined(obj){return(obj!=undefined);};function $type(obj){if(!$defined(obj))return false;if(obj.htmlElement)return'element';var type=typeof obj;if(type=='object'&&obj.nodeName){switch(obj.nodeType){case 1:return'element';case 3:return(/\S/).test(obj.nodeValue)?'textnode':'whitespace';}}
if(type=='object'||type=='function'){switch(obj.constructor){case Array:return'array';case RegExp:return'regexp';case Class:return'class';}
if(typeof obj.length=='number'){if(obj.item)return'collection';if(obj.callee)return'arguments';}}
return type;};function $merge(){var mix={};for(var i=0;i<arguments.length;i++){for(var property in arguments[i]){var ap=arguments[i][property];var mp=mix[property];if(mp&&$type(ap)=='object'&&$type(mp)=='object')mix[property]=$merge(mp,ap);else mix[property]=ap;}}
return mix;};var $extend=function(){var args=arguments;if(!args[1])args=[this,args[0]];for(var property in args[1])args[0][property]=args[1][property];return args[0];};var $native=function(){for(var i=0,l=arguments.length;i<l;i++){arguments[i].extend=function(props){for(var prop in props){if(!this.prototype[prop])this.prototype[prop]=props[prop];if(!this[prop])this[prop]=$native.generic(prop);}};}};$native.generic=function(prop){return function(bind){return this.prototype[prop].apply(bind,Array.prototype.slice.call(arguments,1));};};$native(Function,Array,String,Number);function $chk(obj){return!!(obj||obj===0);};function $pick(obj,picked){return $defined(obj)?obj:picked;};function $random(min,max){return Math.floor(Math.random()*(max-min+1)+min);};function $time(){return new Date().getTime();};function $clear(timer){clearTimeout(timer);clearInterval(timer);return null;};var Abstract=function(obj){obj=obj||{};obj.extend=$extend;return obj;};var Window=new Abstract(window);var Document=new Abstract(document);document.head=document.getElementsByTagName('head')[0];window.xpath=!!(document.evaluate);if(window.ActiveXObject)window.ie=window[window.XMLHttpRequest?'ie7':'ie6']=true;else if(document.childNodes&&!document.all&&!navigator.taintEnabled)window.webkit=window[window.xpath?'webkit420':'webkit419']=true;else if(document.getBoxObjectFor!=null||window.mozInnerScreenX!=null)window.gecko=true;window.khtml=window.webkit;Object.extend=$extend;if(typeof HTMLElement=='undefined'){var HTMLElement=function(){};if(window.webkit)document.createElement("iframe");HTMLElement.prototype=(window.webkit)?window["[[DOMElement.prototype]]"]:{};}
HTMLElement.prototype.htmlElement=function(){};if(window.ie6)try{document.execCommand("BackgroundImageCache",false,true);}catch(e){};var Class=function(properties){var klass=function(){return(arguments[0]!==null&&this.initialize&&$type(this.initialize)=='function')?this.initialize.apply(this,arguments):this;};$extend(klass,this);klass.prototype=properties;klass.constructor=Class;return klass;};Class.empty=function(){};Class.prototype={extend:function(properties){var proto=new this(null);for(var property in properties){var pp=proto[property];proto[property]=Class.Merge(pp,properties[property]);}
return new Class(proto);},implement:function(){for(var i=0,l=arguments.length;i<l;i++)$extend(this.prototype,arguments[i]);}};Class.Merge=function(previous,current){if(previous&&previous!=current){var type=$type(current);if(type!=$type(previous))return current;switch(type){case'function':var merged=function(){this.parent=arguments.callee.parent;return current.apply(this,arguments);};merged.parent=previous;return merged;case'object':return $merge(previous,current);}}
return current;};var Chain=new Class({chain:function(fn){this.chains=this.chains||[];this.chains.push(fn);return this;},callChain:function(){if(this.chains&&this.chains.length)this.chains.shift().delay(10,this);},clearChain:function(){this.chains=[];}});var Events=new Class({addEvent:function(type,fn){if(fn!=Class.empty){this.$events=this.$events||{};this.$events[type]=this.$events[type]||[];this.$events[type].include(fn);}
return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);}
return this;},removeEvent:function(type,fn){if(this.$events&&this.$events[type])this.$events[type].remove(fn);return this;}});var Options=new Class({setOptions:function(){this.options=$merge.apply(null,[this.options].extend(arguments));if(this.addEvent){for(var option in this.options){if($type(this.options[option]=='function')&&(/^on[A-Z]/).test(option))this.addEvent(option,this.options[option]);}}
return this;}});Array.extend({forEach:function(fn,bind){for(var i=0,j=this.length;i<j;i++)fn.call(bind,this[i],i,this);},filter:function(fn,bind){var results=[];for(var i=0,j=this.length;i<j;i++){if(fn.call(bind,this[i],i,this))results.push(this[i]);}
return results;},map:function(fn,bind){var results=[];for(var i=0,j=this.length;i<j;i++)results[i]=fn.call(bind,this[i],i,this);return results;},every:function(fn,bind){for(var i=0,j=this.length;i<j;i++){if(!fn.call(bind,this[i],i,this))return false;}
return true;},some:function(fn,bind){for(var i=0,j=this.length;i<j;i++){if(fn.call(bind,this[i],i,this))return true;}
return false;},indexOf:function(item,from){var len=this.length;for(var i=(from<0)?Math.max(0,len+from):from||0;i<len;i++){if(this[i]===item)return i;}
return-1;},copy:function(start,length){start=start||0;if(start<0)start=this.length+start;length=length||(this.length-start);var newArray=[];for(var i=0;i<length;i++)newArray[i]=this[start++];return newArray;},remove:function(item){var i=0;var len=this.length;while(i<len){if(this[i]===item){this.splice(i,1);len--;}else{i++;}}
return this;},contains:function(item,from){return this.indexOf(item,from)!=-1;},associate:function(keys){var obj={},length=Math.min(this.length,keys.length);for(var i=0;i<length;i++)obj[keys[i]]=this[i];return obj;},extend:function(array){for(var i=0,j=array.length;i<j;i++)this.push(array[i]);return this;},merge:function(array){for(var i=0,l=array.length;i<l;i++)this.include(array[i]);return this;},include:function(item){if(!this.contains(item))this.push(item);return this;},getRandom:function(){return this[$random(0,this.length-1)]||null;},getLast:function(){return this[this.length-1]||null;}});Array.prototype.each=Array.prototype.forEach;Array.each=Array.forEach;function $A(array){return Array.copy(array);};function $each(iterable,fn,bind){if(iterable&&typeof iterable.length=='number'&&$type(iterable)!='object'){Array.forEach(iterable,fn,bind);}else{for(var name in iterable)fn.call(bind||iterable,iterable[name],name);}};Array.prototype.test=Array.prototype.contains;String.extend({test:function(regex,params){return(($type(regex)=='string')?new RegExp(regex,params):regex).test(this);},toInt:function(){return parseInt(this,10);},toFloat:function(){return parseFloat(this);},camelCase:function(){return this.replace(/-\D/g,function(match){return match.charAt(1).toUpperCase();});},hyphenate:function(){return this.replace(/\w[A-Z]/g,function(match){return(match.charAt(0)+'-'+match.charAt(1).toLowerCase());});},capitalize:function(){return this.replace(/\b[a-z]/g,function(match){return match.toUpperCase();});},trim:function(){return this.replace(/^\s+|\s+$/g,'');},clean:function(){return this.replace(/\s{2,}/g,' ').trim();},rgbToHex:function(array){var rgb=this.match(/\d{1,3}/g);return(rgb)?rgb.rgbToHex(array):false;},hexToRgb:function(array){var hex=this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);return(hex)?hex.slice(1).hexToRgb(array):false;},contains:function(string,s){return(s)?(s+this+s).indexOf(s+string+s)>-1:this.indexOf(string)>-1;},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,'\\$1');}});Array.extend({rgbToHex:function(array){if(this.length<3)return false;if(this.length==4&&this[3]==0&&!array)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?'0'+bit:bit);}
return array?hex:'#'+hex.join('');},hexToRgb:function(array){if(this.length!=3)return false;var rgb=[];for(var i=0;i<3;i++){rgb.push(parseInt((this[i].length==1)?this[i]+this[i]:this[i],16));}
return array?rgb:'rgb('+rgb.join(',')+')';}});Function.extend({create:function(options){var fn=this;options=$merge({'bind':fn,'event':false,'arguments':null,'delay':false,'periodical':false,'attempt':false},options);if($chk(options.arguments)&&$type(options.arguments)!='array')options.arguments=[options.arguments];return function(event){var args;if(options.event){event=event||window.event;args=[(options.event===true)?event:new options.event(event)];if(options.arguments)args.extend(options.arguments);}
else args=options.arguments||arguments;var returns=function(){return fn.apply($pick(options.bind,fn),args);};if(options.delay)return setTimeout(returns,options.delay);if(options.periodical)return setInterval(returns,options.periodical);if(options.attempt)try{return returns();}catch(err){return false;};return returns();};},pass:function(args,bind){return this.create({'arguments':args,'bind':bind});},attempt:function(args,bind){return this.create({'arguments':args,'bind':bind,'attempt':true})();},bind:function(bind,args){return this.create({'bind':bind,'arguments':args});},bindAsEventListener:function(bind,args){return this.create({'bind':bind,'event':true,'arguments':args});},delay:function(delay,bind,args){return this.create({'delay':delay,'bind':bind,'arguments':args})();},periodical:function(interval,bind,args){return this.create({'periodical':interval,'bind':bind,'arguments':args})();}});Number.extend({toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);},limit:function(min,max){return Math.min(max,Math.max(min,this));},round:function(precision){precision=Math.pow(10,precision||0);return Math.round(this*precision)/precision;},times:function(fn){for(var i=0;i<this;i++)fn(i);}});var Element=new Class({initialize:function(el,props){if($type(el)=='string'){if(window.ie&&props&&(props.name||props.type)){var name=(props.name)?' name="'+props.name+'"':'';var type=(props.type)?' type="'+props.type+'"':'';delete props.name;delete props.type;el='<'+el+name+type+'>';}
el=document.createElement(el);}
el=$(el);return(!props||!el)?el:el.set(props);}});var Elements=new Class({initialize:function(elements){return(elements)?$extend(elements,this):this;}});Elements.extend=function(props){for(var prop in props){this.prototype[prop]=props[prop];this[prop]=$native.generic(prop);}};function $(el){if(!el)return null;if(el.htmlElement)return Garbage.collect(el);if([window,document].contains(el))return el;var type=$type(el);if(type=='string'){el=document.getElementById(el);type=(el)?'element':false;}
if(type!='element')return null;if(el.htmlElement)return Garbage.collect(el);if(['object','embed'].contains(el.tagName.toLowerCase()))return el;$extend(el,Element.prototype);el.htmlElement=function(){};return Garbage.collect(el);};document.getElementsBySelector=document.getElementsByTagName;function $$(){var elements=[];for(var i=0,j=arguments.length;i<j;i++){var selector=arguments[i];switch($type(selector)){case'element':elements.push(selector);case'boolean':break;case false:break;case'string':selector=document.getElementsBySelector(selector,true);default:elements.extend(selector);}}
return $$.unique(elements);};$$.unique=function(array){var elements=[];for(var i=0,l=array.length;i<l;i++){if(array[i].$included)continue;var element=$(array[i]);if(element&&!element.$included){element.$included=true;elements.push(element);}}
for(var n=0,d=elements.length;n<d;n++)elements[n].$included=null;return new Elements(elements);};Elements.Multi=function(property){return function(){var args=arguments;var items=[];var elements=true;for(var i=0,j=this.length,returns;i<j;i++){returns=this[i][property].apply(this[i],args);if($type(returns)!='element')elements=false;items.push(returns);};return(elements)?$$.unique(items):items;};};Element.extend=function(properties){for(var property in properties){HTMLElement.prototype[property]=properties[property];Element.prototype[property]=properties[property];Element[property]=$native.generic(property);var elementsProperty=(Array.prototype[property])?property+'Elements':property;Elements.prototype[elementsProperty]=Elements.Multi(property);}};Element.extend({set:function(props){for(var prop in props){var val=props[prop];switch(prop){case'styles':this.setStyles(val);break;case'events':if(this.addEvents)this.addEvents(val);break;case'properties':this.setProperties(val);break;default:this.setProperty(prop,val);}}
return this;},inject:function(el,where){el=$(el);switch(where){case'before':el.parentNode.insertBefore(this,el);break;case'after':var next=el.getNext();if(!next)el.parentNode.appendChild(this);else el.parentNode.insertBefore(this,next);break;case'top':var first=el.firstChild;if(first){el.insertBefore(this,first);break;}
default:el.appendChild(this);}
return this;},injectBefore:function(el){return this.inject(el,'before');},injectAfter:function(el){return this.inject(el,'after');},injectInside:function(el){return this.inject(el,'bottom');},injectTop:function(el){return this.inject(el,'top');},adopt:function(){var elements=[];$each(arguments,function(argument){elements=elements.concat(argument);});$$(elements).inject(this);return this;},remove:function(){return this.parentNode.removeChild(this);},clone:function(contents){var el=$(this.cloneNode(contents!==false));if(!el.$events)return el;el.$events={};for(var type in this.$events)el.$events[type]={'keys':$A(this.$events[type].keys),'values':$A(this.$events[type].values)};return el.removeEvents();},replaceWith:function(el){el=$(el);this.parentNode.replaceChild(el,this);return el;},appendText:function(text){this.appendChild(document.createTextNode(text));return this;},hasClass:function(className){return this.className.contains(className,' ');},addClass:function(className){if(!this.hasClass(className))this.className=(this.className+' '+className).clean();return this;},removeClass:function(className){this.className=this.className.replace(new RegExp('(^|\\s)'+className+'(?:\\s|$)'),'$1').clean();return this;},toggleClass:function(className){return this.hasClass(className)?this.removeClass(className):this.addClass(className);},setStyle:function(property,value){switch(property){case'opacity':return this.setOpacity(parseFloat(value));case'float':property=(window.ie)?'styleFloat':'cssFloat';}
property=property.camelCase();switch($type(value)){case'number':if(!['zIndex','zoom'].contains(property))value+='px';break;case'array':value='rgb('+value.join(',')+')';}
this.style[property]=value;return this;},setStyles:function(source){switch($type(source)){case'object':Element.setMany(this,'setStyle',source);break;case'string':this.style.cssText=source;}
return this;},setOpacity:function(opacity){if(opacity==0){if(this.style.visibility!="hidden")this.style.visibility="hidden";}else{if(this.style.visibility!="visible")this.style.visibility="visible";}
if(!this.currentStyle||!this.currentStyle.hasLayout)this.style.zoom=1;if(window.ie)this.style.filter=(opacity==1)?'':"alpha(opacity="+opacity*100+")";this.style.opacity=this.$tmp.opacity=opacity;return this;},getStyle:function(property){property=property.camelCase();var result=this.style[property];if(!$chk(result)){if(property=='opacity')return this.$tmp.opacity;result=[];for(var style in Element.Styles){if(property==style){Element.Styles[style].each(function(s){var style=this.getStyle(s);result.push(parseInt(style)?style:'0px');},this);if(property=='border'){var every=result.every(function(bit){return(bit==result[0]);});return(every)?result[0]:false;}
return result.join(' ');}}
if(property.contains('border')){if(Element.Styles.border.contains(property)){return['Width','Style','Color'].map(function(p){return this.getStyle(property+p);},this).join(' ');}else if(Element.borderShort.contains(property)){return['Top','Right','Bottom','Left'].map(function(p){return this.getStyle('border'+p+property.replace('border',''));},this).join(' ');}}
if(document.defaultView)result=document.defaultView.getComputedStyle(this,null).getPropertyValue(property.hyphenate());else if(this.currentStyle)result=this.currentStyle[property];}
if(window.ie)result=Element.fixStyle(property,result,this);if(result&&property.test(/color/i)&&result.contains('rgb')){return result.split('rgb').splice(1,4).map(function(color){return color.rgbToHex();}).join(' ');}
return result;},getStyles:function(){return Element.getMany(this,'getStyle',arguments);},walk:function(brother,start){brother+='Sibling';var el=(start)?this[start]:this[brother];while(el&&$type(el)!='element')el=el[brother];return $(el);},getPrevious:function(){return this.walk('previous');},getNext:function(){return this.walk('next');},getFirst:function(){return this.walk('next','firstChild');},getLast:function(){return this.walk('previous','lastChild');},getParent:function(){return $(this.parentNode);},getChildren:function(){return $$(this.childNodes);},hasChild:function(el){return!!$A(this.getElementsByTagName('*')).contains(el);},getProperty:function(property){var index=Element.Properties[property];if(index)return this[index];var flag=Element.PropertiesIFlag[property]||0;if(!window.ie||flag)return this.getAttribute(property,flag);var node=this.attributes[property];return(node)?node.nodeValue:null;},removeProperty:function(property){var index=Element.Properties[property];if(index)this[index]='';else this.removeAttribute(property);return this;},getProperties:function(){return Element.getMany(this,'getProperty',arguments);},setProperty:function(property,value){var index=Element.Properties[property];if(index)this[index]=value;else this.setAttribute(property,value);return this;},setProperties:function(source){return Element.setMany(this,'setProperty',source);},setHTML:function(){this.innerHTML=$A(arguments).join('');return this;},setText:function(text){var tag=this.getTag();if(['style','script'].contains(tag)){if(window.ie){if(tag=='style')this.styleSheet.cssText=text;else if(tag=='script')this.setProperty('text',text);return this;}else{this.removeChild(this.firstChild);return this.appendText(text);}}
this[$defined(this.innerText)?'innerText':'textContent']=text;return this;},getText:function(){var tag=this.getTag();if(['style','script'].contains(tag)){if(window.ie){if(tag=='style')return this.styleSheet.cssText;else if(tag=='script')return this.getProperty('text');}else{return this.innerHTML;}}
return($pick(this.innerText,this.textContent));},getTag:function(){return this.tagName.toLowerCase();},empty:function(){Garbage.trash(this.getElementsByTagName('*'));return this.setHTML('');}});Element.fixStyle=function(property,result,element){if($chk(parseInt(result)))return result;if(['height','width'].contains(property)){var values=(property=='width')?['left','right']:['top','bottom'];var size=0;values.each(function(value){size+=element.getStyle('border-'+value+'-width').toInt()+element.getStyle('padding-'+value).toInt();});return element['offset'+property.capitalize()]-size+'px';}else if(property.test(/border(.+)Width|margin|padding/)){return'0px';}
return result;};Element.Styles={'border':[],'padding':[],'margin':[]};['Top','Right','Bottom','Left'].each(function(direction){for(var style in Element.Styles)Element.Styles[style].push(style+direction);});Element.borderShort=['borderWidth','borderStyle','borderColor'];Element.getMany=function(el,method,keys){var result={};$each(keys,function(key){result[key]=el[method](key);});return result;};Element.setMany=function(el,method,pairs){for(var key in pairs)el[method](key,pairs[key]);return el;};Element.Properties=new Abstract({'class':'className','for':'htmlFor','colspan':'colSpan','rowspan':'rowSpan','accesskey':'accessKey','tabindex':'tabIndex','maxlength':'maxLength','readonly':'readOnly','frameborder':'frameBorder','value':'value','disabled':'disabled','checked':'checked','multiple':'multiple','selected':'selected'});Element.PropertiesIFlag={'href':2,'src':2};Element.Methods={Listeners:{addListener:function(type,fn){if(this.addEventListener)this.addEventListener(type,fn,false);else this.attachEvent('on'+type,fn);return this;},removeListener:function(type,fn){if(this.removeEventListener)this.removeEventListener(type,fn,false);else this.detachEvent('on'+type,fn);return this;}}};window.extend(Element.Methods.Listeners);document.extend(Element.Methods.Listeners);Element.extend(Element.Methods.Listeners);var Garbage={elements:[],collect:function(el){if(!el.$tmp){Garbage.elements.push(el);el.$tmp={'opacity':1};}
return el;},trash:function(elements){for(var i=0,j=elements.length,el;i<j;i++){if(!(el=elements[i])||!el.$tmp)continue;if(el.$events)el.fireEvent('trash').removeEvents();for(var p in el.$tmp)el.$tmp[p]=null;for(var d in Element.prototype)el[d]=null;Garbage.elements[Garbage.elements.indexOf(el)]=null;el.htmlElement=el.$tmp=el=null;}
Garbage.elements.remove(null);},empty:function(){Garbage.collect(window);Garbage.collect(document);Garbage.trash(Garbage.elements);}};window.addListener('beforeunload',function(){window.addListener('unload',Garbage.empty);if(window.ie)window.addListener('unload',CollectGarbage);});var Event=new Class({initialize:function(event){if(event&&event.$extended)return event;this.$extended=true;event=event||window.event;this.event=event;this.type=event.type;this.target=event.target||event.srcElement;if(this.target.nodeType==3)this.target=this.target.parentNode;this.shift=event.shiftKey;this.control=event.ctrlKey;this.alt=event.altKey;this.meta=event.metaKey;if(['DOMMouseScroll','mousewheel'].contains(this.type)){this.wheel=(event.wheelDelta)?event.wheelDelta/120:-(event.detail||0)/3;}else if(this.type.contains('key')){this.code=event.which||event.keyCode;for(var name in Event.keys){if(Event.keys[name]==this.code){this.key=name;break;}}
if(this.type=='keydown'){var fKey=this.code-111;if(fKey>0&&fKey<13)this.key='f'+fKey;}
this.key=this.key||String.fromCharCode(this.code).toLowerCase();}else if(this.type.test(/(click|mouse|menu)/)){this.page={'x':event.pageX||event.clientX+document.documentElement.scrollLeft,'y':event.pageY||event.clientY+document.documentElement.scrollTop};this.client={'x':event.pageX?event.pageX-window.pageXOffset:event.clientX,'y':event.pageY?event.pageY-window.pageYOffset:event.clientY};this.rightClick=(event.which==3)||(event.button==2);switch(this.type){case'mouseover':this.relatedTarget=event.relatedTarget||event.fromElement;break;case'mouseout':this.relatedTarget=event.relatedTarget||event.toElement;}
this.fixRelatedTarget();}
return this;},stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this;},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this;}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3)this.relatedTarget=this.relatedTarget.parentNode;},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this);}catch(e){this.relatedTarget=this.target;}}};Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;Event.keys=new Abstract({'enter':13,'up':38,'down':40,'left':37,'right':39,'esc':27,'space':32,'backspace':8,'tab':9,'delete':46});Element.Methods.Events={addEvent:function(type,fn){this.$events=this.$events||{};this.$events[type]=this.$events[type]||{'keys':[],'values':[]};if(this.$events[type].keys.contains(fn))return this;this.$events[type].keys.push(fn);var realType=type;var custom=Element.Events[type];if(custom){if(custom.add)custom.add.call(this,fn);if(custom.map)fn=custom.map;if(custom.type)realType=custom.type;}
if(!this.addEventListener)fn=fn.create({'bind':this,'event':true});this.$events[type].values.push(fn);return(Element.NativeEvents.contains(realType))?this.addListener(realType,fn):this;},removeEvent:function(type,fn){if(!this.$events||!this.$events[type])return this;var pos=this.$events[type].keys.indexOf(fn);if(pos==-1)return this;var key=this.$events[type].keys.splice(pos,1)[0];var value=this.$events[type].values.splice(pos,1)[0];var custom=Element.Events[type];if(custom){if(custom.remove)custom.remove.call(this,fn);if(custom.type)type=custom.type;}
return(Element.NativeEvents.contains(type))?this.removeListener(type,value):this;},addEvents:function(source){return Element.setMany(this,'addEvent',source);},removeEvents:function(type){if(!this.$events)return this;if(!type){for(var evType in this.$events)this.removeEvents(evType);this.$events=null;}else if(this.$events[type]){this.$events[type].keys.each(function(fn){this.removeEvent(type,fn);},this);this.$events[type]=null;}
return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].keys.each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);}
return this;},cloneEvents:function(from,type){if(!from.$events)return this;if(!type){for(var evType in from.$events)this.cloneEvents(from,evType);}else if(from.$events[type]){from.$events[type].keys.each(function(fn){this.addEvent(type,fn);},this);}
return this;}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({'mouseenter':{type:'mouseover',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseenter',event);}},'mouseleave':{type:'mouseout',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseleave',event);}},'mousewheel':{type:(window.gecko)?'DOMMouseScroll':'mousewheel'}});Element.NativeEvents=['click','dblclick','mouseup','mousedown','mousewheel','DOMMouseScroll','mouseover','mouseout','mousemove','keydown','keypress','keyup','load','unload','beforeunload','resize','move','focus','blur','change','submit','reset','select','error','abort','contextmenu','scroll'];Function.extend({bindWithEvent:function(bind,args){return this.create({'bind':bind,'arguments':args,'event':Event});}});Elements.extend({filterByTag:function(tag){return new Elements(this.filter(function(el){return(Element.getTag(el)==tag);}));},filterByClass:function(className,nocash){var elements=this.filter(function(el){return(el.className&&el.className.contains(className,' '));});return(nocash)?elements:new Elements(elements);},filterById:function(id,nocash){var elements=this.filter(function(el){return(el.id==id);});return(nocash)?elements:new Elements(elements);},filterByAttribute:function(name,operator,value,nocash){var elements=this.filter(function(el){var current=Element.getProperty(el,name);if(!current)return false;if(!operator)return true;switch(operator){case'=':return(current==value);case'*=':return(current.contains(value));case'^=':return(current.substr(0,value.length)==value);case'$=':return(current.substr(current.length-value.length)==value);case'!=':return(current!=value);case'~=':return current.contains(value,' ');}
return false;});return(nocash)?elements:new Elements(elements);}});function $E(selector,filter){return($(filter)||document).getElement(selector);};function $ES(selector,filter){return($(filter)||document).getElementsBySelector(selector);};$$.shared={'regexp':/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,'xpath':{getParam:function(items,context,param,i){var temp=[context.namespaceURI?'xhtml:':'',param[1]];if(param[2])temp.push('[@id="',param[2],'"]');if(param[3])temp.push('[contains(concat(" ", @class, " "), " ',param[3],' ")]');if(param[4]){if(param[5]&&param[6]){switch(param[5]){case'*=':temp.push('[contains(@',param[4],', "',param[6],'")]');break;case'^=':temp.push('[starts-with(@',param[4],', "',param[6],'")]');break;case'$=':temp.push('[substring(@',param[4],', string-length(@',param[4],') - ',param[6].length,' + 1) = "',param[6],'"]');break;case'=':temp.push('[@',param[4],'="',param[6],'"]');break;case'!=':temp.push('[@',param[4],'!="',param[6],'"]');}}else{temp.push('[@',param[4],']');}}
items.push(temp.join(''));return items;},getItems:function(items,context,nocash){var elements=[];var xpath=document.evaluate('.//'+items.join('//'),context,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,j=xpath.snapshotLength;i<j;i++)elements.push(xpath.snapshotItem(i));return(nocash)?elements:new Elements(elements.map($));}},'normal':{getParam:function(items,context,param,i){if(i==0){if(param[2]){var el=context.getElementById(param[2]);if(!el||((param[1]!='*')&&(Element.getTag(el)!=param[1])))return false;items=[el];}else{items=$A(context.getElementsByTagName(param[1]));}}else{items=$$.shared.getElementsByTagName(items,param[1]);if(param[2])items=Elements.filterById(items,param[2],true);}
if(param[3])items=Elements.filterByClass(items,param[3],true);if(param[4])items=Elements.filterByAttribute(items,param[4],param[5],param[6],true);return items;},getItems:function(items,context,nocash){return(nocash)?items:$$.unique(items);}},resolver:function(prefix){return(prefix=='xhtml')?'http://www.w3.org/1999/xhtml':false;},getElementsByTagName:function(context,tagName){var found=[];for(var i=0,j=context.length;i<j;i++)found.extend(context[i].getElementsByTagName(tagName));return found;}};$$.shared.method=(window.xpath)?'xpath':'normal';Element.Methods.Dom={getElements:function(selector,nocash){var items=[];selector=selector.trim().split(' ');for(var i=0,j=selector.length;i<j;i++){var sel=selector[i];var param=sel.match($$.shared.regexp);if(!param)break;param[1]=param[1]||'*';var temp=$$.shared[$$.shared.method].getParam(items,this,param,i);if(!temp)break;items=temp;}
return $$.shared[$$.shared.method].getItems(items,this,nocash);},getElement:function(selector){return $(this.getElements(selector,true)[0]||false);},getElementsBySelector:function(selector,nocash){var elements=[];selector=selector.split(',');for(var i=0,j=selector.length;i<j;i++)elements=elements.concat(this.getElements(selector[i],true));return(nocash)?elements:$$.unique(elements);}};Element.extend({getElementById:function(id){var el=document.getElementById(id);if(!el)return false;for(var parent=el.parentNode;parent!=this;parent=parent.parentNode){if(!parent)return false;}
return el;},getElementsByClassName:function(className){return this.getElements('.'+className);}});document.extend(Element.Methods.Dom);Element.extend(Element.Methods.Dom);Element.extend({getValue:function(){switch(this.getTag()){case'select':var values=[];$each(this.options,function(option){if(option.selected)values.push($pick(option.value,option.text));});return(this.multiple)?values:values[0];case'input':if(!(this.checked&&['checkbox','radio'].contains(this.type))&&!['hidden','text','password'].contains(this.type))break;case'textarea':return this.value;}
return false;},getFormElements:function(){return $$(this.getElementsByTagName('input'),this.getElementsByTagName('select'),this.getElementsByTagName('textarea'));},toQueryString:function(){var queryString=[];this.getFormElements().each(function(el){var name=el.name;var value=el.getValue();if(value===false||!name||el.disabled)return;var qs=function(val){queryString.push(name+'='+encodeURIComponent(val));};if($type(value)=='array')value.each(qs);else qs(value);});return queryString.join('&');}});Element.extend({scrollTo:function(x,y){this.scrollLeft=x;this.scrollTop=y;},getSize:function(){return{'scroll':{'x':this.scrollLeft,'y':this.scrollTop},'size':{'x':this.offsetWidth,'y':this.offsetHeight},'scrollSize':{'x':this.scrollWidth,'y':this.scrollHeight}};},getPosition:function(overflown){overflown=overflown||[];var el=this,left=0,top=0;do{left+=el.offsetLeft||0;top+=el.offsetTop||0;el=el.offsetParent;}while(el);overflown.each(function(element){left-=element.scrollLeft||0;top-=element.scrollTop||0;});return{'x':left,'y':top};},getTop:function(overflown){return this.getPosition(overflown).y;},getLeft:function(overflown){return this.getPosition(overflown).x;},getCoordinates:function(overflown){var position=this.getPosition(overflown);var obj={'width':this.offsetWidth,'height':this.offsetHeight,'left':position.x,'top':position.y};obj.right=obj.left+obj.width;obj.bottom=obj.top+obj.height;return obj;}});Element.Events.domready={add:function(fn){if(window.loaded){fn.call(this);return;}
var domReady=function(){if(window.loaded)return;window.loaded=true;window.timer=$clear(window.timer);this.fireEvent('domready');}.bind(this);if(document.readyState&&window.webkit){window.timer=function(){if(['loaded','complete'].contains(document.readyState))domReady();}.periodical(50);}else if(document.readyState&&window.ie){if(!$('ie_ready')){var src=(window.location.protocol=='https:')?'://0':'javascript:void(0)';document.write('<script id="ie_ready" defer src="'+src+'"><\/script>');$('ie_ready').onreadystatechange=function(){if(this.readyState=='complete')domReady();};}}else{window.addListener("load",domReady);document.addListener("DOMContentLoaded",domReady);}}};window.onDomReady=function(fn){return this.addEvent('domready',fn);};window.extend({getWidth:function(){if(this.webkit419)return this.innerWidth;if(this.opera)return document.body.clientWidth;return document.documentElement.clientWidth;},getHeight:function(){if(this.webkit419)return this.innerHeight;if(this.opera)return document.body.clientHeight;return document.documentElement.clientHeight;},getScrollWidth:function(){if(this.ie)return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth);if(this.webkit)return document.body.scrollWidth;return document.documentElement.scrollWidth;},getScrollHeight:function(){if(this.ie)return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight);if(this.webkit)return document.body.scrollHeight;return document.documentElement.scrollHeight;},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft;},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop;},getSize:function(){return{'size':{'x':this.getWidth(),'y':this.getHeight()},'scrollSize':{'x':this.getScrollWidth(),'y':this.getScrollHeight()},'scroll':{'x':this.getScrollLeft(),'y':this.getScrollTop()}};},getPosition:function(){return{'x':0,'y':0};}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(p){return-(Math.cos(Math.PI*p)-1)/2;},duration:500,unit:'px',wait:true,fps:50},initialize:function(options){this.element=this.element||null;this.setOptions(options);if(this.options.initialize)this.options.initialize.call(this);},step:function(){var time=$time();if(time<this.time+this.options.duration){this.delta=this.options.transition((time-this.time)/this.options.duration);this.setNow();this.increase();}else{this.stop(true);this.set(this.to);this.fireEvent('onComplete',this.element,10);this.callChain();}},set:function(to){this.now=to;this.increase();return this;},setNow:function(){this.now=this.compute(this.from,this.to);},compute:function(from,to){return(to-from)*this.delta+from;},start:function(from,to){if(!this.options.wait)this.stop();else if(this.timer)return this;this.from=from;this.to=to;this.change=this.to-this.from;this.time=$time();this.timer=this.step.periodical(Math.round(1000/this.options.fps),this);this.fireEvent('onStart',this.element);return this;},stop:function(end){if(!this.timer)return this;this.timer=$clear(this.timer);if(!end)this.fireEvent('onCancel',this.element);return this;},custom:function(from,to){return this.start(from,to);},clearTimer:function(end){return this.stop(end);}});Fx.Base.implement(new Chain,new Events,new Options);Fx.CSS={select:function(property,to){if(property.test(/color/i))return this.Color;var type=$type(to);if((type=='array')||(type=='string'&&to.contains(' ')))return this.Multi;return this.Single;},parse:function(el,property,fromTo){if(!fromTo.push)fromTo=[fromTo];var from=fromTo[0],to=fromTo[1];if(!$chk(to)){to=from;from=el.getStyle(property);}
var css=this.select(property,to);return{'from':css.parse(from),'to':css.parse(to),'css':css};}};Fx.CSS.Single={parse:function(value){return parseFloat(value);},getNow:function(from,to,fx){return fx.compute(from,to);},getValue:function(value,unit,property){if(unit=='px'&&property!='opacity')value=Math.round(value);return value+unit;}};Fx.CSS.Multi={parse:function(value){return value.push?value:value.split(' ').map(function(v){return parseFloat(v);});},getNow:function(from,to,fx){var now=[];for(var i=0;i<from.length;i++)now[i]=fx.compute(from[i],to[i]);return now;},getValue:function(value,unit,property){if(unit=='px'&&property!='opacity')value=value.map(Math.round);return value.join(unit+' ')+unit;}};Fx.CSS.Color={parse:function(value){return value.push?value:value.hexToRgb(true);},getNow:function(from,to,fx){var now=[];for(var i=0;i<from.length;i++)now[i]=Math.round(fx.compute(from[i],to[i]));return now;},getValue:function(value){return'rgb('+value.join(',')+')';}};Fx.Style=Fx.Base.extend({initialize:function(el,property,options){this.element=$(el);this.property=property;this.parent(options);},hide:function(){return this.set(0);},setNow:function(){this.now=this.css.getNow(this.from,this.to,this);},set:function(to){this.css=Fx.CSS.select(this.property,to);return this.parent(this.css.parse(to));},start:function(from,to){if(this.timer&&this.options.wait)return this;var parsed=Fx.CSS.parse(this.element,this.property,[from,to]);this.css=parsed.css;return this.parent(parsed.from,parsed.to);},increase:function(){this.element.setStyle(this.property,this.css.getValue(this.now,this.options.unit,this.property));}});Element.extend({effect:function(property,options){return new Fx.Style(this,property,options);}});Fx.Styles=Fx.Base.extend({initialize:function(el,options){this.element=$(el);this.parent(options);},setNow:function(){for(var p in this.from)this.now[p]=this.css[p].getNow(this.from[p],this.to[p],this);},set:function(to){var parsed={};this.css={};for(var p in to){this.css[p]=Fx.CSS.select(p,to[p]);parsed[p]=this.css[p].parse(to[p]);}
return this.parent(parsed);},start:function(obj){if(this.timer&&this.options.wait)return this;this.now={};this.css={};var from={},to={};for(var p in obj){var parsed=Fx.CSS.parse(this.element,p,obj[p]);from[p]=parsed.from;to[p]=parsed.to;this.css[p]=parsed.css;}
return this.parent(from,to);},increase:function(){for(var p in this.now)this.element.setStyle(p,this.css[p].getValue(this.now[p],this.options.unit,p));}});Element.extend({effects:function(options){return new Fx.Styles(this,options);}});Fx.Elements=Fx.Base.extend({initialize:function(elements,options){this.elements=$$(elements);this.parent(options);},setNow:function(){for(var i in this.from){var iFrom=this.from[i],iTo=this.to[i],iCss=this.css[i],iNow=this.now[i]={};for(var p in iFrom)iNow[p]=iCss[p].getNow(iFrom[p],iTo[p],this);}},set:function(to){var parsed={};this.css={};for(var i in to){var iTo=to[i],iCss=this.css[i]={},iParsed=parsed[i]={};for(var p in iTo){iCss[p]=Fx.CSS.select(p,iTo[p]);iParsed[p]=iCss[p].parse(iTo[p]);}}
return this.parent(parsed);},start:function(obj){if(this.timer&&this.options.wait)return this;this.now={};this.css={};var from={},to={};for(var i in obj){var iProps=obj[i],iFrom=from[i]={},iTo=to[i]={},iCss=this.css[i]={};for(var p in iProps){var parsed=Fx.CSS.parse(this.elements[i],p,iProps[p]);iFrom[p]=parsed.from;iTo[p]=parsed.to;iCss[p]=parsed.css;}}
return this.parent(from,to);},increase:function(){for(var i in this.now){var iNow=this.now[i],iCss=this.css[i];for(var p in iNow)this.elements[i].setStyle(p,iCss[p].getValue(iNow[p],this.options.unit,p));}}});Fx.Scroll=Fx.Base.extend({options:{overflown:[],offset:{'x':0,'y':0},wheelStops:true},initialize:function(element,options){this.now=[];this.element=$(element);this.bound={'stop':this.stop.bind(this,false)};this.parent(options);if(this.options.wheelStops){this.addEvent('onStart',function(){document.addEvent('mousewheel',this.bound.stop);}.bind(this));this.addEvent('onComplete',function(){document.removeEvent('mousewheel',this.bound.stop);}.bind(this));}},setNow:function(){for(var i=0;i<2;i++)this.now[i]=this.compute(this.from[i],this.to[i]);},scrollTo:function(x,y){if(this.timer&&this.options.wait)return this;var el=this.element.getSize();var values={'x':x,'y':y};for(var z in el.size){var max=el.scrollSize[z]-el.size[z];if($chk(values[z]))values[z]=($type(values[z])=='number')?values[z].limit(0,max):max;else values[z]=el.scroll[z];values[z]+=this.options.offset[z];}
return this.start([el.scroll.x,el.scroll.y],[values.x,values.y]);},toTop:function(){return this.scrollTo(false,0);},toBottom:function(){return this.scrollTo(false,'full');},toLeft:function(){return this.scrollTo(0,false);},toRight:function(){return this.scrollTo('full',false);},toElement:function(el){var parent=this.element.getPosition(this.options.overflown);var target=$(el).getPosition(this.options.overflown);return this.scrollTo(target.x-parent.x,target.y-parent.y);},increase:function(){this.element.scrollTo(this.now[0],this.now[1]);}});Fx.Slide=Fx.Base.extend({options:{mode:'vertical'},initialize:function(el,options){this.element=$(el);this.wrapper=new Element('div',{'styles':$extend(this.element.getStyles('margin'),{'overflow':'hidden'})}).injectAfter(this.element).adopt(this.element);this.element.setStyle('margin',0);this.setOptions(options);this.now=[];this.parent(this.options);this.open=true;this.addEvent('onComplete',function(){this.open=(this.now[0]===0);});if(window.webkit419)this.addEvent('onComplete',function(){if(this.open)this.element.remove().inject(this.wrapper);});},setNow:function(){for(var i=0;i<2;i++)this.now[i]=this.compute(this.from[i],this.to[i]);},vertical:function(){this.margin='margin-top';this.layout='height';this.offset=this.element.offsetHeight;},horizontal:function(){this.margin='margin-left';this.layout='width';this.offset=this.element.offsetWidth;},slideIn:function(mode){this[mode||this.options.mode]();return this.start([this.element.getStyle(this.margin).toInt(),this.wrapper.getStyle(this.layout).toInt()],[0,this.offset]);},slideOut:function(mode){this[mode||this.options.mode]();return this.start([this.element.getStyle(this.margin).toInt(),this.wrapper.getStyle(this.layout).toInt()],[-this.offset,0]);},hide:function(mode){this[mode||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(mode){this[mode||this.options.mode]();this.open=true;return this.set([0,this.offset]);},toggle:function(mode){if(this.wrapper.offsetHeight==0||this.wrapper.offsetWidth==0)return this.slideIn(mode);return this.slideOut(mode);},increase:function(){this.element.setStyle(this.margin,this.now[0]+this.options.unit);this.wrapper.setStyle(this.layout,this.now[1]+this.options.unit);}});Fx.Transition=function(transition,params){params=params||[];if($type(params)!='array')params=[params];return $extend(transition,{easeIn:function(pos){return transition(pos,params);},easeOut:function(pos){return 1-transition(1-pos,params);},easeInOut:function(pos){return(pos<=0.5)?transition(2*pos,params)/2:(2-transition(2*(1-pos),params))/2;}});};Fx.Transitions=new Abstract({linear:function(p){return p;}});Fx.Transitions.extend=function(transitions){for(var transition in transitions){Fx.Transitions[transition]=new Fx.Transition(transitions[transition]);Fx.Transitions.compat(transition);}};Fx.Transitions.compat=function(transition){['In','Out','InOut'].each(function(easeType){Fx.Transitions[transition.toLowerCase()+easeType]=Fx.Transitions[transition]['ease'+easeType];});};Fx.Transitions.extend({Pow:function(p,x){return Math.pow(p,x[0]||6);},Expo:function(p){return Math.pow(2,8*(p-1));},Circ:function(p){return 1-Math.sin(Math.acos(p));},Sine:function(p){return 1-Math.sin((1-p)*Math.PI/2);},Back:function(p,x){x=x[0]||1.618;return Math.pow(p,2)*((x+1)*p-x);},Bounce:function(p){var value;for(var a=0,b=1;1;a+=b,b/=2){if(p>=(7-4*a)/11){value=-Math.pow((11-6*a-11*p)/4,2)+b*b;break;}}
return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}});['Quad','Cubic','Quart','Quint'].each(function(transition,i){Fx.Transitions[transition]=new Fx.Transition(function(p){return Math.pow(p,[i+2]);});Fx.Transitions.compat(transition);});var Drag={};Drag.Base=new Class({options:{handle:false,unit:'px',onStart:Class.empty,onBeforeStart:Class.empty,onComplete:Class.empty,onSnap:Class.empty,onDrag:Class.empty,limit:false,modifiers:{x:'left',y:'top'},grid:false,snap:6},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.handle=$(this.options.handle)||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.bound={'start':this.start.bindWithEvent(this),'check':this.check.bindWithEvent(this),'drag':this.drag.bindWithEvent(this),'stop':this.stop.bind(this)};this.attach();if(this.options.initialize)this.options.initialize.call(this);},attach:function(){this.handle.addEvent('mousedown',this.bound.start);return this;},detach:function(){this.handle.removeEvent('mousedown',this.bound.start);return this;},start:function(event){this.fireEvent('onBeforeStart',this.element);this.mouse.start=event.page;var limit=this.options.limit;this.limit={'x':[],'y':[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=0;i<2;i++){if($chk(limit[z][i]))this.limit[z][i]=($type(limit[z][i])=='function')?limit[z][i]():limit[z][i];}}}
if($type(this.options.grid)=='number')this.options.grid={'x':this.options.grid,'y':this.options.grid};document.addListener('mousemove',this.bound.check);document.addListener('mouseup',this.bound.stop);this.fireEvent('onStart',this.element);event.stop();},check:function(event){var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){document.removeListener('mousemove',this.bound.check);document.addListener('mousemove',this.bound.drag);this.drag(event);this.fireEvent('onSnap',this.element);}
event.stop();},drag:function(event){this.out=false;this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1];this.out=true;}else if($chk(this.limit[z][0])&&(this.value.now[z]<this.limit[z][0])){this.value.now[z]=this.limit[z][0];this.out=true;}}
if(this.options.grid[z])this.value.now[z]-=(this.value.now[z]%this.options.grid[z]);this.element.setStyle(this.options.modifiers[z],this.value.now[z]+this.options.unit);}
this.fireEvent('onDrag',this.element);event.stop();},stop:function(){document.removeListener('mousemove',this.bound.check);document.removeListener('mousemove',this.bound.drag);document.removeListener('mouseup',this.bound.stop);this.fireEvent('onComplete',this.element);}});Drag.Base.implement(new Events,new Options);Element.extend({makeResizable:function(options){return new Drag.Base(this,$merge({modifiers:{x:'width',y:'height'}},options));}});Drag.Move=Drag.Base.extend({options:{droppables:[],container:false,overflown:[]},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.droppables=$$(this.options.droppables);this.container=$(this.options.container);this.position={'element':this.element.getStyle('position'),'container':false};if(this.container)this.position.container=this.container.getStyle('position');if(!['relative','absolute','fixed'].contains(this.position.element))this.position.element='absolute';var top=this.element.getStyle('top').toInt();var left=this.element.getStyle('left').toInt();if(this.position.element=='absolute'&&!['relative','absolute','fixed'].contains(this.position.container)){top=$chk(top)?top:this.element.getTop(this.options.overflown);left=$chk(left)?left:this.element.getLeft(this.options.overflown);}else{top=$chk(top)?top:0;left=$chk(left)?left:0;}
this.element.setStyles({'top':top,'left':left,'position':this.position.element});this.parent(this.element);},start:function(event){this.overed=null;if(this.container){var cont=this.container.getCoordinates();var el=this.element.getCoordinates();if(this.position.element=='absolute'&&!['relative','absolute','fixed'].contains(this.position.container)){this.options.limit={'x':[cont.left,cont.right-el.width],'y':[cont.top,cont.bottom-el.height]};}else{this.options.limit={'y':[0,cont.height-el.height],'x':[0,cont.width-el.width]};}}
this.parent(event);},drag:function(event){this.parent(event);var overed=this.out?false:this.droppables.filter(this.checkAgainst,this).getLast();if(this.overed!=overed){if(this.overed)this.overed.fireEvent('leave',[this.element,this]);this.overed=overed?overed.fireEvent('over',[this.element,this]):null;}
return this;},checkAgainst:function(el){el=el.getCoordinates(this.options.overflown);var now=this.mouse.now;return(now.x>el.left&&now.x<el.right&&now.y<el.bottom&&now.y>el.top);},stop:function(){if(this.overed&&!this.out)this.overed.fireEvent('drop',[this.element,this]);else this.element.fireEvent('emptydrop',this);this.parent();return this;}});Element.extend({makeDraggable:function(options){return new Drag.Move(this,options);}});var XHR=new Class({options:{method:'post',async:true,onRequest:Class.empty,onSuccess:Class.empty,onFailure:Class.empty,urlEncoded:true,encoding:'utf-8',autoCancel:false,headers:{}},setTransport:function(){this.transport=(window.XMLHttpRequest)?new XMLHttpRequest():(window.ie?new ActiveXObject('Microsoft.XMLHTTP'):false);return this;},initialize:function(options){this.setTransport().setOptions(options);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers={};if(this.options.urlEncoded&&this.options.method=='post'){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';this.setHeader('Content-type','application/x-www-form-urlencoded'+encoding);}
if(this.options.initialize)this.options.initialize.call(this);},onStateChange:function(){if(this.transport.readyState!=4||!this.running)return;this.running=false;var status=0;try{status=this.transport.status;}catch(e){};if(this.options.isSuccess.call(this,status))this.onSuccess();else this.onFailure();this.transport.onreadystatechange=Class.empty;},isSuccess:function(status){return((status>=200)&&(status<300));},onSuccess:function(){this.response={'text':this.transport.responseText,'xml':this.transport.responseXML};this.fireEvent('onSuccess',[this.response.text,this.response.xml]);this.callChain();},onFailure:function(){this.fireEvent('onFailure',this.transport);},setHeader:function(name,value){this.headers[name]=value;return this;},send:function(url,data){if(this.options.autoCancel)this.cancel();else if(this.running)return this;this.running=true;if(data&&this.options.method=='get'){url=url+(url.contains('?')?'&':'?')+data;data=null;}
this.transport.open(this.options.method.toUpperCase(),url,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if((this.options.method=='post')&&this.transport.overrideMimeType)this.setHeader('Connection','close');$extend(this.headers,this.options.headers);for(var type in this.headers)try{this.transport.setRequestHeader(type,this.headers[type]);}catch(e){};this.fireEvent('onRequest');this.transport.send($pick(data,null));return this;},cancel:function(){if(!this.running)return this;this.running=false;this.transport.abort();this.transport.onreadystatechange=Class.empty;this.setTransport();this.fireEvent('onCancel');return this;}});XHR.implement(new Chain,new Events,new Options);var Ajax=XHR.extend({options:{data:null,update:null,onComplete:Class.empty,evalScripts:false,evalResponse:false},initialize:function(url,options){this.addEvent('onSuccess',this.onComplete);this.setOptions(options);this.options.data=this.options.data||this.options.postBody;if(!['post','get'].contains(this.options.method)){this._method='_method='+this.options.method;this.options.method='post';}
this.parent();this.setHeader('X-Requested-With','XMLHttpRequest');this.setHeader('Accept','text/javascript, text/html, application/xml, text/xml, */*');this.url=url;},onComplete:function(){if(this.options.update)$(this.options.update).empty().setHTML(this.response.text);if(this.options.evalScripts||this.options.evalResponse)this.evalScripts();this.fireEvent('onComplete',[this.response.text,this.response.xml],20);},request:function(data){data=data||this.options.data;switch($type(data)){case'element':data=$(data).toQueryString();break;case'object':data=Object.toQueryString(data);}
if(this._method)data=(data)?[this._method,data].join('&'):this._method;return this.send(this.url,data);},evalScripts:function(){var script,scripts;if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))scripts=this.response.text;else{scripts=[];var regexp=/<script[^>]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(this.response.text)))scripts.push(script[1]);scripts=scripts.join('\n');}
if(scripts)(window.execScript)?window.execScript(scripts):window.setTimeout(scripts,0);},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){};return null;}});Object.toQueryString=function(source){var queryString=[];for(var property in source)queryString.push(encodeURIComponent(property)+'='+encodeURIComponent(source[property]));return queryString.join('&');};Element.extend({send:function(options){return new Ajax(this.getProperty('action'),$merge({data:this.toQueryString()},options,{method:'post'})).request();}});var Cookie=new Abstract({options:{domain:false,path:false,duration:false,secure:false},set:function(key,value,options){options=$merge(this.options,options);value=encodeURIComponent(value);if(options.domain)value+='; domain='+options.domain;if(options.path)value+='; path='+options.path;if(options.duration){var date=new Date();date.setTime(date.getTime()+options.duration*24*60*60*1000);value+='; expires='+date.toGMTString();}
if(options.secure)value+='; secure';document.cookie=key+'='+value;return $extend(options,{'key':key,'value':value});},get:function(key){var value=document.cookie.match('(?:^|;)\\s*'+key.escapeRegExp()+'=([^;]*)');return value?decodeURIComponent(value[1]):false;},remove:function(cookie,options){if($type(cookie)=='object')this.set(cookie.key,'',$merge(cookie,{duration:-1}));else this.set(cookie,'',$merge(options,{duration:-1}));}});var Json={toString:function(obj){switch($type(obj)){case'string':return'"'+obj.replace(/(["\\])/g,'\\$1')+'"';case'array':return'['+obj.map(Json.toString).join(',')+']';case'object':var string=[];for(var property in obj)string.push(Json.toString(property)+':'+Json.toString(obj[property]));return'{'+string.join(',')+'}';case'number':if(isFinite(obj))break;case false:return'null';}
return String(obj);},evaluate:function(str,secure){return(($type(str)!='string')||(secure&&!str.test(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/)))?null:eval('('+str+')');}};Json.Remote=XHR.extend({initialize:function(url,options){this.url=url;this.addEvent('onSuccess',this.onComplete);this.parent(options);this.setHeader('X-Request','JSON');},send:function(obj){return this.parent(this.url,'json='+Json.toString(obj));},onComplete:function(){this.fireEvent('onComplete',[Json.evaluate(this.response.text,this.options.secure)]);}});var Asset=new Abstract({javascript:function(source,properties){properties=$merge({'onload':Class.empty},properties);var script=new Element('script',{'src':source}).addEvents({'load':properties.onload,'readystatechange':function(){if(this.readyState=='complete')this.fireEvent('load');}});delete properties.onload;return script.setProperties(properties).inject(document.head);},css:function(source,properties){return new Element('link',$merge({'rel':'stylesheet','media':'screen','type':'text/css','href':source},properties)).inject(document.head);},image:function(source,properties){properties=$merge({'onload':Class.empty,'onabort':Class.empty,'onerror':Class.empty},properties);var image=new Image();image.src=source;var element=new Element('img',{'src':source});['load','abort','error'].each(function(type){var event=properties['on'+type];delete properties['on'+type];element.addEvent(type,function(){this.removeEvent(type,arguments.callee);event.call(this);});});if(image.width&&image.height)element.fireEvent('load',element,1);return element.setProperties(properties);},images:function(sources,options){options=$merge({onComplete:Class.empty,onProgress:Class.empty},options);if(!sources.push)sources=[sources];var images=[];var counter=0;sources.each(function(source){var img=new Asset.image(source,{'onload':function(){options.onProgress.call(this,counter);counter++;if(counter==sources.length)options.onComplete();}});images.push(img);});return new Elements(images);}});var Hash=new Class({length:0,initialize:function(object){this.obj=object||{};this.setLength();},get:function(key){return(this.hasKey(key))?this.obj[key]:null;},hasKey:function(key){return(key in this.obj);},set:function(key,value){if(!this.hasKey(key))this.length++;this.obj[key]=value;return this;},setLength:function(){this.length=0;for(var p in this.obj)this.length++;return this;},remove:function(key){if(this.hasKey(key)){delete this.obj[key];this.length--;}
return this;},each:function(fn,bind){$each(this.obj,fn,bind);},extend:function(obj){$extend(this.obj,obj);return this.setLength();},merge:function(){this.obj=$merge.apply(null,[this.obj].extend(arguments));return this.setLength();},empty:function(){this.obj={};this.length=0;return this;},keys:function(){var keys=[];for(var property in this.obj)keys.push(property);return keys;},values:function(){var values=[];for(var property in this.obj)values.push(this.obj[property]);return values;}});function $H(obj){return new Hash(obj);};Hash.Cookie=Hash.extend({initialize:function(name,options){this.name=name;this.options=$extend({'autoSave':true},options||{});this.load();},save:function(){if(this.length==0){Cookie.remove(this.name,this.options);return true;}
var str=Json.toString(this.obj);if(str.length>4096)return false;Cookie.set(this.name,str,this.options);return true;},load:function(){this.obj=Json.evaluate(Cookie.get(this.name),true)||{};this.setLength();}});Hash.Cookie.Methods={};['extend','set','merge','empty','remove'].each(function(method){Hash.Cookie.Methods[method]=function(){Hash.prototype[method].apply(this,arguments);if(this.options.autoSave)this.save();return this;};});Hash.Cookie.implement(Hash.Cookie.Methods);var Color=new Class({initialize:function(color,type){type=type||(color.push?'rgb':'hex');var rgb,hsb;switch(type){case'rgb':rgb=color;hsb=rgb.rgbToHsb();break;case'hsb':rgb=color.hsbToRgb();hsb=color;break;default:rgb=color.hexToRgb(true);hsb=rgb.rgbToHsb();}
rgb.hsb=hsb;rgb.hex=rgb.rgbToHex();return $extend(rgb,Color.prototype);},mix:function(){var colors=$A(arguments);var alpha=($type(colors[colors.length-1])=='number')?colors.pop():50;var rgb=this.copy();colors.each(function(color){color=new Color(color);for(var i=0;i<3;i++)rgb[i]=Math.round((rgb[i]/100*(100-alpha))+(color[i]/100*alpha));});return new Color(rgb,'rgb');},invert:function(){return new Color(this.map(function(value){return 255-value;}));},setHue:function(value){return new Color([value,this.hsb[1],this.hsb[2]],'hsb');},setSaturation:function(percent){return new Color([this.hsb[0],percent,this.hsb[2]],'hsb');},setBrightness:function(percent){return new Color([this.hsb[0],this.hsb[1],percent],'hsb');}});function $RGB(r,g,b){return new Color([r,g,b],'rgb');};function $HSB(h,s,b){return new Color([h,s,b],'hsb');};Array.extend({rgbToHsb:function(){var red=this[0],green=this[1],blue=this[2];var hue,saturation,brightness;var max=Math.max(red,green,blue),min=Math.min(red,green,blue);var delta=max-min;brightness=max/255;saturation=(max!=0)?delta/max:0;if(saturation==0){hue=0;}else{var rr=(max-red)/delta;var gr=(max-green)/delta;var br=(max-blue)/delta;if(red==max)hue=br-gr;else if(green==max)hue=2+rr-br;else hue=4+gr-rr;hue/=6;if(hue<0)hue++;}
return[Math.round(hue*360),Math.round(saturation*100),Math.round(brightness*100)];},hsbToRgb:function(){var br=Math.round(this[2]/100*255);if(this[1]==0){return[br,br,br];}else{var hue=this[0]%360;var f=hue%60;var p=Math.round((this[2]*(100-this[1]))/10000*255);var q=Math.round((this[2]*(6000-this[1]*f))/600000*255);var t=Math.round((this[2]*(6000-this[1]*(60-f)))/600000*255);switch(Math.floor(hue/60)){case 0:return[br,t,p];case 1:return[q,br,p];case 2:return[p,br,t];case 3:return[p,q,br];case 4:return[t,p,br];case 5:return[br,p,q];}}
return false;}});var Scroller=new Class({options:{area:20,velocity:1,onChange:function(x,y){this.element.scrollTo(x,y);}},initialize:function(element,options){this.setOptions(options);this.element=$(element);this.mousemover=([window,document].contains(element))?$(document.body):this.element;},start:function(){this.coord=this.getCoords.bindWithEvent(this);this.mousemover.addListener('mousemove',this.coord);},stop:function(){this.mousemover.removeListener('mousemove',this.coord);this.timer=$clear(this.timer);},getCoords:function(event){this.page=(this.element==window)?event.client:event.page;if(!this.timer)this.timer=this.scroll.periodical(50,this);},scroll:function(){var el=this.element.getSize();var pos=this.element.getPosition();var change={'x':0,'y':0};for(var z in this.page){if(this.page[z]<(this.options.area+pos[z])&&el.scroll[z]!=0)
change[z]=(this.page[z]-this.options.area-pos[z])*this.options.velocity;else if(this.page[z]+this.options.area>(el.size[z]+pos[z])&&el.scroll[z]+el.size[z]!=el.scrollSize[z])
change[z]=(this.page[z]-el.size[z]+this.options.area-pos[z])*this.options.velocity;}
if(change.y||change.x)this.fireEvent('onChange',[el.scroll.x+change.x,el.scroll.y+change.y]);}});Scroller.implement(new Events,new Options);var Slider=new Class({options:{onChange:Class.empty,onComplete:Class.empty,onTick:function(pos){this.knob.setStyle(this.p,pos);},mode:'horizontal',steps:100,offset:0},initialize:function(el,knob,options){this.element=$(el);this.knob=$(knob);this.setOptions(options);this.previousChange=-1;this.previousEnd=-1;this.step=-1;this.element.addEvent('mousedown',this.clickedElement.bindWithEvent(this));var mod,offset;switch(this.options.mode){case'horizontal':this.z='x';this.p='left';mod={'x':'left','y':false};offset='offsetWidth';break;case'vertical':this.z='y';this.p='top';mod={'x':false,'y':'top'};offset='offsetHeight';}
this.max=this.element[offset]-this.knob[offset]+(this.options.offset*2);this.half=this.knob[offset]/2;this.getPos=this.element['get'+this.p.capitalize()].bind(this.element);this.knob.setStyle('position','relative').setStyle(this.p,-this.options.offset);var lim={};lim[this.z]=[-this.options.offset,this.max-this.options.offset];this.drag=new Drag.Base(this.knob,{limit:lim,modifiers:mod,snap:0,onStart:function(){this.draggedKnob();}.bind(this),onDrag:function(){this.draggedKnob();}.bind(this),onComplete:function(){this.draggedKnob();this.end();}.bind(this)});if(this.options.initialize)this.options.initialize.call(this);},set:function(step){this.step=step.limit(0,this.options.steps);this.checkStep();this.end();this.fireEvent('onTick',this.toPosition(this.step));return this;},clickedElement:function(event){var position=event.page[this.z]-this.getPos()-this.half;position=position.limit(-this.options.offset,this.max-this.options.offset);this.step=this.toStep(position);this.checkStep();this.end();this.fireEvent('onTick',position);},draggedKnob:function(){this.step=this.toStep(this.drag.value.now[this.z]);this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent('onChange',this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent('onComplete',this.step+'');}},toStep:function(position){return Math.round((position+this.options.offset)/this.max*this.options.steps);},toPosition:function(step){return this.max*step/this.options.steps;}});Slider.implement(new Events);Slider.implement(new Options);var SmoothScroll=Fx.Scroll.extend({initialize:function(options){this.parent(window,options);this.links=(this.options.links)?$$(this.options.links):$$(document.links);var location=window.location.href.match(/^[^#]*/)[0]+'#';this.links.each(function(link){if(link.href.indexOf(location)!=0)return;var anchor=link.href.substr(location.length);if(anchor&&$(anchor))this.useLink(link,anchor);},this);if(!window.webkit419)this.addEvent('onComplete',function(){window.location.hash=this.anchor;});},useLink:function(link,anchor){link.addEvent('click',function(event){this.anchor=anchor;this.toElement(anchor);event.stop();}.bindWithEvent(this));}});var Sortables=new Class({options:{handles:false,onStart:Class.empty,onComplete:Class.empty,ghost:true,snap:3,onDragStart:function(element,ghost){ghost.setStyle('opacity',0.7);element.setStyle('opacity',0.7);},onDragComplete:function(element,ghost){element.setStyle('opacity',1);ghost.remove();this.trash.remove();}},initialize:function(list,options){this.setOptions(options);this.list=$(list);this.elements=this.list.getChildren();this.handles=(this.options.handles)?$$(this.options.handles):this.elements;this.bound={'start':[],'moveGhost':this.moveGhost.bindWithEvent(this)};for(var i=0,l=this.handles.length;i<l;i++){this.bound.start[i]=this.start.bindWithEvent(this,this.elements[i]);}
this.attach();if(this.options.initialize)this.options.initialize.call(this);this.bound.move=this.move.bindWithEvent(this);this.bound.end=this.end.bind(this);},attach:function(){this.handles.each(function(handle,i){handle.addEvent('mousedown',this.bound.start[i]);},this);},detach:function(){this.handles.each(function(handle,i){handle.removeEvent('mousedown',this.bound.start[i]);},this);},start:function(event,el){this.active=el;this.coordinates=this.list.getCoordinates();if(this.options.ghost){var position=el.getPosition();this.offset=event.page.y-position.y;this.trash=new Element('div').inject(document.body);this.ghost=el.clone().inject(this.trash).setStyles({'position':'absolute','left':position.x,'top':event.page.y-this.offset});document.addListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragStart',[el,this.ghost]);}
document.addListener('mousemove',this.bound.move);document.addListener('mouseup',this.bound.end);this.fireEvent('onStart',el);event.stop();},moveGhost:function(event){var value=event.page.y-this.offset;value=value.limit(this.coordinates.top,this.coordinates.bottom-this.ghost.offsetHeight);this.ghost.setStyle('top',value);event.stop();},move:function(event){var now=event.page.y;this.previous=this.previous||now;var up=((this.previous-now)>0);var prev=this.active.getPrevious();var next=this.active.getNext();if(prev&&up&&now<prev.getCoordinates().bottom)this.active.injectBefore(prev);if(next&&!up&&now>next.getCoordinates().top)this.active.injectAfter(next);this.previous=now;},serialize:function(converter){return this.list.getChildren().map(converter||function(el){return this.elements.indexOf(el);},this);},end:function(){this.previous=null;document.removeListener('mousemove',this.bound.move);document.removeListener('mouseup',this.bound.end);if(this.options.ghost){document.removeListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragComplete',[this.active,this.ghost]);}
this.fireEvent('onComplete',this.active);}});Sortables.implement(new Events,new Options);var Tips=new Class({options:{onShow:function(tip){tip.setStyle('visibility','visible');},onHide:function(tip){tip.setStyle('visibility','hidden');},maxTitleChars:30,showDelay:100,hideDelay:100,className:'tool',offsets:{'x':16,'y':16},fixed:false},initialize:function(elements,options){this.setOptions(options);this.toolTip=new Element('div',{'class':this.options.className+'-tip','styles':{'position':'absolute','top':'0','left':'0','visibility':'hidden'}}).inject(document.body);this.wrapper=new Element('div').inject(this.toolTip);$$(elements).each(this.build,this);if(this.options.initialize)this.options.initialize.call(this);},build:function(el){el.$tmp.myTitle=(el.href&&el.getTag()=='a')?el.href.replace('http://',''):(el.rel||false);if(el.title){var dual=el.title.split('::');if(dual.length>1){el.$tmp.myTitle=dual[0].trim();el.$tmp.myText=dual[1].trim();}else{el.$tmp.myText=el.title;}
el.removeAttribute('title');}else{el.$tmp.myText=false;}
if(el.$tmp.myTitle&&el.$tmp.myTitle.length>this.options.maxTitleChars)el.$tmp.myTitle=el.$tmp.myTitle.substr(0,this.options.maxTitleChars-1)+"&hellip;";el.addEvent('mouseenter',function(event){this.start(el);if(!this.options.fixed)this.locate(event);else this.position(el);}.bind(this));if(!this.options.fixed)el.addEvent('mousemove',this.locate.bindWithEvent(this));var end=this.end.bind(this);el.addEvent('mouseleave',end);el.addEvent('trash',end);},start:function(el){this.wrapper.empty();if(el.$tmp.myTitle){this.title=new Element('span').inject(new Element('div',{'class':this.options.className+'-title'}).inject(this.wrapper)).setHTML(el.$tmp.myTitle);}
if(el.$tmp.myText){this.text=new Element('span').inject(new Element('div',{'class':this.options.className+'-text'}).inject(this.wrapper)).setHTML(el.$tmp.myText);}
$clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);},end:function(event){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this);},position:function(element){var pos=element.getPosition();this.toolTip.setStyles({'left':pos.x+this.options.offsets.x,'top':pos.y+this.options.offsets.y});},locate:function(event){var win={'x':window.getWidth(),'y':window.getHeight()};var scroll={'x':window.getScrollLeft(),'y':window.getScrollTop()};var tip={'x':this.toolTip.offsetWidth,'y':this.toolTip.offsetHeight};var prop={'x':'left','y':'top'};for(var z in prop){var pos=event.page[z]+this.options.offsets[z];if((pos+tip[z]-scroll[z])>win[z])pos=event.page[z]-this.options.offsets[z]-tip[z];this.toolTip.setStyle(prop[z],pos);};},show:function(){if(this.options.timeout)this.timer=this.hide.delay(this.options.timeout,this);this.fireEvent('onShow',[this.toolTip]);},hide:function(){this.fireEvent('onHide',[this.toolTip]);}});Tips.implement(new Events,new Options);var Group=new Class({initialize:function(){this.instances=$A(arguments);this.events={};this.checker={};},addEvent:function(type,fn){this.checker[type]=this.checker[type]||{};this.events[type]=this.events[type]||[];if(this.events[type].contains(fn))return false;else this.events[type].push(fn);this.instances.each(function(instance,i){instance.addEvent(type,this.check.bind(this,[type,instance,i]));},this);return this;},check:function(type,instance,i){this.checker[type][i]=true;var every=this.instances.every(function(current,j){return this.checker[type][j]||false;},this);if(!every)return;this.checker[type]={};this.events[type].each(function(event){event.call(this,this.instances,instance);},this);}});var Accordion=Fx.Elements.extend({options:{onActive:Class.empty,onBackground:Class.empty,display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var options,togglers,elements,container;$each(arguments,function(argument,i){switch($type(argument)){case'object':options=argument;break;case'element':container=$(argument);break;default:var temp=$$(argument);if(!togglers)togglers=temp;else elements=temp;}});this.togglers=togglers||[];this.elements=elements||[];this.container=$(container);this.setOptions(options);this.previous=-1;if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;}
if(this.options.start){this.options.display=false;this.options.show=false;}
this.effects={};if(this.options.opacity)this.effects.opacity='fullOpacity';if(this.options.width)this.effects.width=this.options.fixedWidth?'fullWidth':'offsetWidth';if(this.options.height)this.effects.height=this.options.fixedHeight?'fullHeight':'scrollHeight';for(var i=0,l=this.togglers.length;i<l;i++)this.addSection(this.togglers[i],this.elements[i]);this.elements.each(function(el,i){if(this.options.show===i){this.fireEvent('onActive',[this.togglers[i],el]);}else{for(var fx in this.effects)el.setStyle(fx,0);}},this);this.parent(this.elements);if($chk(this.options.display))this.display(this.options.display);},addSection:function(toggler,element,pos){toggler=$(toggler);element=$(element);var test=this.togglers.contains(toggler);var len=this.togglers.length;this.togglers.include(toggler);this.elements.include(element);if(len&&(!test||pos)){pos=$pick(pos,len-1);toggler.injectBefore(this.togglers[pos]);element.injectAfter(toggler);}else if(this.container&&!test){toggler.inject(this.container);element.inject(this.container);}
var idx=this.togglers.indexOf(toggler);toggler.addEvent('click',this.display.bind(this,idx));if(this.options.height)element.setStyles({'padding-top':0,'border-top':'none','padding-bottom':0,'border-bottom':'none'});if(this.options.width)element.setStyles({'padding-left':0,'border-left':'none','padding-right':0,'border-right':'none'});element.fullOpacity=1;if(this.options.fixedWidth)element.fullWidth=this.options.fixedWidth;if(this.options.fixedHeight)element.fullHeight=this.options.fixedHeight;element.setStyle('overflow','hidden');if(!test){for(var fx in this.effects)element.setStyle(fx,0);}
return this;},display:function(index){index=($type(index)=='element')?this.elements.indexOf(index):index;if((this.timer&&this.options.wait)||(index===this.previous&&!this.options.alwaysHide))return this;this.previous=index;var obj={};this.elements.each(function(el,i){obj[i]={};var hide=(i!=index)||(this.options.alwaysHide&&(el.offsetHeight>0));this.fireEvent(hide?'onBackground':'onActive',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]];},this);return this.start(obj);},showThisHideOpen:function(index){return this.display(index);}});Fx.Accordion=Accordion;

/* mega.more.js */

function mega_equal_cols(){}
function mega_fix_arrow_pos(){var ul=$E('#ja-megamenu .level0');if(!ul)return;var lis=ul.getChildren();if(!lis)return;lis.each(function(li){if(!li.hasClass('haschild'))return;var submenu=li.getElement('.childcontent');if(!submenu)return;var ml=submenu.getStyle('margin-left');if(ml)ml=ml.toInt();if(!ml)return;var childinner=submenu.getElement('.childcontent-inner');if(!childinner)return;var curpos=26;childinner.setStyle('background-position',(curpos-ml)+'px top');});}
window.addEvent('load',function(){mega_fix_arrow_pos.delay(10);});

/* core.js */

function switchFontSize(ckname,val){var bd=document.getElementsByTagName('body');if(!bd||!bd.length)return;bd=bd[0];var oldclass='fs'+CurrentFontSize;switch(val){case'inc':if(CurrentFontSize+1<7){CurrentFontSize++;}
break;case'dec':if(CurrentFontSize-1>0){CurrentFontSize--;}
break;case'reset':default:CurrentFontSize=DefaultFontSize;}
var newclass='fs'+CurrentFontSize;bd.className=bd.className.replace(new RegExp('fs.?','g'),'');bd.className=trim(bd.className);bd.className+=(bd.className?' ':'')+newclass;createCookie(ckname,CurrentFontSize,365);}
function switchTool(ckname,val){createCookie(ckname,val,365);window.location.reload();}
function cpanel_reset(){var matches=document.cookie.match('(?:^|;)\\s*'+tmpl_name.escapeRegExp()+'_([^=]*)=([^;]*)','g');if(!matches)return;for(i=0;i<matches.length;i++){var ck=matches[i].match('(?:^|;)\\s*'+tmpl_name.escapeRegExp()+'_([^=]*)=([^;]*)');if(ck){createCookie(tmpl_name+'_'+ck[1],'',-1);}}
if(window.location.href.indexOf('?')>-1)window.location.href=window.location.href.substr(0,window.location.href.indexOf('?'));else window.location.reload();}
function cpanel_apply(){var elems=document.getElementById('ja-cpanel-main').getElementsByTagName('*');var usersetting={};for(i=0;i<elems.length;i++){var el=elems[i];if(el.name&&(match=el.name.match(/^user_(.*)$/))){var name=match[1];var value='';if(el.tagName.toLowerCase()=='input'&&(el.type.toLowerCase()=='radio'||el.type.toLowerCase()=='checkbox')){if(el.checked)value=el.value;}else{value=el.value;}
if(usersetting[name]){if(value)usersetting[name]=value+','+usersetting[name];}else{usersetting[name]=value;}}}
for(var k in usersetting){name=tmpl_name+'_'+k;value=usersetting[k];createCookie(name,value,365);}
if(window.location.href.indexOf('?')>-1)window.location.href=window.location.href.substr(0,window.location.href.indexOf('?'));else window.location.reload();}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else expires="";document.cookie=name+"="+value+expires+"; path=/";}
function trim(str,chars){return ltrim(rtrim(str,chars),chars);}
function ltrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("^["+chars+"]+","g"),"");}
function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");}
function getScreenWidth(){var x=0;if(self.innerHeight){x=self.innerWidth;}else if(document.documentElement&&document.documentElement.clientHeight){x=document.documentElement.clientWidth;}else if(document.body){x=document.body.clientWidth;}
return x;}
function equalHeight(els){els=$$_(els);if(!els||els.length<2)return;var maxh=0;var els_=[];els.each(function(el,i){if(!el)return;els_[i]=el;var ch=els_[i].getCoordinates().height;maxh=(maxh<ch)?ch:maxh;},this);els_.each(function(el,i){if(!el)return;if(maxh-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt()>0)el.setStyle('min-height',maxh-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt());},this);}
function getDeepestWrapper(el){while(el.getChildren().length==1)
{el=el.getChildren()[0];}
return el;}
function fixHeight(els,group1,group2){els=$$_(els);group1=$$_(group1);group2=$$_(group2);if(!els||!group1)return;var height=0;group1.each(function(el){if(!el)return;height+=el.getCoordinates().height;});if(group2){group2.each(function(el){if(!el)return;height-=el.getCoordinates().height;});}
els.each(function(el,i){if(!el)return;if(height-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt()>0)el.setStyle('min-height',height-el.getStyle('padding-top').toInt()-el.getStyle('padding-bottom').toInt());});}
function addFirstLastItem(el){el=$(el);if(!el||!el.getChildren()||!el.getChildren().length)return;el.getChildren()[0].addClass('first-item');el.getChildren()[el.getChildren().length-1].addClass('last-item');}
function $$_(els){if($type(els)=='string')return $$(els);var els_=[];els.each(function(el){el=$(el);if(el)els_.push(el);});return els_;}

/* mega.js */

var jaMegaMenuMoo=new Class({initialize:function(menu,options){this.options=$extend({slide:true,duration:300,fading:false,bgopacity:0.9,delayHide:500,direction:'down',action:'mouseenter',hidestyle:'normal'},options||{});if(!this.options.slide&&!this.options.fading)this.options.delayHide=10;this.menu=menu;this.childopen=new Array();this.imageloaded=false;this.loaded=false;this.start();},start:function(){if(this.loaded)return;this.menu=$(this.menu);var images=this.menu.getElements('img');if(images&&images.length&&!this.imageloaded){var imgs=[];images.each(function(image){imgs.push(image.src)});if(imgs.length){new Asset.images(imgs,{onComplete:function(){this.start();}.bind(this)});this.imageloaded=true;this.start.delay(3000,this);return;}}
this.loaded=true;p=this.menu;while(p=p.getParent()){if(p.hasClass('main')||p.hasClass('wrap')){this.wrapper=p;break;}}
this.items=this.menu.getElements('li.mega');this.items.each(function(li){if((a=li.getElement('a.mega'))&&this.isChild(a,li))li.a=a;else li.a=null;li._parent=this.getParent(li);if((childcontent=li.getElement('.childcontent'))&&this.isChild(childcontent,li)){li.childcontent=childcontent;li.childcontent_inner=li.childcontent.getElement('.childcontent-inner-wrap');var coor=li.childcontent_inner.getCoordinates();li._w=li.getElement('.childcontent-inner').offsetWidth;li._h=li.getElement('.childcontent-inner').offsetHeight;li.level0=li.getParent().hasClass('level0');li.childcontent.setStyles({'width':li._w+10,'height':li._h});li.childcontent_inner.setStyles({'width':li._w});li.childcontent_inner1=li.childcontent.getElement('.childcontent-inner');li.childcontent_inner1.ol=false;if(li.childcontent_inner1.getStyle('overflow')=='auto'||li.childcontent_inner1.getStyle('overflow')=='scroll'){li.childcontent_inner1.ol=true;if(window.ie6||window.ie7){li.childcontent_inner1.setStyle('position','relative');}
if(window.ie6){li.childcontent_inner1.setStyle('height',li.childcontent_inner1.getStyle('max-height')||400);}}
if(this.options.direction=='up'){if(li.level0){li.childcontent.setStyle('top',-li.childcontent.offsetHeight);}else{li.childcontent.setStyle('bottom',0);}}}
else li.childcontent=null;if(li.childcontent&&this.options.bgopacity){var bg=new Element('div',{'class':'childcontent-bg'});bg.injectTop(li.childcontent_inner);bg.setStyles({'width':'100%','height':li._h,'opacity':this.options.bgopacity,'position':'absolute','top':0,'left':0,'z-index':1});if(li.childcontent.getStyle('background'))bg.setStyle('background',li.childcontent.getStyle('background'));if(li.childcontent.getStyle('background-image'))bg.setStyle('background-image',li.childcontent.getStyle('background-image'));if(li.childcontent.getStyle('background-repeat'))bg.setStyle('background-repeat',li.childcontent.getStyle('background-repeat'));if(li.childcontent.getStyle('background-color'))bg.setStyle('background-color',li.childcontent.getStyle('background-color'));li.childcontent.setStyle('background','none');li.childcontent_inner.setStyles({'position':'relative','z-index':2});}
if(li.childcontent&&(this.options.slide||this.options.fading)){li.childcontent.setStyles({'left':'auto'});if(li.childcontent.hasClass('right'))li.childcontent.setStyle('right',0);if(this.options.slide){li.childcontent.setStyles({'left':'auto','overflow':'hidden'});if(li.level0){if(this.options.direction=='up'){li.childcontent_inner.setStyle('bottom',-li._h-20);}else{li.childcontent_inner.setStyle('margin-top',-li._h-20);}}else{li.childcontent_inner.setStyle('margin-left',-li._w-20);}}
if(this.options.fading){li.childcontent_inner.setStyle('opacity',0);}
li.fx=new Fx.Styles(li.childcontent_inner,{duration:this.options.duration,transition:Fx.Transitions.linear,onComplete:this.itemAnimDone.bind(this,li)});li.eff_on={};li.eff_off={};if(this.options.slide){if(li.level0){if(this.options.direction=='up'){li.eff_on['bottom']=0;li.eff_off['bottom']=-li._h;}else{li.eff_on['margin-top']=0;li.eff_off['margin-top']=-li._h;}}else{li.eff_on['margin-left']=0;li.eff_off['margin-left']=-li._w;}}
if(this.options.fading){li.eff_on['opacity']=1;li.eff_off['opacity']=0;}}
if(this.options.action=='click'&&li.childcontent){li.addEvent('click',function(e){var event=new Event(e);if(li.hasClass('group'))return;if(li.childcontent){if(li.status=='open'){if(this.cursorIn(li,event)){this.itemHide(li);}else{this.itemHideOthers(li);}}else{this.itemShow(li);}}else{if(li.a)location.href=li.a.href;}
event.stop();}.bind(this));this.windowClickFn=function(e){this.itemHideOthers(null);}.bind(this);}
if(this.options.action=='mouseover'||this.options.action=='mouseenter'){li.addEvent('mouseenter',function(e){if(li.hasClass('group'))return;$clear(li.timer);this.itemShow(li);e.stop();}.bind(this));li.addEvent('mouseleave',function(e){if(li.hasClass('group'))return;$clear(li.timer);if(li.childcontent)li.timer=this.itemHide.delay(this.options.delayHide,this,[li,e]);else this.itemHide(li,e);if(!e.stopped){e.stop();e.stopped=true;}}.bind(this));if(li.a&&li.childcontent){li.clickable=false;li.a.addEvent('click',function(e){if(!li.clickable){new Event(e).stop();}}.bind(this));}}
if(li.a&&!li.childcontent){li.a.addEvent('click',function(e){this.itemHideOthers(null);this.menu.getElements('.active').removeClass('active');var p=li;while(p){p.addClass('active');p.a.addClass('active');p=p._parent;}}.bind(this));}
if(li.childcontent)this.positionSubmenu(li);},this);if(this.options.slide||this.options.fading){this.menu.getElements('.childcontent').setStyle('display','none');}},getParent:function(li){var p=li;while((p=p.getParent())){if(this.items.contains(p)&&!p.hasClass('group'))return p;if(!p||p==this.menu)return null;}},cursorIn:function(el,event){if(!el||!event)return false;var pos=$merge(el.getPosition(),{'w':el.offsetWidth,'h':el.offsetHeight});;var cursor={'x':event.page.x,'y':event.page.y};if(cursor.x>pos.x&&cursor.x<pos.x+el.offsetWidth&&cursor.y>pos.y&&cursor.y<pos.y+el.offsetHeight)return true;return false;},isChild:function(child,parent){return!!parent.getChildren().contains(child);},itemOver:function(li){if(li.hasClass('haschild'))
li.removeClass('haschild').addClass('haschild-over');li.addClass('over');if(li.a){li.a.addClass('over');}},itemOut:function(li){if(li.hasClass('haschild-over'))
li.removeClass('haschild-over').addClass('haschild');li.removeClass('over');if(li.a){li.a.removeClass('over');}},itemShow:function(li){clearTimeout(li.timer);if(li.status=='open')return;this.itemOver(li);li.status='open';this.enableclick.delay(100,this,li);this.childopen.push(li);this.itemHideOthers(li);if(li.childcontent){if(this.options.action=='click'&&this.childopen.length&&!this.windowClickEventAdded){$(document.body).addEvent('click',this.windowClickFn);this.windowClickEventAdded=true;}
this.positionSubmenu(li);}
if(!$defined(li.fx)||!$defined(li.childcontent))return;li.childcontent.setStyle('display','block');li.childcontent.setStyles({'overflow':'hidden'});if(li.childcontent_inner1.ol)li.childcontent_inner1.setStyles({'overflow':'hidden'});li.fx.stop();li.fx.start(li.eff_on);},itemHide:function(li,e){if(e&&e.page){if(this.cursorIn(li,e)||this.cursorIn(li.childcontent,e)){return;}
var p=li._parent;if(p&&!this.cursorIn(p,e)&&!this.cursorIn(p.childcontent,e)){p.fireEvent('mouseleave',e);}}
clearTimeout(li.timer);this.itemOut(li);li.status='close';this.childopen.remove(li);if(li.childcontent){if(this.options.action=='click'&&!this.childopen.length&&this.windowClickEventAdded){$(document.body).removeEvent('click',this.windowClickFn);this.windowClickEventAdded=false;}}
if(!$defined(li.fx)||!$defined(li.childcontent))return;if(li.childcontent.getStyle('opacity')==0)return;li.childcontent.setStyles({'overflow':'hidden'});if(li.childcontent_inner1.ol)li.childcontent_inner1.setStyles({'overflow':'hidden'});li.fx.stop();switch(this.options.hidestyle){case'fast':li.fx.options.duration=100;li.fx.start($merge(li.eff_off,{'opacity':0}));break;case'fastwhenshow':if(!e){li.fx.start($merge(li.eff_off,{'opacity':0}));}else{li.fx.start(li.eff_off);}
break;case'normal':default:li.fx.start(li.eff_off);break;}},itemAnimDone:function(li){if(li.status=='close'){if(this.options.hidestyle.test(/fast/)){li.fx.options.duration=this.options.duration;if(!this.options.fading)li.childcontent_inner.setStyle('opacity',1);}
li.childcontent.setStyles({'display':'none'});this.disableclick.delay(100,this,li);}
if(li.status=='open'){li.childcontent.setStyles({'overflow':''});if(li.childcontent_inner1.ol)li.childcontent_inner1.setStyles({'overflow-y':'auto'});li.childcontent_inner.setStyle('opacity',1);li.childcontent.setStyles({'display':'block'});}},itemHideOthers:function(el){var fakeevent=null
if(el&&!el.childcontent)fakeevent={};var curopen=this.childopen.copy();curopen.each(function(li){if(li&&typeof(li.status)!='undefined'&&(!el||(li!=el&&!li.hasChild(el)))){this.itemHide(li,fakeevent);}},this);},enableclick:function(li){if(li.a&&li.childcontent)li.clickable=true;},disableclick:function(li){if(li.a&&li.childcontent)li.clickable=false;},positionSubmenu:function(li){if(li.level0){if(!window.isRTL){var lcor=li.getCoordinates();var ccor=li.childcontent.getCoordinates();if(!ccor.width)
{li.childcontent.setStyle('display','block');ccor=li.childcontent.getCoordinates();li.childcontent.setStyle('display','none');}
var ml=0;var l=lcor.left;var r=l+ccor.width;if(this.wrapper){var wcor=this.wrapper.getCoordinates();l=l-wcor.left;r=wcor.right-r+10;}else{r=window.getWidth()-r+10;}
if(l<0||l+r<0){ml=-l;}else if(r<0){ml=r;}
if(ml!=0)li.childcontent.setStyle('margin-left',ml);}else{var lcor=li.getCoordinates();var ccor=li.childcontent.getCoordinates();if(!ccor.width)
{li.childcontent.setStyle('display','block');ccor=li.childcontent.getCoordinates();li.childcontent.setStyle('display','none');}
var mr=0;var r=lcor.right;var l=r-ccor.width;if(this.wrapper){var wcor=this.wrapper.getCoordinates();l=l-wcor.left;r=wcor.right-r+10;}else{r=window.getWidth()-r+10;}
if(r<0||l+r<0){mr=-r;}else if(l<0){mr=l;}
if(mr!=0)li.childcontent.setStyle('margin-right',mr);}}else{var lcor=li.getCoordinates();var ccor=li.childcontent.getCoordinates();if(!ccor.width)
{li.childcontent.setStyle('display','block');ccor=li.childcontent.getCoordinates();li.childcontent.setStyle('display','none');}
var ml=0;var l=ccor.left;var r=l+ccor.width;if(this.wrapper){var wcor=this.wrapper.getCoordinates();l=l-wcor.left;r=wcor.right-r+10;}else{r=window.getWidth()-r+10;}
if(r<0){li.childcontent.setStyle('margin-left',-ccor.width+20);li.eff_on['margin-left']=0;li.eff_off['margin-left']=li._w+20;li.childcontent_inner.setStyle('margin-left',li.eff_off['margin-left']);}}}});

/* dropline.js */

var jasdl_delay=1000
var jasdl_current=null
var jasdl_recover=null
var jasdl_timeoutid=null
var jasdl_timetorecover=null
var jasdl_timeoutid2=0
function jasdl_initJAScriptDLMenu(){jasdl_current=jasdl_activemenu.length?jasdl_activemenu[0]:0;mainlis=document.getElementById("jasdl-mainnav").getElementsByTagName("li")
for(i=0;i<mainlis.length;++i){x=mainlis[i]
jasdl_menuindex=x.id.substr(13)
x._id=parseInt(jasdl_menuindex)
x.onmouseover=jasdl_mouseOver
x.onmouseout=jasdl_mouseOut
subx=document.getElementById("jasdl-subnav"+jasdl_menuindex)
if(subx)
{if(jasdl_activemenu[0]&&jasdl_menuindex==jasdl_activemenu[0]){subx.style.display="block";if(subx.className)subx.className+=" active";else subx.className="active";}else{subx.style.display="none"}
subx._id=jasdl_menuindex
subx.onmouseover=jasdl_mouseOver
subx.onmouseout=jasdl_mouseOut}
document.getElementById("jasdl-subnav").style.display="block";}
if(jasdl_activemenu[0])
{actitem=document.getElementById("jasdl-mainnav"+jasdl_activemenu[0].toString())
if(actitem)
{if(actitem.className)actitem.className+=" active";else actitem.className="active";}
jasdl_recover=jasdl_activemenu[0]}
if(jasdl_activemenu[1]){actitem=document.getElementById("jasdl-subnavitem"+jasdl_activemenu[1].toString())
if(actitem)
{if(actitem.className)actitem.className+=" active";else actitem.className="active";}}
var subnav=document.getElementById('jasdl-subnav');if(subnav){var sublis=subnav.getElementsByTagName("li");for(i=0;i<sublis.length;++i){objs=sublis[i];var child=objs.getElementsByTagName('ul');if(child&&child.length){$(objs).addClass('haschild');objs.onmouseover=function(){if(this.timer){clearTimeout(this.timer);this.timer=0;}
$(this).addClass('hover');}
objs.onmouseout=function(){this.timer=setTimeout(jasdl_sub_mouseOut.bind(this),100);}}}}}
function jasdl_sub_mouseOut(){$(this).removeClass('hover');}
function jasdl_mouseOver(){jasdl_hide()
jasdl_current=this._id
jasdl_show()
jasdl_clearTimeOut(jasdl_timeoutid)}
function jasdl_mouseOut(){if(this._id!=jasdl_current)return
jasdl_timeoutid=setTimeout('jasdl_restore()',jasdl_delay)}
function jasdl_restore(){jasdl_clearTimeOut(jasdl_timeoutid)
jasdl_hide()
if(jasdl_recover)
{jasdl_current=jasdl_recover
jasdl_show()}}
function jasdl_setHover(){if(jasdl_current==jasdl_recover)return
mainx=document.getElementById("jasdl-mainnav"+jasdl_current.toString())
if(mainx)
mainx.className+=' hover';}
function jasdl_clearHover(){if(jasdl_current==jasdl_recover)return
mainx=document.getElementById("jasdl-mainnav"+jasdl_current.toString())
if(mainx)
mainx.className=mainx.className.replace(/[ ]?hover/,'');}
function jasdl_hide(){subx=document.getElementById("jasdl-subnav"+jasdl_current.toString())
if(subx)
subx.style.display="none"
jasdl_clearHover()}
function jasdl_show(){subx=document.getElementById("jasdl-subnav"+jasdl_current.toString())
if(subx)
subx.style.display="block"
jasdl_setHover()}
function jasdl_clearTimeOut(timeoutid){clearTimeout(timeoutid)
timeoutid=0}
window.addEvent('load',jasdl_initJAScriptDLMenu);

/* jcomments-v2.1.js */

function JCommentsEvents(){}
function JCommentsInput(){}
function JCommentsIndicator(){this.init();}
function JCommentsForm(id,editor){this.init(id,editor);}
function JCommentsEditor(textarea,resizable){this.init(textarea,resizable);}
function JComments(oi,og,r){this.init(oi,og,r);}
JCommentsEvents.prototype={add:function(o,e,f){if(o.addEventListener){o.addEventListener(e,f,false);return true;}else if(o.attachEvent){return o.attachEvent("on"+e,f);}else{return false;}},remove:function(o,e,f){if(o.removeEventListener){o.removeEventListener(e,f,false);}else if(o.detachEvent){o.detachEvent("on"+e,o[e+f]);o[e+f]=null;o["e"+e+f]=null;}},cancel:function(e){if(e.stopPropagation){e.cancelBubble=true;e.preventDefault();e.stopPropagation();}e.returnValue=false;return false;},target:function(e){var t;if(!e)e=window.event;if(e.target)t=e.target;else if(e.srcElement)t=e.srcElement;if(t.nodeType==3)t=t.parentNode;return t;}};JCommentsInput.prototype={register:function(el){if(el){var th=this,events=new JCommentsEvents();events.add(el,'focus',function(e){return th.onFocus(e);});events.add(el,'blur',function(e){return th.onBlur(e);});}},unregister:function(el){if(el){var th=this,events=new JCommentsEvents();events.remove(el,'focus',function(e){return th.onFocus(e);});events.remove(el,'blur',function(e){return th.onBlur(e);});}},onFocus:function(e){var t=JCommentsEvents.prototype.target(e);if(t!=null){t.className=t.className.replace('error','')+' selected';}},onBlur:function(e){var t=JCommentsEvents.prototype.target(e);if(t!=null){var c=t.className.replace('error','');c=c.replace('error','');c=c.replace('selected','');t.className=c.replace(/^\s+/g,"");}}};JCommentsEditor.prototype={ta:null,l10n:{},tags:{},smiles:{},events:null,counter:null,focused:false,resizable:true,init:function(textareaID,r){this.ta=JComments.prototype.$(textareaID);this.panelElements={};this.l10n={counterPre:'',counterPost:' symbols left',enterValue:'Enter value'};this.resizable=r;this.events=new JCommentsEvents();this.defaultHeight=this.ta.clientHeight;this.defaultRows=this.ta.rows;if(this.resizable){this.addGrippie();}
this.isWebkit=/webkit/.test(navigator.userAgent.toLowerCase());var th=this;this.events.add(document,!window.opera&&document.all?'keydown':'keypress',function(e){return th.onKeyPress(e);});this.events.add(this.ta,'click',function(e){th.closeSmiles();return th.storeCaret(this.ta);});this.events.add(this.ta,'select',function(e){return th.storeCaret(this.ta);});this.events.add(this.ta,'change',function(e){th.onChange();return th.storeCaret(this.ta);});this.events.add(this.ta,'keyup',function(e){return th.onChange();});this.events.add(this.ta,'focus',function(e){th.closeSmiles();return th.focused=true;});this.events.add(this.ta,'blur',function(e){return th.focused=false;});},onKeyPress:function(e){if(!this.focused){return;}
var r=false,k=String.fromCharCode(e.keyCode?e.keyCode:e.charCode),t=null;for(var id in this.tags){t=this.tags[id];if(!t.key||k.toUpperCase()!=t.key.toUpperCase())continue;if(t.ctrl&&!e[t.ctrl+"Key"])continue;this.insertTag(id);return this.events.cancel(e);}
return e.returnValue;},defined:function(v){return(typeof(v)!="undefined");},clear:function(){this.ta.value='';if(this.defaultHeight){this.ta.style.height=this.defaultHeight+'px';}this.updateCounter();},focus:function(){this.ta.focus();},storeCaret:function(){var ta=this.ta;if(ta.createTextRange)ta.caretPos=document.selection.createRange().duplicate();},getElementPos:function(e){var p={left:0,top:0,right:0,bottom:0};while(e!=null){p.left+=e.offsetLeft;p.top+=e.offsetTop;e=e.offsetParent;}p.right+=p.left;p.bottom+=p.top;return p;},getSelection:function(){var ta=this.ta,s='';if(document.selection&&document.selection.createRange){s=document.selection.createRange().text;}else{s=ta.value.substr(ta.selectionStart,ta.selectionEnd-ta.selectionStart);}return s;},insertText:function(text){var ta=this.ta;if(this.defined(ta.caretPos)&&ta.createTextRange){ta.focus();var sel=document.selection.createRange();sel.text=sel.text+text;ta.focus();}
else if(this.defined(ta.selectionStart)){var ss=ta.value.substr(0,ta.selectionStart);var se=ta.value.substr(ta.selectionEnd),sp=ta.scrollTop;ta.value=ss+text+se;if(ta.setSelectionRange){ta.focus();ta.setSelectionRange(ss.length+text.length,ss.length+text.length);}
ta.scrollTop=sp;}else{ta.value+=text;ta.focus(ta.value.length-1);}},surroundText:function(t1,t2){var ta=this.ta;if(this.defined(ta.caretPos)&&ta.createTextRange){var cp=ta.caretPos,tl=cp.text.length;cp.text=cp.text.charAt(cp.text.length-1)==' '?t1+cp.text+t2+' ':t1+cp.text+t2;if(tl==0){cp.moveStart("character",-t2.length);cp.moveEnd("character",-t2.length);cp.select();}
else{ta.focus(cp);}}else if(this.defined(ta.selectionStart)){var ss=ta.value.substr(0,ta.selectionStart),se=ta.value.substr(ta.selectionEnd);var sl=ta.value.substr(ta.selectionStart,ta.selectionEnd-ta.selectionStart);var nc=ta.selectionStart,sp=ta.scrollTop;ta.value=ss+t1+sl+t2+se;if(ta.setSelectionRange){if(sl.length==0){ta.setSelectionRange(nc+t1.length,nc+t1.length);}
else{ta.setSelectionRange(nc,nc+t1.length+sl.length+t2.length);}
ta.focus();}
ta.scrollTop=sp;}else{ta.value+=t1+t2;ta.focus(ta.value.length-1);}},insertTag:function(id){var tag=this.tags[id],ta=this.ta,s='';if(!tag)return;s=this.getSelection();if(s.length>0){this.surroundText(tag.open,tag.close);}},initTags:function(){if(this.bbc==null||this.bbc.length==0){this.bbc={};this.bbc['b']={id:'bbcode-b',open:'[b]',close:'[/b]',key:'B',ctrl:'ctrl',hint:'Bold'};this.bbc['i']={id:'bbcode-i',open:'[i]',close:'[/i]',key:'I',ctrl:'ctrl',hint:'Italic'};this.bbc['u']={id:'bbcode-u',open:'[u]',close:'[/u]',key:'u',ctrl:'ctrl',hint:'Underline'};this.bbc['s']={id:'bbcode-s',open:'[s]',close:'[/s]',key:null,ctrl:null,hint:'Strikeout'};this.bbc['img']={id:'bbcode-img',open:'[img]',close:'[/img]',key:null,ctrl:null,hint:'Image'};this.bbc['url']={id:'bbcode-url',open:'[url]',close:'[/url]',key:null,ctrl:null,hint:'Link'};this.bbc['hide']={id:'bbcode-hide',open:'[hide]',close:'[/hide]',key:null,ctrl:null,hint:'Hidden'};this.bbc['quote']={id:'bbcode-quote',open:'[quote]',close:'[/quote]',key:'Q',ctrl:'ctrl',hint:'Quote'};this.bbc['list']={id:'bbcode-list',open:'[list][*]',close:'[/list]',key:'L',ctrl:'ctrl',hint:'List'};}},createButton:function(i,t,c,f,img){var e;if(img==null||img==""){e=document.createElement('a');e.style.display='block';e.setAttribute('href','#');}
else{e=document.createElement('img');if(t){e.setAttribute('alt',t);}e.setAttribute('src',img);if(!c){c='custombbcode'};}
if(i){e.setAttribute('id',i);}if(t){e.setAttribute('title',t);}if(c){e.className=c;}
var ee=e;e.onclick=(f!=null?function(){f(ee);return false;}:function(){return false;});return e;},addButton:function(id,h,p,ot,ct,css,img){if(this.ta){this.initTags();var tag=this.bbc[id],th=this;if(!tag){if(ot&&ct){this.bbc[id]={id:id,open:ot,close:ct,key:null,ctrl:null,hint:h};tag=this.bbc[id];}else{return;}}
if(this.bbcPanel==null){this.bbcPanel=document.createElement('span');this.bbcPanel.className='bbcode';this.bbcPanel.style.display='block';this.ta.parentNode.insertBefore(this.bbcPanel,this.ta);}
var f=function(){var s=th.getSelection();if(s.length>0){th.surroundText(tag.open,tag.close);}else{var v=prompt(p,'');if(null!=v&&''!=v){th.insertText(tag.open+v+tag.close);}}return false;};tag.e=this.createButton(tag.id,(h!=null?h:tag.hint),(css?css:tag.id),f,img);this.bbcPanel.appendChild(tag.e);this.tags[tag.id]=tag;}},initSmiles:function(p){this.smilesPath=p;if(this.ta){this.smilesPanel=document.createElement('div');if(this.bbcPanel){document.body.appendChild(this.smilesPanel);this.smilesPanel.id='comments-form-smilespanel';this.smilesPanel.setAttribute('style','display:none;top:0;left:0;position:absolute;');this.smilesPanel.onclick=function(){this.style.display='none';};var jc=this,f=function(e){var sp=jc.smilesPanel,p=jc.getElementPos(e);if(sp){var sps=sp.style;sps.display=(sps.display=='none'||sps.display==''?'block':'none');sps.left=p.left+"px";sps.top=p.bottom+e.offsetHeight+"px";sps.zIndex=99;}
return false;};this.bbcPanel.appendChild(this.createButton(null,null,'bbcode-smile',f));}else{this.smilesPanel.className='smiles';this.ta.parentNode.insertBefore(this.smilesPanel,this.ta);}}},closeSmiles:function(){if(this.smilesPanel&&this.bbcPanel){this.smilesPanel.style.display='none';}},addSmile:function(code,image){if(this.ta){if(!this.smilesPath||!this.smilesPanel){return;}
var th=this,e=document.createElement('img');e.setAttribute('src',this.smilesPath+'/'+image);e.setAttribute('alt',code);e.className='smile';e.onclick=function(){th.insertText(' '+code+' ');};this.smilesPanel.appendChild(e);}},addCounter:function(m,pre,post,className){if(this.ta){if(pre!=null){this.l10n.counterPre=pre;}if(post!=null){this.l10n.counterPost=post;}
var ch=document.createElement('span');ch.className=className!=null?className:'';var t1=document.createTextNode(this.l10n.counterPre+' '),t2=document.createTextNode(' '+this.l10n.counterPost);var c=document.createElement('span');ch.appendChild(t1);ch.appendChild(c);ch.appendChild(t2);if(this.resizable){if(this.grippie!=null){this.grippie.appendChild(ch);}}
else{var d=document.createElement('div');d.className='counterpanel';this.ta.parentNode.insertBefore(d,this.ta.nextSibling);d.appendChild(ch);}
this.counter={e:c,max:m};this.updateCounter();}},addGrippie:function(){this.offset=null;this.dragging=false;this.grippie=document.createElement('div');this.grippie.className='grippie';this.ta.parentNode.insertBefore(this.grippie,this.ta.nextSibling);var th=this;this.events.add(this.grippie,'mousedown',function(e){return th.onMouseDown(e);});},updateCounter:function(){if(this.counter!=null){var ta=this.ta,e=this.counter.e;try{var n=document.createElement(e.tagName),v=this.counter.max-ta.value.length;n.innerHTML=(v>=0)?v:0;e.parentNode.replaceChild(n,e);this.counter.e=n;}catch(ex){}}},mousePosition:function(e){var px=0,py=0;if(!e){e=window.event;}if(e.pageX||e.pageY){px=e.pageX;py=e.pageY;}else if(e.clientX||e.clientY){px=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;py=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;}return{x:px,y:py};},onChange:function(){this.updateCounter();if(this.ta&&!this.isWebkit){var l=this.ta.value.split('\n');this.ta.rows=(l.length<this.defaultRows)?this.defaultRows:l.length+1;}return false;},onMouseDown:function(e){this.offset=this.mousePosition(e).y;this.height=this.ta.clientHeight;this.dragging=true;var th=this;this.events.add(document,'mousemove',function(e){return th.onMouseMove(e);});this.events.add(document,'mouseup',function(e){return th.onMouseUp(e);});return false;},onMouseUp:function(e){this.dragging=false;},onMouseMove:function(e){if(this.dragging)this.ta.style.height=Math.max(this.defaultHeight,this.height+this.mousePosition(e).y-this.offset)+'px';return false;}};JCommentsForm.prototype={id:null,form:null,events:null,editor:null,elements:{},store:new Array('name','email','homepage'),fadeTimer:null,init:function(id,editor){var f=this;this.id=id;this.form=this.$(id);this.editor=editor;this.events=new JCommentsEvents();this.setElements(new Array('name','email','homepage','title','comment'));this.restoreValues();this.clear('captcha');this.setCaptcha();},setCaptcha:function(){this.captchaImage=this.$(this.id+'-captcha-image');this.register('captcha');},setEditor:function(e){this.editor=e;},setElements:function(e){for(i=0;i<e.length;i++){try{this.register(e[i]);}catch(e){}}},$:function(e){return JComments.prototype.$(e);},register:function(n){var f=this,e=this.$(this.id+'-'+n);if(e){this.elements[n]=e;JCommentsInput.prototype.register(e);this.events.add(e,!window.opera&&document.all?'keydown':'keypress',function(e){return f.keypress(e);});}},error:function(m,n){var e=this.elements[n];if(e){e.focus();e.className='error';}},clear:function(n){if(n==null){if(this.form!=null){this.form.reset();}return;}
switch(n){case'comment':if(this.editor!=null){this.editor.clear();}break;case'captcha':var cim=this.captchaImage,cin=this.elements['captcha'];if(cim){cim.src=cim.src.replace(/&ac=\d+/g,'&ac='+new String(Math.floor(Math.random()*100000)));}if(cin){cin.value='';}break;default:var e=this.elements[n];if(e){e.value='';}break;}},focus:function(n){var e;if(n==null){for(var nm in this.elements){e=this.elements[nm];if(e){e.focus();break;}}}else{e=this.elements[n];if(e){e.focus();}}},keypress:function(e){if(e.ctrlKey&&(e.keyCode==13||(e.type=='keypress'&&e.keyCode==10))){this.submit();e.returnValue=false;return this.events.cancel(e);}return this.keypressed(e);},add:function(n,i,v){if(this.form!=null){var e=document.createElement('input');e.setAttribute('type','hidden');e.setAttribute('name',n);e.setAttribute('id',i);e.setAttribute('value',v);this.form.appendChild(e);}},remove:function(i){var e=this.$(i);if(e){e.value=0;e.parentNode.removeChild(e);}},setText:function(n,t){if(n=='comment'){if(this.editor!=null){this.editor.clear();this.editor.insertText(t);}}else{var e=this.elements[n];if(e){e.value=t;}}},insertText:function(n,t){if(n=='comment'){if(this.editor!=null){this.editor.insertText(t);}}else{var e=this.elements[n];if(e){e.value+=t;}}},storeValues:function(){for(var i=0;i<this.store.length;i++){try{var el=JComments.prototype.$(this.id+'-'+this.store[i]);if(el){JComments.prototype.setCookie(this.store[i],encodeURIComponent(el.value),14);}}catch(e){}}},restoreValues:function(){for(var i=0;i<this.store.length;i++){try{var el=JComments.prototype.$(this.id+'-'+this.store[i]);if(el){if(el.type&&el.type=='hidden'){return;}else{el.value=decodeURIComponent(JComments.prototype.getCookie(this.store[i]));}}}catch(e){}}},submit:function(){},keypressed:function(e){}};JCommentsIndicator.prototype={e:null,init:function(){if(this.e==null){this.e=document.createElement('div');this.e.className='busy';}},move:function(p,b){if(p){if(this.e.parentNode){this.e.parentNode.removeChild(this.e);}if(b){p.insertBefore(this.e,b);}else{p.appendChild(this.e);}}},show:function(){this.e.style.display='block';},hide:function(){this.e.style.display='none';},start:function(p,b){this.move(p,b);this.show();},stop:function(){this.hide();}};JComments.prototype={oi:null,og:null,debug:false,requestURI:'',oldRequestURI:'',busy:null,form:null,cache:{},mode:'add',readyList:[],isReady:false,init:function(oi,og,r){var ua=navigator.userAgent.toLowerCase();this.browser={safari:/webkit/.test(ua),opera:/opera/.test(ua),msie:/msie/.test(ua)&&!(/opera/.test(ua)),mozilla:/mozilla/.test(ua)&&!(/(compatible|webkit)/.test(ua))};this.oi=oi;this.og=og;this.busy=new JCommentsIndicator();this.requestURI=r;var th=this;jtajax.startLoading=function(){th.busy.show();};jtajax.finishLoading=function(){th.busy.hide();};},reinit:function(oi,og){this.oi=oi;this.og=og;var foi=this.$('object_id');if(foi){foi.value=oi;};var fog=this.$('object_group');if(fog){fog.value=og;}this.showPage(oi,og,0);},setForm:function(f){this.form=f;this.form_id=f.id;this.setMode('add',null);var jc=this;this.form.submit=function(){jc.saveComment();};this.form.keypressed=function(e){if(e.keyCode==27&&jc.mode=='reply'){jc.restoreForm(false);}};this.formLoaded();},setList:function(l){this.list_id=l;},setMode:function(m,i){var b=this.$('comments-form-cancel'),jc=this;if(b!=null){b.style.display=(m!='add')?'':'none';b.onclick=(m=='edit'?function(){jc.cancelEdit(i);}:(m=='reply'?function(){jc.cancelReply();}:null));}this.mode=m;},$:function(id){if(!id){return null;}var e=document.getElementById(id);if(!e&&document.all){e=document.all[id];}return e;},ajax:function(f,a,fid){var r,prevURI;try{prevURI=jtajax.options.url;jtajax.setup({url:this.requestURI});r=jtajax.call(f,a,'post',fid);jtajax.options.url=prevURI;}catch(e){jtajax.options.url=prevURI;}return r;},initOnReady:function(){if(this.isReadyInited)return;this.isReadyInited=1;var jc=this;if(this.browser.mozilla||this.browser.opera){JCommentsEvents.prototype.add(document,'DOMContentLoaded',jc.ready);}
else if(this.browser.msie){(function(){try{document.documentElement.doScroll('left');}catch(e){setTimeout(arguments.callee,50);return;}jc.ready();})();}
else if(this.browser.safari){(function(){if(jc.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}jc.ready();})();}
JCommentsEvents.prototype.add(window,'load',function(){jc.ready(jc);});},onReady:function(f){if(this.isReady){f();}else{var jc=this;jc.readyList.push(f);jc.initOnReady();}},ready:function(){var jc=window.jcomments;if(jc.isReady||jc.readyList==null)return;jc.isReady=1;for(var i=0,len=jc.readyList.length;i<len;i++){try{jc.readyList[i]();}catch(e){}}jc.readyList=null;},setAntiCache:function(c,p,f){this.aca=c;this.acp=p;this.acf=f;this.onReady(this.loadComments);},loadComments:function(){var jc=window.jcomments;var l=document.location.href,lc=true,i=l.lastIndexOf('#comment-');jc.clear('captcha');if(jc.aca){if(i!=0){var c=l.substring(i+9,l.length);if(!isNaN(c)){lc=false;jc.showComment(c);}}}if(jc.acp){if(lc){jc.showPage(jc.oi,jc.og,0);}}if(jc.acf){if(l.lastIndexOf('#addcomment')!=-1){jc.showForm(jc.oi,jc.og,'comments-form-link');}}},setCookie:function(n,v,d){var e='';if(d){var dt=new Date();dt.setTime(dt.getTime()+(d*24*60*60*1000));e="; expires="+dt.toGMTString();}document.cookie="jc_"+n+"="+v+e+"; path=/";},getCookie:function(n){var re=new RegExp("(\;|^)[^;]*("+"jc_"+n+")\=([^;]*)(;|$)");var r=re.exec(document.cookie);return r!=null?r[3]:'';},removeCookie:function(n){this.setCookie(n,"",-1);},scrollTo:function(n){if(n!=null){var e=this.$(n),t=0;if(e){t=e.offsetTop;for(var p=e.offsetParent;p;p=p.offsetParent){t+=p.offsetTop;}scrollTo(0,t);}}},scrollToList:function(){this.scrollTo(this.list_id);},scrollToForm:function(id){this.scrollTo(this.form_id);},scrollToComment:function(id){this.scrollTo('comment-'+id);},moveElement:function(e,p,b){if(e){if(p){if(e.parentNode){e.parentNode.removeChild(e);}if(b){p.insertBefore(e,b);}else{p.appendChild(e);}}}},createElement:function(t,i,c){var e=document.createElement(t);if(i){e.setAttribute('id',i);}if(c){e.className=c;}return e;},fade:function(id,s,e,m){var speed=Math.round(m/100),timer=0;if(s>e){for(i=s;i>=e;i--){setTimeout("JComments.prototype.setOpacity('"+id+"',"+i+")",(timer*speed));timer++;}var o=JComments.prototype.$(id);if(o){setTimeout(function(){o.style.display='none';},((s-e)*speed));}}else if(s<e){for(i=s;i<=e;i++){setTimeout("JComments.prototype.setOpacity('"+id+"',"+i+")",(timer*speed));timer++;}}},setOpacity:function(id,opacity){var e=this.$(id);if(e){var s=e.style;s.opacity=(opacity/100);s.MozOpacity=(opacity/100);s.KhtmlOpacity=(opacity/100);s.filter="alpha(opacity="+opacity+")";}},clear:function(n){if(this.form!=null){this.form.clear(n);}},insertText:function(t){if(this.form!=null){this.form.insertText('comment',t);}else{var jc=this;window.setTimeout(function(){jc.insertText(t);},500);}},busyList:function(){if(this.list_id){var l=this.$(this.list_id);if(l){this.busy.move(l.parentNode,l);}}},busyForm:function(){if(this.form_id){var f=this.$(this.form_id);if(f){this.busy.move(f.parentNode,f);}}},busyComment:function(i){this.busy.move(this.$('comment-item-'+i),null);},saveComment:function(i){var f='';if(this.mode!='edit'){f='JCommentsAddComment';this.busyForm();if(this.form){this.form.storeValues();}this.busy.show();}else{f='JCommentsSaveComment';this.busy.show();}return this.ajax(f,null,this.form_id);},editComment:function(i){this.busyComment(i);var a=arguments;if(this.form==null){a=new Array(i,1);}return this.ajax('JCommentsEditComment',a);},cancelEdit:function(i){if((!this.cache[i])||(this.cache[i]=='')){this.$('comment-body-'+i).innerHTML=this.cache[i];this.cache[i]='';}if(this.form){this.form.remove('comment-id-hidden-'+i);this.restoreForm(true);}var t=this.$('comment-toolbar-'+i);if(t){t.style.display='';}return this.ajax('JCommentsCancelComment',arguments);},cancelReply:function(){if(this.form){this.form.remove('comment-parent-id-hidden');this.restoreForm(false);}},quoteComment:function(i){var a=arguments;if(this.form==null){a=new Array(i,1);}return this.ajax('JCommentsQuoteComment',a);},publishComment:function(i){if(this.form){this.restoreForm();}this.busyComment(i);return this.ajax('JCommentsPublishComment',arguments);},deleteComment:function(i){this.busyComment(i);return this.ajax('JCommentsDeleteComment',arguments);},jump2email:function(i){return this.ajax('JCommentsJump2email',arguments);},updateList:function(t,m){if(this.list_id){var l=this.$(this.list_id);if(!l){l=this.$('comments');m='a';}switch(m){case'a':l.innerHTML=l.innerHTML+t;break;case'p':l.innerHTML=t+l.innerHTML;break;case'r':l.parentNode.innerHTML=t;break;}}},updateTree:function(t,r){var l;if(r==null){l=this.$('comments');if(l){l.innerHTML=t;}return;}l=this.$('comments-list-'+r);if(!l){var p=this.$('comment-item-'+r);if(p){this.busyComment(r);l=this.createElement('div','comments-list-'+r,'comments-list');l.innerHTML=t;p.parentNode.insertBefore(l,p.nextSibling);}}else{l.innerHTML=l.innerHTML+t;}this.restoreForm(true);},updateComment:function(id,t){if(t==''){var c=this.$('comment-item-'+id);c.parentNode.removeChild(c);var l=this.$('comments-list-'+id);if(l){l.parentNode.removeChild(l);}return;}this.$('comment-body-'+id).innerHTML=t;var te=this.$('comment-toolbar-'+id);if(te){te.style.display='';}if(this.form){this.form.remove('comment-id-hidden-'+id);this.restoreForm(true);}},voteComment:function(i){var v=this.$('comment-vote-holder-'+i);if(v){v.innerHTML='';this.busy.start(v,null);}return this.ajax('JCommentsVoteComment',arguments);},updateVote:function(i,t){this.busy.stop();var c=this.$('comment-vote-holder-'+i);if(c){c.innerHTML=t;}},showComment:function(id){return this.ajax('JCommentsShowComment',arguments);},showPage:function(i,g,p){if(this.form){this.restoreForm();}var l=this.$(this.list_id);if(!l){l=this.$(this.list_id+'-0');if(l){this.list_id=this.list_id+'-0';}}this.busyList();return this.ajax('JCommentsShowPage',arguments);},showForm:function(i,g,t){if(this.form){this.moveElement(this.form.form,this.$(t));return;}this.busyForm();return this.ajax('JCommentsShowForm',arguments);},showEdit:function(id,n,e,h,t,txt){var jc=this;if(this.form==null){window.setTimeout(function(){jc.showEdit(id,n,e,h,t,txt);},500);return;}
if((!this.cache[id])||(this.cache[id]=='')){this.cache[id]=this.$('comment-body-'+id).innerHTML;}
this.busy.stop();var f=this.form,ff=this.form.form,c=this.$('comment-item-'+id);if(ff!=null&&c!=null){f.add('id','comment-id-hidden-'+id,id);f.setText('name',n);f.setText('email',e);f.setText('homepage',h);f.setText('title',t);f.setText('comment',txt);var d=this.$('comments-inline-edit');if(d){d.parentNode.removeChild(d);}else{d=this.createElement('div','comments-inline-edit','comments-inline-edit');}c.appendChild(d);this.moveElement(ff,d);this.setMode('edit',id);var te=this.$('comment-toolbar-'+id);if(te){te.style.display='none';}
this.scrollTo('comments-inline-edit');this.form.focus('comment');}},showReply:function(id,q){this.busyComment(id);this.cancelReport();var jc=this,c=this.$('comment-item-'+id),d=this.$('comments-inline-edit');if(d){d.parentNode.removeChild(d);}else{d=this.createElement('div','comments-inline-edit','comments-inline-edit');}c.appendChild(d);if(!this.form){var t='comments-inline-edit',h=this.$('comments-form-link');if(h){t='comments-form-link';}
this.showForm(this.oi,this.og,t);var pid=id;this.formLoaded=function(){var f=jc.form;if(f!=null){f.add('parent','comment-parent-id-hidden',pid);}jc.setMode('reply',pid);jc.moveElement(jc.form.form,jc.$('comments-inline-edit'));jc.form.focus();if(q){jc.quoteComment(id);}};}else{var f=this.form,ff=this.form.form,p=this.$('comment-parent-id-hidden');if(ff!=null&&c!=null){if(!p){f.add('parent','comment-parent-id-hidden',id);}else{p.value=id;}this.moveElement(ff,d);this.setMode('reply',id);this.form.focus();if(q){this.quoteComment(id);}}}},formLoaded:function(){},restoreForm:function(c){var f=this.form;if(f!=null){var ff=this.form.form,jc=this;this.busy.stop();if(ff!=null){if(c){f.clear(null);}f.restoreValues();var a=this.$('addcomments'),p=this.$('comment-parent-id-hidden');if(p){p.value=0;}
this.moveElement(ff,a.parentNode,a);var d=this.$('comments-inline-edit');if(d){d.parentNode.removeChild(d);}this.setMode('add',null);}}},reportComment:function(id){this.busyComment(id);this.cancelReply();var jc=this,c=this.$('comment-item-'+id),d=this.$('comments-inline-report');if(d){d.parentNode.removeChild(d);}else{d=this.createElement('div','comments-inline-report','comments-inline-report');}c.appendChild(d);var a=new Array(id,'comments-inline-report');return this.ajax('JCommentsShowReportForm',a);},saveReport:function(i){this.ajax('JCommentsReportComment',null,'comments-report-form');return true;},cancelReport:function(){var d=this.$('comments-inline-report');if(d){d.innerHTML='';}},closeReport:function(m){this.cancelReport();this.showMessage(m,'info','comments-inline-report');},error:function(m,t,n){if(this.form!=null){this.form.error(n);}if(!t||t==''){t=this.form_id;}this.showMessage(m,'error',t);},message:function(m,t){if(!t||t==''){t=this.form_id;}this.showMessage(m,'info',t);},showMessage:function(m,c,t){clearTimeout(this.fadeTimer);var fe=this.$('comments-form-message');var af=this.$(t);if(fe){fe.parentNode.removeChild(fe);}fe=JComments.prototype.createElement('div','comments-form-message','');if(af){JComments.prototype.moveElement(fe,af,af.firstChild);}else{alert(m);return;}
if(!c){c='info';}fe.className='comments-form-message-'+c;fe.innerHTML=m;fe.style.display='block';JComments.prototype.setOpacity(fe.id,100);this.fadeTimer=setTimeout(function(){JComments.prototype.fade('comments-form-message',100,0,1000);},6000);},subscribe:function(o,g){return this.ajax('JCommentsSubscribe',arguments);},unsubscribe:function(o,g){return this.ajax('JCommentsUnsubscribe',arguments);},updateSubscription:function(m,t){var e=this.$('comments-subscription');if(e){var jc=this;e.innerHTML=t;e.onclick=m?function(){jc.unsubscribe(jc.oi,jc.og);return false;}:function(){jc.subscribe(jc.oi,jc.og);return false;};e.blur();}},go:function(l){window.open(l);return false;}};

/* ajax.js */

if(!window.jtajax){function jtAJAX()
{this.options={url:'',type:'post',nocache:true,data:''};this.$=function(id){if(!id){return null;}var o=document.getElementById(id);if(!o&&document.all){o=document.all[id];}return o;};this.extend=function(o,e){for(var k in(e||{}))o[k]=e[k];return o;};this.encode=function(t){return encodeURIComponent(t);};this.setup=function(options){this.options=this.extend(this.options,options);};this.xhr=function()
{var xhr=null;if('undefined'!=typeof XMLHttpRequest)xhr=new XMLHttpRequest();if(!xhr&&'undefined'!=typeof ActiveXObject){var msxmlhttp=new Array('Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP');for(var i=0;i<msxmlhttp.length;i++){try{xhr=new ActiveXObject(msxmlhttp[i]);}catch(e){xhr=null;}}}
return xhr;};this.form2query=function(sId)
{var frm=this.$(sId);if(frm&&frm.tagName.toUpperCase()=='FORM'){var e=frm.elements,query=[];for(var i=0;i<e.length;i++){var name=e[i].name,value;if(!name)continue;if(e[i].type&&('radio'==e[i].type||'checkbox'==e[i].type)&&false===e[i].checked)continue;if('select-multiple'==e[i].type){for(var j=0;j<e[i].length;j++){if(true===e[i].options[j].selected)
query.push(name+"="+this.encode(e[i].options[j].value));}}else{query.push(name+"="+this.encode(e[i].value));}}
return query.join('&');}
return'';};this.startLoading=function(){};this.finishLoading=function(){};this.ajax=function(options)
{var xhr=this.xhr();if(!xhr)return false;var o=this.extend(this.options,options);var url=o.url,jtx=this;var r=url;var h=location.hostname,d,i1,i2;i1=r.indexOf('://');if(i1!=-1){i2=r.indexOf('/',i1+3);if(i2!=-1){d=r.substring(i1+3,i2);if(d!=h){if(location.port!=''){h=h+':'+location.port;}r=r.replace(d,h);url=r;}}}
if('get'==o.type){if(true===o.nocache){var ts=new Date().getTime();url+=(url.indexOf("?")==-1?'?':'&')+'_jtxr_'+ts;}
if(o.data){url+=(url.indexOf("?")==-1?'?':'&')+o.data;o.data=null;}}
xhr.open(o.type.toUpperCase(),url,true);if('post'==o.type)
try{xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}catch(e){}
if(true===o.nocache)
xhr.setRequestHeader('If-Modified-Since','Thu, 01 Jan 1970 00:00:00 GMT');xhr.onreadystatechange=function(){if(xhr.readyState!=4)return;jtx.finishLoading();if(xhr.status==200){jtx.processResponse(xhr.responseText);}
delete xhr;xhr=null;};try{jtx.startLoading();xhr.send(o.data);}catch(e){jtx.finishLoading();}
delete jtx;delete xhr;delete o;return true;};this.call=function(sFunction,aArgs,sType,sForm)
{var params='jtxf='+this.encode(sFunction);if(aArgs){for(var i=0;i<aArgs.length;i++){params+='&jtxa[]='+this.encode(aArgs[i]);}}else if(sForm){params+='&'+this.form2query(sForm);}
this.ajax({type:sType,data:params});return true;};this.processResponse=function(sText)
{if(sText==='')return false;if(sText.substring(0,3)!='[ {'){var idx=sText.indexOf('[ {');sText=sText.substr(idx);}
var result;try{result=eval(sText);}catch(e){}
if('undefined'==typeof result){return false;}
var cmd,id,property,data,obj=null;for(var i=0;i<result.length;i++){cmd=result[i]['n'];id=result[i]['t'];property=result[i]['p'];data=result[i]['d'];obj=this.$(id);switch(cmd){case'as':if(obj){eval("obj."+property+"=data;");}break;case'al':if(data){alert(data);}break;case'js':if(data){eval(data);}break;default:this.error('Unknown command: '+cmd);break;}}
delete result;delete cmd;delete id;delete property;delete data;delete obj;return true;};this.error=function(){};}
var jtajax=new jtAJAX();}

/* caption.js */

var JCaption=new Class({initialize:function(selector)
{this.selector=selector;var images=$$(selector);images.each(function(image){this.createCaption(image);},this);},createCaption:function(element)
{var caption=document.createTextNode(element.title);var container=document.createElement("div");var text=document.createElement("p");var width=element.getAttribute("width");var align=element.getAttribute("align");if(!width){width=element.width;}
if(!align)
align=element.getStyle("float");if(!align)
align=element.style.styleFloat;if(align==""){align="none";}
text.appendChild(caption);text.className=this.selector.replace('.','_');element.parentNode.insertBefore(container,element);container.appendChild(element);if(element.title!=""){container.appendChild(text);}
container.className=this.selector.replace('.','_');container.className=container.className+" "+align;container.setAttribute("style","float:"+align);container.style.width=width+"px";}});document.caption=null;window.addEvent('load',function(){var caption=new JCaption('img.caption')
document.caption=caption});

/* engine.portal.mode.1.js */

window.addEvent("load",function(){$$('.nsp_main_portal_mode1').each(function(module){var id=module.getProperty('id');var $G=$Gavick[id];var current_art=0;var arts=module.getElements('.nsp_art');var auto_anim=module.hasClass('autoanim');var anim_speed=$G['animation_speed'];var anim_interval=$G['animation_interval'];var animation=false;var scrollWrap=module.getElement('.nsp_arts');var scroller=new Fx.Scroll(scrollWrap,{duration:anim_speed,wheelStops:false});var dimensions=scrollWrap.getSize();var startItem=0;var sizeWrap=scrollWrap.getCoordinates();scroller.scrollTo(0,0);if(arts.length>0&&dimensions.scrollSize.y>dimensions.size.y){var found=false;for(var i=0;i<arts.length&&!found;i++){var size=arts[i].getCoordinates();if((size.top-sizeWrap.top)+size.height-10>dimensions.size.y){found=i;}}
start_item=found;}
if(module.getElement('.nsp_top_interface .prev')){module.getElement('.nsp_top_interface .prev').addEvent('click',function(){animation=true;if(current_art==0){current_art=arts.length-1;}else{current_art--;}
if(current_art>0){var to=arts[current_art].getCoordinates();scroller.scrollTo(0,Math.abs(sizeWrap.height-((to.top-sizeWrap.top)+to.height)));}else{scroller.scrollTo(0,dimensions.scrollSize.y);}});}
if(module.getElement('.nsp_top_interface .next')){module.getElement('.nsp_top_interface .next').addEvent('click',function(){animation=true;if(current_art==0){current_art=start_item;}else{if(current_art<arts.length-1){current_art++;}else{current_art=0;}}
if(current_art>0){var to=arts[current_art].getCoordinates();scroller.scrollTo(0,Math.abs(sizeWrap.height-((to.top-sizeWrap.top)+to.height)));}else{scroller.scrollTo(0,0);}});}
if(auto_anim){(function(){if(!animation)module.getElement('.nsp_top_interface .next').fireEvent("click");else animation=false;}).periodical($G['animation_interval']/2);}});});

/* engine-mootools-12.js */

window.addEvent("load",function(){(function(){$$('.nsp_main').each(function(module){var id=module.getProperty('id');var $G=$Gavick[id];var arts_actual=0;var list_actual=0;var arts_block_width=module.getElement('.nsp_arts')?module.getElement('.nsp_arts').getSize().x:null;var links_block_width=module.getElement('.nsp_links ul')?module.getElement('.nsp_links ul').getSize().x:null;var arts=module.getElements('.nsp_art');var links=module.getElements('.nsp_links .list li');var arts_per_page=$G['news_column']*$G['news_rows'];var pages_amount=Math.ceil(arts.length/arts_per_page);var links_pages_amount=Math.ceil(Math.ceil(links.length/$G['links_amount'])/$G['links_columns_amount']);var auto_anim=module.hasClass('autoanim');var hover_anim=module.hasClass('hover');var anim_speed=$G['animation_speed'];var anim_interval=$G['animation_interval'];var animation=true;if(arts.length>0){for(var i=0;i<pages_amount;i++){var div=new Element('div',{"class":"nsp_art_page"});div.setStyles({"width":arts_block_width+"px","float":"left"});div.injectBefore(arts[0]);}
var j=0;for(var i=0;i<arts.length;i++){if(i%arts_per_page==0&&i!=0){j++;}
if(Browser.Engine.trident)arts[i].setStyle('width',(arts[i].getStyle('width').toInt()-0.2)+"%");arts[i].injectInside(module.getElements('.nsp_art_page')[j]);if(arts[i].hasClass('unvisible'))arts[i].removeClass('unvisible');}
var main_scroll=new Element('div',{"class":"nsp_art_scroll1"});main_scroll.setStyles({"width":arts_block_width+"px","overflow":"hidden"});main_scroll.innerHTML='<div class="nsp_art_scroll2"></div>';main_scroll.injectBefore(module.getElement('.nsp_art_page'));var long_scroll=module.getElement('.nsp_art_scroll2');long_scroll.setStyle('width','100000px');module.getElements('.nsp_art_page').injectInside(long_scroll);var art_scroller=new Fx.Scroll(main_scroll,{duration:$G['animation_speed'],wait:false,wheelStops:false});}
if(links.length>0){for(var i=0;i<links_pages_amount*$G['links_columns_amount'];i++){var ul=new Element('ul');ul.setStyles({"width":Math.floor(links_block_width/$G['links_columns_amount'])+"px","float":"left"});ul.setProperty("class","list");ul.injectTop(module.getElement('.nsp_links'));}
var k=0;for(var i=0;i<links.length;i++){if(i%$G['links_amount']==0&&i!=0){k++;}
links[i].injectInside(module.getElements('.nsp_links ul.list')[k]);if(links[i].hasClass('unvisible'))links[i].removeClass('unvisible');}
module.getElements('.nsp_links ul.list')[module.getElements('.nsp_links ul.list').length-1].dispose();var link_scroll=new Element('div',{"class":"nsp_link_scroll1"});link_scroll.setStyles({"width":links_block_width+"px","overflow":"hidden"});link_scroll.innerHTML='<div class="nsp_link_scroll2"></div>';link_scroll.injectTop(module.getElement('.nsp_links'));var long_link_scroll=module.getElement('.nsp_link_scroll2');long_link_scroll.setStyle('width','100000px');module.getElements('.nsp_links ul.list').injectInside(long_link_scroll);var link_scroller=new Fx.Scroll(link_scroll,{duration:$G['animation_speed'],wait:false,wheelStops:false});}
nsp_art_list(0,module,'top');nsp_art_list(0,module,'bottom');nsp_art_counter(0,module,'top',pages_amount);nsp_art_counter(0,module,'bottom',links_pages_amount);if(module.getElement('.nsp_top_interface .pagination')){module.getElement('.nsp_top_interface .pagination').getElements('li').each(function(item,i){item.addEvent(hover_anim?'mouseenter':'click',function(){art_scroller.start(i*arts_block_width,0);arts_actual=i;if(Browser.Engine.presto){new Fx.Tween(module.getElements('.nsp_art_scroll2')[0],{duration:$G['animation_speed'],wait:false}).start('margin-left',-1*arts_actual*arts_block_width);}
nsp_art_list(i,module,'top');nsp_art_counter(i,module,'top',pages_amount);animation=false;(function(){animation=true;}).delay($G['animation_interval']*0.8);});});}
if(module.getElement('.nsp_top_interface .prev')){module.getElement('.nsp_top_interface .prev').addEvent("click",function(){if(arts_actual==0)arts_actual=pages_amount-1;else arts_actual--;art_scroller.start(arts_actual*arts_block_width,0);if(Browser.Engine.presto){new Fx.Tween(module.getElements('.nsp_art_scroll2')[0],{duration:$G['animation_speed'],wait:false}).start('margin-left',-1*arts_actual*arts_block_width);}
nsp_art_list(arts_actual,module,'top');nsp_art_counter(arts_actual,module,'top',pages_amount);animation=false;(function(){animation=true;}).delay($G['animation_interval']*0.8);});}
if(module.getElement('.nsp_top_interface .next')){module.getElement('.nsp_top_interface .next').addEvent("click",function(){if(arts_actual==pages_amount-1)arts_actual=0;else arts_actual++;art_scroller.start(arts_actual*arts_block_width,0);if(Browser.Engine.presto){new Fx.Tween(module.getElements('.nsp_art_scroll2')[0],{duration:$G['animation_speed'],wait:false}).start('margin-left',-1*arts_actual*arts_block_width);}
nsp_art_list(arts_actual,module,'top');nsp_art_counter(arts_actual,module,'top',pages_amount);animation=false;(function(){animation=true;}).delay($G['animation_interval']*0.8);});}
if(module.getElement('.nsp_bottom_interface .pagination')){module.getElement('.nsp_bottom_interface .pagination').getElements('li').each(function(item,i){item.addEvent(hover_anim?'mouseenter':'click',function(){link_scroller.start(i*links_block_width,0);list_actual=i;if(Browser.Engine.presto){new Fx.Tween(module.getElements('.nsp_link_scroll2')[0],{duration:$G['animation_speed'],wait:false}).start('margin-left',-1*list_actual*links_block_width);}
nsp_art_list(i,module,'bottom',links_pages_amount);});});}
if(module.getElement('.nsp_bottom_interface .prev')){module.getElement('.nsp_bottom_interface .prev').addEvent("click",function(){if(list_actual==0)list_actual=links_pages_amount-1;else list_actual--;link_scroller.start(list_actual*links_block_width,0);if(Browser.Engine.presto){new Fx.Tween(module.getElements('.nsp_link_scroll2')[0],{duration:$G['animation_speed'],wait:false}).start('margin-left',-1*list_actual*links_block_width);}
nsp_art_list(list_actual,module,'bottom',links_pages_amount);nsp_art_counter(list_actual,module,'bottom',links_pages_amount);});}
if(module.getElement('.nsp_bottom_interface .next')){module.getElement('.nsp_bottom_interface .next').addEvent("click",function(){if(list_actual==links_pages_amount-1)list_actual=0;else list_actual++;link_scroller.start(list_actual*links_block_width,0);if(Browser.Engine.presto){new Fx.Tween(module.getElements('.nsp_link_scroll2')[0],{duration:$G['animation_speed'],wait:false}).start('margin-left',-1*list_actual*links_block_width);}
nsp_art_list(list_actual,module,'bottom',links_pages_amount);nsp_art_counter(list_actual,module,'bottom',links_pages_amount);});}
if(auto_anim){(function(){if(module.getElement('.nsp_top_interface .next')){if(animation)module.getElement('.nsp_top_interface .next').fireEvent("click");}else{if(arts_actual==pages_amount-1)arts_actual=0;else arts_actual++;art_scroller.start(arts_actual*arts_block_width,0);if(Browser.Engine.presto){new Fx.Tween(module.getElements('.nsp_art_scroll2')[0],{duration:$G['animation_speed'],wait:false}).start('margin-left',-1*arts_actual*arts_block_width);}
nsp_art_list(arts_actual,module,'top');nsp_art_counter(arts_actual,module,'top',pages_amount);}}).periodical($G['animation_interval']);}});}).delay(500);function nsp_art_list(i,module,position){if(module.getElement('.nsp_'+position+'_interface .pagination')){module.getElement('.nsp_'+position+'_interface .pagination').getElements('li').setProperty('class','');module.getElement('.nsp_'+position+'_interface .pagination').getElements('li')[i].setProperty('class','active');}}
function nsp_art_counter(i,module,position,num){if(module.getElement('.nsp_'+position+'_interface .counter')){module.getElement('.nsp_'+position+'_interface .counter span').innerHTML=(i+1)+' / '+num;}}});

/* script.js */

JANewSticker=new Class({initialize:function(_options){this.options=$extend({modes:{horizontal:['left','width'],horizontal_right:['left','width'],verticald:['top','height'],vertical:['top','height']},size:240,mode:'horizontal',buttonEvent:'click',handlerEvent:'click',interval:5000,autoRun:true,previousIndex:null,nextIndex:null,currentIndex:0,startItem:0,onRunning:null},_options||{});this.fx=new Array();this.fx2=new Array();if(this.options.mode=='horizontal_stripe'){}else{this.onRunning=this.options.onRunning;if(isNaN(this.options.startItem)||(this.options.startItem>this.options.items.length||this.options.startItem<0)){this.options.startItem=0;}
var maxWidth=0;this.options.items.each(function(_item,index){_item.setStyle('z-index',this.options.items.length-index);_item.setStyle('width',_item.offsetWidth);if(_item.offsetWidth>maxWidth){maxWidth=_item.offsetWidth;}
this.fx2[index]=new Fx.Style(_item,'opacity',_options.fxOptions);this.fx2[index].offsetWidth=_item.offsetWidth;if(index!=this.options.startItem)this.fx2[index].hide();if(this.options.mode!='opacity'){this.fx[index]=new Fx.Style(_item,this.options.modes[this.options.mode][0],_options.fxOptions||{duration:500,wait:false});}}.bind(this));if(this.options.box.offsetWidth<=0){this.options.box.setStyle('width',maxWidth);}
if(this.options.mode=='vertical'||this.options.mode=='verticald'){this.options.size=this.options.box.offsetHeight;}else{this.options.size=this.options.box.offsetWidth;}
this.buttons={previous:[],next:[],play:[],playback:[],stop:[]};this.options.autoRun=true;if(_options.buttons){for(var action in _options.buttons){this.bindingButtonsEvent(action,$type(_options.buttons[action])=='array'?_options.buttons[action]:[_options.buttons[action]]);}}
if(this.options.autoRun){this.play(this.options.interval,'next',true);}
var wrapper2=this.options.wrapper;wrapper2.addEvent("mouseenter",function(){this.stop();}.bind(this));wrapper2.addEvent("mouseleave",function(){this.play(this.options.interval,'next',true);}.bind(this));}},previous:function(manual){this.options.currentIndex+=this.options.currentIndex>0?-1:this.options.items.length-1;this.running(null,manual,'previous');},next:function(manual){this.options.currentIndex+=(this.options.currentIndex<this.options.items.length-1)?1:(1-this.options.items.length);this.running(null,manual,'next');},play:function(delay,direction,wait){this.stop();if(!wait){this[direction](false);}
this.options.autoRun=this[direction].periodical(delay,this,false);},stop:function(){$clear(this.options.autoRun);},running:function(item,manual,runningMode){this.options.previousIndex=this.options.currentIndex+(this.options.currentIndex>0?-1:this.options.items.length-1);this.options.nextIndex=this.options.currentIndex+(this.options.currentIndex<this.options.items.length-1?1:1-this.options.items.length);if(this.options.mode!='opacity'){var size1;var size2;if(this.options.mode=='horizontal_right'||this.options.mode=='verticald'){size1=-(this.options.size);size2=(this.options.size);}else{size1=(this.options.size);size2=-(this.options.size);}
if(runningMode=='next'){this.fx2[this.options.previousIndex].start(1,0);this.fx[this.options.previousIndex].start(0,size1);this.fx2[this.options.currentIndex].start(0,1);this.fx[this.options.currentIndex].start(+size2,0);}else if(runningMode=='previous'){this.fx2[this.options.nextIndex].start(1,0);this.fx[this.options.nextIndex].start(0,-(this.options.size));this.fx2[this.options.currentIndex].start(0,1);this.fx[this.options.currentIndex].start(+(this.options.size),0);}}else{if(runningMode=='next'){this.fx2[this.options.previousIndex].start(1,0);this.fx2[this.options.currentIndex].start(0,1);}else{this.fx2[this.options.nextIndex].start(1,0);this.fx2[this.options.currentIndex].start(0,1);}}
if(manual){this.stop();}
if(this.onRunning){this.onRunning(this.options.items[this.options.currentIndex],(this.buttons?this.buttons[this.options.currentIndex]:null));}
if(manual&&this.options.autoRun){this.play(this.options.interval,'next',true);}},bindingButtonsEvent:function(action,buttons){for(var i=0;i<buttons.length;i++){switch(action){case'previous':buttons[i].addEvent(this.options.buttonEvent,this.previous.bind(this,true));break;case'next':buttons[i].addEvent(this.options.buttonEvent,this.next.bind(this,true));break;case'play':buttons[i].addEvent(this.options.buttonEvent,this.play.bind(this,[this.options.interval,'next',false]));break;case'playback':buttons[i].addEvent(this.options.buttonEvent,this.play.bind(this,[this.options.interval,'previous',false]));break;case'stop':buttons[i].addEvent(this.options.buttonEvent,this.stop.bind(this));break;}
this.buttons[action].push(buttons[i]);}}});


