/********************   js/jquery.js   ********************/
/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
 eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c)r[e(--c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([67]|[1-8]\\w)'};c=1};while(c)if(k[--c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(11(){14 l=6,g,y=l.3t,p=l.$,o=l.3t=l.$=11(E,F){12 2N o.fn.5z(E,F)},D=/^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-]+)$/,f=/^.[^:#\\[\\.,]*$/;o.fn=o.2a={5z:11(E,H){E=E||17;7(E.1e){6[0]=E;6.15=1;6.31=E;12 6}7(1j E==="1I"){14 G=D.2F(E);7(G&&(G[1]||!H)){7(G[1]){E=o.4C([G[1]],H)}18{14 I=17.3u(G[3]);7(I&&I.id!=G[3]){12 o().1B(E)}14 F=o(I||[]);F.31=17;F.1W=E;12 F}}18{12 o(H).1B(E)}}18{7(o.1X(E)){12 o(17).2G(E)}}7(E.1W&&E.31){6.1W=E.1W;6.31=E.31}12 6.6X(o.32(E)?E:o.2t(E))},1W:"",5A:"1.3.2",size:11(){12 6.15},33:11(E){12 E===g?2u.2a.1Y.1q(6):6[E]},2v:11(F,H,E){14 G=o(F);G.5B=6;G.31=6.31;7(H==="1B"){G.1W=6.1W+(6.1W?" ":"")+E}18{7(H){G.1W=6.1W+"."+H+"("+E+")"}}12 G},6X:11(E){6.15=0;2u.2a.1r.1C(6,E);12 6},1f:11(F,E){12 o.1f(6,F,E)},5C:11(E){12 o.2O(E&&E.5A?E[0]:E,6)},2g:11(F,H,G){14 E=F;7(1j F==="1I"){7(H===g){12 6[0]&&o[G||"2g"](6[0],F)}18{E={};E[F]=H}}12 6.1f(11(I){1a(F in E){o.2g(G?6.1g:6,F,o.1D(6,E[F],G,I,F))}})},2b:11(E,F){7((E=="2h"||E=="2w")&&2P(F)<0){F=g}12 6.2g(E,F,"2o")},1J:11(F){7(1j F!=="24"&&F!=1b){12 6.4D().3v((6[0]&&6[0].1F||17).4E(F))}14 E="";o.1f(F||6,11(){o.1f(6.34,11(){7(6.1e!=8){E+=6.1e!=1?6.4F:o.fn.1J([6])}})});12 E},5D:11(E){7(6[0]){14 F=o(E,6[0].1F).5E();7(6[0].1o){F.2x(6[0])}F.2p(11(){14 G=6;1A(G.1s){G=G.1s}12 G}).3v(6)}12 6},wrapInner:11(E){12 6.1f(11(){o(6).6Y().5D(E)})},wrap:11(E){12 6.1f(11(){o(6).5D(E)})},3v:11(){12 6.40(1t,19,11(E){7(6.1e==1){6.2H(E)}})},6Z:11(){12 6.40(1t,19,11(E){7(6.1e==1){6.2x(E,6.1s)}})},70:11(){12 6.40(1t,1c,11(E){6.1o.2x(E,6)})},5F:11(){12 6.40(1t,1c,11(E){6.1o.2x(E,6.35)})},4G:11(){12 6.5B||o([])},1r:[].1r,36:[].36,37:[].37,1B:11(E){7(6.15===1){14 F=6.2v([],"1B",E);F.15=0;o.1B(E,6[0],F);12 F}18{12 6.2v(o.4H(o.2p(6,11(G){12 o.1B(E,G)})),"1B",E)}},5E:11(G){14 E=6.2p(11(){7(!o.1Q.5G&&!o.4I(6)){14 I=6.outerHTML;7(!I){14 J=6.1F.1Z("1G");J.2H(6.4J(19));I=J.2y}12 o.4C([I.1u(/ 3t\\d+="(?:\\d+|1b)"/g,"").1u(/^\\s*/,"")])[0]}18{12 6.4J(19)}});7(G===19){14 H=6.1B("*").5H(),F=0;E.1B("*").5H().1f(11(){7(6.1p!==H[F].1p){12}14 I=o.1d(H[F],"2z");1a(14 K in I){1a(14 J in I[K]){o.1h.2c(6,K,I[K][J],I[K][J].1d)}}F++})}12 E},1v:11(E){12 6.2v(o.1X(E)&&o.41(6,11(G,F){12 E.1q(G,F)})||o.3w(E,o.41(6,11(F){12 F.1e===1})),"1v",E)},42:11(E){14 G=o.38.1m.3x.1l(E)?o(E):1b,F=0;12 6.2p(11(){14 H=6;1A(H&&H.1F){7(G?G.5C(H)>-1:o(H).is(E)){o.1d(H,"42",F);12 H}H=H.1o;F++}})},44:11(E){7(1j E==="1I"){7(f.1l(E)){12 6.2v(o.3w(E,6,19),"44",E)}18{E=o.3w(E,6)}}14 F=E.15&&E[E.15-1]!==g&&!E.1e;12 6.1v(11(){12 F?o.2O(6,E)<0:6!=E})},2c:11(E){12 6.2v(o.4H(o.5I(6.33(),1j E==="1I"?o(E):o.2t(E))))},is:11(E){12!!E&&o.3w(E,6).15>0},hasClass:11(E){12!!E&&6.is("."+E)},5J:11(K){7(K===g){14 E=6[0];7(E){7(o.1p(E,"4K")){12(E.attributes.2A||{}).71?E.2A:E.1J}7(o.1p(E,"2q")){14 I=E.4L,L=[],M=E.1x,H=E.1i=="2q-5K";7(I<0){12 1b}1a(14 F=H?I:0,J=H?I+1:M.15;F<J;F++){14 G=M[F];7(G.45){K=o(G).5J();7(H){12 K}L.1r(K)}}12 L}12(E.2A||"").1u(/\\r/g,"")}12 g}7(1j K==="46"){K+=""}12 6.1f(11(){7(6.1e!=1){12}7(o.32(K)&&/5L|5M/.1l(6.1i)){6.4M=(o.2O(6.2A,K)>=0||o.2O(6.2B,K)>=0)}18{7(o.1p(6,"2q")){14 N=o.2t(K);o("4K",6).1f(11(){6.45=(o.2O(6.2A,N)>=0||o.2O(6.1J,N)>=0)});7(!N.15){6.4L=-1}}18{6.2A=K}}})},39:11(E){12 E===g?(6[0]?6[0].2y.1u(/ 3t\\d+="(?:\\d+|1b)"/g,""):1b):6.4D().3v(E)},72:11(E){12 6.5F(E).25()},eq:11(E){12 6.1Y(E,+E+1)},1Y:11(){12 6.2v(2u.2a.1Y.1C(6,1t),"1Y",2u.2a.1Y.1q(1t).3a(","))},2p:11(E){12 6.2v(o.2p(6,11(G,F){12 E.1q(G,F,G)}))},5H:11(){12 6.2c(6.5B)},40:11(J,M,L){7(6[0]){14 I=(6[0].1F||6[0]).createDocumentFragment(),F=o.4C(J,(6[0].1F||6[0]),I),H=I.1s;7(H){1a(14 G=0,E=6.15;G<E;G++){L.1q(K(6[G],H),6.15>1||G>0?I.4J(19):I)}}7(F){o.1f(F,z)}}12 6;11 K(N,O){12 M&&o.1p(N,"21")&&o.1p(O,"tr")?(N.26("27")[0]||N.2H(N.1F.1Z("27"))):N}}};o.fn.5z.2a=o.fn;11 z(E,F){7(F.4N){o.47({1y:F.4N,3b:1c,28:"1R"})}18{o.5O(F.1J||F.73||F.2y||"")}7(F.1o){F.1o.2i(F)}}11 e(){12+2N 5P}o.1H=o.fn.1H=11(){14 J=1t[0]||{},H=1,I=1t.15,E=1c,G;7(1j J==="5Q"){E=J;J=1t[1]||{};H=2}7(1j J!=="24"&&!o.1X(J)){J={}}7(I==H){J=6;--H}1a(;H<I;H++){7((G=1t[H])!=1b){1a(14 F in G){14 K=J[F],L=G[F];7(J===L){74}7(E&&L&&1j L==="24"&&!L.1e){J[F]=o.1H(E,K||(L.15!=1b?[]:{}),L)}18{7(L!==g){J[F]=L}}}}}12 J};14 b=/z-?5C|font-?weight|1K|75|line-?2w/i,q=17.76||{},s=77.2a.4O;o.1H({noConflict:11(E){l.$=p;7(E){l.3t=y}12 o},1X:11(E){12 s.1q(E)==="[24 Function]"},32:11(E){12 s.1q(E)==="[24 2u]"},4I:11(E){12 E.1e===9&&E.1E.1p!=="78"||!!E.1F&&o.4I(E.1F)},5O:11(G){7(G&&/\\S/.1l(G)){14 F=17.26("79")[0]||17.1E,E=17.1Z("1R");E.1i="1J/3z";7(o.1Q.5R){E.2H(17.4E(G))}18{E.1J=G}F.2x(E,F.1s);F.2i(E)}},1p:11(F,E){12 F.1p&&F.1p.2r()==E.2r()},1f:11(G,K,F){14 E,H=0,I=G.15;7(F){7(I===g){1a(E in G){7(K.1C(G[E],F)===1c){1M}}}18{1a(;H<I;){7(K.1C(G[H++],F)===1c){1M}}}}18{7(I===g){1a(E in G){7(K.1q(G[E],E,G[E])===1c){1M}}}18{1a(14 J=G[0];H<I&&K.1q(J,H,J)!==1c;J=G[++H]){}}}12 G},1D:11(H,I,G,F,E){7(o.1X(I)){I=I.1q(H,F)}12 1j I==="46"&&G=="2o"&&!b.1l(E)?I+"px":I},1L:{2c:11(E,F){o.1f((F||"").2j(/\\s+/),11(G,H){7(E.1e==1&&!o.1L.48(E.1L,H)){E.1L+=(E.1L?" ":"")+H}})},25:11(E,F){7(E.1e==1){E.1L=F!==g?o.41(E.1L.2j(/\\s+/),11(G){12!o.1L.48(F,G)}).3a(" "):""}},48:11(F,E){12 F&&o.2O(E,(F.1L||F).4O().2j(/\\s+/))>-1}},7a:11(H,G,I){14 E={};1a(14 F in G){E[F]=H.1g[F];H.1g[F]=G[F]}I.1q(H);1a(14 F in G){H.1g[F]=E[F]}},2b:11(H,F,J,E){7(F=="2h"||F=="2w"){14 L,G={2C:"4P",7b:"2I",1N:"4Q"},K=F=="2h"?["5S","7c"]:["5T","7d"];11 I(){L=F=="2h"?H.49:H.5U;7(E==="3A"){12}o.1f(K,11(){7(!E){L-=2P(o.2o(H,"4R"+6,19))||0}7(E==="3B"){L+=2P(o.2o(H,"3B"+6,19))||0}18{L-=2P(o.2o(H,"3A"+6+"7e",19))||0}})}7(H.49!==0){I()}18{o.7a(H,G,I)}12 3d.4S(0,3d.round(L))}12 o.2o(H,F,J)},2o:11(I,F,G){14 L,E=I.1g;7(F=="1K"&&!o.1Q.1K){L=o.2g(E,"1K");12 L==""?"1":L}7(F.1m(/4a/i)){F=w}7(!G&&E&&E[F]){L=E[F]}18{7(q.4T){7(F.1m(/4a/i)){F="4a"}F=F.1u(/([A-Z])/g,"-$1").3C();14 M=q.4T(I,1b);7(M){L=M.getPropertyValue(F)}7(F=="1K"&&L==""){L="1"}}18{7(I.4U){14 J=F.1u(/\\-(\\w)/g,11(N,O){12 O.2r()});L=I.4U[F]||I.4U[J];7(!/^\\d+(px)?$/i.1l(L)&&/^\\d/.1l(L)){14 H=E.1z,K=I.5V.1z;I.5V.1z=I.4U.1z;E.1z=L||0;L=E.pixelLeft+"px";E.1z=H;I.5V.1z=K}}}}12 L},4C:11(F,K,I){K=K||17;7(1j K.1Z==="2J"){K=K.1F||K[0]&&K[0].1F||17}7(!I&&F.15===1&&1j F[0]==="1I"){14 H=/^<(\\w+)\\s*\\/?>$/.2F(F[0]);7(H){12[K.1Z(H[1])]}}14 G=[],E=[],L=K.1Z("1G");o.1f(F,11(P,S){7(1j S==="46"){S+=""}7(!S){12}7(1j S==="1I"){S=S.1u(/(<(\\w+)[^>]*?)\\/>/g,11(U,V,T){12 T.1m(/^(abbr|br|7f|img|3D|5W|meta|3E|hr|7g|embed)$/i)?U:V+"></"+T+">"});14 O=S.1u(/^\\s+/,"").substring(0,10).3C();14 Q=!O.1O("<opt")&&[1,"<2q 7h=\'7h\'>","</2q>"]||!O.1O("<leg")&&[1,"<7i>","</7i>"]||O.1m(/^<(thead|27|tfoot|colg|cap)/)&&[1,"<21>","</21>"]||!O.1O("<tr")&&[2,"<21><27>","</27></21>"]||(!O.1O("<td")||!O.1O("<th"))&&[3,"<21><27><tr>","</tr></27></21>"]||!O.1O("<7f")&&[2,"<21><27></27><7j>","</7j></21>"]||!o.1Q.7k&&[1,"1G<1G>","</1G>"]||[0,"",""];L.2y=Q[1]+S+Q[2];1A(Q[0]--){L=L.7l}7(!o.1Q.27){14 R=/<27/i.1l(S),N=!O.1O("<21")&&!R?L.1s&&L.1s.34:Q[1]=="<21>"&&!R?L.34:[];1a(14 M=N.15-1;M>=0;--M){7(o.1p(N[M],"27")&&!N[M].34.15){N[M].1o.2i(N[M])}}}7(!o.1Q.7m&&/^\\s/.1l(S)){L.2x(K.4E(S.1m(/^\\s*/)[0]),L.1s)}S=o.2t(L.34)}7(S.1e){G.1r(S)}18{G=o.5I(G,S)}});7(I){1a(14 J=0;G[J];J++){7(o.1p(G[J],"1R")&&(!G[J].1i||G[J].1i.3C()==="1J/3z")){E.1r(G[J].1o?G[J].1o.2i(G[J]):G[J])}18{7(G[J].1e===1){G.37.1C(G,[J+1,0].4V(o.2t(G[J].26("1R"))))}I.2H(G[J])}}12 E}12 G},2g:11(J,G,K){7(!J||J.1e==3||J.1e==8){12 g}14 H=!o.4I(J),L=K!==g;G=H&&o.4b[G]||G;7(J.3F){14 F=/2s|4N|1g/.1l(G);7(G=="45"&&J.1o){J.1o.4L}7(G in J&&H&&!F){7(L){7(G=="1i"&&o.1p(J,"3D")&&J.1o){4W"1i property can\'t be changed"}J[G]=K}7(o.1p(J,"5Y")&&J.3e(G)){12 J.3e(G).4F}7(G=="5Z"){14 I=J.3e("5Z");12 I&&I.71?I.2A:J.1p.1m(/(2K|3D|24|2q|60)/i)?0:J.1p.1m(/^(a|7g)$/i)&&J.2s?0:g}12 J[G]}7(!o.1Q.1g&&H&&G=="1g"){12 o.2g(J.1g,"cssText",K)}7(L){J.setAttribute(G,""+K)}14 E=!o.1Q.7n&&H&&F?J.2k(G,2):J.2k(G);12 E===1b?g:E}7(!o.1Q.1K&&G=="1K"){7(L){J.75=1;J.1v=(J.1v||"").1u(/7o\\([^)]*\\)/,"")+(2Q(K)+""=="NaN"?"":"7o(1K="+K*7p+")")}12 J.1v&&J.1v.1O("1K=")>=0?(2P(J.1v.1m(/1K=([^)]*)/)[1])/7p)+"":""}G=G.1u(/-([a-z])/ig,11(M,N){12 N.2r()});7(L){J[G]=K}12 J[G]},trim:11(E){12(E||"").1u(/^\\s+|\\s+$/g,"")},2t:11(G){14 E=[];7(G!=1b){14 F=G.15;7(F==1b||1j G==="1I"||o.1X(G)||G.4X){E[0]=G}18{1A(F){E[--F]=G[F]}}}12 E},2O:11(G,H){1a(14 E=0,F=H.15;E<F;E++){7(H[E]===G){12 E}}12-1},5I:11(H,E){14 F=0,G,I=H.15;7(!o.1Q.getAll){1A((G=E[F++])!=1b){7(G.1e!=8){H[I++]=G}}}18{1A((G=E[F++])!=1b){H[I++]=G}}12 H},4H:11(K){14 F=[],E={};22{1a(14 G=0,H=K.15;G<H;G++){14 J=o.1d(K[G]);7(!E[J]){E[J]=19;F.1r(K[G])}}}23(I){F=K}12 F},41:11(F,J,E){14 G=[];1a(14 H=0,I=F.15;H<I;H++){7(!E!=!J(F[H],H)){G.1r(F[H])}}12 G},2p:11(E,J){14 F=[];1a(14 G=0,H=E.15;G<H;G++){14 I=J(E[G],G);7(I!=1b){F[F.15]=I}}12 F.4V.1C([],F)}});14 C=navigator.userAgent.3C();o.browser={version:(C.1m(/.+(?:rv|it|ra|ie)[\\/: ]([\\d.]+)/)||[0,"0"])[1],safari:/7q/.1l(C),61:/61/.1l(C),7r:/7r/.1l(C)&&!/61/.1l(C),7s:/7s/.1l(C)&&!/(compatible|7q)/.1l(C)};o.1f({7t:11(E){12 E.1o},parents:11(E){12 o.4Y(E,"1o")},next:11(E){12 o.2R(E,2,"35")},prev:11(E){12 o.2R(E,2,"3f")},nextAll:11(E){12 o.4Y(E,"35")},prevAll:11(E){12 o.4Y(E,"3f")},siblings:11(E){12 o.62(E.1o.1s,E)},7u:11(E){12 o.62(E.1s)},6Y:11(E){12 o.1p(E,"iframe")?E.contentDocument||E.contentWindow.17:o.2t(E.34)}},11(E,F){o.fn[E]=11(G){14 H=o.2p(6,F);7(G&&1j G=="1I"){H=o.3w(G,H)}12 6.2v(o.4H(H),E,G)}});o.1f({7v:"3v",prependTo:"6Z",2x:"70",insertAfter:"5F",replaceAll:"72"},11(E,F){o.fn[E]=11(G){14 J=[],L=o(G);1a(14 K=0,H=L.15;K<H;K++){14 I=(K>0?6.5E(19):6).33();o.fn[F].1C(o(L[K]),I);J=J.4V(I)}12 6.2v(J,E,G)}});o.1f({removeAttr:11(E){o.2g(6,E,"");7(6.1e==1){6.63(E)}},addClass:11(E){o.1L.2c(6,E)},removeClass:11(E){o.1L.25(6,E)},toggleClass:11(F,E){7(1j E!=="5Q"){E=!o.1L.48(6,F)}o.1L[E?"2c":"25"](6,F)},25:11(E){7(!E||o.1v(E,[6]).15){o("*",6).2c([6]).1f(11(){o.1h.25(6);o.3g(6)});7(6.1o){6.1o.2i(6)}}},4D:11(){o(6).7u().25();1A(6.1s){6.2i(6.1s)}}},11(E,F){o.fn[E]=11(){12 6.1f(F,1t)}});11 j(E,F){12 E[0]&&2Q(o.2o(E[0],F,19),10)||0}14 h="3t"+e(),v=0,A={};o.1H({1S:{},1d:11(F,E,G){F=F==l?A:F;14 H=F[h];7(!H){H=F[h]=++v}7(E&&!o.1S[H]){o.1S[H]={}}7(G!==g){o.1S[H][E]=G}12 E?o.1S[H][E]:H},3g:11(F,E){F=F==l?A:F;14 H=F[h];7(E){7(o.1S[H]){2S o.1S[H][E];E="";1a(E in o.1S[H]){1M}7(!E){o.3g(F)}}}18{22{2S F[h]}23(G){7(F.63){F.63(h)}}2S o.1S[H]}},2D:11(F,E,H){7(F){E=(E||"fx")+"2D";14 G=o.1d(F,E);7(!G||o.32(H)){G=o.1d(F,E,o.2t(H))}18{7(H){G.1r(H)}}}12 G},4c:11(H,G){14 E=o.2D(H,G),F=E.3h();7(!G||G==="fx"){F=E[0]}7(F!==g){F.1q(H)}}});o.fn.1H({1d:11(E,G){14 H=E.2j(".");H[1]=H[1]?"."+H[1]:"";7(G===g){14 F=6.64("getData"+H[1]+"!",[H[0]]);7(F===g&&6.15){F=o.1d(6[0],E)}12 F===g&&H[1]?6.1d(H[0]):F}18{12 6.1T("setData"+H[1]+"!",[H[0],G]).1f(11(){o.1d(6,E,G)})}},3g:11(E){12 6.1f(11(){o.3g(6,E)})},2D:11(E,F){7(1j E!=="1I"){F=E;E="fx"}7(F===g){12 o.2D(6[0],E)}12 6.1f(11(){14 G=o.2D(6,E,F);7(E=="fx"&&G.15==1){G[0].1q(6)}})},4c:11(E){12 6.1f(11(){o.4c(6,E)})}});(11(){14 R=/((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^[\\]]*\\]|[\'"][^\'"]*[\'"]|[^[\\]\'"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?/g,L=0,H=77.2a.4O;14 F=11(Y,U,ab,ac){ab=ab||[];U=U||17;7(U.1e!==1&&U.1e!==9){12[]}7(!Y||1j Y!=="1I"){12 ab}14 Z=[],W,af,ai,T,ad,V,X=19;R.lastIndex=0;1A((W=R.2F(Y))!==1b){Z.1r(W[1]);7(W[2]){V=3i.rightContext;1M}}7(Z.15>1&&M.2F(Y)){7(Z.15===2&&I.2L[Z[0]]){af=J(Z[0]+Z[1],U)}18{af=I.2L[Z[0]]?[U]:F(Z.3h(),U);1A(Z.15){Y=Z.3h();7(I.2L[Y]){Y+=Z.3h()}af=J(Y,af)}}}18{14 ae=ac?{38:Z.4Z(),65:E(ac)}:F.1B(Z.4Z(),Z.15===1&&U.1o?U.1o:U,Q(U));af=F.1v(ae.38,ae.65);7(Z.15>0){ai=E(af)}18{X=1c}1A(Z.15){14 ah=Z.4Z(),ag=ah;7(!I.2L[ah]){ah=""}18{ag=Z.4Z()}7(ag==1b){ag=U}I.2L[ah](ai,ag,Q(U))}}7(!ai){ai=af}7(!ai){4W"7w 3G, 7x 7y: "+(ah||Y)}7(H.1q(ai)==="[24 2u]"){7(!X){ab.1r.1C(ab,ai)}18{7(U.1e===1){1a(14 aa=0;ai[aa]!=1b;aa++){7(ai[aa]&&(ai[aa]===19||ai[aa].1e===1&&K(U,ai[aa]))){ab.1r(af[aa])}}}18{1a(14 aa=0;ai[aa]!=1b;aa++){7(ai[aa]&&ai[aa].1e===1){ab.1r(af[aa])}}}}}18{E(ai,ab)}7(V){F(V,U,ab,ac);7(G){4d=1c;ab.36(G);7(4d){1a(14 aa=1;aa<ab.15;aa++){7(ab[aa]===ab[aa-1]){ab.37(aa--,1)}}}}}12 ab};F.50=11(T,U){12 F(T,1b,1b,U)};F.1B=11(aa,T,ab){14 Z,X;7(!aa){12[]}1a(14 W=0,V=I.51.15;W<V;W++){14 Y=I.51[W],X;7((X=I.1m[Y].2F(aa))){14 U=3i.leftContext;7(U.66(U.15-1)!=="\\\\"){X[1]=(X[1]||"").1u(/\\\\/g,"");Z=I.1B[Y](X,T,ab);7(Z!=1b){aa=aa.1u(I.1m[Y],"");1M}}}}7(!Z){Z=T.26("*")}12{65:Z,38:aa}};F.1v=11(ad,ac,ag,W){14 V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);1A(ad&&ac.15){1a(14 ab in I.1v){7((Y=I.1m[ab].2F(ad))!=1b){14 U=I.1v[ab],ah,af;T=1c;7(aa==ai){ai=[]}7(I.67[ab]){Y=I.67[ab](Y,aa,ag,ai,W,Z);7(!Y){T=ah=19}18{7(Y===19){74}}}7(Y){1a(14 X=0;(af=aa[X])!=1b;X++){7(af){ah=U(af,Y,X,aa);14 ae=W^!!ah;7(ag&&ah!=1b){7(ae){T=19}18{aa[X]=1c}}18{7(ae){ai.1r(af);T=19}}}}}7(ah!==g){7(!ag){aa=ai}ad=ad.1u(I.1m[ab],"");7(!T){12[]}1M}}}7(ad==V){7(T==1b){4W"7w 3G, 7x 7y: "+ad}18{1M}}V=ad}12 aa};14 I=F.3j={51:["ID","68","3H"],1m:{ID:/#((?:[\\w\\3I-\\4e-]|\\\\.)+)/,4f:/\\.((?:[\\w\\3I-\\4e-]|\\\\.)+)/,68:/\\[2B=[\'"]*((?:[\\w\\3I-\\4e-]|\\\\.)+)[\'"]*\\]/,69:/\\[\\s*((?:[\\w\\3I-\\4e-]|\\\\.)+)\\s*(?:(\\S?=)\\s*([\'"]*)(.*?)\\3|)\\s*\\]/,3H:/^((?:[\\w\\3I-\\uFFFF\\*_-]|\\\\.)+)/,52:/:(7z|2R|53|4g)-child(?:\\((54|55|[\\dn+-]*)\\))?/,3x:/:(2R|eq|gt|lt|4g|53|54|55)(?:\\((\\d*)\\))?(?=[^-]|$)/,4h:/:((?:[\\w\\3I-\\4e-]|\\\\.)+)(?:\\(([\'"]*)((?:\\([^\\)]+\\)|[^\\2\\(\\)]*)+)\\2\\))?/},6a:{"3J":"1L","1a":"7C"},56:{2s:11(T){12 T.2k("2s")}},2L:{"+":11(aa,T,Z){14 X=1j T==="1I",ab=X&&!/\\W/.1l(T),Y=X&&!ab;7(ab&&!Z){T=T.2r()}1a(14 W=0,V=aa.15,U;W<V;W++){7((U=aa[W])){1A((U=U.3f)&&U.1e!==1){}aa[W]=Y||U&&U.1p===T?U||1c:U===T}}7(Y){F.1v(T,aa,19)}},">":11(Z,U,aa){14 X=1j U==="1I";7(X&&!/\\W/.1l(U)){U=aa?U:U.2r();1a(14 V=0,T=Z.15;V<T;V++){14 Y=Z[V];7(Y){14 W=Y.1o;Z[V]=W.1p===U?W:1c}}}18{1a(14 V=0,T=Z.15;V<T;V++){14 Y=Z[V];7(Y){Z[V]=X?Y.1o:Y.1o===U}}7(X){F.1v(U,Z,19)}}},"":11(W,U,Y){14 V=L++,T=S;7(!U.1m(/\\W/)){14 X=U=Y?U:U.2r();T=P}T("1o",U,V,W,X,Y)},"~":11(W,U,Y){14 V=L++,T=S;7(1j U==="1I"&&!U.1m(/\\W/)){14 X=U=Y?U:U.2r();T=P}T("3f",U,V,W,X,Y)}},1B:{ID:11(U,V,W){7(1j V.3u!=="2J"&&!W){14 T=V.3u(U[1]);12 T?[T]:[]}},68:11(V,Y,Z){7(1j Y.7D!=="2J"){14 U=[],X=Y.7D(V[1]);1a(14 W=0,T=X.15;W<T;W++){7(X[W].2k("2B")===V[1]){U.1r(X[W])}}12 U.15===0?1b:U}},3H:11(T,U){12 U.26(T[1])}},67:{4f:11(W,U,V,T,Z,aa){W=" "+W[1].1u(/\\\\/g,"")+" ";7(aa){12 W}1a(14 X=0,Y;(Y=U[X])!=1b;X++){7(Y){7(Z^(Y.1L&&(" "+Y.1L+" ").1O(W)>=0)){7(!V){T.1r(Y)}}18{7(V){U[X]=1c}}}}12 1c},ID:11(T){12 T[1].1u(/\\\\/g,"")},3H:11(U,T){1a(14 V=0;T[V]===1c;V++){}12 T[V]&&Q(T[V])?U[1]:U[1].2r()},52:11(T){7(T[1]=="2R"){14 U=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2F(T[2]=="54"&&"2n"||T[2]=="55"&&"2n+1"||!/\\D/.1l(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;12 T},69:11(X,U,V,T,Y,Z){14 W=X[1].1u(/\\\\/g,"");7(!Z&&I.6a[W]){X[1]=I.6a[W]}7(X[2]==="~="){X[4]=" "+X[4]+" "}12 X},4h:11(X,U,V,T,Y){7(X[1]==="44"){7(X[3].1m(R).15>1||/^\\w/.1l(X[3])){X[3]=F(X[3],1b,1b,U)}18{14 W=F.1v(X[3],U,V,19^Y);7(!V){T.1r.1C(T,W)}12 1c}}18{7(I.1m.3x.1l(X[0])||I.1m.52.1l(X[0])){12 19}}12 X},3x:11(T){T.7E(19);12 T}},3K:{enabled:11(T){12 T.57===1c&&T.1i!=="2I"},57:11(T){12 T.57===19},4M:11(T){12 T.4M===19},45:11(T){T.1o.4L;12 T.45===19},7t:11(T){12!!T.1s},4D:11(T){12!T.1s},48:11(V,U,T){12!!F(T[3],V).15},header:11(T){12/h\\d/i.1l(T.1p)},1J:11(T){12"1J"===T.1i},5L:11(T){12"5L"===T.1i},5M:11(T){12"5M"===T.1i},6b:11(T){12"6b"===T.1i},58:11(T){12"58"===T.1i},6c:11(T){12"6c"===T.1i},7F:11(T){12"7F"===T.1i},7G:11(T){12"7G"===T.1i},2K:11(T){12"2K"===T.1i||T.1p.2r()==="BUTTON"},3D:11(T){12/3D|2q|60|2K/i.1l(T.1p)}},7H:{4g:11(U,T){12 T===0},53:11(V,U,T,W){12 U===W.15-1},54:11(U,T){12 T%2===0},55:11(U,T){12 T%2===1},lt:11(V,U,T){12 U<T[3]-0},gt:11(V,U,T){12 U>T[3]-0},2R:11(V,U,T){12 T[3]-0==U},eq:11(V,U,T){12 T[3]-0==U}},1v:{4h:11(Z,V,W,aa){14 U=V[1],X=I.3K[U];7(X){12 X(Z,W,V,aa)}18{7(U==="6d"){12(Z.73||Z.innerText||"").1O(V[3])>=0}18{7(U==="44"){14 Y=V[3];1a(14 W=0,T=Y.15;W<T;W++){7(Y[W]===Z){12 1c}}12 19}}}},52:11(T,W){14 Z=W[1],U=T;switch(Z){59"7z":59"4g":1A(U=U.3f){7(U.1e===1){12 1c}}7(Z=="4g"){12 19}U=T;59"53":1A(U=U.35){7(U.1e===1){12 1c}}12 19;59"2R":14 V=W[2],ac=W[3];7(V==1&&ac==0){12 19}14 Y=W[0],ab=T.1o;7(ab&&(ab.2T!==Y||!T.6e)){14 X=0;1a(U=ab.1s;U;U=U.35){7(U.1e===1){U.6e=++X}}ab.2T=Y}14 aa=T.6e-ac;7(V==0){12 aa==0}18{12(aa%V==0&&aa/V>=0)}}},ID:11(U,T){12 U.1e===1&&U.2k("id")===T},3H:11(U,T){12(T==="*"&&U.1e===1)||U.1p===T},4f:11(U,T){12(" "+(U.1L||U.2k("3J"))+" ").1O(T)>-1},69:11(Y,W){14 V=W[1],T=I.56[V]?I.56[V](Y):Y[V]!=1b?Y[V]:Y.2k(V),Z=T+"",X=W[2],U=W[4];12 T==1b?X==="!=":X==="="?Z===U:X==="*="?Z.1O(U)>=0:X==="~="?(" "+Z+" ").1O(U)>=0:!U?Z&&T!==1c:X==="!="?Z!=U:X==="^="?Z.1O(U)===0:X==="$="?Z.66(Z.15-U.15)===U:X==="|="?Z===U||Z.66(0,U.15+1)===U+"-":1c},3x:11(X,U,V,Y){14 T=U[2],W=I.7H[T];7(W){12 W(X,V,U,Y)}}}};14 M=I.1m.3x;1a(14 O in I.1m){I.1m[O]=3i(I.1m[O].7I+/(?![^\\[]*\\])(?![^\\(]*\\))/.7I)}14 E=11(U,T){U=2u.2a.1Y.1q(U);7(T){T.1r.1C(T,U);12 T}12 U};22{2u.2a.1Y.1q(17.1E.34)}23(N){E=11(X,W){14 U=W||[];7(H.1q(X)==="[24 2u]"){2u.2a.1r.1C(U,X)}18{7(1j X.15==="46"){1a(14 V=0,T=X.15;V<T;V++){U.1r(X[V])}}18{1a(14 V=0;X[V];V++){U.1r(X[V])}}}12 U}}14 G;7(17.1E.5a){G=11(U,T){14 V=U.5a(T)&4?-1:U===T?0:1;7(V===0){4d=19}12 V}}18{7("6f"in 17.1E){G=11(U,T){14 V=U.6f-T.6f;7(V===0){4d=19}12 V}}18{7(17.6g){G=11(W,U){14 V=W.1F.6g(),T=U.1F.6g();V.7J(W);V.7K(19);T.7J(U);T.7K(19);14 X=V.compareBoundaryPoints(Range.START_TO_END,T);7(X===0){4d=19}12 X}}}}(11(){14 U=17.1Z("5Y"),V="1R"+(2N 5P).7L();U.2y="<3D 2B=\'"+V+"\'/>";14 T=17.1E;T.2x(U,T.1s);7(!!17.3u(V)){I.1B.ID=11(X,Y,Z){7(1j Y.3u!=="2J"&&!Z){14 W=Y.3u(X[1]);12 W?W.id===X[1]||1j W.3e!=="2J"&&W.3e("id").4F===X[1]?[W]:g:[]}};I.1v.ID=11(Y,W){14 X=1j Y.3e!=="2J"&&Y.3e("id");12 Y.1e===1&&X&&X.4F===W}}T.2i(U)})();(11(){14 T=17.1Z("1G");T.2H(17.createComment(""));7(T.26("*").15>0){I.1B.3H=11(U,Y){14 X=Y.26(U[1]);7(U[1]==="*"){14 W=[];1a(14 V=0;X[V];V++){7(X[V].1e===1){W.1r(X[V])}}X=W}12 X}}T.2y="<a 2s=\'#\'></a>";7(T.1s&&1j T.1s.2k!=="2J"&&T.1s.2k("2s")!=="#"){I.56.2s=11(U){12 U.2k("2s",2)}}})();7(17.5b){(11(){14 T=F,U=17.1Z("1G");U.2y="<p 3J=\'7M\'></p>";7(U.5b&&U.5b(".7M").15===0){12}F=11(Y,X,V,W){X=X||17;7(!W&&X.1e===9&&!Q(X)){22{12 E(X.5b(Y),V)}23(Z){}}12 T(Y,X,V,W)};F.1B=T.1B;F.1v=T.1v;F.3j=T.3j;F.50=T.50})()}7(17.3L&&17.1E.3L){(11(){14 T=17.1Z("1G");T.2y="<1G 3J=\'1l e\'></1G><1G 3J=\'1l\'></1G>";7(T.3L("e").15===0){12}T.7l.1L="e";7(T.3L("e").15===1){12}I.51.37(1,0,"4f");I.1B.4f=11(U,V,W){7(1j V.3L!=="2J"&&!W){12 V.3L(U[1])}}})()}11 P(U,Z,Y,ad,aa,ac){14 ab=U=="3f"&&!ac;1a(14 W=0,V=ad.15;W<V;W++){14 T=ad[W];7(T){7(ab&&T.1e===1){T.2T=Y;T.3M=W}T=T[U];14 X=1c;1A(T){7(T.2T===Y){X=ad[T.3M];1M}7(T.1e===1&&!ac){T.2T=Y;T.3M=W}7(T.1p===Z){X=T;1M}T=T[U]}ad[W]=X}}}11 S(U,Z,Y,ad,aa,ac){14 ab=U=="3f"&&!ac;1a(14 W=0,V=ad.15;W<V;W++){14 T=ad[W];7(T){7(ab&&T.1e===1){T.2T=Y;T.3M=W}T=T[U];14 X=1c;1A(T){7(T.2T===Y){X=ad[T.3M];1M}7(T.1e===1){7(!ac){T.2T=Y;T.3M=W}7(1j Z!=="1I"){7(T===Z){X=19;1M}}18{7(F.1v(Z,[T]).15>0){X=T;1M}}}T=T[U]}ad[W]=X}}}14 K=17.5a?11(U,T){12 U.5a(T)&16}:11(U,T){12 U!==T&&(U.6d?U.6d(T):19)};14 Q=11(T){12 T.1e===9&&T.1E.1p!=="78"||!!T.1F&&Q(T.1F)};14 J=11(T,aa){14 W=[],X="",Y,V=aa.1e?[aa]:aa;1A((Y=I.1m.4h.2F(T))){X+=Y[0];T=T.1u(I.1m.4h,"")}T=I.2L[T]?T+"*":T;1a(14 Z=0,U=V.15;Z<U;Z++){F(T,V[Z],W)}12 F.1v(X,W)};o.1B=F;o.1v=F.1v;o.38=F.3j;o.38[":"]=o.38.3K;F.3j.3K.2I=11(T){12 T.49===0||T.5U===0};F.3j.3K.7N=11(T){12 T.49>0||T.5U>0};F.3j.3K.animated=11(T){12 o.41(o.4i,11(U){12 T===U.1k}).15};o.3w=11(V,T,U){7(U){V=":44("+V+")"}12 F.50(V,T)};o.4Y=11(V,U){14 T=[],W=V[U];1A(W&&W!=17){7(W.1e==1){T.1r(W)}W=W[U]}12 T};o.2R=11(X,T,V,W){T=T||1;14 U=0;1a(;X;X=X[V]){7(X.1e==1&&++U==T){1M}}12 X};o.62=11(V,U){14 T=[];1a(;V;V=V.35){7(V.1e==1&&V!=U){T.1r(V)}}12 T};12;l.Sizzle=F})();o.1h={2c:11(I,F,H,K){7(I.1e==3||I.1e==8){12}7(I.4X&&I!=l){I=l}7(!H.29){H.29=6.29++}7(K!==g){14 G=H;H=6.3N(G);H.1d=K}14 E=o.1d(I,"2z")||o.1d(I,"2z",{}),J=o.1d(I,"2e")||o.1d(I,"2e",11(){12 1j o!=="2J"&&!o.1h.6h?o.1h.2e.1C(1t.4j.1k,1t):g});J.1k=I;o.1f(F.2j(/\\s+/),11(M,N){14 O=N.2j(".");N=O.3h();H.1i=O.1Y().36().3a(".");14 L=E[N];7(o.1h.4k[N]){o.1h.4k[N].4l.1q(I,K,O)}7(!L){L=E[N]={};7(!o.1h.3O[N]||o.1h.3O[N].4l.1q(I,K,O)===1c){7(I.5c){I.5c(N,J,1c)}18{7(I.3P){I.3P("on"+N,J)}}}}L[H.29]=H;o.1h.2l[N]=19});I=1b},29:1,2l:{},25:11(K,H,J){7(K.1e==3||K.1e==8){12}14 G=o.1d(K,"2z"),F,E;7(G){7(H===g||(1j H==="1I"&&H.charAt(0)==".")){1a(14 I in G){6.25(K,I+(H||""))}}18{7(H.1i){J=H.6i;H=H.1i}o.1f(H.2j(/\\s+/),11(M,O){14 Q=O.2j(".");O=Q.3h();14 N=3i("(^|\\\\.)"+Q.1Y().36().3a(".*\\\\.")+"(\\\\.|$)");7(G[O]){7(J){2S G[O][J.29]}18{1a(14 P in G[O]){7(N.1l(G[O][P].1i)){2S G[O][P]}}}7(o.1h.4k[O]){o.1h.4k[O].4m.1q(K,Q)}1a(F in G[O]){1M}7(!F){7(!o.1h.3O[O]||o.1h.3O[O].4m.1q(K,Q)===1c){7(K.6j){K.6j(O,o.1d(K,"2e"),1c)}18{7(K.5e){K.5e("on"+O,o.1d(K,"2e"))}}}F=1b;2S G[O]}}})}1a(F in G){1M}7(!F){14 L=o.1d(K,"2e");7(L){L.1k=1b}o.3g(K,"2z");o.3g(K,"2e")}}},1T:11(I,K,H,E){14 G=I.1i||I;7(!E){I=1j I==="24"?I[h]?I:o.1H(o.3l(G),I):o.3l(G);7(G.1O("!")>=0){I.1i=G=G.1Y(0,-1);I.7O=19}7(!H){I.3m();7(6.2l[G]){o.1f(o.1S,11(){7(6.2z&&6.2z[G]){o.1h.1T(I,K,6.2e.1k)}})}}7(!H||H.1e==3||H.1e==8){12 g}I.5f=g;I.2M=H;K=o.2t(K);K.7E(I)}I.6k=H;14 J=o.1d(H,"2e");7(J){J.1C(H,K)}7((!H[G]||(o.1p(H,"a")&&G=="5g"))&&H["on"+G]&&H["on"+G].1C(H,K)===1c){I.5f=1c}7(!E&&H[G]&&!I.6l()&&!(o.1p(H,"a")&&G=="5g")){6.6h=19;22{H[G]()}23(L){}}6.6h=1c;7(!I.6m()){14 F=H.1o||H.1F;7(F){o.1h.1T(I,K,F,19)}}},2e:11(K){14 J,E;K=1t[0]=o.1h.7P(K||l.1h);K.6k=6;14 L=K.1i.2j(".");K.1i=L.3h();J=!L.15&&!K.7O;14 I=3i("(^|\\\\.)"+L.1Y().36().3a(".*\\\\.")+"(\\\\.|$)");E=(o.1d(6,"2z")||{})[K.1i];1a(14 G in E){14 H=E[G];7(J||I.1l(H.1i)){K.6i=H;K.1d=H.1d;14 F=H.1C(6,1t);7(F!==g){K.5f=F;7(F===1c){K.3n();K.3m()}}7(K.6n()){1M}}}},4b:"altKey attrChange attrName bubbles 2K cancelable 4n 6o 7Q 6p 6k 1d detail eventPhase 5h 6i 6q 6r newValue originalTarget 6s 7R prevValue relatedNode 5i screenX screenY shiftKey 7S 2M 7T view wheelDelta 4o".2j(" "),7P:11(H){7(H[h]){12 H}14 F=H;H=o.3l(F);1a(14 G=6.4b.15,J;G;){J=6.4b[--G];H[J]=F[J]}7(!H.2M){H.2M=H.7S||17}7(H.2M.1e==3){H.2M=H.2M.1o}7(!H.5i&&H.5h){H.5i=H.5h==H.2M?H.7T:H.5h}7(H.6s==1b&&H.6o!=1b){14 I=17.1E,E=17.1U;H.6s=H.6o+(I&&I.2U||E&&E.2U||0)-(I.6t||0);H.7R=H.7Q+(I&&I.2V||E&&E.2V||0)-(I.6u||0)}7(!H.4o&&((H.4n||H.4n===0)?H.4n:H.6q)){H.4o=H.4n||H.6q}7(!H.6r&&H.6p){H.6r=H.6p}7(!H.4o&&H.2K){H.4o=(H.2K&1?1:(H.2K&2?3:(H.2K&4?2:0)))}12 H},3N:11(F,E){E=E||11(){12 F.1C(6,1t)};E.29=F.29=F.29||E.29||6.29++;12 E},3O:{2G:{4l:B,4m:11(){}}},4k:{4p:{4l:11(E,F){o.1h.2c(6,F[0],c)},4m:11(G){7(G.15){14 E=0,F=3i("(^|\\\\.)"+G[0]+"(\\\\.|$)");o.1f((o.1d(6,"2z").4p||{}),11(){7(F.1l(6.1i)){E++}});7(E<1){o.1h.25(6,G[0],c)}}}}}};o.3l=11(E){7(!6.3n){12 2N o.3l(E)}7(E&&E.1i){6.6v=E;6.1i=E.1i}18{6.1i=E}6.timeStamp=e();6[h]=19};11 k(){12 1c}11 u(){12 19}o.3l.2a={3n:11(){6.6l=u;14 E=6.6v;7(!E){12}7(E.3n){E.3n()}E.returnValue=1c},3m:11(){6.6m=u;14 E=6.6v;7(!E){12}7(E.3m){E.3m()}E.cancelBubble=19},stopImmediatePropagation:11(){6.6n=u;6.3m()},6l:k,6m:k,6n:k};14 a=11(F){14 E=F.5i;1A(E&&E!=6){22{E=E.1o}23(G){E=6}}7(E!=6){F.1i=F.1d;o.1h.2e.1C(6,1t)}};o.1f({7U:"6w",7V:"6x"},11(F,E){o.1h.3O[E]={4l:11(){o.1h.2c(6,F,a,E)},4m:11(){o.1h.25(6,F,a)}}});o.fn.1H({4q:11(F,G,E){12 F=="6y"?6.5K(F,G,E):6.1f(11(){o.1h.2c(6,F,E||G,E&&G)})},5K:11(G,H,F){14 E=o.1h.3N(F||H,11(I){o(6).6z(I,E);12(F||H).1C(6,1t)});12 6.1f(11(){o.1h.2c(6,G,E,F&&H)})},6z:11(F,E){12 6.1f(11(){o.1h.25(6,F,E)})},1T:11(E,F){12 6.1f(11(){o.1h.1T(E,F,6)})},64:11(E,G){7(6[0]){14 F=o.3l(E);F.3n();F.3m();o.1h.1T(F,G,6[0]);12 F.5f}},3o:11(G){14 E=1t,F=1;1A(F<E.15){o.1h.3N(G,E[F++])}12 6.5g(o.1h.3N(G,11(H){6.6A=(6.6A||0)%F;H.3n();12 E[6.6A++].1C(6,1t)||1c}))},hover:11(E,F){12 6.6w(E).6x(F)},2G:11(E){B();7(o.4r){E.1q(17,o)}18{o.4s.1r(E)}12 6},4p:11(G,F){14 E=o.1h.3N(F);E.29+=6.1W+G;o(17).4q(i(G,6.1W),6.1W,E);12 6},die:11(F,E){o(17).6z(i(F,6.1W),E?{29:E.29+6.1W+F}:1b);12 6}});11 c(H){14 E=3i("(^|\\\\.)"+H.1i+"(\\\\.|$)"),G=19,F=[];o.1f(o.1d(6,"2z").4p||[],11(I,J){7(E.1l(J.1i)){14 K=o(H.2M).42(J.1d)[0];7(K){F.1r({1k:K,fn:J})}}});F.36(11(J,I){12 o.1d(J.1k,"42")-o.1d(I.1k,"42")});o.1f(F,11(){7(6.fn.1q(6.1k,H,6.fn.1d)===1c){12(G=1c)}});12 G}11 i(F,E){12["4p",F,E.1u(/\\./g,"`").1u(/ /g,"|")].3a(".")}o.1H({4r:1c,4s:[],2G:11(){7(!o.4r){o.4r=19;7(o.4s){o.1f(o.4s,11(){6.1q(17,o)});o.4s=1b}o(17).64("2G")}}});14 x=1c;11 B(){7(x){12}x=19;7(17.5c){17.5c("7W",11(){17.6j("7W",1t.4j,1c);o.2G()},1c)}18{7(17.3P){17.3P("5j",11(){7(17.3Q==="2E"){17.5e("5j",1t.4j);o.2G()}});7(17.1E.7X&&l==l.1V){(11(){7(o.4r){12}22{17.1E.7X("1z")}23(E){7Y(1t.4j,0);12}o.2G()})()}}}o.1h.2c(l,"5k",o.2G)}o.1f(("blur,focus,5k,resize,5l,6y,5g,dblclick,mousedown,mouseup,mousemove,7U,7V,6w,6x,change,2q,6c,keydown,keypress,keyup,3G").2j(","),11(F,E){o.fn[E]=11(G){12 G?6.4q(E,G):6.1T(E)}});o(l).4q("6y",11(){1a(14 E in o.1S){7(E!=1&&o.1S[E].2e){o.1h.25(o.1S[E].2e.1k)}}});(11(){o.1Q={};14 F=17.1E,G=17.1Z("1R"),K=17.1Z("1G"),J="1R"+(2N 5P).7L();K.1g.1N="3p";K.2y=\'   <5W/><21></21><a 2s="/a" 1g="color:7Z;4a:1z;1K:.5;">a</a><2q><4K>1J</4K></2q><24><3E/></24>\';14 H=K.26("*"),E=K.26("a")[0];7(!H||!H.15||!E){12}o.1Q={7m:K.1s.1e==3,27:!K.26("27").15,objectAll:!!K.26("24")[0].26("*").15,7k:!!K.26("5W").15,1g:/7Z/.1l(E.2k("1g")),7n:E.2k("2s")==="/a",1K:E.1g.1K==="0.5",4t:!!E.1g.4t,5R:1c,5G:19,3R:1b};G.1i="1J/3z";22{G.2H(17.4E("window."+J+"=1;"))}23(I){}F.2x(G,F.1s);7(l[J]){o.1Q.5R=19;2S l[J]}F.2i(G);7(K.3P&&K.80){K.3P("6B",11(){o.1Q.5G=1c;K.5e("6B",1t.4j)});K.4J(19).80("6B")}o(11(){14 L=17.1Z("1G");L.1g.2h=L.1g.81="2W";17.1U.2H(L);o.3R=o.1Q.3R=L.49===2;17.1U.2i(L).1g.1N="3p"})})();14 w=o.1Q.4t?"4t":"82";o.4b={"1a":"7C","3J":"1L","4a":w,4t:w,82:w,readonly:"readOnly",maxlength:"maxLength",83:"cellSpacing",rowspan:"rowSpan",tabindex:"5Z"};o.fn.1H({_1:o.fn.5k,5k:11(G,J,K){7(1j G!=="1I"){12 6._1(G)}14 I=G.1O(" ");7(I>=0){14 E=G.1Y(I,G.15);G=G.1Y(0,I)}14 H="3q";7(J){7(o.1X(J)){K=J;J=1b}18{7(1j J==="24"){J=o.3E(J);H="85"}}}14 F=6;o.47({1y:G,1i:H,28:"39",1d:J,2E:11(M,L){7(L=="2X"||L=="86"){F.39(E?o("<1G/>").3v(M.5m.1u(/<1R(.|\\s)*?\\/1R>/g,"")).1B(E):M.5m)}7(K){F.1f(K,[M.5m,L,M])}}});12 6},serialize:11(){12 o.3E(6.87())},87:11(){12 6.2p(11(){12 6.88?o.2t(6.88):6}).1v(11(){12 6.2B&&!6.57&&(6.4M||/2q|60/i.1l(6.1p)||/1J|2I|58|search/i.1l(6.1i))}).2p(11(E,F){14 G=o(6).5J();12 G==1b?1b:o.32(G)?o.2p(G,11(I,H){12{2B:F.2B,2A:I}}):{2B:F.2B,2A:G}}).33()}});o.1f("89,5n,8a,8b,8c,8d".2j(","),11(E,F){o.fn[F]=11(G){12 6.4q(F,G)}});14 r=e();o.1H({33:11(E,G,H,F){7(o.1X(G)){H=G;G=1b}12 o.47({1i:"3q",1y:E,1d:G,2X:H,28:F})},getScript:11(E,F){12 o.33(E,1b,F,"1R")},getJSON:11(E,F,G){12 o.33(E,F,G,"3S")},post:11(E,G,H,F){7(o.1X(G)){H=G;G={}}12 o.47({1i:"85",1y:E,1d:G,2X:H,28:F})},ajaxSetup:11(E){o.1H(o.6C,E)},6C:{1y:5o.2s,2l:19,1i:"3q",8e:"5p/x-www-5Y-urlencoded",8f:19,3b:19,8g:11(){12 l.8h?2N 8h("Microsoft.XMLHTTP"):2N 8i()},5q:{4u:"5p/4u, 1J/4u",39:"1J/39",1R:"1J/3z, 5p/3z",3S:"5p/3S, 1J/3z",1J:"1J/plain",_0:"*/*"}},5r:{},47:11(M){M=o.1H(19,M,o.1H(19,{},o.6C,M));14 W,F=/=\\?(&|$)/g,R,V,G=M.1i.2r();7(M.1d&&M.8f&&1j M.1d!=="1I"){M.1d=o.3E(M.1d)}7(M.28=="5s"){7(G=="3q"){7(!M.1y.1m(F)){M.1y+=(M.1y.1m(/\\?/)?"&":"?")+(M.5s||"8j")+"=?"}}18{7(!M.1d||!M.1d.1m(F)){M.1d=(M.1d?M.1d+"&":"")+(M.5s||"8j")+"=?"}}M.28="3S"}7(M.28=="3S"&&(M.1d&&M.1d.1m(F)||M.1y.1m(F))){W="5s"+r++;7(M.1d){M.1d=(M.1d+"").1u(F,"="+W+"$1")}M.1y=M.1y.1u(F,"="+W+"$1");M.28="1R";l[W]=11(X){V=X;I();L();l[W]=g;22{2S l[W]}23(Y){}7(H){H.2i(T)}}}7(M.28=="1R"&&M.1S==1b){M.1S=1c}7(M.1S===1c&&G=="3q"){14 E=e();14 U=M.1y.1u(/(\\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.1y=U+((U==M.1y)?(M.1y.1m(/\\?/)?"&":"?")+"_="+E:"")}7(M.1d&&G=="3q"){M.1y+=(M.1y.1m(/\\?/)?"&":"?")+M.1d;M.1d=1b}7(M.2l&&!o.4v++){o.1h.1T("89")}14 Q=/^(\\w+:)?\\/\\/([^\\/?#]+)/.2F(M.1y);7(M.28=="1R"&&G=="3q"&&Q&&(Q[1]&&Q[1]!=5o.8k||Q[2]!=5o.host)){14 H=17.26("79")[0];14 T=17.1Z("1R");T.4N=M.1y;7(M.8l){T.charset=M.8l}7(!W){14 O=1c;T.8m=T.5j=11(){7(!O&&(!6.3Q||6.3Q=="loaded"||6.3Q=="2E")){O=19;I();L();T.8m=T.5j=1b;H.2i(T)}}}H.2H(T);12 g}14 K=1c;14 J=M.8g();7(M.8n){J.8o(G,M.1y,M.3b,M.8n,M.58)}18{J.8o(G,M.1y,M.3b)}22{7(M.1d){J.5t("Content-Type",M.8e)}7(M.6D){J.5t("If-6E-Since",o.5r[M.1y]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.5t("X-Requested-With","8i");J.5t("Accept",M.28&&M.5q[M.28]?M.5q[M.28]+", */*":M.5q._0)}23(S){}7(M.8p&&M.8p(J,M)===1c){7(M.2l&&!--o.4v){o.1h.1T("5n")}J.8q();12 1c}7(M.2l){o.1h.1T("8d",[J,M])}14 N=11(X){7(J.3Q==0){7(P){6G(P);P=1b;7(M.2l&&!--o.4v){o.1h.1T("5n")}}}18{7(!K&&J&&(J.3Q==4||X=="3U")){K=19;7(P){6G(P);P=1b}R=X=="3U"?"3U":!o.8r(J)?"3G":M.6D&&o.8s(J,M.1y)?"86":"2X";7(R=="2X"){22{V=o.8t(J,M.28,M)}23(Z){R="6H"}}7(R=="2X"){14 Y;22{Y=J.6I("8u-6E")}23(Z){}7(M.6D&&Y){o.5r[M.1y]=Y}7(!W){I()}}18{o.6J(M,J,R)}L();7(X){J.8q()}7(M.3b){J=1b}}}};7(M.3b){14 P=4X(N,13);7(M.3U>0){7Y(11(){7(J&&!K){N("3U")}},M.3U)}}22{J.send(M.1d)}23(S){o.6J(M,J,1b,S)}7(!M.3b){N()}11 I(){7(M.2X){M.2X(V,R)}7(M.2l){o.1h.1T("8c",[J,M])}}11 L(){7(M.2E){M.2E(J,R)}7(M.2l){o.1h.1T("8a",[J,M])}7(M.2l&&!--o.4v){o.1h.1T("5n")}}12 J},6J:11(F,H,E,G){7(F.3G){F.3G(H,E,G)}7(F.2l){o.1h.1T("8b",[H,F,G])}},4v:0,8r:11(F){22{12!F.3V&&5o.8k=="6b:"||(F.3V>=8v&&F.3V<300)||F.3V==8w||F.3V==1223}23(E){}12 1c},8s:11(G,E){22{14 H=G.6I("8u-6E");12 G.3V==8w||H==o.5r[E]}23(F){}12 1c},8t:11(J,H,G){14 F=J.6I("content-1i"),E=H=="4u"||!H&&F&&F.1O("4u")>=0,I=E?J.responseXML:J.5m;7(E&&I.1E.3F=="6H"){4W"6H"}7(G&&G.8x){I=G.8x(I,H)}7(1j I==="1I"){7(H=="1R"){o.5O(I)}7(H=="3S"){I=l["eval"]("("+I+")")}}12 I},3E:11(E){14 G=[];11 H(I,J){G[G.15]=8y(I)+"="+8y(J)}7(o.32(E)||E.5A){o.1f(E,11(){H(6.2B,6.2A)})}18{1a(14 F in E){7(o.32(E[F])){o.1f(E[F],11(){H(F,6)})}18{H(F,o.1X(E[F])?E[F]():E[F])}}}12 G.3a("&").1u(/%20/g,"+")}});14 m={},n,d=[["2w","3W","marginBottom","paddingTop","paddingBottom"],["2h","6K","marginRight","81","paddingRight"],["1K"]];11 t(F,E){14 G={};o.1f(d.4V.1C([],d.1Y(0,E)),11(){G[6]=F});12 G}o.fn.1H({2m:11(J,L){7(J){12 6.3X(t("2m",3),J,L)}18{1a(14 H=0,F=6.15;H<F;H++){14 E=o.1d(6[H],"4w");6[H].1g.1N=E||"";7(o.2b(6[H],"1N")==="3p"){14 G=6[H].3F,K;7(m[G]){K=m[G]}18{14 I=o("<"+G+" />").7v("1U");K=I.2b("1N");7(K==="3p"){K="4Q"}I.25();m[G]=K}o.1d(6[H],"4w",K)}}1a(14 H=0,F=6.15;H<F;H++){6[H].1g.1N=o.1d(6[H],"4w")||""}12 6}},2f:11(H,I){7(H){12 6.3X(t("2f",3),H,I)}18{1a(14 G=0,F=6.15;G<F;G++){14 E=o.1d(6[G],"4w");7(!E&&E!=="3p"){o.1d(6[G],"4w",o.2b(6[G],"1N"))}}1a(14 G=0,F=6.15;G<F;G++){6[G].1g.1N="3p"}12 6}},_2:o.fn.3o,3o:11(G,F){14 E=1j G==="5Q";12 o.1X(G)&&o.1X(F)?6._2.1C(6,1t):G==1b||E?6.1f(11(){14 H=E?G:o(6).is(":2I");o(6)[H?"2m":"2f"]()}):6.3X(t("3o",3),G,F)},fadeTo:11(E,G,F){12 6.3X({1K:G},E,F)},3X:11(I,F,H,G){14 E=o.8A(F,H,G);12 6[E.2D===1c?"1f":"2D"](11(){14 K=o.1H({},E),M,L=6.1e==1&&o(6).is(":2I"),J=6;1a(M in I){7(I[M]=="2f"&&L||I[M]=="2m"&&!L){12 K.2E.1q(6)}7((M=="2w"||M=="2h")&&6.1g){K.1N=o.2b(6,"1N");K.2Y=6.1g.2Y}}7(K.2Y!=1b){6.1g.2Y="2I"}K.4x=o.1H({},I);o.1f(I,11(O,S){14 R=2N o.fx(J,K,O);7(/3o|2m|2f/.1l(S)){R[S=="3o"?L?"2m":"2f":S](I)}18{14 Q=S.4O().1m(/^([+-]=)?([\\d+-.]+)(.*)$/),T=R.4y(19)||0;7(Q){14 N=2P(Q[2]),P=Q[3]||"px";7(P!="px"){J.1g[O]=(N||1)+P;T=((N||1)/R.4y(19))*T;J.1g[O]=T+P}7(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.4z(T,N,P)}18{R.4z(T,S,"")}}});12 19})},stop:11(F,E){14 G=o.4i;7(F){6.2D([])}6.1f(11(){1a(14 H=G.15-1;H>=0;H--){7(G[H].1k==6){7(E){G[H](19)}G.37(H,1)}}});7(!E){6.4c()}12 6}});o.1f({slideDown:t("2m",1),slideUp:t("2f",1),slideToggle:t("3o",1),fadeIn:{1K:"2m"},fadeOut:{1K:"2f"}},11(E,F){o.fn[E]=11(G,H){12 6.3X(F,G,H)}});o.1H({8A:11(G,H,F){14 E=1j G==="24"?G:{2E:F||!F&&H||o.1X(G)&&G,2Z:G,4A:F&&H||H&&!o.1X(H)&&H};E.2Z=o.fx.off?0:1j E.2Z==="46"?E.2Z:o.fx.6L[E.2Z]||o.fx.6L._0;E.6M=E.2E;E.2E=11(){7(E.2D!==1c){o(6).4c()}7(o.1X(E.6M)){E.6M.1q(6)}};12 E},4A:{8B:11(G,H,E,F){12 E+F*G},6N:11(G,H,E,F){12((-3d.cos(G*3d.PI)/2)+0.5)*F+E}},4i:[],fx:11(F,E,G){6.1x=E;6.1k=F;6.1D=G;7(!E.4B){E.4B={}}}});o.fx.2a={6O:11(){7(6.1x.3r){6.1x.3r.1q(6.1k,6.3s,6)}(o.fx.3r[6.1D]||o.fx.3r._0)(6);7((6.1D=="2w"||6.1D=="2h")&&6.1k.1g){6.1k.1g.1N="4Q"}},4y:11(F){7(6.1k[6.1D]!=1b&&(!6.1k.1g||6.1k.1g[6.1D]==1b)){12 6.1k[6.1D]}14 E=2P(o.2b(6.1k,6.1D,F));12 E&&E>-10000?E:2P(o.2o(6.1k,6.1D))||0},4z:11(I,H,G){6.6P=e();6.5u=I;6.4G=H;6.6Q=G||6.6Q||"px";6.3s=6.5u;6.5v=6.5w=0;14 E=6;11 F(J){12 E.3r(J)}F.1k=6.1k;7(F()&&o.4i.1r(F)&&!n){n=4X(11(){14 K=o.4i;1a(14 J=0;J<K.15;J++){7(!K[J]()){K.37(J--,1)}}7(!K.15){6G(n);n=g}},13)}},2m:11(){6.1x.4B[6.1D]=o.2g(6.1k.1g,6.1D);6.1x.2m=19;6.4z(6.1D=="2h"||6.1D=="2w"?1:0,6.4y());o(6.1k).2m()},2f:11(){6.1x.4B[6.1D]=o.2g(6.1k.1g,6.1D);6.1x.2f=19;6.4z(6.4y(),0)},3r:11(H){14 G=e();7(H||G>=6.1x.2Z+6.6P){6.3s=6.4G;6.5v=6.5w=1;6.6O();6.1x.4x[6.1D]=19;14 E=19;1a(14 F in 6.1x.4x){7(6.1x.4x[F]!==19){E=1c}}7(E){7(6.1x.1N!=1b){6.1k.1g.2Y=6.1x.2Y;6.1k.1g.1N=6.1x.1N;7(o.2b(6.1k,"1N")=="3p"){6.1k.1g.1N="4Q"}}7(6.1x.2f){o(6.1k).2f()}7(6.1x.2f||6.1x.2m){1a(14 I in 6.1x.4x){o.2g(6.1k.1g,I,6.1x.4B[I])}}6.1x.2E.1q(6.1k)}12 1c}18{14 J=G-6.6P;6.5w=J/6.1x.2Z;6.5v=o.4A[6.1x.4A||(o.4A.6N?"6N":"8B")](6.5w,J,0,1,6.1x.2Z);6.3s=6.5u+((6.4G-6.5u)*6.5v);6.6O()}12 19}};o.1H(o.fx,{6L:{slow:600,fast:8v,_0:400},3r:{1K:11(E){o.2g(E.1k.1g,"1K",E.3s)},_0:11(E){7(E.1k.1g&&E.1k.1g[E.1D]!=1b){E.1k.1g[E.1D]=E.3s+E.6Q}18{E.1k[E.1D]=E.3s}}}});7(17.1E.8C){o.fn.1P=11(){7(!6[0]){12{1V:0,1z:0}}7(6[0]===6[0].1F.1U){12 o.1P.6R(6[0])}14 G=6[0].8C(),J=6[0].1F,F=J.1U,E=J.1E,L=E.6u||F.6u||0,K=E.6t||F.6t||0,I=G.1V+(6S.8D||o.3R&&E.2V||F.2V)-L,H=G.1z+(6S.8E||o.3R&&E.2U||F.2U)-K;12{1V:I,1z:H}}}18{o.fn.1P=11(){7(!6[0]){12{1V:0,1z:0}}7(6[0]===6[0].1F.1U){12 o.1P.6R(6[0])}o.1P.5x||o.1P.6T();14 J=6[0],G=J.3Y,F=J,O=J.1F,M,H=O.1E,K=O.1U,L=O.76,E=L.4T(J,1b),N=J.30,I=J.5y;1A((J=J.1o)&&J!==K&&J!==H){M=L.4T(J,1b);N-=J.2V,I-=J.2U;7(J===G){N+=J.30,I+=J.5y;7(o.1P.8F&&!(o.1P.8G&&/^t(able|d|h)$/i.1l(J.3F))){N+=2Q(M.6U,10)||0,I+=2Q(M.6V,10)||0}F=G,G=J.3Y}7(o.1P.8H&&M.2Y!=="7N"){N+=2Q(M.6U,10)||0,I+=2Q(M.6V,10)||0}E=M}7(E.2C==="2L"||E.2C==="8I"){N+=K.30,I+=K.5y}7(E.2C==="fixed"){N+=3d.4S(H.2V,K.2V),I+=3d.4S(H.2U,K.2U)}12{1V:N,1z:I}}}o.1P={6T:11(){7(6.5x){12}14 L=17.1U,F=17.1Z("1G"),H,G,N,I,M,E,J=L.1g.3W,K=\'<1G 1g="2C:4P;1V:0;1z:0;3B:0;3A:8J 8K #8L;4R:0;2h:2W;2w:2W;"><1G></1G></1G><21 1g="2C:4P;1V:0;1z:0;3B:0;3A:8J 8K #8L;4R:0;2h:2W;2w:2W;" cellpadding="0" 83="0"><tr><td></td></tr></21>\';M={2C:"4P",1V:0,1z:0,3B:0,3A:0,2h:"2W",2w:"2W",7b:"2I"};1a(E in M){F.1g[E]=M[E]}F.2y=K;L.2x(F,L.1s);H=F.1s,G=H.1s,I=H.35.1s.1s;6.8F=(G.30!==5);6.8G=(I.30===5);H.1g.2Y="2I",H.1g.2C="2L";6.8H=(G.30===-5);L.1g.3W="2W";6.8M=(L.30===0);L.1g.3W=J;L.2i(F);6.5x=19},6R:11(E){o.1P.5x||o.1P.6T();14 G=E.30,F=E.5y;7(o.1P.8M){G+=2Q(o.2o(E,"3W",19),10)||0,F+=2Q(o.2o(E,"6K",19),10)||0}12{1V:G,1z:F}}};o.fn.1H({2C:11(){14 I=0,H=0,F;7(6[0]){14 G=6.3Y(),J=6.1P(),E=/^1U|39$/i.1l(G[0].3F)?{1V:0,1z:0}:G.1P();J.1V-=j(6,"3W");J.1z-=j(6,"6K");E.1V+=j(G,"6U");E.1z+=j(G,"6V");F={1V:J.1V-E.1V,1z:J.1z-E.1z}}12 F},3Y:11(){14 E=6[0].3Y||17.1U;1A(E&&(!/^1U|39$/i.1l(E.3F)&&o.2b(E,"2C")=="8I")){E=E.3Y}12 o(E)}});o.1f(["5S","5T"],11(F,E){14 G="5l"+E;o.fn[G]=11(H){7(!6[0]){12 1b}12 H!==g?6.1f(11(){6==l||6==17?l.scrollTo(!F?H:o(l).2U(),F?H:o(l).2V()):6[G]=H}):6[0]==l||6[0]==17?6S[F?"8D":"8E"]||o.3R&&17.1E[G]||17.1U[G]:6[0][G]}});o.1f(["Height","7e"],11(I,G){14 E=I?"5S":"5T",H=I?"7c":"7d",F=G.3C();o.fn["inner"+G]=11(){12 6[0]?o.2b(6[0],F,1c,"4R"):1b};o.fn["outer"+G]=11(K){12 6[0]?o.2b(6[0],F,1c,K?"3B":"3A"):1b};14 J=G.3C();o.fn[J]=11(K){12 6[0]==l?17.compatMode=="CSS1Compat"&&17.1E["6W"+G]||17.1U["6W"+G]:6[0]==17?3d.4S(17.1E["6W"+G],17.1U["5l"+G],17.1E["5l"+G],17.1U["1P"+G],17.1E["1P"+G]):K===g?(6.15?o.2b(6[0],J):1b):6.2b(J,1j K==="1I"?K:K+"px")}})})();',[],545,'||||||this|if||||||||||||||||||||||||||||||||||||||||||||||||||||||||function|return||var|length||document|else|true|for|null|false|data|nodeType|each|style|event|type|typeof|elem|test|match||parentNode|nodeName|call|push|firstChild|arguments|replace|filter||options|url|left|while|find|apply|prop|documentElement|ownerDocument|div|extend|string|text|opacity|className|break|display|indexOf|offset|support|script|cache|trigger|body|top|selector|isFunction|slice|createElement||table|try|catch|object|remove|getElementsByTagName|tbody|dataType|guid|prototype|css|add||handle|hide|attr|width|removeChild|split|getAttribute|global|show||curCSS|map|select|toUpperCase|href|makeArray|Array|pushStack|height|insertBefore|innerHTML|events|value|name|position|queue|complete|exec|ready|appendChild|hidden|undefined|button|relative|target|new|inArray|parseFloat|parseInt|nth|delete|sizcache|scrollLeft|scrollTop|1px|success|overflow|duration|offsetTop|context|isArray|get|childNodes|nextSibling|sort|splice|expr|html|join|async||Math|getAttributeNode|previousSibling|removeData|shift|RegExp|selectors||Event|stopPropagation|preventDefault|toggle|none|GET|step|now|jQuery|getElementById|append|multiFilter|POS||javascript|border|margin|toLowerCase|input|param|tagName|error|TAG|u00c0|class|filters|getElementsByClassName|sizset|proxy|special|attachEvent|readyState|boxModel|json||timeout|status|marginTop|animate|offsetParent||domManip|grep|closest||not|selected|number|ajax|has|offsetWidth|float|props|dequeue|hasDuplicate|uFFFF_|CLASS|first|PSEUDO|timers|callee|specialAll|setup|teardown|charCode|which|live|bind|isReady|readyList|cssFloat|xml|active|olddisplay|curAnim|cur|custom|easing|orig|clean|empty|createTextNode|nodeValue|end|unique|isXMLDoc|cloneNode|option|selectedIndex|checked|src|toString|absolute|block|padding|max|getComputedStyle|currentStyle|concat|throw|setInterval|dir|pop|matches|order|CHILD|last|even|odd|attrHandle|disabled|password|case|compareDocumentPosition|querySelectorAll|addEventListener||detachEvent|result|click|fromElement|relatedTarget|onreadystatechange|load|scroll|responseText|ajaxStop|location|application|accepts|lastModified|jsonp|setRequestHeader|start|pos|state|initialized|offsetLeft|init|jquery|prevObject|index|wrapAll|clone|after|noCloneEvent|andSelf|merge|val|one|radio|checkbox||globalEval|Date|boolean|scriptEval|Left|Top|offsetHeight|runtimeStyle|link||form|tabIndex|textarea|opera|sibling|removeAttribute|triggerHandler|set|substr|preFilter|NAME|ATTR|attrMap|file|submit|contains|nodeIndex|sourceIndex|createRange|triggered|handler|removeEventListener|currentTarget|isDefaultPrevented|isPropagationStopped|isImmediatePropagationStopped|clientX|ctrlKey|keyCode|metaKey|pageX|clientLeft|clientTop|originalEvent|mouseenter|mouseleave|unload|unbind|lastToggle|onclick|ajaxSettings|ifModified|Modified||clearInterval|parsererror|getResponseHeader|handleError|marginLeft|speeds|old|swing|update|startTime|unit|bodyOffset|self|initialize|borderTopWidth|borderLeftWidth|client|setArray|contents|prepend|before|specified|replaceWith|textContent|continue|zoom|defaultView|Object|HTML|head|swap|visibility|Right|Bottom|Width|col|area|multiple|fieldset|colgroup|htmlSerialize|lastChild|leadingWhitespace|hrefNormalized|alpha|100|webkit|msie|mozilla|parent|children|appendTo|Syntax|unrecognized|expression|only|||htmlFor|getElementsByName|unshift|image|reset|setFilters|source|selectNode|collapse|getTime|TEST|visible|exclusive|fix|clientY|pageY|srcElement|toElement|mouseover|mouseout|DOMContentLoaded|doScroll|setTimeout|red|fireEvent|paddingLeft|styleFloat|cellspacing||POST|notmodified|serializeArray|elements|ajaxStart|ajaxComplete|ajaxError|ajaxSuccess|ajaxSend|contentType|processData|xhr|ActiveXObject|XMLHttpRequest|callback|protocol|scriptCharset|onload|username|open|beforeSend|abort|httpSuccess|httpNotModified|httpData|Last|200|304|dataFilter|encodeURIComponent||speed|linear|getBoundingClientRect|pageYOffset|pageXOffset|doesNotAddBorder|doesAddBorderForTableAndCells|subtractsBorderForOverflowNotVisible|static|5px|solid|000|doesNotIncludeMarginInBodyOffset'.split('|'),0,{}));
