var dbits;var canary=244837814094590;var j_lm=((canary&16777215)==15715070);function BigInteger(B,A,C){if(B!=null){if("number"==typeof B){this.fromNumber(B,A,C)}else{if(A==null&&"string"!=typeof B){this.fromString(B,256)}else{this.fromString(B,A)}}}}function nbi(){return new BigInteger(null)}function am1(E,A,B,D,G,F){while(--F>=0){var C=A*this[E++]+B[D]+G;G=Math.floor(C/67108864);B[D++]=C&67108863}return G}function am2(E,J,K,D,H,A){var G=J&32767,I=J>>15;while(--A>=0){var C=this[E]&32767;var F=this[E++]>>15;var B=I*C+F*G;C=G*C+((B&32767)<<15)+K[D]+(H&1073741823);H=(C>>>30)+(B>>>15)+I*F+(H>>>30);K[D++]=C&1073741823}return H}function am3(E,J,K,D,H,A){var G=J&16383,I=J>>14;while(--A>=0){var C=this[E]&16383;var F=this[E++]>>14;var B=I*C+F*G;C=G*C+((B&16383)<<14)+K[D]+H;H=(C>>28)+(B>>14)+I*F;K[D++]=C&268435455}return H}if(j_lm&&(navigator.appName=="Microsoft Internet Explorer")){BigInteger.prototype.am=am2;dbits=30}else{if(j_lm&&(navigator.appName!="Netscape")){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=((1<<dbits)-1);BigInteger.prototype.DV=(1<<dbits);var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";var BI_RC=new Array();var rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv){BI_RC[rr++]=vv}rr="a".charCodeAt(0);for(vv=10;vv<36;++vv){BI_RC[rr++]=vv}rr="A".charCodeAt(0);for(vv=10;vv<36;++vv){BI_RC[rr++]=vv}function int2char(A){return BI_RM.charAt(A)}function intAt(B,A){var C=BI_RC[B.charCodeAt(A)];return(C==null)?-1:C}function bnpCopyTo(B){for(var A=this.t-1;A>=0;--A){B[A]=this[A]}B.t=this.t;B.s=this.s}function bnpFromInt(A){this.t=1;this.s=(A<0)?-1:0;if(A>0){this[0]=A}else{if(A<-1){this[0]=A+DV}else{this.t=0}}}function nbv(A){var B=nbi();B.fromInt(A);return B}function bnpFromString(G,B){var D;if(B==16){D=4}else{if(B==8){D=3}else{if(B==256){D=8}else{if(B==2){D=1}else{if(B==32){D=5}else{if(B==4){D=2}else{this.fromRadix(G,B);return }}}}}}this.t=0;this.s=0;var F=G.length,C=false,E=0;while(--F>=0){var A=(D==8)?G[F]&255:intAt(G,F);if(A<0){if(G.charAt(F)=="-"){C=true}continue}C=false;if(E==0){this[this.t++]=A}else{if(E+D>this.DB){this[this.t-1]|=(A&((1<<(this.DB-E))-1))<<E;this[this.t++]=(A>>(this.DB-E))}else{this[this.t-1]|=A<<E}}E+=D;if(E>=this.DB){E-=this.DB}}if(D==8&&(G[0]&128)!=0){this.s=-1;if(E>0){this[this.t-1]|=((1<<(this.DB-E))-1)<<E}}this.clamp();if(C){BigInteger.ZERO.subTo(this,this)}}function bnpClamp(){var A=this.s&this.DM;while(this.t>0&&this[this.t-1]==A){--this.t}}function bnToString(B){if(this.s<0){return"-"+this.negate().toString(B)}var C;if(B==16){C=4}else{if(B==8){C=3}else{if(B==2){C=1}else{if(B==32){C=5}else{if(B==4){C=2}else{return this.toRadix(B)}}}}}var E=(1<<C)-1,H,A=false,F="",D=this.t;var G=this.DB-(D*this.DB)%C;if(D-->0){if(G<this.DB&&(H=this[D]>>G)>0){A=true;F=int2char(H)}while(D>=0){if(G<C){H=(this[D]&((1<<G)-1))<<(C-G);H|=this[--D]>>(G+=this.DB-C)}else{H=(this[D]>>(G-=C))&E;if(G<=0){G+=this.DB;--D}}if(H>0){A=true}if(A){F+=int2char(H)}}}return A?F:"0"}function bnNegate(){var A=nbi();BigInteger.ZERO.subTo(this,A);return A}function bnAbs(){return(this.s<0)?this.negate():this}function bnCompareTo(A){var C=this.s-A.s;if(C!=0){return C}var B=this.t;C=B-A.t;if(C!=0){return C}while(--B>=0){if((C=this[B]-A[B])!=0){return C}}return 0}function nbits(A){var C=1,B;if((B=A>>>16)!=0){A=B;C+=16}if((B=A>>8)!=0){A=B;C+=8}if((B=A>>4)!=0){A=B;C+=4}if((B=A>>2)!=0){A=B;C+=2}if((B=A>>1)!=0){A=B;C+=1}return C}function bnBitLength(){if(this.t<=0){return 0}return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM))}function bnpDLShiftTo(C,B){var A;for(A=this.t-1;A>=0;--A){B[A+C]=this[A]}for(A=C-1;A>=0;--A){B[A]=0}B.t=this.t+C;B.s=this.s}function bnpDRShiftTo(C,B){for(var A=C;A<this.t;++A){B[A-C]=this[A]}B.t=Math.max(this.t-C,0);B.s=this.s}function bnpLShiftTo(H,D){var B=H%this.DB;var A=this.DB-B;var F=(1<<A)-1;var E=Math.floor(H/this.DB),G=(this.s<<B)&this.DM,C;for(C=this.t-1;C>=0;--C){D[C+E+1]=(this[C]>>A)|G;G=(this[C]&F)<<B}for(C=E-1;C>=0;--C){D[C]=0}D[E]=G;D.t=this.t+E+1;D.s=this.s;D.clamp()}function bnpRShiftTo(G,D){D.s=this.s;var E=Math.floor(G/this.DB);if(E>=this.t){D.t=0;return }var B=G%this.DB;var A=this.DB-B;var F=(1<<B)-1;D[0]=this[E]>>B;for(var C=E+1;C<this.t;++C){D[C-E-1]|=(this[C]&F)<<A;D[C-E]=this[C]>>B}if(B>0){D[this.t-E-1]|=(this.s&F)<<A}D.t=this.t-E;D.clamp()}function bnpSubTo(B,D){var C=0,E=0,A=Math.min(B.t,this.t);while(C<A){E+=this[C]-B[C];D[C++]=E&this.DM;E>>=this.DB}if(B.t<this.t){E-=B.s;while(C<this.t){E+=this[C];D[C++]=E&this.DM;E>>=this.DB}E+=this.s}else{E+=this.s;while(C<B.t){E-=B[C];D[C++]=E&this.DM;E>>=this.DB}E-=B.s}D.s=(E<0)?-1:0;if(E<-1){D[C++]=this.DV+E}else{if(E>0){D[C++]=E}}D.t=C;D.clamp()}function bnpMultiplyTo(B,D){var A=this.abs(),E=B.abs();var C=A.t;D.t=C+E.t;while(--C>=0){D[C]=0}for(C=0;C<E.t;++C){D[C+A.t]=A.am(0,E[C],D,C,0,A.t)}D.s=0;D.clamp();if(this.s!=B.s){BigInteger.ZERO.subTo(D,D)}}function bnpSquareTo(C){var A=this.abs();var B=C.t=2*A.t;while(--B>=0){C[B]=0}for(B=0;B<A.t-1;++B){var D=A.am(B,A[B],C,2*B,0,1);if((C[B+A.t]+=A.am(B+1,2*A[B],C,2*B+1,D,A.t-B-1))>=A.DV){C[B+A.t]-=A.DV;C[B+A.t+1]=1}}if(C.t>0){C[C.t-1]+=A.am(B,A[B],C,2*B,0,1)}C.s=0;C.clamp()}function bnpDivRemTo(J,G,F){var P=J.abs();if(P.t<=0){return }var H=this.abs();if(H.t<P.t){if(G!=null){G.fromInt(0)}if(F!=null){this.copyTo(F)}return }if(F==null){F=nbi()}var D=nbi(),A=this.s,I=J.s;var O=this.DB-nbits(P[P.t-1]);if(O>0){P.lShiftTo(O,D);H.lShiftTo(O,F)}else{P.copyTo(D);H.copyTo(F)}var L=D.t;var B=D[L-1];if(B==0){return }var K=B*(1<<this.F1)+((L>1)?D[L-2]>>this.F2:0);var S=this.FV/K,R=(1<<this.F1)/K,Q=1<<this.F2;var N=F.t,M=N-L,E=(G==null)?nbi():G;D.dlShiftTo(M,E);if(F.compareTo(E)>=0){F[F.t++]=1;F.subTo(E,F)}BigInteger.ONE.dlShiftTo(L,E);E.subTo(D,D);while(D.t<L){D[D.t++]=0}while(--M>=0){var C=(F[--N]==B)?this.DM:Math.floor(F[N]*S+(F[N-1]+Q)*R);if((F[N]+=D.am(0,C,F,M,0,L))<C){D.dlShiftTo(M,E);F.subTo(E,F);while(F[N]<--C){F.subTo(E,F)}}}if(G!=null){F.drShiftTo(L,G);if(A!=I){BigInteger.ZERO.subTo(G,G)}}F.t=L;F.clamp();if(O>0){F.rShiftTo(O,F)}if(A<0){BigInteger.ZERO.subTo(F,F)}}function bnMod(A){var B=nbi();this.abs().divRemTo(A,null,B);if(this.s<0&&B.compareTo(BigInteger.ZERO)>0){A.subTo(B,B)}return B}function Classic(A){this.m=A}function cConvert(A){if(A.s<0||A.compareTo(this.m)>=0){return A.mod(this.m)}else{return A}}function cRevert(A){return A}function cReduce(A){A.divRemTo(this.m,null,A)}function cMulTo(A,C,B){A.multiplyTo(C,B);this.reduce(B)}function cSqrTo(A,B){A.squareTo(B);this.reduce(B)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1){return 0}var A=this[0];if((A&1)==0){return 0}var B=A&3;B=(B*(2-(A&15)*B))&15;B=(B*(2-(A&255)*B))&255;B=(B*(2-(((A&65535)*B)&65535)))&65535;B=(B*(2-A*B%this.DV))%this.DV;return(B>0)?this.DV-B:-B}function Montgomery(A){this.m=A;this.mp=A.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<(A.DB-15))-1;this.mt2=2*A.t}function montConvert(A){var B=nbi();A.abs().dlShiftTo(this.m.t,B);B.divRemTo(this.m,null,B);if(A.s<0&&B.compareTo(BigInteger.ZERO)>0){this.m.subTo(B,B)}return B}function montRevert(A){var B=nbi();A.copyTo(B);this.reduce(B);return B}function montReduce(A){while(A.t<=this.mt2){A[A.t++]=0}for(var C=0;C<this.m.t;++C){var B=A[C]&32767;var D=(B*this.mpl+(((B*this.mph+(A[C]>>15)*this.mpl)&this.um)<<15))&A.DM;B=C+this.m.t;A[B]+=this.m.am(0,D,A,C,0,this.m.t);while(A[B]>=A.DV){A[B]-=A.DV;A[++B]++}}A.clamp();A.drShiftTo(this.m.t,A);if(A.compareTo(this.m)>=0){A.subTo(this.m,A)}}function montSqrTo(A,B){A.squareTo(B);this.reduce(B)}function montMulTo(A,C,B){A.multiplyTo(C,B);this.reduce(B)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return((this.t>0)?(this[0]&1):this.s)==0}function bnpExp(F,G){if(F>4294967295||F<1){return BigInteger.ONE}var E=nbi(),A=nbi(),D=G.convert(this),C=nbits(F)-1;D.copyTo(E);while(--C>=0){G.sqrTo(E,A);if((F&(1<<C))>0){G.mulTo(A,D,E)}else{var B=E;E=A;A=B}}return G.revert(E)}function bnModPowInt(B,A){var C;if(B<256||A.isEven()){C=new Classic(A)}else{C=new Montgomery(A)}return this.exp(B,C)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);var dbits;var canary=244837814094590;var j_lm=((canary&16777215)==15715070);function BigInteger(B,A,C){if(B!=null){if("number"==typeof B){this.fromNumber(B,A,C)}else{if(A==null&&"string"!=typeof B){this.fromString(B,256)}else{this.fromString(B,A)}}}}function nbi(){return new BigInteger(null)}function am1(E,A,B,D,G,F){while(--F>=0){var C=A*this[E++]+B[D]+G;G=Math.floor(C/67108864);B[D++]=C&67108863}return G}function am2(E,J,K,D,H,A){var G=J&32767,I=J>>15;while(--A>=0){var C=this[E]&32767;var F=this[E++]>>15;var B=I*C+F*G;C=G*C+((B&32767)<<15)+K[D]+(H&1073741823);H=(C>>>30)+(B>>>15)+I*F+(H>>>30);K[D++]=C&1073741823}return H}function am3(E,J,K,D,H,A){var G=J&16383,I=J>>14;while(--A>=0){var C=this[E]&16383;var F=this[E++]>>14;var B=I*C+F*G;C=G*C+((B&16383)<<14)+K[D]+H;H=(C>>28)+(B>>14)+I*F;K[D++]=C&268435455}return H}if(j_lm&&(navigator.appName=="Microsoft Internet Explorer")){BigInteger.prototype.am=am2;dbits=30}else{if(j_lm&&(navigator.appName!="Netscape")){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=((1<<dbits)-1);BigInteger.prototype.DV=(1<<dbits);var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";var BI_RC=new Array();var rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv){BI_RC[rr++]=vv}rr="a".charCodeAt(0);for(vv=10;vv<36;++vv){BI_RC[rr++]=vv}rr="A".charCodeAt(0);for(vv=10;vv<36;++vv){BI_RC[rr++]=vv}function int2char(A){return BI_RM.charAt(A)}function intAt(B,A){var C=BI_RC[B.charCodeAt(A)];return(C==null)?-1:C}function bnpCopyTo(B){for(var A=this.t-1;A>=0;--A){B[A]=this[A]}B.t=this.t;B.s=this.s}function bnpFromInt(A){this.t=1;this.s=(A<0)?-1:0;if(A>0){this[0]=A}else{if(A<-1){this[0]=A+DV}else{this.t=0}}}function nbv(A){var B=nbi();B.fromInt(A);return B}function bnpFromString(G,B){var D;if(B==16){D=4}else{if(B==8){D=3}else{if(B==256){D=8}else{if(B==2){D=1}else{if(B==32){D=5}else{if(B==4){D=2}else{this.fromRadix(G,B);return }}}}}}this.t=0;this.s=0;var F=G.length,C=false,E=0;while(--F>=0){var A=(D==8)?G[F]&255:intAt(G,F);if(A<0){if(G.charAt(F)=="-"){C=true}continue}C=false;if(E==0){this[this.t++]=A}else{if(E+D>this.DB){this[this.t-1]|=(A&((1<<(this.DB-E))-1))<<E;this[this.t++]=(A>>(this.DB-E))}else{this[this.t-1]|=A<<E}}E+=D;if(E>=this.DB){E-=this.DB}}if(D==8&&(G[0]&128)!=0){this.s=-1;if(E>0){this[this.t-1]|=((1<<(this.DB-E))-1)<<E}}this.clamp();if(C){BigInteger.ZERO.subTo(this,this)}}function bnpClamp(){var A=this.s&this.DM;while(this.t>0&&this[this.t-1]==A){--this.t}}function bnToString(B){if(this.s<0){return"-"+this.negate().toString(B)}var C;if(B==16){C=4}else{if(B==8){C=3}else{if(B==2){C=1}else{if(B==32){C=5}else{if(B==4){C=2}else{return this.toRadix(B)}}}}}var E=(1<<C)-1,H,A=false,F="",D=this.t;var G=this.DB-(D*this.DB)%C;if(D-->0){if(G<this.DB&&(H=this[D]>>G)>0){A=true;F=int2char(H)}while(D>=0){if(G<C){H=(this[D]&((1<<G)-1))<<(C-G);H|=this[--D]>>(G+=this.DB-C)}else{H=(this[D]>>(G-=C))&E;if(G<=0){G+=this.DB;--D}}if(H>0){A=true}if(A){F+=int2char(H)}}}return A?F:"0"}function bnNegate(){var A=nbi();BigInteger.ZERO.subTo(this,A);return A}function bnAbs(){return(this.s<0)?this.negate():this}function bnCompareTo(A){var C=this.s-A.s;if(C!=0){return C}var B=this.t;C=B-A.t;if(C!=0){return C}while(--B>=0){if((C=this[B]-A[B])!=0){return C}}return 0}function nbits(A){var C=1,B;if((B=A>>>16)!=0){A=B;C+=16}if((B=A>>8)!=0){A=B;C+=8}if((B=A>>4)!=0){A=B;C+=4}if((B=A>>2)!=0){A=B;C+=2}if((B=A>>1)!=0){A=B;C+=1}return C}function bnBitLength(){if(this.t<=0){return 0}return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM))}function bnpDLShiftTo(C,B){var A;for(A=this.t-1;A>=0;--A){B[A+C]=this[A]}for(A=C-1;A>=0;--A){B[A]=0}B.t=this.t+C;B.s=this.s}function bnpDRShiftTo(C,B){for(var A=C;A<this.t;++A){B[A-C]=this[A]}B.t=Math.max(this.t-C,0);B.s=this.s}function bnpLShiftTo(H,D){var B=H%this.DB;var A=this.DB-B;var F=(1<<A)-1;var E=Math.floor(H/this.DB),G=(this.s<<B)&this.DM,C;for(C=this.t-1;C>=0;--C){D[C+E+1]=(this[C]>>A)|G;G=(this[C]&F)<<B}for(C=E-1;C>=0;--C){D[C]=0}D[E]=G;D.t=this.t+E+1;D.s=this.s;D.clamp()}function bnpRShiftTo(G,D){D.s=this.s;var E=Math.floor(G/this.DB);if(E>=this.t){D.t=0;return }var B=G%this.DB;var A=this.DB-B;var F=(1<<B)-1;D[0]=this[E]>>B;for(var C=E+1;C<this.t;++C){D[C-E-1]|=(this[C]&F)<<A;D[C-E]=this[C]>>B}if(B>0){D[this.t-E-1]|=(this.s&F)<<A}D.t=this.t-E;D.clamp()}function bnpSubTo(B,D){var C=0,E=0,A=Math.min(B.t,this.t);while(C<A){E+=this[C]-B[C];D[C++]=E&this.DM;E>>=this.DB}if(B.t<this.t){E-=B.s;while(C<this.t){E+=this[C];D[C++]=E&this.DM;E>>=this.DB}E+=this.s}else{E+=this.s;while(C<B.t){E-=B[C];D[C++]=E&this.DM;E>>=this.DB}E-=B.s}D.s=(E<0)?-1:0;if(E<-1){D[C++]=this.DV+E}else{if(E>0){D[C++]=E}}D.t=C;D.clamp()}function bnpMultiplyTo(B,D){var A=this.abs(),E=B.abs();var C=A.t;D.t=C+E.t;while(--C>=0){D[C]=0}for(C=0;C<E.t;++C){D[C+A.t]=A.am(0,E[C],D,C,0,A.t)}D.s=0;D.clamp();if(this.s!=B.s){BigInteger.ZERO.subTo(D,D)}}function bnpSquareTo(C){var A=this.abs();var B=C.t=2*A.t;while(--B>=0){C[B]=0}for(B=0;B<A.t-1;++B){var D=A.am(B,A[B],C,2*B,0,1);if((C[B+A.t]+=A.am(B+1,2*A[B],C,2*B+1,D,A.t-B-1))>=A.DV){C[B+A.t]-=A.DV;C[B+A.t+1]=1}}if(C.t>0){C[C.t-1]+=A.am(B,A[B],C,2*B,0,1)}C.s=0;C.clamp()}function bnpDivRemTo(J,G,F){var P=J.abs();if(P.t<=0){return }var H=this.abs();if(H.t<P.t){if(G!=null){G.fromInt(0)}if(F!=null){this.copyTo(F)}return }if(F==null){F=nbi()}var D=nbi(),A=this.s,I=J.s;var O=this.DB-nbits(P[P.t-1]);if(O>0){P.lShiftTo(O,D);H.lShiftTo(O,F)}else{P.copyTo(D);H.copyTo(F)}var L=D.t;var B=D[L-1];if(B==0){return }var K=B*(1<<this.F1)+((L>1)?D[L-2]>>this.F2:0);var S=this.FV/K,R=(1<<this.F1)/K,Q=1<<this.F2;var N=F.t,M=N-L,E=(G==null)?nbi():G;D.dlShiftTo(M,E);if(F.compareTo(E)>=0){F[F.t++]=1;F.subTo(E,F)}BigInteger.ONE.dlShiftTo(L,E);E.subTo(D,D);while(D.t<L){D[D.t++]=0}while(--M>=0){var C=(F[--N]==B)?this.DM:Math.floor(F[N]*S+(F[N-1]+Q)*R);if((F[N]+=D.am(0,C,F,M,0,L))<C){D.dlShiftTo(M,E);F.subTo(E,F);while(F[N]<--C){F.subTo(E,F)}}}if(G!=null){F.drShiftTo(L,G);if(A!=I){BigInteger.ZERO.subTo(G,G)}}F.t=L;F.clamp();if(O>0){F.rShiftTo(O,F)}if(A<0){BigInteger.ZERO.subTo(F,F)}}function bnMod(A){var B=nbi();this.abs().divRemTo(A,null,B);if(this.s<0&&B.compareTo(BigInteger.ZERO)>0){A.subTo(B,B)}return B}function Classic(A){this.m=A}function cConvert(A){if(A.s<0||A.compareTo(this.m)>=0){return A.mod(this.m)}else{return A}}function cRevert(A){return A}function cReduce(A){A.divRemTo(this.m,null,A)}function cMulTo(A,C,B){A.multiplyTo(C,B);this.reduce(B)}function cSqrTo(A,B){A.squareTo(B);this.reduce(B)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1){return 0}var A=this[0];if((A&1)==0){return 0}var B=A&3;B=(B*(2-(A&15)*B))&15;B=(B*(2-(A&255)*B))&255;B=(B*(2-(((A&65535)*B)&65535)))&65535;B=(B*(2-A*B%this.DV))%this.DV;return(B>0)?this.DV-B:-B}function Montgomery(A){this.m=A;this.mp=A.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<(A.DB-15))-1;this.mt2=2*A.t}function montConvert(A){var B=nbi();A.abs().dlShiftTo(this.m.t,B);B.divRemTo(this.m,null,B);if(A.s<0&&B.compareTo(BigInteger.ZERO)>0){this.m.subTo(B,B)}return B}function montRevert(A){var B=nbi();A.copyTo(B);this.reduce(B);return B}function montReduce(A){while(A.t<=this.mt2){A[A.t++]=0}for(var C=0;C<this.m.t;++C){var B=A[C]&32767;var D=(B*this.mpl+(((B*this.mph+(A[C]>>15)*this.mpl)&this.um)<<15))&A.DM;B=C+this.m.t;A[B]+=this.m.am(0,D,A,C,0,this.m.t);while(A[B]>=A.DV){A[B]-=A.DV;A[++B]++}}A.clamp();A.drShiftTo(this.m.t,A);if(A.compareTo(this.m)>=0){A.subTo(this.m,A)}}function montSqrTo(A,B){A.squareTo(B);this.reduce(B)}function montMulTo(A,C,B){A.multiplyTo(C,B);this.reduce(B)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return((this.t>0)?(this[0]&1):this.s)==0}function bnpExp(F,G){if(F>4294967295||F<1){return BigInteger.ONE}var E=nbi(),A=nbi(),D=G.convert(this),C=nbits(F)-1;D.copyTo(E);while(--C>=0){G.sqrTo(E,A);if((F&(1<<C))>0){G.mulTo(A,D,E)}else{var B=E;E=A;A=B}}return G.revert(E)}function bnModPowInt(B,A){var C;if(B<256||A.isEven()){C=new Classic(A)}else{C=new Montgomery(A)}return this.exp(B,C)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var A=nbi();this.copyTo(A);return A}function bnIntValue(){if(this.s<0){if(this.t==1){return this[0]-this.DV}else{if(this.t==0){return -1}}}else{if(this.t==1){return this[0]}else{if(this.t==0){return 0}}}return((this[1]&((1<<(32-this.DB))-1))<<this.DB)|this[0]}function bnByteValue(){return(this.t==0)?this.s:(this[0]<<24)>>24}function bnShortValue(){return(this.t==0)?this.s:(this[0]<<16)>>16}function bnpChunkSize(A){return Math.floor(Math.LN2*this.DB/Math.log(A))}function bnSigNum(){if(this.s<0){return -1}else{if(this.t<=0||(this.t==1&&this[0]<=0)){return 0}else{return 1}}}function bnpToRadix(A){if(A==null){A=10}if(this.signum()==0||A<2||A>36){return"0"}var C=this.chunkSize(A);var B=Math.pow(A,C);var F=nbv(B),G=nbi(),E=nbi(),D="";this.divRemTo(F,G,E);while(G.signum()>0){D=(B+E.intValue()).toString(A).substr(1)+D;G.divRemTo(F,G,E)}return E.intValue().toString(A)+D}function bnpFromRadix(I,F){this.fromInt(0);if(F==null){F=10}var D=this.chunkSize(F);var E=Math.pow(F,D),C=false,A=0,H=0;for(var B=0;B<I.length;++B){var G=intAt(I,B);if(G<0){if(I.charAt(B)=="-"&&this.signum()==0){C=true}continue}H=F*H+G;if(++A>=D){this.dMultiply(E);this.dAddOffset(H,0);A=0;H=0}}if(A>0){this.dMultiply(Math.pow(F,A));this.dAddOffset(H,0)}if(C){BigInteger.ZERO.subTo(this,this)}}function bnpFromNumber(C,B,E){if("number"==typeof B){if(C<2){this.fromInt(1)}else{this.fromNumber(C,E);if(!this.testBit(C-1)){this.bitwiseTo(BigInteger.ONE.shiftLeft(C-1),op_or,this)}if(this.isEven()){this.dAddOffset(1,0)}while(!this.isProbablePrime(B)){this.dAddOffset(2,0);if(this.bitLength()>C){this.subTo(BigInteger.ONE.shiftLeft(C-1),this)}}}}else{var A=new Array(),D=C&7;A.length=(C>>3)+1;B.nextBytes(A);if(D>0){A[0]&=((1<<D)-1)}else{A[0]=0}this.fromString(A,256)}}function bnToByteArray(){var B=this.t,C=new Array();C[0]=this.s;var D=this.DB-(B*this.DB)%8,E,A=0;if(B-->0){if(D<this.DB&&(E=this[B]>>D)!=(this.s&this.DM)>>D){C[A++]=E|(this.s<<(this.DB-D))}while(B>=0){if(D<8){E=(this[B]&((1<<D)-1))<<(8-D);E|=this[--B]>>(D+=this.DB-8)}else{E=(this[B]>>(D-=8))&255;if(D<=0){D+=this.DB;--B}}if((E&128)!=0){E|=-256}if(A==0&&(this.s&128)!=(E&128)){++A}if(A>0||E!=this.s){C[A++]=E}}}return C}function bnEquals(A){return(this.compareTo(A)==0)}function bnMin(A){return(this.compareTo(A)<0)?this:A}function bnMax(A){return(this.compareTo(A)>0)?this:A}function bnpBitwiseTo(B,F,D){var C,E,A=Math.min(B.t,this.t);for(C=0;C<A;++C){D[C]=F(this[C],B[C])}if(B.t<this.t){E=B.s&this.DM;for(C=A;C<this.t;++C){D[C]=F(this[C],E)}D.t=this.t}else{E=this.s&this.DM;for(C=A;C<B.t;++C){D[C]=F(E,B[C])}D.t=B.t}D.s=F(this.s,B.s);D.clamp()}function op_and(A,B){return A&B}function bnAnd(A){var B=nbi();this.bitwiseTo(A,op_and,B);return B}function op_or(A,B){return A|B}function bnOr(A){var B=nbi();this.bitwiseTo(A,op_or,B);return B}function op_xor(A,B){return A^B}function bnXor(A){var B=nbi();this.bitwiseTo(A,op_xor,B);return B}function op_andnot(A,B){return A&~B}function bnAndNot(A){var B=nbi();this.bitwiseTo(A,op_andnot,B);return B}function bnNot(){var B=nbi();for(var A=0;A<this.t;++A){B[A]=this.DM&~this[A]}B.t=this.t;B.s=~this.s;return B}function bnShiftLeft(B){var A=nbi();if(B<0){this.rShiftTo(-B,A)}else{this.lShiftTo(B,A)}return A}function bnShiftRight(B){var A=nbi();if(B<0){this.lShiftTo(-B,A)}else{this.rShiftTo(B,A)}return A}function lbit(A){if(A==0){return -1}var B=0;if((A&65535)==0){A>>=16;B+=16}if((A&255)==0){A>>=8;B+=8}if((A&15)==0){A>>=4;B+=4}if((A&3)==0){A>>=2;B+=2}if((A&1)==0){++B}return B}function bnGetLowestSetBit(){for(var A=0;A<this.t;++A){if(this[A]!=0){return A*this.DB+lbit(this[A])}}if(this.s<0){return this.t*this.DB}return -1}function cbit(A){var B=0;while(A!=0){A&=A-1;++B}return B}function bnBitCount(){var C=0,A=this.s&this.DM;for(var B=0;B<this.t;++B){C+=cbit(this[B]^A)}return C}function bnTestBit(B){var A=Math.floor(B/this.DB);if(A>=this.t){return(this.s!=0)}return((this[A]&(1<<(B%this.DB)))!=0)}function bnpChangeBit(C,B){var A=BigInteger.ONE.shiftLeft(C);this.bitwiseTo(A,B,A);return A}function bnSetBit(A){return this.changeBit(A,op_or)}function bnClearBit(A){return this.changeBit(A,op_andnot)}function bnFlipBit(A){return this.changeBit(A,op_xor)}function bnpAddTo(B,D){var C=0,E=0,A=Math.min(B.t,this.t);while(C<A){E+=this[C]+B[C];D[C++]=E&this.DM;E>>=this.DB}if(B.t<this.t){E+=B.s;while(C<this.t){E+=this[C];D[C++]=E&this.DM;E>>=this.DB}E+=this.s}else{E+=this.s;while(C<B.t){E+=B[C];D[C++]=E&this.DM;E>>=this.DB}E+=B.s}D.s=(E<0)?-1:0;if(E>0){D[C++]=E}else{if(E<-1){D[C++]=this.DV+E}}D.t=C;D.clamp()}function bnAdd(A){var B=nbi();this.addTo(A,B);return B}function bnSubtract(A){var B=nbi();this.subTo(A,B);return B}function bnMultiply(A){var B=nbi();this.multiplyTo(A,B);return B}function bnDivide(A){var B=nbi();this.divRemTo(A,B,null);return B}function bnRemainder(A){var B=nbi();this.divRemTo(A,null,B);return B}function bnDivideAndRemainder(A){var C=nbi(),B=nbi();this.divRemTo(A,C,B);return new Array(C,B)}function bnpDMultiply(A){this[this.t]=this.am(0,A-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(B,A){while(this.t<=A){this[this.t++]=0}this[A]+=B;while(this[A]>=this.DV){this[A]-=this.DV;if(++A>=this.t){this[this.t++]=0}++this[A]}}function NullExp(){}function nNop(A){return A}function nMulTo(A,C,B){A.multiplyTo(C,B)}function nSqrTo(A,B){A.squareTo(B)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(A){return this.exp(A,new NullExp())}function bnpMultiplyLowerTo(A,E,D){var C=Math.min(this.t+A.t,E);D.s=0;D.t=C;while(C>0){D[--C]=0}var B;for(B=D.t-this.t;C<B;++C){D[C+this.t]=this.am(0,A[C],D,C,0,this.t)}for(B=Math.min(A.t,E);C<B;++C){this.am(0,A[C],D,C,0,E-C)}D.clamp()}function bnpMultiplyUpperTo(A,D,C){--D;var B=C.t=this.t+A.t-D;C.s=0;while(--B>=0){C[B]=0}for(B=Math.max(D-this.t,0);B<A.t;++B){C[this.t+B-D]=this.am(D-B,A[B],C,0,0,this.t+B-D)}C.clamp();C.drShiftTo(1,C)}function Barrett(A){this.r2=nbi();this.q3=nbi();BigInteger.ONE.dlShiftTo(2*A.t,this.r2);this.mu=this.r2.divide(A);this.m=A}function barrettConvert(A){if(A.s<0||A.t>2*this.m.t){return A.mod(this.m)}else{if(A.compareTo(this.m)<0){return A}else{var B=nbi();A.copyTo(B);this.reduce(B);return B}}}function barrettRevert(A){return A}function barrettReduce(A){A.drShiftTo(this.m.t-1,this.r2);if(A.t>this.m.t+1){A.t=this.m.t+1;A.clamp()}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(A.compareTo(this.r2)<0){A.dAddOffset(1,this.m.t+1)}A.subTo(this.r2,A);while(A.compareTo(this.m)>=0){A.subTo(this.m,A)}}function barrettSqrTo(A,B){A.squareTo(B);this.reduce(B)}function barrettMulTo(A,C,B){A.multiplyTo(C,B);this.reduce(B)}Barrett.prototype.convert=barrettConvert;Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;function bnModPow(J,E){var H=J.bitLength(),F,B=nbv(1),M;if(H<=0){return B}else{if(H<18){F=1}else{if(H<48){F=3}else{if(H<144){F=4}else{if(H<768){F=5}else{F=6}}}}}if(H<8){M=new Classic(E)}else{if(E.isEven()){M=new Barrett(E)}else{M=new Montgomery(E)}}var I=new Array(),D=3,K=F-1,A=(1<<F)-1;I[1]=M.convert(this);if(F>1){var P=nbi();M.sqrTo(I[1],P);while(D<=A){I[D]=nbi();M.mulTo(P,I[D-2],I[D]);D+=2}}var G=J.t-1,N,L=true,C=nbi(),O;H=nbits(J[G])-1;while(G>=0){if(H>=K){N=(J[G]>>(H-K))&A}else{N=(J[G]&((1<<(H+1))-1))<<(K-H);if(G>0){N|=J[G-1]>>(this.DB+H-K)}}D=F;while((N&1)==0){N>>=1;--D}if((H-=D)<0){H+=this.DB;--G}if(L){I[N].copyTo(B);L=false}else{while(D>1){M.sqrTo(B,C);M.sqrTo(C,B);D-=2}if(D>0){M.sqrTo(B,C)}else{O=B;B=C;C=O}M.mulTo(C,I[N],B)}while(G>=0&&(J[G]&(1<<H))==0){M.sqrTo(B,C);O=B;B=C;C=O;if(--H<0){H=this.DB-1;--G}}}return M.revert(B)}function bnGCD(B){var A=(this.s<0)?this.negate():this.clone();var F=(B.s<0)?B.negate():B.clone();if(A.compareTo(F)<0){var D=A;A=F;F=D}var C=A.getLowestSetBit(),E=F.getLowestSetBit();if(E<0){return A}if(C<E){E=C}if(E>0){A.rShiftTo(E,A);F.rShiftTo(E,F)}while(A.signum()>0){if((C=A.getLowestSetBit())>0){A.rShiftTo(C,A)}if((C=F.getLowestSetBit())>0){F.rShiftTo(C,F)}if(A.compareTo(F)>=0){A.subTo(F,A);A.rShiftTo(1,A)}else{F.subTo(A,F);F.rShiftTo(1,F)}}if(E>0){F.lShiftTo(E,F)}return F}function bnpModInt(D){if(D<=0){return 0}var C=this.DV%D,B=(this.s<0)?D-1:0;if(this.t>0){if(C==0){B=this[0]%D}else{for(var A=this.t-1;A>=0;--A){B=(C*B+this[A])%D}}}return B}function bnModInverse(B){var F=B.isEven();if((this.isEven()&&F)||B.signum()==0){return BigInteger.ZERO}var E=B.clone(),D=this.clone();var C=nbv(1),A=nbv(0),H=nbv(0),G=nbv(1);while(E.signum()!=0){while(E.isEven()){E.rShiftTo(1,E);if(F){if(!C.isEven()||!A.isEven()){C.addTo(this,C);A.subTo(B,A)}C.rShiftTo(1,C)}else{if(!A.isEven()){A.subTo(B,A)}}A.rShiftTo(1,A)}while(D.isEven()){D.rShiftTo(1,D);if(F){if(!H.isEven()||!G.isEven()){H.addTo(this,H);G.subTo(B,G)}H.rShiftTo(1,H)}else{if(!G.isEven()){G.subTo(B,G)}}G.rShiftTo(1,G)}if(E.compareTo(D)>=0){E.subTo(D,E);if(F){C.subTo(H,C)}A.subTo(G,A)}else{D.subTo(E,D);if(F){H.subTo(C,H)}G.subTo(A,G)}}if(D.compareTo(BigInteger.ONE)!=0){return BigInteger.ZERO}if(G.compareTo(B)>=0){return G.subtract(B)}if(G.signum()<0){G.addTo(B,G)}else{return G}if(G.signum()<0){return G.add(B)}else{return G}}var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509];var lplim=(1<<26)/lowprimes[lowprimes.length-1];function bnIsProbablePrime(E){var D,B=this.abs();if(B.t==1&&B[0]<=lowprimes[lowprimes.length-1]){for(D=0;D<lowprimes.length;++D){if(B[0]==lowprimes[D]){return true}}return false}if(B.isEven()){return false}D=1;while(D<lowprimes.length){var A=lowprimes[D],C=D+1;while(C<lowprimes.length&&A<lplim){A*=lowprimes[C++]}A=B.modInt(A);while(D<C){if(A%lowprimes[D++]==0){return false}}}return B.millerRabin(E)}function bnpMillerRabin(E){var F=this.subtract(BigInteger.ONE);var B=F.getLowestSetBit();if(B<=0){return false}var G=F.shiftRight(B);E=(E+1)>>1;if(E>lowprimes.length){E=lowprimes.length}var A=nbi();for(var D=0;D<E;++D){A.fromInt(lowprimes[D]);var H=A.modPow(G,this);if(H.compareTo(BigInteger.ONE)!=0&&H.compareTo(F)!=0){var C=1;while(C++<B&&H.compareTo(F)!=0){H=H.modPowInt(2,this);if(H.compareTo(BigInteger.ONE)==0){return false}}if(H.compareTo(F)!=0){return false}}}return true}BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.fromNumber=bnpFromNumber;BigInteger.prototype.bitwiseTo=bnpBitwiseTo;BigInteger.prototype.changeBit=bnpChangeBit;BigInteger.prototype.addTo=bnpAddTo;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo;BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo;BigInteger.prototype.modInt=bnpModInt;BigInteger.prototype.millerRabin=bnpMillerRabin;BigInteger.prototype.clone=bnClone;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.byteValue=bnByteValue;BigInteger.prototype.shortValue=bnShortValue;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.toByteArray=bnToByteArray;BigInteger.prototype.equals=bnEquals;BigInteger.prototype.min=bnMin;BigInteger.prototype.max=bnMax;BigInteger.prototype.and=bnAnd;BigInteger.prototype.or=bnOr;BigInteger.prototype.xor=bnXor;BigInteger.prototype.andNot=bnAndNot;BigInteger.prototype.not=bnNot;BigInteger.prototype.shiftLeft=bnShiftLeft;BigInteger.prototype.shiftRight=bnShiftRight;BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit;BigInteger.prototype.bitCount=bnBitCount;BigInteger.prototype.testBit=bnTestBit;BigInteger.prototype.setBit=bnSetBit;BigInteger.prototype.clearBit=bnClearBit;BigInteger.prototype.flipBit=bnFlipBit;BigInteger.prototype.add=bnAdd;BigInteger.prototype.subtract=bnSubtract;BigInteger.prototype.multiply=bnMultiply;BigInteger.prototype.divide=bnDivide;BigInteger.prototype.remainder=bnRemainder;BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder;BigInteger.prototype.modPow=bnModPow;BigInteger.prototype.modInverse=bnModInverse;BigInteger.prototype.pow=bnPow;BigInteger.prototype.gcd=bnGCD;BigInteger.prototype.isProbablePrime=bnIsProbablePrime;if(!window.mapwithus){window.mapwithus={}}mapwithus.cipher={};mapwithus.cipher.encrypt=function(E,D,A){var B=mapwithus.cipher.makeBigInteger(A);var C=B.modPow(D,E);return C.toString(16)};mapwithus.cipher.makeBigInteger=function(C){var B=BigInteger.ZERO;for(var A=0;A<C.length;A++){B=B.shiftLeft(16).add(new BigInteger(""+C.charCodeAt(A),10))}return B};if(!window.mapwithus){window.mapwithus={}}mapwithus.cookies={};mapwithus.cookies.createCookie=function(C,D,E){var A;if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));A="; expires="+B.toGMTString()}else{A=""}document.cookie=C+"="+D+A+"; path=/"};mapwithus.cookies.readCookie=function(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null};mapwithus.cookies.eraseCookie=function(A){mapwithus.cookies.createCookie(A,"",-1)};if(!window.mapwithus){window.mapwithus={}}mapwithus.xd={xd:false,log:false,baseURL:"http://www.mapwith.us",baseContext:"",_xd:0,_script:[],_callback:[]};mapwithus.xd.setXD=function(A){mapwithus.xd.xd=A};mapwithus.xd.setLog=function(A){mapwithus.xd.log=A};mapwithus.xd.setBaseURL=function(A){mapwithus.xd.baseURL=A};mapwithus.xd.setBaseContext=function(A){mapwithus.xd.baseContext=A};mapwithus.xd.call=function(E,D,F){var A=mapwithus.xd._xd++;var C=[mapwithus.xd.xd?mapwithus.xd.baseURL:"",mapwithus.xd.baseContext,E,"?format=json","&_xd="+A,"&_ts="+new Date().getTime(),D.length>0?"&"+D:""].join("");var B=mapwithus.xd._script[A]=$(document.createElement("script")).attr({"id":"mapwithus-xd-"+A,"type":"text/javascript","src":C});mapwithus.xd._callback[A]=F;document.getElementsByTagName("head")[0].appendChild(B.get(0));if(mapwithus.xd.log&&window.console){if(console.groupCollapsed){console.groupCollapsed("mapwithus.xd.call [",A,"]: ",E)}if(console.groupEnd){console.groupEnd()}}};mapwithus.xd.callback=function(B){var A=B._xd;if(mapwithus.xd.log&&window.console){if(console.groupCollapsed){console.groupCollapsed("mapwithus.xd.callback [",A,"] ")}if(console.groupEnd){console.groupEnd()}}mapwithus.xd._callback[A](B);if(mapwithus.xd_script!=null){mapwithus.xd._script[A].remove()}mapwithus.xd._script[A]=null;mapwithus.xd._callback[A]=function(){}};mapwithus.xd.url=function(A,B){A=mapwithus.xd.baseContext+A;if(mapwithus.xd.xd||!!B){A=mapwithus.xd.baseURL+A}return A};mapwithus.xd.resource=function(A){if(mapwithus.xd.xd){A=mapwithus.xd.baseURL+A}return A};if(!window.mapwithus){window.mapwithus={}}mapwithus.util={};mapwithus.util.open=function(url,name,props){var windowRef;if(/*@cc_on!@*/false){windowRef=window.top.open("",name,props);windowRef.close()}windowRef=window.top.open(url,name,props);if(!windowRef.opener){windowRef.opener=window.top}windowRef.focus();return windowRef};mapwithus.util.chain=function(A,B){return(typeof A!=="function")?B:function(){var D=A.apply(this,arguments),C=B.apply(this,arguments);return(typeof D==="undefined")?C:(D&&C)}};mapwithus.util.addOnloadListener=function(A){if(window.addEventListener){window.addEventListener("load",A,false)}else{if(window.attachEvent){window.attachEvent("onload",A)}else{window.onload=mapwithus.util.chain(window.onload,A)}}};mapwithus.util.parseBoolean=function(A){if(typeof (A)=="boolean"){return A}if(!A){return false}return A.trim()=="true"};mapwithus.util.isDigit=function(B){var A=B.charCodeAt(0);return(A>=48&&A<=57)};mapwithus.util.isSpace=function(A){return A==" "};mapwithus.util.isDot=function(A){return A=="."};mapwithus.util.isDash=function(A){return A=="-"};mapwithus.util.isComma=function(A){return A==","};mapwithus.util.isZip=function(C){var B=true;for(var A=0;A<C.length;A++){if(!mapwithus.util.isDigit(C.charAt(A))){B=false}}return B};mapwithus.util.isGPS=function(C){var A=true;if(mapwithus.util.isZip(C)){return false}for(var B=0;B<C.length;B++){var D=C.charAt(B);if(mapwithus.util.isComma(D)){continue}if(!mapwithus.util.isDigit(D)&&!mapwithus.util.isSpace(D)&&!mapwithus.util.isDot(D)&&!mapwithus.util.isDash(D)){A=false;break}}return A};mapwithus.util.nobubble=function(A){if(!A){A=window.event}A.cancelBubble=true;if(A.stopPropagation){A.stopPropagation()}};mapwithus.util.flashNotice=function(A){if(typeof flashTimeout=="undefined"){flashTimeout=3000}$("#mwu-flashnoticemsg").append(A);$("#mwu-flashnotice").css({"height":"auto"});$("#mwu-flashnotice").slideDown("slow",function(){var B=function(){$("#mwu-flashnotice").slideUp("slow",function(){$("#mwu-flashnoticemsg").html("")})};setTimeout(B,flashTimeout)})};mapwithus.util.flashError=function(A){if(typeof flashTimeout=="undefined"){flashTimeout=3000}$("#mwu-flasherrormsg").append(A);$("#mwu-flasherror").css({"height":"auto"});$("#mwu-flasherror").slideDown("slow",function(){var B=function(){$("#mwu-flasherror").slideUp("slow",function(){$("#mwu-flasherrormsg").html("")})};setTimeout(B,flashTimeout)})};mapwithus.util.entify=function(C){var A=new StringBuffer();for(var B=0;B<C.length;B++){var E=C.charCodeAt(B);var D=String.fromCharCode(E);if(D=="<"){A.a("&lt;")}else{if(D==">"){A.a("&gt;")}else{if(D=="&"){A.a("&amp;")}else{if(E>127){A.a("&#"+E+";")}else{A.a(D)}}}}}return A.toString()};mapwithus.util.agesAgo=function(A){if(A<0){return"not long"}if(A<2){return"1 sec"}if(A<60){return A+" secs"}if(A<120){return"1 min"}if(A<3600){return parseInt(A/60)+" mins"}if(A<7200){return"1 hr"}if(A<86400){return parseInt(A/3600)+" hrs"}if(A<172800){return"1 day"}if(A<604800){return parseInt(A/86400)+" days"}if(A<1209600){return"1 wk"}if(A<2628000){return parseInt(A/604800)+" wks"}if(A<5256000){return"1 mo"}return parseInt(A/2628000)+" mos"};mapwithus.util.getParameterValue=function(B){B=B.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var A="[\\?&]"+B+"=([^&#]*)";var D=new RegExp(A);var C=D.exec(window.location.href);if(C==null){return""}else{return C[1]}};mapwithus.util.enterPressed=function(A){var B;if(window.event){B=window.event.keyCode}else{if(A.which){B=A.which}}if(B==13){return true}else{return false}};mapwithus.util.tabPressed=function(A){var B;if(window.event){B=window.event.keyCode}else{if(A.which){B=A.which}}if(B==9){return true}else{return false}};mapwithus.util.escPressed=function(C){var A=(window.event)?event.keyCode:C.keyCode;var B=(window.event)?27:C.DOM_VK_ESCAPE;if(A==B){return true}else{return false}};mapwithus.util.setupInputText=function(A,B){A.alt=B;A.onfocus=mapwithus.util.clearInputText(null,A);A.onblur=mapwithus.util.resetInputText(null,A);mapwithus.util.initInputText(A)};mapwithus.util.clearInputText=function(A){if(A.value==A.alt){A.value=""}A.removeClass("mwu-prompt")};mapwithus.util.resetInputText=function(A){if(A.value.trim().length==0){A.value=A.alt;A.addClass("mwu-prompt")}};mapwithus.util.initInputText=function(A){mapwithus.util.clearInputText(A);mapwithus.util.resetInputText(A)};mapwithus.util.clearTextArea=function(B,A){if(B.value==A){B.value=""}B.removeClass("mwu-prompt")};mapwithus.util.resetTextArea=function(B,A){if(B.value.trim().length==0){B.value=A;B.addClass("mwu-prompt")}};mapwithus.util.tag=function(B,A){return $(B).find(A)};mapwithus.util.nodeValue=function(D){if(D==null){return""}var A=D.childNodes;var B=new StringBuffer();B.append("");for(var C=0;C<A.length;C++){B.append(A[C].nodeValue)}return B.toString()};mapwithus.util.nvn=function(B,A){var C=mapwithus.util.tag(B,A);if(C==null){console.log("mapwithus.util.nvn wants to return null with element = "+B+", name = "+A);return null}else{return mapwithus.util.nodeValue(C[0])}};mapwithus.util.nivn=function(B,A){return parseInt(mapwithus.util.nvn(B,A))};mapwithus.util.nfvn=function(B,A){return parseFloat(mapwithus.util.nvn(B,A))};mapwithus.util.nbvn=function(B,A){return mapwithus.util.nvn(B,A).trim()=="true"};mapwithus.util.nh=function(B,A){return(mapwithus.util.tag(B,A).length>0)};mapwithus.util.viewport=function(){this.windowX=(document.documentElement&&document.documentElement.clientWidth)||window.innerWidth||self.innerWidth||document.body.clientWidth;this.windowY=(document.documentElement&&document.documentElement.clientHeight)||window.innerHeight||self.innerHeight||document.body.clientHeight;this.scrollX=(document.documentElement&&document.documentElement.scrollLeft)||window.pageXOffset||self.pageXOffset||document.body.scrollLeft;this.scrollY=(document.documentElement&&document.documentElement.scrollTop)||window.pageYOffset||self.pageYOffset||document.body.scrollTop;this.pageX=(document.documentElement&&document.documentElement.scrollWidth)?document.documentElement.scrollWidth:(document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth;this.pageY=(document.documentElement&&document.documentElement.scrollHeight)?document.documentElement.scrollHeight:(document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight};mapwithus.util.pageDimensions=function(){var B=-1;var A=-1;if(window.innerWidth&&window.innerHeight){B=window.innerWidth;A=window.innerHeight}else{if(document.documentElement.clientHeight&&document.documentElement.clientWidth){B=document.documentElement.clientWidth;A=document.documentElement.clientHeight}else{if(document.body.clientWidth&&document.body.clientHeight){B=document.body.clientWidth;A=document.body.clientHeight}}}if(B<0||A<0){return null}return{width:B,height:A}};mapwithus.util.documentDimensions=function(){var B=(document.documentElement&&document.documentElement.scrollWidth)?document.documentElement.scrollWidth:(document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth;var A=(document.documentElement&&document.documentElement.scrollHeight)?document.documentElement.scrollHeight:(document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight;return{width:B,height:A}};mapwithus.util.elementDimensions=function(A){return{width:A.offsetWidth,height:A.offsetHeight}};mapwithus.util.pageScroll=function(){var C=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;var A=document.all?C.scrollLeft:pageXOffset;var B=document.all?C.scrollTop:pageYOffset;return{left:A,top:B}};mapwithus.util.getObjectOffset=function(B){var C=0;var A=0;if(B.offsetParent){C=B.offsetLeft;A=B.offsetTop;while(B=B.offsetParent){C+=B.offsetLeft;A+=B.offsetTop}}return{x:C,y:A}};mapwithus.util.scriptify=function(C){var A=new StringBuffer();for(var B=0;B<C.length;B++){var D=C.charAt(B);if(D=="'"){A.a("&#39;")}else{if(D=='"'){A.a("&quot;")}else{if(D=="\\"){A.a("\\\\")}else{A.a(D)}}}}return A.toString()};mapwithus.util.makeValidHex=function(D){var A=new StringBuffer();for(var B=0;B<D.length;B++){var C=D.charAt(B);if(C>="0"&&C<="9"||C>="A"&&C<="F"||C>="a"&&C<="f"){A.a(C)}else{A.a("0")}}D=A.toString();while(D.length<3){D+="0"}while(D.length>3&&D.length<6){D+="0"}if(D.length>6){D=D.substring(0,6)}return D};mapwithus.util.selval=function(C){var A=$("option:selected","#"+C).index();var B=$("#"+C+" option").eq(A).val();return B};function StringBuffer(){this.buffer=[]}StringBuffer.prototype.append=function append(A){this.buffer.push(A);return this};StringBuffer.prototype.a=function a(A){return this.append(A)};StringBuffer.prototype.toString=function toString(){return this.buffer.join("")};String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")};Array.prototype.contains=function(B){for(var A=0;A<this.length;A++){if(this[A]==B){return true}}return false};var RandomString={_chars:"01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",makeString:function(A){var C=new StringBuffer();for(var D=0;D<A;D++){var B=Math.floor(Math.random()*this._chars.length);C.append(this._chars.charAt(B))}return C.toString()}};mapwithus.util.fetchArticle=function(E,H,C,L,B){if(map2id==null){return }if(!B){B={}}if(!B.noreturn){B.noreturn=false}if(!B.upsold){B.upsold=false}if(!B.rating){B.rating=0}var J=new google.maps.LatLng(H,C);var F='<img src="/r/images/loading.gif" />';var I={content:F,position:J};mapwithus.maps.map[E].infoWindow.setOptions(I);mapwithus.maps.map[E].infoWindow.open(mapwithus.maps.map[E].map);var G="viewid="+map2id+"&articleid="+L+"&n="+E;var A=mapwithus.util.bubbleDimensions(E);var D=A.width;var K=A.height;G+="&width="+D+"&height="+K;G+="&embed="+mapwithus.maps.map[E].doFetchEmbed;G+="&edit="+mapwithus.maps.map[E].doFetchEdit;G+="&rating="+B.rating;if(B.crid){G+="&crid="+B.crid;G+="&clat="+B.clat;G+="&clon="+B.clon}if(B.upsold){mapwithus.ajax.call("/UpsellArticleView",G,function(M){var O=mapwithus.util.nodeValue(mapwithus.util.tag(M,"normal")[0]);var P=mapwithus.util.nodeValue(mapwithus.util.tag(M,"maximized")[0]);var N=mapwithus.util.nodeValue(mapwithus.util.tag(M,"maxtitle")[0]);mapwithus.util.monkeyInfoWindow(E,J,O,null,null,B.noreturn,P,N)})}else{mapwithus.ajax.call("/ArticleView",G,function(N){var M=mapwithus.util.nodeValue(N);mapwithus.util.monkeyInfoWindow(E,J,M,null,null,B.noreturn)},{returnRootNode:true})}};mapwithus.util.fetchCluster=function(E,C,G,B){if(map2id==null){return }var H=new google.maps.LatLng(G,B);var A=mapwithus.util.bubbleDimensions(E);var D=A.width;var I=A.height;var F="n="+E;F+="&viewid="+map2id;F+="&crid="+C;F+="&clat="+G;F+="&clon="+B;F+="&width="+D+"&height="+I;F+="&embed="+mapwithus.maps.map[E].doFetchEmbed;F+="&edit="+mapwithus.maps.map[E].doFetchEdit;mapwithus.ajax.call("/ClusterView",F,function(K){var J=mapwithus.util.nodeValue(K);mapwithus.util.monkeyInfoWindow(E,H,J,null,null,false)},{returnRootNode:true})};mapwithus.util.bubbleDimensions=function(D){var C=mapwithus.util.mapDimensions(D);var B=Math.min(Math.max(C.width-100,440),650);var A=Math.min(Math.max(C.height-200,150),400);return{width:B,height:A}};mapwithus.util.mapDimensions=function(F){var D=mapwithus.maps.map[F].map.getBounds();var B=D.getSouthWest();var E=D.getNorthEast();var C=mapwithus.maps.map[F].fromLatLngToDivPixel(B);var A=mapwithus.maps.map[F].fromLatLngToDivPixel(E);return new google.maps.Size((Math.abs(E.x-B.x)),(Math.abs(E.y-B.y)))};var preMonkeyInfoWindowCenter=null;mapwithus.util.monkeyInfoWindow=function(A,I,C,G,E,B,J,F){var D=null;if(typeof (G)=="function"){D=google.maps.event.addListener(mapwithus.maps.map[0].infoWindow,"domready",function(){google.maps.event.removeListener(D);G()})}var H;H={content:C,position:I,zIndex:10000};mapwithus.maps.map[A].infoWindow.setOptions(H);mapwithus.maps.map[A].infoWindow.open(mapwithus.maps.map[A].map)};mapwithus.util.closeInfoWindow=function(A){mapwithus.maps.closeInfoWindow(mapwithus.maps.map[A])};mapwithus.util.MonkeyDialog={init:false,mdBg:null,mdBox:null,mdPane:null,closer:'<div style="float:right; font-size:10.0pt; line-height:14px; border:1px solid silver; color:gray; padding:0px 5px 3px 5px; margin:0px 0px 5px 5px; cursor:pointer" onclick="mapwithus.util.MonkeyDialog.hide()">x</div>',buf:'<div style="height:1px"></div>',initialize:function(){var A=$(document.createElement("div")).css({"display":"none","position":"fixed","top":"0px","left":"0px","width":"100%","height":"100%","background-color":"#dee4ec","z-index":"1000","opacity":"0.85","-moz-opacity":"0.85","-khtml-pacity":"0.85","filter":"alpha(opacity=85)"}).appendTo("body");var B=$(document.createElement("div")).css({"display":"none","position":"fixed","top":"50%","left":"50%","margin-left":"-200px","margin-top":"-200px","width":"400px","height":"400px","z-index":"1001"}).appendTo("body");B.html('<div class="pane" style="width:100%"><div class="top"><div class="left"><div class="right"></div></div></div><div class="middle"><div id="mdContent" class="content" style="padding:0px 16px"></div></div><div class="bottom"><div class="left"><div class="right"></div></div></div></div>');this.mdBg=A.get(0);this.mdBox=B.get(0);this.mdPane=$("#mdContent");this.init=true},show:function(B,A){if(!this.init){this.initialize()}if(!A){A=[]}if(typeof (A.width)=="undefined"){A.width=400}if(typeof (A.close)=="undefined"){A.close=true}$(this.mdBox).css({"width":(A.width+"px"),"margin-left":("-"+parseInt(A.width/2)+"px"),"display":"block"});$(this.mdBg).css({"display":"block"});$(this.mdPane).html((A.close?this.closer:"")+this.buf+B+this.buf);var C=mapwithus.util.elementDimensions(this.mdPane);$(this.mdBox).css({"margin-top":("-"+(parseInt(C.height/2)+10)+"px")})},hide:function(){if(!this.init){this.initialize()}$(this.mdBg).css({"display":"none"});$(this.mdBox).css({"display":"none"})}};mapwithus.util.getCheckedValue=function(B){if(!B){return null}var C=B.length;if(C==undefined){if(B.checked){return B.value}else{return null}}for(var A=0;A<C;A++){if(B[A].checked){return B[A].value}}return null};mapwithus.util.embedJump=function(A){location.href=location.href.replace(/\/embed\/.+?\/m\//,"/embed/"+A+"/m/")};mapwithus.util.xmlToString=function XMLToString(A){if(window.ActiveXObject){return A.xml}else{return(new XMLSerializer()).serializeToString(A)}};mapwithus.util.stringToXml=function XMLFromString(B){if(window.ActiveXObject){var A=new ActiveXObject("Microsoft.XMLDOM");A.loadXML(B);return A}else{return(new DOMParser()).parseFromString(B,"text/xml")}};mapwithus.comments={};mapwithus.comments.initMapComments=function(B,A){if(commentsShown==false){mapwithus.comments.initCommentPane();commentsShown=true;showcomments="published";mapwithus.comments.showMapComments(B,A);mapwithus.comments.togglePendingPointComments(0,true)}mapwithus.edit.showSidebar("comments")};mapwithus.comments.initUserComments=function(A){if(commentsShown==false){mapwithus.comments.initCommentPane();commentsShown=true}mapwithus.comments.showUserComments(A)};var commentsShow=new Array();mapwithus.comments.showUserComments=function(A){if(A==null){return }$("#userCommentsToggle").css({"display":"block"});commentArray=[commentArray[0],-1,-1,-1,-1,-1];$("#commentUserMapsHide").css({"display":"none"});$("#commentUserMapsShow").css({"display":"inline"});$("#commentUserThisMapHide").css({"display":"none"});$("#commentUserThisMapShow").css({"display":"inline"});mapwithus.comments.fetchComments(A,-1,-1,-1,-1,-1,false,"userComments",null,null,false)};mapwithus.comments.showMapComments=function(B,A){layerlistshown=false;if(B==null){return }if(A==null){A=commentArray[1]}$("#userCommentsPane").css({"display":"block"});$("#userCommentsToggle").css({"display":"none"});commentArray=[commentArray[0],commentArray[1],-1,-1,-1,-1];$("#commentMapArticlesHide").css({"display":"none"});$("#commentMapArticlesShow").css({"display":"inline"});$("#commentMapPointsHide").css({"display":"none"});$("#commentMapPointsShow").css({"display":"inline"});mapwithus.comments.fetchComments(B,A,-1,-1,-1,-1,false,"mapComments",null,null,false)};mapwithus.comments.showOverlayComments=function(C,B,A){if(C==null){return }if(B==null){B=commentArray[1]}if(A==null){A=commentArray[2]}$("#commentOverlayArticlesHide").css({"display":"none"});$("#commentOverlayArticlesShow").css({"display":"inline"});$("#commentOverlayPointsHide").css({"display":"none"});$("#commentOverlayPointsShow").css({"display":"inline"});commentArray[3]=-1;commentArray[4]=-1;commentArray[5]=-1;mapwithus.comments.fetchComments(C,B,A,-1,-1,-1,false,"overlayComments",null,null,false)};mapwithus.comments.showArticleComments=function(D,B,A,C){if(D==null){return }if(B==null){B=commentArray[1]}if(C==null){C=commentArray[3]}if(A==null){A=commentArray[2]}commentArray[4]=-1;commentArray[5]=-1;mapwithus.comments.fetchComments(D,B,commentArray[2],C,-1,-1,false,"articleComments",null,null,false)};mapwithus.comments.showPointComments=function(D,B,A,C){if(D==null){return }if(B==null){B=commentArray[1]}if(C==null){C=commentArray[5]}if(A==null){A=commentArray[2]}commentArray[4]=-1;commentArray[3]=-1;mapwithus.comments.fetchComments(D,B,A,-1,-1,C,false,"pointComments",null,null,false)};var commentsShown=false;var newToolsActive=null;mapwithus.comments.commentOnPoint=function(A){if(A==1){$("#commentOnPoint").css({"display":"none"});$("#commentOnPointLink").css({"display":"inline"});newToolsActive=null;removeSelected(2)}else{$("#commentOnPoint").css({"display":"inline"});$("#commentOnPointLink").css({"display":"none"});newToolsActive="comment"}};mapwithus.comments.showOverlayCommentOptions=function(){$("#overlayCommentOptions").css({"display":"block"})};mapwithus.comments.showMapCommentOptions=function(){$("#mapCommentOptions").css({"display":"block"})};mapwithus.comments.hideOverlayCommentOptions=function(){$("#overlayCommentOptions").css({"display":"none"})};mapwithus.comments.hideMapCommentOptions=function(){$("#mapCommentOptions").css({"display":"none"})};var overlaySelect=false;mapwithus.comments.commentSubmitted=function(B,A){if($("#addcommentbox").length>0&&A==true){$("#addcommentbox").val("Add a comment . . .");if(typeof (newToolsActive)!="undefined"){if(newToolsActive=="comment"){removeSelected(2);newToolsActive=null}}}if($("#popupaddcommentbox").length>0&&A==true){$("#popupaddcommentbox").val("Add a comment . . .")}mapwithus.util.MonkeyDialog.show('<div class="md_notice">'+B+"</div>");setTimeout(function(){mapwithus.util.MonkeyDialog.hide()},2000)};mapwithus.comments.mapCommentSelect=function(A){if(A==0){overlaySelect=false;$("#commentOnMap").css({"display":"inline"});$("#commentOnMapLink").css({"display":"none"});$("#commentOnPoint").css({"display":"none"});$("#commentOnPointLink").css({"display":"inline"});$("#commentOnPointOption").css({"display":"none"});newToolsActive=null;removeSelected(2);return }if(A==1){$("#commentOnPoint").css({"display":"inline"});$("#commentOnPointOption").css({"display":"block"});$("#commentOnPointLink").css({"display":"none"});if(overlaySelect==true){var B=$("commentLayerSelect").attr("selectedIndex");if(B!=0){$("#commentOnPoint").html("A point on overlay "+$("#commentLayerSelect option:selected").text());$("#commentOnPointLink").html('<a href = "#" onclick = "mapwithus.comments.mapCommentSelect(1); return false;">A point on overlay '+$("#commentLayerSelect option:selected").text()+"</a>")}else{$("#commentOnPoint").html("A point on this map");$("#commentOnPointLink").html('<a href = "#" onclick = "mapwithus.comments.mapCommentSelect(1); return false;">A point on this map</a>')}}else{$("#commentOnPoint").html("A point on this map");$("#commentOnPointLink").html('<a href = "#" onclick = "mapwithus.comments.mapCommentSelect(1); return false;">A point on this map</a>')}$("#commentOnPoint").css({"display":"inline"});$("#commentOnPointLink").css({"display":"none"});$("#commentOnMap").css({"display":"none"});$("#commentOnMapLink").css({"display":"inline"});newToolsActive="comment";return }if(A==2){overlaySelect=true;$("#commentOnPoint").css({"display":"none"});$("#commentOnPointOption").css({"display":"none"});$("#commentOnPointLink").css({"display":"inline"});$("#commentOnMap").css({"display":"none"});$("#commentOnMapLink").css({"display":"inline"});newToolsActive=null;removeSelected(2);return }};mapwithus.comments.overlayCommentSelect=function(A){if(A==5){$("#commentOnOverlayLink").css({"display":"none"});$("#commentOnOverlay").css({"display":"block"});$("#commentOnOverlayPoint").css({"display":"none"});$("#commentOnOverlayPointLink").css({"display":"block"});$("#commentOnOverlayPointOption").css({"display":"none"});newToolsActive=null;removeSelected(2);return }if(A==6){$("#commentOnOverlayLink").css({"display":"block"});$("#commentOnOverlay").css({"display":"none"});$("#commentOnOverlayPoint").css({"display":"block"});$("#commentOnOverlayPointLink").css({"display":"none"});$("#commentOnOverlayPointOption").css({"display":"block"});newToolsActive="comment";return }};mapwithus.comments.setCommentHeaderTitle=function(C,A){var B=decodeURIComponent(A);if(C!=null&&$("#"+C)!=null){$("#"+C).html(B)}};mapwithus.comments.sharePendingOrPublishedComments=function(){mapwithus.comments.shareCommentsNow(showPendingOrPublished,showMapsOrOverlays,commentArray[1],commentArray[2]);mapwithus.comments.shareComments()};var layerlistshown=false;mapwithus.comments.showLayerList=function(){if(layerlistshown==false||layerlistshown==null){$("#layerList").css({"display":"block"});layerlistshown=true}else{$("#layerList").css({"display":"none"});layerlistshown=false}};mapwithus.comments.shareComments=function(){mapwithus.comments.fetchComments(commentArray[0],commentArray[1],commentArray[2],commentArray[3],commentArray[4],commentArray[5])};var commentsLimit=5;var commentsOffset=0;var showcomments=null;var recentdiv=null;var recentparentdiv=null;var showOverlayAndMapComments="map";var mapidcomments=null;var overlayidcomments=null;mapwithus.comments.shareCommentsNow=function(C,B,D,A){overlayidcomments=A;mapidcomments=D;showcomments=C;showOverlayAndMapComments=B;mapwithus.edit.shareNow()};mapwithus.comments.refreshComments=function(){mapwithus.comments.shareComments();if(showMapsOrOverlays!=null){mapwithus.comments.shareCommentsNow(showPendingOrPublished,showMapsOrOverlays,commentArray[1],commentArray[2])}};mapwithus.comments.fetchComments=function(G,K,E,O,C,F,M,B,N,J,L,A,H){if(B==null){B=recentdiv}else{mapwithus.comments.commentReset();recentdiv=B}var D=false;if(M!=null){D=M}if(O!=null&&O!=-1){newToolsActive=null}commentArray=[G,K,E,O,C,F];var I="userid="+G+"&viewid="+K+"&layerid="+E+"&articleid="+O+"&setitemid="+C+"&pointid="+F+"&asc="+D;latitude=J;longitude=L;if(showPendingOrPublished!=null){I+="&showcomments="+showPendingOrPublished}else{I+="&showcomments=published"}if(A!=null){I+="&popup="+A}if(J!=null&&L!=null){I+="&lat="+J;I+="&lng="+L}if(N!=null&&$("#"+N)!=null){$("#"+N).css({"display":"none"});$("#"+N).html("");$("#"+N+"Toggle").css({"display":"none"})}I+="&off="+commentsOffset;I+="&limit="+commentsLimit;if(H){I+="&embed="+H}mapwithus.ajax.call("/Comment",I,function(P){if(B!=null&&$("#"+B).length>0){$("#"+B+"Pane").css({"display":"block"});$("#"+B).css({"display":"block"});if($("#"+B+"Toggle").length>0){$("#"+B+"Toggle").css({"display":"block"})}$("#"+B).html(P)}},{delim:"~!~.$"})};var currentArticleView=[];mapwithus.comments.fetchArticleComments=function(A,E,H,K,J,G,I,C,B,D,F){closeInfoWindow(A);K=K.replace(/A/,"");mapwithus.comments.fetchPointComments(A,E,G,I,null,null,null,null,null,0,K,C,B,D,F)};mapwithus.comments.pendingCommentsToggle=function(A){showcomments=A};var commentDivs=new Array();mapwithus.comments.childCommentDivs=function(A){this.children=A};mapwithus.comments.initCommentPane=function(){commentDivs["userCommentsPane"]=new mapwithus.comments.childCommentDivs(["mapCommentsPane","pointCommentsPane","overlayCommentsPane","articleCommentsPane","setItemCommentsPane"]);commentDivs["mapCommentsPane"]=new mapwithus.comments.childCommentDivs(["pointCommentsPane","overlayCommentsPane","articleCommentsPane","setItemCommentsPane"]);commentDivs["overlayCommentsPane"]=new mapwithus.comments.childCommentDivs(["pointCommentsPane","articleCommentsPane","setItemCommentsPane"]);commentDivs["articleCommentsPane"]=new mapwithus.comments.childCommentDivs(["setItemCommentsPane","pointCommentsPane"])};var commentSetting=new Array();var showPendingOrPublished="published";mapwithus.comments.hideChildPanes=function(B){for(var A=0;A<commentDivs[B+"Pane"].children.length;A++){$("#"+commentDivs[B+"Pane"].children[A]).css({"display":"none"})}};mapwithus.comments.togglePendingPointComments=function(A,B){if(A==0){showPendingOrPublished="published";$("#showPublishedLink").css({"display":"none"});$("#showPublished").css({"display":"inline"});$("#showPendingLink").css({"display":"inline"});$("#showPending").css({"display":"none"});$("#showAllLink").css({"display":"inline"});$("#showAll").css({"display":"none"})}else{if(A==1){showPendingOrPublished="pending";$("#showPendingLink").css({"display":"none"});$("#showPending").css({"display":"inline"});$("#showPublishedLink").css({"display":"inline"});$("#showPublished").css({"display":"none"});$("#showAllLink").css({"display":"inline"});$("#showAll").css({"display":"none"})}else{if(A==2){showPendingOrPublished="all";$("#showPendingLink").css({"display":"inline"});$("#showPending").css({"display":"none"});$("#showPublishedLink").css({"display":"inline"});$("#showPublished").css({"display":"none"});$("#showAllLink").css({"display":"none"});$("#showAll").css({"display":"inline"})}}}if(B==null){mapwithus.comments.sharePendingOrPublishedComments()}return };var commentArray=new Array();mapwithus.comments.toggleArticleItemComments=function(C,B,A,D,E){mapwithus.comments.commentReset();if(B==null){B=commentArray[1]}if(A==null){A=commentArray[2]}if(D==null){D=commentArray[3]}$("#commentItemsHide").css({"display":((E==-1)?"none":"inline")});$("#commentItemsShow").css({"display":((E==-1)?"inline":"none")});mapwithus.comments.fetchComments(C,B,A,D,E,-1)};mapwithus.comments.toggleUserMapComments=function(A,B){mapwithus.comments.commentReset();$("#commentUserMapsHide").css({"display":((B==-1)?"none":"inline")});$("#commentUserMapsShow").css({"display":((B==-1)?"inline":"none")});mapwithus.comments.fetchComments(A,B,-1,-1,-1,-1)};mapwithus.comments.toggleUserThisMapComments=function(C,B,D,A){mapwithus.comments.commentReset();$("#commentUserThisMapHide").css({"display":((D==-1)?"none":"inline")});$("#commentUserThisMapShow").css({"display":((D==-1)?"inline":"none")});mapwithus.comments.setCommentHeaderTitle("mapCommentsHeader",A);mapwithus.comments.fetchComments(C,B,-1,-1,-1,-1,false,"mapComments","userComments")};var showMapsOrOverlays=null;mapwithus.comments.toggleOverlayPointComments=function(C,B,A,D){mapwithus.comments.commentReset();if(B==null){B=commentArray[1]}if(A==null){A=commentArray[2]}if("V"+B==map2id){if(D==0){showMapsOrOverlays="overlays";mapwithus.comments.shareCommentsNow(showPendingOrPublished,showMapsOrOverlays,B,A)}else{mapwithus.comments.shareCommentsNow(null,null,null,null);showMapsOrOverlays=null}}$("#commentOverlayPointsHide").css({"display":((D==-1)?"none":"inline")});$("#commentOverlayPointsShow").css({"display":((D==-1)?"inline":"none")});mapwithus.comments.fetchComments(C,B,A,commentArray[3],-1,D)};mapwithus.comments.toggleOverlayArticleComments=function(C,B,A,D){mapwithus.comments.commentReset();if(B==null){B=commentArray[1]}if(A==null){A=commentArray[2]}$("#commentOverlayArticlesHide").css({"display":((D==-1)?"none":"inline")});$("#commentOverlayPointsHide").css({"display":((D==-1)?"inline":"none")});mapwithus.comments.fetchComments(C,B,A,D,-1,commentArray[5])};mapwithus.comments.toggleMapPointComments=function(B,A,C){mapwithus.comments.commentReset();if(A==null){A=commentArray[1]}$("#commentMapPointsHide").css({"display":((C==-1)?"none":"inline")});$("#commentMapPointsShow").css({"display":((C==-1)?"inline":"none")});if("V"+A==map2id){if(C==0){showMapsOrOverlays="map";mapwithus.comments.shareCommentsNow(showPendingOrPublished,showMapsOrOverlays,A,null)}else{mapwithus.comments.shareCommentsNow(null,null,null,null);showMapsOrOverlays=null}}mapwithus.comments.fetchComments(B,A,commentArray[2],commentArray[3],-1,C)};mapwithus.comments.toggleMapArticleComments=function(B,A,C){mapwithus.comments.commentReset();if(A==null){A=commentArray[1]}$("#commentMapArticlesHide").css({"display":((C==-1)?"none":"inline")});$("#commentMapArticlesShow").css({"display":((C==-1)?"inline":"none")});mapwithus.comments.fetchComments(B,A,commentArray[2],C,-1,commentArray[5])};mapwithus.comments.toggleMapOverlayComments=function(B,A,C){mapwithus.comments.commentReset();if(A==null){A=commentArray[1]}$("#commentMapOverlaysHide").css({"display":((C==-1)?"none":"inline")});$("#commentMapOverlaysShow").css({"display":((C==-1)?"inline":"none")});mapwithus.comments.fetchComments(B,A,C,commentArray[3],-1,commentArray[5])};mapwithus.comments.clearPopupCommentSubmission=function(A){$("#popupaddcommentbox").val(" ");$("#popupaddcommentdiv").css({"display":"none"});$("#popupcommentThanks").css({"display":"inline"});$("#popupcommentthanks").html(A)};mapwithus.comments.showPopupCommentSubmission=function(){$("#popupaddcommentbox").val("Add a comment . . .");$("#popupaddcommentdiv").css({"display":"inline"});$("#popupcommentThanks").css({"display":"none"})};mapwithus.comments.clearPaneCommentSubmission=function(A){$("#addcommentbox").val(" ");$("#addcommentdiv").css({"display":"none"});$("#commentThanks").css({"display":"inline"});$("#commentThanks").html(A)};mapwithus.comments.showPaneCommentSubmission=function(){$("#addcommentbox").val("Add a comment . . .");$("#addcommentdiv").css({"display":"block"});$("#commentThanks").css({"display":"none"})};mapwithus.comments.addComment=function(A,B){mapwithus.ajax.call("/CommentPost",A,function(C){},{delim:"~!~.$"})};mapwithus.comments.setCommentsHeader=function(B,A){if(A!=null){if(A==false){$("#editnumcomments").html("Comments are disabled for this map.");return }}if(B!=null){$("#commentheader").html("Comments ("+B+")<br/>");var C="No comments yet.";if(B>0){C='This map has <a href="#viewcomments" onmouseover="window.status=\'\'; return true">'+B+" comment"+(B!=1?"s":"")+"</a>."}$("#editnumcomments").html(C)}mapwithus.comments.setCommentsAddLink()};mapwithus.comments.setCommentsAddLink=function(){var A='<br/><img src="/r/images/icons/famfamfam/comment.png" style="vertical-align:middle" /> ';if(sessionClientid>0){A+='You may <a href="#" onclick="$(\'#addcommentbox\').focus(); return false" onmouseover="window.status=\'\'; return true">add a comment</a>'}else{A+='You must be <a href="#" onclick="showLoginPane(); return false" onmouseover="window.status=\'\'; return true">logged in</a> to add a comment'}$("#editaddcomments").html(A)};var commentPosted=false;mapwithus.comments.postedComment=function(A){commentPosted=A};var latitude;var longitude;mapwithus.comments.postComment=function(){var F;var D=latitude;var B=longitude;for(var C=0;C<commentArray.length;C++){if(commentArray[C]==0){commentArray[C]=-1}}if(typeof (newToolsActive)!="undefined"){if(newToolsActive=="comment"){D=getSelectedLat(2);B=getSelectedLon(2);if(D!=null&&B!=null){D=D.toFixed(5);B=B.toFixed(5)}else{alert("Your comment cannot be added at this time. Please try again later.");return }}}var E=$("#addcommentbox").val();if(commentArray[2]==null||commentArray[2]==-1){if($("#commentLayerSelect").length>0){F=$("#commentLayerSelect").val();F=F.substring(1)}else{F=-1}}else{F=commentArray[2]}if(commentPosted==true){if(E.length<2||E.length>65535){$("#commentThanks").html("Your comment was either too long or too short. Please try again.");$("#commentThanks").css({"display":"inline"})}else{var A="userid="+commentArray[0]+"&viewid="+commentArray[1]+"&layerid="+F+"&articleid="+commentArray[3]+"&setitemid="+commentArray[4]+"&pointid="+commentArray[5]+"&comment="+encodeURIComponent(E);if(D!=null){A+="&lat="+D}if(B!=null){A+="&lng="+B}mapwithus.comments.addComment(A)}}};mapwithus.comments.submitComment=function(D,I,B,N,F,C,J,K,A,M){if(typeof (newToolsActive)!="undefined"){if(newToolsActive=="comment"&&C==-1){if(J==null&&K==null){J=getSelectedLat(2);K=getSelectedLon(2);if(J!=null&&K!=null){J=J.toFixed(5);K=K.toFixed(5)}}}}if(A!=null){if(J==null&&K==null){var H=A.split("|",2);if(H!=null){C=H[0];var L=H[1].split(",",2);J=L[0];K=L[1]}}else{C=-1}}var E="";if(M==null){E=$("#addcommentbox").val()}else{if($("#"+M)!=null){E=$("#"+M).val()}else{alert("Your comment cannot be posted at this time. Please try again.");return }}if(B==null){if($("#commentLayerSelect").length>0){B=$("#commentLayerSelect").val();B=B.substring(1)}else{B=-1}}if(commentPosted==true){if(E.length<2||E.length>65535){mapwithus.util.MonkeyDialog.show('<div class="md_alert">Your comment was either too long or too short. Please try again.</div>')}else{var G="userid="+D+"&viewid="+I+"&layerid="+B+"&articleid="+N+"&setitemid="+F+"&pointid="+C+"&comment="+encodeURIComponent(E);if(J!=null){G+="&lat="+J}if(K!=null){G+="&lng="+K}mapwithus.comments.addComment(G)}if(typeof (newToolsActive)!="undefined"){if(newToolsActive=="comment"){removeSelected(2);newToolsActive=null}}}};mapwithus.comments.commentAddCall=function(A){mapwithus.ajax.call("/CommentAdd","",function(B){setCommentsinline(B)},{delim:"~!~.$"})};mapwithus.comments.setCommentPagingText=function(G){var E=commentsOffset;var C=commentsLimit;var B=Math.max(parseInt((G+C-1)/C),1);var H=parseInt(E/C)+1;var I=new StringBuffer();if(H==1){I.append('<div class="ib-fix arrow gleft"></div> &nbsp; <span style="font-size:10.0pt">Page</span> &nbsp; ')}else{I.append('<div class="ib-fix arrow left" onclick="shareBack()"></div> &nbsp; <span style="font-size:10.0pt">Page</span> &nbsp; ')}var A=Math.max(H-3,1);var D=Math.min(A+6,B);A=Math.max(D-6,1);for(var F=A;F<=D;F++){I.append(" ");if(F==H){I.append('<span style="border-bottom:1px dotted #9ba4af">')}else{I.append('<a href="javascript:void(0)" onclick="mapwithus.comments.commentJump(').append((F-1)*C).append(')">')}I.append(F);if(F==H){I.append("</span>")}else{I.append("</a>")}I.append(" &nbsp; ")}I.append(' <span style="font-size:10.0pt">of ').append(B).append("</span>");if(H==B){I.append(' &nbsp; <div class="ib-fix arrow gright"></div>')}else{I.append(' &nbsp; <div class="ib-fix arrow right" onclick="mapwithus.comments.commentMore()"></div>')}$("#commentpager").html(I.toString())};mapwithus.comments.commentJump=function(A){commentsOffset=A;if(commentsOffset<0){commentsOffset=0}mapwithus.comments.shareComments()};mapwithus.comments.commentBack=function(){commentsOffset=commentsOffset-commentsLimit;if(commentsOffset<0){commentsOffset=0}mapwithus.comments.shareComments()};mapwithus.comments.commentReset=function(){commentsOffset=0};mapwithus.comments.pointSelect=function(){newToolsActive="point"};mapwithus.comments.fetchPointComments=function(S,D,N,I,C,G,H,J,O,L,Q,E,V,K,B,A){if(map2id==null){return }var T=makeLatLng(N,I);mapwithus.util.monkeyInfoWindow(S,T,'<img src="/r/images/loading.gif" />');if(map2id!=null){var U=map2id.replace(/V/,"");var F="userid="+D;F+="&viewid="+U;F+="&popup="+true;if(O!=null){if(O>0){F+="&pointid="+O}}else{if(C!=null&&G!=null&&H!=null&&J!=null){F+="&latmin="+C+"&latmax="+G+"&lngmin="+H+"&lngmax="+J}else{if(Q!=null&&Q>0){F+="&articleid="+Q}}}F+="&embed="+doFetchEmbed;if(showPendingOrPublished!=null){F+="&showcomments="+showPendingOrPublished}else{F+="&showcomments=published"}var M=elementDimensions(map[S].getContainer());var R=Math.min(Math.max(M.width-100,440),440);var P=Math.min(Math.max(M.height-200,150),400);if(R<360){R=360}F+="&width="+R+"&height="+P;if(L!=null&&L>0){F+="&layerid="+L}if(V!=null){F+="&limit="+V}else{F+="&limit=10"}if(K!=null){F+="&offset="+K}if(B!=null){F+="&zoom="+B}else{F+="&zoom=20"}if(A){F+="&embed="+A}mapwithus.ajax.call("/Comment",F,function(W){mapwithus.util.monkeyInfoWindow(S,T,W,null,null,E)},{delim:"~!~.$"})}};mapwithus.comments.hidePopupCommentSubmission=function(){$("#popupCommentThanks").css({"display":"inline"});$("#popupAddcommentbox").css({"display":"none"});$("#popupAddcommentbox").val("Add a comment . . .");$("#popupSubmitCommentArea").css({"display":"none"})};mapwithus.comments.toggleApprove=function(A,B){if($("#approveComment"+A)!=null){$("#approveComment"+A).css({"display":((B==true)?"inline":"none")});$("#approveComment"+A+"Link").css({"display":((B==true)?"none":"inline")});$("#unApproveComment"+A).css({"display":((B==true)?"none":"inline")});$("#unApproveComment"+A+"Link").css({"display":((B==true)?"inline":"none")})}if($("#approveCommentPopup"+A)!=null){$("#approveCommentPopup"+A).css({"display":((B==true)?"inline":"none")});$("#approveCommentPopup"+A+"Link").css({"display":((B==true)?"none":"inline")});$("#unApproveCommentPopup"+A).css({"display":((B==true)?"none":"inline")});$("#unApproveCommentPopup"+A+"Link").css({"display":((B==true)?"inline":"none")})}};mapwithus.comments.approveComment=function(A,C){if(A!=null&&A>0){var B="approve="+C;B+="&commentid="+A;mapwithus.ajax.call("/CommentPost",B,function(){},{delim:"~!~.$"})}};mapwithus.comments.loadComments=function(I,D,C,F,A,B){var H=false;var G="commentsadmin";if(F!=null){H=F}if(I==null){return }if(A!=null){G=A}if(commentload[B]==true){$("#"+G).css({"display":"none"});commentload[B]=false;return }commentload[B]=true;commentload[(B=="pending")?"all":"pending"]=false;var E="userid="+I;E+="&viewid=0&articleid=0&setitemid=0&layerid=0&pointid=0&showcomments="+B+"&asc="+H;mapwithus.ajax.call("/Comment",E,function(J){$("#"+G).css({"display":"block"});$("#"+G).html(J)},{delim:"~!~.$"})};if(!window.mapwithus){window.mapwithus={}}mapwithus.tooltip={ttbox:null};mapwithus.tooltip.init=function(){if(mapwithus.tooltip.ttbox){return }mapwithus.tooltip.ttbox=$(document.createElement("div")).addClass("ttbox").css({"position":"absolute","color":"#eeeeee","backgroundColor":"#333333","padding":"5px","border":"1px solid #999999","z-index":10000000}).hide();$("body").append(mapwithus.tooltip.ttbox)};mapwithus.tooltip.render=function(A,B){mapwithus.tooltip.init();if(!B){B=parseInt(mapwithus.util.pageDimensions().width/2)}mapwithus.tooltip.ttbox.html(A.toString()).css({"maxWidth":B+"px"})};mapwithus.tooltip.show=function(C,A,B){if(!C&&window.event){C=window.event}mapwithus.tooltip.render(A,B);mapwithus.tooltip.update(C);mapwithus.tooltip.ttbox.show()};mapwithus.tooltip.showXY=function(A,D,B,C){mapwithus.tooltip.render(B,C);mapwithus.tooltip.updateXY(A,D)};mapwithus.tooltip.update=function(B){if(!mapwithus.tooltip.ttbox){return }if(!B&&window.event){B=window.event}var A=mapwithus.util.pageScroll();mapwithus.tooltip.updateXY((A.left+B.clientX+10),(A.top+B.clientY+10))};mapwithus.tooltip.updateXY=function(A,B){if(!mapwithus.tooltip.ttbox){return }mapwithus.tooltip.ttbox.css({"left":A+"px","top":B+"px"})};mapwithus.tooltip.hide=function(){if(!mapwithus.tooltip.ttbox){return }mapwithus.tooltip.ttbox.hide()};(function(BD,m){var AT=BD.document,BV=BD.navigator,BM=BD.location;var B=(function(){var Bf=function(Bz,B0){return new Bf.fn.init(Bz,B0,Bd)},Bu=BD.jQuery,Bh=BD.$,Bd,By=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,Bn=/\S/,Bj=/^\s+/,Be=/\s+$/,Bi=/\d/,Bb=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Bo=/^[\],:{}\s]*$/,Bw=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,Bq=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Bk=/(?:^|:|,)(?:\s*\[)+/g,BZ=/(webkit)[ \/]([\w.]+)/,Bs=/(opera)(?:.*version)?[ \/]([\w.]+)/,Br=/(msie) ([\w.]+)/,Bt=/(mozilla)(?:.*? rv:([\w.]+))?/,Bx=BV.userAgent,Bv,Bc,e,Bm=Object.prototype.toString,Bg=Object.prototype.hasOwnProperty,Ba=Array.prototype.push,Bl=Array.prototype.slice,Bp=String.prototype.trim,BW=Array.prototype.indexOf,BY={};Bf.fn=Bf.prototype={constructor:Bf,init:function(Bz,B3,B2){var B1,B4,B0,B5;if(!Bz){return this}if(Bz.nodeType){this.context=this[0]=Bz;this.length=1;return this}if(Bz==="body"&&!B3&&AT.body){this.context=AT;this[0]=AT.body;this.selector=Bz;this.length=1;return this}if(typeof Bz==="string"){if(Bz.charAt(0)==="<"&&Bz.charAt(Bz.length-1)===">"&&Bz.length>=3){B1=[null,Bz,null]}else{B1=By.exec(Bz)}if(B1&&(B1[1]||!B3)){if(B1[1]){B3=B3 instanceof Bf?B3[0]:B3;B5=(B3?B3.ownerDocument||B3:AT);B0=Bb.exec(Bz);if(B0){if(Bf.isPlainObject(B3)){Bz=[AT.createElement(B0[1])];Bf.fn.attr.call(Bz,B3,true)}else{Bz=[B5.createElement(B0[1])]}}else{B0=Bf.buildFragment([B1[1]],[B5]);Bz=(B0.cacheable?Bf.clone(B0.fragment):B0.fragment).childNodes}return Bf.merge(this,Bz)}else{B4=AT.getElementById(B1[2]);if(B4&&B4.parentNode){if(B4.id!==B1[2]){return B2.find(Bz)}this.length=1;this[0]=B4}this.context=AT;this.selector=Bz;return this}}else{if(!B3||B3.jquery){return(B3||B2).find(Bz)}else{return this.constructor(B3).find(Bz)}}}else{if(Bf.isFunction(Bz)){return B2.ready(Bz)}}if(Bz.selector!==m){this.selector=Bz.selector;this.context=Bz.context}return Bf.makeArray(Bz,this)},selector:"",jquery:"1.6.1",length:0,size:function(){return this.length},toArray:function(){return Bl.call(this,0)},get:function(Bz){return Bz==null?this.toArray():(Bz<0?this[this.length+Bz]:this[Bz])},pushStack:function(B0,B2,Bz){var B1=this.constructor();if(Bf.isArray(B0)){Ba.apply(B1,B0)}else{Bf.merge(B1,B0)}B1.prevObject=this;B1.context=this.context;if(B2==="find"){B1.selector=this.selector+(this.selector?" ":"")+Bz}else{if(B2){B1.selector=this.selector+"."+B2+"("+Bz+")"}}return B1},each:function(B0,Bz){return Bf.each(this,B0,Bz)},ready:function(Bz){Bf.bindReady();Bc.done(Bz);return this},eq:function(Bz){return Bz===-1?this.slice(Bz):this.slice(Bz,+Bz+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Bl.apply(this,arguments),"slice",Bl.call(arguments).join(","))},map:function(Bz){return this.pushStack(Bf.map(this,function(B1,B0){return Bz.call(B1,B0,B1)}))},end:function(){return this.prevObject||this.constructor(null)},push:Ba,sort:[].sort,splice:[].splice};Bf.fn.init.prototype=Bf.fn;Bf.extend=Bf.fn.extend=function(){var B8,B1,Bz,B0,B5,B6,B4=arguments[0]||{},B3=1,B2=arguments.length,B7=false;if(typeof B4==="boolean"){B7=B4;B4=arguments[1]||{};B3=2}if(typeof B4!=="object"&&!Bf.isFunction(B4)){B4={}}if(B2===B3){B4=this;--B3}for(;B3<B2;B3++){if((B8=arguments[B3])!=null){for(B1 in B8){Bz=B4[B1];B0=B8[B1];if(B4===B0){continue}if(B7&&B0&&(Bf.isPlainObject(B0)||(B5=Bf.isArray(B0)))){if(B5){B5=false;B6=Bz&&Bf.isArray(Bz)?Bz:[]}else{B6=Bz&&Bf.isPlainObject(Bz)?Bz:{}}B4[B1]=Bf.extend(B7,B6,B0)}else{if(B0!==m){B4[B1]=B0}}}}}return B4};Bf.extend({noConflict:function(Bz){if(BD.$===Bf){BD.$=Bh}if(Bz&&BD.jQuery===Bf){BD.jQuery=Bu}return Bf},isReady:false,readyWait:1,holdReady:function(Bz){if(Bz){Bf.readyWait++}else{Bf.ready(true)}},ready:function(Bz){if((Bz===true&&!--Bf.readyWait)||(Bz!==true&&!Bf.isReady)){if(!AT.body){return setTimeout(Bf.ready,1)}Bf.isReady=true;if(Bz!==true&&--Bf.readyWait>0){return }Bc.resolveWith(AT,[Bf]);if(Bf.fn.trigger){Bf(AT).trigger("ready").unbind("ready")}}},bindReady:function(){if(Bc){return }Bc=Bf._Deferred();if(AT.readyState==="complete"){return setTimeout(Bf.ready,1)}if(AT.addEventListener){AT.addEventListener("DOMContentLoaded",e,false);BD.addEventListener("load",Bf.ready,false)}else{if(AT.attachEvent){AT.attachEvent("onreadystatechange",e);BD.attachEvent("onload",Bf.ready);var Bz=false;try{Bz=BD.frameElement==null}catch(B0){}if(AT.documentElement.doScroll&&Bz){BX()}}}},isFunction:function(Bz){return Bf.type(Bz)==="function"},isArray:Array.isArray||function(Bz){return Bf.type(Bz)==="array"},isWindow:function(Bz){return Bz&&typeof Bz==="object"&&"setInterval" in Bz},isNaN:function(Bz){return Bz==null||!Bi.test(Bz)||isNaN(Bz)},type:function(Bz){return Bz==null?String(Bz):BY[Bm.call(Bz)]||"object"},isPlainObject:function(B0){if(!B0||Bf.type(B0)!=="object"||B0.nodeType||Bf.isWindow(B0)){return false}if(B0.constructor&&!Bg.call(B0,"constructor")&&!Bg.call(B0.constructor.prototype,"isPrototypeOf")){return false}var Bz;for(Bz in B0){}return Bz===m||Bg.call(B0,Bz)},isEmptyObject:function(B0){for(var Bz in B0){return false}return true},error:function(Bz){throw Bz},parseJSON:function(Bz){if(typeof Bz!=="string"||!Bz){return null}Bz=Bf.trim(Bz);if(BD.JSON&&BD.JSON.parse){return BD.JSON.parse(Bz)}if(Bo.test(Bz.replace(Bw,"@").replace(Bq,"]").replace(Bk,""))){return(new Function("return "+Bz))()}Bf.error("Invalid JSON: "+Bz)},parseXML:function(B1,Bz,B0){if(BD.DOMParser){B0=new DOMParser();Bz=B0.parseFromString(B1,"text/xml")}else{Bz=new ActiveXObject("Microsoft.XMLDOM");Bz.async="false";Bz.loadXML(B1)}B0=Bz.documentElement;if(!B0||!B0.nodeName||B0.nodeName==="parsererror"){Bf.error("Invalid XML: "+B1)}return Bz},noop:function(){},globalEval:function(Bz){if(Bz&&Bn.test(Bz)){(BD.execScript||function(B0){BD["eval"].call(BD,B0)})(Bz)}},nodeName:function(B0,Bz){return B0.nodeName&&B0.nodeName.toUpperCase()===Bz.toUpperCase()},each:function(B2,B5,B1){var B0,B3=0,B4=B2.length,Bz=B4===m||Bf.isFunction(B2);if(B1){if(Bz){for(B0 in B2){if(B5.apply(B2[B0],B1)===false){break}}}else{for(;B3<B4;){if(B5.apply(B2[B3++],B1)===false){break}}}}else{if(Bz){for(B0 in B2){if(B5.call(B2[B0],B0,B2[B0])===false){break}}}else{for(;B3<B4;){if(B5.call(B2[B3],B3,B2[B3++])===false){break}}}}return B2},trim:Bp?function(Bz){return Bz==null?"":Bp.call(Bz)}:function(Bz){return Bz==null?"":Bz.toString().replace(Bj,"").replace(Be,"")},makeArray:function(B2,B0){var Bz=B0||[];if(B2!=null){var B1=Bf.type(B2);if(B2.length==null||B1==="string"||B1==="function"||B1==="regexp"||Bf.isWindow(B2)){Ba.call(Bz,B2)}else{Bf.merge(Bz,B2)}}return Bz},inArray:function(B1,B2){if(BW){return BW.call(B2,B1)}for(var Bz=0,B0=B2.length;Bz<B0;Bz++){if(B2[Bz]===B1){return Bz}}return -1},merge:function(B3,B1){var B2=B3.length,B0=0;if(typeof B1.length==="number"){for(var Bz=B1.length;B0<Bz;B0++){B3[B2++]=B1[B0]}}else{while(B1[B0]!==m){B3[B2++]=B1[B0++]}}B3.length=B2;return B3},grep:function(B0,B5,Bz){var B1=[],B4;Bz=!!Bz;for(var B2=0,B3=B0.length;B2<B3;B2++){B4=!!B5(B0[B2],B2);if(Bz!==B4){B1.push(B0[B2])}}return B1},map:function(Bz,B6,B7){var B4,B5,B3=[],B1=0,B0=Bz.length,B2=Bz instanceof Bf||B0!==m&&typeof B0==="number"&&((B0>0&&Bz[0]&&Bz[B0-1])||B0===0||Bf.isArray(Bz));if(B2){for(;B1<B0;B1++){B4=B6(Bz[B1],B1,B7);if(B4!=null){B3[B3.length]=B4}}}else{for(B5 in Bz){B4=B6(Bz[B5],B5,B7);if(B4!=null){B3[B3.length]=B4}}}return B3.concat.apply([],B3)},guid:1,proxy:function(B3,B2){if(typeof B2==="string"){var B1=B3[B2];B2=B3;B3=B1}if(!Bf.isFunction(B3)){return m}var Bz=Bl.call(arguments,2),B0=function(){return B3.apply(B2,Bz.concat(Bl.call(arguments)))};B0.guid=B3.guid=B3.guid||B0.guid||Bf.guid++;return B0},access:function(Bz,B7,B5,B1,B4,B6){var B0=Bz.length;if(typeof B7==="object"){for(var B2 in B7){Bf.access(Bz,B2,B7[B2],B1,B4,B5)}return Bz}if(B5!==m){B1=!B6&&B1&&Bf.isFunction(B5);for(var B3=0;B3<B0;B3++){B4(Bz[B3],B7,B1?B5.call(Bz[B3],B3,B4(Bz[B3],B7)):B5,B6)}return Bz}return B0?B4(Bz[0],B7):m},now:function(){return(new Date()).getTime()},uaMatch:function(B0){B0=B0.toLowerCase();var Bz=BZ.exec(B0)||Bs.exec(B0)||Br.exec(B0)||B0.indexOf("compatible")<0&&Bt.exec(B0)||[];return{browser:Bz[1]||"",version:Bz[2]||"0"}},sub:function(){function Bz(B2,B3){return new Bz.fn.init(B2,B3)}Bf.extend(true,Bz,this);Bz.superclass=this;Bz.fn=Bz.prototype=this();Bz.fn.constructor=Bz;Bz.sub=this.sub;Bz.fn.init=function B1(B2,B3){if(B3&&B3 instanceof Bf&&!(B3 instanceof Bz)){B3=Bz(B3)}return Bf.fn.init.call(this,B2,B3,B0)};Bz.fn.init.prototype=Bz.fn;var B0=Bz(AT);return Bz},browser:{}});Bf.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(B0,Bz){BY["[object "+Bz+"]"]=Bz.toLowerCase()});Bv=Bf.uaMatch(Bx);if(Bv.browser){Bf.browser[Bv.browser]=true;Bf.browser.version=Bv.version}if(Bf.browser.webkit){Bf.browser.safari=true}if(Bn.test("\xA0")){Bj=/^[\s\xA0]+/;Be=/[\s\xA0]+$/}Bd=Bf(AT);if(AT.addEventListener){e=function(){AT.removeEventListener("DOMContentLoaded",e,false);Bf.ready()}}else{if(AT.attachEvent){e=function(){if(AT.readyState==="complete"){AT.detachEvent("onreadystatechange",e);Bf.ready()}}}}function BX(){if(Bf.isReady){return }try{AT.documentElement.doScroll("left")}catch(Bz){setTimeout(BX,1);return }Bf.ready()}return Bf})();var A="done fail isResolved isRejected promise then always pipe".split(" "),Ai=[].slice;B.extend({_Deferred:function(){var BY=[],BZ,BW,BX,e={done:function(){if(!BX){var Bb=arguments,Bc,Bf,Be,Bd,Ba;if(BZ){Ba=BZ;BZ=0}for(Bc=0,Bf=Bb.length;Bc<Bf;Bc++){Be=Bb[Bc];Bd=B.type(Be);if(Bd==="array"){e.done.apply(e,Be)}else{if(Bd==="function"){BY.push(Be)}}}if(Ba){e.resolveWith(Ba[0],Ba[1])}}return this},resolveWith:function(Bb,Ba){if(!BX&&!BZ&&!BW){Ba=Ba||[];BW=1;try{while(BY[0]){BY.shift().apply(Bb,Ba)}}finally{BZ=[Bb,Ba];BW=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return !!(BW||BZ)},cancel:function(){BX=1;BY=[];return this}};return e},Deferred:function(BW){var e=B._Deferred(),BY=B._Deferred(),BX;B.extend(e,{then:function(Ba,BZ){e.done(Ba).fail(BZ);return this},always:function(){return e.done.apply(e,arguments).fail.apply(this,arguments)},fail:BY.done,rejectWith:BY.resolveWith,reject:BY.resolve,isRejected:BY.isResolved,pipe:function(Ba,BZ){return B.Deferred(function(Bb){B.each({done:[Ba,"resolve"],fail:[BZ,"reject"]},function(Bd,Bg){var Bc=Bg[0],Bf=Bg[1],Be;if(B.isFunction(Bc)){e[Bd](function(){Be=Bc.apply(this,arguments);if(Be&&B.isFunction(Be.promise)){Be.promise().then(Bb.resolve,Bb.reject)}else{Bb[Bf](Be)}})}else{e[Bd](Bb[Bf])}})}).promise()},promise:function(Ba){if(Ba==null){if(BX){return BX}BX=Ba={}}var BZ=A.length;while(BZ--){Ba[A[BZ]]=e[A[BZ]]}return Ba}});e.done(BY.cancel).fail(e.cancel);delete e.cancel;if(BW){BW.call(e,e)}return e},when:function(Bb){var BW=arguments,BX=0,Ba=BW.length,BZ=Ba,e=Ba<=1&&Bb&&B.isFunction(Bb.promise)?Bb:B.Deferred();function BY(Bc){return function(Bd){BW[Bc]=arguments.length>1?Ai.call(arguments,0):Bd;if(!(--BZ)){e.resolveWith(e,Ai.call(BW,0))}}}if(Ba>1){for(;BX<Ba;BX++){if(BW[BX]&&B.isFunction(BW[BX].promise)){BW[BX].promise().then(BY(BX),e.reject)}else{--BZ}}if(!BZ){e.resolveWith(e,BW)}}else{if(e!==Bb){e.resolveWith(e,Ba?[Bb]:[])}}return e.promise()}});B.support=(function(){var Bg=AT.createElement("div"),Bm=AT.documentElement,Ba,Bn,Bh,BY,Bf,Bb,Bd,BX,Be,BW,Bj,BZ,Bc,Bk,Bo;Bg.setAttribute("className","t");Bg.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";Ba=Bg.getElementsByTagName("*");Bn=Bg.getElementsByTagName("a")[0];if(!Ba||!Ba.length||!Bn){return{}}Bh=AT.createElement("select");BY=Bh.appendChild(AT.createElement("option"));Bf=Bg.getElementsByTagName("input")[0];Bd={leadingWhitespace:(Bg.firstChild.nodeType===3),tbody:!Bg.getElementsByTagName("tbody").length,htmlSerialize:!!Bg.getElementsByTagName("link").length,style:/top/.test(Bn.getAttribute("style")),hrefNormalized:(Bn.getAttribute("href")==="/a"),opacity:/^0.55$/.test(Bn.style.opacity),cssFloat:!!Bn.style.cssFloat,checkOn:(Bf.value==="on"),optSelected:BY.selected,getSetAttribute:Bg.className!=="t",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};Bf.checked=true;Bd.noCloneChecked=Bf.cloneNode(true).checked;Bh.disabled=true;Bd.optDisabled=!BY.disabled;try{delete Bg.test}catch(Bl){Bd.deleteExpando=false}if(!Bg.addEventListener&&Bg.attachEvent&&Bg.fireEvent){Bg.attachEvent("onclick",function Bi(){Bd.noCloneEvent=false;Bg.detachEvent("onclick",Bi)});Bg.cloneNode(true).fireEvent("onclick")}Bf=AT.createElement("input");Bf.value="t";Bf.setAttribute("type","radio");Bd.radioValue=Bf.value==="t";Bf.setAttribute("checked","checked");Bg.appendChild(Bf);BX=AT.createDocumentFragment();BX.appendChild(Bg.firstChild);Bd.checkClone=BX.cloneNode(true).cloneNode(true).lastChild.checked;Bg.innerHTML="";Bg.style.width=Bg.style.paddingLeft="1px";Be=AT.createElement("body");BW={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(Bk in BW){Be.style[Bk]=BW[Bk]}Be.appendChild(Bg);Bm.insertBefore(Be,Bm.firstChild);Bd.appendChecked=Bf.checked;Bd.boxModel=Bg.offsetWidth===2;if("zoom" in Bg.style){Bg.style.display="inline";Bg.style.zoom=1;Bd.inlineBlockNeedsLayout=(Bg.offsetWidth===2);Bg.style.display="";Bg.innerHTML="<div style='width:4px;'></div>";Bd.shrinkWrapBlocks=(Bg.offsetWidth!==2)}Bg.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";Bj=Bg.getElementsByTagName("td");Bo=(Bj[0].offsetHeight===0);Bj[0].style.display="";Bj[1].style.display="none";Bd.reliableHiddenOffsets=Bo&&(Bj[0].offsetHeight===0);Bg.innerHTML="";if(AT.defaultView&&AT.defaultView.getComputedStyle){Bb=AT.createElement("div");Bb.style.width="0";Bb.style.marginRight="0";Bg.appendChild(Bb);Bd.reliableMarginRight=(parseInt((AT.defaultView.getComputedStyle(Bb,null)||{marginRight:0}).marginRight,10)||0)===0}Be.innerHTML="";Bm.removeChild(Be);if(Bg.attachEvent){for(Bk in {submit:1,change:1,focusin:1}){Bc="on"+Bk;Bo=(Bc in Bg);if(!Bo){Bg.setAttribute(Bc,"return;");Bo=(typeof Bg[Bc]==="function")}Bd[Bk+"Bubbles"]=Bo}}return Bd})();B.boxModel=B.support.boxModel;var Ap=/^(?:\{.*\}|\[.*\])$/,AY=/([a-z])([A-Z])/g;B.extend({cache:{},uuid:0,expando:"jQuery"+(B.fn.jquery+Math.random()).replace(/\D/g,""),noData:{"embed":true,"object":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000","applet":true},hasData:function(e){e=e.nodeType?B.cache[e[B.expando]]:e[B.expando];return !!e&&!w(e)},data:function(BY,BW,Ba,BZ){if(!B.acceptData(BY)){return }var Bd=B.expando,Bc=typeof BW==="string",Bb,Be=BY.nodeType,e=Be?B.cache:BY,BX=Be?BY[B.expando]:BY[B.expando]&&B.expando;if((!BX||(BZ&&BX&&!e[BX][Bd]))&&Bc&&Ba===m){return }if(!BX){if(Be){BY[B.expando]=BX=++B.uuid}else{BX=B.expando}}if(!e[BX]){e[BX]={};if(!Be){e[BX].toJSON=B.noop}}if(typeof BW==="object"||typeof BW==="function"){if(BZ){e[BX][Bd]=B.extend(e[BX][Bd],BW)}else{e[BX]=B.extend(e[BX],BW)}}Bb=e[BX];if(BZ){if(!Bb[Bd]){Bb[Bd]={}}Bb=Bb[Bd]}if(Ba!==m){Bb[B.camelCase(BW)]=Ba}if(BW==="events"&&!Bb[BW]){return Bb[Bd]&&Bb[Bd].events}return Bc?Bb[B.camelCase(BW)]:Bb},removeData:function(BZ,BX,Ba){if(!B.acceptData(BZ)){return }var Bc=B.expando,Bd=BZ.nodeType,BW=Bd?B.cache:BZ,BY=Bd?BZ[B.expando]:B.expando;if(!BW[BY]){return }if(BX){var Bb=Ba?BW[BY][Bc]:BW[BY];if(Bb){delete Bb[BX];if(!w(Bb)){return }}}if(Ba){delete BW[BY][Bc];if(!w(BW[BY])){return }}var e=BW[BY][Bc];if(B.support.deleteExpando||BW!=BD){delete BW[BY]}else{BW[BY]=null}if(e){BW[BY]={};if(!Bd){BW[BY].toJSON=B.noop}BW[BY][Bc]=e}else{if(Bd){if(B.support.deleteExpando){delete BZ[B.expando]}else{if(BZ.removeAttribute){BZ.removeAttribute(B.expando)}else{BZ[B.expando]=null}}}}},_data:function(BW,e,BX){return B.data(BW,e,BX,true)},acceptData:function(BW){if(BW.nodeName){var e=B.noData[BW.nodeName.toLowerCase()];if(e){return !(e===true||BW.getAttribute("classid")!==e)}}return true}});B.fn.extend({data:function(BZ,Bb){var Ba=null;if(typeof BZ==="undefined"){if(this.length){Ba=B.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,BX;for(var BY=0,BW=e.length;BY<BW;BY++){BX=e[BY].name;if(BX.indexOf("data-")===0){BX=B.camelCase(BX.substring(5));A6(this[0],BX,Ba[BX])}}}}return Ba}else{if(typeof BZ==="object"){return this.each(function(){B.data(this,BZ)})}}var Bc=BZ.split(".");Bc[1]=Bc[1]?"."+Bc[1]:"";if(Bb===m){Ba=this.triggerHandler("getData"+Bc[1]+"!",[Bc[0]]);if(Ba===m&&this.length){Ba=B.data(this[0],BZ);Ba=A6(this[0],BZ,Ba)}return Ba===m&&Bc[1]?this.data(Bc[0]):Ba}else{return this.each(function(){var Be=B(this),Bd=[Bc[0],Bb];Be.triggerHandler("setData"+Bc[1]+"!",Bd);B.data(this,BZ,Bb);Be.triggerHandler("changeData"+Bc[1]+"!",Bd)})}},removeData:function(e){return this.each(function(){B.removeData(this,e)})}});function A6(BY,BX,BZ){if(BZ===m&&BY.nodeType===1){var BW="data-"+BX.replace(AY,"$1-$2").toLowerCase();BZ=BY.getAttribute(BW);if(typeof BZ==="string"){try{BZ=BZ==="true"?true:BZ==="false"?false:BZ==="null"?null:!B.isNaN(BZ)?parseFloat(BZ):Ap.test(BZ)?B.parseJSON(BZ):BZ}catch(Ba){}B.data(BY,BX,BZ)}else{BZ=m}}return BZ}function w(BW){for(var e in BW){if(e!=="toJSON"){return false}}return true}function BI(BZ,BY,Bb){var BX=BY+"defer",BW=BY+"queue",e=BY+"mark",Ba=B.data(BZ,BX,m,true);if(Ba&&(Bb==="queue"||!B.data(BZ,BW,m,true))&&(Bb==="mark"||!B.data(BZ,e,m,true))){setTimeout(function(){if(!B.data(BZ,BW,m,true)&&!B.data(BZ,e,m,true)){B.removeData(BZ,BX,true);Ba.resolve()}},0)}}B.extend({_mark:function(BW,e){if(BW){e=(e||"fx")+"mark";B.data(BW,e,(B.data(BW,e,m,true)||0)+1,true)}},_unmark:function(BZ,BY,BW){if(BZ!==true){BW=BY;BY=BZ;BZ=false}if(BY){BW=BW||"fx";var e=BW+"mark",BX=BZ?0:((B.data(BY,e,m,true)||1)-1);if(BX){B.data(BY,e,BX,true)}else{B.removeData(BY,e,true);BI(BY,BW,"mark")}}},queue:function(BW,e,BY){if(BW){e=(e||"fx")+"queue";var BX=B.data(BW,e,m,true);if(BY){if(!BX||B.isArray(BY)){BX=B.data(BW,e,B.makeArray(BY),true)}else{BX.push(BY)}}return BX||[]}},dequeue:function(BY,BX){BX=BX||"fx";var e=B.queue(BY,BX),BW=e.shift(),BZ;if(BW==="inprogress"){BW=e.shift()}if(BW){if(BX==="fx"){e.unshift("inprogress")}BW.call(BY,function(){B.dequeue(BY,BX)})}if(!e.length){B.removeData(BY,BX+"queue",true);BI(BY,BX,"queue")}}});B.fn.extend({queue:function(e,BW){if(typeof e!=="string"){BW=e;e="fx"}if(BW===m){return B.queue(this[0],e)}return this.each(function(){var BX=B.queue(this,e,BW);if(e==="fx"&&BX[0]!=="inprogress"){B.dequeue(this,e)}})},dequeue:function(e){return this.each(function(){B.dequeue(this,e)})},delay:function(BW,e){BW=B.fx?B.fx.speeds[BW]||BW:BW;e=e||"fx";return this.queue(e,function(){var BX=this;setTimeout(function(){B.dequeue(BX,e)},BW)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(Be,BX){if(typeof Be!=="string"){BX=Be;Be=m}Be=Be||"fx";var e=B.Deferred(),BW=this,BZ=BW.length,Bc=1,Ba=Be+"defer",Bb=Be+"queue",Bd=Be+"mark",BY;function Bf(){if(!(--Bc)){e.resolveWith(BW,[BW])}}while(BZ--){if((BY=B.data(BW[BZ],Ba,m,true)||(B.data(BW[BZ],Bb,m,true)||B.data(BW[BZ],Bd,m,true))&&B.data(BW[BZ],Ba,B._Deferred(),true))){Bc++;BY.done(Bf)}}Bf();return e.promise()}});var An=/[\n\t\r]/g,AF=/\s+/,Ar=/\r/g,F=/^(?:button|input)$/i,f=/^(?:button|input|object|select|textarea)$/i,K=/^a(?:rea)?$/i,AN=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,A9=/\:/,A4,Ay;B.fn.extend({attr:function(e,BW){return B.access(this,e,BW,true,B.attr)},removeAttr:function(e){return this.each(function(){B.removeAttr(this,e)})},prop:function(e,BW){return B.access(this,e,BW,true,B.prop)},removeProp:function(e){e=B.propFix[e]||e;return this.each(function(){try{this[e]=m;delete this[e]}catch(BW){}})},addClass:function(Bc){if(B.isFunction(Bc)){return this.each(function(Bf){var Be=B(this);Be.addClass(Bc.call(this,Bf,Be.attr("class")||""))})}if(Bc&&typeof Bc==="string"){var e=(Bc||"").split(AF);for(var BY=0,BX=this.length;BY<BX;BY++){var BW=this[BY];if(BW.nodeType===1){if(!BW.className){BW.className=Bc}else{var BZ=" "+BW.className+" ",Bb=BW.className;for(var Ba=0,Bd=e.length;Ba<Bd;Ba++){if(BZ.indexOf(" "+e[Ba]+" ")<0){Bb+=" "+e[Ba]}}BW.className=B.trim(Bb)}}}}return this},removeClass:function(Ba){if(B.isFunction(Ba)){return this.each(function(Be){var Bd=B(this);Bd.removeClass(Ba.call(this,Be,Bd.attr("class")))})}if((Ba&&typeof Ba==="string")||Ba===m){var Bb=(Ba||"").split(AF);for(var BX=0,BW=this.length;BX<BW;BX++){var BZ=this[BX];if(BZ.nodeType===1&&BZ.className){if(Ba){var BY=(" "+BZ.className+" ").replace(An," ");for(var Bc=0,e=Bb.length;Bc<e;Bc++){BY=BY.replace(" "+Bb[Bc]+" "," ")}BZ.className=B.trim(BY)}else{BZ.className=""}}}}return this},toggleClass:function(BY,BW){var BX=typeof BY,e=typeof BW==="boolean";if(B.isFunction(BY)){return this.each(function(Ba){var BZ=B(this);BZ.toggleClass(BY.call(this,Ba,BZ.attr("class"),BW),BW)})}return this.each(function(){if(BX==="string"){var Bb,Ba=0,BZ=B(this),Bc=BW,Bd=BY.split(AF);while((Bb=Bd[Ba++])){Bc=e?Bc:!BZ.hasClass(Bb);BZ[Bc?"addClass":"removeClass"](Bb)}}else{if(BX==="undefined"||BX==="boolean"){if(this.className){B._data(this,"__className__",this.className)}this.className=this.className||BY===false?"":B._data(this,"__className__")||""}}})},hasClass:function(e){var BY=" "+e+" ";for(var BX=0,BW=this.length;BX<BW;BX++){if((" "+this[BX].className+" ").replace(An," ").indexOf(BY)>-1){return true}}return false},val:function(BY){var e,BW,BX=this[0];if(!arguments.length){if(BX){e=B.valHooks[BX.nodeName.toLowerCase()]||B.valHooks[BX.type];if(e&&"get" in e&&(BW=e.get(BX,"value"))!==m){return BW}return(BX.value||"").replace(Ar,"")}return m}var BZ=B.isFunction(BY);return this.each(function(Bb){var Ba=B(this),Bc;if(this.nodeType!==1){return }if(BZ){Bc=BY.call(this,Bb,Ba.val())}else{Bc=BY}if(Bc==null){Bc=""}else{if(typeof Bc==="number"){Bc+=""}else{if(B.isArray(Bc)){Bc=B.map(Bc,function(Bd){return Bd==null?"":Bd+""})}}}e=B.valHooks[this.nodeName.toLowerCase()]||B.valHooks[this.type];if(!e||!("set" in e)||e.set(this,Bc,"value")===m){this.value=Bc}})}});B.extend({valHooks:{option:{get:function(e){var BW=e.attributes.value;return !BW||BW.specified?e.value:e.text}},select:{get:function(e){var Bb,BZ=e.selectedIndex,Bc=[],Bd=e.options,BY=e.type==="select-one";if(BZ<0){return null}for(var BW=BY?BZ:0,Ba=BY?BZ+1:Bd.length;BW<Ba;BW++){var BX=Bd[BW];if(BX.selected&&(B.support.optDisabled?!BX.disabled:BX.getAttribute("disabled")===null)&&(!BX.parentNode.disabled||!B.nodeName(BX.parentNode,"optgroup"))){Bb=B(BX).val();if(BY){return Bb}Bc.push(Bb)}}if(BY&&!Bc.length&&Bd.length){return B(Bd[BZ]).val()}return Bc},set:function(BW,BX){var e=B.makeArray(BX);B(BW).find("option").each(function(){this.selected=B.inArray(B(this).val(),e)>=0});if(!e.length){BW.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attrFix:{tabindex:"tabIndex"},attr:function(Bb,BY,Bc,Ba){var BW=Bb.nodeType;if(!Bb||BW===3||BW===8||BW===2){return m}if(Ba&&BY in B.attrFn){return B(Bb)[BY](Bc)}if(!("getAttribute" in Bb)){return B.prop(Bb,BY,Bc)}var BX,e,BZ=BW!==1||!B.isXMLDoc(Bb);BY=BZ&&B.attrFix[BY]||BY;e=B.attrHooks[BY];if(!e){if(AN.test(BY)&&(typeof Bc==="boolean"||Bc===m||Bc.toLowerCase()===BY.toLowerCase())){e=Ay}else{if(A4&&(B.nodeName(Bb,"form")||A9.test(BY))){e=A4}}}if(Bc!==m){if(Bc===null){B.removeAttr(Bb,BY);return m}else{if(e&&"set" in e&&BZ&&(BX=e.set(Bb,Bc,BY))!==m){return BX}else{Bb.setAttribute(BY,""+Bc);return Bc}}}else{if(e&&"get" in e&&BZ){return e.get(Bb,BY)}else{BX=Bb.getAttribute(BY);return BX===null?m:BX}}},removeAttr:function(BW,e){var BX;if(BW.nodeType===1){e=B.attrFix[e]||e;if(B.support.getSetAttribute){BW.removeAttribute(e)}else{B.attr(BW,e,"");BW.removeAttributeNode(BW.getAttributeNode(e))}if(AN.test(e)&&(BX=B.propFix[e]||e) in BW){BW[BX]=false}}},attrHooks:{type:{set:function(e,BW){if(F.test(e.nodeName)&&e.parentNode){B.error("type property can't be changed")}else{if(!B.support.radioValue&&BW==="radio"&&B.nodeName(e,"input")){var BX=e.value;e.setAttribute("type",BW);if(BX){e.value=BX}return BW}}}},tabIndex:{get:function(BW){var e=BW.getAttributeNode("tabIndex");return e&&e.specified?parseInt(e.value,10):f.test(BW.nodeName)||K.test(BW.nodeName)&&BW.href?0:m}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(Ba,BY,Bb){var BW=Ba.nodeType;if(!Ba||BW===3||BW===8||BW===2){return m}var BX,e,BZ=BW!==1||!B.isXMLDoc(Ba);BY=BZ&&B.propFix[BY]||BY;e=B.propHooks[BY];if(Bb!==m){if(e&&"set" in e&&(BX=e.set(Ba,Bb,BY))!==m){return BX}else{return(Ba[BY]=Bb)}}else{if(e&&"get" in e&&(BX=e.get(Ba,BY))!==m){return BX}else{return Ba[BY]}}},propHooks:{}});Ay={get:function(BW,e){return BW[B.propFix[e]||e]?e.toLowerCase():m},set:function(BW,BY,e){var BX;if(BY===false){B.removeAttr(BW,e)}else{BX=B.propFix[e]||e;if(BX in BW){BW[BX]=BY}BW.setAttribute(e,e.toLowerCase())}return e}};B.attrHooks.value={get:function(BW,e){if(A4&&B.nodeName(BW,"button")){return A4.get(BW,e)}return BW.value},set:function(BW,BX,e){if(A4&&B.nodeName(BW,"button")){return A4.set(BW,BX,e)}BW.value=BX}};if(!B.support.getSetAttribute){B.attrFix=B.propFix;A4=B.attrHooks.name=B.valHooks.button={get:function(BX,BW){var e;e=BX.getAttributeNode(BW);return e&&e.nodeValue!==""?e.nodeValue:m},set:function(BX,BY,BW){var e=BX.getAttributeNode(BW);if(e){e.nodeValue=BY;return BY}}};B.each(["width","height"],function(BW,e){B.attrHooks[e]=B.extend(B.attrHooks[e],{set:function(BX,BY){if(BY===""){BX.setAttribute(e,"auto");return BY}}})})}if(!B.support.hrefNormalized){B.each(["href","src","width","height"],function(BW,e){B.attrHooks[e]=B.extend(B.attrHooks[e],{get:function(BY){var BX=BY.getAttribute(e,2);return BX===null?m:BX}})})}if(!B.support.style){B.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||m},set:function(e,BW){return(e.style.cssText=""+BW)}}}if(!B.support.optSelected){B.propHooks.selected=B.extend(B.propHooks.selected,{get:function(BW){var e=BW.parentNode;if(e){e.selectedIndex;if(e.parentNode){e.parentNode.selectedIndex}}}})}if(!B.support.checkOn){B.each(["radio","checkbox"],function(){B.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}})}B.each(["radio","checkbox"],function(){B.valHooks[this]=B.extend(B.valHooks[this],{set:function(e,BW){if(B.isArray(BW)){return(e.checked=B.inArray(B(e).val(),BW)>=0)}}})});var Af=Object.prototype.hasOwnProperty,A0=/\.(.*)$/,BF=/^(?:textarea|input|select)$/i,p=/\./g,BJ=/ /g,Ae=/[^\w\s.|`]/g,i=function(e){return e.replace(Ae,"\\$&")};B.event={add:function(BY,Bc,Bh,Ba){if(BY.nodeType===3||BY.nodeType===8){return }if(Bh===false){Bh=BL}else{if(!Bh){return }}var BW,Bg;if(Bh.handler){BW=Bh;Bh=BW.handler}if(!Bh.guid){Bh.guid=B.guid++}var Bd=B._data(BY);if(!Bd){return }var Bi=Bd.events,Bb=Bd.handle;if(!Bi){Bd.events=Bi={}}if(!Bb){Bd.handle=Bb=function(Bj){return typeof B!=="undefined"&&(!Bj||B.event.triggered!==Bj.type)?B.event.handle.apply(Bb.elem,arguments):m}}Bb.elem=BY;Bc=Bc.split(" ");var Bf,BZ=0,e;while((Bf=Bc[BZ++])){Bg=BW?B.extend({},BW):{handler:Bh,data:Ba};if(Bf.indexOf(".")>-1){e=Bf.split(".");Bf=e.shift();Bg.namespace=e.slice(0).sort().join(".")}else{e=[];Bg.namespace=""}Bg.type=Bf;if(!Bg.guid){Bg.guid=Bh.guid}var BX=Bi[Bf],Be=B.event.special[Bf]||{};if(!BX){BX=Bi[Bf]=[];if(!Be.setup||Be.setup.call(BY,Ba,e,Bb)===false){if(BY.addEventListener){BY.addEventListener(Bf,Bb,false)}else{if(BY.attachEvent){BY.attachEvent("on"+Bf,Bb)}}}}if(Be.add){Be.add.call(BY,Bg);if(!Bg.handler.guid){Bg.handler.guid=Bh.guid}}BX.push(Bg);B.event.global[Bf]=true}BY=null},global:{},remove:function(Bk,Bf,BX,Bb){if(Bk.nodeType===3||Bk.nodeType===8){return }if(BX===false){BX=BL}var Bn,Ba,Bc,Bh,Bi=0,BY,Bd,Bg,BZ,Be,e,Bm,Bj=B.hasData(Bk)&&B._data(Bk),BW=Bj&&Bj.events;if(!Bj||!BW){return }if(Bf&&Bf.type){BX=Bf.handler;Bf=Bf.type}if(!Bf||typeof Bf==="string"&&Bf.charAt(0)==="."){Bf=Bf||"";for(Ba in BW){B.event.remove(Bk,Ba+Bf)}return }Bf=Bf.split(" ");while((Ba=Bf[Bi++])){Bm=Ba;e=null;BY=Ba.indexOf(".")<0;Bd=[];if(!BY){Bd=Ba.split(".");Ba=Bd.shift();Bg=new RegExp("(^|\\.)"+B.map(Bd.slice(0).sort(),i).join("\\.(?:.*\\.)?")+"(\\.|$)")}Be=BW[Ba];if(!Be){continue}if(!BX){for(Bh=0;Bh<Be.length;Bh++){e=Be[Bh];if(BY||Bg.test(e.namespace)){B.event.remove(Bk,Bm,e.handler,Bh);Be.splice(Bh--,1)}}continue}BZ=B.event.special[Ba]||{};for(Bh=Bb||0;Bh<Be.length;Bh++){e=Be[Bh];if(BX.guid===e.guid){if(BY||Bg.test(e.namespace)){if(Bb==null){Be.splice(Bh--,1)}if(BZ.remove){BZ.remove.call(Bk,e)}}if(Bb!=null){break}}}if(Be.length===0||Bb!=null&&Be.length===1){if(!BZ.teardown||BZ.teardown.call(Bk,Bd)===false){B.removeEvent(Bk,Ba,Bj.handle)}Bn=null;delete BW[Ba]}}if(B.isEmptyObject(BW)){var Bl=Bj.handle;if(Bl){Bl.elem=null}delete Bj.events;delete Bj.handle;if(B.isEmptyObject(Bj)){B.removeData(Bk,m,true)}}},customEvent:{"getData":true,"setData":true,"changeData":true},trigger:function(e,Bc,Ba,Bh){var Bf=e.type||e,BX=[],BW;if(Bf.indexOf("!")>=0){Bf=Bf.slice(0,-1);BW=true}if(Bf.indexOf(".")>=0){BX=Bf.split(".");Bf=BX.shift();BX.sort()}if((!Ba||B.event.customEvent[Bf])&&!B.event.global[Bf]){return }e=typeof e==="object"?e[B.expando]?e:new B.Event(Bf,e):new B.Event(Bf);e.type=Bf;e.exclusive=BW;e.namespace=BX.join(".");e.namespace_re=new RegExp("(^|\\.)"+BX.join("\\.(?:.*\\.)?")+"(\\.|$)");if(Bh||!Ba){e.preventDefault();e.stopPropagation()}if(!Ba){B.each(B.cache,function(){var Bj=B.expando,Bi=this[Bj];if(Bi&&Bi.events&&Bi.events[Bf]){B.event.trigger(e,Bc,Bi.handle.elem)}});return }if(Ba.nodeType===3||Ba.nodeType===8){return }e.result=m;e.target=Ba;Bc=Bc?B.makeArray(Bc):[];Bc.unshift(e);var Bg=Ba,BY=Bf.indexOf(":")<0?"on"+Bf:"";do{var Bd=B._data(Bg,"handle");e.currentTarget=Bg;if(Bd){Bd.apply(Bg,Bc)}if(BY&&B.acceptData(Bg)&&Bg[BY]&&Bg[BY].apply(Bg,Bc)===false){e.result=false;e.preventDefault()}Bg=Bg.parentNode||Bg.ownerDocument||Bg===e.target.ownerDocument&&BD}while(Bg&&!e.isPropagationStopped());if(!e.isDefaultPrevented()){var BZ,Be=B.event.special[Bf]||{};if((!Be._default||Be._default.call(Ba.ownerDocument,e)===false)&&!(Bf==="click"&&B.nodeName(Ba,"a"))&&B.acceptData(Ba)){try{if(BY&&Ba[Bf]){BZ=Ba[BY];if(BZ){Ba[BY]=null}B.event.triggered=Bf;Ba[Bf]()}}catch(Bb){}if(BZ){Ba[BY]=BZ}B.event.triggered=m}}return e.result},handle:function(Bc){Bc=B.event.fix(Bc||BD.event);var BW=((B._data(this,"events")||{})[Bc.type]||[]).slice(0),Bb=!Bc.exclusive&&!Bc.namespace,BZ=Array.prototype.slice.call(arguments,0);BZ[0]=Bc;Bc.currentTarget=this;for(var BY=0,e=BW.length;BY<e;BY++){var Ba=BW[BY];if(Bb||Bc.namespace_re.test(Ba.namespace)){Bc.handler=Ba.handler;Bc.data=Ba.data;Bc.handleObj=Ba;var BX=Ba.handler.apply(this,BZ);if(BX!==m){Bc.result=BX;if(BX===false){Bc.preventDefault();Bc.stopPropagation()}}if(Bc.isImmediatePropagationStopped()){break}}}return Bc.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(BZ){if(BZ[B.expando]){return BZ}var BW=BZ;BZ=B.Event(BW);for(var BX=this.props.length,Bb;BX;){Bb=this.props[--BX];BZ[Bb]=BW[Bb]}if(!BZ.target){BZ.target=BZ.srcElement||AT}if(BZ.target.nodeType===3){BZ.target=BZ.target.parentNode}if(!BZ.relatedTarget&&BZ.fromElement){BZ.relatedTarget=BZ.fromElement===BZ.target?BZ.toElement:BZ.fromElement}if(BZ.pageX==null&&BZ.clientX!=null){var BY=BZ.target.ownerDocument||AT,Ba=BY.documentElement,e=BY.body;BZ.pageX=BZ.clientX+(Ba&&Ba.scrollLeft||e&&e.scrollLeft||0)-(Ba&&Ba.clientLeft||e&&e.clientLeft||0);BZ.pageY=BZ.clientY+(Ba&&Ba.scrollTop||e&&e.scrollTop||0)-(Ba&&Ba.clientTop||e&&e.clientTop||0)}if(BZ.which==null&&(BZ.charCode!=null||BZ.keyCode!=null)){BZ.which=BZ.charCode!=null?BZ.charCode:BZ.keyCode}if(!BZ.metaKey&&BZ.ctrlKey){BZ.metaKey=BZ.ctrlKey}if(!BZ.which&&BZ.button!==m){BZ.which=(BZ.button&1?1:(BZ.button&2?3:(BZ.button&4?2:0)))}return BZ},guid:100000000,proxy:B.proxy,special:{ready:{setup:B.bindReady,teardown:B.noop},live:{add:function(e){B.event.add(this,P(e.origType,e.selector),B.extend({},e,{handler:AL,guid:e.handler.guid}))},remove:function(e){B.event.remove(this,P(e.origType,e.selector),e)}},beforeunload:{setup:function(BX,BW,e){if(B.isWindow(this)){this.onbeforeunload=e}},teardown:function(BW,e){if(this.onbeforeunload===e){this.onbeforeunload=null}}}}};B.removeEvent=AT.removeEventListener?function(BW,e,BX){if(BW.removeEventListener){BW.removeEventListener(e,BX,false)}}:function(BW,e,BX){if(BW.detachEvent){BW.detachEvent("on"+e,BX)}};B.Event=function(BW,e){if(!this.preventDefault){return new B.Event(BW,e)}if(BW&&BW.type){this.originalEvent=BW;this.type=BW.type;this.isDefaultPrevented=(BW.defaultPrevented||BW.returnValue===false||BW.getPreventDefault&&BW.getPreventDefault())?H:BL}else{this.type=BW}if(e){B.extend(this,e)}this.timeStamp=B.now();this[B.expando]=true};function BL(){return false}function H(){return true}B.Event.prototype={preventDefault:function(){this.isDefaultPrevented=H;var BW=this.originalEvent;if(!BW){return }if(BW.preventDefault){BW.preventDefault()}else{BW.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=H;var BW=this.originalEvent;if(!BW){return }if(BW.stopPropagation){BW.stopPropagation()}BW.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=H;this.stopPropagation()},isDefaultPrevented:BL,isPropagationStopped:BL,isImmediatePropagationStopped:BL};var AE=function(BX){var BW=BX.relatedTarget;BX.type=BX.data;try{if(BW&&BW!==AT&&!BW.parentNode){return }while(BW&&BW!==this){BW=BW.parentNode}if(BW!==this){B.event.handle.apply(this,arguments)}}catch(BY){}},Au=function(e){e.type=e.data;B.event.handle.apply(this,arguments)};B.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(BW,e){B.event.special[BW]={setup:function(BX){B.event.add(this,e,BX&&BX.selector?Au:AE,BW)},teardown:function(BX){B.event.remove(this,e,BX&&BX.selector?Au:AE)}}});if(!B.support.submitBubbles){B.event.special.submit={setup:function(BW,e){if(!B.nodeName(this,"form")){B.event.add(this,"click.specialSubmit",function(BZ){var BY=BZ.target,BX=BY.type;if((BX==="submit"||BX==="image")&&B(BY).closest("form").length){Ax("submit",this,arguments)}});B.event.add(this,"keypress.specialSubmit",function(BZ){var BY=BZ.target,BX=BY.type;if((BX==="text"||BX==="password")&&B(BY).closest("form").length&&BZ.keyCode===13){Ax("submit",this,arguments)}})}else{return false}},teardown:function(e){B.event.remove(this,".specialSubmit")}}}if(!B.support.changeBubbles){var BO,J=function(BW){var e=BW.type,BX=BW.value;if(e==="radio"||e==="checkbox"){BX=BW.checked}else{if(e==="select-multiple"){BX=BW.selectedIndex>-1?B.map(BW.options,function(BY){return BY.selected}).join("-"):""}else{if(B.nodeName(BW,"select")){BX=BW.selectedIndex}}}return BX},AC=function AC(BY){var BW=BY.target,BX,BZ;if(!BF.test(BW.nodeName)||BW.readOnly){return }BX=B._data(BW,"_change_data");BZ=J(BW);if(BY.type!=="focusout"||BW.type!=="radio"){B._data(BW,"_change_data",BZ)}if(BX===m||BZ===BX){return }if(BX!=null||BZ){BY.type="change";BY.liveFired=m;B.event.trigger(BY,arguments[1],BW)}};B.event.special.change={filters:{focusout:AC,beforedeactivate:AC,click:function(BY){var BX=BY.target,BW=B.nodeName(BX,"input")?BX.type:"";if(BW==="radio"||BW==="checkbox"||B.nodeName(BX,"select")){AC.call(this,BY)}},keydown:function(BY){var BX=BY.target,BW=B.nodeName(BX,"input")?BX.type:"";if((BY.keyCode===13&&!B.nodeName(BX,"textarea"))||(BY.keyCode===32&&(BW==="checkbox"||BW==="radio"))||BW==="select-multiple"){AC.call(this,BY)}},beforeactivate:function(BX){var BW=BX.target;B._data(BW,"_change_data",J(BW))}},setup:function(BX,BW){if(this.type==="file"){return false}for(var e in BO){B.event.add(this,e+".specialChange",BO[e])}return BF.test(this.nodeName)},teardown:function(e){B.event.remove(this,".specialChange");return BF.test(this.nodeName)}};BO=B.event.special.change.filters;BO.focus=BO.beforeactivate}function Ax(BW,BY,e){var BX=B.extend({},e[0]);BX.type=BW;BX.originalEvent={};BX.liveFired=m;B.event.handle.call(BY,BX);if(BX.isDefaultPrevented()){e[0].preventDefault()}}if(!B.support.focusinBubbles){B.each({focus:"focusin",blur:"focusout"},function(BY,e){var BW=0;B.event.special[e]={setup:function(){if(BW++===0){AT.addEventListener(BY,BX,true)}},teardown:function(){if(--BW===0){AT.removeEventListener(BY,BX,true)}}};function BX(BZ){var Ba=B.event.fix(BZ);Ba.type=e;Ba.originalEvent={};B.event.trigger(Ba,null,Ba.target);if(Ba.isDefaultPrevented()){BZ.preventDefault()}}})}B.each(["bind","one"],function(BW,e){B.fn[e]=function(Bc,Bd,Bb){var Ba;if(typeof Bc==="object"){for(var BZ in Bc){this[e](BZ,Bd,Bc[BZ],Bb)}return this}if(arguments.length===2||Bd===false){Bb=Bd;Bd=m}if(e==="one"){Ba=function(Be){B(this).unbind(Be,Ba);return Bb.apply(this,arguments)};Ba.guid=Bb.guid||B.guid++}else{Ba=Bb}if(Bc==="unload"&&e!=="one"){this.one(Bc,Bd,Bb)}else{for(var BY=0,BX=this.length;BY<BX;BY++){B.event.add(this[BY],Bc,Ba,Bd)}}return this}});B.fn.extend({unbind:function(BZ,BY){if(typeof BZ==="object"&&!BZ.preventDefault){for(var BX in BZ){this.unbind(BX,BZ[BX])}}else{for(var BW=0,e=this.length;BW<e;BW++){B.event.remove(this[BW],BZ,BY)}}return this},delegate:function(e,BW,BY,BX){return this.live(BW,BY,BX,e)},undelegate:function(e,BW,BX){if(arguments.length===0){return this.unbind("live")}else{return this.die(BW,null,BX,e)}},trigger:function(e,BW){return this.each(function(){B.event.trigger(e,BW,this)})},triggerHandler:function(e,BW){if(this[0]){return B.event.trigger(e,BW,this[0],true)}},toggle:function(BY){var BW=arguments,e=BY.guid||B.guid++,BX=0,BZ=function(Ba){var Bb=(B.data(this,"lastToggle"+BY.guid)||0)%BX;B.data(this,"lastToggle"+BY.guid,Bb+1);Ba.preventDefault();return BW[Bb].apply(this,arguments)||false};BZ.guid=e;while(BX<BW.length){BW[BX++].guid=e}return this.click(BZ)},hover:function(e,BW){return this.mouseenter(e).mouseleave(BW||e)}});var As={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};B.each(["live","die"],function(BW,e){B.fn[e]=function(Bg,Bd,Bi,BZ){var Bh,Be=0,Bf,BY,Bk,Bb=BZ||this.selector,BX=BZ?this:B(this.context);if(typeof Bg==="object"&&!Bg.preventDefault){for(var Bj in Bg){BX[e](Bj,Bd,Bg[Bj],Bb)}return this}if(e==="die"&&!Bg&&BZ&&BZ.charAt(0)==="."){BX.unbind(BZ);return this}if(Bd===false||B.isFunction(Bd)){Bi=Bd||BL;Bd=m}Bg=(Bg||"").split(" ");while((Bh=Bg[Be++])!=null){Bf=A0.exec(Bh);BY="";if(Bf){BY=Bf[0];Bh=Bh.replace(A0,"")}if(Bh==="hover"){Bg.push("mouseenter"+BY,"mouseleave"+BY);continue}Bk=Bh;if(As[Bh]){Bg.push(As[Bh]+BY);Bh=Bh+BY}else{Bh=(As[Bh]||Bh)+BY}if(e==="live"){for(var Bc=0,Ba=BX.length;Bc<Ba;Bc++){B.event.add(BX[Bc],"live."+P(Bh,Bb),{data:Bd,selector:Bb,handler:Bi,origType:Bh,origHandler:Bi,preType:Bk})}}else{BX.unbind("live."+P(Bh,Bb),Bi)}}return this}});function AL(Bg){var Bd,BY,Bm,Ba,e,Bi,Bf,Bh,Be,Bl,Bc,Bb,Bk,Bj=[],BZ=[],BW=B._data(this,"events");if(Bg.liveFired===this||!BW||!BW.live||Bg.target.disabled||Bg.button&&Bg.type==="click"){return }if(Bg.namespace){Bb=new RegExp("(^|\\.)"+Bg.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")}Bg.liveFired=this;var BX=BW.live.slice(0);for(Bf=0;Bf<BX.length;Bf++){e=BX[Bf];if(e.origType.replace(A0,"")===Bg.type){BZ.push(e.selector)}else{BX.splice(Bf--,1)}}Ba=B(Bg.target).closest(BZ,Bg.currentTarget);for(Bh=0,Be=Ba.length;Bh<Be;Bh++){Bc=Ba[Bh];for(Bf=0;Bf<BX.length;Bf++){e=BX[Bf];if(Bc.selector===e.selector&&(!Bb||Bb.test(e.namespace))&&!Bc.elem.disabled){Bi=Bc.elem;Bm=null;if(e.preType==="mouseenter"||e.preType==="mouseleave"){Bg.type=e.preType;Bm=B(Bg.relatedTarget).closest(e.selector)[0];if(Bm&&B.contains(Bi,Bm)){Bm=Bi}}if(!Bm||Bm!==Bi){Bj.push({elem:Bi,handleObj:e,level:Bc.level})}}}}for(Bh=0,Be=Bj.length;Bh<Be;Bh++){Ba=Bj[Bh];if(BY&&Ba.level>BY){break}Bg.currentTarget=Ba.elem;Bg.data=Ba.handleObj.data;Bg.handleObj=Ba.handleObj;Bk=Ba.handleObj.origHandler.apply(Ba.elem,arguments);if(Bk===false||Bg.isPropagationStopped()){BY=Ba.level;if(Bk===false){Bd=false}if(Bg.isImmediatePropagationStopped()){break}}}return Bd}function P(BW,e){return(BW&&BW!=="*"?BW+".":"")+e.replace(p,"`").replace(BJ,"&")}B.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" "),function(BW,e){B.fn[e]=function(BY,BX){if(BX==null){BX=BY;BY=null}return arguments.length>0?this.bind(e,BY,BX):this.trigger(e)};if(B.attrFn){B.attrFn[e]=true}});(function(){var Bg=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Bh=0,Bk=Object.prototype.toString,Bb=false,Ba=true,Bi=/\\/g,Bo=/\W/;[0,0].sort(function(){Ba=false;return 0});var BY=function(Bt,e,Bw,Bx){Bw=Bw||[];e=e||AT;var Bz=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!Bt||typeof Bt!=="string"){return Bw}var Bq,B1,B4,Bp,B0,B3,B2,Bv,Bs=true,Br=BY.isXML(e),Bu=[],By=Bt;do{Bg.exec("");Bq=Bg.exec(By);if(Bq){By=Bq[3];Bu.push(Bq[1]);if(Bq[2]){Bp=Bq[3];break}}}while(Bq);if(Bu.length>1&&Bc.exec(Bt)){if(Bu.length===2&&Bd.relative[Bu[0]]){B1=Bl(Bu[0]+Bu[1],e)}else{B1=Bd.relative[Bu[0]]?[e]:BY(Bu.shift(),e);while(Bu.length){Bt=Bu.shift();if(Bd.relative[Bt]){Bt+=Bu.shift()}B1=Bl(Bt,B1)}}}else{if(!Bx&&Bu.length>1&&e.nodeType===9&&!Br&&Bd.match.ID.test(Bu[0])&&!Bd.match.ID.test(Bu[Bu.length-1])){B0=BY.find(Bu.shift(),e,Br);e=B0.expr?BY.filter(B0.expr,B0.set)[0]:B0.set[0]}if(e){B0=Bx?{expr:Bu.pop(),set:Be(Bx)}:BY.find(Bu.pop(),Bu.length===1&&(Bu[0]==="~"||Bu[0]==="+")&&e.parentNode?e.parentNode:e,Br);B1=B0.expr?BY.filter(B0.expr,B0.set):B0.set;if(Bu.length>0){B4=Be(B1)}else{Bs=false}while(Bu.length){B3=Bu.pop();B2=B3;if(!Bd.relative[B3]){B3=""}else{B2=Bu.pop()}if(B2==null){B2=e}Bd.relative[B3](B4,B2,Br)}}else{B4=Bu=[]}}if(!B4){B4=B1}if(!B4){BY.error(B3||Bt)}if(Bk.call(B4)==="[object Array]"){if(!Bs){Bw.push.apply(Bw,B4)}else{if(e&&e.nodeType===1){for(Bv=0;B4[Bv]!=null;Bv++){if(B4[Bv]&&(B4[Bv]===true||B4[Bv].nodeType===1&&BY.contains(e,B4[Bv]))){Bw.push(B1[Bv])}}}else{for(Bv=0;B4[Bv]!=null;Bv++){if(B4[Bv]&&B4[Bv].nodeType===1){Bw.push(B1[Bv])}}}}}else{Be(B4,Bw)}if(Bp){BY(Bp,Bz,Bw,Bx);BY.uniqueSort(Bw)}return Bw};BY.uniqueSort=function(Bp){if(Bj){Bb=Ba;Bp.sort(Bj);if(Bb){for(var e=1;e<Bp.length;e++){if(Bp[e]===Bp[e-1]){Bp.splice(e--,1)}}}}return Bp};BY.matches=function(e,Bp){return BY(e,null,null,Bp)};BY.matchesSelector=function(e,Bp){return BY(Bp,null,null,[e]).length>0};BY.find=function(Bv,e,Bw){var Bu;if(!Bv){return[]}for(var Br=0,Bq=Bd.order.length;Br<Bq;Br++){var Bs,Bt=Bd.order[Br];if((Bs=Bd.leftMatch[Bt].exec(Bv))){var Bp=Bs[1];Bs.splice(1,1);if(Bp.substr(Bp.length-1)!=="\\"){Bs[1]=(Bs[1]||"").replace(Bi,"");Bu=Bd.find[Bt](Bs,e,Bw);if(Bu!=null){Bv=Bv.replace(Bd.match[Bt],"");break}}}}if(!Bu){Bu=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:Bu,expr:Bv}};BY.filter=function(Bz,By,B2,Bs){var Bu,e,Bq=Bz,B4=[],Bw=By,Bv=By&&By[0]&&BY.isXML(By[0]);while(Bz&&By.length){for(var Bx in Bd.filter){if((Bu=Bd.leftMatch[Bx].exec(Bz))!=null&&Bu[2]){var B3,B1,Bp=Bd.filter[Bx],Br=Bu[1];e=false;Bu.splice(1,1);if(Br.substr(Br.length-1)==="\\"){continue}if(Bw===B4){B4=[]}if(Bd.preFilter[Bx]){Bu=Bd.preFilter[Bx](Bu,Bw,B2,B4,Bs,Bv);if(!Bu){e=B3=true}else{if(Bu===true){continue}}}if(Bu){for(var Bt=0;(B1=Bw[Bt])!=null;Bt++){if(B1){B3=Bp(B1,Bu,Bt,Bw);var B0=Bs^!!B3;if(B2&&B3!=null){if(B0){e=true}else{Bw[Bt]=false}}else{if(B0){B4.push(B1);e=true}}}}}if(B3!==m){if(!B2){Bw=B4}Bz=Bz.replace(Bd.match[Bx],"");if(!e){return[]}break}}}if(Bz===Bq){if(e==null){BY.error(Bz)}else{break}}Bq=Bz}return Bw};BY.error=function(e){throw"Syntax error, unrecognized expression: "+e};var Bd=BY.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(Bu,Bp){var Br=typeof Bp==="string",Bt=Br&&!Bo.test(Bp),Bv=Br&&!Bt;if(Bt){Bp=Bp.toLowerCase()}for(var Bq=0,e=Bu.length,Bs;Bq<e;Bq++){if((Bs=Bu[Bq])){while((Bs=Bs.previousSibling)&&Bs.nodeType!==1){}Bu[Bq]=Bv||Bs&&Bs.nodeName.toLowerCase()===Bp?Bs||false:Bs===Bp}}if(Bv){BY.filter(Bp,Bu,true)}},">":function(Bu,Bp){var Bt,Bs=typeof Bp==="string",Bq=0,e=Bu.length;if(Bs&&!Bo.test(Bp)){Bp=Bp.toLowerCase();for(;Bq<e;Bq++){Bt=Bu[Bq];if(Bt){var Br=Bt.parentNode;Bu[Bq]=Br.nodeName.toLowerCase()===Bp?Br:false}}}else{for(;Bq<e;Bq++){Bt=Bu[Bq];if(Bt){Bu[Bq]=Bs?Bt.parentNode:Bt.parentNode===Bp}}if(Bs){BY.filter(Bp,Bu,true)}}},"":function(Br,Bp,Bt){var Bs,Bq=Bh++,e=Bm;if(typeof Bp==="string"&&!Bo.test(Bp)){Bp=Bp.toLowerCase();Bs=Bp;e=BW}e("parentNode",Bp,Bq,Br,Bs,Bt)},"~":function(Br,Bp,Bt){var Bs,Bq=Bh++,e=Bm;if(typeof Bp==="string"&&!Bo.test(Bp)){Bp=Bp.toLowerCase();Bs=Bp;e=BW}e("previousSibling",Bp,Bq,Br,Bs,Bt)}},find:{ID:function(Bp,Bq,Br){if(typeof Bq.getElementById!=="undefined"&&!Br){var e=Bq.getElementById(Bp[1]);return e&&e.parentNode?[e]:[]}},NAME:function(Bq,Bt){if(typeof Bt.getElementsByName!=="undefined"){var Bp=[],Bs=Bt.getElementsByName(Bq[1]);for(var Br=0,e=Bs.length;Br<e;Br++){if(Bs[Br].getAttribute("name")===Bq[1]){Bp.push(Bs[Br])}}return Bp.length===0?null:Bp}},TAG:function(e,Bp){if(typeof Bp.getElementsByTagName!=="undefined"){return Bp.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(Br,Bp,Bq,e,Bu,Bv){Br=" "+Br[1].replace(Bi,"")+" ";if(Bv){return Br}for(var Bs=0,Bt;(Bt=Bp[Bs])!=null;Bs++){if(Bt){if(Bu^(Bt.className&&(" "+Bt.className+" ").replace(/[\t\n\r]/g," ").indexOf(Br)>=0)){if(!Bq){e.push(Bt)}}else{if(Bq){Bp[Bs]=false}}}}return false},ID:function(e){return e[1].replace(Bi,"")},TAG:function(Bp,e){return Bp[1].replace(Bi,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){BY.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var Bp=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(Bp[1]+(Bp[2]||1))-0;e[3]=Bp[3]-0}else{if(e[2]){BY.error(e[0])}}e[0]=Bh++;return e},ATTR:function(Bs,Bp,Bq,e,Bt,Bu){var Br=Bs[1]=Bs[1].replace(Bi,"");if(!Bu&&Bd.attrMap[Br]){Bs[1]=Bd.attrMap[Br]}Bs[4]=(Bs[4]||Bs[5]||"").replace(Bi,"");if(Bs[2]==="~="){Bs[4]=" "+Bs[4]+" "}return Bs},PSEUDO:function(Bs,Bp,Bq,e,Bt){if(Bs[1]==="not"){if((Bg.exec(Bs[3])||"").length>1||/^\w/.test(Bs[3])){Bs[3]=BY(Bs[3],null,null,Bp)}else{var Br=BY.filter(Bs[3],Bp,Bq,true^Bt);if(!Bq){e.push.apply(e,Br)}return false}}else{if(Bd.match.POS.test(Bs[0])||Bd.match.CHILD.test(Bs[0])){return true}}return Bs},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(Bq,Bp,e){return !!BY(e[3],Bq).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(Bq){var e=Bq.getAttribute("type"),Bp=Bq.type;return Bq.nodeName.toLowerCase()==="input"&&"text"===Bp&&(e===Bp||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(Bp){var e=Bp.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===Bp.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(Bp){var e=Bp.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===Bp.type},button:function(Bp){var e=Bp.nodeName.toLowerCase();return e==="input"&&"button"===Bp.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(Bp,e){return e===0},last:function(Bq,Bp,e,Br){return Bp===Br.length-1},even:function(Bp,e){return e%2===0},odd:function(Bp,e){return e%2===1},lt:function(Bq,Bp,e){return Bp<e[3]-0},gt:function(Bq,Bp,e){return Bp>e[3]-0},nth:function(Bq,Bp,e){return e[3]-0===Bp},eq:function(Bq,Bp,e){return e[3]-0===Bp}},filter:{PSEUDO:function(Bq,Bv,Bu,Bw){var e=Bv[1],Bp=Bd.filters[e];if(Bp){return Bp(Bq,Bu,Bv,Bw)}else{if(e==="contains"){return(Bq.textContent||Bq.innerText||BY.getText([Bq])||"").indexOf(Bv[3])>=0}else{if(e==="not"){var Br=Bv[3];for(var Bt=0,Bs=Br.length;Bt<Bs;Bt++){if(Br[Bt]===Bq){return false}}return true}else{BY.error(e)}}}},CHILD:function(e,Br){var Bu=Br[1],Bp=e;switch(Bu){case"only":case"first":while((Bp=Bp.previousSibling)){if(Bp.nodeType===1){return false}}if(Bu==="first"){return true}Bp=e;case"last":while((Bp=Bp.nextSibling)){if(Bp.nodeType===1){return false}}return true;case"nth":var Bq=Br[2],Bx=Br[3];if(Bq===1&&Bx===0){return true}var Bt=Br[0],Bw=e.parentNode;if(Bw&&(Bw.sizcache!==Bt||!e.nodeIndex)){var Bs=0;for(Bp=Bw.firstChild;Bp;Bp=Bp.nextSibling){if(Bp.nodeType===1){Bp.nodeIndex=++Bs}}Bw.sizcache=Bt}var Bv=e.nodeIndex-Bx;if(Bq===0){return Bv===0}else{return(Bv%Bq===0&&Bv/Bq>=0)}}},ID:function(Bp,e){return Bp.nodeType===1&&Bp.getAttribute("id")===e},TAG:function(Bp,e){return(e==="*"&&Bp.nodeType===1)||Bp.nodeName.toLowerCase()===e},CLASS:function(Bp,e){return(" "+(Bp.className||Bp.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(Bt,Br){var Bq=Br[1],e=Bd.attrHandle[Bq]?Bd.attrHandle[Bq](Bt):Bt[Bq]!=null?Bt[Bq]:Bt.getAttribute(Bq),Bu=e+"",Bs=Br[2],Bp=Br[4];return e==null?Bs==="!=":Bs==="="?Bu===Bp:Bs==="*="?Bu.indexOf(Bp)>=0:Bs==="~="?(" "+Bu+" ").indexOf(Bp)>=0:!Bp?Bu&&e!==false:Bs==="!="?Bu!==Bp:Bs==="^="?Bu.indexOf(Bp)===0:Bs==="$="?Bu.substr(Bu.length-Bp.length)===Bp:Bs==="|="?Bu===Bp||Bu.substr(0,Bp.length+1)===Bp+"-":false},POS:function(Bs,Bp,Bq,Bt){var e=Bp[2],Br=Bd.setFilters[e];if(Br){return Br(Bs,Bq,Bp,Bt)}}}};var Bc=Bd.match.POS,BX=function(Bp,e){return"\\"+(e-0+1)};for(var BZ in Bd.match){Bd.match[BZ]=new RegExp(Bd.match[BZ].source+(/(?![^\[]*\])(?![^\(]*\))/.source));Bd.leftMatch[BZ]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Bd.match[BZ].source.replace(/\\(\d+)/g,BX))}var Be=function(Bp,e){Bp=Array.prototype.slice.call(Bp,0);if(e){e.push.apply(e,Bp);return e}return Bp};try{Array.prototype.slice.call(AT.documentElement.childNodes,0)[0].nodeType}catch(Bn){Be=function(Bs,Br){var Bq=0,Bp=Br||[];if(Bk.call(Bs)==="[object Array]"){Array.prototype.push.apply(Bp,Bs)}else{if(typeof Bs.length==="number"){for(var e=Bs.length;Bq<e;Bq++){Bp.push(Bs[Bq])}}else{for(;Bs[Bq];Bq++){Bp.push(Bs[Bq])}}}return Bp}}var Bj,Bf;if(AT.documentElement.compareDocumentPosition){Bj=function(Bp,e){if(Bp===e){Bb=true;return 0}if(!Bp.compareDocumentPosition||!e.compareDocumentPosition){return Bp.compareDocumentPosition?-1:1}return Bp.compareDocumentPosition(e)&4?-1:1}}else{Bj=function(Bw,Bv){if(Bw===Bv){Bb=true;return 0}else{if(Bw.sourceIndex&&Bv.sourceIndex){return Bw.sourceIndex-Bv.sourceIndex}}var Bt,Bp,Bq=[],e=[],Bs=Bw.parentNode,Bu=Bv.parentNode,Bx=Bs;if(Bs===Bu){return Bf(Bw,Bv)}else{if(!Bs){return -1}else{if(!Bu){return 1}}}while(Bx){Bq.unshift(Bx);Bx=Bx.parentNode}Bx=Bu;while(Bx){e.unshift(Bx);Bx=Bx.parentNode}Bt=Bq.length;Bp=e.length;for(var Br=0;Br<Bt&&Br<Bp;Br++){if(Bq[Br]!==e[Br]){return Bf(Bq[Br],e[Br])}}return Br===Bt?Bf(Bw,e[Br],-1):Bf(Bq[Br],Bv,1)};Bf=function(Bp,e,Bq){if(Bp===e){return Bq}var Br=Bp.nextSibling;while(Br){if(Br===e){return -1}Br=Br.nextSibling}return 1}}BY.getText=function(e){var Bp="",Br;for(var Bq=0;e[Bq];Bq++){Br=e[Bq];if(Br.nodeType===3||Br.nodeType===4){Bp+=Br.nodeValue}else{if(Br.nodeType!==8){Bp+=BY.getText(Br.childNodes)}}}return Bp};(function(){var Bp=AT.createElement("div"),Bq="script"+(new Date()).getTime(),e=AT.documentElement;Bp.innerHTML="<a name='"+Bq+"'/>";e.insertBefore(Bp,e.firstChild);if(AT.getElementById(Bq)){Bd.find.ID=function(Bs,Bt,Bu){if(typeof Bt.getElementById!=="undefined"&&!Bu){var Br=Bt.getElementById(Bs[1]);return Br?Br.id===Bs[1]||typeof Br.getAttributeNode!=="undefined"&&Br.getAttributeNode("id").nodeValue===Bs[1]?[Br]:m:[]}};Bd.filter.ID=function(Bt,Br){var Bs=typeof Bt.getAttributeNode!=="undefined"&&Bt.getAttributeNode("id");return Bt.nodeType===1&&Bs&&Bs.nodeValue===Br}}e.removeChild(Bp);e=Bp=null})();(function(){var e=AT.createElement("div");e.appendChild(AT.createComment(""));if(e.getElementsByTagName("*").length>0){Bd.find.TAG=function(Bp,Bt){var Bs=Bt.getElementsByTagName(Bp[1]);if(Bp[1]==="*"){var Br=[];for(var Bq=0;Bs[Bq];Bq++){if(Bs[Bq].nodeType===1){Br.push(Bs[Bq])}}Bs=Br}return Bs}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){Bd.attrHandle.href=function(Bp){return Bp.getAttribute("href",2)}}e=null})();if(AT.querySelectorAll){(function(){var e=BY,Br=AT.createElement("div"),Bq="__sizzle__";Br.innerHTML="<p class='TEST'></p>";if(Br.querySelectorAll&&Br.querySelectorAll(".TEST").length===0){return }BY=function(B2,Bt,Bx,B1){Bt=Bt||AT;if(!B1&&!BY.isXML(Bt)){var B0=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(B2);if(B0&&(Bt.nodeType===1||Bt.nodeType===9)){if(B0[1]){return Be(Bt.getElementsByTagName(B2),Bx)}else{if(B0[2]&&Bd.find.CLASS&&Bt.getElementsByClassName){return Be(Bt.getElementsByClassName(B0[2]),Bx)}}}if(Bt.nodeType===9){if(B2==="body"&&Bt.body){return Be([Bt.body],Bx)}else{if(B0&&B0[3]){var Bw=Bt.getElementById(B0[3]);if(Bw&&Bw.parentNode){if(Bw.id===B0[3]){return Be([Bw],Bx)}}else{return Be([],Bx)}}}try{return Be(Bt.querySelectorAll(B2),Bx)}catch(By){}}else{if(Bt.nodeType===1&&Bt.nodeName.toLowerCase()!=="object"){var Bu=Bt,Bv=Bt.getAttribute("id"),Bs=Bv||Bq,B4=Bt.parentNode,B3=/^\s*[+~]/.test(B2);if(!Bv){Bt.setAttribute("id",Bs)}else{Bs=Bs.replace(/'/g,"\\$&")}if(B3&&B4){Bt=Bt.parentNode}try{if(!B3||B4){return Be(Bt.querySelectorAll("[id='"+Bs+"'] "+B2),Bx)}}catch(Bz){}finally{if(!Bv){Bu.removeAttribute("id")}}}}}return e(B2,Bt,Bx,B1)};for(var Bp in e){BY[Bp]=e[Bp]}Br=null})()}(function(){var e=AT.documentElement,Bq=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(Bq){var Bs=!Bq.call(AT.createElement("div"),"div"),Bp=false;try{Bq.call(AT.documentElement,"[test!='']:sizzle")}catch(Br){Bp=true}BY.matchesSelector=function(Bu,Bw){Bw=Bw.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!BY.isXML(Bu)){try{if(Bp||!Bd.match.PSEUDO.test(Bw)&&!/!=/.test(Bw)){var Bt=Bq.call(Bu,Bw);if(Bt||!Bs||Bu.document&&Bu.document.nodeType!==11){return Bt}}}catch(Bv){}}return BY(Bw,null,null,[Bu]).length>0}}})();(function(){var e=AT.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return }e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return }Bd.order.splice(1,0,"CLASS");Bd.find.CLASS=function(Bp,Bq,Br){if(typeof Bq.getElementsByClassName!=="undefined"&&!Br){return Bq.getElementsByClassName(Bp[1])}};e=null})();function BW(Bp,Bu,Bt,Bx,Bv,Bw){for(var Br=0,Bq=Bx.length;Br<Bq;Br++){var e=Bx[Br];if(e){var Bs=false;e=e[Bp];while(e){if(e.sizcache===Bt){Bs=Bx[e.sizset];break}if(e.nodeType===1&&!Bw){e.sizcache=Bt;e.sizset=Br}if(e.nodeName.toLowerCase()===Bu){Bs=e;break}e=e[Bp]}Bx[Br]=Bs}}}function Bm(Bp,Bu,Bt,Bx,Bv,Bw){for(var Br=0,Bq=Bx.length;Br<Bq;Br++){var e=Bx[Br];if(e){var Bs=false;e=e[Bp];while(e){if(e.sizcache===Bt){Bs=Bx[e.sizset];break}if(e.nodeType===1){if(!Bw){e.sizcache=Bt;e.sizset=Br}if(typeof Bu!=="string"){if(e===Bu){Bs=true;break}}else{if(BY.filter(Bu,[e]).length>0){Bs=e;break}}}e=e[Bp]}Bx[Br]=Bs}}}if(AT.documentElement.contains){BY.contains=function(Bp,e){return Bp!==e&&(Bp.contains?Bp.contains(e):true)}}else{if(AT.documentElement.compareDocumentPosition){BY.contains=function(Bp,e){return !!(Bp.compareDocumentPosition(e)&16)}}else{BY.contains=function(){return false}}}BY.isXML=function(e){var Bp=(e?e.ownerDocument||e:0).documentElement;return Bp?Bp.nodeName!=="HTML":false};var Bl=function(e,Bv){var Bt,Br=[],Bs="",Bq=Bv.nodeType?[Bv]:Bv;while((Bt=Bd.match.PSEUDO.exec(e))){Bs+=Bt[0];e=e.replace(Bd.match.PSEUDO,"")}e=Bd.relative[e]?e+"*":e;for(var Bu=0,Bp=Bq.length;Bu<Bp;Bu++){BY(e,Bq[Bu],Br)}return BY.filter(Bs,Br)};B.find=BY;B.expr=BY.selectors;B.expr[":"]=B.expr.filters;B.unique=BY.uniqueSort;B.text=BY.getText;B.isXMLDoc=BY.isXML;B.contains=BY.contains})();var AB=/Until$/,AP=/^(?:parents|prevUntil|prevAll)/,BB=/,/,BR=/^.[^:#\[\.,]*$/,r=Array.prototype.slice,j=B.expr.match.POS,AW={children:true,contents:true,next:true,prev:true};B.fn.extend({find:function(e){var BX=this,BZ,BW;if(typeof e!=="string"){return B(e).filter(function(){for(BZ=0,BW=BX.length;BZ<BW;BZ++){if(B.contains(BX[BZ],this)){return true}}})}var BY=this.pushStack("","find",e),Bb,Bc,Ba;for(BZ=0,BW=this.length;BZ<BW;BZ++){Bb=BY.length;B.find(e,this[BZ],BY);if(BZ>0){for(Bc=Bb;Bc<BY.length;Bc++){for(Ba=0;Ba<Bb;Ba++){if(BY[Ba]===BY[Bc]){BY.splice(Bc--,1);break}}}}}return BY},has:function(BW){var e=B(BW);return this.filter(function(){for(var BY=0,BX=e.length;BY<BX;BY++){if(B.contains(this,e[BY])){return true}}})},not:function(e){return this.pushStack(Ad(this,e,false),"not",e)},filter:function(e){return this.pushStack(Ad(this,e,true),"filter",e)},is:function(e){return !!e&&(typeof e==="string"?B.filter(e,this).length>0:this.filter(e).length>0)},closest:function(Bf,BW){var Bc=[],BZ,BX,Be=this[0];if(B.isArray(Bf)){var Bb,BY,Ba={},e=1;if(Be&&Bf.length){for(BZ=0,BX=Bf.length;BZ<BX;BZ++){BY=Bf[BZ];if(!Ba[BY]){Ba[BY]=j.test(BY)?B(BY,BW||this.context):BY}}while(Be&&Be.ownerDocument&&Be!==BW){for(BY in Ba){Bb=Ba[BY];if(Bb.jquery?Bb.index(Be)>-1:B(Be).is(Bb)){Bc.push({selector:BY,elem:Be,level:e})}}Be=Be.parentNode;e++}}return Bc}var Bd=j.test(Bf)||typeof Bf!=="string"?B(Bf,BW||this.context):0;for(BZ=0,BX=this.length;BZ<BX;BZ++){Be=this[BZ];while(Be){if(Bd?Bd.index(Be)>-1:B.find.matchesSelector(Be,Bf)){Bc.push(Be);break}else{Be=Be.parentNode;if(!Be||!Be.ownerDocument||Be===BW||Be.nodeType===11){break}}}}Bc=Bc.length>1?B.unique(Bc):Bc;return this.pushStack(Bc,"closest",Bf)},index:function(e){if(!e||typeof e==="string"){return B.inArray(this[0],e?B(e):this.parent().children())}return B.inArray(e.jquery?e[0]:e,this)},add:function(e,BW){var BY=typeof e==="string"?B(e,BW):B.makeArray(e&&e.nodeType?[e]:e),BX=B.merge(this.get(),BY);return this.pushStack(d(BY[0])||d(BX[0])?BX:B.unique(BX))},andSelf:function(){return this.add(this.prevObject)}});function d(e){return !e||!e.parentNode||e.parentNode.nodeType===11}B.each({parent:function(BW){var e=BW.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return B.dir(e,"parentNode")},parentsUntil:function(BW,e,BX){return B.dir(BW,"parentNode",BX)},next:function(e){return B.nth(e,2,"nextSibling")},prev:function(e){return B.nth(e,2,"previousSibling")},nextAll:function(e){return B.dir(e,"nextSibling")},prevAll:function(e){return B.dir(e,"previousSibling")},nextUntil:function(BW,e,BX){return B.dir(BW,"nextSibling",BX)},prevUntil:function(BW,e,BX){return B.dir(BW,"previousSibling",BX)},siblings:function(e){return B.sibling(e.parentNode.firstChild,e)},children:function(e){return B.sibling(e.firstChild)},contents:function(e){return B.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:B.makeArray(e.childNodes)}},function(e,BW){B.fn[e]=function(Ba,BX){var BZ=B.map(this,BW,Ba),BY=r.call(arguments);if(!AB.test(e)){BX=Ba}if(BX&&typeof BX==="string"){BZ=B.filter(BX,BZ)}BZ=this.length>1&&!AW[e]?B.unique(BZ):BZ;if((this.length>1||BB.test(BX))&&AP.test(e)){BZ=BZ.reverse()}return this.pushStack(BZ,e,BY.join(","))}});B.extend({filter:function(BX,e,BW){if(BW){BX=":not("+BX+")"}return e.length===1?B.find.matchesSelector(e[0],BX)?[e[0]]:[]:B.find.matches(BX,e)},dir:function(BX,BW,BZ){var e=[],BY=BX[BW];while(BY&&BY.nodeType!==9&&(BZ===m||BY.nodeType!==1||!B(BY).is(BZ))){if(BY.nodeType===1){e.push(BY)}BY=BY[BW]}return e},nth:function(BZ,e,BX,BY){e=e||1;var BW=0;for(;BZ;BZ=BZ[BX]){if(BZ.nodeType===1&&++BW===e){break}}return BZ},sibling:function(BX,BW){var e=[];for(;BX;BX=BX.nextSibling){if(BX.nodeType===1&&BX!==BW){e.push(BX)}}return e}});function Ad(BY,BX,e){BX=BX||0;if(B.isFunction(BX)){return B.grep(BY,function(Ba,BZ){var Bb=!!BX.call(Ba,BZ,Ba);return Bb===e})}else{if(BX.nodeType){return B.grep(BY,function(Ba,BZ){return(Ba===BX)===e})}else{if(typeof BX==="string"){var BW=B.grep(BY,function(BZ){return BZ.nodeType===1});if(BR.test(BX)){return B.filter(BX,BW,!e)}else{BX=B.filter(BX,BW)}}}}return B.grep(BY,function(Ba,BZ){return(B.inArray(Ba,BX)>=0)===e})}var AG=/ jQuery\d+="(?:\d+|null)"/g,AQ=/^\s+/,v=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,D=/<([\w:]+)/,W=/<tbody/i,y=/<|&#?\w+;/,q=/<(?:script|object|embed|option|style)/i,N=/checked\s*(?:[^=]|=\s*.checked.)/i,BN=/\/(java|ecma)script/i,Am=/^\s*<!(?:\[CDATA\[|\-\-)/,AV={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};AV.optgroup=AV.option;AV.tbody=AV.tfoot=AV.colgroup=AV.caption=AV.thead;AV.th=AV.td;if(!B.support.htmlSerialize){AV._default=[1,"div<div>","</div>"]}B.fn.extend({text:function(e){if(B.isFunction(e)){return this.each(function(BX){var BW=B(this);BW.text(e.call(this,BX,BW.text()))})}if(typeof e!=="object"&&e!==m){return this.empty().append((this[0]&&this[0].ownerDocument||AT).createTextNode(e))}return B.text(this)},wrapAll:function(e){if(B.isFunction(e)){return this.each(function(BX){B(this).wrapAll(e.call(this,BX))})}if(this[0]){var BW=B(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){BW.insertBefore(this[0])}BW.map(function(){var BX=this;while(BX.firstChild&&BX.firstChild.nodeType===1){BX=BX.firstChild}return BX}).append(this)}return this},wrapInner:function(e){if(B.isFunction(e)){return this.each(function(BW){B(this).wrapInner(e.call(this,BW))})}return this.each(function(){var BW=B(this),BX=BW.contents();if(BX.length){BX.wrapAll(e)}else{BW.append(e)}})},wrap:function(e){return this.each(function(){B(this).wrapAll(e)})},unwrap:function(){return this.parent().each(function(){if(!B.nodeName(this,"body")){B(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(BW){this.parentNode.insertBefore(BW,this)})}else{if(arguments.length){var e=B(arguments[0]);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(BW){this.parentNode.insertBefore(BW,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,B(arguments[0]).toArray());return e}}},remove:function(e,BY){for(var BW=0,BX;(BX=this[BW])!=null;BW++){if(!e||B.filter(e,[BX]).length){if(!BY&&BX.nodeType===1){B.cleanData(BX.getElementsByTagName("*"));B.cleanData([BX])}if(BX.parentNode){BX.parentNode.removeChild(BX)}}}return this},empty:function(){for(var e=0,BW;(BW=this[e])!=null;e++){if(BW.nodeType===1){B.cleanData(BW.getElementsByTagName("*"))}while(BW.firstChild){BW.removeChild(BW.firstChild)}}return this},clone:function(BW,e){BW=BW==null?false:BW;e=e==null?BW:e;return this.map(function(){return B.clone(this,BW,e)})},html:function(BY){if(BY===m){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(AG,""):null}else{if(typeof BY==="string"&&!q.test(BY)&&(B.support.leadingWhitespace||!AQ.test(BY))&&!AV[(D.exec(BY)||["",""])[1].toLowerCase()]){BY=BY.replace(v,"<$1></$2>");try{for(var BX=0,BW=this.length;BX<BW;BX++){if(this[BX].nodeType===1){B.cleanData(this[BX].getElementsByTagName("*"));this[BX].innerHTML=BY}}}catch(BZ){this.empty().append(BY)}}else{if(B.isFunction(BY)){this.each(function(Ba){var e=B(this);e.html(BY.call(this,Ba,e.html()))})}else{this.empty().append(BY)}}}return this},replaceWith:function(e){if(this[0]&&this[0].parentNode){if(B.isFunction(e)){return this.each(function(BY){var BX=B(this),BW=BX.html();BX.replaceWith(e.call(this,BY,BW))})}if(typeof e!=="string"){e=B(e).detach()}return this.each(function(){var BX=this.nextSibling,BW=this.parentNode;B(this).remove();if(BX){B(BX).before(e)}else{B(BW).append(e)}})}else{return this.length?this.pushStack(B(B.isFunction(e)?e():e),"replaceWith",e):this}},detach:function(e){return this.remove(e,true)},domManip:function(Bc,Bg,Bf){var BY,BZ,Bb,Be,Bd=Bc[0],BW=[];if(!B.support.checkClone&&arguments.length===3&&typeof Bd==="string"&&N.test(Bd)){return this.each(function(){B(this).domManip(Bc,Bg,Bf,true)})}if(B.isFunction(Bd)){return this.each(function(Bi){var Bh=B(this);Bc[0]=Bd.call(this,Bi,Bg?Bh.html():m);Bh.domManip(Bc,Bg,Bf)})}if(this[0]){Be=Bd&&Bd.parentNode;if(B.support.parentNode&&Be&&Be.nodeType===11&&Be.childNodes.length===this.length){BY={fragment:Be}}else{BY=B.buildFragment(Bc,this,BW)}Bb=BY.fragment;if(Bb.childNodes.length===1){BZ=Bb=Bb.firstChild}else{BZ=Bb.firstChild}if(BZ){Bg=Bg&&B.nodeName(BZ,"tr");for(var BX=0,e=this.length,Ba=e-1;BX<e;BX++){Bf.call(Bg?BC(this[BX],BZ):this[BX],BY.cacheable||(e>1&&BX<Ba)?B.clone(Bb,true,true):Bb)}}if(BW.length){B.each(BW,BQ)}}return this}});function BC(e,BW){return B.nodeName(e,"table")?(e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody"))):e}function T(e,Bc){if(Bc.nodeType!==1||!B.hasData(e)){return }var Bb=B.expando,BY=B.data(e),BZ=B.data(Bc,BY);if((BY=BY[Bb])){var Bd=BY.events;BZ=BZ[Bb]=B.extend({},BY);if(Bd){delete BZ.handle;BZ.events={};for(var Ba in Bd){for(var BX=0,BW=Bd[Ba].length;BX<BW;BX++){B.event.add(Bc,Ba+(Bd[Ba][BX].namespace?".":"")+Bd[Ba][BX].namespace,Bd[Ba][BX],Bd[Ba][BX].data)}}}}}function AH(BW,e){var BX;if(e.nodeType!==1){return }if(e.clearAttributes){e.clearAttributes()}if(e.mergeAttributes){e.mergeAttributes(BW)}BX=e.nodeName.toLowerCase();if(BX==="object"){e.outerHTML=BW.outerHTML}else{if(BX==="input"&&(BW.type==="checkbox"||BW.type==="radio")){if(BW.checked){e.defaultChecked=e.checked=BW.checked}if(e.value!==BW.value){e.value=BW.value}}else{if(BX==="option"){e.selected=BW.defaultSelected}else{if(BX==="input"||BX==="textarea"){e.defaultValue=BW.defaultValue}}}}e.removeAttribute(B.expando)}B.buildFragment=function(Ba,BY,BW){var BZ,e,BX,Bb=(BY&&BY[0]?BY[0].ownerDocument||BY[0]:AT);if(Ba.length===1&&typeof Ba[0]==="string"&&Ba[0].length<512&&Bb===AT&&Ba[0].charAt(0)==="<"&&!q.test(Ba[0])&&(B.support.checkClone||!N.test(Ba[0]))){e=true;BX=B.fragments[Ba[0]];if(BX&&BX!==1){BZ=BX}}if(!BZ){BZ=Bb.createDocumentFragment();B.clean(Ba,Bb,BZ,BW)}if(e){B.fragments[Ba[0]]=BX?BZ:1}return{fragment:BZ,cacheable:e}};B.fragments={};B.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,BW){B.fn[e]=function(BX){var Ba=[],Bd=B(BX),Bc=this.length===1&&this[0].parentNode;if(Bc&&Bc.nodeType===11&&Bc.childNodes.length===1&&Bd.length===1){Bd[BW](this[0]);return this}else{for(var Bb=0,BY=Bd.length;Bb<BY;Bb++){var BZ=(Bb>0?this.clone(true):this).get();B(Bd[Bb])[BW](BZ);Ba=Ba.concat(BZ)}return this.pushStack(Ba,e,Bd.selector)}}});function BG(e){if("getElementsByTagName" in e){return e.getElementsByTagName("*")}else{if("querySelectorAll" in e){return e.querySelectorAll("*")}else{return[]}}}function AX(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function g(e){if(B.nodeName(e,"input")){AX(e)}else{if(e.getElementsByTagName){B.grep(e.getElementsByTagName("input"),AX)}}}B.extend({clone:function(BZ,Bb,BX){var Ba=BZ.cloneNode(true),e,BW,BY;if((!B.support.noCloneEvent||!B.support.noCloneChecked)&&(BZ.nodeType===1||BZ.nodeType===11)&&!B.isXMLDoc(BZ)){AH(BZ,Ba);e=BG(BZ);BW=BG(Ba);for(BY=0;e[BY];++BY){AH(e[BY],BW[BY])}}if(Bb){T(BZ,Ba);if(BX){e=BG(BZ);BW=BG(Ba);for(BY=0;e[BY];++BY){T(e[BY],BW[BY])}}}return Ba},clean:function(BX,BZ,Bi,Bb){var Bg;BZ=BZ||AT;if(typeof BZ.createElement==="undefined"){BZ=BZ.ownerDocument||BZ[0]&&BZ[0].ownerDocument||AT}var Bj=[],Bc;for(var Bf=0,Ba;(Ba=BX[Bf])!=null;Bf++){if(typeof Ba==="number"){Ba+=""}if(!Ba){continue}if(typeof Ba==="string"){if(!y.test(Ba)){Ba=BZ.createTextNode(Ba)}else{Ba=Ba.replace(v,"<$1></$2>");var Bl=(D.exec(Ba)||["",""])[1].toLowerCase(),BY=AV[Bl]||AV._default,Be=BY[0],BW=BZ.createElement("div");BW.innerHTML=BY[1]+Ba+BY[2];while(Be--){BW=BW.lastChild}if(!B.support.tbody){var e=W.test(Ba),Bd=Bl==="table"&&!e?BW.firstChild&&BW.firstChild.childNodes:BY[1]==="<table>"&&!e?BW.childNodes:[];for(Bc=Bd.length-1;Bc>=0;--Bc){if(B.nodeName(Bd[Bc],"tbody")&&!Bd[Bc].childNodes.length){Bd[Bc].parentNode.removeChild(Bd[Bc])}}}if(!B.support.leadingWhitespace&&AQ.test(Ba)){BW.insertBefore(BZ.createTextNode(AQ.exec(Ba)[0]),BW.firstChild)}Ba=BW.childNodes}}var Bh;if(!B.support.appendChecked){if(Ba[0]&&typeof (Bh=Ba.length)==="number"){for(Bc=0;Bc<Bh;Bc++){g(Ba[Bc])}}else{g(Ba)}}if(Ba.nodeType){Bj.push(Ba)}else{Bj=B.merge(Bj,Ba)}}if(Bi){Bg=function(Bm){return !Bm.type||BN.test(Bm.type)};for(Bf=0;Bj[Bf];Bf++){if(Bb&&B.nodeName(Bj[Bf],"script")&&(!Bj[Bf].type||Bj[Bf].type.toLowerCase()==="text/javascript")){Bb.push(Bj[Bf].parentNode?Bj[Bf].parentNode.removeChild(Bj[Bf]):Bj[Bf])}else{if(Bj[Bf].nodeType===1){var Bk=B.grep(Bj[Bf].getElementsByTagName("script"),Bg);Bj.splice.apply(Bj,[Bf+1,0].concat(Bk))}Bi.appendChild(Bj[Bf])}}}return Bj},cleanData:function(BW){var BZ,BX,e=B.cache,Be=B.expando,Bc=B.event.special,Bb=B.support.deleteExpando;for(var Ba=0,BY;(BY=BW[Ba])!=null;Ba++){if(BY.nodeName&&B.noData[BY.nodeName.toLowerCase()]){continue}BX=BY[B.expando];if(BX){BZ=e[BX]&&e[BX][Be];if(BZ&&BZ.events){for(var Bd in BZ.events){if(Bc[Bd]){B.event.remove(BY,Bd)}else{B.removeEvent(BY,Bd,BZ.handle)}}if(BZ.handle){BZ.handle.elem=null}}if(Bb){delete BY[B.expando]}else{if(BY.removeAttribute){BY.removeAttribute(B.expando)}}delete e[BX]}}}});function BQ(e,BW){if(BW.src){B.ajax({url:BW.src,async:false,dataType:"script"})}else{B.globalEval((BW.text||BW.textContent||BW.innerHTML||"").replace(Am,"/*$0*/"))}if(BW.parentNode){BW.parentNode.removeChild(BW)}}var AK=/alpha\([^)]*\)/i,AS=/opacity=([^)]*)/,Aw=/-([a-z])/ig,Z=/([A-Z]|^ms)/g,BE=/^-?\d+(?:px)?$/i,BP=/^-?\d/,k=/^[+\-]=/,AJ=/[^+\-\.\de]+/g,A8={position:"absolute",visibility:"hidden",display:"block"},AM=["Left","Right"],A2=["Top","Bottom"],z,Ah,Av,M=function(e,BW){return BW.toUpperCase()};B.fn.css=function(e,BW){if(arguments.length===2&&BW===m){return this}return B.access(this,e,BW,true,function(BY,BX,BZ){return BZ!==m?B.style(BY,BX,BZ):B.css(BY,BX)})};B.extend({cssHooks:{opacity:{get:function(BX,BW){if(BW){var e=z(BX,"opacity","opacity");return e===""?"1":e}else{return BX.style.opacity}}}},cssNumber:{"zIndex":true,"fontWeight":true,"opacity":true,"zoom":true,"lineHeight":true,"widows":true,"orphans":true},cssProps:{"float":B.support.cssFloat?"cssFloat":"styleFloat"},style:function(BY,BX,Be,BZ){if(!BY||BY.nodeType===3||BY.nodeType===8||!BY.style){return }var Bc,Bd,Ba=B.camelCase(BX),BW=BY.style,Bf=B.cssHooks[Ba];BX=B.cssProps[Ba]||Ba;if(Be!==m){Bd=typeof Be;if(Bd==="number"&&isNaN(Be)||Be==null){return }if(Bd==="string"&&k.test(Be)){Be=+Be.replace(AJ,"")+parseFloat(B.css(BY,BX))}if(Bd==="number"&&!B.cssNumber[Ba]){Be+="px"}if(!Bf||!("set" in Bf)||(Be=Bf.set(BY,Be))!==m){try{BW[BX]=Be}catch(Bb){}}}else{if(Bf&&"get" in Bf&&(Bc=Bf.get(BY,false,BZ))!==m){return Bc}return BW[BX]}},css:function(BZ,BY,BW){var BX,e;BY=B.camelCase(BY);e=B.cssHooks[BY];BY=B.cssProps[BY]||BY;if(BY==="cssFloat"){BY="float"}if(e&&"get" in e&&(BX=e.get(BZ,true,BW))!==m){return BX}else{if(z){return z(BZ,BY)}}},swap:function(BY,BX,BZ){var e={};for(var BW in BX){e[BW]=BY.style[BW];BY.style[BW]=BX[BW]}BZ.call(BY);for(BW in BX){BY.style[BW]=e[BW]}},camelCase:function(e){return e.replace(Aw,M)}});B.curCSS=B.css;B.each(["height","width"],function(BW,e){B.cssHooks[e]={get:function(BZ,BY,BX){var Ba;if(BY){if(BZ.offsetWidth!==0){Ba=O(BZ,e,BX)}else{B.swap(BZ,A8,function(){Ba=O(BZ,e,BX)})}if(Ba<=0){Ba=z(BZ,e,e);if(Ba==="0px"&&Av){Ba=Av(BZ,e,e)}if(Ba!=null){return Ba===""||Ba==="auto"?"0px":Ba}}if(Ba<0||Ba==null){Ba=BZ.style[e];return Ba===""||Ba==="auto"?"0px":Ba}return typeof Ba==="string"?Ba:Ba+"px"}},set:function(BX,BY){if(BE.test(BY)){BY=parseFloat(BY);if(BY>=0){return BY+"px"}}else{return BY}}}});if(!B.support.opacity){B.cssHooks.opacity={get:function(BW,e){return AS.test((e&&BW.currentStyle?BW.currentStyle.filter:BW.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(BZ,Ba){var BY=BZ.style,BW=BZ.currentStyle;BY.zoom=1;var e=B.isNaN(Ba)?"":"alpha(opacity="+Ba*100+")",BX=BW&&BW.filter||BY.filter||"";BY.filter=AK.test(BX)?BX.replace(AK,e):BX+" "+e}}}B(function(){if(!B.support.reliableMarginRight){B.cssHooks.marginRight={get:function(BX,BW){var e;B.swap(BX,{"display":"inline-block"},function(){if(BW){e=z(BX,"margin-right","marginRight")}else{e=BX.style.marginRight}});return e}}}});if(AT.defaultView&&AT.defaultView.getComputedStyle){Ah=function(BZ,BX){var BW,BY,e;BX=BX.replace(Z,"-$1").toLowerCase();if(!(BY=BZ.ownerDocument.defaultView)){return m}if((e=BY.getComputedStyle(BZ,null))){BW=e.getPropertyValue(BX);if(BW===""&&!B.contains(BZ.ownerDocument.documentElement,BZ)){BW=B.style(BZ,BX)}}return BW}}if(AT.documentElement.currentStyle){Av=function(BZ,BX){var Ba,BW=BZ.currentStyle&&BZ.currentStyle[BX],e=BZ.runtimeStyle&&BZ.runtimeStyle[BX],BY=BZ.style;if(!BE.test(BW)&&BP.test(BW)){Ba=BY.left;if(e){BZ.runtimeStyle.left=BZ.currentStyle.left}BY.left=BX==="fontSize"?"1em":(BW||0);BW=BY.pixelLeft+"px";BY.left=Ba;if(e){BZ.runtimeStyle.left=e}}return BW===""?"auto":BW}}z=Ah||Av;function O(BX,BW,e){var BZ=BW==="width"?AM:A2,BY=BW==="width"?BX.offsetWidth:BX.offsetHeight;if(e==="border"){return BY}B.each(BZ,function(){if(!e){BY-=parseFloat(B.css(BX,"padding"+this))||0}if(e==="margin"){BY+=parseFloat(B.css(BX,"margin"+this))||0}else{BY-=parseFloat(B.css(BX,"border"+this+"Width"))||0}});return BY}if(B.expr&&B.expr.filters){B.expr.filters.hidden=function(BX){var BW=BX.offsetWidth,e=BX.offsetHeight;return(BW===0&&e===0)||(!B.support.reliableHiddenOffsets&&(BX.style.display||B.css(BX,"display"))==="none")};B.expr.filters.visible=function(e){return !B.expr.filters.hidden(e)}}var I=/%20/g,AO=/\[\]$/,BU=/\r?\n/g,BS=/#.*$/,Ab=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Az=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Al=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,Ao=/^(?:GET|HEAD)$/,C=/^\/\//,n=/\?/,A7=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Q=/^(?:select|textarea)/i,G=/\s+/,BT=/([?&])_=[^&]*/,l=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,b=B.fn.load,AA={},R={},Ac,S;try{Ac=BM.href}catch(AU){Ac=AT.createElement("a");Ac.href="";Ac=Ac.href}S=l.exec(Ac.toLowerCase())||[];function E(e){return function(BZ,Bb){if(typeof BZ!=="string"){Bb=BZ;BZ="*"}if(B.isFunction(Bb)){var BY=BZ.toLowerCase().split(G),BX=0,Ba=BY.length,BW,Bc,Bd;for(;BX<Ba;BX++){BW=BY[BX];Bd=/^\+/.test(BW);if(Bd){BW=BW.substr(1)||"*"}Bc=e[BW]=e[BW]||[];Bc[Bd?"unshift":"push"](Bb)}}}}function At(BW,Bf,Ba,Be,Bc,BY){Bc=Bc||Bf.dataTypes[0];BY=BY||{};BY[Bc]=true;var Bb=BW[Bc],BX=0,e=Bb?Bb.length:0,BZ=(BW===AA),Bd;for(;BX<e&&(BZ||!Bd);BX++){Bd=Bb[BX](Bf,Ba,Be);if(typeof Bd==="string"){if(!BZ||BY[Bd]){Bd=m}else{Bf.dataTypes.unshift(Bd);Bd=At(BW,Bf,Ba,Be,Bd,BY)}}}if((BZ||!Bd)&&!BY["*"]){Bd=At(BW,Bf,Ba,Be,"*",BY)}return Bd}B.fn.extend({load:function(BX,Ba,Bb){if(typeof BX!=="string"&&b){return b.apply(this,arguments)}else{if(!this.length){return this}}var BZ=BX.indexOf(" ");if(BZ>=0){var e=BX.slice(BZ,BX.length);BX=BX.slice(0,BZ)}var BY="GET";if(Ba){if(B.isFunction(Ba)){Bb=Ba;Ba=m}else{if(typeof Ba==="object"){Ba=B.param(Ba,B.ajaxSettings.traditional);BY="POST"}}}var BW=this;B.ajax({url:BX,type:BY,dataType:"html",data:Ba,complete:function(Bd,Bc,Be){Be=Bd.responseText;if(Bd.isResolved()){Bd.done(function(Bf){Be=Bf});BW.html(e?B("<div>").append(Be.replace(A7,"")).find(e):Be)}if(Bb){BW.each(Bb,[Be,Bc,Bd])}}});return this},serialize:function(){return B.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?B.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Q.test(this.nodeName)||Az.test(this.type))}).map(function(e,BW){var BX=B(this).val();return BX==null?null:B.isArray(BX)?B.map(BX,function(BZ,BY){return{name:BW.name,value:BZ.replace(BU,"\r\n")}}):{name:BW.name,value:BX.replace(BU,"\r\n")}}).get()}});B.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,BW){B.fn[BW]=function(BX){return this.bind(BW,BX)}});B.each(["get","post"],function(e,BW){B[BW]=function(BX,BZ,Ba,BY){if(B.isFunction(BZ)){BY=BY||Ba;Ba=BZ;BZ=m}return B.ajax({type:BW,url:BX,data:BZ,success:Ba,dataType:BY})}});B.extend({getScript:function(e,BW){return B.get(e,m,BW,"script")},getJSON:function(e,BW,BX){return B.get(e,BW,BX,"json")},ajaxSetup:function(BX,e){if(!e){e=BX;BX=B.extend(true,B.ajaxSettings,e)}else{B.extend(true,BX,B.ajaxSettings,e)}for(var BW in {context:1,url:1}){if(BW in e){BX[BW]=e[BW]}else{if(BW in B.ajaxSettings){BX[BW]=B.ajaxSettings[BW]}}}return BX},ajaxSettings:{url:Ac,isLocal:Al.test(S[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":BD.String,"text html":true,"text json":B.parseJSON,"text xml":B.parseXML}},ajaxPrefilter:E(AA),ajaxTransport:E(R),ajax:function(Ba,BY){if(typeof Ba==="object"){BY=Ba;Ba=m}BY=BY||{};var Be=B.ajaxSetup({},BY),Bt=Be.context||Be,Bh=Bt!==Be&&(Bt.nodeType||Bt instanceof B)?B(Bt):B.event,Bs=B.Deferred(),Bo=B._Deferred(),Bc=Be.statusCode||{},Bd,Bi={},Bp={},Br,BZ,Bm,Bf,Bj,Bb=0,BX,Bl,Bk={readyState:0,setRequestHeader:function(Bu,Bv){if(!Bb){var e=Bu.toLowerCase();Bu=Bp[e]=Bp[e]||Bu;Bi[Bu]=Bv}return this},getAllResponseHeaders:function(){return Bb===2?Br:null},getResponseHeader:function(Bu){var e;if(Bb===2){if(!BZ){BZ={};while((e=Ab.exec(Br))){BZ[e[1].toLowerCase()]=e[2]}}e=BZ[Bu.toLowerCase()]}return e===m?null:e},overrideMimeType:function(e){if(!Bb){Be.mimeType=e}return this},abort:function(e){e=e||"abort";if(Bm){Bm.abort(e)}Bg(0,e);return this}};function Bg(Bz,Bx,B0,Bw){if(Bb===2){return }Bb=2;if(Bf){clearTimeout(Bf)}Bm=m;Br=Bw||"";Bk.readyState=Bz?4:0;var Bu,B4,B3,By=B0?BK(Be,Bk,B0):m,Bv,B2;if(Bz>=200&&Bz<300||Bz===304){if(Be.ifModified){if((Bv=Bk.getResponseHeader("Last-Modified"))){B.lastModified[Bd]=Bv}if((B2=Bk.getResponseHeader("Etag"))){B.etag[Bd]=B2}}if(Bz===304){Bx="notmodified";Bu=true}else{try{B4=h(Be,By);Bx="success";Bu=true}catch(B1){Bx="parsererror";B3=B1}}}else{B3=Bx;if(!Bx||Bz){Bx="error";if(Bz<0){Bz=0}}}Bk.status=Bz;Bk.statusText=Bx;if(Bu){Bs.resolveWith(Bt,[B4,Bx,Bk])}else{Bs.rejectWith(Bt,[Bk,Bx,B3])}Bk.statusCode(Bc);Bc=m;if(BX){Bh.trigger("ajax"+(Bu?"Success":"Error"),[Bk,Be,Bu?B4:B3])}Bo.resolveWith(Bt,[Bk,Bx]);if(BX){Bh.trigger("ajaxComplete",[Bk,Be]);if(!(--B.active)){B.event.trigger("ajaxStop")}}}Bs.promise(Bk);Bk.success=Bk.done;Bk.error=Bk.fail;Bk.complete=Bo.done;Bk.statusCode=function(Bu){if(Bu){var e;if(Bb<2){for(e in Bu){Bc[e]=[Bc[e],Bu[e]]}}else{e=Bu[Bk.status];Bk.then(e,e)}}return this};Be.url=((Ba||Be.url)+"").replace(BS,"").replace(C,S[1]+"//");Be.dataTypes=B.trim(Be.dataType||"*").toLowerCase().split(G);if(Be.crossDomain==null){Bj=l.exec(Be.url.toLowerCase());Be.crossDomain=!!(Bj&&(Bj[1]!=S[1]||Bj[2]!=S[2]||(Bj[3]||(Bj[1]==="http:"?80:443))!=(S[3]||(S[1]==="http:"?80:443))))}if(Be.data&&Be.processData&&typeof Be.data!=="string"){Be.data=B.param(Be.data,Be.traditional)}At(AA,Be,BY,Bk);if(Bb===2){return false}BX=Be.global;Be.type=Be.type.toUpperCase();Be.hasContent=!Ao.test(Be.type);if(BX&&B.active++===0){B.event.trigger("ajaxStart")}if(!Be.hasContent){if(Be.data){Be.url+=(n.test(Be.url)?"&":"?")+Be.data}Bd=Be.url;if(Be.cache===false){var BW=B.now(),Bq=Be.url.replace(BT,"$1_="+BW);Be.url=Bq+((Bq===Be.url)?(n.test(Be.url)?"&":"?")+"_="+BW:"")}}if(Be.data&&Be.hasContent&&Be.contentType!==false||BY.contentType){Bk.setRequestHeader("Content-Type",Be.contentType)}if(Be.ifModified){Bd=Bd||Be.url;if(B.lastModified[Bd]){Bk.setRequestHeader("If-Modified-Since",B.lastModified[Bd])}if(B.etag[Bd]){Bk.setRequestHeader("If-None-Match",B.etag[Bd])}}Bk.setRequestHeader("Accept",Be.dataTypes[0]&&Be.accepts[Be.dataTypes[0]]?Be.accepts[Be.dataTypes[0]]+(Be.dataTypes[0]!=="*"?", */*; q=0.01":""):Be.accepts["*"]);for(Bl in Be.headers){Bk.setRequestHeader(Bl,Be.headers[Bl])}if(Be.beforeSend&&(Be.beforeSend.call(Bt,Bk,Be)===false||Bb===2)){Bk.abort();return false}for(Bl in {success:1,error:1,complete:1}){Bk[Bl](Be[Bl])}Bm=At(R,Be,BY,Bk);if(!Bm){Bg(-1,"No Transport")}else{Bk.readyState=1;if(BX){Bh.trigger("ajaxSend",[Bk,Be])}if(Be.async&&Be.timeout>0){Bf=setTimeout(function(){Bk.abort("timeout")},Be.timeout)}try{Bb=1;Bm.send(Bi,Bg)}catch(Bn){if(status<2){Bg(-1,Bn)}else{B.error(Bn)}}}return Bk},param:function(e,BX){var BW=[],BZ=function(Ba,Bb){Bb=B.isFunction(Bb)?Bb():Bb;BW[BW.length]=encodeURIComponent(Ba)+"="+encodeURIComponent(Bb)};if(BX===m){BX=B.ajaxSettings.traditional}if(B.isArray(e)||(e.jquery&&!B.isPlainObject(e))){B.each(e,function(){BZ(this.name,this.value)})}else{for(var BY in e){V(BY,e[BY],BX,BZ)}}return BW.join("&").replace(I,"+")}});function V(BX,BZ,BW,BY){if(B.isArray(BZ)){B.each(BZ,function(Bb,Ba){if(BW||AO.test(BX)){BY(BX,Ba)}else{V(BX+"["+(typeof Ba==="object"||B.isArray(Ba)?Bb:"")+"]",Ba,BW,BY)}})}else{if(!BW&&BZ!=null&&typeof BZ==="object"){for(var e in BZ){V(BX+"["+e+"]",BZ[e],BW,BY)}}else{BY(BX,BZ)}}}B.extend({active:0,lastModified:{},etag:{}});function BK(Be,Bd,Ba){var BW=Be.contents,Bc=Be.dataTypes,BX=Be.responseFields,BZ,Bb,BY,e;for(Bb in BX){if(Bb in Ba){Bd[BX[Bb]]=Ba[Bb]}}while(Bc[0]==="*"){Bc.shift();if(BZ===m){BZ=Be.mimeType||Bd.getResponseHeader("content-type")}}if(BZ){for(Bb in BW){if(BW[Bb]&&BW[Bb].test(BZ)){Bc.unshift(Bb);break}}}if(Bc[0] in Ba){BY=Bc[0]}else{for(Bb in Ba){if(!Bc[0]||Be.converters[Bb+" "+Bc[0]]){BY=Bb;break}if(!e){e=Bb}}BY=BY||e}if(BY){if(BY!==Bc[0]){Bc.unshift(BY)}return Ba[BY]}}function h(Bi,Ba){if(Bi.dataFilter){Ba=Bi.dataFilter(Ba,Bi.dataType)}var Be=Bi.dataTypes,Bh={},Bb,Bf,BX=Be.length,Bc,Bd=Be[0],BY,BZ,Bg,BW,e;for(Bb=1;Bb<BX;Bb++){if(Bb===1){for(Bf in Bi.converters){if(typeof Bf==="string"){Bh[Bf.toLowerCase()]=Bi.converters[Bf]}}}BY=Bd;Bd=Be[Bb];if(Bd==="*"){Bd=BY}else{if(BY!=="*"&&BY!==Bd){BZ=BY+" "+Bd;Bg=Bh[BZ]||Bh["* "+Bd];if(!Bg){e=m;for(BW in Bh){Bc=BW.split(" ");if(Bc[0]===BY||Bc[0]==="*"){e=Bh[Bc[1]+" "+Bd];if(e){BW=Bh[BW];if(BW===true){Bg=e}else{if(e===true){Bg=BW}}break}}}}if(!(Bg||e)){B.error("No conversion from "+BZ.replace(" "," to "))}if(Bg!==true){Ba=Bg?Bg(Ba):e(BW(Ba))}}}}return Ba}var Aa=B.now(),U=/(\=)\?(&|$)|\?\?/i;B.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return B.expando+"_"+(Aa++)}});B.ajaxPrefilter("json jsonp",function(Be,Bb,Bd){var BY=Be.contentType==="application/x-www-form-urlencoded"&&(typeof Be.data==="string");if(Be.dataTypes[0]==="jsonp"||Be.jsonp!==false&&(U.test(Be.url)||BY&&U.test(Be.data))){var Bc,BX=Be.jsonpCallback=B.isFunction(Be.jsonpCallback)?Be.jsonpCallback():Be.jsonpCallback,Ba=BD[BX],e=Be.url,BZ=Be.data,BW="$1"+BX+"$2";if(Be.jsonp!==false){e=e.replace(U,BW);if(Be.url===e){if(BY){BZ=BZ.replace(U,BW)}if(Be.data===BZ){e+=(/\?/.test(e)?"&":"?")+Be.jsonp+"="+BX}}}Be.url=e;Be.data=BZ;BD[BX]=function(Bf){Bc=[Bf]};Bd.always(function(){BD[BX]=Ba;if(Bc&&B.isFunction(Ba)){BD[BX](Bc[0])}});Be.converters["script json"]=function(){if(!Bc){B.error(BX+" was not called")}return Bc[0]};Be.dataTypes[0]="json";return"script"}});B.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){B.globalEval(e);return e}}});B.ajaxPrefilter("script",function(e){if(e.cache===m){e.cache=false}if(e.crossDomain){e.type="GET";e.global=false}});B.ajaxTransport("script",function(BX){if(BX.crossDomain){var e,BW=AT.head||AT.getElementsByTagName("head")[0]||AT.documentElement;return{send:function(BY,BZ){e=AT.createElement("script");e.async="async";if(BX.scriptCharset){e.charset=BX.scriptCharset}e.src=BX.url;e.onload=e.onreadystatechange=function(Bb,Ba){if(Ba||!e.readyState||/loaded|complete/.test(e.readyState)){e.onload=e.onreadystatechange=null;if(BW&&e.parentNode){BW.removeChild(e)}e=m;if(!Ba){BZ(200,"success")}}};BW.insertBefore(e,BW.firstChild)},abort:function(){if(e){e.onload(0,1)}}}}});var c=BD.ActiveXObject?function(){for(var e in o){o[e](0,1)}}:false,Y=0,o;function Ak(){try{return new BD.XMLHttpRequest()}catch(BW){}}function AI(){try{return new BD.ActiveXObject("Microsoft.XMLHTTP")}catch(BW){}}B.ajaxSettings.xhr=BD.ActiveXObject?function(){return !this.isLocal&&Ak()||AI()}:Ak;(function(e){B.extend(B.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(B.ajaxSettings.xhr());if(B.support.ajax){B.ajaxTransport(function(e){if(!e.crossDomain||B.support.cors){var BW;return{send:function(Bc,BX){var Bb=e.xhr(),Ba,BZ;if(e.username){Bb.open(e.type,e.url,e.async,e.username,e.password)}else{Bb.open(e.type,e.url,e.async)}if(e.xhrFields){for(BZ in e.xhrFields){Bb[BZ]=e.xhrFields[BZ]}}if(e.mimeType&&Bb.overrideMimeType){Bb.overrideMimeType(e.mimeType)}if(!e.crossDomain&&!Bc["X-Requested-With"]){Bc["X-Requested-With"]="XMLHttpRequest"}try{for(BZ in Bc){Bb.setRequestHeader(BZ,Bc[BZ])}}catch(BY){}Bb.send((e.hasContent&&e.data)||null);BW=function(Bl,Bf){var Bg,Be,Bd,Bj,Bi;try{if(BW&&(Bf||Bb.readyState===4)){BW=m;if(Ba){Bb.onreadystatechange=B.noop;if(c){delete o[Ba]}}if(Bf){if(Bb.readyState!==4){Bb.abort()}}else{Bg=Bb.status;Bd=Bb.getAllResponseHeaders();Bj={};Bi=Bb.responseXML;if(Bi&&Bi.documentElement){Bj.xml=Bi}Bj.text=Bb.responseText;try{Be=Bb.statusText}catch(Bk){Be=""}if(!Bg&&e.isLocal&&!e.crossDomain){Bg=Bj.text?200:404}else{if(Bg===1223){Bg=204}}}}}catch(Bh){if(!Bf){BX(-1,Bh)}}if(Bj){BX(Bg,Be,Bj,Bd)}};if(!e.async||Bb.readyState===4){BW()}else{Ba=++Y;if(c){if(!o){o={};B(BD).unload(c)}o[Ba]=BW}Bb.onreadystatechange=BW}},abort:function(){if(BW){BW(0,1)}}}}})}var s={},BA,L,AZ=/^(?:toggle|show|hide)$/,Aq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,A3,Ag=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],A5,u=BD.webkitRequestAnimationFrame||BD.mozRequestAnimationFrame||BD.oRequestAnimationFrame;B.fn.extend({show:function(BY,Bb,Ba){var BX,BZ;if(BY||BY===0){return this.animate(A1("show",3),BY,Bb,Ba)}else{for(var BW=0,e=this.length;BW<e;BW++){BX=this[BW];if(BX.style){BZ=BX.style.display;if(!B._data(BX,"olddisplay")&&BZ==="none"){BZ=BX.style.display=""}if(BZ===""&&B.css(BX,"display")==="none"){B._data(BX,"olddisplay",X(BX.nodeName))}}}for(BW=0;BW<e;BW++){BX=this[BW];if(BX.style){BZ=BX.style.display;if(BZ===""||BZ==="none"){BX.style.display=B._data(BX,"olddisplay")||""}}}return this}},hide:function(BX,Ba,BZ){if(BX||BX===0){return this.animate(A1("hide",3),BX,Ba,BZ)}else{for(var BW=0,e=this.length;BW<e;BW++){if(this[BW].style){var BY=B.css(this[BW],"display");if(BY!=="none"&&!B._data(this[BW],"olddisplay")){B._data(this[BW],"olddisplay",BY)}}}for(BW=0;BW<e;BW++){if(this[BW].style){this[BW].style.display="none"}}return this}},_toggle:B.fn.toggle,toggle:function(BX,BW,BY){var e=typeof BX==="boolean";if(B.isFunction(BX)&&B.isFunction(BW)){this._toggle.apply(this,arguments)}else{if(BX==null||e){this.each(function(){var BZ=e?BX:B(this).is(":hidden");B(this)[BZ?"show":"hide"]()})}else{this.animate(A1("toggle",3),BX,BW,BY)}}return this},fadeTo:function(e,BY,BX,BW){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:BY},e,BX,BW)},animate:function(BZ,BW,BY,BX){var e=B.speed(BW,BY,BX);if(B.isEmptyObject(BZ)){return this.each(e.complete,[false])}BZ=B.extend({},BZ);return this[e.queue===false?"each":"queue"](function(){if(e.queue===false){B._mark(this)}var Bd=B.extend({},e),Bk=this.nodeType===1,Bh=Bk&&B(this).is(":hidden"),Ba,Be,Bc,Bj,Bi,Bg,Bb,Bf,Bl;Bd.animatedProperties={};for(Bc in BZ){Ba=B.camelCase(Bc);if(Bc!==Ba){BZ[Ba]=BZ[Bc];delete BZ[Bc]}Be=BZ[Ba];if(B.isArray(Be)){Bd.animatedProperties[Ba]=Be[1];Be=BZ[Ba]=Be[0]}else{Bd.animatedProperties[Ba]=Bd.specialEasing&&Bd.specialEasing[Ba]||Bd.easing||"swing"}if(Be==="hide"&&Bh||Be==="show"&&!Bh){return Bd.complete.call(this)}if(Bk&&(Ba==="height"||Ba==="width")){Bd.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(B.css(this,"display")==="inline"&&B.css(this,"float")==="none"){if(!B.support.inlineBlockNeedsLayout){this.style.display="inline-block"}else{Bj=X(this.nodeName);if(Bj==="inline"){this.style.display="inline-block"}else{this.style.display="inline";this.style.zoom=1}}}}}if(Bd.overflow!=null){this.style.overflow="hidden"}for(Bc in BZ){Bi=new B.fx(this,Bd,Bc);Be=BZ[Bc];if(AZ.test(Be)){Bi[Be==="toggle"?Bh?"show":"hide":Be]()}else{Bg=Aq.exec(Be);Bb=Bi.cur();if(Bg){Bf=parseFloat(Bg[2]);Bl=Bg[3]||(B.cssNumber[Bc]?"":"px");if(Bl!=="px"){B.style(this,Bc,(Bf||1)+Bl);Bb=((Bf||1)/Bi.cur())*Bb;B.style(this,Bc,Bb+Bl)}if(Bg[1]){Bf=((Bg[1]==="-="?-1:1)*Bf)+Bb}Bi.custom(Bb,Bf,Bl)}else{Bi.custom(Bb,Be,"")}}}return true})},stop:function(BW,e){if(BW){this.queue([])}this.each(function(){var BY=B.timers,BX=BY.length;if(!e){B._unmark(true,this)}while(BX--){if(BY[BX].elem===this){if(e){BY[BX](true)}BY.splice(BX,1)}}});if(!e){this.dequeue()}return this}});function BH(){setTimeout(AR,0);return(A5=B.now())}function AR(){A5=m}function A1(BW,e){var BX={};B.each(Ag.concat.apply([],Ag.slice(0,e)),function(){BX[this]=BW});return BX}B.each({slideDown:A1("show",1),slideUp:A1("hide",1),slideToggle:A1("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,BW){B.fn[e]=function(BX,BZ,BY){return this.animate(BW,BX,BZ,BY)}});B.extend({speed:function(BX,BY,BW){var e=BX&&typeof BX==="object"?B.extend({},BX):{complete:BW||!BW&&BY||B.isFunction(BX)&&BX,duration:BX,easing:BW&&BY||BY&&!B.isFunction(BY)&&BY};e.duration=B.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in B.fx.speeds?B.fx.speeds[e.duration]:B.fx.speeds._default;e.old=e.complete;e.complete=function(BZ){if(e.queue!==false){B.dequeue(this)}else{if(BZ!==false){B._unmark(this)}}if(B.isFunction(e.old)){e.old.call(this)}};return e},easing:{linear:function(BX,BY,e,BW){return e+BW*BX},swing:function(BX,BY,e,BW){return((-Math.cos(BX*Math.PI)/2)+0.5)*BW+e}},timers:[],fx:function(BW,e,BX){this.options=e;this.elem=BW;this.prop=BX;e.orig=e.orig||{}}});B.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(B.fx.step[this.prop]||B.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var e,BW=B.css(this.elem,this.prop);return isNaN(e=parseFloat(BW))?!BW||BW==="auto"?0:BW:e},custom:function(Bb,Ba,BY){var e=this,BX=B.fx,BZ;this.startTime=A5||BH();this.start=Bb;this.end=Ba;this.unit=BY||this.unit||(B.cssNumber[this.prop]?"":"px");this.now=this.start;this.pos=this.state=0;function BW(Bc){return e.step(Bc)}BW.elem=this.elem;if(BW()&&B.timers.push(BW)&&!A3){if(u){A3=1;BZ=function(){if(A3){u(BZ);BX.tick()}};u(BZ)}else{A3=setInterval(BX.tick,BX.interval)}}},show:function(){this.options.orig[this.prop]=B.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());B(this.elem).show()},hide:function(){this.options.orig[this.prop]=B.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(BZ){var BY=A5||BH(),e=true,Ba=this.elem,BW=this.options,BX,Bc;if(BZ||BY>=BW.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();BW.animatedProperties[this.prop]=true;for(BX in BW.animatedProperties){if(BW.animatedProperties[BX]!==true){e=false}}if(e){if(BW.overflow!=null&&!B.support.shrinkWrapBlocks){B.each(["","X","Y"],function(Bd,Be){Ba.style["overflow"+Be]=BW.overflow[Bd]})}if(BW.hide){B(Ba).hide()}if(BW.hide||BW.show){for(var Bb in BW.animatedProperties){B.style(Ba,Bb,BW.orig[Bb])}}BW.complete.call(Ba)}return false}else{if(BW.duration==Infinity){this.now=BY}else{Bc=BY-this.startTime;this.state=Bc/BW.duration;this.pos=B.easing[BW.animatedProperties[this.prop]](this.state,Bc,0,1,BW.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};B.extend(B.fx,{tick:function(){for(var BW=B.timers,e=0;e<BW.length;++e){if(!BW[e]()){BW.splice(e--,1)}}if(!BW.length){B.fx.stop()}},interval:13,stop:function(){clearInterval(A3);A3=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){B.style(e.elem,"opacity",e.now)},_default:function(e){if(e.elem.style&&e.elem.style[e.prop]!=null){e.elem.style[e.prop]=(e.prop==="width"||e.prop==="height"?Math.max(0,e.now):e.now)+e.unit}else{e.elem[e.prop]=e.now}}}});if(B.expr&&B.expr.filters){B.expr.filters.animated=function(e){return B.grep(B.timers,function(BW){return e===BW.elem}).length}}function X(BX){if(!s[BX]){var e=B("<"+BX+">").appendTo("body"),BW=e.css("display");e.remove();if(BW==="none"||BW===""){if(!BA){BA=AT.createElement("iframe");BA.frameBorder=BA.width=BA.height=0}AT.body.appendChild(BA);if(!L||!BA.createElement){L=(BA.contentWindow||BA.contentDocument).document;L.write("<!doctype><html><body></body></html>")}e=L.createElement(BX);L.body.appendChild(e);BW=B.css(e,"display");AT.body.removeChild(BA)}s[BX]=BW}return s[BX]}var x=/^t(?:able|d|h)$/i,AD=/^(?:body|html)$/i;if("getBoundingClientRect" in AT.documentElement){B.fn.offset=function(Bj){var BZ=this[0],Bc;if(Bj){return this.each(function(e){B.offset.setOffset(this,Bj,e)})}if(!BZ||!BZ.ownerDocument){return null}if(BZ===BZ.ownerDocument.body){return B.offset.bodyOffset(BZ)}try{Bc=BZ.getBoundingClientRect()}catch(Bg){}var Bi=BZ.ownerDocument,BX=Bi.documentElement;if(!Bc||!B.contains(BX,BZ)){return Bc?{top:Bc.top,left:Bc.left}:{top:0,left:0}}var Bd=Bi.body,Be=Aj(Bi),Bb=BX.clientTop||Bd.clientTop||0,Bf=BX.clientLeft||Bd.clientLeft||0,BW=Be.pageYOffset||B.support.boxModel&&BX.scrollTop||Bd.scrollTop,Ba=Be.pageXOffset||B.support.boxModel&&BX.scrollLeft||Bd.scrollLeft,Bh=Bc.top+BW-Bb,BY=Bc.left+Ba-Bf;return{top:Bh,left:BY}}}else{B.fn.offset=function(Bg){var Ba=this[0];if(Bg){return this.each(function(Bh){B.offset.setOffset(this,Bg,Bh)})}if(!Ba||!Ba.ownerDocument){return null}if(Ba===Ba.ownerDocument.body){return B.offset.bodyOffset(Ba)}B.offset.initialize();var Bd,BX=Ba.offsetParent,BW=Ba,Bf=Ba.ownerDocument,BY=Bf.documentElement,Bb=Bf.body,Bc=Bf.defaultView,e=Bc?Bc.getComputedStyle(Ba,null):Ba.currentStyle,Be=Ba.offsetTop,BZ=Ba.offsetLeft;while((Ba=Ba.parentNode)&&Ba!==Bb&&Ba!==BY){if(B.offset.supportsFixedPosition&&e.position==="fixed"){break}Bd=Bc?Bc.getComputedStyle(Ba,null):Ba.currentStyle;Be-=Ba.scrollTop;BZ-=Ba.scrollLeft;if(Ba===BX){Be+=Ba.offsetTop;BZ+=Ba.offsetLeft;if(B.offset.doesNotAddBorder&&!(B.offset.doesAddBorderForTableAndCells&&x.test(Ba.nodeName))){Be+=parseFloat(Bd.borderTopWidth)||0;BZ+=parseFloat(Bd.borderLeftWidth)||0}BW=BX;BX=Ba.offsetParent}if(B.offset.subtractsBorderForOverflowNotVisible&&Bd.overflow!=="visible"){Be+=parseFloat(Bd.borderTopWidth)||0;BZ+=parseFloat(Bd.borderLeftWidth)||0}e=Bd}if(e.position==="relative"||e.position==="static"){Be+=Bb.offsetTop;BZ+=Bb.offsetLeft}if(B.offset.supportsFixedPosition&&e.position==="fixed"){Be+=Math.max(BY.scrollTop,Bb.scrollTop);BZ+=Math.max(BY.scrollLeft,Bb.scrollLeft)}return{top:Be,left:BZ}}}B.offset={initialize:function(){var e=AT.body,BW=AT.createElement("div"),BZ,Bb,Ba,Bc,BX=parseFloat(B.css(e,"marginTop"))||0,BY="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";B.extend(BW.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});BW.innerHTML=BY;e.insertBefore(BW,e.firstChild);BZ=BW.firstChild;Bb=BZ.firstChild;Bc=BZ.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(Bb.offsetTop!==5);this.doesAddBorderForTableAndCells=(Bc.offsetTop===5);Bb.style.position="fixed";Bb.style.top="20px";this.supportsFixedPosition=(Bb.offsetTop===20||Bb.offsetTop===15);Bb.style.position=Bb.style.top="";BZ.style.overflow="hidden";BZ.style.position="relative";this.subtractsBorderForOverflowNotVisible=(Bb.offsetTop===-5);this.doesNotIncludeMarginInBodyOffset=(e.offsetTop!==BX);e.removeChild(BW);B.offset.initialize=B.noop},bodyOffset:function(e){var BX=e.offsetTop,BW=e.offsetLeft;B.offset.initialize();if(B.offset.doesNotIncludeMarginInBodyOffset){BX+=parseFloat(B.css(e,"marginTop"))||0;BW+=parseFloat(B.css(e,"marginLeft"))||0}return{top:BX,left:BW}},setOffset:function(BY,Bh,Bb){var Bc=B.css(BY,"position");if(Bc==="static"){BY.style.position="relative"}var Ba=B(BY),BW=Ba.offset(),e=B.css(BY,"top"),Bf=B.css(BY,"left"),Bg=(Bc==="absolute"||Bc==="fixed")&&B.inArray("auto",[e,Bf])>-1,Be={},Bd={},BX,BZ;if(Bg){Bd=Ba.position();BX=Bd.top;BZ=Bd.left}else{BX=parseFloat(e)||0;BZ=parseFloat(Bf)||0}if(B.isFunction(Bh)){Bh=Bh.call(BY,Bb,BW)}if(Bh.top!=null){Be.top=(Bh.top-BW.top)+BX}if(Bh.left!=null){Be.left=(Bh.left-BW.left)+BZ}if("using" in Bh){Bh.using.call(BY,Be)}else{Ba.css(Be)}}};B.fn.extend({position:function(){if(!this[0]){return null}var BX=this[0],BW=this.offsetParent(),BY=this.offset(),e=AD.test(BW[0].nodeName)?{top:0,left:0}:BW.offset();BY.top-=parseFloat(B.css(BX,"marginTop"))||0;BY.left-=parseFloat(B.css(BX,"marginLeft"))||0;e.top+=parseFloat(B.css(BW[0],"borderTopWidth"))||0;e.left+=parseFloat(B.css(BW[0],"borderLeftWidth"))||0;return{top:BY.top-e.top,left:BY.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||AT.body;while(e&&(!AD.test(e.nodeName)&&B.css(e,"position")==="static")){e=e.offsetParent}return e})}});B.each(["Left","Top"],function(BW,e){var BX="scroll"+e;B.fn[BX]=function(Ba){var BY,BZ;if(Ba===m){BY=this[0];if(!BY){return null}BZ=Aj(BY);return BZ?("pageXOffset" in BZ)?BZ[BW?"pageYOffset":"pageXOffset"]:B.support.boxModel&&BZ.document.documentElement[BX]||BZ.document.body[BX]:BY[BX]}return this.each(function(){BZ=Aj(this);if(BZ){BZ.scrollTo(!BW?Ba:B(BZ).scrollLeft(),BW?Ba:B(BZ).scrollTop())}else{this[BX]=Ba}})}});function Aj(e){return B.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}B.each(["Height","Width"],function(BW,e){var BX=e.toLowerCase();B.fn["inner"+e]=function(){return this[0]?parseFloat(B.css(this[0],BX,"padding")):null};B.fn["outer"+e]=function(BY){return this[0]?parseFloat(B.css(this[0],BX,BY?"margin":"border")):null};B.fn[BX]=function(BZ){var Ba=this[0];if(!Ba){return BZ==null?null:this}if(B.isFunction(BZ)){return this.each(function(Be){var Bd=B(this);Bd[BX](BZ.call(this,Be,Bd[BX]()))})}if(B.isWindow(Ba)){var Bb=Ba.document.documentElement["client"+e];return Ba.document.compatMode==="CSS1Compat"&&Bb||Ba.document.body["client"+e]||Bb}else{if(Ba.nodeType===9){return Math.max(Ba.documentElement["client"+e],Ba.body["scroll"+e],Ba.documentElement["scroll"+e],Ba.body["offset"+e],Ba.documentElement["offset"+e])}else{if(BZ===m){var Bc=B.css(Ba,BX),BY=parseFloat(Bc);return B.isNaN(BY)?Bc:BY}else{return this.css(BX,typeof BZ==="string"?BZ:BZ+"px")}}}}});BD.jQuery=BD.$=B})(window);(function(D,C){function B(F,E){var G=F.nodeName.toLowerCase();if("area"===G){E=F.parentNode;G=E.name;if(!F.href||!G||E.nodeName.toLowerCase()!=="map"){return false}F=D("img[usemap=#"+G+"]")[0];return !!F&&A(F)}return(/input|select|textarea|button|object/.test(G)?!F.disabled:"a"==G?F.href||E:E)&&A(F)}function A(E){return !D(E).parents().andSelf().filter(function(){return D.curCSS(this,"visibility")==="hidden"||D.expr.filters.hidden(this)}).length}D.ui=D.ui||{};if(!D.ui.version){D.extend(D.ui,{version:"1.8.14",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});D.fn.extend({_focus:D.fn.focus,focus:function(F,E){return typeof F==="number"?this.each(function(){var G=this;setTimeout(function(){D(G).focus();E&&E.call(G)},F)}):this._focus.apply(this,arguments)},scrollParent:function(){var E;E=D.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(D.curCSS(this,"position",1))&&/(auto|scroll)/.test(D.curCSS(this,"overflow",1)+D.curCSS(this,"overflow-y",1)+D.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(D.curCSS(this,"overflow",1)+D.curCSS(this,"overflow-y",1)+D.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!E.length?D(document):E},zIndex:function(F){if(F!==C){return this.css("zIndex",F)}if(this.length){F=D(this[0]);for(var E;F.length&&F[0]!==document;){E=F.css("position");if(E==="absolute"||E==="relative"||E==="fixed"){E=parseInt(F.css("zIndex"),10);if(!isNaN(E)&&E!==0){return E}}F=F.parent()}}return 0},disableSelection:function(){return this.bind((D.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(E){E.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});D.each(["Width","Height"],function(F,E){function J(M,L,K,N){D.each(I,function(){L-=parseFloat(D.curCSS(M,"padding"+this,true))||0;if(K){L-=parseFloat(D.curCSS(M,"border"+this+"Width",true))||0}if(N){L-=parseFloat(D.curCSS(M,"margin"+this,true))||0}});return L}var I=E==="Width"?["Left","Right"]:["Top","Bottom"],H=E.toLowerCase(),G={innerWidth:D.fn.innerWidth,innerHeight:D.fn.innerHeight,outerWidth:D.fn.outerWidth,outerHeight:D.fn.outerHeight};D.fn["inner"+E]=function(K){if(K===C){return G["inner"+E].call(this)}return this.each(function(){D(this).css(H,J(this,K)+"px")})};D.fn["outer"+E]=function(L,K){if(typeof L!=="number"){return G["outer"+E].call(this,L)}return this.each(function(){D(this).css(H,J(this,L,true,K)+"px")})}});D.extend(D.expr[":"],{data:function(F,E,G){return !!D.data(F,G[3])},focusable:function(E){return B(E,!isNaN(D.attr(E,"tabindex")))},tabbable:function(F){var E=D.attr(F,"tabindex"),G=isNaN(E);return(G||E>=0)&&B(F,!G)}});D(function(){var F=document.body,E=F.appendChild(E=document.createElement("div"));D.extend(E.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});D.support.minHeight=E.offsetHeight===100;D.support.selectstart="onselectstart" in E;F.removeChild(E).style.display="none"});D.extend(D.ui,{plugin:{add:function(F,E,H){F=D.ui[F].prototype;for(var G in H){F.plugins[G]=F.plugins[G]||[];F.plugins[G].push([E,H[G]])}},call:function(F,E,H){if((E=F.plugins[E])&&F.element[0].parentNode){for(var G=0;G<E.length;G++){F.options[E[G][0]]&&E[G][1].apply(F.element,H)}}}},contains:function(F,E){return document.compareDocumentPosition?F.compareDocumentPosition(E)&16:F!==E&&F.contains(E)},hasScroll:function(F,E){if(D(F).css("overflow")==="hidden"){return false}E=E&&E==="left"?"scrollLeft":"scrollTop";var G=false;if(F[E]>0){return true}F[E]=1;G=F[E]>0;F[E]=0;return G},isOverAxis:function(F,E,G){return F>E&&F<E+G},isOver:function(F,E,J,I,H,G){return D.ui.isOverAxis(F,J,H)&&D.ui.isOverAxis(E,I,G)}})}})(jQuery);(function(A,D){if(A.cleanData){var C=A.cleanData;A.cleanData=function(E){for(var G=0,F;(F=E[G])!=null;G++){A(F).triggerHandler("remove")}C(E)}}else{var B=A.fn.remove;A.fn.remove=function(E,F){return this.each(function(){if(!F){if(!E||A.filter(E,[this]).length){A("*",this).add([this]).each(function(){A(this).triggerHandler("remove")})}}return B.call(A(this),E,F)})}}A.widget=function(E,I,H){var G=E.split(".")[0],F;E=E.split(".")[1];F=G+"-"+E;if(!H){H=I;I=A.Widget}A.expr[":"][F]=function(J){return !!A.data(J,E)};A[G]=A[G]||{};A[G][E]=function(J,K){arguments.length&&this._createWidget(J,K)};I=new I;I.options=A.extend(true,{},I.options);A[G][E].prototype=A.extend(true,I,{namespace:G,widgetName:E,widgetEventPrefix:A[G][E].prototype.widgetEventPrefix||E,widgetBaseClass:F},H);A.widget.bridge(E,A[G][E])};A.widget.bridge=function(E,F){A.fn[E]=function(J){var I=typeof J==="string",H=Array.prototype.slice.call(arguments,1),G=this;J=!I&&H.length?A.extend.apply(null,[true,J].concat(H)):J;if(I&&J.charAt(0)==="_"){return G}I?this.each(function(){var L=A.data(this,E),K=L&&A.isFunction(L[J])?L[J].apply(L,H):L;if(K!==L&&K!==D){G=K;return false}}):this.each(function(){var K=A.data(this,E);K?K.option(J||{})._init():A.data(this,E,new F(J,this))});return G}};A.Widget=function(E,F){arguments.length&&this._createWidget(E,F)};A.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(E,G){A.data(G,this.widgetName,this);this.element=A(G);this.options=A.extend(true,{},this.options,this._getCreateOptions(),E);var F=this;this.element.bind("remove."+this.widgetName,function(){F.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return A.metadata&&A.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(E,G){var F=E;if(arguments.length===0){return A.extend({},this.options)}if(typeof E==="string"){if(G===D){return this.options[E]}F={};F[E]=G}this._setOptions(F);return this},_setOptions:function(E){var F=this;A.each(E,function(H,G){F._setOption(H,G)});return this},_setOption:function(E,F){this.options[E]=F;if(E==="disabled"){this.widget()[F?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",F)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(E,I,H){var G=this.options[E];I=A.Event(I);I.type=(E===this.widgetEventPrefix?E:this.widgetEventPrefix+E).toLowerCase();H=H||{};if(I.originalEvent){E=A.event.props.length;for(var F;E;){F=A.event.props[--E];I[F]=I.originalEvent[F]}}this.element.trigger(I,H);return !(A.isFunction(G)&&G.call(this.element[0],I,H)===false||I.isDefaultPrevented())}}})(jQuery);(function(A){var B=false;A(document).mousedown(function(){B=false});A.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var C=this;this.element.bind("mousedown."+this.widgetName,function(D){return C._mouseDown(D)}).bind("click."+this.widgetName,function(D){if(true===A.data(D.target,C.widgetName+".preventClickEvent")){A.removeData(D.target,C.widgetName+".preventClickEvent");D.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(C){if(!B){this._mouseStarted&&this._mouseUp(C);this._mouseDownEvent=C;var F=this,E=C.which==1,D=typeof this.options.cancel=="string"?A(C.target).closest(this.options.cancel).length:false;if(!E||D||!this._mouseCapture(C)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){F.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(C)&&this._mouseDelayMet(C)){this._mouseStarted=this._mouseStart(C)!==false;if(!this._mouseStarted){C.preventDefault();return true}}true===A.data(C.target,this.widgetName+".preventClickEvent")&&A.removeData(C.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(G){return F._mouseMove(G)};this._mouseUpDelegate=function(G){return F._mouseUp(G)};A(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);C.preventDefault();return B=true}},_mouseMove:function(C){if(A.browser.msie&&!(document.documentMode>=9)&&!C.button){return this._mouseUp(C)}if(this._mouseStarted){this._mouseDrag(C);return C.preventDefault()}if(this._mouseDistanceMet(C)&&this._mouseDelayMet(C)){(this._mouseStarted=this._mouseStart(this._mouseDownEvent,C)!==false)?this._mouseDrag(C):this._mouseUp(C)}return !this._mouseStarted},_mouseUp:function(C){A(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;C.target==this._mouseDownEvent.target&&A.data(C.target,this.widgetName+".preventClickEvent",true);this._mouseStop(C)}return false},_mouseDistanceMet:function(C){return Math.max(Math.abs(this._mouseDownEvent.pageX-C.pageX),Math.abs(this._mouseDownEvent.pageY-C.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(E){E.ui=E.ui||{};var D=/left|center|right/,C=/top|center|bottom/,B=E.fn.position,A=E.fn.offset;E.fn.position=function(F){if(!F||!F.of){return B.apply(this,arguments)}F=E.extend({},F);var G=E(F.of),M=G[0],K=(F.collision||"flip").split(" "),L=F.offset?F.offset.split(" "):[0,0],J,H,I;if(M.nodeType===9){J=G.width();H=G.height();I={top:0,left:0}}else{if(M.setTimeout){J=G.width();H=G.height();I={top:G.scrollTop(),left:G.scrollLeft()}}else{if(M.preventDefault){F.at="left top";J=H=0;I={top:F.of.pageY,left:F.of.pageX}}else{J=G.outerWidth();H=G.outerHeight();I=G.offset()}}}E.each(["my","at"],function(){var N=(F[this]||"").split(" ");if(N.length===1){N=D.test(N[0])?N.concat(["center"]):C.test(N[0])?["center"].concat(N):["center","center"]}N[0]=D.test(N[0])?N[0]:"center";N[1]=C.test(N[1])?N[1]:"center";F[this]=N});if(K.length===1){K[1]=K[0]}L[0]=parseInt(L[0],10)||0;if(L.length===1){L[1]=L[0]}L[1]=parseInt(L[1],10)||0;if(F.at[0]==="right"){I.left+=J}else{if(F.at[0]==="center"){I.left+=J/2}}if(F.at[1]==="bottom"){I.top+=H}else{if(F.at[1]==="center"){I.top+=H/2}}I.left+=L[0];I.top+=L[1];return this.each(function(){var T=E(this),R=T.outerWidth(),Q=T.outerHeight(),P=parseInt(E.curCSS(this,"marginLeft",true))||0,O=parseInt(E.curCSS(this,"marginTop",true))||0,V=R+P+(parseInt(E.curCSS(this,"marginRight",true))||0),U=Q+O+(parseInt(E.curCSS(this,"marginBottom",true))||0),S=E.extend({},I),N;if(F.my[0]==="right"){S.left-=R}else{if(F.my[0]==="center"){S.left-=R/2}}if(F.my[1]==="bottom"){S.top-=Q}else{if(F.my[1]==="center"){S.top-=Q/2}}S.left=Math.round(S.left);S.top=Math.round(S.top);N={left:S.left-P,top:S.top-O};E.each(["left","top"],function(X,W){E.ui.position[K[X]]&&E.ui.position[K[X]][W](S,{targetWidth:J,targetHeight:H,elemWidth:R,elemHeight:Q,collisionPosition:N,collisionWidth:V,collisionHeight:U,offset:L,my:F.my,at:F.at})});E.fn.bgiframe&&T.bgiframe();T.offset(E.extend(S,{using:F.using}))})};E.ui.position={fit:{left:function(F,G){var H=E(window);H=G.collisionPosition.left+G.collisionWidth-H.width()-H.scrollLeft();F.left=H>0?F.left-H:Math.max(F.left-G.collisionPosition.left,F.left)},top:function(F,G){var H=E(window);H=G.collisionPosition.top+G.collisionHeight-H.height()-H.scrollTop();F.top=H>0?F.top-H:Math.max(F.top-G.collisionPosition.top,F.top)}},flip:{left:function(F,G){if(G.at[0]!=="center"){var K=E(window);K=G.collisionPosition.left+G.collisionWidth-K.width()-K.scrollLeft();var I=G.my[0]==="left"?-G.elemWidth:G.my[0]==="right"?G.elemWidth:0,J=G.at[0]==="left"?G.targetWidth:-G.targetWidth,H=-2*G.offset[0];F.left+=G.collisionPosition.left<0?I+J+H:K>0?I+J+H:0}},top:function(F,G){if(G.at[1]!=="center"){var K=E(window);K=G.collisionPosition.top+G.collisionHeight-K.height()-K.scrollTop();var I=G.my[1]==="top"?-G.elemHeight:G.my[1]==="bottom"?G.elemHeight:0,J=G.at[1]==="top"?G.targetHeight:-G.targetHeight,H=-2*G.offset[1];F.top+=G.collisionPosition.top<0?I+J+H:K>0?I+J+H:0}}}};if(!E.offset.setOffset){E.offset.setOffset=function(F,G){if(/static/.test(E.curCSS(F,"position"))){F.style.position="relative"}var K=E(F),I=K.offset(),J=parseInt(E.curCSS(F,"top",true),10)||0,H=parseInt(E.curCSS(F,"left",true),10)||0;I={top:G.top-I.top+J,left:G.left-I.left+H};"using" in G?G.using.call(F,I):K.css(I)};E.fn.offset=function(F){var G=this[0];if(!G||!G.ownerDocument){return null}if(F){return this.each(function(){E.offset.setOffset(this,F)})}return A.call(this)}}})(jQuery);(function(A){A.widget("ui.draggable",A.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(C){var B=this.options;if(this.helper||B.disabled||A(C.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(C);if(!this.handle){return false}A(B.iframeFix===true?"iframe":B.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")});return true},_mouseStart:function(C){var B=this.options;this.helper=this._createHelper(C);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:C.pageX-this.offset.left,top:C.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(C);this.originalPageX=C.pageX;this.originalPageY=C.pageY;B.cursorAt&&this._adjustOffsetFromHelper(B.cursorAt);B.containment&&this._setContainment();if(this._trigger("start",C)===false){this._clear();return false}this._cacheHelperProportions();A.ui.ddmanager&&!B.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,C);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(C,true);A.ui.ddmanager&&A.ui.ddmanager.dragStart(this,C);return true},_mouseDrag:function(C,B){this.position=this._generatePosition(C);this.positionAbs=this._convertPositionTo("absolute");if(!B){B=this._uiHash();if(this._trigger("drag",C,B)===false){this._mouseUp({});return false}this.position=B.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}A.ui.ddmanager&&A.ui.ddmanager.drag(this,C);return false},_mouseStop:function(C){var B=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){B=A.ui.ddmanager.drop(this,C)}if(this.dropped){B=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original"){return false}if(this.options.revert=="invalid"&&!B||this.options.revert=="valid"&&B||this.options.revert===true||A.isFunction(this.options.revert)&&this.options.revert.call(this.element,B)){var D=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){D._trigger("stop",C)!==false&&D._clear()})}else{this._trigger("stop",C)!==false&&this._clear()}return false},_mouseUp:function(B){this.options.iframeFix===true&&A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});A.ui.ddmanager&&A.ui.ddmanager.dragStop(this,B);return A.ui.mouse.prototype._mouseUp.call(this,B)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(C){var B=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==C.target){B=true}});return B},_createHelper:function(C){var B=this.options;C=A.isFunction(B.helper)?A(B.helper.apply(this.element[0],[C])):B.helper=="clone"?this.element.clone().removeAttr("id"):this.element;C.parents("body").length||C.appendTo(B.appendTo=="parent"?this.element[0].parentNode:B.appendTo);C[0]!=this.element[0]&&!/(fixed|absolute)/.test(C.css("position"))&&C.css("position","absolute");return C},_adjustOffsetFromHelper:function(B){if(typeof B=="string"){B=B.split(" ")}if(A.isArray(B)){B={left:+B[0],top:+B[1]||0}}if("left" in B){this.offset.click.left=B.left+this.margins.left}if("right" in B){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if("top" in B){this.offset.click.top=B.top+this.margins.top}if("bottom" in B){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0])){B.left+=this.scrollParent.scrollLeft();B.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.element.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var C=this.options;if(C.containment=="parent"){C.containment=this.helper[0].parentNode}if(C.containment=="document"||C.containment=="window"){this.containment=[C.containment=="document"?0:A(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,C.containment=="document"?0:A(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(C.containment=="document"?0:A(window).scrollLeft())+A(C.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(C.containment=="document"?0:A(window).scrollTop())+(A(C.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(C.containment)&&C.containment.constructor!=Array){C=A(C.containment);var B=C[0];if(B){C.offset();var D=A(B).css("overflow")!="hidden";this.containment=[(parseInt(A(B).css("borderLeftWidth"),10)||0)+(parseInt(A(B).css("paddingLeft"),10)||0),(parseInt(A(B).css("borderTopWidth"),10)||0)+(parseInt(A(B).css("paddingTop"),10)||0),(D?Math.max(B.scrollWidth,B.offsetWidth):B.offsetWidth)-(parseInt(A(B).css("borderLeftWidth"),10)||0)-(parseInt(A(B).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(D?Math.max(B.scrollHeight,B.offsetHeight):B.offsetHeight)-(parseInt(A(B).css("borderTopWidth"),10)||0)-(parseInt(A(B).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=C}}else{if(C.containment.constructor==Array){this.containment=C.containment}}},_convertPositionTo:function(C,B){if(!B){B=this.position}C=C=="absolute"?1:-1;var E=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,D=/(html|body)/i.test(E[0].tagName);return{top:B.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&A.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():D?0:E.scrollTop())*C),left:B.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&A.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():D?0:E.scrollLeft())*C)}},_generatePosition:function(C){var B=this.options,H=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=/(html|body)/i.test(H[0].tagName),G=C.pageX,D=C.pageY;if(this.originalPosition){var E;if(this.containment){if(this.relative_container){E=this.relative_container.offset();E=[this.containment[0]+E.left,this.containment[1]+E.top,this.containment[2]+E.left,this.containment[3]+E.top]}else{E=this.containment}if(C.pageX-this.offset.click.left<E[0]){G=E[0]+this.offset.click.left}if(C.pageY-this.offset.click.top<E[1]){D=E[1]+this.offset.click.top}if(C.pageX-this.offset.click.left>E[2]){G=E[2]+this.offset.click.left}if(C.pageY-this.offset.click.top>E[3]){D=E[3]+this.offset.click.top}}if(B.grid){D=B.grid[1]?this.originalPageY+Math.round((D-this.originalPageY)/B.grid[1])*B.grid[1]:this.originalPageY;D=E?!(D-this.offset.click.top<E[1]||D-this.offset.click.top>E[3])?D:!(D-this.offset.click.top<E[1])?D-B.grid[1]:D+B.grid[1]:D;G=B.grid[0]?this.originalPageX+Math.round((G-this.originalPageX)/B.grid[0])*B.grid[0]:this.originalPageX;G=E?!(G-this.offset.click.left<E[0]||G-this.offset.click.left>E[2])?G:!(G-this.offset.click.left<E[0])?G-B.grid[0]:G+B.grid[0]:G}}return{top:D-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&A.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():F?0:H.scrollTop()),left:G-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&A.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:H.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(C,B,D){D=D||this._uiHash();A.ui.plugin.call(this,C,[B,D]);if(C=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return A.Widget.prototype._trigger.call(this,C,B,D)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});A.extend(A.ui.draggable,{version:"1.8.14"});A.ui.plugin.add("draggable","connectToSortable",{start:function(C,B){var F=A(this).data("draggable"),D=F.options,E=A.extend({},B,{item:F.element});F.sortables=[];A(D.connectToSortable).each(function(){var G=A.data(this,"sortable");if(G&&!G.options.disabled){F.sortables.push({instance:G,shouldRevert:G.options.revert});G.refreshPositions();G._trigger("activate",C,E)}})},stop:function(C,B){var E=A(this).data("draggable"),D=A.extend({},B,{item:E.element});A.each(E.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;E.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(C);this.instance.options.helper=this.instance.options._helper;E.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",C,D)}})},drag:function(C,B){var E=A(this).data("draggable"),D=this;A.each(E.sortables,function(){this.instance.positionAbs=E.positionAbs;this.instance.helperProportions=E.helperProportions;this.instance.offset.click=E.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(D).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return B.helper[0]};C.target=this.instance.currentItem[0];this.instance._mouseCapture(C,true);this.instance._mouseStart(C,true,true);this.instance.offset.click.top=E.offset.click.top;this.instance.offset.click.left=E.offset.click.left;this.instance.offset.parent.left-=E.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=E.offset.parent.top-this.instance.offset.parent.top;E._trigger("toSortable",C);E.dropped=this.instance.element;E.currentItem=E.element;this.instance.fromOutside=E}this.instance.currentItem&&this.instance._mouseDrag(C)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",C,this.instance._uiHash(this.instance));this.instance._mouseStop(C,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();E._trigger("fromSortable",C);E.dropped=false}}})}});A.ui.plugin.add("draggable","cursor",{start:function(){var C=A("body"),B=A(this).data("draggable").options;if(C.css("cursor")){B._cursor=C.css("cursor")}C.css("cursor",B.cursor)},stop:function(){var B=A(this).data("draggable").options;B._cursor&&A("body").css("cursor",B._cursor)}});A.ui.plugin.add("draggable","opacity",{start:function(C,B){C=A(B.helper);B=A(this).data("draggable").options;if(C.css("opacity")){B._opacity=C.css("opacity")}C.css("opacity",B.opacity)},stop:function(C,B){C=A(this).data("draggable").options;C._opacity&&A(B.helper).css("opacity",C._opacity)}});A.ui.plugin.add("draggable","scroll",{start:function(){var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(C){var B=A(this).data("draggable"),E=B.options,D=false;if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){if(!E.axis||E.axis!="x"){if(B.overflowOffset.top+B.scrollParent[0].offsetHeight-C.pageY<E.scrollSensitivity){B.scrollParent[0].scrollTop=D=B.scrollParent[0].scrollTop+E.scrollSpeed}else{if(C.pageY-B.overflowOffset.top<E.scrollSensitivity){B.scrollParent[0].scrollTop=D=B.scrollParent[0].scrollTop-E.scrollSpeed}}}if(!E.axis||E.axis!="y"){if(B.overflowOffset.left+B.scrollParent[0].offsetWidth-C.pageX<E.scrollSensitivity){B.scrollParent[0].scrollLeft=D=B.scrollParent[0].scrollLeft+E.scrollSpeed}else{if(C.pageX-B.overflowOffset.left<E.scrollSensitivity){B.scrollParent[0].scrollLeft=D=B.scrollParent[0].scrollLeft-E.scrollSpeed}}}}else{if(!E.axis||E.axis!="x"){if(C.pageY-A(document).scrollTop()<E.scrollSensitivity){D=A(document).scrollTop(A(document).scrollTop()-E.scrollSpeed)}else{if(A(window).height()-(C.pageY-A(document).scrollTop())<E.scrollSensitivity){D=A(document).scrollTop(A(document).scrollTop()+E.scrollSpeed)}}}if(!E.axis||E.axis!="y"){if(C.pageX-A(document).scrollLeft()<E.scrollSensitivity){D=A(document).scrollLeft(A(document).scrollLeft()-E.scrollSpeed)}else{if(A(window).width()-(C.pageX-A(document).scrollLeft())<E.scrollSensitivity){D=A(document).scrollLeft(A(document).scrollLeft()+E.scrollSpeed)}}}}D!==false&&A.ui.ddmanager&&!E.dropBehaviour&&A.ui.ddmanager.prepareOffsets(B,C)}});A.ui.plugin.add("draggable","snap",{start:function(){var C=A(this).data("draggable"),B=C.options;C.snapElements=[];A(B.snap.constructor!=String?B.snap.items||":data(draggable)":B.snap).each(function(){var E=A(this),D=E.offset();this!=C.element[0]&&C.snapElements.push({item:this,width:E.outerWidth(),height:E.outerHeight(),top:D.top,left:D.left})})},drag:function(T,S){for(var R=A(this).data("draggable"),P=R.options,Q=P.snapTolerance,N=S.offset.left,O=N+R.helperProportions.width,H=S.offset.top,G=H+R.helperProportions.height,M=R.snapElements.length-1;M>=0;M--){var L=R.snapElements[M].left,J=L+R.snapElements[M].width,K=R.snapElements[M].top,I=K+R.snapElements[M].height;if(L-Q<N&&N<J+Q&&K-Q<H&&H<I+Q||L-Q<N&&N<J+Q&&K-Q<G&&G<I+Q||L-Q<O&&O<J+Q&&K-Q<H&&H<I+Q||L-Q<O&&O<J+Q&&K-Q<G&&G<I+Q){if(P.snapMode!="inner"){var F=Math.abs(K-G)<=Q,E=Math.abs(I-H)<=Q,D=Math.abs(L-O)<=Q,C=Math.abs(J-N)<=Q;if(F){S.position.top=R._convertPositionTo("relative",{top:K-R.helperProportions.height,left:0}).top-R.margins.top}if(E){S.position.top=R._convertPositionTo("relative",{top:I,left:0}).top-R.margins.top}if(D){S.position.left=R._convertPositionTo("relative",{top:0,left:L-R.helperProportions.width}).left-R.margins.left}if(C){S.position.left=R._convertPositionTo("relative",{top:0,left:J}).left-R.margins.left}}var B=F||E||D||C;if(P.snapMode!="outer"){F=Math.abs(K-H)<=Q;E=Math.abs(I-G)<=Q;D=Math.abs(L-N)<=Q;C=Math.abs(J-O)<=Q;if(F){S.position.top=R._convertPositionTo("relative",{top:K,left:0}).top-R.margins.top}if(E){S.position.top=R._convertPositionTo("relative",{top:I-R.helperProportions.height,left:0}).top-R.margins.top}if(D){S.position.left=R._convertPositionTo("relative",{top:0,left:L}).left-R.margins.left}if(C){S.position.left=R._convertPositionTo("relative",{top:0,left:J-R.helperProportions.width}).left-R.margins.left}}if(!R.snapElements[M].snapping&&(F||E||D||C||B)){R.options.snap.snap&&R.options.snap.snap.call(R.element,T,A.extend(R._uiHash(),{snapItem:R.snapElements[M].item}))}R.snapElements[M].snapping=F||E||D||C||B}else{R.snapElements[M].snapping&&R.options.snap.release&&R.options.snap.release.call(R.element,T,A.extend(R._uiHash(),{snapItem:R.snapElements[M].item}));R.snapElements[M].snapping=false}}}});A.ui.plugin.add("draggable","stack",{start:function(){var C=A(this).data("draggable").options;C=A.makeArray(A(C.stack)).sort(function(E,D){return(parseInt(A(E).css("zIndex"),10)||0)-(parseInt(A(D).css("zIndex"),10)||0)});if(C.length){var B=parseInt(C[0].style.zIndex)||0;A(C).each(function(D){this.style.zIndex=B+D});this[0].style.zIndex=B+C.length}}});A.ui.plugin.add("draggable","zIndex",{start:function(C,B){C=A(B.helper);B=A(this).data("draggable").options;if(C.css("zIndex")){B._zIndex=C.css("zIndex")}C.css("zIndex",B.zIndex)},stop:function(C,B){C=A(this).data("draggable").options;C._zIndex&&A(B.helper).css("zIndex",C._zIndex)}})})(jQuery);(function(A){A.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var C=this.options,B=C.accept;this.isover=0;this.isout=1;this.accept=A.isFunction(B)?B:function(D){return D.is(B)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};A.ui.ddmanager.droppables[C.scope]=A.ui.ddmanager.droppables[C.scope]||[];A.ui.ddmanager.droppables[C.scope].push(this);C.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var C=A.ui.ddmanager.droppables[this.options.scope],B=0;B<C.length;B++){C[B]==this&&C.splice(B,1)}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(C,B){if(C=="accept"){this.accept=A.isFunction(B)?B:function(D){return D.is(B)}}A.Widget.prototype._setOption.apply(this,arguments)},_activate:function(C){var B=A.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);B&&this._trigger("activate",C,this.ui(B))},_deactivate:function(C){var B=A.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);B&&this._trigger("deactivate",C,this.ui(B))},_over:function(C){var B=A.ui.ddmanager.current;if(!(!B||(B.currentItem||B.element)[0]==this.element[0])){if(this.accept.call(this.element[0],B.currentItem||B.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);this._trigger("over",C,this.ui(B))}}},_out:function(C){var B=A.ui.ddmanager.current;if(!(!B||(B.currentItem||B.element)[0]==this.element[0])){if(this.accept.call(this.element[0],B.currentItem||B.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",C,this.ui(B))}}},_drop:function(C,B){var E=B||A.ui.ddmanager.current;if(!E||(E.currentItem||E.element)[0]==this.element[0]){return false}var D=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&!F.options.disabled&&F.options.scope==E.options.scope&&F.accept.call(F.element[0],E.currentItem||E.element)&&A.ui.intersect(E,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){D=true;return false}});if(D){return false}if(this.accept.call(this.element[0],E.currentItem||E.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",C,this.ui(E));return this.element}return false},ui:function(B){return{draggable:B.currentItem||B.element,helper:B.helper,position:B.position,offset:B.positionAbs}}});A.extend(A.ui.droppable,{version:"1.8.14"});A.ui.intersect=function(L,K,J){if(!K.offset){return false}var I=(L.positionAbs||L.position.absolute).left,G=I+L.helperProportions.width,H=(L.positionAbs||L.position.absolute).top,F=H+L.helperProportions.height,E=K.offset.left,C=E+K.proportions.width,D=K.offset.top,B=D+K.proportions.height;switch(J){case"fit":return E<=I&&G<=C&&D<=H&&F<=B;case"intersect":return E<I+L.helperProportions.width/2&&G-L.helperProportions.width/2<C&&D<H+L.helperProportions.height/2&&F-L.helperProportions.height/2<B;case"pointer":return A.ui.isOver((L.positionAbs||L.position.absolute).top+(L.clickOffset||L.offset.click).top,(L.positionAbs||L.position.absolute).left+(L.clickOffset||L.offset.click).left,D,E,K.proportions.height,K.proportions.width);case"touch":return(H>=D&&H<=B||F>=D&&F<=B||H<D&&F>B)&&(I>=E&&I<=C||G>=E&&G<=C||I<E&&G>C);default:return false}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(C,B){var H=A.ui.ddmanager.droppables[C.options.scope]||[],G=B?B.type:null,E=(C.currentItem||C.element).find(":data(droppable)").andSelf(),F=0;C:for(;F<H.length;F++){if(!(H[F].options.disabled||C&&!H[F].accept.call(H[F].element[0],C.currentItem||C.element))){for(var D=0;D<E.length;D++){if(E[D]==H[F].element[0]){H[F].proportions.height=0;continue C}}H[F].visible=H[F].element.css("display")!="none";if(H[F].visible){G=="mousedown"&&H[F]._activate.call(H[F],B);H[F].offset=H[F].element.offset();H[F].proportions={width:H[F].element[0].offsetWidth,height:H[F].element[0].offsetHeight}}}}},drop:function(C,B){var D=false;A.each(A.ui.ddmanager.droppables[C.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&A.ui.intersect(C,this,this.options.tolerance)){D=D||this._drop.call(this,B)}if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],C.currentItem||C.element)){this.isout=1;this.isover=0;this._deactivate.call(this,B)}}});return D},dragStart:function(C,B){C.element.parentsUntil("body").bind("scroll.droppable",function(){C.options.refreshPositions||A.ui.ddmanager.prepareOffsets(C,B)})},drag:function(C,B){C.options.refreshPositions&&A.ui.ddmanager.prepareOffsets(C,B);A.each(A.ui.ddmanager.droppables[C.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var F=A.ui.intersect(C,this,this.options.tolerance);if(F=!F&&this.isover==1?"isout":F&&this.isover==0?"isover":null){var E;if(this.options.greedy){var D=this.element.parents(":data(droppable):eq(0)");if(D.length){E=A.data(D[0],"droppable");E.greedyChild=F=="isover"?1:0}}if(E&&F=="isover"){E.isover=0;E.isout=1;E._out.call(E,B)}this[F]=1;this[F=="isout"?"isover":"isout"]=0;this[F=="isover"?"_over":"_out"].call(this,B);if(E&&F=="isout"){E.isout=0;E.isover=1;E._over.call(E,B)}}}})},dragStop:function(C,B){C.element.parentsUntil("body").unbind("scroll.droppable");C.options.refreshPositions||A.ui.ddmanager.prepareOffsets(C,B)}}})(jQuery);(function(C){C.widget("ui.resizable",C.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var D=this,E=this.options;this.element.addClass("ui-resizable");C.extend(this,{_aspectRatio:!!E.aspectRatio,aspectRatio:E.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:E.helper||E.ghost||E.animate?E.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&C.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(C('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=E.handles||(!C(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var I=this.handles.split(",");this.handles={};for(var H=0;H<I.length;H++){var G=C.trim(I[H]),F=C('<div class="ui-resizable-handle '+("ui-resizable-"+G)+'"></div>');/sw|se|ne|nw/.test(G)&&F.css({zIndex:++E.zIndex});"se"==G&&F.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[G]=".ui-resizable-"+G;this.element.append(F)}}this._renderAxis=function(M){M=M||this.element;for(var L in this.handles){if(this.handles[L].constructor==String){this.handles[L]=C(this.handles[L],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var K=C(this.handles[L],this.element),J=0;J=/sw|ne|nw|se|n|s/.test(L)?K.outerHeight():K.outerWidth();K=["padding",/ne|nw|n/.test(L)?"Top":/se|sw|s/.test(L)?"Bottom":/^e$/.test(L)?"Right":"Left"].join("");M.css(K,J);this._proportionallyResize()}C(this.handles[L])}};this._renderAxis(this.element);this._handles=C(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!D.resizing){if(this.className){var J=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}D.axis=J&&J[1]?J[1]:"se"}});if(E.autoHide){this._handles.hide();C(this.element).addClass("ui-resizable-autohide").hover(function(){if(!E.disabled){C(this).removeClass("ui-resizable-autohide");D._handles.show()}},function(){if(!E.disabled){if(!D.resizing){C(this).addClass("ui-resizable-autohide");D._handles.hide()}}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var D=function(F){C(F).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){D(this.element);var E=this.element;E.after(this.originalElement.css({position:E.css("position"),width:E.outerWidth(),height:E.outerHeight(),top:E.css("top"),left:E.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);D(this.originalElement);return this},_mouseCapture:function(D){var E=false;for(var F in this.handles){if(C(this.handles[F])[0]==D.target){E=true}}return !this.options.disabled&&E},_mouseStart:function(D){var E=this.options,H=this.element.position(),G=this.element;this.resizing=true;this.documentScroll={top:C(document).scrollTop(),left:C(document).scrollLeft()};if(G.is(".ui-draggable")||/absolute/.test(G.css("position"))){G.css({position:"absolute",top:H.top,left:H.left})}C.browser.opera&&/relative/.test(G.css("position"))&&G.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();H=A(this.helper.css("left"));var F=A(this.helper.css("top"));if(E.containment){H+=C(E.containment).scrollLeft()||0;F+=C(E.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:H,top:F};this.size=this._helper?{width:G.outerWidth(),height:G.outerHeight()}:{width:G.width(),height:G.height()};this.originalSize=this._helper?{width:G.outerWidth(),height:G.outerHeight()}:{width:G.width(),height:G.height()};this.originalPosition={left:H,top:F};this.sizeDiff={width:G.outerWidth()-G.width(),height:G.outerHeight()-G.height()};this.originalMousePosition={left:D.pageX,top:D.pageY};this.aspectRatio=typeof E.aspectRatio=="number"?E.aspectRatio:this.originalSize.width/this.originalSize.height||1;E=C(".ui-resizable-"+this.axis).css("cursor");C("body").css("cursor",E=="auto"?this.axis+"-resize":E);G.addClass("ui-resizable-resizing");this._propagate("start",D);return true},_mouseDrag:function(D){var E=this.helper,G=this.originalMousePosition,F=this._change[this.axis];if(!F){return false}G=F.apply(this,[D,D.pageX-G.left||0,D.pageY-G.top||0]);this._updateVirtualBoundaries(D.shiftKey);if(this._aspectRatio||D.shiftKey){G=this._updateRatio(G,D)}G=this._respectSize(G,D);this._propagate("resize",D);E.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(G);this._trigger("resize",D,this.ui());return false},_mouseStop:function(D){this.resizing=false;var E=this.options,I=this;if(this._helper){var H=this._proportionallyResizeElements,G=H.length&&/textarea/i.test(H[0].nodeName);H=G&&C.ui.hasScroll(H[0],"left")?0:I.sizeDiff.height;G=G?0:I.sizeDiff.width;G={width:I.helper.width()-G,height:I.helper.height()-H};H=parseInt(I.element.css("left"),10)+(I.position.left-I.originalPosition.left)||null;var F=parseInt(I.element.css("top"),10)+(I.position.top-I.originalPosition.top)||null;E.animate||this.element.css(C.extend(G,{top:F,left:H}));I.helper.height(I.size.height);I.helper.width(I.size.width);this._helper&&!E.animate&&this._proportionallyResize()}C("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",D);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(D){var E=this.options,H,G,F;E={minWidth:B(E.minWidth)?E.minWidth:0,maxWidth:B(E.maxWidth)?E.maxWidth:Infinity,minHeight:B(E.minHeight)?E.minHeight:0,maxHeight:B(E.maxHeight)?E.maxHeight:Infinity};if(this._aspectRatio||D){D=E.minHeight*this.aspectRatio;G=E.minWidth/this.aspectRatio;H=E.maxHeight*this.aspectRatio;F=E.maxWidth/this.aspectRatio;if(D>E.minWidth){E.minWidth=D}if(G>E.minHeight){E.minHeight=G}if(H<E.maxWidth){E.maxWidth=H}if(F<E.maxHeight){E.maxHeight=F}}this._vBoundaries=E},_updateCache:function(D){this.offset=this.helper.offset();if(B(D.left)){this.position.left=D.left}if(B(D.top)){this.position.top=D.top}if(B(D.height)){this.size.height=D.height}if(B(D.width)){this.size.width=D.width}},_updateRatio:function(D){var E=this.position,G=this.size,F=this.axis;if(B(D.height)){D.width=D.height*this.aspectRatio}else{if(B(D.width)){D.height=D.width/this.aspectRatio}}if(F=="sw"){D.left=E.left+(G.width-D.width);D.top=null}if(F=="nw"){D.top=E.top+(G.height-D.height);D.left=E.left+(G.width-D.width)}return D},_respectSize:function(L){var M=this._vBoundaries,K=this.axis,J=B(L.width)&&M.maxWidth&&M.maxWidth<L.width,I=B(L.height)&&M.maxHeight&&M.maxHeight<L.height,H=B(L.width)&&M.minWidth&&M.minWidth>L.width,G=B(L.height)&&M.minHeight&&M.minHeight>L.height;if(H){L.width=M.minWidth}if(G){L.height=M.minHeight}if(J){L.width=M.maxWidth}if(I){L.height=M.maxHeight}var F=this.originalPosition.left+this.originalSize.width,E=this.position.top+this.size.height,D=/sw|nw|w/.test(K);K=/nw|ne|n/.test(K);if(H&&D){L.left=F-M.minWidth}if(J&&D){L.left=F-M.maxWidth}if(G&&K){L.top=E-M.minHeight}if(I&&K){L.top=E-M.maxHeight}if((M=!L.width&&!L.height)&&!L.left&&L.top){L.top=null}else{if(M&&!L.top&&L.left){L.left=null}}return L},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){for(var D=this.helper||this.element,E=0;E<this._proportionallyResizeElements.length;E++){var H=this._proportionallyResizeElements[E];if(!this.borderDif){var G=[H.css("borderTopWidth"),H.css("borderRightWidth"),H.css("borderBottomWidth"),H.css("borderLeftWidth")],F=[H.css("paddingTop"),H.css("paddingRight"),H.css("paddingBottom"),H.css("paddingLeft")];this.borderDif=C.map(G,function(J,I){J=parseInt(J,10)||0;I=parseInt(F[I],10)||0;return J+I})}C.browser.msie&&(C(D).is(":hidden")||C(D).parents(":hidden").length)||H.css({height:D.height()-this.borderDif[0]-this.borderDif[2]||0,width:D.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var D=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||C('<div style="overflow:hidden;"></div>');var E=C.browser.msie&&C.browser.version<7,F=E?1:0;E=E?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+E,height:this.element.outerHeight()+E,position:"absolute",left:this.elementOffset.left-F+"px",top:this.elementOffset.top-F+"px",zIndex:++D.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(D,E){return{width:this.originalSize.width+E}},w:function(D,E){return{left:this.originalPosition.left+E,width:this.originalSize.width-E}},n:function(D,E,F){return{top:this.originalPosition.top+F,height:this.originalSize.height-F}},s:function(D,E,F){return{height:this.originalSize.height+F}},se:function(D,E,F){return C.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[D,E,F]))},sw:function(D,E,F){return C.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[D,E,F]))},ne:function(D,E,F){return C.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[D,E,F]))},nw:function(D,E,F){return C.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[D,E,F]))}},_propagate:function(D,E){C.ui.plugin.call(this,D,[E,this.ui()]);D!="resize"&&this._trigger(D,E,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});C.extend(C.ui.resizable,{version:"1.8.14"});C.ui.plugin.add("resizable","alsoResize",{start:function(){var D=C(this).data("resizable").options,E=function(F){C(F).each(function(){var G=C(this);G.data("resizable-alsoresize",{width:parseInt(G.width(),10),height:parseInt(G.height(),10),left:parseInt(G.css("left"),10),top:parseInt(G.css("top"),10),position:G.css("position")})})};if(typeof D.alsoResize=="object"&&!D.alsoResize.parentNode){if(D.alsoResize.length){D.alsoResize=D.alsoResize[0];E(D.alsoResize)}else{C.each(D.alsoResize,function(F){E(F)})}}else{E(D.alsoResize)}},resize:function(D,E){var J=C(this).data("resizable");D=J.options;var I=J.originalSize,H=J.originalPosition,G={height:J.size.height-I.height||0,width:J.size.width-I.width||0,top:J.position.top-H.top||0,left:J.position.left-H.left||0},F=function(L,K){C(L).each(function(){var M=C(this),O=C(this).data("resizable-alsoresize"),P={},N=K&&K.length?K:M.parents(E.originalElement[0]).length?["width","height"]:["width","height","top","left"];C.each(N,function(R,Q){if((R=(O[Q]||0)+(G[Q]||0))&&R>=0){P[Q]=R||null}});if(C.browser.opera&&/relative/.test(M.css("position"))){J._revertToRelativePosition=true;M.css({position:"absolute",top:"auto",left:"auto"})}M.css(P)})};typeof D.alsoResize=="object"&&!D.alsoResize.nodeType?C.each(D.alsoResize,function(L,K){F(L,K)}):F(D.alsoResize)},stop:function(){var D=C(this).data("resizable"),E=D.options,F=function(G){C(G).each(function(){var H=C(this);H.css({position:H.data("resizable-alsoresize").position})})};if(D._revertToRelativePosition){D._revertToRelativePosition=false;typeof E.alsoResize=="object"&&!E.alsoResize.nodeType?C.each(E.alsoResize,function(G){F(G)}):F(E.alsoResize)}C(this).removeData("resizable-alsoresize")}});C.ui.plugin.add("resizable","animate",{stop:function(D){var E=C(this).data("resizable"),J=E.options,I=E._proportionallyResizeElements,H=I.length&&/textarea/i.test(I[0].nodeName),G=H&&C.ui.hasScroll(I[0],"left")?0:E.sizeDiff.height;H={width:E.size.width-(H?0:E.sizeDiff.width),height:E.size.height-G};G=parseInt(E.element.css("left"),10)+(E.position.left-E.originalPosition.left)||null;var F=parseInt(E.element.css("top"),10)+(E.position.top-E.originalPosition.top)||null;E.element.animate(C.extend(H,F&&G?{top:F,left:G}:{}),{duration:J.animateDuration,easing:J.animateEasing,step:function(){var K={width:parseInt(E.element.css("width"),10),height:parseInt(E.element.css("height"),10),top:parseInt(E.element.css("top"),10),left:parseInt(E.element.css("left"),10)};I&&I.length&&C(I[0]).css({width:K.width,height:K.height});E._updateCache(K);E._propagate("resize",D)}})}});C.ui.plugin.add("resizable","containment",{start:function(){var D=C(this).data("resizable"),E=D.element,J=D.options.containment;if(E=J instanceof C?J.get(0):/parent/.test(J)?E.parent().get(0):J){D.containerElement=C(E);if(/document/.test(J)||J==document){D.containerOffset={left:0,top:0};D.containerPosition={left:0,top:0};D.parentData={element:C(document),left:0,top:0,width:C(document).width(),height:C(document).height()||document.body.parentNode.scrollHeight}}else{var I=C(E),H=[];C(["Top","Right","Left","Bottom"]).each(function(L,K){H[L]=A(I.css("padding"+K))});D.containerOffset=I.offset();D.containerPosition=I.position();D.containerSize={height:I.innerHeight()-H[3],width:I.innerWidth()-H[1]};J=D.containerOffset;var G=D.containerSize.height,F=D.containerSize.width;F=C.ui.hasScroll(E,"left")?E.scrollWidth:F;G=C.ui.hasScroll(E)?E.scrollHeight:G;D.parentData={element:E,left:J.left,top:J.top,width:F,height:G}}}},resize:function(D){var E=C(this).data("resizable"),J=E.options,I=E.containerOffset,H=E.position;D=E._aspectRatio||D.shiftKey;var G={top:0,left:0},F=E.containerElement;if(F[0]!=document&&/static/.test(F.css("position"))){G=I}if(H.left<(E._helper?I.left:0)){E.size.width+=E._helper?E.position.left-I.left:E.position.left-G.left;if(D){E.size.height=E.size.width/J.aspectRatio}E.position.left=J.helper?I.left:0}if(H.top<(E._helper?I.top:0)){E.size.height+=E._helper?E.position.top-I.top:E.position.top;if(D){E.size.width=E.size.height*J.aspectRatio}E.position.top=E._helper?I.top:0}E.offset.left=E.parentData.left+E.position.left;E.offset.top=E.parentData.top+E.position.top;J=Math.abs((E._helper?E.offset.left-G.left:E.offset.left-G.left)+E.sizeDiff.width);I=Math.abs((E._helper?E.offset.top-G.top:E.offset.top-I.top)+E.sizeDiff.height);H=E.containerElement.get(0)==E.element.parent().get(0);G=/relative|absolute/.test(E.containerElement.css("position"));if(H&&G){J-=E.parentData.left}if(J+E.size.width>=E.parentData.width){E.size.width=E.parentData.width-J;if(D){E.size.height=E.size.width/E.aspectRatio}}if(I+E.size.height>=E.parentData.height){E.size.height=E.parentData.height-I;if(D){E.size.width=E.size.height*E.aspectRatio}}},stop:function(){var D=C(this).data("resizable"),E=D.options,K=D.containerOffset,J=D.containerPosition,I=D.containerElement,H=C(D.helper),G=H.offset(),F=H.outerWidth()-D.sizeDiff.width;H=H.outerHeight()-D.sizeDiff.height;D._helper&&!E.animate&&/relative/.test(I.css("position"))&&C(this).css({left:G.left-J.left-K.left,width:F,height:H});D._helper&&!E.animate&&/static/.test(I.css("position"))&&C(this).css({left:G.left-J.left-K.left,width:F,height:H})}});C.ui.plugin.add("resizable","ghost",{start:function(){var D=C(this).data("resizable"),E=D.options,F=D.size;D.ghost=D.originalElement.clone();D.ghost.css({opacity:0.25,display:"block",position:"relative",height:F.height,width:F.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof E.ghost=="string"?E.ghost:"");D.ghost.appendTo(D.helper)},resize:function(){var D=C(this).data("resizable");D.ghost&&D.ghost.css({position:"relative",height:D.size.height,width:D.size.width})},stop:function(){var D=C(this).data("resizable");D.ghost&&D.helper&&D.helper.get(0).removeChild(D.ghost.get(0))}});C.ui.plugin.add("resizable","grid",{resize:function(){var D=C(this).data("resizable"),E=D.options,J=D.size,I=D.originalSize,H=D.originalPosition,G=D.axis;E.grid=typeof E.grid=="number"?[E.grid,E.grid]:E.grid;var F=Math.round((J.width-I.width)/(E.grid[0]||1))*(E.grid[0]||1);E=Math.round((J.height-I.height)/(E.grid[1]||1))*(E.grid[1]||1);if(/^(se|s|e)$/.test(G)){D.size.width=I.width+F;D.size.height=I.height+E}else{if(/^(ne)$/.test(G)){D.size.width=I.width+F;D.size.height=I.height+E;D.position.top=H.top-E}else{if(/^(sw)$/.test(G)){D.size.width=I.width+F;D.size.height=I.height+E}else{D.size.width=I.width+F;D.size.height=I.height+E;D.position.top=H.top-E}D.position.left=H.left-F}}}});var A=function(D){return parseInt(D,10)||0},B=function(D){return !isNaN(parseInt(D,10))}})(jQuery);(function(A){A.widget("ui.selectable",A.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var C=this;this.element.addClass("ui-selectable");this.dragged=false;var B;this.refresh=function(){B=A(C.options.filter,C.element[0]);B.each(function(){var E=A(this),D=E.offset();A.data(this,"selectable-item",{element:this,$element:E,left:D.left,top:D.top,right:D.left+E.outerWidth(),bottom:D.top+E.outerHeight(),startselected:false,selected:E.hasClass("ui-selected"),selecting:E.hasClass("ui-selecting"),unselecting:E.hasClass("ui-unselecting")})})};this.refresh();this.selectees=B.addClass("ui-selectee");this._mouseInit();this.helper=A("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(D){var B=this;this.opos=[D.pageX,D.pageY];if(!this.options.disabled){var C=this.options;this.selectees=A(C.filter,this.element[0]);this._trigger("start",D);A(C.appendTo).append(this.helper);this.helper.css({left:D.clientX,top:D.clientY,width:0,height:0});C.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var E=A.data(this,"selectable-item");E.startselected=true;if(!D.metaKey){E.$element.removeClass("ui-selected");E.selected=false;E.$element.addClass("ui-unselecting");E.unselecting=true;B._trigger("unselecting",D,{unselecting:E.element})}});A(D.target).parents().andSelf().each(function(){var E=A.data(this,"selectable-item");if(E){var F=!D.metaKey||!E.$element.hasClass("ui-selected");E.$element.removeClass(F?"ui-unselecting":"ui-selected").addClass(F?"ui-selecting":"ui-unselecting");E.unselecting=!F;E.selecting=F;(E.selected=F)?B._trigger("selecting",D,{selecting:E.element}):B._trigger("unselecting",D,{unselecting:E.element});return false}})}},_mouseDrag:function(I){var G=this;this.dragged=true;if(!this.options.disabled){var H=this.options,B=this.opos[0],F=this.opos[1],E=I.pageX,D=I.pageY;if(B>E){var C=E;E=B;B=C}if(F>D){C=D;D=F;F=C}this.helper.css({left:B,top:F,width:E-B,height:D-F});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!(!J||J.element==G.element[0])){var K=false;if(H.tolerance=="touch"){K=!(J.left>E||J.right<B||J.top>D||J.bottom<F)}else{if(H.tolerance=="fit"){K=J.left>B&&J.right<E&&J.top>F&&J.bottom<D}}if(K){if(J.selected){J.$element.removeClass("ui-selected");J.selected=false}if(J.unselecting){J.$element.removeClass("ui-unselecting");J.unselecting=false}if(!J.selecting){J.$element.addClass("ui-selecting");J.selecting=true;G._trigger("selecting",I,{selecting:J.element})}}else{if(J.selecting){if(I.metaKey&&J.startselected){J.$element.removeClass("ui-selecting");J.selecting=false;J.$element.addClass("ui-selected");J.selected=true}else{J.$element.removeClass("ui-selecting");J.selecting=false;if(J.startselected){J.$element.addClass("ui-unselecting");J.unselecting=true}G._trigger("unselecting",I,{unselecting:J.element})}}if(J.selected){if(!I.metaKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;G._trigger("unselecting",I,{unselecting:J.element})}}}}});return false}},_mouseStop:function(C){var B=this;this.dragged=false;A(".ui-unselecting",this.element[0]).each(function(){var D=A.data(this,"selectable-item");D.$element.removeClass("ui-unselecting");D.unselecting=false;D.startselected=false;B._trigger("unselected",C,{unselected:D.element})});A(".ui-selecting",this.element[0]).each(function(){var D=A.data(this,"selectable-item");D.$element.removeClass("ui-selecting").addClass("ui-selected");D.selecting=false;D.selected=true;D.startselected=true;B._trigger("selected",C,{selected:D.element})});this._trigger("stop",C);this.helper.remove();return false}});A.extend(A.ui.selectable,{version:"1.8.14"})})(jQuery);(function(A){A.widget("ui.sortable",A.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000},_create:function(){var B=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?B.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var B=this.items.length-1;B>=0;B--){this.items[B].item.removeData("sortable-item")}return this},_setOption:function(C,B){if(C==="disabled"){this.options[C]=B;this.widget()[B?"addClass":"removeClass"]("ui-sortable-disabled")}else{A.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(C,B){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(C);var F=null,E=this;A(C.target).parents().each(function(){if(A.data(this,"sortable-item")==E){F=A(this);return false}});if(A.data(C.target,"sortable-item")==E){F=A(C.target)}if(!F){return false}if(this.options.handle&&!B){var D=false;A(this.options.handle,F).find("*").andSelf().each(function(){if(this==C.target){D=true}});if(!D){return false}}this.currentItem=F;this._removeCurrentsFromItems();return true},_mouseStart:function(C,B,E){B=this.options;var D=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(C);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");A.extend(this.offset,{click:{left:C.pageX-this.offset.left,top:C.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(C);this.originalPageX=C.pageX;this.originalPageY=C.pageY;B.cursorAt&&this._adjustOffsetFromHelper(B.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();B.containment&&this._setContainment();if(B.cursor){if(A("body").css("cursor")){this._storedCursor=A("body").css("cursor")}A("body").css("cursor",B.cursor)}if(B.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",B.opacity)}if(B.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",B.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",C,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!E){for(E=this.containers.length-1;E>=0;E--){this.containers[E]._trigger("activate",C,D._uiHash(this))}}if(A.ui.ddmanager){A.ui.ddmanager.current=this}A.ui.ddmanager&&!B.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,C);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(C);return true},_mouseDrag:function(C){this.position=this._generatePosition(C);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var B=this.options,F=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-C.pageY<B.scrollSensitivity){this.scrollParent[0].scrollTop=F=this.scrollParent[0].scrollTop+B.scrollSpeed}else{if(C.pageY-this.overflowOffset.top<B.scrollSensitivity){this.scrollParent[0].scrollTop=F=this.scrollParent[0].scrollTop-B.scrollSpeed}}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-C.pageX<B.scrollSensitivity){this.scrollParent[0].scrollLeft=F=this.scrollParent[0].scrollLeft+B.scrollSpeed}else{if(C.pageX-this.overflowOffset.left<B.scrollSensitivity){this.scrollParent[0].scrollLeft=F=this.scrollParent[0].scrollLeft-B.scrollSpeed}}}else{if(C.pageY-A(document).scrollTop()<B.scrollSensitivity){F=A(document).scrollTop(A(document).scrollTop()-B.scrollSpeed)}else{if(A(window).height()-(C.pageY-A(document).scrollTop())<B.scrollSensitivity){F=A(document).scrollTop(A(document).scrollTop()+B.scrollSpeed)}}if(C.pageX-A(document).scrollLeft()<B.scrollSensitivity){F=A(document).scrollLeft(A(document).scrollLeft()-B.scrollSpeed)}else{if(A(window).width()-(C.pageX-A(document).scrollLeft())<B.scrollSensitivity){F=A(document).scrollLeft(A(document).scrollLeft()+B.scrollSpeed)}}}F!==false&&A.ui.ddmanager&&!B.dropBehaviour&&A.ui.ddmanager.prepareOffsets(this,C)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(B=this.items.length-1;B>=0;B--){F=this.items[B];var E=F.item[0],D=this._intersectsWithPointer(F);if(D){if(E!=this.currentItem[0]&&this.placeholder[D==1?"next":"prev"]()[0]!=E&&!A.ui.contains(this.placeholder[0],E)&&(this.options.type=="semi-dynamic"?!A.ui.contains(this.element[0],E):true)){this.direction=D==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(F)){this._rearrange(C,F)}else{break}this._trigger("change",C,this._uiHash());break}}}this._contactContainers(C);A.ui.ddmanager&&A.ui.ddmanager.drag(this,C);this._trigger("sort",C,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(C,B){if(C){A.ui.ddmanager&&!this.options.dropBehaviour&&A.ui.ddmanager.drop(this,C);if(this.options.revert){var D=this;B=D.placeholder.offset();D.reverting=true;A(this.helper).animate({left:B.left-this.offset.parent.left-D.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:B.top-this.offset.parent.top-D.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){D._clear(C)})}else{this._clear(C,B)}return false}},cancel:function(){var C=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var B=this.containers.length-1;B>=0;B--){this.containers[B]._trigger("deactivate",null,C._uiHash(this));if(this.containers[B].containerCache.over){this.containers[B]._trigger("out",null,C._uiHash(this));this.containers[B].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();A.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?A(this.domPosition.prev).after(this.currentItem):A(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(C){var B=this._getItemsAsjQuery(C&&C.connected),D=[];C=C||{};A(B).each(function(){var E=(A(C.item||this).attr(C.attribute||"id")||"").match(C.expression||/(.+)[-=_](.+)/);if(E){D.push((C.key||E[1]+"[]")+"="+(C.key&&C.expression?E[1]:E[2]))}});!D.length&&C.key&&D.push(C.key+"=");return D.join("&")},toArray:function(C){var B=this._getItemsAsjQuery(C&&C.connected),D=[];C=C||{};B.each(function(){D.push(A(C.item||this).attr(C.attribute||"id")||"")});return D},_intersectsWith:function(L){var K=this.positionAbs.left,J=K+this.helperProportions.width,I=this.positionAbs.top,H=I+this.helperProportions.height,G=L.left,F=G+L.width,E=L.top,C=E+L.height,D=this.offset.click.top,B=this.offset.click.left;D=I+D>E&&I+D<C&&K+B>G&&K+B<F;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>L[this.floating?"width":"height"]?D:G<K+this.helperProportions.width/2&&J-this.helperProportions.width/2<F&&E<I+this.helperProportions.height/2&&H-this.helperProportions.height/2<C},_intersectsWithPointer:function(C){var B=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,C.top,C.height);C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,C.left,C.width);B=B&&C;C=this._getDragVerticalDirection();var D=this._getDragHorizontalDirection();if(!B){return false}return this.floating?D&&D=="right"||C=="down"?2:1:C&&(C=="down"?2:1)},_intersectsWithSides:function(C){var B=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,C.top+C.height/2,C.height);C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,C.left+C.width/2,C.width);var E=this._getDragVerticalDirection(),D=this._getDragHorizontalDirection();return this.floating&&D?D=="right"&&C||D=="left"&&!C:E&&(E=="down"&&B||E=="up"&&!B)},_getDragVerticalDirection:function(){var B=this.positionAbs.top-this.lastPositionAbs.top;return B!=0&&(B>0?"down":"up")},_getDragHorizontalDirection:function(){var B=this.positionAbs.left-this.lastPositionAbs.left;return B!=0&&(B>0?"right":"left")},refresh:function(B){this._refreshItems(B);this.refreshPositions();return this},_connectWith:function(){var B=this.options;return B.connectWith.constructor==String?[B.connectWith]:B.connectWith},_getItemsAsjQuery:function(C){var B=[],H=[],G=this._connectWith();if(G&&C){for(C=G.length-1;C>=0;C--){for(var F=A(G[C]),E=F.length-1;E>=0;E--){var D=A.data(F[E],"sortable");if(D&&D!=this&&!D.options.disabled){H.push([A.isFunction(D.options.items)?D.options.items.call(D.element):A(D.options.items,D.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),D])}}}}H.push([A.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):A(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(C=H.length-1;C>=0;C--){H[C][0].each(function(){B.push(this)})}return A(B)},_removeCurrentsFromItems:function(){for(var C=this.currentItem.find(":data(sortable-item)"),B=0;B<this.items.length;B++){for(var D=0;D<C.length;D++){C[D]==this.items[B].item[0]&&this.items.splice(B,1)}}},_refreshItems:function(C){this.items=[];this.containers=[this];var B=this.items,I=[[A.isFunction(this.options.items)?this.options.items.call(this.element[0],C,{item:this.currentItem}):A(this.options.items,this.element),this]],H=this._connectWith();if(H){for(var G=H.length-1;G>=0;G--){for(var F=A(H[G]),E=F.length-1;E>=0;E--){var D=A.data(F[E],"sortable");if(D&&D!=this&&!D.options.disabled){I.push([A.isFunction(D.options.items)?D.options.items.call(D.element[0],C,{item:this.currentItem}):A(D.options.items,D.element),D]);this.containers.push(D)}}}}for(G=I.length-1;G>=0;G--){C=I[G][1];H=I[G][0];E=0;for(F=H.length;E<F;E++){D=A(H[E]);D.data("sortable-item",C);B.push({item:D,instance:C,width:0,height:0,left:0,top:0})}}},refreshPositions:function(C){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var B=this.items.length-1;B>=0;B--){var E=this.items[B];if(!(E.instance!=this.currentContainer&&this.currentContainer&&E.item[0]!=this.currentItem[0])){var D=this.options.toleranceElement?A(this.options.toleranceElement,E.item):E.item;if(!C){E.width=D.outerWidth();E.height=D.outerHeight()}D=D.offset();E.left=D.left;E.top=D.top}}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(B=this.containers.length-1;B>=0;B--){D=this.containers[B].element.offset();this.containers[B].containerCache.left=D.left;this.containers[B].containerCache.top=D.top;this.containers[B].containerCache.width=this.containers[B].element.outerWidth();this.containers[B].containerCache.height=this.containers[B].element.outerHeight()}}return this},_createPlaceholder:function(C){var B=C||this,E=B.options;if(!E.placeholder||E.placeholder.constructor==String){var D=E.placeholder;E.placeholder={element:function(){var F=A(document.createElement(B.currentItem[0].nodeName)).addClass(D||B.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!D){F.style.visibility="hidden"}return F},update:function(G,F){if(!(D&&!E.forcePlaceholderSize)){F.height()||F.height(B.currentItem.innerHeight()-parseInt(B.currentItem.css("paddingTop")||0,10)-parseInt(B.currentItem.css("paddingBottom")||0,10));F.width()||F.width(B.currentItem.innerWidth()-parseInt(B.currentItem.css("paddingLeft")||0,10)-parseInt(B.currentItem.css("paddingRight")||0,10))}}}}B.placeholder=A(E.placeholder.element.call(B.element,B.currentItem));B.currentItem.after(B.placeholder);E.placeholder.update(B,B.placeholder)},_contactContainers:function(C){for(var B=null,H=null,G=this.containers.length-1;G>=0;G--){if(!A.ui.contains(this.currentItem[0],this.containers[G].element[0])){if(this._intersectsWith(this.containers[G].containerCache)){if(!(B&&A.ui.contains(this.containers[G].element[0],B.element[0]))){B=this.containers[G];H=G}}else{if(this.containers[G].containerCache.over){this.containers[G]._trigger("out",C,this._uiHash(this));this.containers[G].containerCache.over=0}}}}if(B){if(this.containers.length===1){this.containers[H]._trigger("over",C,this._uiHash(this));this.containers[H].containerCache.over=1}else{if(this.currentContainer!=this.containers[H]){B=10000;G=null;for(var F=this.positionAbs[this.containers[H].floating?"left":"top"],E=this.items.length-1;E>=0;E--){if(A.ui.contains(this.containers[H].element[0],this.items[E].item[0])){var D=this.items[E][this.containers[H].floating?"left":"top"];if(Math.abs(D-F)<B){B=Math.abs(D-F);G=this.items[E]}}}if(G||this.options.dropOnEmpty){this.currentContainer=this.containers[H];G?this._rearrange(C,G,null,true):this._rearrange(C,null,this.containers[H].element,true);this._trigger("change",C,this._uiHash());this.containers[H]._trigger("change",C,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[H]._trigger("over",C,this._uiHash(this));this.containers[H].containerCache.over=1}}}}},_createHelper:function(C){var B=this.options;C=A.isFunction(B.helper)?A(B.helper.apply(this.element[0],[C,this.currentItem])):B.helper=="clone"?this.currentItem.clone():this.currentItem;C.parents("body").length||A(B.appendTo!="parent"?B.appendTo:this.currentItem[0].parentNode)[0].appendChild(C[0]);if(C[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(C[0].style.width==""||B.forceHelperSize){C.width(this.currentItem.width())}if(C[0].style.height==""||B.forceHelperSize){C.height(this.currentItem.height())}return C},_adjustOffsetFromHelper:function(B){if(typeof B=="string"){B=B.split(" ")}if(A.isArray(B)){B={left:+B[0],top:+B[1]||0}}if("left" in B){this.offset.click.left=B.left+this.margins.left}if("right" in B){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if("top" in B){this.offset.click.top=B.top+this.margins.top}if("bottom" in B){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0])){B.left+=this.scrollParent.scrollLeft();B.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.currentItem.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var C=this.options;if(C.containment=="parent"){C.containment=this.helper[0].parentNode}if(C.containment=="document"||C.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(C.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(A(C.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(C.containment)){var B=A(C.containment)[0];C=A(C.containment).offset();var D=A(B).css("overflow")!="hidden";this.containment=[C.left+(parseInt(A(B).css("borderLeftWidth"),10)||0)+(parseInt(A(B).css("paddingLeft"),10)||0)-this.margins.left,C.top+(parseInt(A(B).css("borderTopWidth"),10)||0)+(parseInt(A(B).css("paddingTop"),10)||0)-this.margins.top,C.left+(D?Math.max(B.scrollWidth,B.offsetWidth):B.offsetWidth)-(parseInt(A(B).css("borderLeftWidth"),10)||0)-(parseInt(A(B).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,C.top+(D?Math.max(B.scrollHeight,B.offsetHeight):B.offsetHeight)-(parseInt(A(B).css("borderTopWidth"),10)||0)-(parseInt(A(B).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(C,B){if(!B){B=this.position}C=C=="absolute"?1:-1;var E=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,D=/(html|body)/i.test(E[0].tagName);return{top:B.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():D?0:E.scrollTop())*C),left:B.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():D?0:E.scrollLeft())*C)}},_generatePosition:function(C){var B=this.options,G=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=/(html|body)/i.test(G[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var E=C.pageX,D=C.pageY;if(this.originalPosition){if(this.containment){if(C.pageX-this.offset.click.left<this.containment[0]){E=this.containment[0]+this.offset.click.left}if(C.pageY-this.offset.click.top<this.containment[1]){D=this.containment[1]+this.offset.click.top}if(C.pageX-this.offset.click.left>this.containment[2]){E=this.containment[2]+this.offset.click.left}if(C.pageY-this.offset.click.top>this.containment[3]){D=this.containment[3]+this.offset.click.top}}if(B.grid){D=this.originalPageY+Math.round((D-this.originalPageY)/B.grid[1])*B.grid[1];D=this.containment?!(D-this.offset.click.top<this.containment[1]||D-this.offset.click.top>this.containment[3])?D:!(D-this.offset.click.top<this.containment[1])?D-B.grid[1]:D+B.grid[1]:D;E=this.originalPageX+Math.round((E-this.originalPageX)/B.grid[0])*B.grid[0];E=this.containment?!(E-this.offset.click.left<this.containment[0]||E-this.offset.click.left>this.containment[2])?E:!(E-this.offset.click.left<this.containment[0])?E-B.grid[0]:E+B.grid[0]:E}}return{top:D-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():F?0:G.scrollTop()),left:E-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:G.scrollLeft())}},_rearrange:function(C,B,G,F){G?G[0].appendChild(this.placeholder[0]):B.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?B.item[0]:B.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var E=this,D=this.counter;window.setTimeout(function(){D==E.counter&&E.refreshPositions(!F)},0)},_clear:function(C,B){this.reverting=false;var E=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var D in this._storedCSS){if(this._storedCSS[D]=="auto"||this._storedCSS[D]=="static"){this._storedCSS[D]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}this.fromOutside&&!B&&E.push(function(F){this._trigger("receive",F,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!B){E.push(function(F){this._trigger("update",F,this._uiHash())})}if(!A.ui.contains(this.element[0],this.currentItem[0])){B||E.push(function(F){this._trigger("remove",F,this._uiHash())});for(D=this.containers.length-1;D>=0;D--){if(A.ui.contains(this.containers[D].element[0],this.currentItem[0])&&!B){E.push(function(F){return function(G){F._trigger("receive",G,this._uiHash(this))}}.call(this,this.containers[D]));E.push(function(F){return function(G){F._trigger("update",G,this._uiHash(this))}}.call(this,this.containers[D]))}}}for(D=this.containers.length-1;D>=0;D--){B||E.push(function(F){return function(G){F._trigger("deactivate",G,this._uiHash(this))}}.call(this,this.containers[D]));if(this.containers[D].containerCache.over){E.push(function(F){return function(G){F._trigger("out",G,this._uiHash(this))}}.call(this,this.containers[D]));this.containers[D].containerCache.over=0}}this._storedCursor&&A("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!B){this._trigger("beforeStop",C,this._uiHash());for(D=0;D<E.length;D++){E[D].call(this,C)}this._trigger("stop",C,this._uiHash())}return false}B||this._trigger("beforeStop",C,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!B){for(D=0;D<E.length;D++){E[D].call(this,C)}this._trigger("stop",C,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){A.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(C){var B=C||this;return{helper:B.helper,placeholder:B.placeholder||A([]),position:B.position,originalPosition:B.originalPosition,offset:B.positionAbs,item:B.currentItem,sender:C?C.element:null}}});A.extend(A.ui.sortable,{version:"1.8.14"})})(jQuery);(function(A){A.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var C=this,B=C.options;C.running=0;C.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");C.headers=C.element.find(B.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){B.disabled||A(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){B.disabled||A(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){B.disabled||A(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){B.disabled||A(this).removeClass("ui-state-focus")});C.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(B.navigation){var E=C.element.find("a").filter(B.navigationFilter).eq(0);if(E.length){var D=E.closest(".ui-accordion-header");C.active=D.length?D:E.closest(".ui-accordion-content").prev()}}C.active=C._findActive(C.active||B.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");C.active.next().addClass("ui-accordion-content-active");C._createIcons();C.resize();C.element.attr("role","tablist");C.headers.attr("role","tab").bind("keydown.accordion",function(F){return C._keydown(F)}).next().attr("role","tabpanel");C.headers.not(C.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();C.active.length?C.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):C.headers.eq(0).attr("tabIndex",0);A.browser.safari||C.headers.find("a").attr("tabIndex",-1);B.event&&C.headers.bind(B.event.split(" ").join(".accordion ")+".accordion",function(F){C._clickHandler.call(C,F,this);F.preventDefault()})},_createIcons:function(){var B=this.options;if(B.icons){A("<span></span>").addClass("ui-icon "+B.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(B.icons.header).toggleClass(B.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var C=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var B=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(C.autoHeight||C.fillHeight){B.css("height","")}return A.Widget.prototype.destroy.call(this)},_setOption:function(C,B){A.Widget.prototype._setOption.apply(this,arguments);C=="active"&&this.activate(B);if(C=="icons"){this._destroyIcons();B&&this._createIcons()}if(C=="disabled"){this.headers.add(this.headers.next())[B?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(C){if(!(this.options.disabled||C.altKey||C.ctrlKey)){var B=A.ui.keyCode,F=this.headers.length,D=this.headers.index(C.target),E=false;switch(C.keyCode){case B.RIGHT:case B.DOWN:E=this.headers[(D+1)%F];break;case B.LEFT:case B.UP:E=this.headers[(D-1+F)%F];break;case B.SPACE:case B.ENTER:this._clickHandler({target:C.target},C.target);C.preventDefault()}if(E){A(C.target).attr("tabIndex",-1);A(E).attr("tabIndex",0);E.focus();return false}return true}},resize:function(){var C=this.options,B;if(C.fillSpace){if(A.browser.msie){var D=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}B=this.element.parent().height();A.browser.msie&&this.element.parent().css("overflow",D);this.headers.each(function(){B-=A(this).outerHeight(true)});this.headers.next().each(function(){A(this).height(Math.max(0,B-A(this).innerHeight()+A(this).height()))}).css("overflow","auto")}else{if(C.autoHeight){B=0;this.headers.next().each(function(){B=Math.max(B,A(this).height("").height())}).height(B)}}return this},activate:function(B){this.options.active=B;B=this._findActive(B)[0];this._clickHandler({target:B},B);return this},_findActive:function(B){return B?typeof B==="number"?this.headers.filter(":eq("+B+")"):this.headers.not(this.headers.not(B)):B===false?A([]):this.headers.filter(":eq(0)")},_clickHandler:function(C,B){var I=this.options;if(!I.disabled){if(C.target){C=A(C.currentTarget||B);B=C[0]===this.active[0];I.active=I.collapsible&&B?false:this.headers.index(C);if(!(this.running||!I.collapsible&&B)){var E=this.active;D=C.next();F=this.active.next();H={options:I,newHeader:B&&I.collapsible?A([]):C,oldHeader:this.active,newContent:B&&I.collapsible?A([]):D,oldContent:F};var G=this.headers.index(this.active[0])>this.headers.index(C[0]);this.active=B?A([]):C;this._toggle(D,F,H,B,G);E.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(I.icons.headerSelected).addClass(I.icons.header);if(!B){C.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(I.icons.header).addClass(I.icons.headerSelected);C.next().addClass("ui-accordion-content-active")}}}else{if(I.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(I.icons.headerSelected).addClass(I.icons.header);this.active.next().addClass("ui-accordion-content-active");var F=this.active.next(),H={options:I,newHeader:A([]),oldHeader:I.active,newContent:A([]),oldContent:F},D=this.active=A([]);this._toggle(D,F,H)}}}},_toggle:function(K,J,I,E,G){var F=this,H=F.options;F.toShow=K;F.toHide=J;F.data=I;var C=function(){if(F){return F._completed.apply(F,arguments)}};F._trigger("changestart",null,F.data);F.running=J.size()===0?K.size():J.size();if(H.animated){I={};I=H.collapsible&&E?{toShow:A([]),toHide:J,complete:C,down:G,autoHeight:H.autoHeight||H.fillSpace}:{toShow:K,toHide:J,complete:C,down:G,autoHeight:H.autoHeight||H.fillSpace};if(!H.proxied){H.proxied=H.animated}if(!H.proxiedDuration){H.proxiedDuration=H.duration}H.animated=A.isFunction(H.proxied)?H.proxied(I):H.proxied;H.duration=A.isFunction(H.proxiedDuration)?H.proxiedDuration(I):H.proxiedDuration;E=A.ui.accordion.animations;var D=H.duration,B=H.animated;if(B&&!E[B]&&!A.easing[B]){B="slide"}E[B]||(E[B]=function(L){this.slide(L,{easing:B,duration:D||700})});E[B](I)}else{if(H.collapsible&&E){K.toggle()}else{J.hide();K.show()}C(true)}J.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur();K.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(B){this.running=B?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length){this.toHide.parent()[0].className=this.toHide.parent()[0].className}this._trigger("change",null,this.data)}}});A.extend(A.ui.accordion,{version:"1.8.14",animations:{slide:function(C,B){C=A.extend({easing:"swing",duration:300},C,B);if(C.toHide.size()){if(C.toShow.size()){var H=C.toShow.css("overflow"),D=0,F={},E={},G;B=C.toShow;G=B[0].style.width;B.width(parseInt(B.parent().width(),10)-parseInt(B.css("paddingLeft"),10)-parseInt(B.css("paddingRight"),10)-(parseInt(B.css("borderLeftWidth"),10)||0)-(parseInt(B.css("borderRightWidth"),10)||0));A.each(["height","paddingTop","paddingBottom"],function(I,J){E[J]="hide";I=(""+A.css(C.toShow[0],J)).match(/^([\d+-.]+)(.*)$/);F[J]={value:I[1],unit:I[2]||"px"}});C.toShow.css({height:0,overflow:"hidden"}).show();C.toHide.filter(":hidden").each(C.complete).end().filter(":visible").animate(E,{step:function(I,J){if(J.prop=="height"){D=J.end-J.start===0?0:(J.now-J.start)/(J.end-J.start)}C.toShow[0].style[J.prop]=D*F[J.prop].value+F[J.prop].unit},duration:C.duration,easing:C.easing,complete:function(){C.autoHeight||C.toShow.css("height","");C.toShow.css({width:G,overflow:H});C.complete()}})}else{C.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},C)}}else{C.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},C)}},bounceslide:function(B){this.slide(B,{easing:B.down?"easeOutBounce":"swing",duration:B.down?1000:200})}}})})(jQuery);(function(B){var A=0;B.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var D=this,C=this.element[0].ownerDocument,E;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(G){if(!(D.options.disabled||D.element.attr("readonly"))){E=false;var F=B.ui.keyCode;switch(G.keyCode){case F.PAGE_UP:D._move("previousPage",G);break;case F.PAGE_DOWN:D._move("nextPage",G);break;case F.UP:D._move("previous",G);G.preventDefault();break;case F.DOWN:D._move("next",G);G.preventDefault();break;case F.ENTER:case F.NUMPAD_ENTER:if(D.menu.active){E=true;G.preventDefault()}case F.TAB:if(!D.menu.active){return }D.menu.select(G);break;case F.ESCAPE:D.element.val(D.term);D.close(G);break;default:clearTimeout(D.searching);D.searching=setTimeout(function(){if(D.term!=D.element.val()){D.selectedItem=null;D.search(null,G)}},D.options.delay);break}}}).bind("keypress.autocomplete",function(F){if(E){E=false;F.preventDefault()}}).bind("focus.autocomplete",function(){if(!D.options.disabled){D.selectedItem=null;D.previous=D.element.val()}}).bind("blur.autocomplete",function(F){if(!D.options.disabled){clearTimeout(D.searching);D.closing=setTimeout(function(){D.close(F);D._change(F)},150)}});this._initSource();this.response=function(){return D._response.apply(D,arguments)};this.menu=B("<ul></ul>").addClass("ui-autocomplete").appendTo(B(this.options.appendTo||"body",C)[0]).mousedown(function(G){var F=D.menu.element[0];B(G.target).closest(".ui-menu-item").length||setTimeout(function(){B(document).one("mousedown",function(H){H.target!==D.element[0]&&H.target!==F&&!B.ui.contains(F,H.target)&&D.close()})},1);setTimeout(function(){clearTimeout(D.closing)},13)}).menu({focus:function(G,F){F=F.item.data("item.autocomplete");false!==D._trigger("focus",G,{item:F})&&/^key/.test(G.originalEvent.type)&&D.element.val(F.value)},selected:function(I,H){var G=H.item.data("item.autocomplete"),F=D.previous;if(D.element[0]!==C.activeElement){D.element.focus();D.previous=F;setTimeout(function(){D.previous=F;D.selectedItem=G},1)}false!==D._trigger("select",I,{item:G})&&D.element.val(G.value);D.term=D.element.val();D.close(I);D.selectedItem=G},blur:function(){D.menu.element.is(":visible")&&D.element.val()!==D.term&&D.element.val(D.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");B.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();B.Widget.prototype.destroy.call(this)},_setOption:function(D,C){B.Widget.prototype._setOption.apply(this,arguments);D==="source"&&this._initSource();if(D==="appendTo"){this.menu.element.appendTo(B(C||"body",this.element[0].ownerDocument)[0])}D==="disabled"&&C&&this.xhr&&this.xhr.abort()},_initSource:function(){var D=this,C,E;if(B.isArray(this.options.source)){C=this.options.source;this.source=function(G,F){F(B.ui.autocomplete.filter(C,G.term))}}else{if(typeof this.options.source==="string"){E=this.options.source;this.source=function(G,F){D.xhr&&D.xhr.abort();D.xhr=B.ajax({url:E,data:G,dataType:"json",autocompleteRequest:++A,success:function(H){this.autocompleteRequest===A&&F(H)},error:function(){this.autocompleteRequest===A&&F([])}})}}else{this.source=this.options.source}}},search:function(D,C){D=D!=null?D:this.element.val();this.term=this.element.val();if(D.length<this.options.minLength){return this.close(C)}clearTimeout(this.closing);if(this._trigger("search",C)!==false){return this._search(D)}},_search:function(C){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:C},this.response)},_response:function(C){if(!this.options.disabled&&C&&C.length){C=this._normalize(C);this._suggest(C);this._trigger("open")}else{this.close()}this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(C){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",C)}},_change:function(C){this.previous!==this.element.val()&&this._trigger("change",C,{item:this.selectedItem})},_normalize:function(C){if(C.length&&C[0].label&&C[0].value){return C}return B.map(C,function(D){if(typeof D==="string"){return{label:D,value:D}}return B.extend({label:D.label||D.value,value:D.value||D.label},D)})},_suggest:function(D){var C=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(C,D);this.menu.deactivate();this.menu.refresh();C.show();this._resizeMenu();C.position(B.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new B.Event("mouseover"))},_resizeMenu:function(){var C=this.menu.element;C.outerWidth(Math.max(C.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(D,C){var E=this;B.each(C,function(G,F){E._renderItem(D,F)})},_renderItem:function(D,C){return B("<li></li>").data("item.autocomplete",C).append(B("<a></a>").text(C.label)).appendTo(D)},_move:function(D,C){if(this.menu.element.is(":visible")){if(this.menu.first()&&/^previous/.test(D)||this.menu.last()&&/^next/.test(D)){this.element.val(this.term);this.menu.deactivate()}else{this.menu[D](C)}}else{this.search(null,C)}},widget:function(){return this.menu.element}});B.extend(B.ui.autocomplete,{escapeRegex:function(C){return C.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(D,C){var E=new RegExp(B.ui.autocomplete.escapeRegex(C),"i");return B.grep(D,function(F){return E.test(F.label||F.value||F)})}})})(jQuery);(function(A){A.widget("ui.menu",{_create:function(){var B=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(C){if(A(C.target).closest(".ui-menu-item a").length){C.preventDefault();B.select(C)}});this.refresh()},refresh:function(){var B=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(C){B.activate(C,A(this).parent())}).mouseleave(function(){B.deactivate()})},activate:function(E,C){this.deactivate();if(this.hasScroll()){var B=C.offset().top-this.element.offset().top,D=this.element.scrollTop(),F=this.element.height();if(B<0){this.element.scrollTop(D+B)}else{B>=F&&this.element.scrollTop(D+B-F+C.height())}}this.active=C.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",E,{item:C})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(B){this.move("next",".ui-menu-item:first",B)},previous:function(B){this.move("prev",".ui-menu-item:last",B)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(D,C,B){if(this.active){D=this.active[D+"All"](".ui-menu-item").eq(0);D.length?this.activate(B,D):this.activate(B,this.element.children(C))}else{this.activate(B,this.element.children(C))}},nextPage:function(E){if(this.hasScroll()){if(!this.active||this.last()){this.activate(E,this.element.children(".ui-menu-item:first"))}else{var C=this.active.offset().top,B=this.element.height(),D=this.element.children(".ui-menu-item").filter(function(){var F=A(this).offset().top-C-B+A(this).height();return F<10&&F>-10});D.length||(D=this.element.children(".ui-menu-item:last"));this.activate(E,D)}}else{this.activate(E,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}},previousPage:function(D){if(this.hasScroll()){if(!this.active||this.first()){this.activate(D,this.element.children(".ui-menu-item:last"))}else{var C=this.active.offset().top,B=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var E=A(this).offset().top-C+B-A(this).height();return E<10&&E>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(D,result)}}else{this.activate(D,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element[A.fn.prop?"prop":"attr"]("scrollHeight")},select:function(B){this._trigger("selected",B,{item:this.active})}})})(jQuery);(function(A){var F,E,D,G,B=function(){var H=A(this).find(":ui-button");setTimeout(function(){H.button("refresh")},1)},C=function(H){var K=H.name,J=H.form,I=A([]);if(K){I=J?A(J).find("[name='"+K+"']"):A("[name='"+K+"']",H.ownerDocument).filter(function(){return !this.form})}return I};A.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",B);if(typeof this.options.disabled!=="boolean"){this.options.disabled=this.element.attr("disabled")}this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var H=this,K=this.options,J=this.type==="checkbox"||this.type==="radio",I="ui-state-hover"+(!J?" ui-state-active":"");if(K.label===null){K.label=this.buttonElement.html()}if(this.element.is(":disabled")){K.disabled=true}this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",function(){if(!K.disabled){A(this).addClass("ui-state-hover");this===F&&A(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){K.disabled||A(this).removeClass(I)}).bind("click.button",function(L){if(K.disabled){L.preventDefault();L.stopImmediatePropagation()}});this.element.bind("focus.button",function(){H.buttonElement.addClass("ui-state-focus")}).bind("blur.button",function(){H.buttonElement.removeClass("ui-state-focus")});if(J){this.element.bind("change.button",function(){G||H.refresh()});this.buttonElement.bind("mousedown.button",function(L){if(!K.disabled){G=false;E=L.pageX;D=L.pageY}}).bind("mouseup.button",function(L){if(!K.disabled){if(E!==L.pageX||D!==L.pageY){G=true}}})}if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(K.disabled||G){return false}A(this).toggleClass("ui-state-active");H.buttonElement.attr("aria-pressed",H.element[0].checked)})}else{if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(K.disabled||G){return false}A(this).addClass("ui-state-active");H.buttonElement.attr("aria-pressed",true);var L=H.element[0];C(L).not(L).map(function(){return A(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(K.disabled){return false}A(this).addClass("ui-state-active");F=this;A(document).one("mouseup",function(){F=null})}).bind("mouseup.button",function(){if(K.disabled){return false}A(this).removeClass("ui-state-active")}).bind("keydown.button",function(L){if(K.disabled){return false}if(L.keyCode==A.ui.keyCode.SPACE||L.keyCode==A.ui.keyCode.ENTER){A(this).addClass("ui-state-active")}}).bind("keyup.button",function(){A(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(L){L.keyCode===A.ui.keyCode.SPACE&&A(this).click()})}}this._setOption("disabled",K.disabled);this._resetButton()},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){var H=this.element.parents().filter(":last"),I="label[for="+this.element.attr("id")+"]";this.buttonElement=H.find(I);if(!this.buttonElement.length){H=H.length?H.siblings():this.element.siblings();this.buttonElement=H.filter(I);if(!this.buttonElement.length){this.buttonElement=H.find(I)}}this.element.addClass("ui-helper-hidden-accessible");(H=this.element.is(":checked"))&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",H)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title");A.Widget.prototype.destroy.call(this)},_setOption:function(H,I){A.Widget.prototype._setOption.apply(this,arguments);if(H==="disabled"){I?this.element.attr("disabled",true):this.element.removeAttr("disabled")}else{this._resetButton()}},refresh:function(){var H=this.element.is(":disabled");H!==this.options.disabled&&this._setOption("disabled",H);if(this.type==="radio"){C(this.element[0]).each(function(){A(this).is(":checked")?A(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true):A(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)})}else{if(this.type==="checkbox"){this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label)}else{var H=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),L=A("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(H.empty()).text(),J=this.options.icons,I=J.primary&&J.secondary,K=[];if(J.primary||J.secondary){if(this.options.text){K.push("ui-button-text-icon"+(I?"s":J.primary?"-primary":"-secondary"))}J.primary&&H.prepend("<span class='ui-button-icon-primary ui-icon "+J.primary+"'></span>");J.secondary&&H.append("<span class='ui-button-icon-secondary ui-icon "+J.secondary+"'></span>");if(!this.options.text){K.push(I?"ui-button-icons-only":"ui-button-icon-only");this.hasTitle||H.attr("title",L)}}else{K.push("ui-button-text-only")}H.addClass(K.join(" "))}}});A.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(H,I){H==="disabled"&&this.buttons.button("option",H,I);A.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var H=this.element.css("direction")==="ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return A(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(H?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(H?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return A(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");A.Widget.prototype.destroy.call(this)}})})(jQuery);(function(E,B){var A={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},D={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},C=E.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};E.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(G){var F=E(this).css(G).offset().top;F<0&&E(this).css("top",G.top-F)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}this.options.title=this.options.title||this.originalTitle;var G=this,F=G.options,L=F.title||"&#160;",K=E.ui.dialog.getTitleId(G.element),I=(G.uiDialog=E("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+F.dialogClass).css({zIndex:F.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(M){if(F.closeOnEscape&&M.keyCode&&M.keyCode===E.ui.keyCode.ESCAPE){G.close(M);M.preventDefault()}}).attr({role:"dialog","aria-labelledby":K}).mousedown(function(M){G.moveToTop(false,M)});G.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(I);var J=(G.uiDialogTitlebar=E("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(I),H=E('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){H.addClass("ui-state-hover")},function(){H.removeClass("ui-state-hover")}).focus(function(){H.addClass("ui-state-focus")}).blur(function(){H.removeClass("ui-state-focus")}).click(function(M){G.close(M);return false}).appendTo(J);(G.uiDialogTitlebarCloseText=E("<span></span>")).addClass("ui-icon ui-icon-closethick").text(F.closeText).appendTo(H);E("<span></span>").addClass("ui-dialog-title").attr("id",K).html(L).prependTo(J);if(E.isFunction(F.beforeclose)&&!E.isFunction(F.beforeClose)){F.beforeClose=F.beforeclose}J.find("*").add(J).disableSelection();F.draggable&&E.fn.draggable&&G._makeDraggable();F.resizable&&E.fn.resizable&&G._makeResizable();G._createButtons(F.buttons);G._isOpen=false;E.fn.bgiframe&&I.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var F=this;F.overlay&&F.overlay.destroy();F.uiDialog.hide();F.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");F.uiDialog.remove();F.originalTitle&&F.element.attr("title",F.originalTitle);return F},widget:function(){return this.uiDialog},close:function(G){var F=this,I,H;if(false!==F._trigger("beforeClose",G)){F.overlay&&F.overlay.destroy();F.uiDialog.unbind("keypress.ui-dialog");F._isOpen=false;if(F.options.hide){F.uiDialog.hide(F.options.hide,function(){F._trigger("close",G)})}else{F.uiDialog.hide();F._trigger("close",G)}E.ui.dialog.overlay.resize();if(F.options.modal){I=0;E(".ui-dialog").each(function(){if(this!==F.uiDialog[0]){H=E(this).css("z-index");isNaN(H)||(I=Math.max(I,H))}});E.ui.dialog.maxZ=I}return F}},isOpen:function(){return this._isOpen},moveToTop:function(G,F){var I=this,H=I.options;if(H.modal&&!G||!H.stack&&!H.modal){return I._trigger("focus",F)}if(H.zIndex>E.ui.dialog.maxZ){E.ui.dialog.maxZ=H.zIndex}if(I.overlay){E.ui.dialog.maxZ+=1;I.overlay.$el.css("z-index",E.ui.dialog.overlay.maxZ=E.ui.dialog.maxZ)}G={scrollTop:I.element.attr("scrollTop"),scrollLeft:I.element.attr("scrollLeft")};E.ui.dialog.maxZ+=1;I.uiDialog.css("z-index",E.ui.dialog.maxZ);I.element.attr(G);I._trigger("focus",F);return I},open:function(){if(!this._isOpen){var G=this,F=G.options,H=G.uiDialog;G.overlay=F.modal?new E.ui.dialog.overlay(G):null;G._size();G._position(F.position);H.show(F.show);G.moveToTop(true);F.modal&&H.bind("keypress.ui-dialog",function(K){if(K.keyCode===E.ui.keyCode.TAB){var I=E(":tabbable",this),J=I.filter(":first");I=I.filter(":last");if(K.target===I[0]&&!K.shiftKey){J.focus(1);return false}else{if(K.target===J[0]&&K.shiftKey){I.focus(1);return false}}}});E(G.element.find(":tabbable").get().concat(H.find(".ui-dialog-buttonpane :tabbable").get().concat(H.get()))).eq(0).focus();G._isOpen=true;G._trigger("open");return G}},_createButtons:function(G){var F=this,J=false,I=E("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),H=E("<div></div>").addClass("ui-dialog-buttonset").appendTo(I);F.uiDialog.find(".ui-dialog-buttonpane").remove();typeof G==="object"&&G!==null&&E.each(G,function(){return !(J=true)});if(J){E.each(G,function(M,L){L=E.isFunction(L)?{click:L,text:M}:L;var K=E('<button type="button"></button>').click(function(){L.click.apply(F.element[0],arguments)}).appendTo(H);E.each(L,function(O,N){if(O!=="click"){O in C?K[O](N):K.attr(O,N)}});E.fn.button&&K.button()});I.appendTo(F.uiDialog)}},_makeDraggable:function(){function G(K){return{position:K.position,offset:K.offset}}var F=this,J=F.options,I=E(document),H;F.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(L,K){H=J.height==="auto"?"auto":E(this).height();E(this).height(E(this).height()).addClass("ui-dialog-dragging");F._trigger("dragStart",L,G(K))},drag:function(L,K){F._trigger("drag",L,G(K))},stop:function(L,K){J.position=[K.position.left-I.scrollLeft(),K.position.top-I.scrollTop()];E(this).removeClass("ui-dialog-dragging").height(H);F._trigger("dragStop",L,G(K));E.ui.dialog.overlay.resize()}})},_makeResizable:function(G){function F(K){return{originalPosition:K.originalPosition,originalSize:K.originalSize,position:K.position,size:K.size}}G=G===B?this.options.resizable:G;var J=this,I=J.options,H=J.uiDialog.css("position");G=typeof G==="string"?G:"n,e,s,w,se,sw,ne,nw";J.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:J.element,maxWidth:I.maxWidth,maxHeight:I.maxHeight,minWidth:I.minWidth,minHeight:J._minHeight(),handles:G,start:function(L,K){E(this).addClass("ui-dialog-resizing");J._trigger("resizeStart",L,F(K))},resize:function(L,K){J._trigger("resize",L,F(K))},stop:function(L,K){E(this).removeClass("ui-dialog-resizing");I.height=E(this).height();I.width=E(this).width();J._trigger("resizeStop",L,F(K));E.ui.dialog.overlay.resize()}}).css("position",H).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var F=this.options;return F.height==="auto"?F.minHeight:Math.min(F.minHeight,F.height)},_position:function(G){var F=[],I=[0,0],H;if(G){if(typeof G==="string"||typeof G==="object"&&"0" in G){F=G.split?G.split(" "):[G[0],G[1]];if(F.length===1){F[1]=F[0]}E.each(["left","top"],function(J,K){if(+F[J]===F[J]){I[J]=F[J];F[J]=K}});G={my:F.join(" "),at:F.join(" "),offset:I.join(" ")}}G=E.extend({},E.ui.dialog.prototype.options.position,G)}else{G=E.ui.dialog.prototype.options.position}(H=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(E.extend({of:window},G));H||this.uiDialog.hide()},_setOptions:function(G){var F=this,I={},H=false;E.each(G,function(J,K){F._setOption(J,K);if(J in A){H=true}if(J in D){I[J]=K}});H&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",I)},_setOption:function(G,F){var J=this,I=J.uiDialog;switch(G){case"beforeclose":G="beforeClose";break;case"buttons":J._createButtons(F);break;case"closeText":J.uiDialogTitlebarCloseText.text(""+F);break;case"dialogClass":I.removeClass(J.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+F);break;case"disabled":F?I.addClass("ui-dialog-disabled"):I.removeClass("ui-dialog-disabled");break;case"draggable":var H=I.is(":data(draggable)");H&&!F&&I.draggable("destroy");!H&&F&&J._makeDraggable();break;case"position":J._position(F);break;case"resizable":(H=I.is(":data(resizable)"))&&!F&&I.resizable("destroy");H&&typeof F==="string"&&I.resizable("option","handles",F);!H&&F!==false&&J._makeResizable(F);break;case"title":E(".ui-dialog-title",J.uiDialogTitlebar).html(""+(F||"&#160;"));break}E.Widget.prototype._setOption.apply(J,arguments)},_size:function(){var G=this.options,F,I,H=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(G.minWidth>G.width){G.width=G.minWidth}F=this.uiDialog.css({height:"auto",width:G.width}).height();I=Math.max(0,G.minHeight-F);if(G.height==="auto"){if(E.support.minHeight){this.element.css({minHeight:I,height:"auto"})}else{this.uiDialog.show();G=this.element.css("height","auto").height();H||this.uiDialog.hide();this.element.height(Math.max(G,I))}}else{this.element.height(Math.max(G.height-F,0))}this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});E.extend(E.ui.dialog,{version:"1.8.14",uuid:0,maxZ:0,getTitleId:function(F){F=F.attr("id");if(!F){this.uuid+=1;F=this.uuid}return"ui-dialog-title-"+F},overlay:function(F){this.$el=E.ui.dialog.overlay.create(F)}});E.extend(E.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:E.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(F){return F+".dialog-overlay"}).join(" "),create:function(G){if(this.instances.length===0){setTimeout(function(){E.ui.dialog.overlay.instances.length&&E(document).bind(E.ui.dialog.overlay.events,function(H){if(E(H.target).zIndex()<E.ui.dialog.overlay.maxZ){return false}})},1);E(document).bind("keydown.dialog-overlay",function(H){if(G.options.closeOnEscape&&H.keyCode&&H.keyCode===E.ui.keyCode.ESCAPE){G.close(H);H.preventDefault()}});E(window).bind("resize.dialog-overlay",E.ui.dialog.overlay.resize)}var F=(this.oldInstances.pop()||E("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});E.fn.bgiframe&&F.bgiframe();this.instances.push(F);return F},destroy:function(G){var F=E.inArray(G,this.instances);F!=-1&&this.oldInstances.push(this.instances.splice(F,1)[0]);this.instances.length===0&&E([document,window]).unbind(".dialog-overlay");G.remove();var H=0;E.each(this.instances,function(){H=Math.max(H,this.css("z-index"))});this.maxZ=H},height:function(){var G,F;if(E.browser.msie&&E.browser.version<7){G=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);F=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return G<F?E(window).height()+"px":G+"px"}else{return E(document).height()+"px"}},width:function(){var G,F;if(E.browser.msie){G=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);F=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return G<F?E(window).width()+"px":G+"px"}else{return E(document).width()+"px"}},resize:function(){var F=E([]);E.each(E.ui.dialog.overlay.instances,function(){F=F.add(this)});F.css({width:0,height:0}).css({width:E.ui.dialog.overlay.width(),height:E.ui.dialog.overlay.height()})}});E.extend(E.ui.dialog.overlay.prototype,{destroy:function(){E.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(A){A.widget("ui.slider",A.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var B=this,C=this.options,G=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),E=C.values&&C.values.length||1,F=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(C.disabled?" ui-slider-disabled ui-disabled":""));this.range=A([]);if(C.range){if(C.range===true){if(!C.values){C.values=[this._valueMin(),this._valueMin()]}if(C.values.length&&C.values.length!==2){C.values=[C.values[0],C.values[0]]}}this.range=A("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(C.range==="min"||C.range==="max"?" ui-slider-range-"+C.range:""))}for(var D=G.length;D<E;D+=1){F.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>")}this.handles=G.add(A(F.join("")).appendTo(B.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(H){H.preventDefault()}).hover(function(){C.disabled||A(this).addClass("ui-state-hover")},function(){A(this).removeClass("ui-state-hover")}).focus(function(){if(C.disabled){A(this).blur()}else{A(".ui-slider .ui-state-focus").removeClass("ui-state-focus");A(this).addClass("ui-state-focus")}}).blur(function(){A(this).removeClass("ui-state-focus")});this.handles.each(function(H){A(this).data("index.ui-slider-handle",H)});this.handles.keydown(function(M){var J=true,I=A(this).data("index.ui-slider-handle"),K,L,H;if(!B.options.disabled){switch(M.keyCode){case A.ui.keyCode.HOME:case A.ui.keyCode.END:case A.ui.keyCode.PAGE_UP:case A.ui.keyCode.PAGE_DOWN:case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:J=false;if(!B._keySliding){B._keySliding=true;A(this).addClass("ui-state-active");K=B._start(M,I);if(K===false){return }}break}H=B.options.step;K=B.options.values&&B.options.values.length?(L=B.values(I)):(L=B.value());switch(M.keyCode){case A.ui.keyCode.HOME:L=B._valueMin();break;case A.ui.keyCode.END:L=B._valueMax();break;case A.ui.keyCode.PAGE_UP:L=B._trimAlignValue(K+(B._valueMax()-B._valueMin())/5);break;case A.ui.keyCode.PAGE_DOWN:L=B._trimAlignValue(K-(B._valueMax()-B._valueMin())/5);break;case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:if(K===B._valueMax()){return }L=B._trimAlignValue(K+H);break;case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:if(K===B._valueMin()){return }L=B._trimAlignValue(K-H);break}B._slide(M,I,L);return J}}).keyup(function(I){var H=A(this).data("index.ui-slider-handle");if(B._keySliding){B._keySliding=false;B._stop(I,H);B._change(I,H);A(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(B){var C=this.options,H,F,G,D,E;if(C.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();H=this._normValueFromMouse({x:B.pageX,y:B.pageY});F=this._valueMax()-this._valueMin()+1;D=this;this.handles.each(function(J){var I=Math.abs(H-D.values(J));if(F>I){F=I;G=A(this);E=J}});if(C.range===true&&this.values(1)===C.min){E+=1;G=A(this.handles[E])}if(this._start(B,E)===false){return false}this._mouseSliding=true;D._handleIndex=E;G.addClass("ui-state-active").focus();C=G.offset();this._clickOffset=!A(B.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:B.pageX-C.left-G.width()/2,top:B.pageY-C.top-G.height()/2-(parseInt(G.css("borderTopWidth"),10)||0)-(parseInt(G.css("borderBottomWidth"),10)||0)+(parseInt(G.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(B,E,H);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(B){var C=this._normValueFromMouse({x:B.pageX,y:B.pageY});this._slide(B,this._handleIndex,C);return false},_mouseStop:function(B){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(B,this._handleIndex);this._change(B,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(B){var C;if(this.orientation==="horizontal"){C=this.elementSize.width;B=B.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{C=this.elementSize.height;B=B.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}C=B/C;if(C>1){C=1}if(C<0){C=0}if(this.orientation==="vertical"){C=1-C}B=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+C*B)},_start:function(B,C){var D={handle:this.handles[C],value:this.value()};if(this.options.values&&this.options.values.length){D.value=this.values(C);D.values=this.values()}return this._trigger("start",B,D)},_slide:function(B,C,E){var D;if(this.options.values&&this.options.values.length){D=this.values(C?0:1);if(this.options.values.length===2&&this.options.range===true&&(C===0&&E>D||C===1&&E<D)){E=D}if(E!==this.values(C)){D=this.values();D[C]=E;B=this._trigger("slide",B,{handle:this.handles[C],value:E,values:D});this.values(C?0:1);B!==false&&this.values(C,E,true)}}else{if(E!==this.value()){B=this._trigger("slide",B,{handle:this.handles[C],value:E});B!==false&&this.value(E)}}},_stop:function(B,C){var D={handle:this.handles[C],value:this.value()};if(this.options.values&&this.options.values.length){D.value=this.values(C);D.values=this.values()}this._trigger("stop",B,D)},_change:function(B,C){if(!this._keySliding&&!this._mouseSliding){var D={handle:this.handles[C],value:this.value()};if(this.options.values&&this.options.values.length){D.value=this.values(C);D.values=this.values()}this._trigger("change",B,D)}},value:function(B){if(arguments.length){this.options.value=this._trimAlignValue(B);this._refreshValue();this._change(null,0)}else{return this._value()}},values:function(B,C){var F,D,E;if(arguments.length>1){this.options.values[B]=this._trimAlignValue(C);this._refreshValue();this._change(null,B)}else{if(arguments.length){if(A.isArray(arguments[0])){F=this.options.values;D=arguments[0];for(E=0;E<F.length;E+=1){F[E]=this._trimAlignValue(D[E]);this._change(null,E)}this._refreshValue()}else{return this.options.values&&this.options.values.length?this._values(B):this.value()}}else{return this._values()}}},_setOption:function(B,C){var E,D=0;if(A.isArray(this.options.values)){D=this.options.values.length}A.Widget.prototype._setOption.apply(this,arguments);switch(B){case"disabled":if(C){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(E=0;E<D;E+=1){this._change(null,E)}this._animateOff=false;break}},_value:function(){var B=this.options.value;return B=this._trimAlignValue(B)},_values:function(B){var C,D;if(arguments.length){C=this.options.values[B];return C=this._trimAlignValue(C)}else{C=this.options.values.slice();for(D=0;D<C.length;D+=1){C[D]=this._trimAlignValue(C[D])}return C}},_trimAlignValue:function(B){if(B<=this._valueMin()){return this._valueMin()}if(B>=this._valueMax()){return this._valueMax()}var C=this.options.step>0?this.options.step:1,D=(B-this._valueMin())%C;alignValue=B-D;if(Math.abs(D)*2>=C){alignValue+=D>0?C:-C}return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var J=this.options.range,K=this.options,I=this,G=!this._animateOff?K.animate:false,H,D={},F,C,B,E;if(this.options.values&&this.options.values.length){this.handles.each(function(L){H=(I.values(L)-I._valueMin())/(I._valueMax()-I._valueMin())*100;D[I.orientation==="horizontal"?"left":"bottom"]=H+"%";A(this).stop(1,1)[G?"animate":"css"](D,K.animate);if(I.options.range===true){if(I.orientation==="horizontal"){if(L===0){I.range.stop(1,1)[G?"animate":"css"]({left:H+"%"},K.animate)}if(L===1){I.range[G?"animate":"css"]({width:H-F+"%"},{queue:false,duration:K.animate})}}else{if(L===0){I.range.stop(1,1)[G?"animate":"css"]({bottom:H+"%"},K.animate)}if(L===1){I.range[G?"animate":"css"]({height:H-F+"%"},{queue:false,duration:K.animate})}}}F=H})}else{C=this.value();B=this._valueMin();E=this._valueMax();H=E!==B?(C-B)/(E-B)*100:0;D[I.orientation==="horizontal"?"left":"bottom"]=H+"%";this.handle.stop(1,1)[G?"animate":"css"](D,K.animate);if(J==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[G?"animate":"css"]({width:H+"%"},K.animate)}if(J==="max"&&this.orientation==="horizontal"){this.range[G?"animate":"css"]({width:100-H+"%"},{queue:false,duration:K.animate})}if(J==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[G?"animate":"css"]({height:H+"%"},K.animate)}if(J==="max"&&this.orientation==="vertical"){this.range[G?"animate":"css"]({height:100-H+"%"},{queue:false,duration:K.animate})}}}});A.extend(A.ui.slider,{version:"1.8.14"})})(jQuery);(function(F,E){function D(){return ++C}function B(){return ++A}var C=0,A=0;F.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(G,H){if(G=="selected"){this.options.collapsible&&H==this.options.selected||this.select(H)}else{this.options[G]=H;this._tabify()}},_tabId:function(G){return G.title&&G.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+D()},_sanitizeSelector:function(G){return G.replace(/:/g,"\\:")},_cookie:function(){var G=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+B());return F.cookie.apply(null,[G].concat(F.makeArray(arguments)))},_ui:function(G,H){return{tab:G,panel:H,index:this.anchors.index(G)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var G=F(this);G.html(G.data("label.tabs")).removeData("label.tabs")})},_tabify:function(P){function N(S,T){S.css("display","");!F.support.opacity&&T.opacity&&S[0].style.removeAttribute("filter")}var Q=this,O=this.options,M=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=F(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return F("a",this)[0]});this.panels=F([]);this.anchors.each(function(U,W){var T=F(W).attr("href"),S=T.split("#")[0],V;if(S&&(S===location.toString().split("#")[0]||(V=F("base")[0])&&S===V.href)){T=W.hash;W.href=T}if(M.test(T)){Q.panels=Q.panels.add(Q.element.find(Q._sanitizeSelector(T)))}else{if(T&&T!=="#"){F.data(W,"href.tabs",T);F.data(W,"load.tabs",T.replace(/#.*$/,""));T=Q._tabId(W);W.href="#"+T;W=Q.element.find("#"+T);if(!W.length){W=F(O.panelTemplate).attr("id",T).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(Q.panels[U-1]||Q.list);W.data("destroy.tabs",true)}Q.panels=Q.panels.add(W)}else{O.disabled.push(U)}}});if(P){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(O.selected===E){location.hash&&this.anchors.each(function(S,T){if(T.hash==location.hash){O.selected=S;return false}});if(typeof O.selected!=="number"&&O.cookie){O.selected=parseInt(Q._cookie(),10)}if(typeof O.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){O.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}O.selected=O.selected||(this.lis.length?0:-1)}else{if(O.selected===null){O.selected=-1}}O.selected=O.selected>=0&&this.anchors[O.selected]||O.selected<0?O.selected:0;O.disabled=F.unique(O.disabled.concat(F.map(this.lis.filter(".ui-state-disabled"),function(S){return Q.lis.index(S)}))).sort();F.inArray(O.selected,O.disabled)!=-1&&O.disabled.splice(F.inArray(O.selected,O.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(O.selected>=0&&this.anchors.length){Q.element.find(Q._sanitizeSelector(Q.anchors[O.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(O.selected).addClass("ui-tabs-selected ui-state-active");Q.element.queue("tabs",function(){Q._trigger("show",null,Q._ui(Q.anchors[O.selected],Q.element.find(Q._sanitizeSelector(Q.anchors[O.selected].hash))[0]))});this.load(O.selected)}F(window).bind("unload",function(){Q.lis.add(Q.anchors).unbind(".tabs");Q.lis=Q.anchors=Q.panels=null})}else{O.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[O.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");O.cookie&&this._cookie(O.selected,O.cookie);P=0;for(var L;L=this.lis[P];P++){F(L)[F.inArray(P,O.disabled)!=-1&&!F(L).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}O.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(O.event!=="mouseover"){var K=function(S,T){T.is(":not(.ui-state-disabled)")&&T.addClass("ui-state-"+S)},I=function(S,T){T.removeClass("ui-state-"+S)};this.lis.bind("mouseover.tabs",function(){K("hover",F(this))});this.lis.bind("mouseout.tabs",function(){I("hover",F(this))});this.anchors.bind("focus.tabs",function(){K("focus",F(this).closest("li"))});this.anchors.bind("blur.tabs",function(){I("focus",F(this).closest("li"))})}var J,H;if(O.fx){if(F.isArray(O.fx)){J=O.fx[0];H=O.fx[1]}else{J=H=O.fx}}var G=H?function(S,T){F(S).closest("li").addClass("ui-tabs-selected ui-state-active");T.hide().removeClass("ui-tabs-hide").animate(H,H.duration||"normal",function(){N(T,H);Q._trigger("show",null,Q._ui(S,T[0]))})}:function(S,T){F(S).closest("li").addClass("ui-tabs-selected ui-state-active");T.removeClass("ui-tabs-hide");Q._trigger("show",null,Q._ui(S,T[0]))},R=J?function(S,T){T.animate(J,J.duration||"normal",function(){Q.lis.removeClass("ui-tabs-selected ui-state-active");T.addClass("ui-tabs-hide");N(T,J);Q.element.dequeue("tabs")})}:function(S,T){Q.lis.removeClass("ui-tabs-selected ui-state-active");T.addClass("ui-tabs-hide");Q.element.dequeue("tabs")};this.anchors.bind(O.event+".tabs",function(){var U=this,V=F(U).closest("li"),T=Q.panels.filter(":not(.ui-tabs-hide)"),S=Q.element.find(Q._sanitizeSelector(U.hash));if(V.hasClass("ui-tabs-selected")&&!O.collapsible||V.hasClass("ui-state-disabled")||V.hasClass("ui-state-processing")||Q.panels.filter(":animated").length||Q._trigger("select",null,Q._ui(this,S[0]))===false){this.blur();return false}O.selected=Q.anchors.index(this);Q.abort();if(O.collapsible){if(V.hasClass("ui-tabs-selected")){O.selected=-1;O.cookie&&Q._cookie(O.selected,O.cookie);Q.element.queue("tabs",function(){R(U,T)}).dequeue("tabs");this.blur();return false}else{if(!T.length){O.cookie&&Q._cookie(O.selected,O.cookie);Q.element.queue("tabs",function(){G(U,S)});Q.load(Q.anchors.index(this));this.blur();return false}}}O.cookie&&Q._cookie(O.selected,O.cookie);if(S.length){T.length&&Q.element.queue("tabs",function(){R(U,T)});Q.element.queue("tabs",function(){G(U,S)});Q.load(Q.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}F.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(G){if(typeof G=="string"){G=this.anchors.index(this.anchors.filter("[href$="+G+"]"))}return G},destroy:function(){var G=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var I=F.data(this,"href.tabs");if(I){this.href=I}var H=F(this).unbind(".tabs");F.each(["href","load","cache"],function(K,J){H.removeData(J+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){F.data(this,"destroy.tabs")?F(this).remove():F(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});G.cookie&&this._cookie(null,G.cookie);return this},add:function(G,K,H){if(H===E){H=this.anchors.length}var L=this,J=this.options;K=F(J.tabTemplate.replace(/#\{href\}/g,G).replace(/#\{label\}/g,K));G=!G.indexOf("#")?G.replace("#",""):this._tabId(F("a",K)[0]);K.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var I=L.element.find("#"+G);I.length||(I=F(J.panelTemplate).attr("id",G).data("destroy.tabs",true));I.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(H>=this.lis.length){K.appendTo(this.list);I.appendTo(this.list[0].parentNode)}else{K.insertBefore(this.lis[H]);I.insertBefore(this.panels[H])}J.disabled=F.map(J.disabled,function(M){return M>=H?++M:M});this._tabify();if(this.anchors.length==1){J.selected=0;K.addClass("ui-tabs-selected ui-state-active");I.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){L._trigger("show",null,L._ui(L.anchors[0],L.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[H],this.panels[H]));return this},remove:function(G){G=this._getIndex(G);var I=this.options,H=this.lis.eq(G).remove(),J=this.panels.eq(G).remove();if(H.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(G+(G+1<this.anchors.length?1:-1))}I.disabled=F.map(F.grep(I.disabled,function(K){return K!=G}),function(K){return K>=G?--K:K});this._tabify();this._trigger("remove",null,this._ui(H.find("a")[0],J[0]));return this},enable:function(G){G=this._getIndex(G);var H=this.options;if(F.inArray(G,H.disabled)!=-1){this.lis.eq(G).removeClass("ui-state-disabled");H.disabled=F.grep(H.disabled,function(I){return I!=G});this._trigger("enable",null,this._ui(this.anchors[G],this.panels[G]));return this}},disable:function(G){G=this._getIndex(G);var H=this.options;if(G!=H.selected){this.lis.eq(G).addClass("ui-state-disabled");H.disabled.push(G);H.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[G],this.panels[G]))}return this},select:function(G){G=this._getIndex(G);if(G==-1){if(this.options.collapsible&&this.options.selected!=-1){G=this.options.selected}else{return this}}this.anchors.eq(G).trigger(this.options.event+".tabs");return this},load:function(G){G=this._getIndex(G);var K=this,H=this.options,L=this.anchors.eq(G)[0],J=F.data(L,"load.tabs");this.abort();if(!J||this.element.queue("tabs").length!==0&&F.data(L,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(G).addClass("ui-state-processing");if(H.spinner){var I=F("span",L);I.data("label.tabs",I.html()).html(H.spinner)}this.xhr=F.ajax(F.extend({},H.ajaxOptions,{url:J,success:function(N,O){K.element.find(K._sanitizeSelector(L.hash)).html(N);K._cleanup();H.cache&&F.data(L,"cache.tabs",true);K._trigger("load",null,K._ui(K.anchors[G],K.panels[G]));try{H.ajaxOptions.success(N,O)}catch(M){}},error:function(N,O){K._cleanup();K._trigger("load",null,K._ui(K.anchors[G],K.panels[G]));try{H.ajaxOptions.error(N,O,G,L)}catch(M){}}}));K.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(G,H){this.anchors.eq(G).removeData("cache.tabs").data("load.tabs",H);return this},length:function(){return this.anchors.length}});F.extend(F.ui.tabs,{version:"1.8.14"});F.extend(F.ui.tabs.prototype,{rotation:null,rotate:function(G,J){var H=this,K=this.options,I=H._rotate||(H._rotate=function(L){clearTimeout(H.rotation);H.rotation=setTimeout(function(){var M=K.selected;H.select(++M<H.anchors.length?M:0)},G);L&&L.stopPropagation()});J=H._unrotate||(H._unrotate=!J?function(L){L.clientX&&H.rotate(null)}:function(){t=K.selected;I()});if(G){this.element.bind("tabsshow",I);this.anchors.bind(K.event+".tabs",J);I()}else{clearTimeout(H.rotation);this.element.unbind("tabsshow",I);this.anchors.unbind(K.event+".tabs",J);delete this._rotate;delete this._unrotate}return this}})})(jQuery);(function(d,C){function M(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=N(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function N(a){return a.bind("mouseout",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b){if(b[c]==null||b[c]==C){a[c]=b[c]}}return a}d.extend(d.ui,{datepicker:{version:"1.8.14"}});var A=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input"){this._connectDatepicker(a,i)}else{f&&this._inlineDatepicker(a,i)}},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c=="focus"||c=="both"){a.focus(this._showDatepicker)}if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++){if(f[g].length>h){h=f[g].length;i=g}}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos){this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(e=="div"||e=="span"){b.removeClass(this.markerClassName).empty()}}}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string"){return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?d.extend({},e.settings):this._get(e,b):null}var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,"max");H(e.settings,f);if(i!==null&&f.dateFormat!==C&&f.minDate===C){e.settings.minDate=this._formatDate(e,i)}if(g!==null&&f.dateFormat!==C&&f.maxDate===C){e.settings.maxDate=this._formatDate(e,g)}this._attachments(d(a),e);this._autoSize(e);this._setDate(e,h);this._updateAlternate(e);this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if(d.datepicker._datepickerShowing){switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]?d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]):d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey){d.datepicker._clearDate(a.target)}c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey){d.datepicker._gotoToday(a.target)}c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?+1:-1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M")}break;case 38:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,-7,"D")}c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,e?-1:+1,"D")}c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey){d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M")}break;case 40:if(a.ctrlKey||a.metaKey){d.datepicker._adjustDate(a.target,+7,"D")}c=a.ctrlKey||a.metaKey;break;default:c=false}}else{if(a.keyCode==36&&a.ctrlKey){d.datepicker._showDatepicker(this)}else{c=false}}if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==C?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal){try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input"){a=d("input",a.parentNode)[0]}if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");H(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog){a.value=""}if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return !e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f){h()}b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));){a=a[b?"previousSibling":"nextSibling"]}a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b){b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])}},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))){if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_clickMonthYear:function(a){var b=this._getInst(d(a)[0]);b.input&&b._selectingMonthYear&&setTimeout(function(){b.input.focus()},0);b._selectingMonthYear=!b._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c){c.apply(a.input?a.input[0]:null,[b,a])}else{a.input&&a.input.trigger("change")}if(a.inline){this._updateDatepicker(a)}else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/86400000)/7)+1},parseDate:function(a,b,c){if(a==null||b==null){throw"Invalid arguments"}b=typeof b=="object"?b.toString():b+"";if(b==""){return null}var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=B+1<a.length&&a.charAt(B+1)==p)&&B++;return p},m=function(p){var D=o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&D?4:p=="o"?3:2)+"}");p=b.substring(q).match(p);if(!p){throw"Missing number at position "+q}q+=p[0].length;return parseInt(p[0],10)},n=function(p,D,K){p=d.map(o(p)?K:D,function(w,x){return[[x,w]]}).sort(function(w,x){return -(w[1].length-x[1].length)});var E=-1;d.each(p,function(w,x){w=x[1];if(b.substr(q,w.length).toLowerCase()==w.toLowerCase()){E=x[0];q+=w.length;return false}});if(E!=-1){return E+1}else{throw"Unknown name at position "+q}},s=function(){if(b.charAt(q)!=a.charAt(B)){throw"Unexpected literal at position "+q}q++},q=0,B=0;B<a.length;B++){if(k){if(a.charAt(B)=="'"&&!o("'")){k=false}else{s()}}else{switch(a.charAt(B)){case"d":l=m("d");break;case"D":n("D",f,h);break;case"o":u=m("o");break;case"m":j=m("m");break;case"M":j=n("M",i,g);break;case"y":c=m("y");break;case"@":var v=new Date(m("@"));c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case"!":v=new Date((m("!")-this._ticksTo1970)/10000);c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case"'":if(o("'")){s()}else{k=true}break;default:s()}}}if(q<b.length){throw"Extra/unparsed characters found in date: "+b.substring(q)}if(c==-1){c=(new Date).getFullYear()}else{if(c<100){c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100)}}if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e){break}j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l){throw"Invalid date"}return v},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*10000000,formatDate:function(a,b,c){if(!b){return""}var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o)){for(;m.length<n;){m="0"+m}}return m},j=function(o,m,n,s){return i(o)?s[m]:n[m]},l="",u=false;if(b){for(var k=0;k<a.length;k++){if(u){if(a.charAt(k)=="'"&&!i("'")){u=false}else{l+=a.charAt(k)}}else{switch(a.charAt(k)){case"d":l+=g("d",b.getDate(),2);break;case"D":l+=j("D",b.getDay(),e,f);break;case"o":l+=g("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/86400000),3);break;case"m":l+=g("m",b.getMonth()+1,2);break;case"M":l+=j("M",b.getMonth(),h,c);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=b.getTime()*10000+this._ticksTo1970;break;case"'":if(i("'")){l+="'"}else{u=true}break;default:l+=a.charAt(k)}}}}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=0;f<a.length;f++){if(c){if(a.charAt(f)=="'"&&!e("'")){c=false}else{b+=a.charAt(f)}}else{switch(a.charAt(f)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":if(e("'")){b+="'"}else{c=true}break;default:b+=a.charAt(f)}}}return b},_get:function(a,b){return a.settings[b]!==C?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case"d":case"D":g+=parseInt(k[1],10);break;case"w":case"W":g+=parseInt(k[1],10)*7;break;case"m":case"M":l+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case"y":case"Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a){return null}a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c){this._notifyChange(a)}this._adjustInstDate(a);if(a.input){a.input.val(e?"":this._formatDate(a))}},_getDate:function(a){return !a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+A+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m,g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+A+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&&a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+A+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,s)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+A+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),B=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x<i[0];x++){var O="";this.maxRows=4;for(var G=0;G<i[1];G++){var P=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",y="";if(l){y+='<div class="ui-datepicker-group';if(i[1]>1){switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}}y+='">'}y+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,B,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+s[r]+'">'+q[r]+"</span></th>"}y+=z+"</tr></thead><tbody>";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth){a.selectedDay=Math.min(a.selectedDay,z)}t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q<z;Q++){y+="<tr>";var R=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(r)+"</td>";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r<k||o&&r>o;R+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(r.getTime()==P.getTime()&&g==a.selectedMonth&&a._keyEvent||E.getTime()==r.getTime()&&E.getTime()==P.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!D?"":" "+I[1]+(r.getTime()==u.getTime()?" "+this._currentClass:"")+(r.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!F||D)&&I[2]?' title="'+I[2]+'"':"")+(L?"":' onclick="DP_jQuery_'+A+".datepicker._selectDay('#"+a.id+"',"+r.getMonth()+","+r.getFullYear()+', this);return false;"')+">"+(F&&!D?"&#xa0;":L?'<span class="ui-state-default">'+r.getDate()+"</span>":'<a class="ui-state-default'+(r.getTime()==b.getTime()?" ui-state-highlight":"")+(r.getTime()==u.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+'" href="#">'+r.getDate()+"</a>")+"</td>";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+"</tr>"}g++;if(g>11){g=0;m++}y+="</tbody></table>"+(l?"</div>"+(i[0]>0&&G==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',o="";if(h||!j){o+='<span class="ui-datepicker-month">'+i[b]+"</span>"}else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+A+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+A+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var n=0;n<12;n++){if((!i||n>=e.getMonth())&&(!m||n<=f.getMonth())){o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>"}}o+="</select>"}u||(k+=o+(h||!(j&&l)?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(h||!l){k+='<span class="ui-datepicker-year">'+c+"</span>"}else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+A+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+A+".datepicker._clickMonthYear('#"+a.id+"');\">";b<=g;b++){a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>"}a.yearshtml+="</select>";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u){k+=(h||!(j&&l)?"&#xa0;":"")+o}k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y"){this._notifyChange(a)}},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b){b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])}},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length){return this}if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget")){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))}return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.14";window["DP_jQuery_"+A]=d})(jQuery);(function(A,B){A.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=A("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();A.Widget.prototype.destroy.apply(this,arguments)},value:function(C){if(C===B){return this._value()}this._setOption("value",C);return this},_setOption:function(C,D){if(C==="value"){this.options.value=D;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}A.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var C=this.options.value;if(typeof C!=="number"){C=0}return Math.min(this.options.max,Math.max(this.min,C))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var C=this.value(),D=this._percentage();if(this.oldValue!==C){this.oldValue=C;this._trigger("change")}this.valueDiv.toggle(C>this.min).toggleClass("ui-corner-right",C===this.options.max).width(D.toFixed(0)+"%");this.element.attr("aria-valuenow",C)}});A.extend(A.ui.progressbar,{version:"1.8.14"})})(jQuery);jQuery.effects||function(I,H){function E(N){var M;if(N&&N.constructor==Array&&N.length==3){return N}if(M=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(N)){return[parseInt(M[1],10),parseInt(M[2],10),parseInt(M[3],10)]}if(M=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(N)){return[parseFloat(M[1])*2.55,parseFloat(M[2])*2.55,parseFloat(M[3])*2.55]}if(M=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(N)){return[parseInt(M[1],16),parseInt(M[2],16),parseInt(M[3],16)]}if(M=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(N)){return[parseInt(M[1]+M[1],16),parseInt(M[2]+M[2],16),parseInt(M[3]+M[3],16)]}if(/rgba\(0, 0, 0, 0\)/.exec(N)){return D.transparent}return D[I.trim(N).toLowerCase()]}function L(O,N){var M;do{M=I.curCSS(O,N);if(M!=""&&M!="transparent"||I.nodeName(O,"body")){break}N="backgroundColor"}while(O=O.parentNode);return E(M)}function C(){var Q=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,N={},M,P;if(Q&&Q.length&&Q[0]&&Q[Q[0]]){for(var O=Q.length;O--;){M=Q[O];if(typeof Q[M]=="string"){P=M.replace(/\-(\w)/g,function(S,R){return R.toUpperCase()});N[P]=Q[M]}}}else{for(M in Q){if(typeof Q[M]==="string"){N[M]=Q[M]}}}return N}function B(O){var N,M;for(N in O){M=O[N];if(M==null||I.isFunction(M)||N in K||/scrollbar/.test(N)||!/color/i.test(N)&&isNaN(parseFloat(M))){delete O[N]}}return O}function J(P,N){var M={_:0},O;for(O in N){if(P[O]!=N[O]){M[O]=N[O]}}return M}function G(P,N,M,O){if(typeof P=="object"){O=N;M=null;N=P;P=N.effect}if(I.isFunction(N)){O=N;M=null;N={}}if(typeof N=="number"||I.fx.speeds[N]){O=M;M=N;N={}}if(I.isFunction(M)){O=M;M=null}N=N||{};M=M||N.duration;M=I.fx.off?0:typeof M=="number"?M:M in I.fx.speeds?I.fx.speeds[M]:I.fx.speeds._default;O=O||N.complete;return[P,N,M,O]}function F(M){if(!M||typeof M==="number"||I.fx.speeds[M]){return true}if(typeof M==="string"&&!I.effects[M]){return true}return false}I.effects={};I.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(N,M){I.fx.step[M]=function(O){if(!O.colorInit){O.start=L(O.elem,M);O.end=E(O.end);O.colorInit=true}O.elem.style[M]="rgb("+Math.max(Math.min(parseInt(O.pos*(O.end[0]-O.start[0])+O.start[0],10),255),0)+","+Math.max(Math.min(parseInt(O.pos*(O.end[1]-O.start[1])+O.start[1],10),255),0)+","+Math.max(Math.min(parseInt(O.pos*(O.end[2]-O.start[2])+O.start[2],10),255),0)+")"}});var D={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],transparent:[255,255,255]},A=["add","remove","toggle"],K={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};I.effects.animateClass=function(P,N,M,O){if(I.isFunction(M)){O=M;M=null}return this.queue(function(){var U=I(this),T=U.attr("style")||" ",R=B(C.call(this)),S,Q=U.attr("class");I.each(A,function(V,W){P[W]&&U[W+"Class"](P[W])});S=B(C.call(this));U.attr("class",Q);U.animate(J(R,S),{queue:false,duration:N,easing:M,complete:function(){I.each(A,function(V,W){P[W]&&U[W+"Class"](P[W])});if(typeof U.attr("style")=="object"){U.attr("style").cssText="";U.attr("style").cssText=T}else{U.attr("style",T)}O&&O.apply(this,arguments);I.dequeue(this)}})})};I.fn.extend({_addClass:I.fn.addClass,addClass:function(P,N,M,O){return N?I.effects.animateClass.apply(this,[{add:P},N,M,O]):this._addClass(P)},_removeClass:I.fn.removeClass,removeClass:function(P,N,M,O){return N?I.effects.animateClass.apply(this,[{remove:P},N,M,O]):this._removeClass(P)},_toggleClass:I.fn.toggleClass,toggleClass:function(Q,N,M,P,O){return typeof N=="boolean"||N===H?M?I.effects.animateClass.apply(this,[N?{add:Q}:{remove:Q},M,P,O]):this._toggleClass(Q,N):I.effects.animateClass.apply(this,[{toggle:Q},N,M,P])},switchClass:function(Q,N,M,P,O){return I.effects.animateClass.apply(this,[{add:N,remove:Q},M,P,O])}});I.extend(I.effects,{version:"1.8.14",save:function(O,N){for(var M=0;M<N.length;M++){N[M]!==null&&O.data("ec.storage."+N[M],O[0].style[N[M]])}},restore:function(O,N){for(var M=0;M<N.length;M++){N[M]!==null&&O.css(N[M],O.data("ec.storage."+N[M]))}},setMode:function(N,M){if(M=="toggle"){M=N.is(":hidden")?"show":"hide"}return M},getBaseline:function(O,N){var M;switch(O[0]){case"top":M=0;break;case"middle":M=0.5;break;case"bottom":M=1;break;default:M=O[0]/N.height}switch(O[1]){case"left":O=0;break;case"center":O=0.5;break;case"right":O=1;break;default:O=O[1]/N.width}return{x:O,y:M}},createWrapper:function(O){if(O.parent().is(".ui-effects-wrapper")){return O.parent()}var N={width:O.outerWidth(true),height:O.outerHeight(true),"float":O.css("float")},M=I("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});O.wrap(M);M=O.parent();if(O.css("position")=="static"){M.css({position:"relative"});O.css({position:"relative"})}else{I.extend(N,{position:O.css("position"),zIndex:O.css("z-index")});I.each(["top","left","bottom","right"],function(Q,P){N[P]=O.css(P);if(isNaN(parseInt(N[P],10))){N[P]="auto"}});O.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return M.css(N).show()},removeWrapper:function(M){if(M.parent().is(".ui-effects-wrapper")){return M.parent().replaceWith(M)}return M},setTransition:function(P,N,M,O){O=O||{};I.each(N,function(R,Q){unit=P.cssUnit(Q);if(unit[0]>0){O[Q]=unit[0]*M+unit[1]}});return O}});I.fn.extend({effect:function(P){var N=G.apply(this,arguments),M={options:N[1],duration:N[2],callback:N[3]};N=M.options.mode;var O=I.effects[P];if(I.fx.off||!O){return N?this[N](M.duration,M.callback):this.each(function(){M.callback&&M.callback.call(this)})}return O.call(this,M)},_show:I.fn.show,show:function(N){if(F(N)){return this._show.apply(this,arguments)}else{var M=G.apply(this,arguments);M[1].mode="show";return this.effect.apply(this,M)}},_hide:I.fn.hide,hide:function(N){if(F(N)){return this._hide.apply(this,arguments)}else{var M=G.apply(this,arguments);M[1].mode="hide";return this.effect.apply(this,M)}},__toggle:I.fn.toggle,toggle:function(N){if(F(N)||typeof N==="boolean"||I.isFunction(N)){return this.__toggle.apply(this,arguments)}else{var M=G.apply(this,arguments);M[1].mode="toggle";return this.effect.apply(this,M)}},cssUnit:function(O){var N=this.css(O),M=[];I.each(["em","px","%","pt"],function(Q,P){if(N.indexOf(P)>0){M=[parseFloat(N),P]}});return M}});I.easing.jswing=I.easing.swing;I.extend(I.easing,{def:"easeOutQuad",swing:function(Q,N,M,P,O){return I.easing[I.easing.def](Q,N,M,P,O)},easeInQuad:function(Q,N,M,P,O){return P*(N/=O)*N+M},easeOutQuad:function(Q,N,M,P,O){return -P*(N/=O)*(N-2)+M},easeInOutQuad:function(Q,N,M,P,O){if((N/=O/2)<1){return P/2*N*N+M}return -P/2*(--N*(N-2)-1)+M},easeInCubic:function(Q,N,M,P,O){return P*(N/=O)*N*N+M},easeOutCubic:function(Q,N,M,P,O){return P*((N=N/O-1)*N*N+1)+M},easeInOutCubic:function(Q,N,M,P,O){if((N/=O/2)<1){return P/2*N*N*N+M}return P/2*((N-=2)*N*N+2)+M},easeInQuart:function(Q,N,M,P,O){return P*(N/=O)*N*N*N+M},easeOutQuart:function(Q,N,M,P,O){return -P*((N=N/O-1)*N*N*N-1)+M},easeInOutQuart:function(Q,N,M,P,O){if((N/=O/2)<1){return P/2*N*N*N*N+M}return -P/2*((N-=2)*N*N*N-2)+M},easeInQuint:function(Q,N,M,P,O){return P*(N/=O)*N*N*N*N+M},easeOutQuint:function(Q,N,M,P,O){return P*((N=N/O-1)*N*N*N*N+1)+M},easeInOutQuint:function(Q,N,M,P,O){if((N/=O/2)<1){return P/2*N*N*N*N*N+M}return P/2*((N-=2)*N*N*N*N+2)+M},easeInSine:function(Q,N,M,P,O){return -P*Math.cos(N/O*(Math.PI/2))+P+M},easeOutSine:function(Q,N,M,P,O){return P*Math.sin(N/O*(Math.PI/2))+M},easeInOutSine:function(Q,N,M,P,O){return -P/2*(Math.cos(Math.PI*N/O)-1)+M},easeInExpo:function(Q,N,M,P,O){return N==0?M:P*Math.pow(2,10*(N/O-1))+M},easeOutExpo:function(Q,N,M,P,O){return N==O?M+P:P*(-Math.pow(2,-10*N/O)+1)+M},easeInOutExpo:function(Q,N,M,P,O){if(N==0){return M}if(N==O){return M+P}if((N/=O/2)<1){return P/2*Math.pow(2,10*(N-1))+M}return P/2*(-Math.pow(2,-10*--N)+2)+M},easeInCirc:function(Q,N,M,P,O){return -P*(Math.sqrt(1-(N/=O)*N)-1)+M},easeOutCirc:function(Q,N,M,P,O){return P*Math.sqrt(1-(N=N/O-1)*N)+M},easeInOutCirc:function(Q,N,M,P,O){if((N/=O/2)<1){return -P/2*(Math.sqrt(1-N*N)-1)+M}return P/2*(Math.sqrt(1-(N-=2)*N)+1)+M},easeInElastic:function(S,N,M,R,Q){S=1.70158;var P=0,O=R;if(N==0){return M}if((N/=Q)==1){return M+R}P||(P=Q*0.3);if(O<Math.abs(R)){O=R;S=P/4}else{S=P/(2*Math.PI)*Math.asin(R/O)}return -(O*Math.pow(2,10*(N-=1))*Math.sin((N*Q-S)*2*Math.PI/P))+M},easeOutElastic:function(S,N,M,R,Q){S=1.70158;var P=0,O=R;if(N==0){return M}if((N/=Q)==1){return M+R}P||(P=Q*0.3);if(O<Math.abs(R)){O=R;S=P/4}else{S=P/(2*Math.PI)*Math.asin(R/O)}return O*Math.pow(2,-10*N)*Math.sin((N*Q-S)*2*Math.PI/P)+R+M},easeInOutElastic:function(S,N,M,R,Q){S=1.70158;var P=0,O=R;if(N==0){return M}if((N/=Q/2)==2){return M+R}P||(P=Q*0.3*1.5);if(O<Math.abs(R)){O=R;S=P/4}else{S=P/(2*Math.PI)*Math.asin(R/O)}if(N<1){return -0.5*O*Math.pow(2,10*(N-=1))*Math.sin((N*Q-S)*2*Math.PI/P)+M}return O*Math.pow(2,-10*(N-=1))*Math.sin((N*Q-S)*2*Math.PI/P)*0.5+R+M},easeInBack:function(R,N,M,Q,P,O){if(O==H){O=1.70158}return Q*(N/=P)*N*((O+1)*N-O)+M},easeOutBack:function(R,N,M,Q,P,O){if(O==H){O=1.70158}return Q*((N=N/P-1)*N*((O+1)*N+O)+1)+M},easeInOutBack:function(R,N,M,Q,P,O){if(O==H){O=1.70158}if((N/=P/2)<1){return Q/2*N*N*(((O*=1.525)+1)*N-O)+M}return Q/2*((N-=2)*N*(((O*=1.525)+1)*N+O)+2)+M},easeInBounce:function(Q,N,M,P,O){return P-I.easing.easeOutBounce(Q,O-N,0,P,O)+M},easeOutBounce:function(Q,N,M,P,O){return(N/=O)<1/2.75?P*7.5625*N*N+M:N<2/2.75?P*(7.5625*(N-=1.5/2.75)*N+0.75)+M:N<2.5/2.75?P*(7.5625*(N-=2.25/2.75)*N+0.9375)+M:P*(7.5625*(N-=2.625/2.75)*N+0.984375)+M},easeInOutBounce:function(Q,N,M,P,O){if(N<O/2){return I.easing.easeInBounce(Q,N*2,0,P,O)*0.5+M}return I.easing.easeOutBounce(Q,N*2-O,0,P,O)*0.5+P*0.5+M}})}(jQuery);(function(A){A.effects.blind=function(B){return this.queue(function(){var C=A(this),F=["position","top","bottom","left","right"],G=A.effects.setMode(C,B.options.mode||"hide"),I=B.options.direction||"vertical";A.effects.save(C,F);C.show();var H=A.effects.createWrapper(C).css({overflow:"hidden"}),E=I=="vertical"?"height":"width";I=I=="vertical"?H.height():H.width();G=="show"&&H.css(E,0);var D={};D[E]=G=="show"?I:0;H.animate(D,B.duration,B.options.easing,function(){G=="hide"&&C.hide();A.effects.restore(C,F);A.effects.removeWrapper(C);B.callback&&B.callback.apply(C[0],arguments);C.dequeue()})})}})(jQuery);(function(A){A.effects.bounce=function(B){return this.queue(function(){var M=A(this),D=["position","top","bottom","left","right"],H=A.effects.setMode(M,B.options.mode||"effect"),K=B.options.direction||"up",L=B.options.distance||20,C=B.options.times||5,G=B.duration||250;/show|hide/.test(H)&&D.push("opacity");A.effects.save(M,D);M.show();A.effects.createWrapper(M);var J=K=="up"||K=="down"?"top":"left";K=K=="up"||K=="left"?"pos":"neg";L=B.options.distance||(J=="top"?M.outerHeight({margin:true})/3:M.outerWidth({margin:true})/3);if(H=="show"){M.css("opacity",0).css(J,K=="pos"?-L:L)}if(H=="hide"){L/=C*2}H!="hide"&&C--;if(H=="show"){var I={opacity:1};I[J]=(K=="pos"?"+=":"-=")+L;M.animate(I,G/2,B.options.easing);L/=2;C--}for(I=0;I<C;I++){var F={},E={};F[J]=(K=="pos"?"-=":"+=")+L;E[J]=(K=="pos"?"+=":"-=")+L;M.animate(F,G/2,B.options.easing).animate(E,G/2,B.options.easing);L=H=="hide"?L*2:L/2}if(H=="hide"){I={opacity:0};I[J]=(K=="pos"?"-=":"+=")+L;M.animate(I,G/2,B.options.easing,function(){M.hide();A.effects.restore(M,D);A.effects.removeWrapper(M);B.callback&&B.callback.apply(this,arguments)})}else{F={};E={};F[J]=(K=="pos"?"-=":"+=")+L;E[J]=(K=="pos"?"+=":"-=")+L;M.animate(F,G/2,B.options.easing).animate(E,G/2,B.options.easing,function(){A.effects.restore(M,D);A.effects.removeWrapper(M);B.callback&&B.callback.apply(this,arguments)})}M.queue("fx",function(){M.dequeue()});M.dequeue()})}})(jQuery);(function(A){A.effects.clip=function(B){return this.queue(function(){var C=A(this),D=["position","top","bottom","left","right","height","width"],G=A.effects.setMode(C,B.options.mode||"hide"),I=B.options.direction||"vertical";A.effects.save(C,D);C.show();var H=A.effects.createWrapper(C).css({overflow:"hidden"});H=C[0].tagName=="IMG"?H:C;var F={size:I=="vertical"?"height":"width",position:I=="vertical"?"top":"left"};I=I=="vertical"?H.height():H.width();if(G=="show"){H.css(F.size,0);H.css(F.position,I/2)}var E={};E[F.size]=G=="show"?I:0;E[F.position]=G=="show"?0:I/2;H.animate(E,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){G=="hide"&&C.hide();A.effects.restore(C,D);A.effects.removeWrapper(C);B.callback&&B.callback.apply(C[0],arguments);C.dequeue()}})})}})(jQuery);(function(A){A.effects.drop=function(B){return this.queue(function(){var D=A(this),F=["position","top","bottom","left","right","opacity"],I=A.effects.setMode(D,B.options.mode||"hide"),C=B.options.direction||"left";A.effects.save(D,F);D.show();A.effects.createWrapper(D);var H=C=="up"||C=="down"?"top":"left";C=C=="up"||C=="left"?"pos":"neg";var G=B.options.distance||(H=="top"?D.outerHeight({margin:true})/2:D.outerWidth({margin:true})/2);if(I=="show"){D.css("opacity",0).css(H,C=="pos"?-G:G)}var E={opacity:I=="show"?1:0};E[H]=(I=="show"?C=="pos"?"+=":"-=":C=="pos"?"-=":"+=")+G;D.animate(E,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){I=="hide"&&D.hide();A.effects.restore(D,F);A.effects.removeWrapper(D);B.callback&&B.callback.apply(this,arguments);D.dequeue()}})})}})(jQuery);(function(A){A.effects.explode=function(B){return this.queue(function(){var J=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3,I=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3;B.options.mode=B.options.mode=="toggle"?A(this).is(":visible")?"hide":"show":B.options.mode;var C=A(this).show().css("visibility","hidden"),F=C.offset();F.top-=parseInt(C.css("marginTop"),10)||0;F.left-=parseInt(C.css("marginLeft"),10)||0;for(var E=C.outerWidth(true),D=C.outerHeight(true),H=0;H<J;H++){for(var G=0;G<I;G++){C.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-G*(E/I),top:-H*(D/J)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:E/I,height:D/J,left:F.left+G*(E/I)+(B.options.mode=="show"?(G-Math.floor(I/2))*(E/I):0),top:F.top+H*(D/J)+(B.options.mode=="show"?(H-Math.floor(J/2))*(D/J):0),opacity:B.options.mode=="show"?0:1}).animate({left:F.left+G*(E/I)+(B.options.mode=="show"?0:(G-Math.floor(I/2))*(E/I)),top:F.top+H*(D/J)+(B.options.mode=="show"?0:(H-Math.floor(J/2))*(D/J)),opacity:B.options.mode=="show"?1:0},B.duration||500)}}setTimeout(function(){B.options.mode=="show"?C.css({visibility:"visible"}):C.css({visibility:"visible"}).hide();B.callback&&B.callback.apply(C[0]);C.dequeue();A("div.ui-effects-explode").remove()},B.duration||500)})}})(jQuery);(function(A){A.effects.fade=function(B){return this.queue(function(){var D=A(this),C=A.effects.setMode(D,B.options.mode||"hide");D.animate({opacity:C},{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){B.callback&&B.callback.apply(this,arguments);D.dequeue()}})})}})(jQuery);(function(A){A.effects.fold=function(B){return this.queue(function(){var L=A(this),E=["position","top","bottom","left","right"],K=A.effects.setMode(L,B.options.mode||"hide"),H=B.options.size||15,G=!!B.options.horizFirst,D=B.duration?B.duration/2:A.fx.speeds._default/2;A.effects.save(L,E);L.show();var J=A.effects.createWrapper(L).css({overflow:"hidden"}),I=K=="show"!=G,C=I?["width","height"]:["height","width"];I=I?[J.width(),J.height()]:[J.height(),J.width()];var F=/([0-9]+)%/.exec(H);if(F){H=parseInt(F[1],10)/100*I[K=="hide"?0:1]}if(K=="show"){J.css(G?{height:0,width:H}:{height:H,width:0})}G={};F={};G[C[0]]=K=="show"?I[0]:H;F[C[1]]=K=="show"?I[1]:0;J.animate(G,D,B.options.easing).animate(F,D,B.options.easing,function(){K=="hide"&&L.hide();A.effects.restore(L,E);A.effects.removeWrapper(L);B.callback&&B.callback.apply(L[0],arguments);L.dequeue()})})}})(jQuery);(function(A){A.effects.highlight=function(B){return this.queue(function(){var C=A(this),E=["backgroundImage","backgroundColor","opacity"],F=A.effects.setMode(C,B.options.mode||"show"),D={backgroundColor:C.css("backgroundColor")};if(F=="hide"){D.opacity=0}A.effects.save(C,E);C.show().css({backgroundImage:"none",backgroundColor:B.options.color||"#ffff99"}).animate(D,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){F=="hide"&&C.hide();A.effects.restore(C,E);F=="show"&&!A.support.opacity&&this.style.removeAttribute("filter");B.callback&&B.callback.apply(this,arguments);C.dequeue()}})})}})(jQuery);(function(A){A.effects.pulsate=function(B){return this.queue(function(){var C=A(this),D=A.effects.setMode(C,B.options.mode||"show");times=(B.options.times||5)*2-1;duration=B.duration?B.duration/2:A.fx.speeds._default/2;isVisible=C.is(":visible");animateTo=0;if(!isVisible){C.css("opacity",0).show();animateTo=1}if(D=="hide"&&isVisible||D=="show"&&!isVisible){times--}for(D=0;D<times;D++){C.animate({opacity:animateTo},duration,B.options.easing);animateTo=(animateTo+1)%2}C.animate({opacity:animateTo},duration,B.options.easing,function(){animateTo==0&&C.hide();B.callback&&B.callback.apply(this,arguments)});C.queue("fx",function(){C.dequeue()}).dequeue()})}})(jQuery);(function(A){A.effects.puff=function(B){return this.queue(function(){var C=A(this),G=A.effects.setMode(C,B.options.mode||"hide"),F=parseInt(B.options.percent,10)||150,E=F/100,D={height:C.height(),width:C.width()};A.extend(B.options,{fade:true,mode:G,percent:G=="hide"?F:100,from:G=="hide"?D:{height:D.height*E,width:D.width*E}});C.effect("scale",B.options,B.duration,B.callback);C.dequeue()})};A.effects.scale=function(B){return this.queue(function(){var C=A(this),H=A.extend(true,{},B.options),F=A.effects.setMode(C,B.options.mode||"effect"),E=parseInt(B.options.percent,10)||(parseInt(B.options.percent,10)==0?0:F=="hide"?0:100),D=B.options.direction||"both",G=B.options.origin;if(F!="effect"){H.origin=G||["middle","center"];H.restore=true}G={height:C.height(),width:C.width()};C.from=B.options.from||(F=="show"?{height:0,width:0}:G);E={y:D!="horizontal"?E/100:1,x:D!="vertical"?E/100:1};C.to={height:G.height*E.y,width:G.width*E.x};if(B.options.fade){if(F=="show"){C.from.opacity=0;C.to.opacity=1}if(F=="hide"){C.from.opacity=1;C.to.opacity=0}}H.from=C.from;H.to=C.to;H.mode=F;C.effect("size",H,B.duration,B.callback);C.dequeue()})};A.effects.size=function(B){return this.queue(function(){var O=A(this),M=["position","top","bottom","left","right","width","height","overflow","opacity"],K=["position","top","bottom","left","right","overflow","opacity"],J=["width","height","overflow"],I=["fontSize"],L=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],G=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],C=A.effects.setMode(O,B.options.mode||"effect"),D=B.options.restore||false,E=B.options.scale||"both",F=B.options.origin,H={height:O.height(),width:O.width()};O.from=B.options.from||H;O.to=B.options.to||H;if(F){F=A.effects.getBaseline(F,H);O.from.top=(H.height-O.from.height)*F.y;O.from.left=(H.width-O.from.width)*F.x;O.to.top=(H.height-O.to.height)*F.y;O.to.left=(H.width-O.to.width)*F.x}var N={from:{y:O.from.height/H.height,x:O.from.width/H.width},to:{y:O.to.height/H.height,x:O.to.width/H.width}};if(E=="box"||E=="both"){if(N.from.y!=N.to.y){M=M.concat(L);O.from=A.effects.setTransition(O,L,N.from.y,O.from);O.to=A.effects.setTransition(O,L,N.to.y,O.to)}if(N.from.x!=N.to.x){M=M.concat(G);O.from=A.effects.setTransition(O,G,N.from.x,O.from);O.to=A.effects.setTransition(O,G,N.to.x,O.to)}}if(E=="content"||E=="both"){if(N.from.y!=N.to.y){M=M.concat(I);O.from=A.effects.setTransition(O,I,N.from.y,O.from);O.to=A.effects.setTransition(O,I,N.to.y,O.to)}}A.effects.save(O,D?M:K);O.show();A.effects.createWrapper(O);O.css("overflow","hidden").css(O.from);if(E=="content"||E=="both"){L=L.concat(["marginTop","marginBottom"]).concat(I);G=G.concat(["marginLeft","marginRight"]);J=M.concat(L).concat(G);O.find("*[width]").each(function(){child=A(this);D&&A.effects.save(child,J);var P={height:child.height(),width:child.width()};child.from={height:P.height*N.from.y,width:P.width*N.from.x};child.to={height:P.height*N.to.y,width:P.width*N.to.x};if(N.from.y!=N.to.y){child.from=A.effects.setTransition(child,L,N.from.y,child.from);child.to=A.effects.setTransition(child,L,N.to.y,child.to)}if(N.from.x!=N.to.x){child.from=A.effects.setTransition(child,G,N.from.x,child.from);child.to=A.effects.setTransition(child,G,N.to.x,child.to)}child.css(child.from);child.animate(child.to,B.duration,B.options.easing,function(){D&&A.effects.restore(child,J)})})}O.animate(O.to,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){O.to.opacity===0&&O.css("opacity",O.from.opacity);C=="hide"&&O.hide();A.effects.restore(O,D?M:K);A.effects.removeWrapper(O);B.callback&&B.callback.apply(this,arguments);O.dequeue()}})})}})(jQuery);(function(A){A.effects.shake=function(B){return this.queue(function(){var L=A(this),E=["position","top","bottom","left","right"];A.effects.setMode(L,B.options.mode||"effect");var K=B.options.direction||"left",J=B.options.distance||20,C=B.options.times||3,I=B.duration||B.options.duration||140;A.effects.save(L,E);L.show();A.effects.createWrapper(L);var H=K=="up"||K=="down"?"top":"left",G=K=="up"||K=="left"?"pos":"neg";K={};var F={},D={};K[H]=(G=="pos"?"-=":"+=")+J;F[H]=(G=="pos"?"+=":"-=")+J*2;D[H]=(G=="pos"?"-=":"+=")+J*2;L.animate(K,I,B.options.easing);for(J=1;J<C;J++){L.animate(F,I,B.options.easing).animate(D,I,B.options.easing)}L.animate(F,I,B.options.easing).animate(K,I/2,B.options.easing,function(){A.effects.restore(L,E);A.effects.removeWrapper(L);B.callback&&B.callback.apply(this,arguments)});L.queue("fx",function(){L.dequeue()});L.dequeue()})}})(jQuery);(function(A){A.effects.slide=function(B){return this.queue(function(){var D=A(this),F=["position","top","bottom","left","right"],H=A.effects.setMode(D,B.options.mode||"show"),C=B.options.direction||"left";A.effects.save(D,F);D.show();A.effects.createWrapper(D).css({overflow:"hidden"});var G=C=="up"||C=="down"?"top":"left";C=C=="up"||C=="left"?"pos":"neg";var I=B.options.distance||(G=="top"?D.outerHeight({margin:true}):D.outerWidth({margin:true}));if(H=="show"){D.css(G,C=="pos"?isNaN(I)?"-"+I:-I:I)}var E={};E[G]=(H=="show"?C=="pos"?"+=":"-=":C=="pos"?"-=":"+=")+I;D.animate(E,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){H=="hide"&&D.hide();A.effects.restore(D,F);A.effects.removeWrapper(D);B.callback&&B.callback.apply(this,arguments);D.dequeue()}})})}})(jQuery);(function(A){A.effects.transfer=function(B){return this.queue(function(){var C=A(this),F=A(B.options.to),E=F.offset();F={top:E.top,left:E.left,height:F.innerHeight(),width:F.innerWidth()};E=C.offset();var D=A('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(B.options.className).css({top:E.top,left:E.left,height:C.innerHeight(),width:C.innerWidth(),position:"absolute"}).animate(F,B.duration,B.options.easing,function(){D.remove();B.callback&&B.callback.apply(C[0],arguments);C.dequeue()})})}})(jQuery);(function(A){A.fn.supersubs=function(B){var C=A.extend({},A.fn.supersubs.defaults,B);return this.each(function(){var D=A(this);var E=A.meta?A.extend({},C,D.data()):C;var F=A('<li id="menu-fontsize">&#8212;</li>').css({"padding":0,"position":"absolute","top":"-999em","width":"auto"}).appendTo(D).width();A("#menu-fontsize").remove();$ULs=D.find("ul");$ULs.each(function(K){var J=$ULs.eq(K);var I=J.children();var G=I.children("a");var L=I.css("white-space","nowrap").css("float");var H=J.add(I).add(G).css({"float":"none","width":"auto"}).end().end()[0].clientWidth/F;H+=E.extraWidth;if(H>E.maxWidth){H=E.maxWidth}else{if(H<E.minWidth){H=E.minWidth}}H+="em";J.css("width",H);I.css({"float":L,"width":"100%","white-space":"normal"}).each(function(){var N=A(">ul",this);var M=N.css("left")!==undefined?"left":"right";N.css(M,H)})})})};A.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);(function(A){A.fn.hoverIntent=function(I,H){var J={sensitivity:7,interval:100,timeout:0};J=A.extend(J,H?{over:I,out:H}:I);var L,K,F,D;var E=function(M){L=M.pageX;K=M.pageY};var C=function(N,M){M.hoverIntent_t=clearTimeout(M.hoverIntent_t);if((Math.abs(F-L)+Math.abs(D-K))<J.sensitivity){A(M).unbind("mousemove",E);M.hoverIntent_s=1;return J.over.apply(M,[N])}else{F=L;D=K;M.hoverIntent_t=setTimeout(function(){C(N,M)},J.interval)}};var G=function(N,M){M.hoverIntent_t=clearTimeout(M.hoverIntent_t);M.hoverIntent_s=0;return J.out.apply(M,[N])};var B=function(P){var O=(P.type=="mouseover"?P.fromElement:P.toElement)||P.relatedTarget;while(O&&O!=this){try{O=O.parentNode}catch(P){O=this}}if(O==this){return false}var N=jQuery.extend({},P);var M=this;if(M.hoverIntent_t){M.hoverIntent_t=clearTimeout(M.hoverIntent_t)}if(P.type=="mouseover"){F=N.pageX;D=N.pageY;A(M).bind("mousemove",E);if(M.hoverIntent_s!=1){M.hoverIntent_t=setTimeout(function(){C(N,M)},J.interval)}}else{A(M).unbind("mousemove",E);if(M.hoverIntent_s==1){M.hoverIntent_t=setTimeout(function(){G(N,M)},J.timeout)}}};return this.mouseover(B).mouseout(B)}})(jQuery);if(!window.mapwithus){window.mapwithus={}}mapwithus.xd={xd:false,log:false,baseURL:"http://www.mapwith.us",baseContext:"",_xd:0,_script:[],_callback:[]};mapwithus.xd.setXD=function(A){mapwithus.xd.xd=A};mapwithus.xd.setLog=function(A){mapwithus.xd.log=A};mapwithus.xd.setBaseURL=function(A){mapwithus.xd.baseURL=A};mapwithus.xd.setBaseContext=function(A){mapwithus.xd.baseContext=A};mapwithus.xd.call=function(E,D,F){var A=mapwithus.xd._xd++;var C=[mapwithus.xd.xd?mapwithus.xd.baseURL:"",mapwithus.xd.baseContext,E,"?format=json","&_xd="+A,"&_ts="+new Date().getTime(),D.length>0?"&"+D:""].join("");var B=mapwithus.xd._script[A]=$(document.createElement("script")).attr({"id":"mapwithus-xd-"+A,"type":"text/javascript","src":C});mapwithus.xd._callback[A]=F;document.getElementsByTagName("head")[0].appendChild(B.get(0));if(mapwithus.xd.log&&window.console){if(console.groupCollapsed){console.groupCollapsed("mapwithus.xd.call [",A,"]: ",E)}if(console.groupEnd){console.groupEnd()}}};mapwithus.xd.callback=function(B){var A=B._xd;if(mapwithus.xd.log&&window.console){if(console.groupCollapsed){console.groupCollapsed("mapwithus.xd.callback [",A,"] ")}if(console.groupEnd){console.groupEnd()}}mapwithus.xd._callback[A](B);if(mapwithus.xd_script!=null){mapwithus.xd._script[A].remove()}mapwithus.xd._script[A]=null;mapwithus.xd._callback[A]=function(){}};mapwithus.xd.url=function(A,B){A=mapwithus.xd.baseContext+A;if(mapwithus.xd.xd||!!B){A=mapwithus.xd.baseURL+A}return A};mapwithus.xd.resource=function(A){if(mapwithus.xd.xd){A=mapwithus.xd.baseURL+A}return A};if(!window.mapwithus){window.mapwithus={}}mapwithus.session={postLogin:false};mapwithus.session.Session=function(){this.jsid=null,this.clientid=-1;this.nuid=-1;this.username=null;this.avatar=null;this.linkIcon=null;this.apikey=null;this.cipherModulus=null;this.cipherKey=null;this.loginMsgTimeout=null;this.nextPage=null;this.facebookMediaryHandle=null;this.whichLoginOption="MapWith.Us";this.hash=null;this.remember=false;this.loginPane=null;var A=this;mapwithus.xd.call("/getsession","networkid=5",function(B){A.getSession(B)})};mapwithus.session.Session.prototype.getSession=function(A){this.jsid=A.jsid;this.clientid=A.clientid;this.nuid=A.nuid;this.username=A.username;this.avatar=A.avatar;this.linkIcon=A.linkIcon;this.apikey=A.apikey;this.generateLoginPane();if(mapwithus.session.postLogin){if(this.clientid==-1){this.showLoginPane()}mapwithus.session.postLogin=false}};mapwithus.session.Session.prototype.setNextPage=function(A){this.nextPage=A};mapwithus.session.Session.prototype.generateLoginPane=function(){this.loginPane=$(document.createElement("div")).css({"display":"none"}).append($(document.createElement("div")).addClass("mwu-dialogbackground").css({"opacity":"0.4"}).attr({"id":"mwu-dialogbackground-div"})).append(this.loginPaneDialog=$(document.createElement("div")).attr({"id":"mwu-logindialogns"}).addClass("darkgraytext").append(this.loginPaneClose=$(document.createElement("div")).attr({"class":"mwu-logindialogx","href":"javascript:void(0)"}).append("X")).append("<!-- Login content -->").append(this.loginPaneContent=$(document.createElement("div")).css({"fontSize":"12pt"}).append($(document.createElement("div")).append($(document.createElement("div")).css({"fontSize":"14pt","margin":"10px 0px"}).append("Signin Options")).append(this.loginPaneShowLoginMapwithus=$(document.createElement("div")).attr({"id":"mwu-mwuloginoption"}).addClass("mwu-loginoption mwu-loginoptionselected")).append(this.loginPaneShowLoginGoogle=$(document.createElement("div")).attr({"id":"mwu-googleloginoption"}).addClass("mwu-loginoption")).append(this.loginPaneShowLoginOpenid=$(document.createElement("div")).attr({"id":"mwu-openidloginoption"}).addClass("mwu-loginoption")).append(this.loginPaneShowLoginFacebook=$(document.createElement("div")).attr({"id":"mwu-fbloginoption"}).addClass("mwu-loginoption")).append(this.loginPaneShowLoginTwitter=$(document.createElement("div")).attr({"id":"mwu-twitterloginoption"}).addClass("mwu-loginoption"))).append($(document.createElement("div")).css({"clear":"left","height":"5px"})).append($(document.createElement("div")).append(this.loginPaneMapwithus=$(document.createElement("div")).css({"height":"177px"}).append($(document.createElement("p")).append("Username:").append($(document.createElement("br"))).append(this.loginPaneMapwithusName=$(document.createElement("input")).attr({"name":"mwu-loginname","type":"text","tabindex":"1"}).css({"paddingTop":"5px","height":"20px","border":"2px solid silver"}))).append($(document.createElement("p")).append("Password:").append($(document.createElement("br"))).append(this.loginPaneMapwithusPass=$(document.createElement("input")).attr({"name":"mwu-loginpass","type":"password","tabindex":"2"}).css({"paddingTop":"5px","height":"20px","border":"2px solid silver"}))).append($(document.createElement("div")).append("Remember me").append($(document.createElement("input")).attr({"id":"loginrememberme","type":"checkbox","checked":"checked","tabindex":"3"}).css({"marginLeft":"4px"}))).append(this.loginPaneMapwithusMsg=$(document.createElement("div"))).append(this.loginPaneMapwithusLoginLink=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).append("Sign in")).append("&nbsp;").append($(document.createElement("span")).css({"fontSize":"16pt"}).append("|")).append("&nbsp;").append($(document.createElement("a")).attr({"href":mapwithus.xd.url("/forgot")}).append("I forgot my password"))).append(this.loginPaneOpenid=$(document.createElement("div")).css({"display":"none","height":"177px"}).append($(document.createElement("p")).append("OpenID allows you to use an existing identity to sign in to multiple websites, ").append("without the need to create or remember new login information.").append($(document.createElement("br"))).append($(document.createElement("br"))).append("If you want to create an OpenID or determine if you already have one, check the list of popular ").append($(document.createElement("a")).attr({"href":"http://openid.net/get-an-openid/"}).append("OpenID Providers"))).append($(document.createElement("div")).append("OpenID URL:").append($(document.createElement("br"))).append(this.loginPaneOpenidUrl=$(document.createElement("input")).attr({"type":"text","tabindex":"4","id":"mwu-openidurl"})).append(this.loginPaneOpenidLoginLink=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).css({"margin-left":"10px"}).append("Sign in")).append($(document.createElement("div")).css({"marginTop":"4px"}).append("Remember me").append($(document.createElement("input")).attr({"id":"openidrememberme","type":"checkbox","checked":"checked","tabindex":"3"}).css({"marginLeft":"4px"}))))).append(this.loginPaneFacebook=$(document.createElement("div")).css({"display":"none","height":"177px"}).append($(document.createElement("p")).append("Facebook Connect makes it easier for you to take your online identity with you all over the Web, ").append("share what you do online with your friends and stay updated on what they're doing.").append($(document.createElement("br"))).append($(document.createElement("br"))).append("Click the button below to sign in with your Facebook account.")).append(this.loginPaneFacebookLoginButton=$(document.createElement("div")).css({"marginTop":"25px"}).append(this.loginPaneFacebookLoginLink=$(document.createElement("a")).addClass("fbconnect_login_button FBConnectButton FBConnectButton_Large").attr({"href":"javascript:void(0)"}).append($(document.createElement("span")).addClass("FBConnectButton_Text").attr({"id":"RES_ID_fb_login_text"}).append("Connect with Facebook"))).append($(document.createElement("br"))).append($(document.createElement("br"))).append($(document.createElement("div")).append("Remember me&nbsp;").append($(document.createElement("input")).attr({"id":"facebookrememberme","type":"checkbox","checked":"checked"}))))).append(this.loginPaneGoogle=$(document.createElement("div")).css({"display":"none","fontSize":"12pt","height":"177px"}).append($(document.createElement("p")).append("Sign in using your ").append(this.loginPaneGoogleLoginLink=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).append($(document.createElement("img")).attr({"src":"http://www.google.com/favicon.ico"}).css({"border":"none","verticalAlign":"-3px"})).append("Google")).append(" account:")).append($(document.createElement("br"))).append($(document.createElement("div")).css({"marginTop":"12px"}).append(this.loginPaneGoogleLoginButton=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).append($(document.createElement("img")).attr({"src":mapwithus.xd.resource("/r/images/google-logo.png"),"alt":"Google logo"}).css({"border":"0"}))).append($(document.createElement("div")).append("Remember me").append($(document.createElement("input")).attr({"id":"googlerememberme","type":"checkbox","checked":"checked","tabIndex":"3"}).css({"marginLeft":"4px"}))))).append(this.loginPaneTwitter=$(document.createElement("div")).css({"display":"none","height":"177px"}).append($(document.createElement("p")).append("Signing in with your Twitter account provides an alternate way to log in to the site and allows you to post activity to your Twitter stream.").append($(document.createElement("br"))).append($(document.createElement("br"))).append("Click the button below to sign in with your Twitter account.")).append($(document.createElement("div")).css({"marginTop":"25px"}).append(this.loginPaneTwitterLoginLink=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).css({"color":"#FFF"}).append($(document.createElement("img")).attr({"src":mapwithus.xd.resource("/r/images/Sign-in-with-Twitter-darker.png")})))))).append("<!-- Displays login status -->").append(this.loginPaneMessage=$(document.createElement("div")).attr({"id":"mwu-loginmsgpane"})).append($(document.createElement("div")).css({"margin":"10px 0px","border":"1px solid gray","class":"mwu-loginmsgpane"})).append($(document.createElement("div")).css({"fontSize":"14pt","margin":"10px 0px"}).append("Or ").append($(document.createElement("a")).addClass("mediumgraytext").attr({"href":mapwithus.xd.url("/register")}).append("sign up")).append(" for a new account."))));var A=this;this.loginPaneClose.click(function(){A.closeLoginPane()});this.loginPaneShowLoginMapwithus.click(function(){A.showLoginOption("MapWith.Us")});this.loginPaneShowLoginGoogle.click(function(){A.showLoginOption("Google")});this.loginPaneShowLoginOpenid.click(function(){A.showLoginOption("OpenID")});this.loginPaneShowLoginFacebook.click(function(){A.showLoginOption("Facebook")});this.loginPaneShowLoginTwitter.click(function(){A.showLoginOption("Twitter")});this.loginPaneMapwithusName.keypress(function(B){if(mapwithus.util.enterPressed(B)){A.loginPaneMapwithusPass.focus()}});this.loginPaneMapwithusPass.keypress(function(B){if(mapwithus.util.enterPressed(B)){A.doLogin(A.nextPage)}});this.loginPaneMapwithusLoginLink.click(function(){A.doLogin(A.nextPage)});this.loginPaneOpenidUrl.keypress(function(B){if(mapwithus.util.enterPressed(B)){A.doOpenidLogin()}});this.loginPaneOpenidLoginLink.click(function(){A.doOpenidLogin()});this.loginPaneFacebookLoginLink.click(function(){A.invokeFacebookMediary()});this.loginPaneGoogleLoginLink.click(function(){A.doGoogleLogin()});this.loginPaneGoogleLoginButton.click(function(){A.loginPaneGoogleLoginLink.click()});this.loginPaneTwitterLoginLink.click(function(){A.doTwitterLogin()});$("body").append(this.loginPane)};mapwithus.session.Session.prototype.invokeFacebookMediary=function(){this.oldHash=window.location.hash;window.location.hash="";var D=$("#facebookrememberme");this.remember=(D.checked)?true:false;var B="?auto_redirect=true&cancel_url="+mapwithus.xd.url("/facebook/web.jsp",true);var A=mapwithus.xd.url("/facebook/web.jsp")+B;this.child=mapwithus.util.open(A,"mwuFbMediary");if(this.facebookMediaryHandle){clearInterval(this.facebookMediaryHandle)}var C=this;this.facebookMediaryHandle=setInterval(function(){C.checkFacebookMediary()},1000)};mapwithus.session.Session.prototype.checkFacebookMediary=function(){if(window.location.hash.length>1){this.hash=window.location.hash.substring(1);window.location.hash=this.oldHash;clearInterval(this.facebookMediaryHandle);if(this.child){this.child.close()}this.doFacebookLogin()}else{if(!this.child||this.child.closed){mapwithus.util.flashError("Facebook login was canceled.");clearInterval(this.facebookMediaryHandle)}}};mapwithus.session.Session.prototype.setLoginMsg=function(A){$("#mwu-loginmsgpane").html(A);if(this.loginMsgTimeout!=null){clearTimeout(this.loginMsgTimeout)}if(A.length>0){this.loginMsgTimeout=setTimeout(function(){this.loginMsgTimeout=null;$("#mwu-loginmsgpane").html("")},5000)}};mapwithus.session.Session.prototype.showLoginPane=function(A){if(mapwithus.xd.xd){this.launchRegister();return }if(A){this.setLoginMsg(A)}this.loginPane.show();this.showLoginOption(this.whichLoginOption)};mapwithus.session.Session.prototype.closeLoginPane=function(){this.loginPane.hide()};mapwithus.session.Session.prototype.closeFacebookFrame=function(){this.loginPaneFacebookX.hide();this.loginPaneFacebookFrame.hide()};mapwithus.session.Session.prototype.launchRegister=function(){window.top.location=mapwithus.xd.url("/register")+"?opener="+encodeURIComponent(window.top.location)};mapwithus.session.Session.prototype.showLoginOption=function(A){if(this.loginPane==null){return }$("div.mwu-loginoptionselected").removeClass("mwu-loginoptionselected");this.whichLoginOption=A;if(this.loginPaneMapwithus!=null){this.loginPaneMapwithus.hide()}this.loginPaneOpenid.hide();this.loginPaneFacebook.hide();this.loginPaneGoogle.hide();this.loginPaneTwitter.hide();if(A=="MapWith.Us"){this.loginPaneShowLoginMapwithus.addClass("mwu-loginoptionselected");this.loginPaneMapwithus.show();this.loginPaneMapwithusName.focus()}else{if(A=="OpenID"){this.loginPaneShowLoginOpenid.addClass("mwu-loginoptionselected");this.loginPaneOpenid.show();this.loginPaneOpenidUrl.focus()}else{if(A=="Facebook"){this.loginPaneShowLoginFacebook.addClass("mwu-loginoptionselected");this.loginPaneFacebook.show()}else{if(A=="Google"){this.loginPaneShowLoginGoogle.addClass("mwu-loginoptionselected");this.loginPaneGoogle.show()}else{if(A=="Twitter"){this.loginPaneShowLoginTwitter.addClass("mwu-loginoptionselected");this.loginPaneTwitter.show()}}}}}mapwithus.cookies.createCookie("login-opt",A,365)};mapwithus.session.Session.prototype.doLogin=function(A){var C=this.loginPaneMapwithusName.val();var E=this.loginPaneMapwithusPass.val();var G=$("#loginrememberme");var H=(G.is(":checked"))?true:false;if(C.length<1||E.length<1){this.setLoginMsg("Hello.");return }var D=this;var F=D.loginHandler;if(A){this.nextPage=A}this.setLoginMsg("Authenticating...");var B="action=key";this.loginCall(B,function(){D.finishLogin(C,E,H,function(I){D.loginHandler(I)})})};mapwithus.session.Session.prototype.finishLogin=function(B,D,F,E,C){var A="action=login&username="+encodeURIComponent(B)+"&password="+encodeURIComponent(mapwithus.cipher.encrypt(this.cipherModulus,this.cipherKey,D))+"&rememberme="+F;this.loginCall(A,E)};mapwithus.session.Session.prototype.loginHandler=function(D){if(D.msg){this.setLoginMsg(D.msg);return }if(this.nextPage){var A=this.nextPage;if($("#oauth_name")!=null&&$("#oauth_name").val().length>0){var C=$("#oauth_name").val();var E=$("#oauth_token").val();var B=$("#oauth_callback").val();A=A+"?oauth_name="+C+"&oauth_token="+E+"&oauth_callback="+B}window.location.href=A}else{window.location=window.location;window.location.reload(false)}};mapwithus.session.Session.prototype.doFacebookLogin=function(){this.setLoginMsg("Authenticating...");var A="fb_access_token="+this.hash+"&rememberme="+this.remember;mapwithus.xd.call("/facebook/connect/ConnectWebLogin",A,function(F){var G=F.success;if(G){window.location.reload(true)}else{var E=F.register;if(E){var D=F.url;var C=F.fbuid;var B="?fbreg=true";if(!!C){B+="&regfbuid="+C}window.location.href=D+B}else{}}})};mapwithus.session.Session.prototype.doOpenidLogin=function(G){var D=G?$(G).val():this.loginPaneOpenidUrl.val();if(D.length<1){this.setLoginMsg("Hello.");return }this.setLoginMsg("Authenticating...");var E=$("#openidrememberme");var F=(E.checked)?true:false;try{var B=mapwithus.xd.url("/openid/redirect?");var A="openid="+encodeURIComponent(D)+"&next="+window.location.href;if(F){A+="&rememberme=true"}window.location.href=B+A}catch(C){this.setLoginMsg("OpenID login is currently unavailable for this web site.")}};mapwithus.session.Session.prototype.doGoogleLogin=function(){this.setLoginMsg("Authenticating...");var D=$("#googlerememberme");var E=(D.checked)?true:false;try{var B=mapwithus.xd.url("/openid/redirect?");var A="openid="+encodeURIComponent("https://www.google.com/accounts/o8/id")+"&next="+window.location.href;if(E){A+="&rememberme=true"}window.location.href=B+A}catch(C){this.setLoginMsg("Google login is currently unavailable for this web site.")}};mapwithus.session.Session.prototype.doTwitterLogin=function(){try{var A=3;this.setLoginMsg("Authenticating...");window.location.href=mapwithus.xd.url("/oauth/linker?networkid="+A+"&next="+window.location.href)}catch(B){this.setLoginMsg("Twitter login is currently unavailable for this web site.")}};mapwithus.session.Session.prototype.doLogout=function(){this.loginCall("action=logout",function(A){window.location.reload(false)})};mapwithus.session.Session.prototype.loginCall=function(A,C){var B=this;mapwithus.xd.call("/LoginQuery",A,function(D){B.loginCallback(C,D)})};mapwithus.session.Session.prototype.loginCallback=function(D,C){var B=C.cmod;var A=C.ckey;this.setCipherKey(B,A);if(C.fblogout&&window.FB){FB.Connect.logout(function(E){})}if(D){D(C)}};mapwithus.session.Session.prototype.setCipherKey=function(A,B){this.cipherModulus=new BigInteger(A,16);this.cipherKey=new BigInteger(B,16)};if(!window.mapwithus){window.mapwithus={}}mapwithus.ajax={callPrefix:"",callSuffix:"",DEFAULT_TIMEOUT:0};mapwithus.ajax.setCallPrefix=function(A){mapwithus.ajax.callPrefix=A};mapwithus.ajax.setCallSuffix=function(A){mapwithus.ajax.callSuffix=A};mapwithus.ajax.prependAjaxPrefix=function(A){if(A.substr(0,mapwithus.ajax.callPrefix.length)!=mapwithus.ajax.callPrefix){return((typeof (mapwithus.ajax.callPrefix)=="undefined")?"":mapwithus.ajax.callPrefix)+A}else{return A}};mapwithus.ajax.appendAjaxSuffix=function(A){return A+((typeof (mapwithus.ajax.callSuffix)=="undefined")?"":mapwithus.ajax.callSuffix)};mapwithus.ajax.addAjaxPrefixSuffix=function(A){return mapwithus.ajax.appendAjaxSuffix(mapwithus.ajax.prependAjaxPrefix(A))};mapwithus.ajax.call=function(url,args,responder,options){if(args==null){args=""}if(!options){options={}}if(!options.method){options.method="post"}var readyfunc=function(data){var preJs,xml,postJs;if(options.returnResponse){responder(data)}else{if(options.returnRootNode){xml=mapwithus.util.tag(data,"data")[0];responder(xml)}else{if(options.delim!=null){var text=data.responseText;if($.browser.webkit){text=arguments[2].responseText}var tag=text.indexOf(options.delim);while(tag>=0&&text.length>(tag+5)){var nexttag=text.substring(tag+1).indexOf(options.delim);if(nexttag<0){break}tag+=nexttag+1}if(tag>=0){xml=text.substring(0,tag)}else{xml=text}if(tag>=0&&text.length>(tag+5)){postJs=text.substring(tag+5)}else{postJs=""}responder(xml);eval(postJs)}else{data=readyfunc.arguments[2].responseText;preJs=mapwithus.util.nvn(data,"preJs");xml=mapwithus.util.tag(data,"data")[0];postJs=mapwithus.util.nvn(data,"postJs");eval(preJs);responder(xml);eval(postJs)}}}};url=mapwithus.ajax.addAjaxPrefixSuffix(url);(function(_url,_args,_options,_readyfunc,_responder){$.ajax(_url,{method:_options.method,success:_readyfunc,error:_readyfunc,dataType:_options.responseType?_options.responseType:"xml",data:_args,query:{type:"smart",url:_url,args:_args,responder:_responder}})})(url,args,options,readyfunc,responder)};if(!window.mapwithus){window.mapwithus={}}mapwithus.session={postLogin:false};mapwithus.session.Session=function(){this.jsid=null,this.clientid=-1;this.nuid=-1;this.username=null;this.avatar=null;this.linkIcon=null;this.apikey=null;this.cipherModulus=null;this.cipherKey=null;this.loginMsgTimeout=null;this.nextPage=null;this.facebookMediaryHandle=null;this.whichLoginOption="MapWith.Us";this.hash=null;this.remember=false;this.loginPane=null;var A=this;mapwithus.xd.call("/getsession","networkid=5",function(B){A.getSession(B)})};mapwithus.session.Session.prototype.getSession=function(A){this.jsid=A.jsid;this.clientid=A.clientid;this.nuid=A.nuid;this.username=A.username;this.avatar=A.avatar;this.linkIcon=A.linkIcon;this.apikey=A.apikey;this.generateLoginPane();if(mapwithus.session.postLogin){if(this.clientid==-1){this.showLoginPane()}mapwithus.session.postLogin=false}};mapwithus.session.Session.prototype.setNextPage=function(A){this.nextPage=A};mapwithus.session.Session.prototype.generateLoginPane=function(){this.loginPane=$(document.createElement("div")).css({"display":"none"}).append($(document.createElement("div")).addClass("mwu-dialogbackground").css({"opacity":"0.4"}).attr({"id":"mwu-dialogbackground-div"})).append(this.loginPaneDialog=$(document.createElement("div")).attr({"id":"mwu-logindialogns"}).addClass("darkgraytext").append(this.loginPaneClose=$(document.createElement("div")).attr({"class":"mwu-logindialogx","href":"javascript:void(0)"}).append("X")).append("<!-- Login content -->").append(this.loginPaneContent=$(document.createElement("div")).css({"fontSize":"12pt"}).append($(document.createElement("div")).append($(document.createElement("div")).css({"fontSize":"14pt","margin":"10px 0px"}).append("Signin Options")).append(this.loginPaneShowLoginMapwithus=$(document.createElement("div")).attr({"id":"mwu-mwuloginoption"}).addClass("mwu-loginoption mwu-loginoptionselected")).append(this.loginPaneShowLoginGoogle=$(document.createElement("div")).attr({"id":"mwu-googleloginoption"}).addClass("mwu-loginoption")).append(this.loginPaneShowLoginOpenid=$(document.createElement("div")).attr({"id":"mwu-openidloginoption"}).addClass("mwu-loginoption")).append(this.loginPaneShowLoginFacebook=$(document.createElement("div")).attr({"id":"mwu-fbloginoption"}).addClass("mwu-loginoption")).append(this.loginPaneShowLoginTwitter=$(document.createElement("div")).attr({"id":"mwu-twitterloginoption"}).addClass("mwu-loginoption"))).append($(document.createElement("div")).css({"clear":"left","height":"5px"})).append($(document.createElement("div")).append(this.loginPaneMapwithus=$(document.createElement("div")).css({"height":"177px"}).append($(document.createElement("p")).append("Username:").append($(document.createElement("br"))).append(this.loginPaneMapwithusName=$(document.createElement("input")).attr({"name":"mwu-loginname","type":"text","tabindex":"1"}).css({"paddingTop":"5px","height":"20px","border":"2px solid silver"}))).append($(document.createElement("p")).append("Password:").append($(document.createElement("br"))).append(this.loginPaneMapwithusPass=$(document.createElement("input")).attr({"name":"mwu-loginpass","type":"password","tabindex":"2"}).css({"paddingTop":"5px","height":"20px","border":"2px solid silver"}))).append($(document.createElement("div")).append("Remember me").append($(document.createElement("input")).attr({"id":"loginrememberme","type":"checkbox","checked":"checked","tabindex":"3"}).css({"marginLeft":"4px"}))).append(this.loginPaneMapwithusMsg=$(document.createElement("div"))).append(this.loginPaneMapwithusLoginLink=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).append("Sign in")).append("&nbsp;").append($(document.createElement("span")).css({"fontSize":"16pt"}).append("|")).append("&nbsp;").append($(document.createElement("a")).attr({"href":mapwithus.xd.url("/forgot")}).append("I forgot my password"))).append(this.loginPaneOpenid=$(document.createElement("div")).css({"display":"none","height":"177px"}).append($(document.createElement("p")).append("OpenID allows you to use an existing identity to sign in to multiple websites, ").append("without the need to create or remember new login information.").append($(document.createElement("br"))).append($(document.createElement("br"))).append("If you want to create an OpenID or determine if you already have one, check the list of popular ").append($(document.createElement("a")).attr({"href":"http://openid.net/get-an-openid/"}).append("OpenID Providers"))).append($(document.createElement("div")).append("OpenID URL:").append($(document.createElement("br"))).append(this.loginPaneOpenidUrl=$(document.createElement("input")).attr({"type":"text","tabindex":"4","id":"mwu-openidurl"})).append(this.loginPaneOpenidLoginLink=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).css({"margin-left":"10px"}).append("Sign in")).append($(document.createElement("div")).css({"marginTop":"4px"}).append("Remember me").append($(document.createElement("input")).attr({"id":"openidrememberme","type":"checkbox","checked":"checked","tabindex":"3"}).css({"marginLeft":"4px"}))))).append(this.loginPaneFacebook=$(document.createElement("div")).css({"display":"none","height":"177px"}).append($(document.createElement("p")).append("Facebook Connect makes it easier for you to take your online identity with you all over the Web, ").append("share what you do online with your friends and stay updated on what they're doing.").append($(document.createElement("br"))).append($(document.createElement("br"))).append("Click the button below to sign in with your Facebook account.")).append(this.loginPaneFacebookLoginButton=$(document.createElement("div")).css({"marginTop":"25px"}).append(this.loginPaneFacebookLoginLink=$(document.createElement("a")).addClass("fbconnect_login_button FBConnectButton FBConnectButton_Large").attr({"href":"javascript:void(0)"}).append($(document.createElement("span")).addClass("FBConnectButton_Text").attr({"id":"RES_ID_fb_login_text"}).append("Connect with Facebook"))).append($(document.createElement("br"))).append($(document.createElement("br"))).append($(document.createElement("div")).append("Remember me&nbsp;").append($(document.createElement("input")).attr({"id":"facebookrememberme","type":"checkbox","checked":"checked"}))))).append(this.loginPaneGoogle=$(document.createElement("div")).css({"display":"none","fontSize":"12pt","height":"177px"}).append($(document.createElement("p")).append("Sign in using your ").append(this.loginPaneGoogleLoginLink=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).append($(document.createElement("img")).attr({"src":"http://www.google.com/favicon.ico"}).css({"border":"none","verticalAlign":"-3px"})).append("Google")).append(" account:")).append($(document.createElement("br"))).append($(document.createElement("div")).css({"marginTop":"12px"}).append(this.loginPaneGoogleLoginButton=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).append($(document.createElement("img")).attr({"src":mapwithus.xd.resource("/r/images/google-logo.png"),"alt":"Google logo"}).css({"border":"0"}))).append($(document.createElement("div")).append("Remember me").append($(document.createElement("input")).attr({"id":"googlerememberme","type":"checkbox","checked":"checked","tabIndex":"3"}).css({"marginLeft":"4px"}))))).append(this.loginPaneTwitter=$(document.createElement("div")).css({"display":"none","height":"177px"}).append($(document.createElement("p")).append("Signing in with your Twitter account provides an alternate way to log in to the site and allows you to post activity to your Twitter stream.").append($(document.createElement("br"))).append($(document.createElement("br"))).append("Click the button below to sign in with your Twitter account.")).append($(document.createElement("div")).css({"marginTop":"25px"}).append(this.loginPaneTwitterLoginLink=$(document.createElement("a")).attr({"href":"javascript:void(0)"}).css({"color":"#FFF"}).append($(document.createElement("img")).attr({"src":mapwithus.xd.resource("/r/images/Sign-in-with-Twitter-darker.png")})))))).append("<!-- Displays login status -->").append(this.loginPaneMessage=$(document.createElement("div")).attr({"id":"mwu-loginmsgpane"})).append($(document.createElement("div")).css({"margin":"10px 0px","border":"1px solid gray","class":"mwu-loginmsgpane"})).append($(document.createElement("div")).css({"fontSize":"14pt","margin":"10px 0px"}).append("Or ").append($(document.createElement("a")).addClass("mediumgraytext").attr({"href":mapwithus.xd.url("/register")}).append("sign up")).append(" for a new account."))));var A=this;this.loginPaneClose.click(function(){A.closeLoginPane()});this.loginPaneShowLoginMapwithus.click(function(){A.showLoginOption("MapWith.Us")});this.loginPaneShowLoginGoogle.click(function(){A.showLoginOption("Google")});this.loginPaneShowLoginOpenid.click(function(){A.showLoginOption("OpenID")});this.loginPaneShowLoginFacebook.click(function(){A.showLoginOption("Facebook")});this.loginPaneShowLoginTwitter.click(function(){A.showLoginOption("Twitter")});this.loginPaneMapwithusName.keypress(function(B){if(mapwithus.util.enterPressed(B)){A.loginPaneMapwithusPass.focus()}});this.loginPaneMapwithusPass.keypress(function(B){if(mapwithus.util.enterPressed(B)){A.doLogin(A.nextPage)}});this.loginPaneMapwithusLoginLink.click(function(){A.doLogin(A.nextPage)});this.loginPaneOpenidUrl.keypress(function(B){if(mapwithus.util.enterPressed(B)){A.doOpenidLogin()}});this.loginPaneOpenidLoginLink.click(function(){A.doOpenidLogin()});this.loginPaneFacebookLoginLink.click(function(){A.invokeFacebookMediary()});this.loginPaneGoogleLoginLink.click(function(){A.doGoogleLogin()});this.loginPaneGoogleLoginButton.click(function(){A.loginPaneGoogleLoginLink.click()});this.loginPaneTwitterLoginLink.click(function(){A.doTwitterLogin()});$("body").append(this.loginPane)};mapwithus.session.Session.prototype.invokeFacebookMediary=function(){this.oldHash=window.location.hash;window.location.hash="";var D=$("#facebookrememberme");this.remember=(D.checked)?true:false;var B="?auto_redirect=true&cancel_url="+mapwithus.xd.url("/facebook/web.jsp",true);var A=mapwithus.xd.url("/facebook/web.jsp")+B;this.child=mapwithus.util.open(A,"mwuFbMediary");if(this.facebookMediaryHandle){clearInterval(this.facebookMediaryHandle)}var C=this;this.facebookMediaryHandle=setInterval(function(){C.checkFacebookMediary()},1000)};mapwithus.session.Session.prototype.checkFacebookMediary=function(){if(window.location.hash.length>1){this.hash=window.location.hash.substring(1);window.location.hash=this.oldHash;clearInterval(this.facebookMediaryHandle);if(this.child){this.child.close()}this.doFacebookLogin()}else{if(!this.child||this.child.closed){mapwithus.util.flashError("Facebook login was canceled.");clearInterval(this.facebookMediaryHandle)}}};mapwithus.session.Session.prototype.setLoginMsg=function(A){$("#mwu-loginmsgpane").html(A);if(this.loginMsgTimeout!=null){clearTimeout(this.loginMsgTimeout)}if(A.length>0){this.loginMsgTimeout=setTimeout(function(){this.loginMsgTimeout=null;$("#mwu-loginmsgpane").html("")},5000)}};mapwithus.session.Session.prototype.showLoginPane=function(A){if(mapwithus.xd.xd){this.launchRegister();return }if(A){this.setLoginMsg(A)}this.loginPane.show();this.showLoginOption(this.whichLoginOption)};mapwithus.session.Session.prototype.closeLoginPane=function(){this.loginPane.hide()};mapwithus.session.Session.prototype.closeFacebookFrame=function(){this.loginPaneFacebookX.hide();this.loginPaneFacebookFrame.hide()};mapwithus.session.Session.prototype.launchRegister=function(){window.top.location=mapwithus.xd.url("/register")+"?opener="+encodeURIComponent(window.top.location)};mapwithus.session.Session.prototype.showLoginOption=function(A){if(this.loginPane==null){return }$("div.mwu-loginoptionselected").removeClass("mwu-loginoptionselected");this.whichLoginOption=A;if(this.loginPaneMapwithus!=null){this.loginPaneMapwithus.hide()}this.loginPaneOpenid.hide();this.loginPaneFacebook.hide();this.loginPaneGoogle.hide();this.loginPaneTwitter.hide();if(A=="MapWith.Us"){this.loginPaneShowLoginMapwithus.addClass("mwu-loginoptionselected");this.loginPaneMapwithus.show();this.loginPaneMapwithusName.focus()}else{if(A=="OpenID"){this.loginPaneShowLoginOpenid.addClass("mwu-loginoptionselected");this.loginPaneOpenid.show();this.loginPaneOpenidUrl.focus()}else{if(A=="Facebook"){this.loginPaneShowLoginFacebook.addClass("mwu-loginoptionselected");this.loginPaneFacebook.show()}else{if(A=="Google"){this.loginPaneShowLoginGoogle.addClass("mwu-loginoptionselected");this.loginPaneGoogle.show()}else{if(A=="Twitter"){this.loginPaneShowLoginTwitter.addClass("mwu-loginoptionselected");this.loginPaneTwitter.show()}}}}}mapwithus.cookies.createCookie("login-opt",A,365)};mapwithus.session.Session.prototype.doLogin=function(A){var C=this.loginPaneMapwithusName.val();var E=this.loginPaneMapwithusPass.val();var G=$("#loginrememberme");var H=(G.is(":checked"))?true:false;if(C.length<1||E.length<1){this.setLoginMsg("Hello.");return }var D=this;var F=D.loginHandler;if(A){this.nextPage=A}this.setLoginMsg("Authenticating...");var B="action=key";this.loginCall(B,function(){D.finishLogin(C,E,H,function(I){D.loginHandler(I)})})};mapwithus.session.Session.prototype.finishLogin=function(B,D,F,E,C){var A="action=login&username="+encodeURIComponent(B)+"&password="+encodeURIComponent(mapwithus.cipher.encrypt(this.cipherModulus,this.cipherKey,D))+"&rememberme="+F;this.loginCall(A,E)};mapwithus.session.Session.prototype.loginHandler=function(D){if(D.msg){this.setLoginMsg(D.msg);return }if(this.nextPage){var A=this.nextPage;if($("#oauth_name")!=null&&$("#oauth_name").val().length>0){var C=$("#oauth_name").val();var E=$("#oauth_token").val();var B=$("#oauth_callback").val();A=A+"?oauth_name="+C+"&oauth_token="+E+"&oauth_callback="+B}window.location.href=A}else{window.location=window.location;window.location.reload(false)}};mapwithus.session.Session.prototype.doFacebookLogin=function(){this.setLoginMsg("Authenticating...");var A="fb_access_token="+this.hash+"&rememberme="+this.remember;mapwithus.xd.call("/facebook/connect/ConnectWebLogin",A,function(F){var G=F.success;if(G){window.location.reload(true)}else{var E=F.register;if(E){var D=F.url;var C=F.fbuid;var B="?fbreg=true";if(!!C){B+="&regfbuid="+C}window.location.href=D+B}else{}}})};mapwithus.session.Session.prototype.doOpenidLogin=function(G){var D=G?$(G).val():this.loginPaneOpenidUrl.val();if(D.length<1){this.setLoginMsg("Hello.");return }this.setLoginMsg("Authenticating...");var E=$("#openidrememberme");var F=(E.checked)?true:false;try{var B=mapwithus.xd.url("/openid/redirect?");var A="openid="+encodeURIComponent(D)+"&next="+window.location.href;if(F){A+="&rememberme=true"}window.location.href=B+A}catch(C){this.setLoginMsg("OpenID login is currently unavailable for this web site.")}};mapwithus.session.Session.prototype.doGoogleLogin=function(){this.setLoginMsg("Authenticating...");var D=$("#googlerememberme");var E=(D.checked)?true:false;try{var B=mapwithus.xd.url("/openid/redirect?");var A="openid="+encodeURIComponent("https://www.google.com/accounts/o8/id")+"&next="+window.location.href;if(E){A+="&rememberme=true"}window.location.href=B+A}catch(C){this.setLoginMsg("Google login is currently unavailable for this web site.")}};mapwithus.session.Session.prototype.doTwitterLogin=function(){try{var A=3;this.setLoginMsg("Authenticating...");window.location.href=mapwithus.xd.url("/oauth/linker?networkid="+A+"&next="+window.location.href)}catch(B){this.setLoginMsg("Twitter login is currently unavailable for this web site.")}};mapwithus.session.Session.prototype.doLogout=function(){this.loginCall("action=logout",function(A){window.location.reload(false)})};mapwithus.session.Session.prototype.loginCall=function(A,C){var B=this;mapwithus.xd.call("/LoginQuery",A,function(D){B.loginCallback(C,D)})};mapwithus.session.Session.prototype.loginCallback=function(D,C){var B=C.cmod;var A=C.ckey;this.setCipherKey(B,A);if(C.fblogout&&window.FB){FB.Connect.logout(function(E){})}if(D){D(C)}};mapwithus.session.Session.prototype.setCipherKey=function(A,B){this.cipherModulus=new BigInteger(A,16);this.cipherKey=new BigInteger(B,16)};if(!window.mapwithus){window.mapwithus={}}mapwithus.util={};mapwithus.util.open=function(url,name,props){var windowRef;if(/*@cc_on!@*/false){windowRef=window.top.open("",name,props);windowRef.close()}windowRef=window.top.open(url,name,props);if(!windowRef.opener){windowRef.opener=window.top}windowRef.focus();return windowRef};mapwithus.util.chain=function(A,B){return(typeof A!=="function")?B:function(){var D=A.apply(this,arguments),C=B.apply(this,arguments);return(typeof D==="undefined")?C:(D&&C)}};mapwithus.util.addOnloadListener=function(A){if(window.addEventListener){window.addEventListener("load",A,false)}else{if(window.attachEvent){window.attachEvent("onload",A)}else{window.onload=mapwithus.util.chain(window.onload,A)}}};mapwithus.util.parseBoolean=function(A){if(typeof (A)=="boolean"){return A}if(!A){return false}return A.trim()=="true"};mapwithus.util.isDigit=function(B){var A=B.charCodeAt(0);return(A>=48&&A<=57)};mapwithus.util.isSpace=function(A){return A==" "};mapwithus.util.isDot=function(A){return A=="."};mapwithus.util.isDash=function(A){return A=="-"};mapwithus.util.isComma=function(A){return A==","};mapwithus.util.isZip=function(C){var B=true;for(var A=0;A<C.length;A++){if(!mapwithus.util.isDigit(C.charAt(A))){B=false}}return B};mapwithus.util.isGPS=function(C){var A=true;if(mapwithus.util.isZip(C)){return false}for(var B=0;B<C.length;B++){var D=C.charAt(B);if(mapwithus.util.isComma(D)){continue}if(!mapwithus.util.isDigit(D)&&!mapwithus.util.isSpace(D)&&!mapwithus.util.isDot(D)&&!mapwithus.util.isDash(D)){A=false;break}}return A};mapwithus.util.nobubble=function(A){if(!A){A=window.event}A.cancelBubble=true;if(A.stopPropagation){A.stopPropagation()}};mapwithus.util.flashNotice=function(A){if(typeof flashTimeout=="undefined"){flashTimeout=3000}$("#mwu-flashnoticemsg").append(A);$("#mwu-flashnotice").css({"height":"auto"});$("#mwu-flashnotice").slideDown("slow",function(){var B=function(){$("#mwu-flashnotice").slideUp("slow",function(){$("#mwu-flashnoticemsg").html("")})};setTimeout(B,flashTimeout)})};mapwithus.util.flashError=function(A){if(typeof flashTimeout=="undefined"){flashTimeout=3000}$("#mwu-flasherrormsg").append(A);$("#mwu-flasherror").css({"height":"auto"});$("#mwu-flasherror").slideDown("slow",function(){var B=function(){$("#mwu-flasherror").slideUp("slow",function(){$("#mwu-flasherrormsg").html("")})};setTimeout(B,flashTimeout)})};mapwithus.util.entify=function(C){var A=new StringBuffer();for(var B=0;B<C.length;B++){var E=C.charCodeAt(B);var D=String.fromCharCode(E);if(D=="<"){A.a("&lt;")}else{if(D==">"){A.a("&gt;")}else{if(D=="&"){A.a("&amp;")}else{if(E>127){A.a("&#"+E+";")}else{A.a(D)}}}}}return A.toString()};mapwithus.util.agesAgo=function(A){if(A<0){return"not long"}if(A<2){return"1 sec"}if(A<60){return A+" secs"}if(A<120){return"1 min"}if(A<3600){return parseInt(A/60)+" mins"}if(A<7200){return"1 hr"}if(A<86400){return parseInt(A/3600)+" hrs"}if(A<172800){return"1 day"}if(A<604800){return parseInt(A/86400)+" days"}if(A<1209600){return"1 wk"}if(A<2628000){return parseInt(A/604800)+" wks"}if(A<5256000){return"1 mo"}return parseInt(A/2628000)+" mos"};mapwithus.util.getParameterValue=function(B){B=B.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var A="[\\?&]"+B+"=([^&#]*)";var D=new RegExp(A);var C=D.exec(window.location.href);if(C==null){return""}else{return C[1]}};mapwithus.util.enterPressed=function(A){var B;if(window.event){B=window.event.keyCode}else{if(A.which){B=A.which}}if(B==13){return true}else{return false}};mapwithus.util.tabPressed=function(A){var B;if(window.event){B=window.event.keyCode}else{if(A.which){B=A.which}}if(B==9){return true}else{return false}};mapwithus.util.escPressed=function(C){var A=(window.event)?event.keyCode:C.keyCode;var B=(window.event)?27:C.DOM_VK_ESCAPE;if(A==B){return true}else{return false}};mapwithus.util.setupInputText=function(A,B){A.alt=B;A.onfocus=mapwithus.util.clearInputText(null,A);A.onblur=mapwithus.util.resetInputText(null,A);mapwithus.util.initInputText(A)};mapwithus.util.clearInputText=function(A){if(A.value==A.alt){A.value=""}A.removeClass("mwu-prompt")};mapwithus.util.resetInputText=function(A){if(A.value.trim().length==0){A.value=A.alt;A.addClass("mwu-prompt")}};mapwithus.util.initInputText=function(A){mapwithus.util.clearInputText(A);mapwithus.util.resetInputText(A)};mapwithus.util.clearTextArea=function(B,A){if(B.value==A){B.value=""}B.removeClass("mwu-prompt")};mapwithus.util.resetTextArea=function(B,A){if(B.value.trim().length==0){B.value=A;B.addClass("mwu-prompt")}};mapwithus.util.tag=function(B,A){return $(B).find(A)};mapwithus.util.nodeValue=function(D){if(D==null){return""}var A=D.childNodes;var B=new StringBuffer();B.append("");for(var C=0;C<A.length;C++){B.append(A[C].nodeValue)}return B.toString()};mapwithus.util.nvn=function(B,A){var C=mapwithus.util.tag(B,A);if(C==null){console.log("mapwithus.util.nvn wants to return null with element = "+B+", name = "+A);return null}else{return mapwithus.util.nodeValue(C[0])}};mapwithus.util.nivn=function(B,A){return parseInt(mapwithus.util.nvn(B,A))};mapwithus.util.nfvn=function(B,A){return parseFloat(mapwithus.util.nvn(B,A))};mapwithus.util.nbvn=function(B,A){return mapwithus.util.nvn(B,A).trim()=="true"};mapwithus.util.nh=function(B,A){return(mapwithus.util.tag(B,A).length>0)};mapwithus.util.viewport=function(){this.windowX=(document.documentElement&&document.documentElement.clientWidth)||window.innerWidth||self.innerWidth||document.body.clientWidth;this.windowY=(document.documentElement&&document.documentElement.clientHeight)||window.innerHeight||self.innerHeight||document.body.clientHeight;this.scrollX=(document.documentElement&&document.documentElement.scrollLeft)||window.pageXOffset||self.pageXOffset||document.body.scrollLeft;this.scrollY=(document.documentElement&&document.documentElement.scrollTop)||window.pageYOffset||self.pageYOffset||document.body.scrollTop;this.pageX=(document.documentElement&&document.documentElement.scrollWidth)?document.documentElement.scrollWidth:(document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth;this.pageY=(document.documentElement&&document.documentElement.scrollHeight)?document.documentElement.scrollHeight:(document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight};mapwithus.util.pageDimensions=function(){var B=-1;var A=-1;if(window.innerWidth&&window.innerHeight){B=window.innerWidth;A=window.innerHeight}else{if(document.documentElement.clientHeight&&document.documentElement.clientWidth){B=document.documentElement.clientWidth;A=document.documentElement.clientHeight}else{if(document.body.clientWidth&&document.body.clientHeight){B=document.body.clientWidth;A=document.body.clientHeight}}}if(B<0||A<0){return null}return{width:B,height:A}};mapwithus.util.documentDimensions=function(){var B=(document.documentElement&&document.documentElement.scrollWidth)?document.documentElement.scrollWidth:(document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth;var A=(document.documentElement&&document.documentElement.scrollHeight)?document.documentElement.scrollHeight:(document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight;return{width:B,height:A}};mapwithus.util.elementDimensions=function(A){return{width:A.offsetWidth,height:A.offsetHeight}};mapwithus.util.pageScroll=function(){var C=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;var A=document.all?C.scrollLeft:pageXOffset;var B=document.all?C.scrollTop:pageYOffset;return{left:A,top:B}};mapwithus.util.getObjectOffset=function(B){var C=0;var A=0;if(B.offsetParent){C=B.offsetLeft;A=B.offsetTop;while(B=B.offsetParent){C+=B.offsetLeft;A+=B.offsetTop}}return{x:C,y:A}};mapwithus.util.scriptify=function(C){var A=new StringBuffer();for(var B=0;B<C.length;B++){var D=C.charAt(B);if(D=="'"){A.a("&#39;")}else{if(D=='"'){A.a("&quot;")}else{if(D=="\\"){A.a("\\\\")}else{A.a(D)}}}}return A.toString()};mapwithus.util.makeValidHex=function(D){var A=new StringBuffer();for(var B=0;B<D.length;B++){var C=D.charAt(B);if(C>="0"&&C<="9"||C>="A"&&C<="F"||C>="a"&&C<="f"){A.a(C)}else{A.a("0")}}D=A.toString();while(D.length<3){D+="0"}while(D.length>3&&D.length<6){D+="0"}if(D.length>6){D=D.substring(0,6)}return D};mapwithus.util.selval=function(C){var A=$("option:selected","#"+C).index();var B=$("#"+C+" option").eq(A).val();return B};function StringBuffer(){this.buffer=[]}StringBuffer.prototype.append=function append(A){this.buffer.push(A);return this};StringBuffer.prototype.a=function a(A){return this.append(A)};StringBuffer.prototype.toString=function toString(){return this.buffer.join("")};String.prototype.trim=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")};Array.prototype.contains=function(B){for(var A=0;A<this.length;A++){if(this[A]==B){return true}}return false};var RandomString={_chars:"01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",makeString:function(A){var C=new StringBuffer();for(var D=0;D<A;D++){var B=Math.floor(Math.random()*this._chars.length);C.append(this._chars.charAt(B))}return C.toString()}};mapwithus.util.fetchArticle=function(E,H,C,L,B){if(map2id==null){return }if(!B){B={}}if(!B.noreturn){B.noreturn=false}if(!B.upsold){B.upsold=false}if(!B.rating){B.rating=0}var J=new google.maps.LatLng(H,C);var F='<img src="/r/images/loading.gif" />';var I={content:F,position:J};mapwithus.maps.map[E].infoWindow.setOptions(I);mapwithus.maps.map[E].infoWindow.open(mapwithus.maps.map[E].map);var G="viewid="+map2id+"&articleid="+L+"&n="+E;var A=mapwithus.util.bubbleDimensions(E);var D=A.width;var K=A.height;G+="&width="+D+"&height="+K;G+="&embed="+mapwithus.maps.map[E].doFetchEmbed;G+="&edit="+mapwithus.maps.map[E].doFetchEdit;G+="&rating="+B.rating;if(B.crid){G+="&crid="+B.crid;G+="&clat="+B.clat;G+="&clon="+B.clon}if(B.upsold){mapwithus.ajax.call("/UpsellArticleView",G,function(M){var O=mapwithus.util.nodeValue(mapwithus.util.tag(M,"normal")[0]);var P=mapwithus.util.nodeValue(mapwithus.util.tag(M,"maximized")[0]);var N=mapwithus.util.nodeValue(mapwithus.util.tag(M,"maxtitle")[0]);mapwithus.util.monkeyInfoWindow(E,J,O,null,null,B.noreturn,P,N)})}else{mapwithus.ajax.call("/ArticleView",G,function(N){var M=mapwithus.util.nodeValue(N);mapwithus.util.monkeyInfoWindow(E,J,M,null,null,B.noreturn)},{returnRootNode:true})}};mapwithus.util.fetchCluster=function(E,C,G,B){if(map2id==null){return }var H=new google.maps.LatLng(G,B);var A=mapwithus.util.bubbleDimensions(E);var D=A.width;var I=A.height;var F="n="+E;F+="&viewid="+map2id;F+="&crid="+C;F+="&clat="+G;F+="&clon="+B;F+="&width="+D+"&height="+I;F+="&embed="+mapwithus.maps.map[E].doFetchEmbed;F+="&edit="+mapwithus.maps.map[E].doFetchEdit;mapwithus.ajax.call("/ClusterView",F,function(K){var J=mapwithus.util.nodeValue(K);mapwithus.util.monkeyInfoWindow(E,H,J,null,null,false)},{returnRootNode:true})};mapwithus.util.bubbleDimensions=function(D){var C=mapwithus.util.mapDimensions(D);var B=Math.min(Math.max(C.width-100,440),650);var A=Math.min(Math.max(C.height-200,150),400);return{width:B,height:A}};mapwithus.util.mapDimensions=function(F){var D=mapwithus.maps.map[F].map.getBounds();var B=D.getSouthWest();var E=D.getNorthEast();var C=mapwithus.maps.map[F].fromLatLngToDivPixel(B);var A=mapwithus.maps.map[F].fromLatLngToDivPixel(E);return new google.maps.Size((Math.abs(E.x-B.x)),(Math.abs(E.y-B.y)))};var preMonkeyInfoWindowCenter=null;mapwithus.util.monkeyInfoWindow=function(A,I,C,G,E,B,J,F){var D=null;if(typeof (G)=="function"){D=google.maps.event.addListener(mapwithus.maps.map[0].infoWindow,"domready",function(){google.maps.event.removeListener(D);G()})}var H;H={content:C,position:I,zIndex:10000};mapwithus.maps.map[A].infoWindow.setOptions(H);mapwithus.maps.map[A].infoWindow.open(mapwithus.maps.map[A].map)};mapwithus.util.closeInfoWindow=function(A){mapwithus.maps.closeInfoWindow(mapwithus.maps.map[A])};mapwithus.util.MonkeyDialog={init:false,mdBg:null,mdBox:null,mdPane:null,closer:'<div style="float:right; font-size:10.0pt; line-height:14px; border:1px solid silver; color:gray; padding:0px 5px 3px 5px; margin:0px 0px 5px 5px; cursor:pointer" onclick="mapwithus.util.MonkeyDialog.hide()">x</div>',buf:'<div style="height:1px"></div>',initialize:function(){var A=$(document.createElement("div")).css({"display":"none","position":"fixed","top":"0px","left":"0px","width":"100%","height":"100%","background-color":"#dee4ec","z-index":"1000","opacity":"0.85","-moz-opacity":"0.85","-khtml-pacity":"0.85","filter":"alpha(opacity=85)"}).appendTo("body");var B=$(document.createElement("div")).css({"display":"none","position":"fixed","top":"50%","left":"50%","margin-left":"-200px","margin-top":"-200px","width":"400px","height":"400px","z-index":"1001"}).appendTo("body");B.html('<div class="pane" style="width:100%"><div class="top"><div class="left"><div class="right"></div></div></div><div class="middle"><div id="mdContent" class="content" style="padding:0px 16px"></div></div><div class="bottom"><div class="left"><div class="right"></div></div></div></div>');this.mdBg=A.get(0);this.mdBox=B.get(0);this.mdPane=$("#mdContent");this.init=true},show:function(B,A){if(!this.init){this.initialize()}if(!A){A=[]}if(typeof (A.width)=="undefined"){A.width=400}if(typeof (A.close)=="undefined"){A.close=true}$(this.mdBox).css({"width":(A.width+"px"),"margin-left":("-"+parseInt(A.width/2)+"px"),"display":"block"});$(this.mdBg).css({"display":"block"});$(this.mdPane).html((A.close?this.closer:"")+this.buf+B+this.buf);var C=mapwithus.util.elementDimensions(this.mdPane);$(this.mdBox).css({"margin-top":("-"+(parseInt(C.height/2)+10)+"px")})},hide:function(){if(!this.init){this.initialize()}$(this.mdBg).css({"display":"none"});$(this.mdBox).css({"display":"none"})}};mapwithus.util.getCheckedValue=function(B){if(!B){return null}var C=B.length;if(C==undefined){if(B.checked){return B.value}else{return null}}for(var A=0;A<C;A++){if(B[A].checked){return B[A].value}}return null};mapwithus.util.embedJump=function(A){location.href=location.href.replace(/\/embed\/.+?\/m\//,"/embed/"+A+"/m/")};mapwithus.util.xmlToString=function XMLToString(A){if(window.ActiveXObject){return A.xml}else{return(new XMLSerializer()).serializeToString(A)}};mapwithus.util.stringToXml=function XMLFromString(B){if(window.ActiveXObject){var A=new ActiveXObject("Microsoft.XMLDOM");A.loadXML(B);return A}else{return(new DOMParser()).parseFromString(B,"text/xml")}};if(!window.mapwithus){window.mapwithus={}}mapwithus.profile={fLimit:10,fOffset:0,doPresencePane:false,doAvatarList:false,notificationDelay:15,notificationIntervalSlider:null,notifcationIntervalEnabled:true,notificationIntervalSliderConvert:null,mLimit:10,mOffset:0,avatarImg:"/r/images/geomonkey-avatar.png",MEMBER_INVITED:1,MEMBER_ACTIVE:2,MEMBER_SUSPENDED:4,commentload:new Array(),useSubid:-1,viewKey:new Array(),viewStore:new Array(),levelKey:new Array(),levelStore:new Array(),planKey:new Array(),planStore:new Array(),levelPermissions:new Array()};mapwithus.profile.commentload["pending"]=false;mapwithus.profile.commentload["all"]=false;mapwithus.profile.initProfileSettings=function(){initDefault();if(doPresencePane){mapwithus.profile.initPresencePane()}if(doAvatarList){mapwithus.profile.getAvatarList()}};mapwithus.profile.initProfileGroupRateable=function(){initDefault();mapwithus.profile.getGroupRateables()};mapwithus.profile.initProfileGroupMembers=function(E,B,C,F,D,A){mapwithus.profile.getGroupMembers(E,B,C,F,D,A)};mapwithus.profile.initProfileGroupInvite=function(B,A){mapwithus.profile.getPendingInvitees(B,A)};mapwithus.profile.initProfileGroupSettings=function(){initDefault()};mapwithus.profile.getAvatarList=function(){var A={returnResponse:true,responseType:"xml"};mapwithus.ajax.call("/AvatarList","",function(C){var E=new StringBuffer();if(mapwithus.util.nh(C,"avatars")){var F=mapwithus.util.tag(C,"avatar");for(var D=0;D<F.length;D++){var G=mapwithus.util.nvn(F[D],"fileid");var B=mapwithus.util.nvn(F[D],"thumburl");E.a('<div style="float:left; width:40px; height:40px; overflow:hidden; text-align:center; margin:5px 0px 0px 5px; cursor:pointer" onmouseover="mapwithus.tooltip.show(event, \'<img src=&#34;').a(B).a('&#34;/>\')" onmousemove="mapwithus.tooltip.update(event)" onmouseout="mapwithus.tooltip.hide()" onclick="mapwithus.profile.setAvatar(').a(G).a(')">');E.a('  <table border="0" cellspacing="0" cellpadding="0" style="background-color:#bbccdd">');E.a("    <tr>");E.a('      <td width="40" height="40" align="center" valign="center">');E.a('        <img src="').a(B).a('" border="0" width="40" /><br/>');E.a("      </td>");E.a("    </tr>");E.a("  </table>");E.a("</div>")}}else{E.a("<b>You have not uploaded any pictures.</b>")}$("#avatarselectorpane").html(E.toString())},A)};mapwithus.profile.uploadAvatar=function(){if(document.forms["addfile"].elements["file"].value.length<1){window.alert("You must select a file to upload.");return false}return true};mapwithus.profile.setAvatar=function(B){var A="avid="+B;mapwithus.ajax.call("/AvatarList",A,function(C){window.location.href=window.location.href})};mapwithus.profile.pageBounds=function(C,A,E){var D=1;var B=1;D=Math.round((E+A)/A);if(C>A){B=Math.ceil(C/A)}else{B=D}return{pageStart:D,pageEnd:B}};mapwithus.profile.loadMaps=function(G,B,F,E,C,A){$("#pagingcontent").html();$("#mapspane").html('<div class="sectionblk" style="padding:10px; text-align:center; font-weight:bold; font-size:8.0pt"><img src="/r/images/loading.gif" /><br/>Loading maps, please wait...</div>');mapwithus.profile.mLimit=B;mapwithus.profile.mOffset=F;var D="action=list";D+="&mode="+G;D+="&cid="+linkClientid;D+="&groupid="+C;D+="&groupcid="+A;D+="&lim="+B;D+="&off="+F;mapwithus.ajax.call("/maps",D,function(O){var N=new StringBuffer();var Q=O.getElementsByTagName("count")[0].childNodes[0].nodeValue;if(Q==0){N.append('<div class="sectionblk">');N.append('<div class="sectionbumper"></div>');N.append('<div class="darkgraytext" style="margin-left: 5px; text-align:center;">No maps.<br/><br/>');if(myProfile){N.append(' <a href="" onclick="createNewMap(); return false">Create New Map</a>')}N.append("</div>");N.append('<div class="sectionbumper" style="clear:left;"></div>');N.append("</div>")}var I=O.getElementsByTagName("item");for(var L=0;L<I.length;L++){var T=I[L];var S=mapwithus.util.nvn(T,"viewid");var H=mapwithus.util.nvn(T,"url");var J=mapwithus.util.nvn(T,"editurl");var U=mapwithus.util.nvn(T,"title");var P=mapwithus.util.nvn(T,"desc");var M=mapwithus.util.nvn(T,"keywords");var K=mapwithus.util.nvn(T,"status");var W=mapwithus.util.nvn(T,"clicks");var V=mapwithus.util.nvn(T,"modified");var R=mapwithus.util.nvn(T,"ismobilemap");N.append('<div class="sectionblock" style="cursor:pointer;" onclick="$(\'#map').append(S).append('details\').toggle()" title="click for map details">');N.append('<div class="sectionbumper"></div>');N.append('<div style="margin: 0px 15px 0px 15px;">');N.append('<div style="font-size:13.0pt; margin-left:3px;"><a href="').append(H).append('" title=" ">').append(U).append("</a></div>");N.append('<div class="darkgraytext" style="font-size: 9.0pt; margin-left: 8px;">').append(P).append("</div>");N.append('<div class="lightgraytext" id="map').append(S).append('details" style="display:none; font-size: 8.0pt; margin:3px 0px 0px 8px;">');N.append(" <div>Keywords: ").append(M).append("</div>");N.append(" <div>Status: ").append(K).append("</div>");N.append(" <div>Views: ").append(W).append("</div>");N.append(" <div>Updated: ").append(V).append("</div>");if(E&&myProfile){if(R=="false"){N.append('<div style="margin:3px 0px 0px 0px;">');N.append('<a href="').append(J).append('">Edit this map</a> | ');N.append('<a href="javascript:void(0)" style="font-size:8.0pt;" onclick="setMobileMap(\'');N.append(G);N.append("', '");N.append(S);N.append("', true, ");N.append(C).append(", ").append(A).append(")");N.append('">Make this a mobile map</a>');N.append("</div>")}else{N.append('<div style="margin:3px 0px 0px 0px;">');N.append('<a href="').append(J).append('">Edit this map</a> | ');N.append('<a href="javascript:void(0)" style="font-size:8.0pt;" onclick="setMobileMap(\'');N.append(G);N.append("', '");N.append(S);N.append("', false, ");N.append(C).append(", ").append(A).append(")");N.append('">Remove mobile map status</a>');N.append("</div>")}}N.append("</div>");N.append("</div>");N.append('<div class="sectionbumper" style="clear:left;"></div>');N.append("</div>")}$("#mapspane").html(N.toString());if(E){mapwithus.profile.updateMapPaging(G,Q,B,F,C,A)}else{mapwithus.profile.setMapsCount(Q,B,F)}})};mapwithus.profile.updateMapPaging=function(H,F,B,G,C,A){var E=mapwithus.profile.pageBounds(F,B,G);if(E.pageStart==1&&E.pageEnd==1){return }var D="";if(E.pageStart>1){D+='<a href="javascript:void(0)" onclick="mapwithus.profile.loadMaps(\''+H+"', "+B+", "+parseInt(G-B)+", true, "+C+", "+A+')">Previous</a>'}else{D+='<span class="lightgraytext">Previous</span>'}D+='<span class="darkgraytext" style="padding: 0px 20px 0px 20px;">Page '+E.pageStart+" of "+E.pageEnd+"</span>";if(E.pageEnd>E.pageStart){D+='<a href="javascript:void(0)" onclick="mapwithus.profile.loadMaps(\''+H+"', "+B+", "+parseInt(G+B)+", true, "+C+", "+A+')">Next</a>'}else{D+='<span class="lightgraytext">Next</span>'}$("#pagingcontent").html(D)};mapwithus.profile.setMapsCount=function(B,A,C){setInnerHtml("mapcount",B);if(B>A){$("#seeallmaps").html('<a href="/publicmaps/user/'+linkUser+'" class="decnone" style="font-size: 8.0pt;">All '+B+" Maps</a>")}};mapwithus.profile.setMobileMap=function(A,F,C,D,B){var E="action=setmobile&mobile="+C+"&viewid="+F;mapwithus.ajax.call("/maps",E,function(){mapwithus.profile.loadMaps(A,mLimit,mOffset,true,D,B)})};mapwithus.profile.getGroupMembers=function(G,B,D,H,F,A){var C="action=list&groupid="+B;var E={returnResponse:true};mapwithus.ajax.call("/api/group/admin",C,function(R){var U=mapwithus.util.nh(R,"error");if(!U){if(mapwithus.util.nh(R,"members")){var M=mapwithus.util.tag(R,"members")[0];if(M){M=mapwithus.util.tag(M,"member")}var L,W,V,J,P;L=W=V=P=J=null;var I=false;var T,S=-1;T=S=-1;var K=0;var Q=new StringBuffer();for(var O=0;O<M.length;O++){L=M[O];W=V=P=J=null;T=S=-1;I=false;if(L){if(mapwithus.util.nh(L,"memberid")){T=mapwithus.util.nivn(L,"memberid")}if(mapwithus.util.nh(L,"clientid")){S=mapwithus.util.nivn(L,"clientid")}if(mapwithus.util.nh(L,"avatar")){V=mapwithus.util.nvn(L,"avatar")}if(mapwithus.util.nh(L,"is_owner")){I=mapwithus.util.nbvn(L,"is_owner")}if(mapwithus.util.nh(L,"joined")){W=mapwithus.util.nvn(L,"joined")}if(mapwithus.util.nh(L,"name")){J=mapwithus.util.nvn(L,"name")}if(mapwithus.util.nh(L,"username")){P=mapwithus.util.nvn(L,"username")}if(V==null){V="/r/images/geomonkey-avatar.png"}}if(T!=-1&&S!=-1&&W!=null&&P!=null&&V!=null){var N={};N.memberid=T;N.clientid=S;N.username=P;N.name=J;N.avatar=V;N.isOwner=I;N.joined=W;N.can_kick=D;N.can_mod_priv=H;if(N.clientid==G){N.isOwn=true}Q.a(mapwithus.profile.generateMemberHTML(N));K++}}if(K<1){Q.a("<div style='font-size:16px;line-height:24px;margin-top:10px;'>");Q.a("Your group doesn't have any other members yet.<br/>");if(F){Q.a("Would you like to <a class='mwu-curpointer' onclick='mapwithus.profile.beginInviteGroupMember(true,").a(A).a(")'>invite</a> someone?")}Q.a("</div>")}}$("#members").html(Q.toString())}},E)};mapwithus.profile.generateMemberHTML=function(C){var A=mapwithus.profile.generateMemberInnerHTML(C);if(A==null){return""}var B=new StringBuffer();B.a('<div id="').a("member-").a(C.clientid).a('" class="aboutitem member">');B.a(A);B.a("</div>");return B.toString()};mapwithus.profile.generateMemberInnerHTML=function(B){if(!B||B.isOwner){return null}var A=new StringBuffer();A.a("<div class='member-avatar'>");A.a("<img src='").a(B.avatar).a("'>");A.a("</div>");A.a("<div class='member-username'><span class='member-label'>Username:</span>");A.a("<a class='mwu-curpointer' href='/profile/").a(B.username).a("'>").a(B.username).a("</a></div>");A.a("<div class='member-joined'>");A.a("<span class='member-label' style='width:110px;'>Group Member Since: </span>").a(mapwithus.profile.getDateString(B.joined));A.a("</div>");if(B.name!=null&&B.name.trim().length>0){A.a("<div class='member-name'><span class='member-label'>Name: </span>").a(B.name).a("</div>")}A.a("<div style='clear:both'></div>");A.a("<div class='member-links'>");if(B.can_mod_priv){A.a("<span id='member-modpriv-link'><a class='mwu-curpointer' onclick='mapwithus.profile.beginSetMemberPrivs(").a(B.clientid).a(")''>Edit Privileges</a></span>")}if(B.can_mod_priv&&B.can_kick){A.a(" --- ")}if(B.isOwn){A.a("<span id='member-depart-link'><a class='mwu-curpointer' onclick='mapwithus.profile.beginDepartMember(").a(B.clientid).a(")'>Leave Group</a></span>")}else{if(B.can_kick){A.a("<span id='member-kick-link'><a class='mwu-curpointer' onclick='mapwithus.profile.beginKickMember(").a(B.clientid).a(")'>Remove From Group</a></span>")}}A.a("</div>");return A.toString()};mapwithus.profile.beginInviteGroupMember=function(B,A){mapwithus.profile.showInviteDialog(B,A)};mapwithus.profile.finishInviteGroupMember=function(E,A){var F=$("#mwu-invite-dialog-username").val();var D=$("#mwu-invite-dialog-message").val();if(F==null||F.length==0){mapwithus.util.flashError("You must supply a username to invite");return }var B="action=invite&username="+encodeURIComponent(F);if(D!=null&&D.length>0){B+="&message="+encodeURIComponent(D)}var C={returnResponse:true};mapwithus.ajax.call("/api/group/admin",B,function(H){var K=mapwithus.util.nh(H,"success");var G=mapwithus.util.nh(H,"error");if(K){alert("Successfully invited "+F+" to your group");mapwithus.profile.closeInviteDialog();mapwithus.profile.getPendingInvitees(E,A)}else{if(G){var I=mapwithus.util.tag(H,"error")[0];var J=null;if(mapwithus.util.nh(I,"message")){J=mapwithus.util.nvn(I,"message")}if(J){alert("Unable to invite "+F+" - "+J.toLowerCase())}else{alert("Unable to invite "+F+" to your group - Unknown error")}}}},C)};mapwithus.profile.generateInviteDialog=function(E,B){var A,D,C;var F=$(document.createElement("div")).attr({"id":"mwu-invite-dialog"}).css({"display":"none"}).append($(document.createElement("div")).attr({"class":"mwu-dialogbackground"})).append($(document.createElement("div")).addClass("mwu-dialog").append($(document.createElement("div")).addClass("mwu-dialog-header").append($(document.createElement("span")).addClass("mwu-dialog-title").append("Invite User To Group")).append(A=$(document.createElement("div")).attr({"id":"mwu-invite-dialog-x","class":"mwu-dialog-x"}).append($(document.createElement("a")).attr({"href":"javascript:void(0);"}).append("X")))).append($(document.createElement("div")).addClass("mwu-dialog-content").append($(document.createElement("div")).addClass("mwu-dialog-bumper")).append($(document.createElement("div")).addClass("mwu-dialog-content-field-top").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"90px"}).append("Username:")).append($(document.createElement("input")).attr({"id":"mwu-invite-dialog-username","type":"text"}).addClass("mwu-dialog-input"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-textarea-label").css({"width":"90px","textAlign":"right"}).append("Personalize<br/>Message:")).append($(document.createElement("textarea")).attr({"id":"mwu-invite-dialog-message","type":"text","alt":"Not required"}).addClass("mwu-dialog-textarea"))).append($(document.createElement("div")).addClass("mwu-dialog-buttons").append(C=$(document.createElement("button")).attr({"id":"mwu-invite-dialog-button-cancel","class":"mwu-dialog-button-left"}).append("Cancel")).append(D=$(document.createElement("button")).attr({"id":"mwu-invite-dialog-button-submit"}).append("Submit"))).append($(document.createElement("div")).addClass("mwu-dialog-bumper"))));A.click(mapwithus.profile.closeInviteDialog);D.click(function(){mapwithus.profile.finishInviteGroupMember(E,B)});C.click(mapwithus.profile.closeInviteDialog);$("body").append(F)};mapwithus.profile.clearInviteDialog=function(){if($("#mwu-invite-dialog").length){$("#mwu-invite-dialog-username").val("");$("#mwu-invite-dialog-message").val("")}};mapwithus.profile.closeInviteDialog=function(){if($("#mwu-invite-dialog").length){$("#mwu-invite-dialog").hide()}mapwithus.profile.clearInviteDialog()};mapwithus.profile.showInviteDialog=function(B,A){if($("#mwu-invite-dialog").length==0){mapwithus.profile.generateInviteDialog(B,A)}$("#mwu-invite-dialog").show()};mapwithus.profile.getPendingInvitees=function(D,A){var B="action=invitees";var C={returnResponse:true};mapwithus.ajax.call("/api/group/admin",B,function(H){var N=mapwithus.util.nh(H,"error");if(!N){if(mapwithus.util.nh(H,"members")){var T=mapwithus.util.tag(H,"members")[0];if(T){T=mapwithus.util.tag(T,"member")}var M,F,K,S,V,I,J;M=F=K=S=I=J=V=null;var G=false;var U,Q,R;U=Q=R=-1;var O=0;var L=new StringBuffer();if(T&&T.length>0){for(var P=0;P<T.length;P++){M=T[P];F=K=S=I=V=null;U=R=Q=-1;G=false;if(M){if(mapwithus.util.nh(M,"memberid")){U=mapwithus.util.nivn(M,"memberid")}if(mapwithus.util.nh(M,"clientid")){Q=mapwithus.util.nivn(M,"clientid")}if(mapwithus.util.nh(M,"avatar")){S=mapwithus.util.nvn(M,"avatar")}if(mapwithus.util.nh(M,"is_owner")){G=mapwithus.util.nbvn(M,"is_owner")}if(mapwithus.util.nh(M,"invited")){F=mapwithus.util.nvn(M,"invited")}if(mapwithus.util.nh(M,"inviter")){R=mapwithus.util.nivn(M,"inviter")}if(mapwithus.util.nh(M,"inv_username")){J=mapwithus.util.nvn(M,"inv_username")}if(mapwithus.util.nh(M,"message")){K=mapwithus.util.nvn(M,"message")}if(mapwithus.util.nh(M,"name")){V=mapwithus.util.nvn(M,"name")}if(mapwithus.util.nh(M,"username")){I=mapwithus.util.nvn(M,"username")}if(S==null){S="/r/images/geomonkey-avatar.png"}}if(U!=-1&&Q!=-1&&F!=null&&I!=null&&S!=null){var E={};E.memberid=U;E.clientid=Q;E.username=I;E.name=V;E.avatar=S;E.isOwner=G;E.invited=F;E.inviter=R;E.inv_username=J;E.message=K;L.a(mapwithus.profile.generateMemberInviteHTML(E,D,A));O++}}}else{L.a("<div style='font-size:16px;line-height:24px;margin-top:10px;'>");L.a("Your group doesn't have any pending invitations.<br/>");if(D){L.a("Would you like to <a class='mwu-curpointer' onclick='mapwithus.profile.beginInviteGroupMember(");L.a(D).a(", ").a(A).a(")'>invite</a> someone?")}L.a("</div>")}}$("#invitees").html(L.toString())}},C)};mapwithus.profile.generateMemberInviteHTML=function(E,D,A){var B=mapwithus.profile.generateMemberInviteInnerHTML(E,D,A);if(B==null){return""}var C=new StringBuffer();C.a('<div id="').a("member-invite-").a(E.clientid).a('" class="aboutitem member">');C.a(B);C.a("</div>");return C.toString()};mapwithus.profile.generateMemberInviteInnerHTML=function(D,C,A){if(!D||D.isOwner){return null}if(D.inv_username==null||D.inv_username.length==0){D.inv_username="Unknown"}var B=new StringBuffer();B.a("<div class='member-avatar'>");B.a("<img src='").a(D.avatar).a("'>");B.a("</div>");B.a("<div class='member-username'>");B.a("<span class='member-label'>Username:</span>");B.a("<a class='mwu-curpointer' href='/profile/").a(D.username).a("'>").a(D.username).a("</a>");if(D.name!=null){B.a("<br/><span class='member-label'>Name: </span>");B.a("<span class='mwu-member-name'>").a(D.name).a("</span>")}B.a("</div>");B.a("<div class='member-invite-details'>");B.a("<span class='member-invite-label'>Invited on: </span>").a(mapwithus.profile.getDateString(D.invited)).a("<br/>");B.a("<span class='member-invite-label'>Invited by: </span>").a(D.inv_username).a("<br/>");B.a("</div>");B.a("<div style='clear:both;'></div>");B.a("<div style='float:right'>");if(A){B.a("<a class='mwu-curpointer' onclick='mapwithus.profile.beginRevokeInvitation(").a(D.clientid).a(")'>Revoke Invitation</a>")}B.a("</div></div>");B.a("<div style='clear:both'></div>");return B.toString()};mapwithus.profile.beginSetMemberPrivs=function(C){var A="action=member&memberid="+C;var B={returnResponse:true};mapwithus.ajax.call("/api/group/admin",A,function(F){var E=mapwithus.util.nh(F,"error");if(!E){if(mapwithus.util.nh(F,"member")){var D={id:C};var G=mapwithus.util.tag(F,"member")[0];if(mapwithus.util.nh(G,"can_admin_group")){D.can_mod_settings=mapwithus.util.nbvn(G,"can_admin_group")}if(mapwithus.util.nh(G,"can_mod_priv")){D.can_mod_priv=mapwithus.util.nbvn(G,"can_mod_priv")}if(mapwithus.util.nh(G,"can_copy")){D.can_copy=mapwithus.util.nbvn(G,"can_copy")}if(mapwithus.util.nh(G,"can_delete")){D.can_delete=mapwithus.util.nbvn(G,"can_delete")}if(mapwithus.util.nh(G,"can_export")){D.can_export=mapwithus.util.nbvn(G,"can_export")}if(mapwithus.util.nh(G,"can_revoke")){D.can_revoke=mapwithus.util.nbvn(G,"can_revoke")}if(mapwithus.util.nh(G,"can_invite")){D.can_invite=mapwithus.util.nbvn(G,"can_invite")}if(mapwithus.util.nh(G,"can_kick")){D.can_kick=mapwithus.util.nbvn(G,"can_kick")}if(mapwithus.util.nh(G,"can_read")){D.can_read=mapwithus.util.nbvn(G,"can_read")}if(mapwithus.util.nh(G,"can_write")){D.can_write=mapwithus.util.nbvn(G,"can_write")}if(mapwithus.util.nh(G,"can_mod_settings")){D.can_publish=mapwithus.util.nbvn(G,"can_mod_settings")}mapwithus.profile.populateModPrivDialog(D);mapwithus.profile.showModPrivDialog()}}},B)};mapwithus.profile.finishSetMemberPrivs=function(){var A=new StringBuffer();A.a("action=setprivs");A.a("&memberid=").a($("#mwu-priv-memberid").val());A.a("&can_kick=").a($("#mwu-priv-kick").is(":checked"));A.a("&can_admin_group=").a($("#mwu-priv-admin-group").is(":checked"));A.a("&can_mod_priv=").a($("#mwu-priv-modpriv").is(":checked"));A.a("&can_read=").a($("#mwu-priv-read").is(":checked"));A.a("&can_write=").a($("#mwu-priv-write").is(":checked"));A.a("&can_delete=").a($("#mwu-priv-delete").is(":checked"));A.a("&can_copy=").a($("#mwu-priv-copy").is(":checked"));A.a("&can_export=").a($("#mwu-priv-export").is(":checked"));A.a("&can_mod_settings=").a($("#mwu-priv-mod-settings").is(":checked"));A.a("&can_invite=").a($("#mwu-priv-invite").is(":checked"));A.a("&can_revoke=").a($("#mwu-priv-revoke").is(":checked"));var B={returnResponse:true};mapwithus.ajax.call("/api/group/admin",A.toString(),function(D){if(mapwithus.util.nh(D,"success")){mapwithus.util.flashNotice("Successfully updated permissions");mapwithus.profile.closeModPrivDialog()}else{var C=mapwithus.util.tag(D,C)[0];if(mapwithus.util.nh(C,"msg")){var E=mapwithus.util.nvn(C,"msg");mapwithus.util.flashError(E)}else{mapwithus.util.flashError("Unable to update ")}}},B)};mapwithus.profile.populateModPrivDialog=function(A){if($("#mwu-modpriv-dialog").length==0){mapwithus.profile.generateModPrivDialog()}$("#mwu-priv-memberid").val(A.id);if(A.can_kick){$("#mwu-priv-kick").attr({"checked":true})}if(A.can_mod_priv){$("#mwu-priv-modpriv").attr({"checked":true})}if(A.can_mod_settings){$("#mwu-priv-admin-group").attr({"checked":true})}if(A.can_delete){$("#mwu-priv-delete").attr({"checked":true})}if(A.can_copy){$("#mwu-priv-copy").attr({"checked":true})}if(A.can_export){$("#mwu-priv-export").attr({"checked":true})}if(A.can_revoke){$("#mwu-priv-revoke").attr({"checked":true})}if(A.can_invite){$("#mwu-priv-invite").attr({"checked":true})}if(A.can_write){$("#mwu-priv-write").attr({"checked":true})}if(A.can_read){$("#mwu-priv-read").attr({"checked":true})}if(A.can_publish){$("#mwu-priv-mod-settings").attr({"checked":true})}};mapwithus.profile.generateModPrivDialog=function(){var A,D,C;var B=$(document.createElement("div")).attr({"id":"mwu-modpriv-dialog"}).css({"display":"none"}).append($(document.createElement("div")).attr({"class":"mwu-dialogbackground"})).append($(document.createElement("div")).addClass("mwu-dialog").append($(document.createElement("div")).addClass("mwu-dialog-header").append($(document.createElement("span")).addClass("mwu-dialog-title").append("Edit Member Privileges")).append(A=$(document.createElement("div")).attr({"id":"mwu-modpriv-dialog-x","class":"mwu-dialog-x"}).append($(document.createElement("a")).attr({"href":"javascript:void(0);"}).append("X")))).append($(document.createElement("div")).addClass("mwu-dialog-content").append($(document.createElement("div")).addClass("mwu-dialog-bumper")).append($(document.createElement("div")).addClass("mwu-dialog-content-field-top").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can remove other members from group:")).append($(document.createElement("input")).attr({"id":"mwu-priv-kick","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can change privileges of other members:")).append($(document.createElement("input")).attr({"id":"mwu-priv-modpriv","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can administer group settings and features:")).append($(document.createElement("input")).attr({"id":"mwu-priv-admin-group","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can publish maps and change map settings:")).append($(document.createElement("input")).attr({"id":"mwu-priv-mod-settings","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can copy group data to their own account:")).append($(document.createElement("input")).attr({"id":"mwu-priv-copy","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can export group data (e.g. to KML):")).append($(document.createElement("input")).attr({"id":"mwu-priv-export","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can permanently delete group data:")).append($(document.createElement("input")).attr({"id":"mwu-priv-delete","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can revoke pending invitations:")).append($(document.createElement("input")).attr({"id":"mwu-priv-revoke","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can invite other users to join group:")).append($(document.createElement("input")).attr({"id":"mwu-priv-invite","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can create group data:")).append($(document.createElement("input")).attr({"id":"mwu-priv-write","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"315px"}).append("Can view group data:")).append($(document.createElement("input")).attr({"id":"mwu-priv-read","type":"checkbox"}).addClass("mwu-dialog-checkbox"))).append($(document.createElement("div")).addClass("mwu-dialog-buttons").append(C=$(document.createElement("button")).attr({"id":"mwu-modpriv-dialog-button-cancel","class":"mwu-dialog-button-left"}).append("Cancel")).append(D=$(document.createElement("button")).attr({"id":"mwu-modpriv-dialog-button-submit"}).append("Submit"))).append($(document.createElement("input")).attr({"id":"mwu-priv-memberid","type":"hidden"})).append($(document.createElement("div")).addClass("mwu-dialog-bumper"))));A.click(mapwithus.profile.closeModPrivDialog);D.click(mapwithus.profile.finishSetMemberPrivs);C.click(mapwithus.profile.closeModPrivDialog);$(document.body).append(B)};mapwithus.profile.clearModPrivDialog=function(){if($("#mwu-modpriv-dialog").length){$("#mwu-priv-kick").attr({"checked":false});$("#mwu-priv-modpriv").attr({"checked":false});$("#mwu-priv-admin-group").attr({"checked":false});$("#mwu-priv-delete").attr({"checked":false});$("#mwu-priv-copy").attr({"checked":false});$("#mwu-priv-export").attr({"checked":false});$("#mwu-priv-revoke").attr({"checked":false});$("#mwu-priv-invite").attr({"checked":false});$("#mwu-priv-write").attr({"checked":false});$("#mwu-priv-read").attr({"checked":false});$("#mwu-priv-mod-settings").attr({"checked":false})}};mapwithus.profile.closeModPrivDialog=function(){if($("#mwu-modpriv-dialog").length){$("#mwu-modpriv-dialog").hide()}mapwithus.profile.clearModPrivDialog()};mapwithus.profile.showModPrivDialog=function(){if($("#mwu-modpriv-dialog").length==0){mapwithus.profile.generateModPrivDialog()}$("#mwu-modpriv-dialog").show()};mapwithus.profile.beginKickMember=function(B){var A="You are about to remove this member from your group.<br/>To join, the user will have to be reinvited.<br/><br/>To continue, type <i>KICK</i> as a confirmation.<br>Otherwise, click <i>Cancel</i>";mapwithus.profile.showKickDialog(B,"Remove Member From Group",A,mapwithus.profile.finishKickMember)};mapwithus.profile.finishKickMember=function(){var C=$("#mwu-kick-dialog-confirmation").val();var D=$("#mwu-kick-dialog-reason").val();if(C!=null&&C.toUpperCase()=="KICK"){var E=$("#mwu-kick-dialog-id").val();var A=new StringBuffer();A.a("action=kick&kick_clientid=").a(E);if(D!=null&&D.length>1){A.a("&reason=").a(encodeURIComponent(D))}var B={returnResponse:true};mapwithus.ajax.call("/api/group/admin",A.toString(),function(G){var I=mapwithus.util.nh(G,"success");if(I){mapwithus.profile.closeKickDialog();$("#member-"+E).css({"display":"none"});mapwithus.util.flashNotice("Successfully kicked member from group")}else{if(mapwithus.util.nh(G,"error")){var F=mapwithus.util.tag(G,"error")[0];var H=null;if(mapwithus.util.nh(F,"message")){H=mapwithus.util.nvn(F,"message")}if(H&&H.length>0){mapwithus.util.flashError(H)}else{mapwithus.util.flashError("Unable to kick user")}}}},B)}else{if(C&&C.length>0){mapwithus.util.flashError("Invalid confirmation")}else{mapwithus.profile.closeKickDialog()}}};mapwithus.profile.generateKickDialog=function(G,F,E){var A,C,B;var D=$(document.createElement("div")).attr({"id":"mwu-kick-dialog"}).css({"display":"none"}).append($(document.createElement("div")).attr({"class":"mwu-dialogbackground"})).append($(document.createElement("div")).addClass("mwu-dialog").append($(document.createElement("div")).addClass("mwu-dialog-header").append($(document.createElement("span")).attr({"id":"mwu-kick-dialog-title"}).addClass("mwu-dialog-title").append(F)).append(A=$(document.createElement("div")).addClass("mwu-dialog-x").append($(document.createElement("a")).attr({"id":"mwu-kick-button-x","href":"javascript:void(0);"}).append("X")))).append($(document.createElement("div")).addClass("mwu-dialog-content").css({"width":"425px"}).append($(document.createElement("div")).addClass("mwu-dialog-bumper")).append($(document.createElement("div")).attr({"id":"mwu-kick-dialog-msg","class":"mwu-dialog-content-field-top"}).append($(document.createElement("span")).css({"lineHeight":"20px"}).append(E)).append($(document.createElement("br"))).append($(document.createElement("br"))).append("Confirmation:").append($(document.createElement("input")).attr({"id":"mwu-kick-dialog-confirmation"}).addClass("mwu-dialog-input").css({"width":"380px"})).append($(document.createElement("div")).addClass("mwu-dialog-content-field").css({"padding":"10px 0","margin":"0"}).append("Reason <span style='font-size: 0.9em'>(optional)</span>:").append($(document.createElement("textarea")).attr({"id":"mwu-kick-dialog-reason","type":"text","alt":"Not required"}).addClass("mwu-dialog-textarea").css({"width":"380px","height":"125px"}))).append($(document.createElement("input")).attr({"id":"mwu-kick-dialog-id","type":"hidden","value":G}))).append($(document.createElement("div")).addClass("mwu-dialog-buttons").append(B=$(document.createElement("button")).attr({"id":"mwu-kick-dialog-cancel"}).addClass("mwu-dialog-button-left").append("Cancel")).append(C=$(document.createElement("button")).attr({"id":"mwu-kick-dialog-submit"}).append("Submit"))).append($(document.createElement("div")).addClass("mwu-dialog-bumper"))));A.onclick=mapwithus.profile.closeKickDialog;B.onclick=mapwithus.profile.closeKickDialog;$(document.body).append(D)};mapwithus.profile.showKickDialog=function(D,B,A,C){if($("#mwu-kick-dialog").length==0){mapwithus.profile.generateKickDialog(D,B,A)}else{$("#mwu-kick-dialog-title").val(B);$("#mwu-kick-dialog-msg").val(A)}$("#mwu-kick-dialog-id").val(D);$("#mwu-kick-dialog-submit").click(C);$("#mwu-kick-dialog").show()};mapwithus.profile.clearKickDialog=function(){if($("#mwu-kick-dialog").length){$("#mwu-kick-dialog-id").val("");$("#mwu-kick-dialog-title").val("");$("#mwu-kick-dialog-msg").val("");$("#mwu-kick-dialog-confirmation").val("")}};mapwithus.profile.closeKickDialog=function(){if($("#mwu-kick-dialog").length){$("#mwu-kick-dialog").hide()}mapwithus.profile.clearKickDialog()};mapwithus.profile.beginDepartMember=function(B){var A="You are about to leave your group.<br/>To rejoin, you will have to be reinvited.<br/><br/>To continue, type <i>LEAVE</i> as a confirmation.<br>Otherwise, click <i>Cancel</i>";mapwithus.profile.showDepartDialog(B,"Leave Group",A,mapwithus.profile.finishDepartMember)};mapwithus.profile.finishDepartMember=function(){var C=$("#mwu-depart-dialog-confirmation").val();var D=$("#mwu-depart-dialog-reason").val();if(C!=null&&C.toUpperCase()=="LEAVE"){var E=$("#mwu-depart-dialog-id").val();var A=new StringBuffer();A.a("action=depart&depart_clientid=").a(E);if(D!=null&&D.length>1){A.a("&reason=").a(encodeURIComponenr(D))}var B={returnResponse:true,responseType:"xml"};mapwithus.ajax.call("/api/group/admin",A.toString(),function(G){var I=mapwithus.util.nh(G,"success");if(I){mapwithus.profile.closeDepartDialog();$("#member-"+E).css({"display":"none"});mapwithus.util.flashNotice("Successfully departed member from group");setTimeout(function(){window.location.href=window.location.href},3500)}else{if(mapwithus.util.nh(G,"error")){var F=mapwithus.util.tag(G,"error")[0];var H=null;if(mapwithus.util.nh(F,"message")){H=mapwithus.util.nvn(F,"message")}if(H&&H.length>0){mapwithus.util.flashError(H)}else{mapwithus.util.flashError("Unable to depart user")}}}},B)}else{if(C&&C.length>0){mapwithus.util.flashError("Invalid confirmation")}else{mapwithus.profile.closeDepartDialog()}}};mapwithus.profile.generateDepartDialog=function(G,F,E){var A,D,B;var C=$(document.createElement("div")).attr({"id":"mwu-depart-dialog"}).css({"display":"none"}).append($(document.createElement("div")).attr({"class":"mwu-dialogbackground"})).append($(document.createElement("div")).addClass("mwu-dialog").append($(document.createElement("div")).addClass("mwu-dialog-header").append($(document.createElement("span")).attr({"id":"mwu-depart-dialog-title"}).addClass("mwu-dialog-title").append(F)).append(A=$(document.createElement("div")).addClass("mwu-dialog-x").append($(document.createElement("a")).attr({"id":"mwu-depart-button-x","href":"javascript:void(0);"}).append("X")))).append($(document.createElement("div")).addClass("mwu-dialog-content").css({"width":"425px"}).append($(document.createElement("div")).addClass("mwu-dialog-bumper")).append($(document.createElement("div")).attr({"id":"mwu-depart-dialog-msg","class":"mwu-dialog-content-field-top"}).append($(document.createElement("span")).css({"lineHeight":"20px"}).append(E)).append($(document.createElement("br"))).append($(document.createElement("div"))).append("Confirmation:").append($(document.createElement("input")).attr({"id":"mwu-depart-dialog-confirmation"}).addClass("mwu-dialog-input").css({"width":"380px"})).append($(document.createElement("div")).addClass("mwu-dialog-content-field").css({"padding":"10px 0","margin":"0"}).append("Reason <span style='font-size: 0.9em'>(optional)</span>:").append($(document.createElement("textarea")).attr({"id":"mwu-depart-dialog-reason","type":"text","alt":"Not required"}).addClass("mwu-dialog-textarea").css({"width":"380px","height":"125px"}))).append($(document.createElement("input")).attr({"id":"mwu-depart-dialog-id","type":"hidden","value":G}))).append($(document.createElement("div")).addClass("mwu-dialog-buttons").append(B=$(document.createElement("button")).attr({"id":"mwu-depart-dialog-cancel"}).addClass("mwu-dialog-button-left").append("Cancel")).append(D=$(document.createElement("button")).attr({"id":"mwu-depart-dialog-submit"}).append("Submit"))).append($(document.createElement("div")).addClass("mwu-dialog-bumper"))));A.click(mapwithus.profile.closeDepartDialog);B.click(mapwithus.profile.closeDepartDialog);$(document.body).append(C)};mapwithus.profile.showDepartDialog=function(D,B,A,C){if($("#mwu-depart-dialog").length==0){mapwithus.profile.generateDepartDialog(D,B,A)}else{$("#mwu-depart-dialog-title").val(B);$("#mwu-depart-dialog-msg").val(A)}$("#mwu-depart-dialog-id").val(D);$("#mwu-depart-dialog-submit").click(C);$("#mwu-depart-dialog").show()};mapwithus.profile.clearDepartDialog=function(){if($("#mwu-depart-dialog").length){$("#mwu-depart-dialog-id").val("");$("#mwu-depart-dialog-title").val("");$("#mwu-depart-dialog-msg").val("");$("#mwu-depart-dialog-confirmation").val("")}};mapwithus.profile.closeDepartDialog=function(){if($("#mwu-depart-dialog").length){$("#mwu-depart-dialog").hide()}mapwithus.profile.clearDepartDialog()};mapwithus.profile.beginRevokeInvitation=function(B){var A="You are about to revoke this user's invitation.<br/>To join, the user will have to be reinvited.<br/>If the user tries to redeem their invitation, they will<br/>be informed that their invitation is no longer valid<br/><br/>To continue, type <i>REVOKE</i> as a confirmation.<br/>Otherwise, click <i>Cancel</i>";mapwithus.profile.showRevokeDialog(B,"Revoke Group Invitation",A,mapwithus.profile.finishRevokeInvitation)};mapwithus.profile.finishRevokeInvitation=function(){var C=$("#mwu-revoke-dialog-confirmation").val();var D=$("#mwu-revoke-dialog-reason").val();if(C!=null&&C.toUpperCase()=="REVOKE"){var E=$("#mwu-revoke-dialog-id").val();var A=new StringBuffer();A.a("action=revoke&revoke_clientid=").a(E);if(D!=null&&D.length>1){A.a("&reason=").a(encodeURIComponent(D))}var B={returnResponse:true};mapwithus.ajax.call("/api/group/admin",A.toString(),function(G){var J=mapwithus.util.nh(G,"success");if(J){var I=$("#mwu-revoke-dialog-id").value;$("#member-invite-"+I).css({"display":"none"});mapwithus.profile.closeRevokeDialog();mapwithus.util.flashNotice("Successfully revoked invitation")}else{if(mapwithus.util.nh(G,"error")){var F=mapwithus.util.tag(G,"error")[0];var H=null;if(mapwithus.util.nh(F,"message")){H=mapwithus.util.nvn(F,"message")}if(H&&H.length>0){mapwithus.util.flashError(H)}else{mapwithus.util.flashError("Unable to revoke invitation")}}}},B)}else{if(C&&C.length>0){mapwithus.util.flashError("Invalid confirmation")}else{mapwithus.profile.closeRevokeDialog()}}};mapwithus.profile.generateRevokeDialog=function(G,F,E){var A,C,B;var D=$(document.createElement("div")).attr({"id":"mwu-revoke-dialog"}).css({"display":"none"}).append($(document.createElement("div")).attr({"class":"mwu-dialogbackground"})).append($(document.createElement("div")).addClass("mwu-dialog").append($(document.createElement("div")).addClass("mwu-dialog-header").append($(document.createElement("span")).attr({"id":"mwu-revoke-dialog-title"}).addClass("mwu-dialog-title").append(F)).append(A=$(document.createElement("div")).addClass("mwu-dialog-x").append($(document.createElement("a")).attr({"id":"mwu-revoke-button-x","href":"javascript:void(0);"}).append("X")))).append($(document.createElement("div")).addClass("mwu-dialog-content").css({"width":"390px"}).append($(document.createElement("div")).addClass("mwu-dialog-bumper")).append($(document.createElement("div")).attr({"id":"mwu-revoke-dialog-msg","class":"mwu-dialog-content-field-top"}).append($(document.createElement("span")).css({"lineHeight":"20px"}).append(E)).append($(document.createElement("br"))).append($(document.createElement("br"))).append("Confirmation:").append($(document.createElement("input")).attr({"id":"mwu-revoke-dialog-confirmation"}).addClass("mwu-dialog-input").css({"width":"345px"})).append($(document.createElement("div")).addClass("mwu-dialog-content-field").css({"padding":"10px 0","margin":"0"}).append("Reason <span style='font-size: 0.9em'>(optional)</span>:").append($(document.createElement("textarea")).attr({"id":"mwu-revoke-dialog-reason","type":"text","alt":"Not required"}).addClass("mwu-dialog-textarea").css({"width":"345px","height":"125px"}))).append($(document.createElement("input")).attr({"id":"mwu-revoke-dialog-id","type":"hidden","value":G}))).append($(document.createElement("div")).addClass("mwu-dialog-buttons").append(B=$(document.createElement("button")).attr({"id":"mwu-revoke-dialog-cancel"}).addClass("mwu-dialog-button-left").append("Cancel")).append(C=$(document.createElement("button")).attr({"id":"mwu-revoke-dialog-submit"}).append("Submit"))).append($(document.createElement("div")).addClass("mwu-dialog-bumper"))));A.onclick=mapwithus.profile.closeRevokeDialog;B.onclick=mapwithus.profile.closeRevokeDialog;$(document.body).append(D)};mapwithus.profile.showRevokeDialog=function(D,B,A,C){if($("#mwu-revoke-dialog").length==0){mapwithus.profile.generateRevokeDialog(D,B,A)}else{$("#mwu-revoke-dialog-title").val(B);$("#mwu-revoke-dialog-msg").val(A)}$("#mwu-revoke-dialog-id").val(D);$("#mwu-revoke-dialog-submit").click(C);$("#mwu-revoke-dialog").show()};mapwithus.profile.clearRevokeDialog=function(){if($("#mwu-revoke-dialog")){$("#mwu-revoke-dialog-id").val("");$("#mwu-revoke-dialog-title").val("");$("#mwu-revoke-dialog-msg").val("");$("#mwu-revoke-dialog-confirmation").val("")}};mapwithus.profile.closeRevokeDialog=function(){if($("#mwu-revoke-dialog")){$("#mwu-revoke-dialog").hide()}mapwithus.profile.clearRevokeDialog()};mapwithus.profile.generateConfirmationDialog=function(G,F,E){var A,D,C;var B=$(document.createElement("div")).attr({"id":"mwu-confirmation-dialog"}).css({"display":"none"}).append($(document.createElement("div")).attr({"class":"mwu-dialogbackground"})).append($(document.createElement("div")).addClass("mwu-dialog").append($(document.createElement("div")).addClass("mwu-dialog-header").append($(document.createElement("span")).attr({"id":"mwu-confirmation-dialog-title"}).addClass("mwu-dialog-title").append(F)).append(A=$(document.createElement("div")).addClass("mwu-dialog-x").append($(document.createElement("a")).attr({"id":"mwu-confirmation-button-x","href":"javascript:void(0);"}).append("X")))).append($(document.createElement("div")).addClass("mwu-dialog-content").css({"width":"425px"}).append($(document.createElement("div")).addClass("mwu-dialog-bumper")).append($(document.createElement("div")).attr({"id":"mwu-confirmation-dialog-msg","class":"mwu-dialog-content-field-top"}).append(E).append($(document.createElement("br"))).append($(document.createElement("br"))).append($(document.createElement("input")).attr({"id":"mwu-confirmation-dialog-confirmation"}).addClass("mwu-dialog-input").css({"width":"380px"})).append($(document.createElement("input")).attr({"id":"mwu-confirmation-dialog-id","type":"hidden"}))).append($(document.createElement("div")).addClass("mwu-dialog-buttons").append(C=$(document.createElement("button")).attr({"id":"mwu-confirmation-dialog-cancel"}).addClass("mwu-dialog-button-left").append("Cancel")).append(D=$(document.createElement("button")).attr({"id":"mwu-confirmation-dialog-submit"}).append("Submit"))).append($(document.createElement("div")).addClass("mwu-dialog-bumper"))));A.click(mapwithus.profile.closeConfirmationDialog);C.click(mapwithus.profile.closeConfirmationDialog);$(document.body).append(B)};mapwithus.profile.showConfirmationDialog=function(D,B,A,C){if($("#mwu-confirmation-dialog").length){$("#mwu-confirmation-dialog").remove()}mapwithus.profile.generateConfirmationDialog(D,B,A);$("#mwu-confirmation-dialog-id").val(D);$("#mwu-confirmation-dialog-submit").click(C);$("#mwu-confirmation-dialog").show()};mapwithus.profile.clearConfirmationDialog=function(){if($("#mwu-confirmation-dialog").length){$("#mwu-confirmation-dialog-id").val("");$("#mwu-confirmation-dialog-title").val("");$("#mwu-confirmation-dialog-msg").val("");$("#mwu-confirmation-dialog-confirmation").val("")}};mapwithus.profile.closeConfirmationDialog=function(){if($("#mwu-confirmation-dialog").length){$("#mwu-confirmation-dialog").hide()}mapwithus.profile.clearConfirmationDialog()};mapwithus.profile.getGroupRateables=function(){var A="action=list";var B={returnResponse:true};mapwithus.ajax.call("/api/rateable",A,function(L){var N=mapwithus.util.nh(L,"error");if(!N){if(mapwithus.util.nh(L,"rateables")){var F=mapwithus.util.tag(L,"rateables")[0];if(F){F=mapwithus.util.tag(F,"rateable")}var C,D,P,M,H,O,G,K;C=P=M=G=K=null;D=H=O=-1;var E=0;var J=new StringBuffer();for(var I=0;I<F.length;I++){C=F[I];if(C){if(mapwithus.util.nh(C,"id")){D=mapwithus.util.nivn(C,"id")}if(mapwithus.util.nh(C,"title")){P=mapwithus.util.nvn(C,"title")}if(mapwithus.util.nh(C,"description")){M=mapwithus.util.nvn(C,"description")}if(mapwithus.util.nh(C,"min")){H=mapwithus.util.nivn(C,"min")}if(mapwithus.util.nh(C,"max")){O=mapwithus.util.nivn(C,"max")}if(mapwithus.util.nh(C,"created")){G=mapwithus.util.nvn(C,"created")}if(mapwithus.util.nh(C,"modified")){K=mapwithus.util.nvn(C,"modified")}else{K=G}}if(D!=-1&&P!=null&&H!=-1&&O!=-1){J.a(mapwithus.profile.generateRateableHTML(D,P,M,H,O,G,K));E++}}if(E==0){J.a("<h3>You haven't created any rateable items yet</h3>")}}$("#rateables").get(0).innerHTML=J.toString()}else{N=mapwithus.util.tag(L,"error")[0];var Q=null;if(mapwithus.util.nh(N,"message")){Q=mapwithus.util.nvn(N,"message")}if(Q&&Q.length>0){$("#rateables").innerHTML="<div style='font-size:13pt;margin-top:10px;'>"+Q+"</div>"}else{$("#rateables").innerHTML="<div style='font-size:13pt;margin-top:10px;'>An error occurred loading Rateable items</div>"}}},B)};mapwithus.profile.generateRateableHTML=function(H,F,E,D,A,G,B){var C=new StringBuffer();C.a('<div id="').a("rate-").a(H).a('" class="aboutitem rateable">');C.a(mapwithus.profile.generateRateableInnerHTML(H,F,E,D,A,G,B));C.a("</div>");return C.toString()};mapwithus.profile.generateRateableInnerHTML=function(H,F,E,D,A,G,B){var C=new StringBuffer();C.a('<div class="rate-title">');C.a("<span id='rate-").a(H).a("-title'>").a(F).a("</span>");C.a('<div class="rate-rates">');C.a('<span class="rate-label">Minimum rating:</span>').a("<span id='rate-").a(H).a("-min'>").a(D).a("</span>").a('&nbsp;&nbsp;&nbsp;&nbsp;<span class="rate-label">Maximum rating:</span>').a("<span id='rate-").a(H).a("-max'>").a(A).a("</span>");C.a("</div>");C.a("</div>");C.a('<div class="rate-dates">');C.a('<span class="rate-label" style="font-size:1em;">Created:</span>').a(mapwithus.profile.getDateString(G)).a("<br/>");C.a('<span class="rate-label" style="font-size:1em;">Updated:</span>').a(mapwithus.profile.getDateString(B));C.a("</div>");C.a('<div style="clear:both;"></div>');C.a('<span class="rate-label">Description:</span>').a("<span id='rate-").a(H).a("-desc'>").a(E).a("</span>").a("<br/>");C.a('<span style="font-size:0.8em;float:right">');C.a("<a class='mwu-curpointer' onclick='mapwithus.profile.beginEditRateable("+H+");'>Edit</a> --- <a class='mwu-curpointer' onclick=\"mapwithus.profile.beginDeleteRateable("+H+');">Delete</a>');C.a("</span>");C.a("<div style='clear:right'></div>");return C.toString()};mapwithus.profile.generateRateableDialog=function(){var B,D,C;var A=$(document.createElement("div")).attr({"id":"mwu-rateable-dialog"}).css({"display":"none"}).append($(document.createElement("div")).attr({"class":"mwu-dialogbackground"})).append($(document.createElement("div")).addClass("mwu-dialog").append($(document.createElement("div")).addClass("mwu-dialog-header").append($(document.createElement("span")).addClass("mwu-dialog-title").append("Create Rateable Item")).append(B=$(document.createElement("div")).addClass("mwu-dialog-x").append($(document.createElement("a")).attr({"id":"mwu-rateable-button-x","href":"javascript:void(0);"}).append("X")))).append($(document.createElement("div")).addClass("mwu-dialog-content").append($(document.createElement("div")).addClass("mwu-dialog-bumper")).append($(document.createElement("div")).addClass("mwu-dialog-content-field-top").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"125px"}).append("Title:")).append($(document.createElement("input")).attr({"id":"mwu-rateable-title"}).addClass("mwu-dialog-input").css({"width":"300px"}))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label mwu-dialog-textarea-label").css({"width":"125px"}).append("Description:")).append($(document.createElement("textarea")).attr({"id":"mwu-rateable-desc"}).addClass("mwu-dialog-textarea"))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"125px","float":"left","display":"block","marginTop":"3px"}).append("Minimum Rating:").append($(document.createElement("br"))).append($(document.createElement("span")).attr({"class":"mwu-dialog-input-label"}).css({"fontSize":"0.7em"}).append("(1 - 10)"))).append($(document.createElement("input")).attr({"id":"mwu-rateable-min"}).addClass("mwu-dialog-input").css({"width":"100px"})).append($(document.createElement("div")).css({"clear":"both"}))).append($(document.createElement("div")).addClass("mwu-dialog-content-field").append($(document.createElement("span")).addClass("mwu-dialog-input-label").css({"width":"125px","float":"left","display":"block","marginTop":"3px"}).append("Maximum Rating:").append($(document.createElement("br"))).append($(document.createElement("span")).attr({"class":"mwu-dialog-input-label"}).css({"fontSize":"0.7em"}).append("(1 - 10)"))).append($(document.createElement("input")).attr({"id":"mwu-rateable-max"}).addClass("mwu-dialog-input").css({"width":"100px"})).append($(document.createElement("div")).css({"clear":"both"}))).append($(document.createElement("div")).addClass("mwu-dialog-buttons").append(C=$(document.createElement("button")).attr({"id":"mwu-rateable-cancel"}).addClass("mwu-dialog-button-left").append("Cancel")).append(D=$(document.createElement("button")).attr({"id":"mwu-rateable-submit"}).append("Submit"))).append($(document.createElement("div")).addClass("mwu-dialog-bumper"))));B.click(mapwithus.profile.closeRateableDialog);C.click(mapwithus.profile.closeRateableDialog);$(document.body).append(A)};mapwithus.profile.closeRateableDialog=function(){if($("#mwu-rateable-dialog").length){$("#mwu-rateable-dialog").hide()}mapwithus.profile.resetRateableInputs()};mapwithus.profile.resetRateableInputs=function(){if($("#mwu-rateable-title").length){$("#mwu-rateable-title").val("")}if($("#mwu-rateable-desc").length){$("#mwu-rateable-desc").val("")}if($("#mwu-rateable-min").length){$("#mwu-rateable-min").val("")}if($("#mwu-rateable-max").length){$("#mwu-rateable-max").val("")}};mapwithus.profile.beginCreateRateable=function(){if($("#mwu-rateable-dialog").length==0){mapwithus.profile.generateRateableDialog()}$("#mwu-rateable-submit").unbind("click");$("#mwu-rateable-submit").click(mapwithus.profile.finishCreateRateable);mapwithus.profile.showRateableDialog()};mapwithus.profile.finishCreateRateable=function(){if($("#mwu-rateable-dialog").length==0){mapwithus.profile.generateRateableDialog();return }var F=$("#mwu-rateable-title").val();var E=$("#mwu-rateable-desc").val();var C=parseInt($("#mwu-rateable-min").val());var A=parseInt($("#mwu-rateable-max").val());if(isNaN(C)||C<0){mapwithus.util.flashError("Unable to create rateable - invalid minimum value");return }if(isNaN(A)||A<0||A<C){mapwithus.util.flashError("Unable to create rateable - invalid maximum value");return }var B=new StringBuffer();B.a("action=create");B.a("&title=").a(encodeURIComponent(F)).a("&desc=").a(encodeURIComponent(E));B.a("&min=").a(C).a("&max=").a(A);var D={returnResponse:true};mapwithus.ajax.call("/api/rateable",B.toString(),function(H){if(mapwithus.util.nh(H,"error")){var G=mapwithus.util.nvn(H,"error");var I;if(mapwithus.util.nh(G,"message")){I=mapwithus.util.nvn(G,"message")}else{I="An unknown error occurred, please try again"}mapwithus.util.flashError(I)}else{if(mapwithus.util.nh(H,"success")){mapwithus.profile.getGroupRateables();mapwithus.profile.closeRateableDialog();mapwithus.util.flashNotice("Successfully created rateable item")}}},D)};mapwithus.profile.beginEditRateable=function(A){if($("#mwu-rateable-dialog").length==0){mapwithus.profile.generateRateableDialog()}$("#mwu-rateable-title").val($("#rate-"+A+"-title").html());$("#mwu-rateable-desc").val($("#rate-"+A+"-desc").html());$("#mwu-rateable-min").val($("#rate-"+A+"-min").html());$("#mwu-rateable-max").val($("#rate-"+A+"-max").html());$("#mwu-rateable-submit").unbind("click");$("#mwu-rateable-submit").click(function(){mapwithus.profile.finishEditRateable(A)});mapwithus.profile.showRateableDialog()};mapwithus.profile.showRateableDialog=function(){$("#mwu-rateable-dialog").show()};mapwithus.profile.finishEditRateable=function(G){var F=$("#mwu-rateable-title").val();var E=$("#mwu-rateable-desc").val();console.log("val length = "+$("#mwu-rateable-desc").val().length);var C=parseInt($("#mwu-rateable-min").val());var A=parseInt($("#mwu-rateable-max").val());if(isNaN(C)||C<1||C>10){mapwithus.util.flashError("Unable to update rateable - invalid minimum value");return }if(isNaN(A)||A<1||A<C||A>10){mapwithus.util.flashError("Unable to update rateable - invalid maximum value");return }var B=new StringBuffer();B.a("action=update&rid=").a(G);B.a("&title=").a(encodeURIComponent(F)).a("&desc=").a(encodeURIComponent(E));B.a("&min=").a(C).a("&max=").a(A);var D={returnResponse:true};mapwithus.ajax.call("/api/rateable",B.toString(),function(I){if(mapwithus.util.nh(I,"error")){var H=mapwithus.util.nvn(I,"error");var J;if(mapwithus.util.nh(H,"message")){J=mapwithus.util.nvn(H,"message")}else{J="An unknown error occurred, please try again"}mapwithus.util.flashError(J)}else{if(mapwithus.util.nh(I,"success")){mapwithus.profile.getGroupRateables();mapwithus.profile.closeRateableDialog();mapwithus.util.flashNotice("Successfully updated rateable item")}}},D)};mapwithus.profile.beginDeleteRateable=function(D){var B="If you really want to delete this item, type 'DELETE'.<br/>Otherwise, click 'Cancel";var A="Delete Rateable Item";var C=mapwithus.profile.finishDeleteRateable;mapwithus.profile.showConfirmationDialog(D,A,B,C)};mapwithus.profile.finishDeleteRateable=function(){var D=$("#mwu-confirmation-dialog-id").val();var C=$("#mwu-confirmation-dialog-confirmation").val();if(C.toUpperCase()=="DELETE"){var A=new StringBuffer();A.a("action=delete&rid=").a(D);var B={returnResponse:true};mapwithus.ajax.call("/api/rateable",A.toString(),function(F){var H=mapwithus.util.nh(F,"success");if(H){$("rate-"+D).css({"display":"none"});mapwithus.util.flashNotice("Successfully removed your rateable item");mapwithus.profile.closeConfirmationDialog();mapwithus.profile.getGroupRateables()}else{if(mapwithus.util.nh(F,"error")){var E=mapwithus.util.nvn(F,"error");var G;if(mapwithus.util.nh(E,"message")){G=mapwithus.util.nvn(E,"message")}else{G="An unknown error occurred, please try again"}mapwithus.util.flashError(G)}}},B)}else{mapwithus.util.flashError("Invalid confirmation")}};mapwithus.profile.getDateString=function(A){var G=parseFloat(A);if(isNaN(G)){return"Unknown"}var H=["Sun.","Mon.","Tues.","Weds.","Thurs.","Fri.","Sat."];var M=["Jan","Feb","March","April","May","June","July","Aug","Sept","Oct","Nov","Dec"];var J,I,C,K,E,D,L;var F=new Date(G);J=parseInt(F.getFullYear());I=parseInt(F.getMonth());C=parseInt(F.getDate());K=parseInt(F.getDay());E=parseInt(F.getHours());D=parseInt(F.getMinutes());if(K<0||K>6||I<0||I>11||C<1||C>31||E<0||E>23||D<0||D>59){return"invalid date"}if(E>11){L="PM";E=E-12}else{L="AM";if(E==0){E=12}}if(D<10){D="0"+D}var B=""+H[K]+" "+M[I]+" "+C+", "+J+" at "+E+":"+D+" "+L;return B};mapwithus.profile.showChangePass=function(){Effect.BlindDown("changepass");$("#passlink").css({"display":"none"});$("#passlink2").css({"display":"inline"})};mapwithus.profile.hideChangePass=function(){Effect.BlindUp("changepass");$("#passlink2").css({"display":"none"});$("#passlink").css({"display":"inline"})};mapwithus.profile.showAddLinkedAcct=function(){$("#addLinkedAcct").css("display","block");$("#addLinkedAcctButton").css("display","none")};mapwithus.profile.displayLinkFields=function(){$("#linkButton").css("display","none");$("#facebook").css("display","none");$("#openid").css("display","none");$("#google").css("display","none");$("#twitter").css("display","none");var A=$("#account_type").val();if(A=="Facebook"){$("#facebook").css("display","block")}else{if(A=="OpenID"){$("#openid").css("display","block");$("#linkButton").css("display","block")}else{if(A=="Google"){$("#google").css("display","block")}else{if(A=="Twitter"){$("#twitter").css("display","block")}}}}};mapwithus.profile.setLinkedAccountHtml=function(){$("#facebookacct").html("");$("#openids").html("");$("#twitteracct").html("");$("#addLinkedAcct").css("display","none");$("#addLinkedAcctButton").css("display","block");var A="";var B={returnResponse:true};mapwithus.ajax.call("/linked_accts",A,function(J){var I=new StringBuffer();var Q=false;$("#progress").html("");var O=mapwithus.util.nh(J,"password");var G=mapwithus.util.nh(J,"facebook");var C=mapwithus.util.nh(J,"twitter");var N=mapwithus.util.nh(J,"openid")?mapwithus.util.tag(J,"openid")[0]:null;var P=(N!=null);var D=mapwithus.util.nh(J,"googleid")?mapwithus.util.tag(J,"googleid")[0]:null;var F=(D!=null);if(G){Q=true;I.a('<div class="aboutitem">');I.a('  <div class="aboutkey"><img src="/r/images/facebook/facebook20.png"/>&nbsp;<span style="vertical-align:top;">Facebook</span></div>');I.a('  <div class="aboutvalue2 darkgraytext" style="margin-top:15px;">Your Facebook account is connected. <span style="font-size:75%;vertical-align:middle;">(<a href="javascript:void(0)" onclick="mapwithus.facebook.doFacebookUnlink()">Unlink</a>)</span></div>');I.a("</div>");$("#facebookacct").html(I.toString())}var E,L,M;var K;if(P){Q=true;I=new StringBuffer();I.a('<div class="aboutitem">');I.a('    <div class="aboutkey"><div style="height:20px;"><div class="openid_box"><img src="/r/images/openid-icon-small.png" style="vertical-align:middle;margin-left:1px;" /></div>&nbsp;<span style="vertical-align:top;">OpenID</span></div></div>');I.a('    <div class="aboutvalue2 darkgraytext">');I.a('        <div style="height:6px;"></div>');E=mapwithus.util.tag(N,"account");if(E.length>0){Q=true}for(var H=0;H<E.length;H++){L=mapwithus.util.nodeValue(E[H]);M=L;K=M.length-1;if(K>48){M=M.substr(0,45)+"..."}I.a('        <div id="'+L+'" style="margin-bottom:10px;">');if(O||E.length>1||G||C||F){I.a(""+M+' <span style="font-size:75%;vertical-align:middle;">(<a href="javascript:void(0)" onclick="mapwithus.profile.unlinkOpenid(\''+L+'\');" style="text-align:right">Unlink</a>)</span>')}else{I.a(""+M+' (<a href="javascript:void(0)" onclick="mapwithus.util.flashError(\'You need to set a password for your account<br/>before you can unlink your last OpenID.\');" style="text-align:right">Unlink</a>)')}I.a("        </div>")}I.a("    </div>");I.a("</div>");I.a('<div style="clear:both"></div>');$("#openids").html(I.toString())}if(F){Q=true;I=new StringBuffer();I.a('<div class="aboutitem">');I.a('    <div class="aboutkey"><div style="height:20px;"><div class="google_box"><img src="/r/images/google-icon.png" /></div>&nbsp;<span style="vertical-align:top;">Google</span></div></div>');I.a('    <div class="aboutvalue2 darkgraytext">');I.a('        <div style="height:6px;"></div>');E=mapwithus.util.tag(D,"account");if(E.length>0){Q=true}for(var H=0;H<E.length;H++){L=mapwithus.util.nodeValue(E[H]);M=L;K=M.length-1;if(K>48){M=M.substr(0,45)+"..."}I.a('        <div id="'+L+'" style="margin-bottom:10px;">');if(O||E.length>1||G||C||P){I.a(""+M+' <span style="font-size:75%;vertical-align:middle;">(<a href="javascript:void(0)" onclick="mapwithus.profile.unlinkOpenid(\''+L+'\');" style="text-align:right">Unlink</a>)</span>')}else{I.a(""+M+' (<a href="javascript:void(0)" onclick="mapwithus.util.flashError(\'You need to set a password for your account<br/>before you can unlink your last Google ID.\');" style="text-align:right">Unlink</a>)')}I.a("        </div>")}I.a("    </div>");I.a("</div>");I.a('<div style="clear:both"></div>');$("#googleids").html(I.toString())}if(C){Q=true;I=new StringBuffer();I.a('<div class="aboutitem">');I.a('  <div class="aboutkey"><img src="/r/images/twitter_icon.png" style="vertical-align:-3px;" />&nbsp;Twitter</div>');I.a('    <div class="aboutvalue2 darkgraytext" style="margin-top:15px;">');I.a("        Your Twitter account is currently linked.");if(O||G||P||F){I.a('<span style="font-size:75%;vertical-align:middle;">(<a href="javascript:void(0)" onclick="mapwithus.profile.doTwitterUnlink()">Unlink</a>)</span>')}else{I.a('<span style="font-size:75%;vertical-align:middle;">(<a href="javascript:void(0)" onclick="mapwithus.util.flashError(\'You need to set a password for your account<br/>before you can unlink Twitter.\');">Unlink</a>)</span>')}I.a("    </div>");I.a("</div>");$("#twitteracct").html(I.toString())}if(!Q){I=new StringBuffer();I.a('<div class="aboutitem">');I.a('  <div class="aboutkey"></div>');I.a('  <div class="aboutvalue2 darkgraytext">');I.a("      You don't currently have any linked accounts.");I.a("  </div>");I.a("</div>");$("#openids").html(I.toString())}},B)};mapwithus.profile.doTwitterUnlink=function(){var A="networkid=3";var B={returnResponse:true};mapwithus.ajax.call("/oauth/unlinker",A,function(C){if(mapwithus.util.nh(C,"success")){mapwithus.util.flashNotice("Successfully unlinked account!");mapwithus.profile.setLinkedAccountHtml()}else{if(mapwithus.util.nh(C,"error")){mapwithus.util.flashError("Unable to unlink account. Please try again or contact us if you continue to have problems.")}}},B)};mapwithus.profile.unlinkOpenid=function(B){var A="action=unlink&openid="+encodeURIComponent(B);var C={returnResponse:true};mapwithus.ajax.call("/openid",A,function(D){if(mapwithus.util.nh(D,"success")){mapwithus.util.flashNotice("Successfully unlinked account!");mapwithus.profile.setLinkedAccountHtml()}else{if(mapwithus.util.nh(D,"error")){mapwithus.util.flashError("Unable to unlink account. Please try again or contact us if you continue to have problems.")}}},C)};mapwithus.profile.linkOpenid=function(){var E=location.href.substr(10);var C=E.indexOf("/");var D=E.substr(C);var B=mapwithus.xd.url("/openid/redirect?action=link&next="+D);var F;var G=$("#account_type").val();if(G=="OpenID"){F=$("#openid_url").val()}else{if(G=="Google"){F="https://www.google.com/accounts/o8/id"}}var A="&openid="+encodeURIComponent(F);window.location.href=B+A};mapwithus.profile.initStreetbrewProfileSettings=function(){initStreetbrew();if(mapwithus.profile.doPresencePane){mapwithus.profile.initPresencePane()}if(mapwithus.profile.doAvatarList){mapwithus.profile.getAvatarList()}};mapwithus.profile.initStreetbrewProfileSettingsAccount=function(){initStreetbrew();mapwithus.profile.setLinkedAccountHtml()};mapwithus.profile.initStreetbrewProfileSettingsLabels=function(){initStreetbrew();mapwithus.profile.populateLabels()};mapwithus.profile.initProfileSettingsAccount=function(){initDefault();setLinkedAccountHtml()};mapwithus.profile.initMobilePage=function(){mapwithus.profile.initLafFields()};mapwithus.profile.initLafFields=function(){var A=showIconDefault||showIconUser||(showThumbnail&&defDisplayId>=0);$("#defartdisplaytitle").attr({"checked":showTitle});$("#defartdisplaycolor").attr({"selectedIndex":(defColor-1)});$("#defartdisplaythumb").attr({"checked":(showThumbnail&&(defDisplayId<0))});$("#defartdisplaythumbcluster").attr({"checked":($("#defartdisplaythumb").is(":checked")&&showCluster)});$("#defartdisplayicon").attr({"checked":A});$("#defartdisplayiconcluster").attr({"checked":($("#defartdisplayicon").is(":checked")&&showCluster)});mapwithus.profile.selectIcon(showIconDefault?2:showIconUser||showThumbnail?4:0,defDisplayId,defIconName,showThumbnail);$("#defartdisplayicontop").attr({"selectedIndex":Math.abs(defAnchorTop)});$("#defartdisplayiconleft").attr({"selectedIndex":Math.abs(defAnchorLeft)});mapwithus.profile.lafCheck(null)};mapwithus.profile.lafCheck=function(D){var C=$("#defartdisplaytitle").is(":checked");var A=$("#defartdisplaythumb").is(":checked");var B=$("#defartdisplayicon").is(":checked");if(!C&&!A&&!B){$("#defartdisplaythumb").attr({"checked":true});A=true}else{if(A&&B){if(D=="icon"){$("#defartdisplaythumb").attr({"checked":false});$("#defartdisplayicon").attr({"checked":true});A=false}else{$("#defartdisplaythumb").attr({"checked":true});$("#defartdisplayicon").attr({"checked":false});B=false}}}$("#defartdisplaycolor").attr({"disabled":!C});$("#defartdisplaythumbcluster").attr({"disabled":!A});$("#defartdisplaythumbclustertxt").css("color",(A?"black":"silver"));$("#defartdisplaythumbclustertxt").attr({"disabled":!B});$("#defartdisplayiconclustertxt").css("color",(B?"black":"silver"));$("#selectdefarticon").css("display",(B?"block":"none"));if(!$("#selectdefarticon").is(":hidden")){mapwithus.profile.setChooseIcon(true)}};mapwithus.profile.lafBuildArgs=function(){var C=$("#defartdisplaytitle").is(":checked");var G=$("#defartdisplaythumb").is(":checked");var B=$("#defartdisplayicon").is(":checked");var H=G?$("#defartdisplaythumbcluster").is(":checked"):(B?$("#defartdisplayiconcluster").is(":checked"):false);var I=G?-1:parseInt($("#defartdisplayiconid").val());if(isNaN(I)){I=-1}var J=G?4:parseInt($("#defartdisplayiconsrc").val());if(isNaN(J)){J=0}if(B&&(J<1||I<1)){alert("You must select an image.");return null}var A=$("#defartdisplaycolor option:selected").val();var D=$("#defartdisplayiconleft option:selected").val();var F=$("#defartdisplayicontop option:selected").val();var E="action=setdefart";E+="&dtitle="+C;E+="&dicon="+(B||G);E+="&dcluster="+H;E+="&dcolor="+A;E+="&did="+I;E+="&dsrc="+J;E+="&dleft="+D;E+="&dtop="+F;return E};mapwithus.profile.lafSave=function(){var A=mapwithus.profile.lafBuildArgs();if(A!=null){mapwithus.ajax.call("/users",A,function(){mapwithus.util.flashNotice("Save successful.")})}};mapwithus.profile.lafGroupSave=function(){var A=mapwithus.profile.lafBuildArgs();if(A!=null){var B={returnResponse:true};mapwithus.ajax.call("/api/group/admin",A,function(C){if(mapwithus.util.nh(C,"success")){mapwithus.util.flashNotice("Save successful.")}else{mapwithus.util.flashError(mapwithus.util.nvn(C,"error"))}},B)}};mapwithus.profile.setChooseIcon=function(B){$("#iconselectnew").css("display",B?"none":"block");$("#iconselectpane").css("display",B?"block":"none");if(B){$("#iconselectlist").html('<img src="/r/images/loading.gif" />');var A="";if(typeof (autoadd)!="undefined"){A="autoadd="+autoadd}mapwithus.ajax.call("/IconListMobile",A,function(C){$("#iconselectlist").html(C);$("#iconphotolistupload").attr({"src":"/IconListUpload"})},{delim:"~!~.$"})}};mapwithus.profile.showIconCategory=function(D,C,A){$("#iconCatShow"+D).css({"display":(C?"none":"inline")});$("#iconCatHide"+D).css({"display":(C?"inline":"none")});$("#iconCat"+D).css({"display":(C?"block":"none")});if(C&&!A){var B=$("#iconselectlist");B.scrollTop(B.scrollTop()+40)}};mapwithus.profile.selectIcon=function(C,D,B,A){$("#defartdisplayiconsrc").val(""+C);$("#defartdisplayiconid").val(""+(D?D:""));if(C==2||(C==4&&D>=0)){$("#articleicon").html('<img src="'+(C==2?"/r/images/icons/default/"+B:"/r/FileView/file/f/F"+D+(A?"/t/true/":"/")+B)+'" style="vertical-align:text-bottom" />')}else{$("#articleicon").html("<i>(No icon selected)</i>")}mapwithus.profile.setChooseIcon(false)};mapwithus.profile.resetMobileAppkey=function(){var A="action=resetmobile";mapwithus.ajax.call("/users",A,function(){location.reload(true)})};mapwithus.profile.setReferrerBlocked=function(C,E,D,B){var A="action=refblock";A+="&viewid="+E;A+="&uri="+encodeURIComponent(D);A+="&blocked="+B;mapwithus.ajax.call("/maps",A,function(F){var G=mapwithus.util.nbvn(F,"success");if(G){B=mapwithus.util.nbvn(F,"blocked");$("#er"+C+"uri").css({"textDecoration":B?"line-through":"none"});$("#er"+C+"block").css({"display":B?"none":"inline"});$("#er"+C+"unblock").css({"display":B?"inline":"none"})}else{if(mapwithus.util.nh(F,"error")){mapwithus.util.MonkeyDialog.show("<h3>"+mapwithus.util.nvn(F,"error")+"</h3>")}}},{returnResponse:true})};mapwithus.profile.addMap=function(){var A=mapwithus.profile.useSubid;var D=$("#submgraddmap");var C=D.selectedIndex;if(C<0){alert("You must select a map to associate with your service.");return }var E=D.options[C].value;var B="action=addview";B+="&subid="+A;B+="&viewid="+E;mapwithus.ajax.call("/subscription",B,function(F){var G=F.getElementsByTagName("success");if(G.length>0){var H=parseInt(nodeValue(G[0]));mapwithus.profile.startEditService(A,{map:H})}else{alert("An error occurred while completing your request. Please try refreshing the page.")}})};mapwithus.profile.removeMap=function(A,D,C){if(!confirm("Are you sure you want to disassociate this map from your service?")){return }var B="action=removeview";B+="&subid="+A;B+="&viewid="+C;mapwithus.ajax.call("/subscription",B,function(E){var F=(E.getElementsByTagName("success").length>0);if(F){mapwithus.profile.startEditService(A)}else{alert("The map could not be removed. Ensure that no levels use this map. If the error persists, please try refreshing the page.");mapwithus.profile.startEditService(A,{map:D})}})};mapwithus.profile.effectToggle=function(C,B,A,D){if($("#"+C).is(":hidden")){$("#"+C).show(B,A,D)}else{$("#"+C).hide(B,A,D)}};var commentload=new Array();commentload["pending"]=false;commentload["all"]=false;(function(B){B.fn.superfish=function(J){var F=B.fn.superfish,I=F.c,E=B(['<span class="',I.arrowClass,'"> &#187;</span>'].join("")),H=function(){var K=B(this),L=C(K);clearTimeout(L.sfTimer);K.showSuperfishUl().siblings().hideSuperfishUl()},D=function(){var K=B(this),M=C(K),L=F.op;clearTimeout(M.sfTimer);M.sfTimer=setTimeout(function(){L.retainPath=(B.inArray(K[0],L.$path)>-1);K.hideSuperfishUl();if(L.$path.length&&K.parents(["li.",L.hoverClass].join("")).length<1){H.call(L.$path)}},L.delay)},C=function(K){var L=K.parents(["ul.",I.menuClass,":first"].join(""))[0];F.op=F.o[L.serial];return L},G=function(K){K.addClass(I.anchorClass).append(E.clone())};return this.each(function(){var K=this.serial=F.o.length;var M=B.extend({},F.defaults,J);M.$path=B("li."+M.pathClass,this).slice(0,M.pathLevels).each(function(){B(this).addClass([M.hoverClass,I.bcClass].join(" ")).filter("li:has(ul)").removeClass(M.pathClass)});F.o[K]=F.op=M;B("li:has(ul)",this)[(B.fn.hoverIntent&&!M.disableHI)?"hoverIntent":"hover"](H,D).each(function(){if(M.autoArrows){G(B(">a:first-child",this))}}).not("."+I.bcClass).hideSuperfishUl();var L=B("a",this);L.each(function(N){var O=L.eq(N).parents("li");L.eq(N).focus(function(){H.call(O)}).blur(function(){D.call(O)})});M.onInit.call(this)}).each(function(){var K=[I.menuClass];if(F.op.dropShadows&&!(B.browser.msie&&B.browser.version<7)){K.push(I.shadowClass)}B(this).addClass(K.join(" "))})};var A=B.fn.superfish;A.o=[];A.op={};A.IE7fix=function(){var C=A.op;if(B.browser.msie&&B.browser.version>6&&C.dropShadows&&C.animation.opacity!=undefined){this.toggleClass(A.c.shadowClass+"-off")}};A.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};A.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};B.fn.extend({hideSuperfishUl:function(){var E=A.op,D=(E.retainPath===true)?E.$path:"";E.retainPath=false;var C=B(["li.",E.hoverClass].join(""),this).add(this).not(D).removeClass(E.hoverClass).find(">ul").hide().css("visibility","hidden");E.onHide.call(C);return this},showSuperfishUl:function(){var E=A.op,D=A.c.shadowClass+"-off",C=this.addClass(E.hoverClass).find(">ul:hidden").css("visibility","visible");A.IE7fix.call(C);E.onBeforeShow.call(C);C.animate(E.animation,E.speed,function(){A.IE7fix.call(C);E.onShow.call(C)});return this}})})(jQuery);jQuery.fn.liScroll=function(A){A=jQuery.extend({travelocity:0.07},A);return this.each(function(){var C=jQuery(this);C.addClass("newsticker");var F=1;C.find("li").each(function(J){F+=jQuery(this,J).outerWidth(true)});var I=C.wrap("<div class='mask'></div>");var E=C.parent().wrap("<div class='tickercontainer'></div>");var G=C.parent().parent().width();C.width(F);var D=F+G;var B=D/A.travelocity;function H(K,J){C.animate({left:"-="+K},J,"linear",function(){C.css("left",G);H(D,B)})}H(D,B);C.hover(function(){jQuery(this).stop()},function(){var L=jQuery(this).offset();var J=L.left+F;var K=J/A.travelocity;H(J,K)})})};if(!window.mapwithus){window.mapwithus={}}if(window.dhtmlHistory){window.dhtmlHistory.create({toJSON:function(A){return Object.toJSON(A)},fromJSON:function(A){return A.evalJSON()}});window.dhtmlHistory.initialize();window.dhtmlHistory.addListener(historyChange)}function log(A){if(window.console){console.log(A)}}var session=null;function initSession(A){mapwithus.xd.setLog(true);mapwithus.xd.setBaseURL("http://www.mapwith.us");mapwithus.xd.setBaseContext("");session=new mapwithus.session.Session();if(!!A&&typeof A=="function"){A()}}function initMapwithus(A){checkLoginParam();checkFlash();initSession(A);initLoginOptionViaCookie();$("#mwu-nav-search-button").click(function(){window.open("/find?search="+encodeURIComponent($("#mwu-nav-search-input").val())),"_blank"});$("#mwu-nav-search-input").keypress(function(B){if(B.keyCode==13){$("#mwu-nav-search-button").click()}});$("#mwu-logo").click(function(){window.location="/"});$("ul.sf-menu").superfish({animation:{height:"show"},speed:300,delay:100})}function loadCrumbs(A){if(A==null||A.length==0){return }var B;var C=new StringBuffer();var E=false;for(var D=0;D<A.length;D++){B=A[D];if(B.length!=2){continue}if(D==(A.length-1)){E=true}if(D>0){C.a("&nbsp;<span class='mwu-nav-hist-sep'>></span>&nbsp;")}if(E){C.a("<span class='mwu-nav-hist-current'>");C.a(B[0])}else{C.a("<a href='").a(B[1]).a("'>").a(B[0]).a("</a>")}if(E){C.a("</span>")}}$("#mwu-nav-hist-content").html(C.toString())}function switchBanners(){var A=$("div#mwu-banners div.active");if(A.length==0){A=$("div#mwu-banners div:last")}var B=A.next().length?A.next():$("div#mwu-banners div:first");A.addClass("last-active");B.addClass("active");var D=$("div#mwu-banners div.active > janim-in");if((D.length>0)&&D.html()=="opacity"){A.animate({"opacity":0},{duration:1000,easing:"linear"});B.css({"opacity":0});B.animate({"opacity":1},{duration:1000,easing:"linear"})}else{A.hide();B.show()}A.removeClass("active last-active");var C=$("div#mwu-banners div.active div.timeout").html();setTimeout("switchBanners()",C)}function initMapwithusHome(A){setTimeout("switchBanners()",$("div#mwu-banners div.active div.timeout").html());initMapwithus(A)}function initMapwithusEdit(C,B){mapwithus.xd.setLog(true);mapwithus.xd.setBaseURL("http://www.mapwith.us");if(session==null){session=new mapwithus.session.Session()}var A={doHash:true,session:session,viewid:C,clientid:B};mapwithus.embed.init(initMapEmbed,A);mapwithus.edit.initPage()}function initMapwithusEmbedEdit(C,B){mapwithus.edit.embed=true;mapwithus.xd.setLog(true);mapwithus.xd.setBaseURL("http://www.mapwith.us");if(session==null){session=new mapwithus.session.Session()}var A={doHash:true,session:session,viewid:C,clientid:B,container:"mapcontainer"};mapwithus.embed.init(initMapEmbed,A);mapwithus.edit.initPage()}var embedMapReadyHandler=null;function initMapEmbed(B){if(!B){B={}}B.pancontrol=false;var A=document.getElementById((B.container?B.container:"mapcontainer2"));var C=new mapwithus.embed.Embed(A,B);embedMapReadyHandler=google.maps.event.addListener(C.map.map,"bounds_changed",function(){refreshNow(C)})}function refreshNow(A){A.refreshNow();if(embedMapReadyHandler!=null){google.maps.event.removeListener(embedMapReadyHandler)}}function initMapwithusProfile(A){initMapwithus(A)}function initLoginOptionViaCookie(){var A=mapwithus.cookies.readCookie("login-opt");if(A!=null){session.whichLoginOption=A;session.showLoginOption(A)}}function showLoginPane(A,B){if((typeof B!="undefined")&&(B)){console.log("Changing the dialog");$("#mwu-logindialogns").css({"position":"absolute","top":"10px","left":"10px","z-index":"1000","width":"600px"});$("#mwu-dialogbackground-div").css({"opacity":"0.8","background-color":"#fafafa"})}session.showLoginPane(A)}function closeLoginPane(){session.closeLoginPane()}function showLoginOption(A){session.showLoginOption(A)}function doLogin(A){session.doLogin(A)}function doMapwithusLogin(){$("mwu-mwuname").setStyle({"borderColor":""});$("mwu-mwupass").setStyle({"borderColor":""});session.loginPaneMapwithusName.value=$("mwu-mwuname").value.trim();session.loginPaneMapwithusPass.value=$("mwu-mwupass").value.trim();if(session.loginPaneMapwithusName.value.length==0){$("mwu-mwuname").setStyle({"borderColor":"red"}).focus();return }if(session.loginPaneMapwithusPass.value.length==0){$("mwu-mwupass").setStyle({"borderColor":"red"}).focus();return }session.doLogin()}function doOpenidLogin(A){session.doOpenidLogin(A)}function doFacebookLogin(){session.doFacebookLogin()}function invokeFacebookMediary(){session.invokeFacebookMediary()}function doGoogleLogin(){session.doGoogleLogin()}function doTwitterLogin(){session.doTwitterLogin()}function doLogout(){session.doLogout()}function checkLoginParam(){if(mapwithus.util.parseBoolean(mapwithus.util.getParameterValue("login"))){mapwithus.session.postLogin=true}}function checkFlash(){if(typeof flashTimeout=="undefined"){flashTimeout=3000}var B=$("ferror");var A=$("fnotice");if(B&&mapwithus.util.parseBoolean(B.value)){Effect.BlindDown("mwu-flasherror",{duration:0.75});setTimeout("Effect.BlindUp('mwu-flasherror', {duration: 0.75})",flashTimeout)}else{if(A&&mapwithus.util.parseBoolean(A.value)){Effect.BlindDown("mwu-flashnotice",{duration:0.75});setTimeout("Effect.BlindUp('mwu-flashnotice', {duration: 0.75})",flashTimeout)}}}function enterPressed(A){return mapwithus.util.enterPressed(A)}function escPressed(A){return mapwithus.util.escPressed(A)}function refreshHash(A){if(!window.dhtmlHistory){return }window.location.hash=A;addHistoryEvent()}function historyChange(A,C){var B=(typeof (C)=="object"&&C!=null?historyStorage.toJSON(C):C);historyLoad()}function addHistoryEvent(){var A=window.location.hash;if(A!=null&&A.length>0){window.dhtmlHistory.add(A,null)}historyLoad()}function historyLoad(C){var A=window.location.hash;if(A.indexOf("wall")>0){var B=A.split("/");if(B[1]!=null){}}}function initReceipts(){initMapwithus(initReceiptsSession)}function initReceiptsSession(){$("#btnGetReceipts").click(function(){$("#chkShowActive").change()});$("#chkShowActive").change(function(){$("#selItemsPerPage").change()});$("#selItemsPerPage").change(function(){$("#chkShowExpired").change()});$("#chkShowExpired").change(function(){$("#chkShowCancelled").change()});$("#chkShowCancelled").change(function(){mapwithus.receipt.rCurPage=0;mapwithus.receipt.getReceiptsSummary()});$("#txtStartDate").datepicker();$("#txtEndDate").datepicker();mapwithus.receipt.rPageSize=parseInt($("#selItemsPerPage").value);$("table#receiptsSummary tr th").each(function(){this.onclick=function(){var A=this.getElementsByTagName("input")[0].value;$("#sortColumnSelected").removeClass("sortColumnSelectedAsc").removeClass("sortColumnSelectedDesc");if(mapwithus.receipt.rSortBy!=A){mapwithus.receipt.rSortBy=A;$("sortColumnSelected").id=undefined;this.id="sortColumnSelected"}else{mapwithus.receipt.rSortOrder=mapwithus.receipt.rSortOrder.toLowerCase()=="asc"?"DESC":"ASC"}if(mapwithus.receipt.rSortOrder.toLowerCase()=="asc"){$("#sortColumnSelected").addClass("sortColumnSelectedAsc")}else{$("#sortColumnSelected").addClass("sortColumnSelectedDesc")}mapwithus.receipt.getReceiptsSummary()};this.className="sortColumn"});$("#sortColumnSelected").click()}function createNewMap(B){if(sessionClientid==null){setLoginMsg("Sorry, you must be logged in to create new maps.");showLoginPane();return }if(B=="group"){alert("Not yet supported.");return }var A="action=create";mapwithus.ajax.call("/maps",A,function(){})}var footerEmail=false;var footerLink=false;var footerRSS=false;function toggleFooterEmail(){if(footerLink){toggleFooterLink()}if(footerRSS){toggleFooterRSS()}if(footerEmail){$("#mapfooteremail").css({"display":"none"})}else{$("#mapfooteremail").css({"display":"block"})}footerEmail=!footerEmail}function toggleFooterLink(){if(footerEmail){toggleFooterEmail()}if(footerRSS){toggleFooterRSS()}if(footerLink){$("#mapfooterlink").css({"display":"none"})}else{$("#mapfooterlink").css({"display":"block"})}footerLink=!footerLink}function toggleFooterRSS(){if(footerEmail){toggleFooterEmail()}if(footerLink){toggleFooterLink()}if(footerRSS){$("#mapfooterrss").css({"display":"none"})}else{$("#mapfooterrss").css({"display":"block"})}footerRSS=!footerRSS}function sendMapEmail(){var B=$("#emailfrom").val();var G=$("#emailto1").val();var F=$("#emailto2").val();var E=$("#emailto3").val();var D=$("#emailto4").val();var C=$("#linktotext").val();if(C==null||C==""){$("#emailtitle").html('<span style="color:#660000; font-weight:bold">You are not viewing a map.</span>');return }if(B==""){$("#emailtitle").html('<span style="color:#660000; font-weight:bold">You must enter your name or e-mail address.</span>');return }if(G==""&&F==""&&E==""&&D==""){$("#emailtitle").html('<span style="color:#660000; font-weight:bold">You must enter one or more e-mail addresses.</span>');return }var A="emailfrom="+encodeURIComponent(B)+"&email1="+encodeURIComponent(G)+"&email2="+encodeURIComponent(F)+"&email3="+encodeURIComponent(E)+"&email4="+encodeURIComponent(D)+"&emaillink="+encodeURIComponent(C);$("#emailtitle").html('<img src="/r/images/progressbar.gif" />');mapwithus.ajax.call("/EmailTo",A,function(H){$("#emailtitle").html("<b>"+H+"</b>");$("#emailto1").val("");$("#emailto2").val("");$("#emailto3").val("");$("#emailto4").val("")},{returnResponse:true})}function resetMapEmail(){$("#emailfrom").val("");$("#emailto1").val("");$("#emailto2").val("");$("#emailto3").val("");$("#emailto4").val("")}function initNewsFeed(A){mapwithus.ajax.call("/rss","rss="+encodeURIComponent(A),function(C){var B=mapwithus.util.nodeValue(C);$(".rssresulttitle",B).each(function(D,E){console.log("i = "+D+"val = ");console.log(E)})},{returnRootNode:true})}var rsskeywords="geo+map+mapping";var feedurl="http://news.google.com/news?q=";var feedlimit=15;function rssfeedsetup(){var A=new google.feeds.Feed(feedurl+rsskeywords+"&output=rss");A.setNumEntries(feedlimit);A.load(displayfeed)}function displayfeed(A){if(!A.error){var D="<ul id='ticker01'>";var C=A.feed.entries;for(var B=0;B<C.length;B++){D+="<li><a target='_blank' href='"+C[B].link+"'>"+C[B].title+"</a></li>"}D+="</ul>";$("#mwu-news-scrolltext").html(D);$("#view-all-rss-news-items").attr({"href":(feedurl+rsskeywords)});$(function(){$("ul#ticker01").liScroll({travelocity:0.05})})}else{alert("Error fetching feeds!")}}function setupPopularMapList(){var A="limit=15";mapwithus.ajax.call("/maps/popular",A,function(B){var C="<ul id='ticker01'><li>Most popular maps:</li>";$("map",B).each(function(D,E){C+="<li>#"+(D+1)+":&nbsp;<a target='_blank' href=\"/map/m/V"+$("map_id",E).text()+"/"+encodeURIComponent($("map_title",E).text())+'">'+$("map_title",E).text()+"</a> by "+$("username",E).text()+"</li>"});C+="</ul>";$("#mwu-news-scrolltext").html(C);$(function(){$("ul#ticker01").liScroll({travelocity:0.05});if(ieBrowser&&(ieBrowser==7||ieBrowser==8)){$("#ticker01").css({"width":"+=500"})}});$("#view-all-rss-news-items").attr({"href":"/find?orderby=popularity&asc=true"})},{returnResponse:true})}var ieBrowser=(function(){var C,A=3,D=document.createElement("div"),B=D.getElementsByTagName("i");while(D.innerHTML="<!--[if gt IE "+(++A)+"]><i></i><![endif]-->",B[0]){}return A>4?A:C}())