/********************   js/jquery.easing.js   ********************/
/*
 * jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
 *
 * Uses the built In easIng capabilities added In jQuery 1.1
 * to offer multiple easIng options
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */

// t: current time, b: begInnIng value, c: change In value, d: duration

jQuery.extend( jQuery.easing,
{
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});
/********************   js/jquery.cycle.js   ********************/
/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2009 M. Alsup
 * Version: 2.63 (17-MAR-2009)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.6 or later
 *
 * Originally based on the work of:
 *	1) Matt Oakes
 *	2) Torsten Baldes (http://medienfreunde.com/lab/innerfade/)
 *	3) Benjamin Sterling (http://www.benjaminsterling.com/experiments/jqShuffle/)
 */
;(function($){var ver="2.63";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length==0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){options=handleArguments(this,options,arg2);if(options===false){return;}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts=buildOptions($cont,$slides,els,options,o);if(opts===false){return;}if(opts.timeout||opts.continuous){this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},opts.continuous?10:opts.timeout+(opts.delay||0));}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"stop":cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;if(arg2===true){options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,1);}return false;default:options={fx:options};}}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(this.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=0;opts.startingSlide=opts.randomMap[0];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var i=0;i<els.length;i++){var $e=$(els[i]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth;}if(!h){h=e.offsetHeight;}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingOp=($.browser.opera&&this.cycleW==42&&this.cycleH==19&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}while((opts.timeout-opts.speed)<250){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).click(function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).click(function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(var i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];var tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){var tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(var i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}log("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){$(els).stop(true,true);opts.busy=false;}if(opts.busy){return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}if(manual||!p.cyclePause){var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after);}else{$.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent);}}}opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}if(opts.pager){$.fn.cycle.updateActivePagerLink(opts.pager,opts.currSlide);}}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(curr,next,opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide){$(pager).find("a").removeClass("activeSlide").filter("a:eq("+currSlide+")").addClass("activeSlide");};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}if($.isFunction(opts.prevNextClick)){opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a=($.isFunction(opts.pagerAnchorBuilder))?opts.pagerAnchorBuilder(i,el):'<a href="#">'+(i+1)+"</a>";if(!a){return;}var $a=$(a);if($a.parents("body").length==0){$a.appendTo($p);}$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if($.isFunction(opts.pagerClick)){opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);return false;});if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"transparent";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250};})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version:	 2.52
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
;(function($){$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});opts.speed=opts.speed/2;opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(var i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(var i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var t=parseInt(h/2);var l=parseInt(w/2);clip="rect("+t+"px "+l+"px "+t+"px "+l+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
/********************   js/jquery.color.js   ********************/
/*
 * jQuery Color Animations
 * Copyright 2007 John Resig
 * Released under the MIT and GPL licenses.
 */

(function(jQuery){

	// We override the animation for all of these color styles
	jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor', 'borderColor'], function(i,attr){
		jQuery.fx.step[attr] = function(fx){
			if ( fx.state == 0 ) {
				fx.start = getColor( fx.elem, attr );
				fx.end = getRGB( fx.end );
			}

			fx.elem.style[attr] = "rgb(" + [
				Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
				Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
				Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
			].join(",") + ")";
		}
	});

	// Color Conversion functions from highlightFade
	// By Blair Mitchelmore
	// http://jquery.offput.ca/highlightFade/

	// Parse strings looking for color tuples [255,255,255]
	function getRGB(color) {
		var result;

		// Check if we're already dealing with an array of colors
		if ( color && color.constructor == Array && color.length == 3 )
			return color;

		// Look for rgb(num,num,num)
		if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
			return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];

		// Look for rgb(num%,num%,num%)
		if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
			return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];

		// Look for #a0b1c2
		if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
			return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];

		// Look for #fff
		if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
			return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];

		// Otherwise, we're most likely dealing with a named color
		return colors[jQuery.trim(color).toLowerCase()];
	}
	
	function getColor(elem, attr) {
		var color;

		do {
			color = jQuery.curCSS(elem, attr);

			// Keep going until we find an element that has color, or we hit the body
			if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
				break; 

			attr = "backgroundColor";
		} while ( elem = elem.parentNode );

		return getRGB(color);
	};
	
	// Some named colors to work with
	// From Interface by Stefan Petre
	// http://interface.eyecon.ro/

	var colors = {
		aqua:[0,255,255],
		azure:[240,255,255],
		beige:[245,245,220],
		black:[0,0,0],
		blue:[0,0,255],
		brown:[165,42,42],
		cyan:[0,255,255],
		darkblue:[0,0,139],
		darkcyan:[0,139,139],
		darkgrey:[169,169,169],
		darkgreen:[0,100,0],
		darkkhaki:[189,183,107],
		darkmagenta:[139,0,139],
		darkolivegreen:[85,107,47],
		darkorange:[255,140,0],
		darkorchid:[153,50,204],
		darkred:[139,0,0],
		darksalmon:[233,150,122],
		darkviolet:[148,0,211],
		fuchsia:[255,0,255],
		gold:[255,215,0],
		green:[0,128,0],
		indigo:[75,0,130],
		khaki:[240,230,140],
		lightblue:[173,216,230],
		lightcyan:[224,255,255],
		lightgreen:[144,238,144],
		lightgrey:[211,211,211],
		lightpink:[255,182,193],
		lightyellow:[255,255,224],
		lime:[0,255,0],
		magenta:[255,0,255],
		maroon:[128,0,0],
		navy:[0,0,128],
		olive:[128,128,0],
		orange:[255,165,0],
		pink:[255,192,203],
		purple:[128,0,128],
		violet:[128,0,128],
		red:[255,0,0],
		silver:[192,192,192],
		white:[255,255,255],
		yellow:[255,255,0]
	};
	
})(jQuery);

/********************   js/jquery.simplegallery.js   ********************/
//** Simple Controls Gallery- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com
//** Dec 7th, 08'- Script created (Requires jquery 1.2.x)
//** February 6th, 09'- Updated to v 1.3:
	//1) Adds Description Panel to optionally show a textual description for each slide
	//2) In Auto Play mode, you can now set the number of cycles before gallery stops.
	//3) Inside oninit() and onslide(), keyword "this" now references the current gallery instance


var simpleGallery_navpanel={
	panel: {height:'0', opacity:0.5, paddingTop:'5px', fontStyle:'bold 11px Verdana'}, //customize nav panel container
	images: [ 'left.gif', 'play.gif', 'right.gif', 'pause.gif'], //nav panel images (in that order)
	imageSpacing: {offsetTop:[-4, 0, -4], spacing:10}, //top offset of left, play, and right images, PLUS spacing between the 3 images
	slideduration: 500 //duration of slide up animation to reveal panel
}

function simpleGallery(settingarg){
	this.setting=settingarg
	settingarg=null
	var setting=this.setting
	setting.panelheight=(parseInt(setting.navpanelheight)>5)? parseInt(setting.navpanelheight) : parseInt(simpleGallery_navpanel.panel.height)
	setting.fadeduration=parseInt(setting.fadeduration)
	setting.curimage=(setting.persist)? simpleGallery.routines.getCookie("gallery-"+setting.wrapperid) : 0
	setting.curimage=setting.curimage || 0 //account for curimage being null if cookie is empty
	setting.ispaused=!setting.autoplay[0] //ispaused reflects current state of gallery, autoplay[0] indicates whether gallery is set to auto play
	setting.currentstep=0 //keep track of # of slides slideshow has gone through
	setting.totalsteps=setting.imagearray.length*setting.autoplay[2] //Total steps limit: # of images x # of user specified cycles
	setting.fglayer=0, setting.bglayer=1 //index of active and background layer (switches after each change of slide)
	setting.oninit=setting.oninit || function(){}
	setting.onslide=setting.onslide || function(){}
	var preloadimages=[], longestdesc=null //preload images
	setting.longestdesc="" //get longest description of all slides. If no desciptions defined, variable contains ""
	for (var i=0; i<setting.imagearray.length; i++){
		preloadimages[i]=new Image()
		preloadimages[i].src=setting.imagearray[i][0]
		if (setting.imagearray[i][3] && setting.imagearray[i][3].length>setting.longestdesc.length)
			setting.longestdesc=setting.imagearray[i][3]
	}
	var slideshow=this
	jQuery(document).ready(function($){
		var setting=slideshow.setting
		setting.$wrapperdiv=$('#'+setting.wrapperid).css({position:'relative', visibility:'visible', overflow:'hidden', width:setting.dimensions[0], height:setting.dimensions[1]}).empty() //main gallery DIV
		if (setting.$wrapperdiv.length==0){ //if no wrapper DIV found
			alert("Error: DIV with ID \""+setting.wrapperid+"\" not found on page.")
			return
		}
		setting.$gallerylayers=$('<div class="gallerylayer"></div><div class="gallerylayer"></div>') //two stacked DIVs to display the actual slide 
			.css({position:'absolute', left:0, top:0})
			.appendTo(setting.$wrapperdiv)
		setting.gallerylayers=setting.$gallerylayers.get() //cache stacked DIVs as DOM objects
		//setting.navbuttons=simpleGallery.routines.addnavpanel(setting) //get 4 nav buttons DIVs as DOM objects
		//if (setting.longestdesc!="") //if at least one slide contains a description (feature is enabled)
			setting.descdiv=simpleGallery.routines.adddescpanel(setting)
		$(setting.navbuttons).filter('img.navimages').css({opacity:0.8})
			.bind('mouseover mouseout', function(e){
				$(this).css({opacity:(e.type=="mouseover")? 1 : 0.8})
			})
			.bind('click', function(e){
				var keyword=e.target.title.toLowerCase()
				slideshow.navigate(keyword) //assign behavior to nav images
			})
		setting.$wrapperdiv.bind('mouseenter', function(){slideshow.showhidenavpanel('show')})
		setting.$wrapperdiv.bind('mouseleave', function(){slideshow.showhidenavpanel('hide')})
		slideshow.showslide(setting.curimage) //show initial slide
		slideshow.showhidedescpanel("show");
		setting.oninit.call(slideshow) //trigger oninit() event
		$(window).bind('unload', function(){ //clean up and persist
			$(slideshow.setting.navbuttons).unbind()
			if (slideshow.setting.persist) //remember last shown image's index
				simpleGallery.routines.setCookie("gallery-"+setting.wrapperid, setting.curimage)
			jQuery.each(slideshow.setting, function(k){
				if (slideshow.setting[k] instanceof Array){
					for (var i=0; i<slideshow.setting[k].length; i++){
						if (slideshow.setting[k][i].tagName=="DIV") //catches 2 gallerylayer divs, gallerystatus div
							slideshow.setting[k][i].innerHTML=null
						slideshow.setting[k][i]=null
					}
				}
				if (slideshow.setting[k].innerHTML) //catch gallerydesctext div
					slideshow.setting[k].innerHTML=null
				slideshow.setting[k]=null
			})
			slideshow=slideshow.setting=null
		})
	})
}

simpleGallery.prototype={

	navigate:function(keyword){
		clearTimeout(this.setting.playtimer)
		this.setting.totalsteps=100000 //if any of the nav buttons are clicked on, set totalsteps limit to an "unreachable" number 
		if (!isNaN(parseInt(keyword))){
			this.showslide(parseInt(keyword))
		}
		else if (/(prev)|(next)/i.test(keyword)){
			this.showslide(keyword.toLowerCase())
		}
		else{ //if play|pause button
			var slideshow=this
			//var $playbutton=$(this.setting.navbuttons).eq(1)
			if (!this.setting.ispaused){ //if pause Gallery
				this.setting.autoplay[0]=false
				//$playbutton.attr({title:'Play', src:simpleGallery_navpanel.images[1]})
			}
			else if (this.setting.ispaused){ //if play Gallery
				this.setting.autoplay[0]=true
				this.setting.playtimer=setTimeout(function(){slideshow.showslide('next')}, this.setting.autoplay[1])
				//$playbutton.attr({title:'Pause', src:simpleGallery_navpanel.images[3]})
			}
			slideshow.setting.ispaused=!slideshow.setting.ispaused
		}
	},

	showslide:function(keyword){
		var slideshow=this
		var setting=slideshow.setting
		var totalimages=setting.imagearray.length
		var imgindex=(keyword=="next")? (setting.curimage<totalimages-1? setting.curimage+1 : 0)
			: (keyword=="prev")? (setting.curimage>0? setting.curimage-1 : totalimages-1)
			: Math.min(keyword, totalimages-1)
		setting.gallerylayers[setting.bglayer].innerHTML=simpleGallery.routines.getSlideHTML(setting.imagearray[imgindex])
		setting.$gallerylayers.eq(setting.bglayer).css({zIndex:1000, opacity:0}) //background layer becomes foreground
			.stop().css({opacity:0}).animate({opacity:1}, setting.fadeduration, function(){ //Callback function after fade animation is complete:
				clearTimeout(setting.playtimer)
				setting.gallerylayers[setting.bglayer].innerHTML=null  //empty bglayer (previously fglayer before setting.fglayer=setting.bglayer was set below)
				try{
					//setting.onslide.call(slideshow, setting.gallerylayers[setting.fglayer], setting.curimage)
				}catch(e){
					alert("Simple Controls Gallery: An error has occured somwhere in your code attached to the \"onslide\" event: "+e)
				}
				setting.currentstep+=1
				if (setting.autoplay[0]){
					if (setting.currentstep<=setting.totalsteps)
						setting.playtimer=setTimeout(function(){slideshow.showslide('next')}, setting.autoplay[1])
					else
						slideshow.navigate("play/pause")
				}
			}) //end callback function
		setting.gallerylayers[setting.fglayer].style.zIndex=999 //foreground layer becomes background
		setting.fglayer=setting.bglayer
		setting.bglayer=(setting.bglayer==0)? 1 : 0
		setting.curimage=imgindex
		//setting.navbuttons[3].innerHTML=(setting.curimage+1) + '/' + setting.imagearray.length
		if (setting.imagearray[imgindex][3]){ //if this slide contains a description
			setting.$descpanel.css({visibility:'visible'})
			setting.descdiv.innerHTML=setting.imagearray[imgindex][3]
		}
		else if (setting.longestdesc!=""){ //if at least one slide contains a description (feature is enabled)
			setting.descdiv.innerHTML=null
			setting.$descpanel.css({visibility:'hidden'})

		}
	},

	showhidenavpanel:function(state){
		var setting=this.setting
		var endpoint=(state=="show")? setting.dimensions[1]-setting.panelheight : this.setting.dimensions[1]
		//setting.$navpanel.stop().animate({top:endpoint}, simpleGallery_navpanel.slideduration)
		//if (setting.longestdesc!="") //if at least one slide contains a description (feature is enabled)
			//this.showhidedescpanel(state)
	},

	showhidedescpanel:function(state){
		var setting=this.setting
		var endpoint=(state=="show")? setting.descpanelheight : 0;
		setting.$descpanel.stop().animate({height:endpoint}, simpleGallery_navpanel.slideduration)
	}
}

simpleGallery.routines={

	getSlideHTML:function(imgelement){
		var layerHTML=(imgelement[1])? '<a href="'+imgelement[1]+'" target="'+imgelement[2]+'">\n' : '' //hyperlink slide?
		layerHTML+='<img src="'+imgelement[0]+'" style="border-width:0" />'
		layerHTML+=(imgelement[1])? '</a>' : ''
		return layerHTML //return HTML for this layer
	},

	addnavpanel:function(setting){
		var interfaceHTML=''
		for (var i=0; i<3; i++){
			var imgstyle='position:relative; border:0; cursor:hand; cursor:pointer; top:'+simpleGallery_navpanel.imageSpacing.offsetTop[i]+'px; margin-right:'+(i!=2? simpleGallery_navpanel.imageSpacing.spacing+'px' : 0)
			var title=(i==0? 'Prev' : (i==1)? (setting.ispaused? 'Play' : 'Pause') : 'Next')
			var imagesrc=(i==1)? simpleGallery_navpanel.images[(setting.ispaused)? 1 : 3] : simpleGallery_navpanel.images[i]
			interfaceHTML+='<img class="navimages" title="' + title + '" src="'+ imagesrc +'" style="'+imgstyle+'" /> '
		}
		interfaceHTML+='<div class="gallerystatus" style="margin-top:1px">' + (setting.curimage+1) + '/' + setting.imagearray.length + '</div>'
		//setting.$navpanel=$('<div class="navpanellayer"></div>')
			.css({position:'absolute', width:'100%', height:setting.panelheight, left:0, top:setting.dimensions[1], font:simpleGallery_navpanel.panel.fontStyle, zIndex:'1001'})
			.appendTo(setting.$wrapperdiv)
		$('<div class="navpanelbg"></div><div class="navpanelfg"></div>') //create inner nav panel DIVs
			.css({position:'absolute', left:0, top:0, width:'100%', height:'100%'})
			//.eq(0).css({background:'black', opacity:simpleGallery_navpanel.panel.opacity}).end() //"navpanelbg" div
			.eq(1).css({paddingTop:simpleGallery_navpanel.panel.paddingTop, textAlign:'center', color:'white'}).html(interfaceHTML).end() //"navpanelfg" div
			.appendTo(setting.$navpanel)
		return setting.$navpanel.find('img.navimages, div.gallerystatus').get() //return 4 nav related images and DIVs as DOM objects
	},

	adddescpanel:function(setting){
		setting.$descpanel=$('<div class="gallerydesc"><div class="gallerydescbg"></div><div class="gallerydescfg"><div class="gallerydesctext"></div></div></div>')
			.css({position:'absolute', width:'100%', left:0, bottom:0, zIndex:'1001'})
			.find('div').css({position:'absolute', left:0, top:0, width:'100%'})
			//.eq(0).css({background:'black', opacity:simpleGallery_navpanel.panel.opacity}).end() //"gallerydescbg" div
			//.eq(1).css({color:'white'}).end() //"gallerydescfg" div
			.eq(2).html(setting.longestdesc).end().end()
			.appendTo(setting.$wrapperdiv)
		var $gallerydesctext=setting.$descpanel.find('div.gallerydesctext')
		setting.descpanelheight=$gallerydesctext.outerHeight()
		setting.$descpanel.css({bottom:0, height:setting.descpanelheight}).find('div').css({height:'100%'})
		return setting.$descpanel.find('div.gallerydesctext').get(0) //return gallery description DIV as a DOM object
	},

	getCookie:function(Name){ 
		var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
		if (document.cookie.match(re)) //if cookie found
			return document.cookie.match(re)[0].split("=")[1] //return its value
		return null
	},

	setCookie:function(name, value){
		document.cookie = name+"=" + value + ";path=/"
	}
}
/********************   js/jquery.scrollTo.js   ********************/
/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 3/9/2009
 * @author Ariel Flesler
 * @version 1.4.1
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function($){var m=$.scrollTo=function(b,h,f){$(window).scrollTo(b,h,f)};m.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};m.window=function(b){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var b=this,h=!b.nodeName||$.inArray(b.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!h)return b;var f=(b.contentWindow||b).document||b.ownerDocument||b;return $.browser.safari||f.compatMode=='BackCompat'?f.body:f.documentElement})};$.fn.scrollTo=function(l,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};if(l=='max')l=9e9;a=$.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=$(k),d=l,p,g={},q=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(d)){d=n(d);break}d=$(d,this);case'object':if(d.is||d.style)p=(d=$(d)).offset()}$.each(a.axis.split(''),function(b,h){var f=h=='x'?'Left':'Top',i=f.toLowerCase(),c='scroll'+f,r=k[c],s=h=='x'?'Width':'Height';if(p){g[c]=p[i]+(q?0:r-o.offset()[i]);if(a.margin){g[c]-=parseInt(d.css('margin'+f))||0;g[c]-=parseInt(d.css('border'+f+'Width'))||0}g[c]+=a.offset[i]||0;if(a.over[i])g[c]+=d[s.toLowerCase()]()*a.over[i]}else g[c]=d[i];if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],u(s));if(!b&&a.queue){if(r!=g[c])t(a.onAfterFirst);delete g[c]}});t(a.onAfter);function t(b){o.animate(g,j,a.easing,b&&function(){b.call(this,l,a)})};function u(b){var h='scroll'+b;if(!q)return k[h];var f='client'+b,i=k.ownerDocument.documentElement,c=k.ownerDocument.body;return Math.max(i[h],c[h])-Math.min(i[f],c[f])}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
/********************   js/jquery.smoothDivScroll.js   ********************/
/**
* jQuery.smoothDivScroll - Smooth div scrolling using jQuery.
* This plugin is for turning a set of HTML elements's into a smooth scrolling area.
*
* Copyright (c) 2009 Thomas Kahn - thomas.kahn(at)karnhuset(dot)net
*
* This plugin is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This plugin is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details. <http://www.gnu.org/licenses/>.
*
* Date: 2009-04-20
* @author Thomas Kahn
* @version 0.8
*
* Changelog
* ---------------------------------------------
* 0.8   - Major update. New parameter setup. Lots of new autoscrolling capabilities and 
*		  new parameters for controlling the scrolling speed. Made it possible to start 
*		  the scroller at a specific element.
* 
* 0.7   - Added support for autoscrolling after the page has loaded. 
*         Added support for making the hot spots visible at start for X number of seconds
*         or visible all the time.
*
* 0.6   - First version.
*/
(function($){jQuery.fn.smoothDivScroll=function(options){var defaults={scrollingHotSpotLeft:"div.scrollingHotSpotLeft",scrollingHotSpotRight:"div.scrollingHotSpotRight",scrollWrapper:"div.scrollWrapper",scrollableArea:"div.scrollableArea",hiddenOnStart:false,ajaxContentURL:"",countOnlyClass:"",scrollingSpeed:25,mouseDownSpeedBooster:3,autoScroll:"",autoScrollDirection:"right",autoScrollSpeed:1,pauseAutoScroll:"",visibleHotSpots:"",hotSpotsVisibleTime:5,startAtElementId:""};options=$.extend(defaults,options);return this.each(function(){var $mom=$(this);if(options.ajaxContentURL.length!==0){$mom.scrollableAreaWidth=0;$mom.find(options.scrollableArea).load((options.ajaxContentURL),function(){$mom.find(options.scrollableArea).children((options.countOnlyClass)).each(function(){$mom.scrollableAreaWidth=$mom.scrollableAreaWidth+$(this).outerWidth(true);});$mom.find(options.scrollableArea).css("width",($mom.scrollableAreaWidth+"px"));if(options.hiddenOnStart){$mom.hide();}
windowIsResized();setHotSpotHeightForIE();});}
var scrollXpos;var booster;var motherElementOffset=$mom.offset().left;var hotSpotWidth=0;booster=1;var hasExtended=false;$(window).one("load",function(){if(options.ajaxContentURL.length===0){$mom.scrollableAreaWidth=0;$mom.tempStartingPosition=0;$mom.find(options.scrollableArea).children((options.countOnlyClass)).each(function(){if((options.startAtElementId.length!==0)&&(($(this).attr("id"))==options.startAtElementId)){$mom.tempStartingPosition=$mom.scrollableAreaWidth;}
$mom.scrollableAreaWidth=$mom.scrollableAreaWidth+$(this).outerWidth(true);});$mom.find(options.scrollableArea).css("width",$mom.scrollableAreaWidth+"px");if(options.hiddenOnStart){$mom.hide();}}
$mom.find(options.scrollWrapper).scrollLeft($mom.tempStartingPosition);if(options.autoScroll!==""){autoScrollInterval=setInterval(autoScroll,6);}
if(options.autoScroll=="always")
{hideLeftHotSpot();hideRightHotSpot();}
switch(options.visibleHotSpots)
{case"always":makeHotSpotBackgroundsVisible();break;case"onstart":makeHotSpotBackgroundsVisible();hideHotSpotBackgroundsInterval=setInterval(hideHotSpotBackgrounds,(options.hotSpotsVisibleTime*1000));break;default:break;}});$mom.find(options.scrollingHotSpotRight,options.scrollingHotSpotLeft).one('mouseenter',function(){if(options.autoScroll=="onstart"){clearInterval(autoScrollInterval);}});$(window).bind("resize",function(){windowIsResized();});function windowIsResized(){if(!(options.hiddenOnStart))
{$mom.scrollableAreaWidth=0;$mom.find(options.scrollableArea).children((options.countOnlyClass)).each(function(){$mom.scrollableAreaWidth=$mom.scrollableAreaWidth+$(this).outerWidth(true);});$mom.find(options.scrollableArea).css("width",$mom.scrollableAreaWidth+'px');}
$mom.find(options.scrollWrapper).scrollLeft("0");var bodyWidth=$("body").innerWidth();if(options.autoScroll!=="always")
{if($mom.scrollableAreaWidth<bodyWidth)
{hideLeftHotSpot();hideRightHotSpot();}
else
{showHideHotSpots();}}}
function hideLeftHotSpot(){$mom.find(options.scrollingHotSpotLeft).hide();}
function hideRightHotSpot(){$mom.find(options.scrollingHotSpotRight).hide();}
function showLeftHotSpot(){$mom.find(options.scrollingHotSpotLeft).show();if(hotSpotWidth<=0){hotSpotWidth=$mom.find(options.scrollingHotSpotLeft).width();}}
function showRightHotSpot(){$mom.find(options.scrollingHotSpotRight).show();if(hotSpotWidth<=0){hotSpotWidth=$mom.find(options.scrollingHotSpotRight).width();}}
function setHotSpotHeightForIE()
{jQuery.each(jQuery.browser,function(i,val){if(i=="msie"&&jQuery.browser.version.substr(0,1)=="6")
{$mom.find(options.scrollingHotSpotLeft).css("height",($mom.find(options.scrollableArea).innerHeight()));$mom.find(options.scrollingHotSpotRight).css("height",($mom.find(options.scrollableArea).innerHeight()));}});}
$mom.find(options.scrollingHotSpotRight).bind('mousemove',function(e){var x=e.pageX-(this.offsetLeft+motherElementOffset);scrollXpos=Math.round((x/hotSpotWidth)*options.scrollingSpeed);if(scrollXpos===Infinity){scrollXpos=0;}});$mom.find(options.scrollingHotSpotRight).bind('mouseenter',function(){if(options.autoScroll=="onstart"){clearInterval(autoScrollInterval);}
rightScrollInterval=setInterval(doScrollRight,6);});$mom.find(options.scrollingHotSpotRight).bind('mouseout',function(){clearInterval(rightScrollInterval);scrollXpos=0;});$mom.find(options.scrollingHotSpotRight).bind('mousedown',function(){booster=options.mouseDownSpeedBooster;});$("*").bind('mouseup',function(){booster=1;});var doScrollRight=function()
{if(scrollXpos>0){$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()+(scrollXpos*booster));}
showHideHotSpots();};if(options.pauseAutoScroll=="mousedown"&&options.autoScroll=="always")
{$mom.find(options.scrollWrapper).bind('mousedown',function(){clearInterval(autoScrollInterval);});$mom.find(options.scrollWrapper).bind('mouseup',function(){autoScrollInterval=setInterval(autoScroll,6);});}
else if(options.pauseAutoScroll=="mouseover"&&options.autoScroll=="always")
{$mom.find(options.scrollWrapper).bind('mouseover',function(){clearInterval(autoScrollInterval);});$mom.find(options.scrollWrapper).bind('mouseout',function(){autoScrollInterval=setInterval(autoScroll,6);});}
var previousScrollLeft=0;var pingPongDirection="right";var hasChanged=false;var swapAt;var autoScroll=function()
{if(options.autoScroll=="onstart"){showHideHotSpots();}
switch(options.autoScrollDirection)
{case"right":$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()+options.autoScrollSpeed);break;case"left":$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()-options.autoScrollSpeed);break;case"backandforth":previousScrollLeft=$mom.find(options.scrollWrapper).scrollLeft();if(pingPongDirection=="right"){$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()+options.autoScrollSpeed);}
else{$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()-options.autoScrollSpeed);}
if(previousScrollLeft===$mom.find(options.scrollWrapper).scrollLeft())
{if(pingPongDirection=="right"){pingPongDirection="left";}
else{pingPongDirection="right";}}
break;case"endlessloop":previousScrollLeft=$mom.find(options.scrollWrapper).scrollLeft();if(!(hasChanged))
{if(options.startAtElementId!==""){swapAt=$mom.find(options.scrollWrapper).scrollLeft()+$("#"+options.startAtElementId).outerWidth();}
else{swapAt=$mom.find(options.scrollWrapper).scrollLeft()+$mom.find(options.scrollableArea).children(":first-child").outerWidth();}
hasChanged=true;}
$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()+options.autoScrollSpeed);if((swapAt<=$mom.find(options.scrollWrapper).scrollLeft())||((options.startAtElementId!=="")&&(previousScrollLeft===$mom.find(options.scrollWrapper).scrollLeft())))
{$mom.find(options.scrollableArea).append($mom.find(options.scrollableArea).children(":first-child").clone());$mom.find(options.scrollWrapper).scrollLeft(($mom.find(options.scrollWrapper).scrollLeft()-$mom.find(options.scrollableArea).children(":first-child").outerWidth()));$mom.find(options.scrollableArea).children(":first-child").remove();hasChanged=false;}
break;default:break;}};$mom.find(options.scrollingHotSpotLeft).bind('mousemove',function(e){var x=$mom.find(options.scrollingHotSpotLeft).innerWidth()-(e.pageX-motherElementOffset);scrollXpos=Math.round((x/hotSpotWidth)*options.scrollingSpeed);if(scrollXpos===Infinity)
{scrollXpos=0;}});$mom.find(options.scrollingHotSpotLeft).bind('mouseenter',function(){if(options.autoScroll=="onstart"){clearInterval(autoScrollInterval);}
leftScrollInterval=setInterval(doScrollLeft,6);});$mom.find(options.scrollingHotSpotLeft).bind('mouseout',function(){clearInterval(leftScrollInterval);scrollXpos=0;});$mom.find(options.scrollingHotSpotLeft).bind('mousedown',function(){booster=options.mouseDownSpeedBooster;});var doScrollLeft=function()
{if(scrollXpos>0){$mom.find(options.scrollWrapper).scrollLeft($mom.find(options.scrollWrapper).scrollLeft()-(scrollXpos*booster));}
showHideHotSpots();};function showHideHotSpots()
{if($mom.find(options.scrollWrapper).scrollLeft()===0)
{hideLeftHotSpot();showRightHotSpot();}
else if(($mom.scrollableAreaWidth)<=($mom.find(options.scrollWrapper).innerWidth()+$mom.find(options.scrollWrapper).scrollLeft()))
{hideRightHotSpot();showLeftHotSpot();}
else
{showRightHotSpot();showLeftHotSpot();}}
function makeHotSpotBackgroundsVisible()
{$mom.find(options.scrollingHotSpotLeft).addClass("scrollingHotSpotLeftVisible");$mom.find(options.scrollingHotSpotRight).addClass("scrollingHotSpotRightVisible");}
function hideHotSpotBackgrounds()
{clearInterval(hideHotSpotBackgroundsInterval);$mom.find(options.scrollingHotSpotLeft).fadeTo("slow",0.0,function(){$mom.find(options.scrollingHotSpotLeft).removeClass("scrollingHotSpotLeftVisible");});$mom.find(options.scrollingHotSpotRight).fadeTo("slow",0.0,function(){$mom.find(options.scrollingHotSpotRight).removeClass("scrollingHotSpotRightVisible");});}});};})(jQuery);
/********************   js/jquery.autoscroll.js   ********************/
/*
 * jQuery autoscroll plugin
 *
 * Copyright 2008 Wilker Lucio <wilkerlucio@gmail.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License. 
 */

AUTOSCROLL_X = 1;
AUTOSCROLL_Y = 2;
AUTOSCROLL_BOTH = 3;

(function($) {
	$.autoscroll = {};
	
	$.autoscroll.Easemove = function() {
		this.current_point = 0;
		this.end_point = 0;
		this.running = false;
		this.speed = .07;
		
		this.onmove = function() {};
	};
	
	$.autoscroll.Easemove.prototype = {
		set_end_point: function(point) {
			this.end_point = point;
			
			if (this.running) {
				return;
			};
			
			this.running = true;
			this.move();
		},
		
		move: function() {
			var distance = this.end_point - this.current_point;
			var move = distance * this.speed;
			
			this.current_point += move;
			
			this.onmove(this.current_point);
			
			if (Math.round(this.current_point) != this.end_point) {
				var t = this;
				
				setTimeout(function() {
					t.move();
				}, 20);
			} else {
				this.running = false;
			}
		}
	};
	
	$.autoscroll.zip = function() {
		var items = $.makeArray(arguments);
		var callback = items.shift();
		var results = [];
		
		for (var i = 0; i < items[0].length; i++) {
			var line = [];
			
			for (var x = 0; x < items.length; x++) {
				line.push(items[x][i]);
			};
			
			results.push(callback.apply(this, line));
		};
		
		return results;
	};
	
	$.fn.autoscroll = function(mode, degree_window, speed) {
		mode = mode || AUTOSCROLL_BOTH;
		degree_window = degree_window || [20, 20];
		speed = speed || .07;
		
		var directions = ['left', 'top'];
		
		return this.each(function() {
			var container = $(this);
			var inner_container = container.children(':first');
			
			var ava_size = [container.width(), container.height()];
			
			//workaround to make possible to determine real size of content
			var position = inner_container.css('position');
			
			inner_container.css('position', 'absolute');
			
			var real_size = [inner_container.width(), inner_container.height()];
			
			
			if(container.height()<inner_container.height()){
				container.addClass("scrollable");
			}
			if(container.width()<inner_container.width()){
				container.addClass("scrollableH");
			}
			
			//back to previous state
			inner_container.css('position', position);
			
			var offset = container.offset();
			offset = [offset.left, offset.top];
			
			var easemove = [];
			
			jQuery.each(directions, function(i, v) {
				var obj = new jQuery.autoscroll.Easemove();
				obj.speed = speed;
				
				if(container.hasClass("scrollable")||container.hasClass("scrollableH")){
					obj.onmove = function(position) {
						inner_container.css('margin-' + v, -Math.round(position));
					};
				}
				
				easemove.push(obj);
			});
			
			container.mousemove(function(event) {
				var mouse = [event.pageX, event.pageY];
				
				jQuery.autoscroll.zip(function(m, o, a, r, e, w, t) {
					if (!(t & mode)) return;
					
					var d = m - o;
					d = Math.min(Math.max(d - w, 0), a - w * 2);
					
					var f = d / (a - w * 2);
					var real = f * (r - a);
					
					e.set_end_point(real);
				}, mouse, offset, ava_size, real_size, easemove, degree_window, [AUTOSCROLL_X, AUTOSCROLL_Y]);
			});
		});
	};
})(jQuery);
/********************   js/jquery.pukkaPNGFix.js   ********************/

(function($) {

	jQuery.fn.pukkaPNGFix = function(settings) {

		if(/MSIE 6/.test(navigator.appVersion)) {
			
			settings = jQuery.extend({
				interactiveDescendentsSelector: '> *',
				wrapperClass: 'ie-png-bug-wrapper'
			}, settings);
			
			var elem = document.createElement("div");
			elem.className = settings.wrapperClass;
			elem.style.zoom = 1;
			elem.style.position = 'static';
			elem.style.width = '100%';
			elem.style.height = '100%';
			
			this.each(function() {
				$elem = jQuery(this);
				var cssIMG = $elem.css('background-image');
		
				if(/\.png(.)\)$/.test(cssIMG)) {
					var pngIMG = cssIMG.substring(5, cssIMG.length-2);
					var sizing = $elem.css('background-repeat') == 'no-repeat' ? 'crop' : 'scale';
					elem.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+pngIMG+'",sizingMethod="'+sizing+'")';
					
					jQuery(settings.interactiveDescendentsSelector, $elem).each(function(){
						if(jQuery(this).css('position') != 'absolute')
							this.style.position = 'relative';
					});
					
					var position = $elem.css('position');
					if(position == 'absolute' || position == 'relative') {
						$elem.wrapInner(elem).find('.'+settings.wrapperClass).css({
							paddingTop: $elem.css('padding-top'),
							paddingRight: $elem.css('padding-right'),
							paddingBottom: $elem.css('padding-bottom'),
							paddingLeft: $elem.css('padding-left')
						});
						
						$elem.css({
							backgroundImage: 'none',
							padding: 0
						});
					}
				}
			});
			
		}
		return jQuery(this);
	};

})(jQuery);

/********************   js/jquery.fancybox.js   ********************/
/*
 * FancyBox - simple and fancy jQuery plugin
 * Examples and documentation at: http://fancy.klade.lv/
 * Version: 1.2.1 (13/03/2009)
 * Copyright (c) 2009 Janis Skarnelis
 * Licensed under the MIT License: http://en.wikipedia.org/wiki/MIT_License
 * Requires: jQuery v1.3+
*/
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}(';(7($){$.b.2Q=7(){u B.2t(7(){9 1J=$(B).n(\'2Z\');5(1J.1c(/^3w\\(["\']?(.*\\.2p)["\']?\\)$/i)){1J=3t.$1;$(B).n({\'2Z\':\'45\',\'2o\':"3W:3R.4m.4d(3h=F, 3T="+($(B).n(\'41\')==\'2J-3Z\'?\'4c\':\'3N\')+", Q=\'"+1J+"\')"}).2t(7(){9 1b=$(B).n(\'1b\');5(1b!=\'2e\'&&1b!=\'2n\')$(B).n(\'1b\',\'2n\')})}})};9 A,4,16=D,s=1t 1o,1w,1v=1,1y=/\\.(3A|3Y|2p|3c|3d)(.*)?$/i;9 P=($.2q.3K&&2f($.2q.3z.2k(0,1))<8);$.b.c=7(Y){Y=$.3x({},$.b.c.2R,Y);9 2s=B;7 2h(){A=B;4=Y;2r();u D};7 2r(){5(16)u;5($.1O(4.2c)){4.2c()}4.j=[];4.h=0;5(Y.j.N>0){4.j=Y.j}t{9 O={};5(!A.1H||A.1H==\'\'){9 O={d:A.d,X:A.X};5($(A).1G("1m:1D").N){O.1a=$(A).1G("1m:1D")}4.j.2j(O)}t{9 Z=$(2s).2o("a[1H="+A.1H+"]");9 O={};3C(9 i=0;i<Z.N;i++){O={d:Z[i].d,X:Z[i].X};5($(Z[i]).1G("1m:1D").N){O.1a=$(Z[i]).1G("1m:1D")}4.j.2j(O)}3F(4.j[4.h].d!=A.d){4.h++}}}5(4.23){5(P){$(\'1U, 1Q, 1P\').n(\'1S\',\'3s\')}$("#1i").n(\'25\',4.2U).J()}1d()};7 1d(){$("#1f, #1e, #V, #G").S();9 d=4.j[4.h].d;5(d.1c(/#/)){9 U=11.3r.d.3f(\'#\')[0];U=d.3g(U,\'\');U=U.2k(U.2l(\'#\'));1k(\'<6 l="3e">\'+$(U).o()+\'</6>\',4.1I,4.1x)}t 5(d.1c(1y)){s=1t 1o;s.Q=d;5(s.3a){1K()}t{$.b.c.34();$(s).x().14(\'3b\',7(){$(".I").S();1K()})}}t 5(d.1c("17")||A.3j.2l("17")>=0){1k(\'<17 l="35" 3q="$.b.c.38()" 3o="3n\'+C.T(C.3l()*3m)+\'" 2K="0" 3E="0" Q="\'+d+\'"></17>\',4.1I,4.1x)}t{$.4p(d,7(2m){1k(\'<6 l="3L">\'+2m+\'</6>\',4.1I,4.1x)})}};7 1K(){5(4.30){9 w=$.b.c.1n();9 r=C.1M(C.1M(w[0]-36,s.g)/s.g,C.1M(w[1]-4b,s.f)/s.f);9 g=C.T(r*s.g);9 f=C.T(r*s.f)}t{9 g=s.g;9 f=s.f}1k(\'<1m 48="" l="49" Q="\'+s.Q+\'" />\',g,f)};7 2F(){5((4.j.N-1)>4.h){9 d=4.j[4.h+1].d;5(d.1c(1y)){1A=1t 1o();1A.Q=d}}5(4.h>0){9 d=4.j[4.h-1].d;5(d.1c(1y)){1A=1t 1o();1A.Q=d}}};7 1k(1j,g,f){16=F;9 L=4.2Y;5(P){$("#q")[0].1E.2u("f");$("#q")[0].1E.2u("g")}5(L>0){g+=L*2;f+=L*2;$("#q").n({\'v\':L+\'z\',\'2E\':L+\'z\',\'2i\':L+\'z\',\'y\':L+\'z\',\'g\':\'2B\',\'f\':\'2B\'});5(P){$("#q")[0].1E.2C(\'f\',\'(B.2D.4j - 20)\');$("#q")[0].1E.2C(\'g\',\'(B.2D.3S - 20)\')}}t{$("#q").n({\'v\':0,\'2E\':0,\'2i\':0,\'y\':0,\'g\':\'2z%\',\'f\':\'2z%\'})}5($("#k").1u(":19")&&g==$("#k").g()&&f==$("#k").f()){$("#q").1Z("2N",7(){$("#q").1C().1F($(1j)).21("1s",7(){1g()})});u}9 w=$.b.c.1n();9 2v=(g+36)>w[0]?w[2]:(w[2]+C.T((w[0]-g-36)/2));9 2w=(f+1z)>w[1]?w[3]:(w[3]+C.T((w[1]-f-1z)/2));9 K={\'y\':2v,\'v\':2w,\'g\':g+\'z\',\'f\':f+\'z\'};5($("#k").1u(":19")){$("#q").1Z("1s",7(){$("#q").1C();$("#k").24(K,4.2X,4.2T,7(){$("#q").1F($(1j)).21("1s",7(){1g()})})})}t{5(4.1W>0&&4.j[4.h].1a!==1L){$("#q").1C().1F($(1j));9 M=4.j[4.h].1a;9 15=$.b.c.1R(M);$("#k").n({\'y\':(15.y-18)+\'z\',\'v\':(15.v-18)+\'z\',\'g\':$(M).g(),\'f\':$(M).f()});5(4.1X){K.25=\'J\'}$("#k").24(K,4.1W,4.2W,7(){1g()})}t{$("#q").S().1C().1F($(1j)).J();$("#k").n(K).21("1s",7(){1g()})}}};7 2y(){5(4.h!=0){$("#1e, #2O").x().14("R",7(e){e.2x();4.h--;1d();u D});$("#1e").J()}5(4.h!=(4.j.N-1)){$("#1f, #2M").x().14("R",7(e){e.2x();4.h++;1d();u D});$("#1f").J()}};7 1g(){2y();2F();$(W).1B(7(e){5(e.29==27){$.b.c.1l();$(W).x("1B")}t 5(e.29==37&&4.h!=0){4.h--;1d();$(W).x("1B")}t 5(e.29==39&&4.h!=(4.j.N-1)){4.h++;1d();$(W).x("1B")}});5(4.1r){$(11).14("1N 1T",$.b.c.2g)}t{$("6#k").n("1b","2e")}5(4.2b){$("#22").R($.b.c.1l)}$("#1i, #V").14("R",$.b.c.1l);$("#V").J();5(4.j[4.h].X!==1L&&4.j[4.h].X.N>0){$(\'#G 6\').o(4.j[4.h].X);$(\'#G\').J()}5(4.23&&P){$(\'1U, 1Q, 1P\',$(\'#q\')).n(\'1S\',\'19\')}5($.1O(4.2a)){4.2a()}16=D};u B.x(\'R\').R(2h)};$.b.c.2g=7(){9 m=$.b.c.1n();$("#k").n(\'y\',(($("#k").g()+36)>m[0]?m[2]:m[2]+C.T((m[0]-$("#k").g()-36)/2)));$("#k").n(\'v\',(($("#k").f()+1z)>m[1]?m[3]:m[3]+C.T((m[1]-$("#k").f()-1z)/2)))};$.b.c.1h=7(H,2A){u 2f($.3I(H.3u?H[0]:H,2A,F))||0};$.b.c.1R=7(H){9 m=H.4g();m.v+=$.b.c.1h(H,\'3k\');m.v+=$.b.c.1h(H,\'3J\');m.y+=$.b.c.1h(H,\'3H\');m.y+=$.b.c.1h(H,\'3D\');u m};$.b.c.38=7(){$(".I").S();$("#35").J()};$.b.c.1n=7(){u[$(11).g(),$(11).f(),$(W).3i(),$(W).3p()]};$.b.c.2G=7(){5(!$("#I").1u(\':19\')){33(1w);u}$("#I > 6").n(\'v\',(1v*-40)+\'z\');1v=(1v+1)%12};$.b.c.34=7(){33(1w);9 m=$.b.c.1n();$("#I").n({\'y\':((m[0]-40)/2+m[2]),\'v\':((m[1]-40)/2+m[3])}).J();$("#I").14(\'R\',$.b.c.1l);1w=3Q($.b.c.2G,3X)};$.b.c.1l=7(){16=F;$(s).x();$("#1i, #V").x();5(4.2b){$("#22").x()}$("#V, .I, #1e, #1f, #G").S();5(4.1r){$(11).x("1N 1T")}1q=7(){$("#1i, #k").S();5(4.1r){$(11).x("1N 1T")}5(P){$(\'1U, 1Q, 1P\').n(\'1S\',\'19\')}5($.1O(4.1V)){4.1V()}16=D};5($("#k").1u(":19")!==D){5(4.26>0&&4.j[4.h].1a!==1L){9 M=4.j[4.h].1a;9 15=$.b.c.1R(M);9 K={\'y\':(15.y-18)+\'z\',\'v\':(15.v-18)+\'z\',\'g\':$(M).g(),\'f\':$(M).f()};5(4.1X){K.25=\'S\'}$("#k").31(D,F).24(K,4.26,4.2S,1q)}t{$("#k").31(D,F).1Z("2N",1q)}}t{1q()}u D};$.b.c.2V=7(){9 o=\'\';o+=\'<6 l="1i"></6>\';o+=\'<6 l="22">\';o+=\'<6 p="I" l="I"><6></6></6>\';o+=\'<6 l="k">\';o+=\'<6 l="2I">\';o+=\'<6 l="V"></6>\';o+=\'<6 l="E"><6 p="E 44"></6><6 p="E 43"></6><6 p="E 42"></6><6 p="E 3V"></6><6 p="E 3U"></6><6 p="E 3O"></6><6 p="E 3M"></6><6 p="E 3P"></6></6>\';o+=\'<a d="2P:;" l="1e"><1p p="1Y" l="2O"></1p></a><a d="2P:;" l="1f"><1p p="1Y" l="2M"></1p></a>\';o+=\'<6 l="q"></6>\';o+=\'<6 l="G"></6>\';o+=\'</6>\';o+=\'</6>\';o+=\'</6>\';$(o).2H("46");$(\'<32 4i="0" 4h="0" 4k="0"><2L><13 p="G" l="4l"></13><13 p="G" l="4o"><6></6></13><13 p="G" l="4n"></13></2L></32>\').2H(\'#G\');5(P){$("#2I").47(\'<17 p="4a" 4e="2J" 2K="0"></17>\');$("#V, .E, .G, .1Y").2Q()}};$.b.c.2R={2Y:10,30:F,1X:D,1W:0,26:0,2X:3G,2W:\'28\',2S:\'28\',2T:\'28\',1I:3B,1x:3v,23:F,2U:0.3,2b:F,1r:F,j:[],2c:2d,2a:2d,1V:2d};$(W).3y(7(){$.b.c.2V()})})(4f);',62,274,'||||opts|if|div|function||var||fn|fancybox|href||height|width|itemCurrent||itemArray|fancy_outer|id|pos|css|html|class|fancy_content||imagePreloader|else|return|top||unbind|left|px|elem|this|Math|false|fancy_bg|true|fancy_title|el|fancy_loading|show|itemOpts|pad|orig_item|length|item|isIE|src|click|hide|round|target|fancy_close|document|title|settings|subGroup||window||td|bind|orig_pos|busy|iframe||visible|orig|position|match|_change_item|fancy_left|fancy_right|_finish|getNumeric|fancy_overlay|value|_set_content|close|img|getViewport|Image|span|__cleanup|centerOnScroll|normal|new|is|loadingFrame|loadingTimer|frameHeight|imageRegExp|50|objNext|keydown|empty|first|style|append|children|rel|frameWidth|image|_proceed_image|undefined|min|resize|isFunction|select|object|getPosition|visibility|scroll|embed|callbackOnClose|zoomSpeedIn|zoomOpacity|fancy_ico|fadeOut||fadeIn|fancy_wrap|overlayShow|animate|opacity|zoomSpeedOut||swing|keyCode|callbackOnShow|hideOnContentClick|callbackOnStart|null|absolute|parseInt|scrollBox|_initialize|bottom|push|substr|indexOf|data|relative|filter|png|browser|_start|matchedGroup|each|removeExpression|itemLeft|itemTop|stopPropagation|_set_navigation|100|prop|auto|setExpression|parentNode|right|_preload_neighbor_images|animateLoading|appendTo|fancy_inner|no|frameborder|tr|fancy_right_ico|fast|fancy_left_ico|javascript|fixPNG|defaults|easingOut|easingChange|overlayOpacity|build|easingIn|zoomSpeedChange|padding|backgroundImage|imageScale|stop|table|clearInterval|showLoading|fancy_frame|||showIframe||complete|load|bmp|jpeg|fancy_div|split|replace|enabled|scrollLeft|className|paddingTop|random|1000|fancy_iframe|name|scrollTop|onload|location|hidden|RegExp|jquery|355|url|extend|ready|version|jpg|425|for|borderLeftWidth|hspace|while|300|paddingLeft|curCSS|borderTopWidth|msie|fancy_ajax|fancy_bg_w|scale|fancy_bg_sw|fancy_bg_nw|setInterval|DXImageTransform|clientWidth|sizingMethod|fancy_bg_s|fancy_bg_se|progid|66|gif|repeat||backgroundRepeat|fancy_bg_e|fancy_bg_ne|fancy_bg_n|none|body|prepend|alt|fancy_img|fancy_bigIframe|60|crop|AlphaImageLoader|scrolling|jQuery|offset|cellpadding|cellspacing|clientHeight|border|fancy_title_left|Microsoft|fancy_title_right|fancy_title_main|get'.split('|'),0,{}))

/********************   js/header.JavaScript.js   ********************/
/**
 * Creates a hover-tooltip for HTML DOM elements (such as images).  In the case of an image,
 * this hover-tooltip will override that which is automatically generated from the image's
 * title attribute.  This is useful when used with lightbox, for example.
 *
 * @param {Element} elem an HTML DOM element
 * @param {String} tooltip the tooltip to be displayed
 * 
 * Usage:
 * 	<a href="imagepath" title="imagetitle" onmouseover="condorjs.toggleTitle(this, 'Click to zoom')"></a>
 */
condor.toggleTitle = function(elem, tooltip) {
	elem.origTitle = elem.title ? elem.title : "";
	elem.tooltip = tooltip ? tooltip : "";
	elem.onmouseover = function() {this.title = this.tooltip};
	elem.onfocus = function() {this.title = this.origTitle};
	elem.onmouseout = elem.onfocus;
	elem.onmouseover();
}


/**
 * Adds mouseover/hover functionality to specified elements by adding and removing a "mouseover" class.
 * 
 * @param {Element} elem an HTML DOM element
 * 
 * Usage:
 * 	<styles>
 * 	li.mouseover, li:hover {
 * 		background-color: green;
 * 	}
 * 	</style>
 * 	<li onmouseover="condorjs.mouseover_init(this)">		
 */		
condor.mouseover_init = function(elem) {
	if(!/MSIE (5|6)/.test(navigator.userAgent)) 
	// No need to add mouseover events. Browser probably already understands :hover
	{
		elem.onmouseover = null;
		return;
	}

	elem.onmouseover = function() {addClass(this, 'mouseover');}
	elem.onmouseout = function() {removeClass(this, 'mouseover');}
}



condor.popLightbox = function(imgURL) {
	var elem = document.createElement("a");
	elem.rel = "lightbox";
	elem.href = imgURL;
	myLightbox.start(elem); /* myLightbox is a global variable declared by Lightbox */
}

/********************   js/AC_RunActiveContent.js   ********************/
//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblclick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

/********************   js/time.js   ********************/
/***********************************************
* Local Time script- © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var weekdaystxt=["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"]

function showLocalTime(container, servermode, offsetMinutes, displayversion, initial_server_time)
// initial_server_time : format 'November 30, 2006 20:51:51'
{
	if (!document.getElementById || !document.getElementById(container)) return
	this.container=document.getElementById(container)
	this.displayversion=displayversion
	var servertimestring=(servermode=="server-php")? initial_server_time : (servermode=="server-ssi")? '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' : '<%= Now() %>'
	this.localtime=this.serverdate=new Date(servertimestring)
	this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000) //add user offset to server time
	this.updateTime()
	this.updateContainer()
}

showLocalTime.prototype.updateTime=function(){
	var thisobj=this
	this.localtime.setSeconds(this.localtime.getSeconds()+1)
	setTimeout(function(){thisobj.updateTime()}, 1000) //update time every second
}

showLocalTime.prototype.updateContainer=function(){
	var thisobj=this
	if (this.displayversion=="long")
		this.container.innerHTML=this.localtime.toLocaleString()
	else{
		var hour=this.localtime.getHours()
		var minutes=this.localtime.getMinutes()
		var seconds=this.localtime.getSeconds()
		var ampm=(hour>=12)? "pm" : "am"
		var dayofweek=weekdaystxt[this.localtime.getDay()]
		//this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+"&nbsp;"+ampm+" ("+dayofweek+")"
		//this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+"&nbsp;"+ampm
		this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+"&nbsp;"+ampm
	}
	setTimeout(function(){thisobj.updateContainer()}, 1000) //update container every second
}

function formatField(num, isHour){
	if (typeof isHour!="undefined"){ //if this is the hour field
		var hour=(num>12)? num-12 : num
		return (hour==0)? 12 : hour
	}
	return (num<=9)? "0"+num : num//if this is minute or sec field
}
/********************   js/object.Weather.js   ********************/
function Weather(id, location, /*optional*/ source) {

	var that = this;
	var source = source || 'yahoo';
	var socketVars = {
		template: 'feed.weather.php'
	};
	var weatherFeedUrl = prepSocketCall('core', 'callTemplate', socketVars);
	weatherFeedUrl += '&source=' + source;
	var tempContainer = document.getElementById(id);

	if (!tempContainer) {
		throw new Error();
	}
	switch(source) {
		case 'yahoo':
			weatherFeedUrl += '&loc=' + location;
			break;
		default:
			break;
	}

	var printWeather = function(response) {
		var cent = response.getElementsByTagName('cent')[0].childNodes[0].nodeValue;
		var fahr = response.getElementsByTagName('fahr')[0].childNodes[0].nodeValue;
		var text = response.getElementsByTagName('text')[0].childNodes[0].nodeValue;
		var weathertype = response.getElementsByTagName('weathertype')[0].childNodes[0].nodeValue;
		var sunrise = response.getElementsByTagName('sunrise')[0].childNodes[0].nodeValue;

		spaceEl = document.createTextNode(' ');

		spanCentEl = document.createElement('span');
		spanCentEl.className = 'temperature';
		spanCentEl.appendChild(document.createTextNode(cent+'\u00B0')); //&deg;
		spanCentUnitEl = document.createElement('span');
		spanCentUnitEl.className = 'unit';
		spanCentUnitEl.appendChild(document.createTextNode('C'));
		spanCentEl.appendChild(spanCentUnitEl);

		spanTextEl = document.createElement('span');
		spanTextEl.className = 'text';
		spanTextEl.appendChild(document.createTextNode(text));
		
		spanWeathertypeEl = document.createElement('img');
		spanWeathertypeEl.className = 'weathertype';
		spanWeathertypeEl.src = 'templates/main/images/yahooWeather/'+weathertype+'m.png';
		//spanCodeEl.appendChild(document.createTextNode(code));

		
		
		if (tempContainer.childNodes.length>=1) { //IE6 needs >= instead of ==
			tempContainer.replaceChild(spanCentEl, tempContainer.childNodes[0]);
		} else {
			tempContainer.appendChild(spanCentEl);
		}
		tempContainer.appendChild(spaceEl);
		tempContainer.appendChild(spanTextEl);
		tempContainer.appendChild(spanWeathertypeEl);
	}

	this.init = function() {
		HTTP.getXML(weatherFeedUrl, printWeather);
	}
}
/********************   libs/jscalendar/calendar.js   ********************/
/*  Copyright Mihai Bazon, 2002-2005  |  www.bazon.net/mishoo
 * -----------------------------------------------------------
 *
 * The DHTML Calendar, version 1.0 "It is happening again"
 *
 * Details and latest version at:
 * www.dynarch.com/projects/calendar
 *
 * This script is developed by Dynarch.com.  Visit us at www.dynarch.com.
 *
 * This script is distributed under the GNU Lesser General Public License.
 * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
 */

// $Id: calendar.js,v 1.53 2006/02/11 12:32:59 mishoo Exp $

/** The Calendar object constructor. */
Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
	// member variables
	this.activeDiv = null;
	this.currentDateEl = null;
	this.getDateStatus = null;
	this.getDateToolTip = null;
	this.getDateText = null;
	this.timeout = null;
	this.onSelected = onSelected || null;
	this.onClose = onClose || null;
	this.dragging = false;
	this.hidden = false;
	this.minYear = 1970;
	this.maxYear = 2050;
	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
	this.isPopup = true;
	this.weekNumbers = true;
	this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD; // 0 for Sunday, 1 for Monday, etc.
	this.showsOtherMonths = false;
	this.dateStr = dateStr;
	this.ar_days = null;
	this.showsTime = false;
	this.time24 = true;
	this.yearStep = 2;
	this.hiliteToday = true;
	this.multiple = null;
	// HTML elements
	this.table = null;
	this.element = null;
	this.tbody = null;
	this.firstdayname = null;
	// Combo boxes
	this.monthsCombo = null;
	this.yearsCombo = null;
	this.hilitedMonth = null;
	this.activeMonth = null;
	this.hilitedYear = null;
	this.activeYear = null;
	// Information
	this.dateClicked = false;

	// one-time initializations
	if (typeof Calendar._SDN == "undefined") {
		// table of short day names
		if (typeof Calendar._SDN_len == "undefined")
			Calendar._SDN_len = 3;
		var ar = new Array();
		for (var i = 8; i > 0;) {
			ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
		}
		Calendar._SDN = ar;
		// table of short month names
		if (typeof Calendar._SMN_len == "undefined")
			Calendar._SMN_len = 3;
		ar = new Array();
		for (var i = 12; i > 0;) {
			ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
		}
		Calendar._SMN = ar;
	}
};

// ** constants

/// "static", needed for event handlers.
Calendar._C = null;

/// detect a special case of "web browser"
Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
		   !/opera/i.test(navigator.userAgent) );

Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );

/// detect Opera browser
Calendar.is_opera = /opera/i.test(navigator.userAgent);

/// detect KHTML-based browsers
Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);

// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
//        library, at some point.

Calendar.getAbsolutePos = function(el) {
	var SL = 0, ST = 0;
	var is_div = /^div$/i.test(el.tagName);
	if (is_div && el.scrollLeft)
		SL = el.scrollLeft;
	if (is_div && el.scrollTop)
		ST = el.scrollTop;
	var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
	if (el.offsetParent) {
		var tmp = this.getAbsolutePos(el.offsetParent);
		r.x += tmp.x;
		r.y += tmp.y;
	}
	return r;
};

Calendar.isRelated = function (el, evt) {
	var related = evt.relatedTarget;
	if (!related) {
		var type = evt.type;
		if (type == "mouseover") {
			related = evt.fromElement;
		} else if (type == "mouseout") {
			related = evt.toElement;
		}
	}
	while (related) {
		if (related == el) {
			return true;
		}
		related = related.parentNode;
	}
	return false;
};

Calendar.removeClass = function(el, className) {
	if (!(el && el.className)) {
		return;
	}
	var cls = el.className.split(" ");
	var ar = new Array();
	for (var i = cls.length; i > 0;) {
		if (cls[--i] != className) {
			ar[ar.length] = cls[i];
		}
	}
	el.className = ar.join(" ");
};

Calendar.addClass = function(el, className) {
	Calendar.removeClass(el, className);
	el.className += " " + className;
};

// FIXME: the following 2 functions totally suck, are useless and should be replaced immediately.
Calendar.getElement = function(ev) {
	var f = Calendar.is_ie ? window.event.srcElement : ev.currentTarget;
	while (f.nodeType != 1 || /^div$/i.test(f.tagName))
		f = f.parentNode;
	return f;
};

Calendar.getTargetElement = function(ev) {
	var f = Calendar.is_ie ? window.event.srcElement : ev.target;
	while (f.nodeType != 1)
		f = f.parentNode;
	return f;
};

Calendar.stopEvent = function(ev) {
	ev || (ev = window.event);
	if (Calendar.is_ie) {
		ev.cancelBubble = true;
		ev.returnValue = false;
	} else {
		ev.preventDefault();
		ev.stopPropagation();
	}
	return false;
};

Calendar.addEvent = function(el, evname, func) {
	if (el.attachEvent) { // IE
		el.attachEvent("on" + evname, func);
	} else if (el.addEventListener) { // Gecko / W3C
		el.addEventListener(evname, func, true);
	} else {
		el["on" + evname] = func;
	}
};

Calendar.removeEvent = function(el, evname, func) {
	if (el.detachEvent) { // IE
		el.detachEvent("on" + evname, func);
	} else if (el.removeEventListener) { // Gecko / W3C
		el.removeEventListener(evname, func, true);
	} else {
		el["on" + evname] = null;
	}
};

Calendar.createElement = function(type, parent) {
	var el = null;
	if (document.createElementNS) {
		// use the XHTML namespace; IE won't normally get here unless
		// _they_ "fix" the DOM2 implementation.
		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
	} else {
		el = document.createElement(type);
	}
	if (typeof parent != "undefined") {
		parent.appendChild(el);
	}
	return el;
};

// END: UTILITY FUNCTIONS

// BEGIN: CALENDAR STATIC FUNCTIONS

/** Internal -- adds a set of events to make some element behave like a button. */
Calendar._add_evs = function(el) {
	with (Calendar) {
		addEvent(el, "mouseover", dayMouseOver);
		addEvent(el, "mousedown", dayMouseDown);
		addEvent(el, "mouseout", dayMouseOut);
		if (is_ie) {
			addEvent(el, "dblclick", dayMouseDblClick);
			el.setAttribute("unselectable", true);
		}
	}
};

Calendar.findMonth = function(el) {
	if (typeof el.month != "undefined") {
		return el;
	} else if (typeof el.parentNode.month != "undefined") {
		return el.parentNode;
	}
	return null;
};

Calendar.findYear = function(el) {
	if (typeof el.year != "undefined") {
		return el;
	} else if (typeof el.parentNode.year != "undefined") {
		return el.parentNode;
	}
	return null;
};

Calendar.showMonthsCombo = function () {
	var cal = Calendar._C;
	if (!cal) {
		return false;
	}
	var cal = cal;
	var cd = cal.activeDiv;
	var mc = cal.monthsCombo;
	if (cal.hilitedMonth) {
		Calendar.removeClass(cal.hilitedMonth, "hilite");
	}
	if (cal.activeMonth) {
		Calendar.removeClass(cal.activeMonth, "active");
	}
	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
	Calendar.addClass(mon, "active");
	cal.activeMonth = mon;
	var s = mc.style;
	s.display = "block";
	if (cd.navtype < 0)
		s.left = cd.offsetLeft + "px";
	else {
		var mcw = mc.offsetWidth;
		if (typeof mcw == "undefined")
			// Konqueror brain-dead techniques
			mcw = 50;
		s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
	}
	s.top = (cd.offsetTop + cd.offsetHeight) + "px";
};

Calendar.showYearsCombo = function (fwd) {
	var cal = Calendar._C;
	if (!cal) {
		return false;
	}
	var cal = cal;
	var cd = cal.activeDiv;
	var yc = cal.yearsCombo;
	if (cal.hilitedYear) {
		Calendar.removeClass(cal.hilitedYear, "hilite");
	}
	if (cal.activeYear) {
		Calendar.removeClass(cal.activeYear, "active");
	}
	cal.activeYear = null;
	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
	var yr = yc.firstChild;
	var show = false;
	for (var i = 12; i > 0; --i) {
		if (Y >= cal.minYear && Y <= cal.maxYear) {
			yr.innerHTML = Y;
			yr.year = Y;
			yr.style.display = "block";
			show = true;
		} else {
			yr.style.display = "none";
		}
		yr = yr.nextSibling;
		Y += fwd ? cal.yearStep : -cal.yearStep;
	}
	if (show) {
		var s = yc.style;
		s.display = "block";
		if (cd.navtype < 0)
			s.left = cd.offsetLeft + "px";
		else {
			var ycw = yc.offsetWidth;
			if (typeof ycw == "undefined")
				// Konqueror brain-dead techniques
				ycw = 50;
			s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
		}
		s.top = (cd.offsetTop + cd.offsetHeight) + "px";
	}
};

// event handlers

Calendar.tableMouseUp = function(ev) {
	var cal = Calendar._C;
	if (!cal) {
		return false;
	}
	if (cal.timeout) {
		clearTimeout(cal.timeout);
	}
	var el = cal.activeDiv;
	if (!el) {
		return false;
	}
	var target = Calendar.getTargetElement(ev);
	ev || (ev = window.event);
	Calendar.removeClass(el, "active");
	if (target == el || target.parentNode == el) {
		Calendar.cellClick(el, ev);
	}
	var mon = Calendar.findMonth(target);
	var date = null;
	if (mon) {
		date = new Date(cal.date);
		if (mon.month != date.getMonth()) {
			date.setMonth(mon.month);
			cal.setDate(date);
			cal.dateClicked = false;
			cal.callHandler();
		}
	} else {
		var year = Calendar.findYear(target);
		if (year) {
			date = new Date(cal.date);
			if (year.year != date.getFullYear()) {
				date.setFullYear(year.year);
				cal.setDate(date);
				cal.dateClicked = false;
				cal.callHandler();
			}
		}
	}
	with (Calendar) {
		removeEvent(document, "mouseup", tableMouseUp);
		removeEvent(document, "mouseover", tableMouseOver);
		removeEvent(document, "mousemove", tableMouseOver);
		cal._hideCombos();
		_C = null;
		return stopEvent(ev);
	}
};

Calendar.tableMouseOver = function (ev) {
	var cal = Calendar._C;
	if (!cal) {
		return;
	}
	var el = cal.activeDiv;
	var target = Calendar.getTargetElement(ev);
	if (target == el || target.parentNode == el) {
		Calendar.addClass(el, "hilite active");
		Calendar.addClass(el.parentNode, "rowhilite");
	} else {
		if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
			Calendar.removeClass(el, "active");
		Calendar.removeClass(el, "hilite");
		Calendar.removeClass(el.parentNode, "rowhilite");
	}
	ev || (ev = window.event);
	if (el.navtype == 50 && target != el) {
		var pos = Calendar.getAbsolutePos(el);
		var w = el.offsetWidth;
		var x = ev.clientX;
		var dx;
		var decrease = true;
		if (x > pos.x + w) {
			dx = x - pos.x - w;
			decrease = false;
		} else
			dx = pos.x - x;

		if (dx < 0) dx = 0;
		var range = el._range;
		var current = el._current;
		var count = Math.floor(dx / 10) % range.length;
		for (var i = range.length; --i >= 0;)
			if (range[i] == current)
				break;
		while (count-- > 0)
			if (decrease) {
				if (--i < 0)
					i = range.length - 1;
			} else if ( ++i >= range.length )
				i = 0;
		var newval = range[i];
		el.innerHTML = newval;

		cal.onUpdateTime();
	}
	var mon = Calendar.findMonth(target);
	if (mon) {
		if (mon.month != cal.date.getMonth()) {
			if (cal.hilitedMonth) {
				Calendar.removeClass(cal.hilitedMonth, "hilite");
			}
			Calendar.addClass(mon, "hilite");
			cal.hilitedMonth = mon;
		} else if (cal.hilitedMonth) {
			Calendar.removeClass(cal.hilitedMonth, "hilite");
		}
	} else {
		if (cal.hilitedMonth) {
			Calendar.removeClass(cal.hilitedMonth, "hilite");
		}
		var year = Calendar.findYear(target);
		if (year) {
			if (year.year != cal.date.getFullYear()) {
				if (cal.hilitedYear) {
					Calendar.removeClass(cal.hilitedYear, "hilite");
				}
				Calendar.addClass(year, "hilite");
				cal.hilitedYear = year;
			} else if (cal.hilitedYear) {
				Calendar.removeClass(cal.hilitedYear, "hilite");
			}
		} else if (cal.hilitedYear) {
			Calendar.removeClass(cal.hilitedYear, "hilite");
		}
	}
	return Calendar.stopEvent(ev);
};

Calendar.tableMouseDown = function (ev) {
	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
		return Calendar.stopEvent(ev);
	}
};

Calendar.calDragIt = function (ev) {
	var cal = Calendar._C;
	if (!(cal && cal.dragging)) {
		return false;
	}
	var posX;
	var posY;
	if (Calendar.is_ie) {
		posY = window.event.clientY + document.body.scrollTop;
		posX = window.event.clientX + document.body.scrollLeft;
	} else {
		posX = ev.pageX;
		posY = ev.pageY;
	}
	cal.hideShowCovered();
	var st = cal.element.style;
	st.left = (posX - cal.xOffs) + "px";
	st.top = (posY - cal.yOffs) + "px";
	return Calendar.stopEvent(ev);
};

Calendar.calDragEnd = function (ev) {
	var cal = Calendar._C;
	if (!cal) {
		return false;
	}
	cal.dragging = false;
	with (Calendar) {
		removeEvent(document, "mousemove", calDragIt);
		removeEvent(document, "mouseup", calDragEnd);
		tableMouseUp(ev);
	}
	cal.hideShowCovered();
};

Calendar.dayMouseDown = function(ev) {
	var el = Calendar.getElement(ev);
	if (el.disabled) {
		return false;
	}
	var cal = el.calendar;
	cal.activeDiv = el;
	Calendar._C = cal;
	if (el.navtype != 300) with (Calendar) {
		if (el.navtype == 50) {
			el._current = el.innerHTML;
			addEvent(document, "mousemove", tableMouseOver);
		} else
			addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
		addClass(el, "hilite active");
		addEvent(document, "mouseup", tableMouseUp);
	} else if (cal.isPopup) {
		cal._dragStart(ev);
	}
	if (el.navtype == -1 || el.navtype == 1) {
		if (cal.timeout) clearTimeout(cal.timeout);
		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
	} else if (el.navtype == -2 || el.navtype == 2) {
		if (cal.timeout) clearTimeout(cal.timeout);
		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
	} else {
		cal.timeout = null;
	}
	return Calendar.stopEvent(ev);
};

Calendar.dayMouseDblClick = function(ev) {
	Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
	if (Calendar.is_ie) {
		document.selection.empty();
	}
};

Calendar.dayMouseOver = function(ev) {
	var el = Calendar.getElement(ev);
	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
		return false;
	}
	if (el.ttip) {
		if (el.ttip.substr(0, 1) == "_") {
			el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
		}
		el.calendar.tooltips.innerHTML = el.ttip;
	}
	if (el.navtype != 300) {
		Calendar.addClass(el, "hilite");
		if (el.caldate) {
			Calendar.addClass(el.parentNode, "rowhilite");
			var cal = el.calendar;
			if (cal && cal.getDateToolTip) {
				var d = el.caldate;
				window.status = d;
				el.title = cal.getDateToolTip(d, d.getFullYear(), d.getMonth(), d.getDate());
			}
		}
	}
	return Calendar.stopEvent(ev);
};

Calendar.dayMouseOut = function(ev) {
	with (Calendar) {
		var el = getElement(ev);
		if (isRelated(el, ev) || _C || el.disabled)
			return false;
		removeClass(el, "hilite");
		if (el.caldate)
			removeClass(el.parentNode, "rowhilite");
		if (el.calendar)
			el.calendar.tooltips.innerHTML = _TT["SEL_DATE"];
		// return stopEvent(ev);
	}
};

/**
 *  A generic "click" handler :) handles all types of buttons defined in this
 *  calendar.
 */
Calendar.cellClick = function(el, ev) {
	var cal = el.calendar;
	var closing = false;
	var newdate = false;
	var date = null;
	if (typeof el.navtype == "undefined") {
		if (cal.currentDateEl) {
			Calendar.removeClass(cal.currentDateEl, "selected");
			Calendar.addClass(el, "selected");
			closing = (cal.currentDateEl == el);
			if (!closing) {
				cal.currentDateEl = el;
			}
		}
		cal.date.setDateOnly(el.caldate);
		date = cal.date;
		var other_month = !(cal.dateClicked = !el.otherMonth);
		if (!other_month && !cal.currentDateEl && cal.multiple)
			cal._toggleMultipleDate(new Date(date));
		else
			newdate = !el.disabled;
		// a date was clicked
		if (other_month)
			cal._init(cal.firstDayOfWeek, date);
	} else {
		if (el.navtype == 200) {
			Calendar.removeClass(el, "hilite");
			cal.callCloseHandler();
			return;
		}
		date = new Date(cal.date);
		if (el.navtype == 0)
			date.setDateOnly(new Date()); // TODAY
		// unless "today" was clicked, we assume no date was clicked so
		// the selected handler will know not to close the calenar when
		// in single-click mode.
		// cal.dateClicked = (el.navtype == 0);
		cal.dateClicked = false;
		var year = date.getFullYear();
		var mon = date.getMonth();
		function setMonth(m) {
			var day = date.getDate();
			var max = date.getMonthDays(m);
			if (day > max) {
				date.setDate(max);
			}
			date.setMonth(m);
		};
		switch (el.navtype) {
		    case 400:
			Calendar.removeClass(el, "hilite");
			var text = Calendar._TT["ABOUT"];
			if (typeof text != "undefined") {
				text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
			} else {
				// FIXME: this should be removed as soon as lang files get updated!
				text = "Help and about box text is not translated into this language.\n" +
					"If you know this language and you feel generous please update\n" +
					"the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
					"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution  ;-)\n\n" +
					"Thank you!\n" +
					"http://dynarch.com/mishoo/calendar.epl\n";
			}
			alert(text);
			return;
		    case -2:
			if (year > cal.minYear) {
				date.setFullYear(year - 1);
			}
			break;
		    case -1:
			if (mon > 0) {
				setMonth(mon - 1);
			} else if (year-- > cal.minYear) {
				date.setFullYear(year);
				setMonth(11);
			}
			break;
		    case 1:
			if (mon < 11) {
				setMonth(mon + 1);
			} else if (year < cal.maxYear) {
				date.setFullYear(year + 1);
				setMonth(0);
			}
			break;
		    case 2:
			if (year < cal.maxYear) {
				date.setFullYear(year + 1);
			}
			break;
		    case 100:
			cal.setFirstDayOfWeek(el.fdow);
			return;
		    case 50:
			var range = el._range;
			var current = el.innerHTML;
			for (var i = range.length; --i >= 0;)
				if (range[i] == current)
					break;
			if (ev && ev.shiftKey) {
				if (--i < 0)
					i = range.length - 1;
			} else if ( ++i >= range.length )
				i = 0;
			var newval = range[i];
			el.innerHTML = newval;
			cal.onUpdateTime();
			return;
		    case 0:
			// TODAY will bring us here
			if ((typeof cal.getDateStatus == "function") &&
			    cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
				return false;
			}
			break;
		}
		if (!date.equalsTo(cal.date)) {
			cal.setDate(date);
			newdate = true;
		} else if (el.navtype == 0)
			newdate = closing = true;
	}
	if (newdate) {
		ev && cal.callHandler();
	}
	if (closing) {
		Calendar.removeClass(el, "hilite");
		ev && cal.callCloseHandler();
	}
};

// END: CALENDAR STATIC FUNCTIONS

// BEGIN: CALENDAR OBJECT FUNCTIONS

/**
 *  This function creates the calendar inside the given parent.  If _par is
 *  null than it creates a popup calendar inside the BODY element.  If _par is
 *  an element, be it BODY, then it creates a non-popup calendar (still
 *  hidden).  Some properties need to be set before calling this function.
 */
Calendar.prototype.create = function (_par) {
	var parent = null;
	if (! _par) {
		// default parent is the document body, in which case we create
		// a popup calendar.
		parent = document.getElementsByTagName("body")[0];
		this.isPopup = true;
	} else {
		parent = _par;
		this.isPopup = false;
	}
	this.date = this.dateStr ? new Date(this.dateStr) : new Date();

	var table = Calendar.createElement("table");
	this.table = table;
	table.cellSpacing = 0;
	table.cellPadding = 0;
	table.calendar = this;
	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);

	var div = Calendar.createElement("div");
	this.element = div;
	div.className = "calendar";
	if (this.isPopup) {
		div.style.position = "absolute";
		div.style.display = "none";
	}
	div.appendChild(table);

	var thead = Calendar.createElement("thead", table);
	var cell = null;
	var row = null;

	var cal = this;
	var hh = function (text, cs, navtype) {
		cell = Calendar.createElement("td", row);
		cell.colSpan = cs;
		cell.className = "button";
		if (navtype != 0 && Math.abs(navtype) <= 2)
			cell.className += " nav";
		Calendar._add_evs(cell);
		cell.calendar = cal;
		cell.navtype = navtype;
		cell.innerHTML = "<div unselectable='on'>" + text + "</div>";
		return cell;
	};

	row = Calendar.createElement("tr", thead);
	var title_length = 6;
	(this.isPopup) && --title_length;
	(this.weekNumbers) && ++title_length;

	hh("?", 1, 400).ttip = Calendar._TT["INFO"];
	this.title = hh("", title_length, 300);
	this.title.className = "title";
	if (this.isPopup) {
		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
		this.title.style.cursor = "move";
		hh("&#x00d7;", 1, 200).ttip = Calendar._TT["CLOSE"];
	}

	row = Calendar.createElement("tr", thead);
	row.className = "headrow";

	this._nav_py = hh("&#x00ab;", 1, -2);
	this._nav_py.ttip = Calendar._TT["PREV_YEAR"];

	this._nav_pm = hh("&#x2039;", 1, -1);
	this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];

	this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
	this._nav_now.ttip = Calendar._TT["GO_TODAY"];

	this._nav_nm = hh("&#x203a;", 1, 1);
	this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];

	this._nav_ny = hh("&#x00bb;", 1, 2);
	this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];

	// day names
	row = Calendar.createElement("tr", thead);
	row.className = "daynames";
	if (this.weekNumbers) {
		cell = Calendar.createElement("td", row);
		cell.className = "name wn";
		cell.innerHTML = Calendar._TT["WK"];
	}
	for (var i = 7; i > 0; --i) {
		cell = Calendar.createElement("td", row);
		if (!i) {
			cell.navtype = 100;
			cell.calendar = this;
			Calendar._add_evs(cell);
		}
	}
	this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
	this._displayWeekdays();

	var tbody = Calendar.createElement("tbody", table);
	this.tbody = tbody;

	for (i = 6; i > 0; --i) {
		row = Calendar.createElement("tr", tbody);
		if (this.weekNumbers) {
			cell = Calendar.createElement("td", row);
		}
		for (var j = 7; j > 0; --j) {
			cell = Calendar.createElement("td", row);
			cell.calendar = this;
			Calendar._add_evs(cell);
		}
	}

	if (this.showsTime) {
		row = Calendar.createElement("tr", tbody);
		row.className = "time";

		cell = Calendar.createElement("td", row);
		cell.className = "time";
		cell.colSpan = 2;
		cell.innerHTML = Calendar._TT["TIME"] || "&nbsp;";

		cell = Calendar.createElement("td", row);
		cell.className = "time";
		cell.colSpan = this.weekNumbers ? 4 : 3;

		(function(){
			function makeTimePart(className, init, range_start, range_end) {
				var part = Calendar.createElement("span", cell);
				part.className = className;
				part.innerHTML = init;
				part.calendar = cal;
				part.ttip = Calendar._TT["TIME_PART"];
				part.navtype = 50;
				part._range = [];
				if (typeof range_start != "number")
					part._range = range_start;
				else {
					for (var i = range_start; i <= range_end; ++i) {
						var txt;
						if (i < 10 && range_end >= 10) txt = '0' + i;
						else txt = '' + i;
						part._range[part._range.length] = txt;
					}
				}
				Calendar._add_evs(part);
				return part;
			};
			var hrs = cal.date.getHours();
			var mins = cal.date.getMinutes();
			var t12 = !cal.time24;
			var pm = (hrs > 12);
			if (t12 && pm) hrs -= 12;
			var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
			var span = Calendar.createElement("span", cell);
			span.innerHTML = ":";
			span.className = "colon";
			var M = makeTimePart("minute", mins, 0, 59);
			var AP = null;
			cell = Calendar.createElement("td", row);
			cell.className = "time";
			cell.colSpan = 2;
			if (t12)
				AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
			else
				cell.innerHTML = "&nbsp;";

			cal.onSetTime = function() {
				var pm, hrs = this.date.getHours(),
					mins = this.date.getMinutes();
				if (t12) {
					pm = (hrs >= 12);
					if (pm) hrs -= 12;
					if (hrs == 0) hrs = 12;
					AP.innerHTML = pm ? "pm" : "am";
				}
				H.innerHTML = (hrs < 10) ? ("0" + hrs) : hrs;
				M.innerHTML = (mins < 10) ? ("0" + mins) : mins;
			};

			cal.onUpdateTime = function() {
				var date = this.date;
				var h = parseInt(H.innerHTML, 10);
				if (t12) {
					if (/pm/i.test(AP.innerHTML) && h < 12)
						h += 12;
					else if (/am/i.test(AP.innerHTML) && h == 12)
						h = 0;
				}
				var d = date.getDate();
				var m = date.getMonth();
				var y = date.getFullYear();
				date.setHours(h);
				date.setMinutes(parseInt(M.innerHTML, 10));
				date.setFullYear(y);
				date.setMonth(m);
				date.setDate(d);
				this.dateClicked = false;
				this.callHandler();
			};
		})();
	} else {
		this.onSetTime = this.onUpdateTime = function() {};
	}

	var tfoot = Calendar.createElement("tfoot", table);

	row = Calendar.createElement("tr", tfoot);
	row.className = "footrow";

	cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
	cell.className = "ttip";
	if (this.isPopup) {
		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
		cell.style.cursor = "move";
	}
	this.tooltips = cell;

	div = Calendar.createElement("div", this.element);
	this.monthsCombo = div;
	div.className = "combo";
	for (i = 0; i < Calendar._MN.length; ++i) {
		var mn = Calendar.createElement("div");
		mn.className = Calendar.is_ie ? "label-IEfix" : "label";
		mn.month = i;
		mn.innerHTML = Calendar._SMN[i];
		div.appendChild(mn);
	}

	div = Calendar.createElement("div", this.element);
	this.yearsCombo = div;
	div.className = "combo";
	for (i = 12; i > 0; --i) {
		var yr = Calendar.createElement("div");
		yr.className = Calendar.is_ie ? "label-IEfix" : "label";
		div.appendChild(yr);
	}

	this._init(this.firstDayOfWeek, this.date);
	parent.appendChild(this.element);
};

/** keyboard navigation, only for popup calendars */
Calendar._keyEvent = function(ev) {
	var cal = window._dynarch_popupCalendar;
	if (!cal || cal.multiple)
		return false;
	(Calendar.is_ie) && (ev = window.event);
	var act = (Calendar.is_ie || ev.type == "keypress"),
		K = ev.keyCode;
	if (ev.ctrlKey) {
		switch (K) {
		    case 37: // KEY left
			act && Calendar.cellClick(cal._nav_pm);
			break;
		    case 38: // KEY up
			act && Calendar.cellClick(cal._nav_py);
			break;
		    case 39: // KEY right
			act && Calendar.cellClick(cal._nav_nm);
			break;
		    case 40: // KEY down
			act && Calendar.cellClick(cal._nav_ny);
			break;
		    default:
			return false;
		}
	} else switch (K) {
	    case 32: // KEY space (now)
		Calendar.cellClick(cal._nav_now);
		break;
	    case 27: // KEY esc
		act && cal.callCloseHandler();
		break;
	    case 37: // KEY left
	    case 38: // KEY up
	    case 39: // KEY right
	    case 40: // KEY down
		if (act) {
			var prev, x, y, ne, el, step;
			prev = K == 37 || K == 38;
			step = (K == 37 || K == 39) ? 1 : 7;
			function setVars() {
				el = cal.currentDateEl;
				var p = el.pos;
				x = p & 15;
				y = p >> 4;
				ne = cal.ar_days[y][x];
			};setVars();
			function prevMonth() {
				var date = new Date(cal.date);
				date.setDate(date.getDate() - step);
				cal.setDate(date);
			};
			function nextMonth() {
				var date = new Date(cal.date);
				date.setDate(date.getDate() + step);
				cal.setDate(date);
			};
			while (1) {
				switch (K) {
				    case 37: // KEY left
					if (--x >= 0)
						ne = cal.ar_days[y][x];
					else {
						x = 6;
						K = 38;
						continue;
					}
					break;
				    case 38: // KEY up
					if (--y >= 0)
						ne = cal.ar_days[y][x];
					else {
						prevMonth();
						setVars();
					}
					break;
				    case 39: // KEY right
					if (++x < 7)
						ne = cal.ar_days[y][x];
					else {
						x = 0;
						K = 40;
						continue;
					}
					break;
				    case 40: // KEY down
					if (++y < cal.ar_days.length)
						ne = cal.ar_days[y][x];
					else {
						nextMonth();
						setVars();
					}
					break;
				}
				break;
			}
			if (ne) {
				if (!ne.disabled)
					Calendar.cellClick(ne);
				else if (prev)
					prevMonth();
				else
					nextMonth();
			}
		}
		break;
	    case 13: // KEY enter
		if (act)
			Calendar.cellClick(cal.currentDateEl, ev);
		break;
	    default:
		return false;
	}
	return Calendar.stopEvent(ev);
};

/**
 *  (RE)Initializes the calendar to the given date and firstDayOfWeek
 */
Calendar.prototype._init = function (firstDayOfWeek, date) {
	var today = new Date(),
		TY = today.getFullYear(),
		TM = today.getMonth(),
		TD = today.getDate();
	this.table.style.visibility = "hidden";
	var year = date.getFullYear();
	if (year < this.minYear) {
		year = this.minYear;
		date.setFullYear(year);
	} else if (year > this.maxYear) {
		year = this.maxYear;
		date.setFullYear(year);
	}
	this.firstDayOfWeek = firstDayOfWeek;
	this.date = new Date(date);
	var month = date.getMonth();
	var mday = date.getDate();
	var no_days = date.getMonthDays();

	// calendar voodoo for computing the first day that would actually be
	// displayed in the calendar, even if it's from the previous month.
	// WARNING: this is magic. ;-)
	date.setDate(1);
	var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
	if (day1 < 0)
		day1 += 7;
	date.setDate(-day1);
	date.setDate(date.getDate() + 1);

	var row = this.tbody.firstChild;
	var MN = Calendar._SMN[month];
	var ar_days = this.ar_days = new Array();
	var weekend = Calendar._TT["WEEKEND"];
	var dates = this.multiple ? (this.datesCells = {}) : null;
	for (var i = 0; i < 6; ++i, row = row.nextSibling) {
		var cell = row.firstChild;
		if (this.weekNumbers) {
			cell.className = "day wn";
			cell.innerHTML = date.getWeekNumber();
			cell = cell.nextSibling;
		}
		row.className = "daysrow";
		var hasdays = false, iday, dpos = ar_days[i] = [];
		for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(iday + 1)) {
			iday = date.getDate();
			var wday = date.getDay();
			cell.className = "day";
			cell.pos = i << 4 | j;
			dpos[j] = cell;
			var current_month = (date.getMonth() == month);
			if (!current_month) {
				if (this.showsOtherMonths) {
					cell.className += " othermonth";
					cell.otherMonth = true;
				} else {
					cell.className = "emptycell";
					cell.innerHTML = "&nbsp;";
					cell.disabled = true;
					continue;
				}
			} else {
				cell.otherMonth = false;
				hasdays = true;
			}
			cell.disabled = false;
			cell.innerHTML = this.getDateText ? this.getDateText(date, iday) : iday;
			if (dates)
				dates[date.print("%Y%m%d")] = cell;
			if (this.getDateStatus) {
				var status = this.getDateStatus(date, year, month, iday);
				if (status === true) {
					cell.className += " disabled";
					cell.disabled = true;
				} else {
					if (/disabled/i.test(status))
						cell.disabled = true;
					cell.className += " " + status;
				}
			}
			if (!cell.disabled) {
				cell.caldate = new Date(date);
				cell.ttip = "_";
				if (!this.multiple && current_month
				    && iday == mday && this.hiliteToday) {
					cell.className += " selected";
					this.currentDateEl = cell;
				}
				if (date.getFullYear() == TY &&
				    date.getMonth() == TM &&
				    iday == TD) {
					cell.className += " today";
					cell.ttip += Calendar._TT["PART_TODAY"];
				}
				if (weekend.indexOf(wday.toString()) != -1)
					cell.className += cell.otherMonth ? " oweekend" : " weekend";
			}
		}
		if (!(hasdays || this.showsOtherMonths))
			row.className = "emptyrow";
	}
	this.title.innerHTML = Calendar._MN[month] + ", " + year;
	this.onSetTime();
	this.table.style.visibility = "visible";
	this._initMultipleDates();
	// PROFILE
	// this.tooltips.innerHTML = "Generated in " + ((new Date()) - today) + " ms";
};

Calendar.prototype._initMultipleDates = function() {
	if (this.multiple) {
		for (var i in this.multiple) {
			var cell = this.datesCells[i];
			var d = this.multiple[i];
			if (!d)
				continue;
			if (cell)
				cell.className += " selected";
		}
	}
};

Calendar.prototype._toggleMultipleDate = function(date) {
	if (this.multiple) {
		var ds = date.print("%Y%m%d");
		var cell = this.datesCells[ds];
		if (cell) {
			var d = this.multiple[ds];
			if (!d) {
				Calendar.addClass(cell, "selected");
				this.multiple[ds] = date;
			} else {
				Calendar.removeClass(cell, "selected");
				delete this.multiple[ds];
			}
		}
	}
};

Calendar.prototype.setDateToolTipHandler = function (unaryFunction) {
	this.getDateToolTip = unaryFunction;
};

/**
 *  Calls _init function above for going to a certain date (but only if the
 *  date is different than the currently selected one).
 */
Calendar.prototype.setDate = function (date) {
	if (!date.equalsTo(this.date)) {
		this._init(this.firstDayOfWeek, date);
	}
};

/**
 *  Refreshes the calendar.  Useful if the "disabledHandler" function is
 *  dynamic, meaning that the list of disabled date can change at runtime.
 *  Just * call this function if you think that the list of disabled dates
 *  should * change.
 */
Calendar.prototype.refresh = function () {
	this._init(this.firstDayOfWeek, this.date);
};

/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
	this._init(firstDayOfWeek, this.date);
	this._displayWeekdays();
};

/**
 *  Allows customization of what dates are enabled.  The "unaryFunction"
 *  parameter must be a function object that receives the date (as a JS Date
 *  object) and returns a boolean value.  If the returned value is true then
 *  the passed date will be marked as disabled.
 */
Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
	this.getDateStatus = unaryFunction;
};

/** Customization of allowed year range for the calendar. */
Calendar.prototype.setRange = function (a, z) {
	this.minYear = a;
	this.maxYear = z;
};

/** Calls the first user handler (selectedHandler). */
Calendar.prototype.callHandler = function () {
	if (this.onSelected) {
		this.onSelected(this, this.date.print(this.dateFormat));
	}
};

/** Calls the second user handler (closeHandler). */
Calendar.prototype.callCloseHandler = function () {
	if (this.onClose) {
		this.onClose(this);
	}
	this.hideShowCovered();
};

/** Removes the calendar object from the DOM tree and destroys it. */
Calendar.prototype.destroy = function () {
	var el = this.element.parentNode;
	el.removeChild(this.element);
	Calendar._C = null;
	window._dynarch_popupCalendar = null;
};

/**
 *  Moves the calendar element to a different section in the DOM tree (changes
 *  its parent).
 */
Calendar.prototype.reparent = function (new_parent) {
	var el = this.element;
	el.parentNode.removeChild(el);
	new_parent.appendChild(el);
};

// This gets called when the user presses a mouse button anywhere in the
// document, if the calendar is shown.  If the click was outside the open
// calendar this function closes it.
Calendar._checkCalendar = function(ev) {
	var calendar = window._dynarch_popupCalendar;
	if (!calendar) {
		return false;
	}
	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
	for (; el != null && el != calendar.element; el = el.parentNode);
	if (el == null) {
		// calls closeHandler which should hide the calendar.
		window._dynarch_popupCalendar.callCloseHandler();
		return Calendar.stopEvent(ev);
	}
};

/** Shows the calendar. */
Calendar.prototype.show = function () {
	var rows = this.table.getElementsByTagName("tr");
	for (var i = rows.length; i > 0;) {
		var row = rows[--i];
		Calendar.removeClass(row, "rowhilite");
		var cells = row.getElementsByTagName("td");
		for (var j = cells.length; j > 0;) {
			var cell = cells[--j];
			Calendar.removeClass(cell, "hilite");
			Calendar.removeClass(cell, "active");
		}
	}
	this.element.style.display = "block";
	this.hidden = false;
	if (this.isPopup) {
		window._dynarch_popupCalendar = this;
		Calendar.addEvent(document, "keydown", Calendar._keyEvent);
		Calendar.addEvent(document, "keypress", Calendar._keyEvent);
		Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
	}
	this.hideShowCovered();
};

/**
 *  Hides the calendar.  Also removes any "hilite" from the class of any TD
 *  element.
 */
Calendar.prototype.hide = function () {
	if (this.isPopup) {
		Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
		Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
		Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
	}
	this.element.style.display = "none";
	this.hidden = true;
	this.hideShowCovered();
};

/**
 *  Shows the calendar at a given absolute position (beware that, depending on
 *  the calendar element style -- position property -- this might be relative
 *  to the parent's containing rectangle).
 */
Calendar.prototype.showAt = function (x, y) {
	var s = this.element.style;
	s.left = x + "px";
	s.top = y + "px";
	this.show();
};

/** Shows the calendar near a given element. */
Calendar.prototype.showAtElement = function (el, opts) {
	var self = this;
	var p = Calendar.getAbsolutePos(el);
	if (!opts || typeof opts != "string") {
		this.showAt(p.x, p.y + el.offsetHeight);
		return true;
	}
	function fixPosition(box) {
		if (box.x < 0)
			box.x = 0;
		if (box.y < 0)
			box.y = 0;
		var cp = document.createElement("div");
		var s = cp.style;
		s.position = "absolute";
		s.right = s.bottom = s.width = s.height = "0px";
		document.body.appendChild(cp);
		var br = Calendar.getAbsolutePos(cp);
		document.body.removeChild(cp);
		if (Calendar.is_ie) {
			br.y += document.body.scrollTop;
			br.x += document.body.scrollLeft;
		} else {
			br.y += window.scrollY;
			br.x += window.scrollX;
		}
		var tmp = box.x + box.width - br.x;
		if (tmp > 0) box.x -= tmp;
		tmp = box.y + box.height - br.y;
		if (tmp > 0) box.y -= tmp;
	};
	this.element.style.display = "block";
	Calendar.continuation_for_the_fucking_khtml_browser = function() {
		var w = self.element.offsetWidth;
		var h = self.element.offsetHeight;
		self.element.style.display = "none";
		var valign = opts.substr(0, 1);
		var halign = "l";
		if (opts.length > 1) {
			halign = opts.substr(1, 1);
		}
		// vertical alignment
		switch (valign) {
		    case "T": p.y -= h; break;
		    case "B": p.y += el.offsetHeight; break;
		    case "C": p.y += (el.offsetHeight - h) / 2; break;
		    case "t": p.y += el.offsetHeight - h; break;
		    case "b": break; // already there
		}
		// horizontal alignment
		switch (halign) {
		    case "L": p.x -= w; break;
		    case "R": p.x += el.offsetWidth; break;
		    case "C": p.x += (el.offsetWidth - w) / 2; break;
		    case "l": p.x += el.offsetWidth - w; break;
		    case "r": break; // already there
		}
		p.width = w;
		p.height = h + 40;
		self.monthsCombo.style.display = "none";
		fixPosition(p);
		self.showAt(p.x, p.y);
	};
	if (Calendar.is_khtml)
		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
	else
		Calendar.continuation_for_the_fucking_khtml_browser();
};

/** Customizes the date format. */
Calendar.prototype.setDateFormat = function (str) {
	this.dateFormat = str;
};

/** Customizes the tooltip date format. */
Calendar.prototype.setTtDateFormat = function (str) {
	this.ttDateFormat = str;
};

/**
 *  Tries to identify the date represented in a string.  If successful it also
 *  calls this.setDate which moves the calendar to the given date.
 */
Calendar.prototype.parseDate = function(str, fmt) {
	if (!fmt)
		fmt = this.dateFormat;
	this.setDate(Date.parseDate(str, fmt));
};

Calendar.prototype.hideShowCovered = function () {
	if (!Calendar.is_ie && !Calendar.is_opera)
		return;
	function getVisib(obj){
		var value = obj.style.visibility;
		if (!value) {
			if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
				if (!Calendar.is_khtml)
					value = document.defaultView.
						getComputedStyle(obj, "").getPropertyValue("visibility");
				else
					value = '';
			} else if (obj.currentStyle) { // IE
				value = obj.currentStyle.visibility;
			} else
				value = '';
		}
		return value;
	};

	var tags = new Array("applet", "iframe", "select");
	var el = this.element;

	var p = Calendar.getAbsolutePos(el);
	var EX1 = p.x;
	var EX2 = el.offsetWidth + EX1;
	var EY1 = p.y;
	var EY2 = el.offsetHeight + EY1;

	for (var k = tags.length; k > 0; ) {
		var ar = document.getElementsByTagName(tags[--k]);
		var cc = null;

		for (var i = ar.length; i > 0;) {
			cc = ar[--i];

			p = Calendar.getAbsolutePos(cc);
			var CX1 = p.x;
			var CX2 = cc.offsetWidth + CX1;
			var CY1 = p.y;
			var CY2 = cc.offsetHeight + CY1;

			if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
				if (!cc.__msh_save_visibility) {
					cc.__msh_save_visibility = getVisib(cc);
				}
				cc.style.visibility = cc.__msh_save_visibility;
			} else {
				if (!cc.__msh_save_visibility) {
					cc.__msh_save_visibility = getVisib(cc);
				}
				cc.style.visibility = "hidden";
			}
		}
	}
};

/** Internal function; it displays the bar with the names of the weekday. */
Calendar.prototype._displayWeekdays = function () {
	var fdow = this.firstDayOfWeek;
	var cell = this.firstdayname;
	var weekend = Calendar._TT["WEEKEND"];
	for (var i = 0; i < 7; ++i) {
		cell.className = "day name";
		var realday = (i + fdow) % 7;
		if (i) {
			cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
			cell.navtype = 100;
			cell.calendar = this;
			cell.fdow = realday;
			Calendar._add_evs(cell);
		}
		if (weekend.indexOf(realday.toString()) != -1) {
			Calendar.addClass(cell, "weekend");
		}
		cell.innerHTML = Calendar._SDN[(i + fdow) % 7];
		cell = cell.nextSibling;
	}
};

/** Internal function.  Hides all combo boxes that might be displayed. */
Calendar.prototype._hideCombos = function () {
	this.monthsCombo.style.display = "none";
	this.yearsCombo.style.display = "none";
};

/** Internal function.  Starts dragging the element. */
Calendar.prototype._dragStart = function (ev) {
	if (this.dragging) {
		return;
	}
	this.dragging = true;
	var posX;
	var posY;
	if (Calendar.is_ie) {
		posY = window.event.clientY + document.body.scrollTop;
		posX = window.event.clientX + document.body.scrollLeft;
	} else {
		posY = ev.clientY + window.scrollY;
		posX = ev.clientX + window.scrollX;
	}
	var st = this.element.style;
	this.xOffs = posX - parseInt(st.left);
	this.yOffs = posY - parseInt(st.top);
	with (Calendar) {
		addEvent(document, "mousemove", calDragIt);
		addEvent(document, "mouseup", calDragEnd);
	}
};

// BEGIN: DATE OBJECT PATCHES

/** Adds the number of days array to the Date object. */
Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);

/** Constants used for time computations */
Date.SECOND = 1000 /* milliseconds */;
Date.MINUTE = 60 * Date.SECOND;
Date.HOUR   = 60 * Date.MINUTE;
Date.DAY    = 24 * Date.HOUR;
Date.WEEK   =  7 * Date.DAY;

Date.parseDate = function(str, fmt) {
	var today = new Date();
	var y = 0;
	var m = -1;
	var d = 0;
	var a = str.split(/\W+/);
	var b = fmt.match(/%./g);
	var i = 0, j = 0;
	var hr = 0;
	var min = 0;
	for (i = 0; i < a.length; ++i) {
		if (!a[i])
			continue;
		switch (b[i]) {
		    case "%d":
		    case "%e":
			d = parseInt(a[i], 10);
			break;

		    case "%m":
			m = parseInt(a[i], 10) - 1;
			break;

		    case "%Y":
		    case "%y":
			y = parseInt(a[i], 10);
			(y < 100) && (y += (y > 29) ? 1900 : 2000);
			break;

		    case "%b":
		    case "%B":
			for (j = 0; j < 12; ++j) {
				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
			}
			break;

		    case "%H":
		    case "%I":
		    case "%k":
		    case "%l":
			hr = parseInt(a[i], 10);
			break;

		    case "%P":
		    case "%p":
			if (/pm/i.test(a[i]) && hr < 12)
				hr += 12;
			else if (/am/i.test(a[i]) && hr >= 12)
				hr -= 12;
			break;

		    case "%M":
			min = parseInt(a[i], 10);
			break;
		}
	}
	if (isNaN(y)) y = today.getFullYear();
	if (isNaN(m)) m = today.getMonth();
	if (isNaN(d)) d = today.getDate();
	if (isNaN(hr)) hr = today.getHours();
	if (isNaN(min)) min = today.getMinutes();
	if (y != 0 && m != -1 && d != 0)
		return new Date(y, m, d, hr, min, 0);
	y = 0; m = -1; d = 0;
	for (i = 0; i < a.length; ++i) {
		if (a[i].search(/[a-zA-Z]+/) != -1) {
			var t = -1;
			for (j = 0; j < 12; ++j) {
				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
			}
			if (t != -1) {
				if (m != -1) {
					d = m+1;
				}
				m = t;
			}
		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
			m = a[i]-1;
		} else if (parseInt(a[i], 10) > 31 && y == 0) {
			y = parseInt(a[i], 10);
			(y < 100) && (y += (y > 29) ? 1900 : 2000);
		} else if (d == 0) {
			d = a[i];
		}
	}
	if (y == 0)
		y = today.getFullYear();
	if (m != -1 && d != 0)
		return new Date(y, m, d, hr, min, 0);
	return today;
};

/** Returns the number of days in the current month */
Date.prototype.getMonthDays = function(month) {
	var year = this.getFullYear();
	if (typeof month == "undefined") {
		month = this.getMonth();
	}
	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
		return 29;
	} else {
		return Date._MD[month];
	}
};

/** Returns the number of day in the year. */
Date.prototype.getDayOfYear = function() {
	var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
	var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
	var time = now - then;
	return Math.floor(time / Date.DAY);
};

/** Returns the number of the week in year, as defined in ISO 8601. */
Date.prototype.getWeekNumber = function() {
	var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
	var DoW = d.getDay();
	d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
	var ms = d.valueOf(); // GMT
	d.setMonth(0);
	d.setDate(4); // Thu in Week 1
	return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
};

/** Checks date and time equality */
Date.prototype.equalsTo = function(date) {
	return ((this.getFullYear() == date.getFullYear()) &&
		(this.getMonth() == date.getMonth()) &&
		(this.getDate() == date.getDate()) &&
		(this.getHours() == date.getHours()) &&
		(this.getMinutes() == date.getMinutes()));
};

/** Set only the year, month, date parts (keep existing time) */
Date.prototype.setDateOnly = function(date) {
	var tmp = new Date(date);
	this.setDate(1);
	this.setFullYear(tmp.getFullYear());
	this.setMonth(tmp.getMonth());
	this.setDate(tmp.getDate());
};

/** Prints the date in a string according to the given format. */
Date.prototype.print = function (str) {
	var m = this.getMonth();
	var d = this.getDate();
	var y = this.getFullYear();
	var wn = this.getWeekNumber();
	var w = this.getDay();
	var s = {};
	var hr = this.getHours();
	var pm = (hr >= 12);
	var ir = (pm) ? (hr - 12) : hr;
	var dy = this.getDayOfYear();
	if (ir == 0)
		ir = 12;
	var min = this.getMinutes();
	var sec = this.getSeconds();
	s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
	s["%A"] = Calendar._DN[w]; // full weekday name
	s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
	s["%B"] = Calendar._MN[m]; // full month name
	// FIXME: %c : preferred date and time representation for the current locale
	s["%C"] = 1 + Math.floor(y / 100); // the century number
	s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
	s["%e"] = d; // the day of the month (range 1 to 31)
	// FIXME: %D : american date style: %m/%d/%y
	// FIXME: %E, %F, %G, %g, %h (man strftime)
	s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
	s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
	s["%k"] = hr;		// hour, range 0 to 23 (24h format)
	s["%l"] = ir;		// hour, range 1 to 12 (12h format)
	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
	s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
	s["%n"] = "\n";		// a newline character
	s["%p"] = pm ? "PM" : "AM";
	s["%P"] = pm ? "pm" : "am";
	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
	// FIXME: %R : the time in 24-hour notation %H:%M
	s["%s"] = Math.floor(this.getTime() / 1000);
	s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
	s["%t"] = "\t";		// a tab character
	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
	s["%u"] = w + 1;	// the day of the week (range 1 to 7, 1 = MON)
	s["%w"] = w;		// the day of the week (range 0 to 6, 0 = SUN)
	// FIXME: %x : preferred date representation for the current locale without the time
	// FIXME: %X : preferred time representation for the current locale without the date
	s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
	s["%Y"] = y;		// year with the century
	s["%%"] = "%";		// a literal '%' character

	var re = /%./g;
	if (!Calendar.is_ie5 && !Calendar.is_khtml)
		return str.replace(re, function (par) { return s[par] || par; });

	var a = str.match(re);
	for (var i = 0; i < a.length; i++) {
		var tmp = s[a[i]];
		if (tmp) {
			re = new RegExp(a[i], 'g');
			str = str.replace(re, tmp);
		}
	}

	return str;
};

Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
Date.prototype.setFullYear = function(y) {
	var d = new Date(this);
	d.__msh_oldSetFullYear(y);
	if (d.getMonth() != this.getMonth())
		this.setDate(28);
	this.__msh_oldSetFullYear(y);
};

// END: DATE OBJECT PATCHES


// global object that remembers the calendar
window._dynarch_popupCalendar = null;

/********************   libs/jscalendar/lang/calendar-en.js   ********************/
ï»¿// ** I18N

// Calendar EN language
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
// Encoding: any
// Distributed under the same terms as the calendar itself.

// For translators: please use UTF-8 if possible.  We strongly believe that
// Unicode is the answer to a real internationalized world.  Also please
// include your contact information in the header, as can be seen above.

// full day names
Calendar._DN = new Array
("Sunday",
 "Monday",
 "Tuesday",
 "Wednesday",
 "Thursday",
 "Friday",
 "Saturday",
 "Sunday");

// Please note that the following array of short day names (and the same goes
// for short month names, _SMN) isn't absolutely necessary.  We give it here
// for exemplification on how one can customize the short day names, but if
// they are simply the first N letters of the full name you can simply say:
//
//   Calendar._SDN_len = N; // short day name length
//   Calendar._SMN_len = N; // short month name length
//
// If N = 3 then this is not needed either since we assume a value of 3 if not
// present, to be compatible with translation files that were written before
// this feature.

// short day names
Calendar._SDN = new Array
("Sun",
 "Mon",
 "Tue",
 "Wed",
 "Thu",
 "Fri",
 "Sat",
 "Sun");

// full month names
Calendar._MN = new Array
("January",
 "February",
 "March",
 "April",
 "May",
 "June",
 "July",
 "August",
 "September",
 "October",
 "November",
 "December");

// short month names
Calendar._SMN = new Array
("Jan",
 "Feb",
 "Mar",
 "Apr",
 "May",
 "Jun",
 "Jul",
 "Aug",
 "Sep",
 "Oct",
 "Nov",
 "Dec");

// tooltips
Calendar._TT = {};
Calendar._TT["INFO"] = "About the calendar";

Calendar._TT["ABOUT"] =
"DHTML Date/Time Selector\n" +
"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
"\n\n" +
"Date selection:\n" +
"- Use the \xab, \xbb buttons to select year\n" +
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
"- Hold mouse button on any of the above buttons for faster selection.";
Calendar._TT["ABOUT_TIME"] = "\n\n" +
"Time selection:\n" +
"- Click on any of the time parts to increase it\n" +
"- or Shift-click to decrease it\n" +
"- or click and drag for faster selection.";

Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
Calendar._TT["GO_TODAY"] = "Go Today";
Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
Calendar._TT["SEL_DATE"] = "Select date";
Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
Calendar._TT["PART_TODAY"] = " (today)";

// the following is to inform that "%s" is to be the first day of week
// %s will be replaced with the day name.
Calendar._TT["DAY_FIRST"] = "Display %s first";

// This may be locale-dependent.  It specifies the week-end days, as an array
// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
// means Monday, etc.
Calendar._TT["WEEKEND"] = "0,6";

Calendar._TT["CLOSE"] = "Close";
Calendar._TT["TODAY"] = "Today";
Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";

// date formats
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";

Calendar._TT["WK"] = "wk";
Calendar._TT["TIME"] = "Time:";

/********************   libs/jscalendar/calendar-setup.js   ********************/
/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
 * ---------------------------------------------------------------------------
 *
 * The DHTML Calendar
 *
 * Details and latest version at:
 * http://dynarch.com/mishoo/calendar.epl
 *
 * This script is distributed under the GNU Lesser General Public License.
 * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
 *
 * This file defines helper functions for setting up the calendar.  They are
 * intended to help non-programmers get a working calendar on their site
 * quickly.  This script should not be seen as part of the calendar.  It just
 * shows you what one can do with the calendar, while in the same time
 * providing a quick and simple method for setting it up.  If you need
 * exhaustive customization of the calendar creation process feel free to
 * modify this code to suit your needs (this is recommended and much better
 * than modifying calendar.js itself).
 */

// $Id: calendar-setup.js,v 1.26 2006/02/11 12:32:59 mishoo Exp $

/**
 *  This function "patches" an input field (or other element) to use a calendar
 *  widget for date selection.
 *
 *  The "params" is a single object that can have the following properties:
 *
 *    prop. name   | description
 *  -------------------------------------------------------------------------------------------------
 *   inputField    | the ID of an input field to store the date
 *   displayArea   | the ID of a DIV or other element to show the date
 *   button        | ID of a button or other element that will trigger the calendar
 *   eventName     | event that will trigger the calendar, without the "on" prefix (default: "click")
 *   ifFormat      | date format that will be stored in the input field
 *   daFormat      | the date format that will be used to display the date in displayArea
 *   singleClick   | (true/false) wether the calendar is in single click mode or not (default: true)
 *   firstDay      | numeric: 0 to 6.  "0" means display Sunday first, "1" means display Monday first, etc.
 *   align         | alignment (default: "Br"); if you don't know what's this see the calendar documentation
 *   range         | array with 2 elements.  Default: [1900, 2999] -- the range of years available
 *   weekNumbers   | (true/false) if it's true (default) the calendar will display week numbers
 *   flat          | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
 *   flatCallback  | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
 *   disableFunc   | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
 *   onSelect      | function that gets called when a date is selected.  You don't _have_ to supply this (the default is generally okay)
 *   onClose       | function that gets called when the calendar is closed.  [default]
 *   onUpdate      | function that gets called after the date is updated in the input field.  Receives a reference to the calendar.
 *   date          | the date that the calendar will be initially displayed to
 *   showsTime     | default: false; if true the calendar will include a time selector
 *   timeFormat    | the time format; can be "12" or "24", default is "12"
 *   electric      | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
 *   step          | configures the step of the years in drop-down boxes; default: 2
 *   position      | configures the calendar absolute position; default: null
 *   cache         | if "true" (but default: "false") it will reuse the same calendar object, where possible
 *   showOthers    | if "true" (but default: "false") it will show days from other months too
 *
 *  None of them is required, they all have default values.  However, if you
 *  pass none of "inputField", "displayArea" or "button" you'll get a warning
 *  saying "nothing to setup".
 */
Calendar.setup = function (params) {
	function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };

	param_default("inputField",      null);
	param_default("displayArea",     null);
	param_default("button",          null);
	param_default("eventName",       "click");
	param_default("ifFormat",        "%Y/%m/%d");
	param_default("daFormat",        "%Y/%m/%d");
	param_default("singleClick",     true);
	param_default("disableFunc",     null);
	param_default("dateStatusFunc",  params["disableFunc"]);	// takes precedence if both are defined
	param_default("dateTooltipFunc", null);
	param_default("dateText",        null);
	param_default("firstDay",        1);
	param_default("align",           "Br");
	param_default("range",           [1900, 2999]);
	param_default("weekNumbers",     true);
	param_default("flat",            null);
	param_default("flatCallback",    null);
	param_default("onSelect",        null);
	param_default("onClose",         null);
	param_default("onUpdate",        null);
	param_default("date",            null);
	param_default("showsTime",       false);
	param_default("timeFormat",      "24");
	param_default("electric",        true);
	param_default("step",            2);
	param_default("position",        null);
	param_default("cache",           false);
	param_default("showOthers",      false);
	param_default("multiple",        null);

	var tmp = ["inputField", "displayArea", "button"];
	for (var i in tmp) {
		if (typeof params[tmp[i]] == "string") {
			params[tmp[i]] = document.getElementById(params[tmp[i]]);
		}
	}
	if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) {
		alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
		return false;
	}

	function onSelect(cal) {
		var p = cal.params;
		var update = (cal.dateClicked || p.electric);
		if (update && p.inputField) {
			p.inputField.value = cal.date.print(p.ifFormat);
			if (typeof p.inputField.onchange == "function")
				p.inputField.onchange();
		}
		if (update && p.displayArea)
			p.displayArea.innerHTML = cal.date.print(p.daFormat);
		if (update && typeof p.onUpdate == "function")
			p.onUpdate(cal);
		if (update && p.flat) {
			if (typeof p.flatCallback == "function")
				p.flatCallback(cal);
		}
		if (update && p.singleClick && cal.dateClicked)
			cal.callCloseHandler();
	};

	if (params.flat != null) {
		if (typeof params.flat == "string")
			params.flat = document.getElementById(params.flat);
		if (!params.flat) {
			alert("Calendar.setup:\n  Flat specified but can't find parent.");
			return false;
		}
		var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
		cal.setDateToolTipHandler(params.dateTooltipFunc);
		cal.showsOtherMonths = params.showOthers;
		cal.showsTime = params.showsTime;
		cal.time24 = (params.timeFormat == "24");
		cal.params = params;
		cal.weekNumbers = params.weekNumbers;
		cal.setRange(params.range[0], params.range[1]);
		cal.setDateStatusHandler(params.dateStatusFunc);
		cal.getDateText = params.dateText;
		if (params.ifFormat) {
			cal.setDateFormat(params.ifFormat);
		}
		if (params.inputField && typeof params.inputField.value == "string") {
			cal.parseDate(params.inputField.value);
		}
		cal.create(params.flat);
		cal.show();
		return false;
	}

	var triggerEl = params.button || params.displayArea || params.inputField;
	triggerEl["on" + params.eventName] = function() {
		var dateEl = params.inputField || params.displayArea;
		var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
		var mustCreate = false;
		var cal = window.calendar;
		if (dateEl)
			params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt);
		if (!(cal && params.cache)) {
			window.calendar = cal = new Calendar(params.firstDay,
							     params.date,
							     params.onSelect || onSelect,
							     params.onClose || function(cal) { cal.hide(); });
			cal.setDateToolTipHandler(params.dateTooltipFunc);
			cal.showsTime = params.showsTime;
			cal.time24 = (params.timeFormat == "24");
			cal.weekNumbers = params.weekNumbers;
			mustCreate = true;
		} else {
			if (params.date)
				cal.setDate(params.date);
			cal.hide();
		}
		if (params.multiple) {
			cal.multiple = {};
			for (var i = params.multiple.length; --i >= 0;) {
				var d = params.multiple[i];
				var ds = d.print("%Y%m%d");
				cal.multiple[ds] = d;
			}
		}
		cal.showsOtherMonths = params.showOthers;
		cal.yearStep = params.step;
		cal.setRange(params.range[0], params.range[1]);
		cal.params = params;
		cal.setDateStatusHandler(params.dateStatusFunc);
		cal.getDateText = params.dateText;
		cal.setDateFormat(dateFmt);
		if (mustCreate)
			cal.create();
		cal.refresh();
		if (!params.position)
			cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
		else
			cal.showAt(params.position[0], params.position[1]);
		return false;
	};

	return cal;
};

/********************   js/themet.js   ********************/
var menuInactiveColor = "#B4B6C5";
var menuActiveColor = "#ffffff";

 $('html').addClass("jsHide");
 
 
 $(document).ready(function(){
 	
	initSlideshow();
	
	cycleOffers();
	
	if($("#page_gallery").length){
		loadPhotoGallery();
	}
	

	
	
	$('#top-navigation ul li a').each(function(i,o){
		if(!$(o).parent().hasClass('active')){
			$(o).bind('mouseenter',function(){
				$(o).stop();
				$(o).animate({'color': menuActiveColor},"slow");
			});
			$(o).bind('mouseleave',function(){
				$(o).stop();
				$(o).animate({'color': menuInactiveColor},"slow");
			});
		}
	});
	$('#main-navigation ul li a').each(function(i,o){
		if(!$(o).parent().hasClass('active')){
			$(o).bind('mouseenter',function(){
				$(o).stop();
				$(o).animate({'color': menuActiveColor},"slow");
			});
			$(o).bind('mouseleave',function(){
				$(o).stop();
				$(o).animate({'color': menuInactiveColor},"slow");
			});
		}
	});
	
	$('#mod_pukkaRooms .moduleBody').autoscroll(AUTOSCROLL_Y);
	$('.roomContent').autoscroll(AUTOSCROLL_Y);
	$('.diningContentHolder').autoscroll(AUTOSCROLL_Y);
	
	if(!($("#page_accommodation").length || $("#page_dining").length)){
		$('.mainContentHolder').autoscroll(AUTOSCROLL_Y);
	}
	$('.pngFix').pukkaPNGFix();
	
});



function initSlideshow(){
	if(typeof(slideArray) != 'undefined' && !$('#inPageEditBar').length>0){
		var mygallery=new simpleGallery({
			wrapperid: "mainVisualSlides",
			dimensions: [970, 530],
			imagearray: slideArray,
			autoplay: [true, 4500, 100], 
			persist: false,
			fadeduration: 500
		});
	}
}


 function cycleOffers(){
	$('#cycleOffer').before('<div id="offersNav">').cycle({ 
	    fx:     'fade', 
	    speed:   1000, 
	    timeout: 7500,
		cleartype: false,
		pager:  '#offersNav' 

	});
 }


 
 
 
function loadPhotoGallery(){
 	
	mygallery=new simpleGallery({
	 wrapperid: "galleryImgBox",
	 dimensions: [970, 410],
	 imagearray: photoArray,
	 autoplay: [true, 4500, 100], 
	 persist: false,
	 fadeduration: 500,
	 oninit:function(){ 
	 
	 },
	 onslide:function(curslide, i){ 
	 	updateCurrentPhoto(i);
	 }
	});
	
	
	
	var num = $('#tumbsNavBox .scrollWrapper img').length;
	var w = parseInt($('#tumbsNavBox .scrollWrapper img').eq(0).css('width').replace('px','')); 
	var nw = num*(w+2); //adds 2 pixel for the border
	
	
	$('#tumbsNavBox .scrollWrapper .scrollableArea').css({'width':nw});
	
	$('.scrollWrapper').autoscroll(AUTOSCROLL_X);

	
	$('#galleryContainer').bind('mouseenter',function(e){
		$('#galleryThumbsContainer').stop();
		if($.browser.msie) {
			$('#galleryThumbsContainer').css({visibility:'visible'});
		} else {
			$('#galleryThumbsContainer').animate({opacity:1},"slow");
		}
	});
	$('#galleryContainer').bind('mouseleave',function(e){
		$('#galleryThumbsContainer').stop();
		if($.browser.msie) {
			$('#galleryThumbsContainer').css({visibility:'hidden'});
		} else {
			$('#galleryThumbsContainer').animate({opacity:0},"slow");
		}
	});
	if($.browser.msie) {
		$('#galleryThumbsContainer').css({visibility:'hidden'});
	} else {
		$('#galleryThumbsContainer').animate({"opacity":0},5000);
	}
	
	$('#galleryPrevNav').click(function(event){
		event.preventDefault();
		mygallery.navigate("prev");
	});
	$('#galleryNextNav').click(function(event){
		event.preventDefault();
		mygallery.navigate("next");
	});

	$('.scrollableArea a').click(function(event){
		event.preventDefault();
		var curNum = $(this).attr("href").replace("#","");
		mygallery.navigate(curNum-1);
		
	});
	

	$('#tumbsNavBox').bind('mouseenter',function(e){
		scrollHover = true;
	});

	$('#tumbsNavBox').bind('mouseleave',function(e){
		scrollHover = false;
	});

	
	$('.scrollableArea img').each(function(){
		$(this).bind('mouseenter',function(e){
			$(this).stop();
			$(this).animate({'opacity': 0.7});
		});

		$(this).bind('mouseleave',function(e){
			$(this).stop();
			$(this).animate({'opacity': 1});
		});
	});
 }
 
 function updateCurrentPhoto(i){
 	$('.scrollableArea img.active').css({borderColor:'#000000'});
	$('.scrollableArea img.active').removeClass('active');
	$('.scrollableArea img').eq(i).animate({borderColor: '#ffffff'},"fast");
	$('.scrollableArea img').eq(i).addClass('active');
	
	var imgSize = $('.scrollableArea img').eq(0).css("width").replace("px","");
	var newLeft = imgSize*i;

	var contSize = $('#galleryThumbsContainer').css("width").replace("px","");
	var xOffset = contSize/2-imgSize/2;
	
	newLeft = (xOffset-newLeft>0) ? 0 : newLeft-xOffset;
	
	if(!scrollHover){
		$('.scrollWrapper').scrollTo({ top:0, left:newLeft}, 1000);
	}
 }
 


