| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 // $Id: jquery.js,v 1.12.2.3 2008/06/25 09:38:39 goba Exp $ 2 3 /* 4 * jQuery 1.2.6 - New Wave Javascript 5 * 6 * Copyright (c) 2008 John Resig (jquery.com) 7 * Dual licensed under the MIT (MIT-LICENSE.txt) 8 * and GPL (GPL-LICENSE.txt) licenses. 9 * 10 * Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) 11 * Rev: 5685 12 */ 13 eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(H(){J w=1b.4M,3m$=1b.$;J D=1b.4M=1b.$=H(a,b){I 2B D.17.5j(a,b)};J u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,62=/^.[^:#\\[\\.]*$/,12;D.17=D.44={5j:H(d,b){d=d||S;G(d.16){7[0]=d;7.K=1;I 7}G(1j d=="23"){J c=u.2D(d);G(c&&(c[1]||!b)){G(c[1])d=D.4h([c[1]],b);N{J a=S.61(c[3]);G(a){G(a.2v!=c[3])I D().2q(d);I D(a)}d=[]}}N I D(b).2q(d)}N G(D.1D(d))I D(S)[D.17.27?"27":"43"](d);I 7.6Y(D.2d(d))},5w:"1.2.6",8G:H(){I 7.K},K:0,3p:H(a){I a==12?D.2d(7):7[a]},2I:H(b){J a=D(b);a.5n=7;I a},6Y:H(a){7.K=0;2p.44.1p.1w(7,a);I 7},P:H(a,b){I D.P(7,a,b)},5i:H(b){J a=-1;I D.2L(b&&b.5w?b[0]:b,7)},1K:H(c,a,b){J d=c;G(c.1q==56)G(a===12)I 7[0]&&D[b||"1K"](7[0],c);N{d={};d[c]=a}I 7.P(H(i){R(c 1n d)D.1K(b?7.V:7,c,D.1i(7,d[c],b,i,c))})},1g:H(b,a){G((b==\'2h\'||b==\'1Z\')&&3d(a)<0)a=12;I 7.1K(b,a,"2a")},1r:H(b){G(1j b!="49"&&b!=U)I 7.4E().3v((7[0]&&7[0].2z||S).5F(b));J a="";D.P(b||7,H(){D.P(7.3t,H(){G(7.16!=8)a+=7.16!=1?7.76:D.17.1r([7])})});I a},5z:H(b){G(7[0])D(b,7[0].2z).5y().39(7[0]).2l(H(){J a=7;1B(a.1x)a=a.1x;I a}).3v(7);I 7},8Y:H(a){I 7.P(H(){D(7).6Q().5z(a)})},8R:H(a){I 7.P(H(){D(7).5z(a)})},3v:H(){I 7.3W(19,M,Q,H(a){G(7.16==1)7.3U(a)})},6F:H(){I 7.3W(19,M,M,H(a){G(7.16==1)7.39(a,7.1x)})},6E:H(){I 7.3W(19,Q,Q,H(a){7.1d.39(a,7)})},5q:H(){I 7.3W(19,Q,M,H(a){7.1d.39(a,7.2H)})},3l:H(){I 7.5n||D([])},2q:H(b){J c=D.2l(7,H(a){I D.2q(b,a)});I 7.2I(/[^+>] [^+>]/.11(b)||b.1h("..")>-1?D.4r(c):c)},5y:H(e){J f=7.2l(H(){G(D.14.1f&&!D.4n(7)){J a=7.6o(M),5h=S.3h("1v");5h.3U(a);I D.4h([5h.4H])[0]}N I 7.6o(M)});J d=f.2q("*").5c().P(H(){G(7[E]!=12)7[E]=U});G(e===M)7.2q("*").5c().P(H(i){G(7.16==3)I;J c=D.L(7,"3w");R(J a 1n c)R(J b 1n c[a])D.W.1e(d[i],a,c[a][b],c[a][b].L)});I f},1E:H(b){I 7.2I(D.1D(b)&&D.3C(7,H(a,i){I b.1k(a,i)})||D.3g(b,7))},4Y:H(b){G(b.1q==56)G(62.11(b))I 7.2I(D.3g(b,7,M));N b=D.3g(b,7);J a=b.K&&b[b.K-1]!==12&&!b.16;I 7.1E(H(){I a?D.2L(7,b)<0:7!=b})},1e:H(a){I 7.2I(D.4r(D.2R(7.3p(),1j a==\'23\'?D(a):D.2d(a))))},3F:H(a){I!!a&&D.3g(a,7).K>0},7T:H(a){I 7.3F("."+a)},6e:H(b){G(b==12){G(7.K){J c=7[0];G(D.Y(c,"2A")){J e=c.64,63=[],15=c.15,2V=c.O=="2A-2V";G(e<0)I U;R(J i=2V?e:0,2f=2V?e+1:15.K;i<2f;i++){J d=15[i];G(d.2W){b=D.14.1f&&!d.at.2x.an?d.1r:d.2x;G(2V)I b;63.1p(b)}}I 63}N I(7[0].2x||"").1o(/\\r/g,"")}I 12}G(b.1q==4L)b+=\'\';I 7.P(H(){G(7.16!=1)I;G(b.1q==2p&&/5O|5L/.11(7.O))7.4J=(D.2L(7.2x,b)>=0||D.2L(7.34,b)>=0);N G(D.Y(7,"2A")){J a=D.2d(b);D("9R",7).P(H(){7.2W=(D.2L(7.2x,a)>=0||D.2L(7.1r,a)>=0)});G(!a.K)7.64=-1}N 7.2x=b})},2K:H(a){I a==12?(7[0]?7[0].4H:U):7.4E().3v(a)},7b:H(a){I 7.5q(a).21()},79:H(i){I 7.3s(i,i+1)},3s:H(){I 7.2I(2p.44.3s.1w(7,19))},2l:H(b){I 7.2I(D.2l(7,H(a,i){I b.1k(a,i,a)}))},5c:H(){I 7.1e(7.5n)},L:H(d,b){J a=d.1R(".");a[1]=a[1]?"."+a[1]:"";G(b===12){J c=7.5C("9z"+a[1]+"!",[a[0]]);G(c===12&&7.K)c=D.L(7[0],d);I c===12&&a[1]?7.L(a[0]):c}N I 7.1P("9u"+a[1]+"!",[a[0],b]).P(H(){D.L(7,d,b)})},3b:H(a){I 7.P(H(){D.3b(7,a)})},3W:H(g,f,h,d){J e=7.K>1,3x;I 7.P(H(){G(!3x){3x=D.4h(g,7.2z);G(h)3x.9o()}J b=7;G(f&&D.Y(7,"1T")&&D.Y(3x[0],"4F"))b=7.3H("22")[0]||7.3U(7.2z.3h("22"));J c=D([]);D.P(3x,H(){J a=e?D(7).5y(M)[0]:7;G(D.Y(a,"1m"))c=c.1e(a);N{G(a.16==1)c=c.1e(D("1m",a).21());d.1k(b,a)}});c.P(6T)})}};D.17.5j.44=D.17;H 6T(i,a){G(a.4d)D.3Y({1a:a.4d,31:Q,1O:"1m"});N D.5u(a.1r||a.6O||a.4H||"");G(a.1d)a.1d.37(a)}H 1z(){I+2B 8J}D.1l=D.17.1l=H(){J b=19[0]||{},i=1,K=19.K,4x=Q,15;G(b.1q==8I){4x=b;b=19[1]||{};i=2}G(1j b!="49"&&1j b!="H")b={};G(K==i){b=7;--i}R(;i<K;i++)G((15=19[i])!=U)R(J c 1n 15){J a=b[c],2w=15[c];G(b===2w)6M;G(4x&&2w&&1j 2w=="49"&&!2w.16)b[c]=D.1l(4x,a||(2w.K!=U?[]:{}),2w);N G(2w!==12)b[c]=2w}I b};J E="4M"+1z(),6K=0,5r={},6G=/z-?5i|8B-?8A|1y|6B|8v-?1Z/i,3P=S.3P||{};D.1l({8u:H(a){1b.$=3m$;G(a)1b.4M=w;I D},1D:H(a){I!!a&&1j a!="23"&&!a.Y&&a.1q!=2p&&/^[\\s[]?H/.11(a+"")},4n:H(a){I a.1C&&!a.1c||a.2j&&a.2z&&!a.2z.1c},5u:H(a){a=D.3k(a);G(a){J b=S.3H("6w")[0]||S.1C,1m=S.3h("1m");1m.O="1r/4t";G(D.14.1f)1m.1r=a;N 1m.3U(S.5F(a));b.39(1m,b.1x);b.37(1m)}},Y:H(b,a){I b.Y&&b.Y.2r()==a.2r()},1Y:{},L:H(c,d,b){c=c==1b?5r:c;J a=c[E];G(!a)a=c[E]=++6K;G(d&&!D.1Y[a])D.1Y[a]={};G(b!==12)D.1Y[a][d]=b;I d?D.1Y[a][d]:a},3b:H(c,b){c=c==1b?5r:c;J a=c[E];G(b){G(D.1Y[a]){2U D.1Y[a][b];b="";R(b 1n D.1Y[a])1X;G(!b)D.3b(c)}}N{1U{2U c[E]}1V(e){G(c.5l)c.5l(E)}2U D.1Y[a]}},P:H(d,a,c){J e,i=0,K=d.K;G(c){G(K==12){R(e 1n d)G(a.1w(d[e],c)===Q)1X}N R(;i<K;)G(a.1w(d[i++],c)===Q)1X}N{G(K==12){R(e 1n d)G(a.1k(d[e],e,d[e])===Q)1X}N R(J b=d[0];i<K&&a.1k(b,i,b)!==Q;b=d[++i]){}}I d},1i:H(b,a,c,i,d){G(D.1D(a))a=a.1k(b,i);I a&&a.1q==4L&&c=="2a"&&!6G.11(d)?a+"2X":a},1F:{1e:H(c,b){D.P((b||"").1R(/\\s+/),H(i,a){G(c.16==1&&!D.1F.3T(c.1F,a))c.1F+=(c.1F?" ":"")+a})},21:H(c,b){G(c.16==1)c.1F=b!=12?D.3C(c.1F.1R(/\\s+/),H(a){I!D.1F.3T(b,a)}).6s(" "):""},3T:H(b,a){I D.2L(a,(b.1F||b).6r().1R(/\\s+/))>-1}},6q:H(b,c,a){J e={};R(J d 1n c){e[d]=b.V[d];b.V[d]=c[d]}a.1k(b);R(J d 1n c)b.V[d]=e[d]},1g:H(d,e,c){G(e=="2h"||e=="1Z"){J b,3X={30:"5x",5g:"1G",18:"3I"},35=e=="2h"?["5e","6k"]:["5G","6i"];H 5b(){b=e=="2h"?d.8f:d.8c;J a=0,2C=0;D.P(35,H(){a+=3d(D.2a(d,"57"+7,M))||0;2C+=3d(D.2a(d,"2C"+7+"4b",M))||0});b-=29.83(a+2C)}G(D(d).3F(":4j"))5b();N D.6q(d,3X,5b);I 29.2f(0,b)}I D.2a(d,e,c)},2a:H(f,l,k){J e,V=f.V;H 3E(b){G(!D.14.2k)I Q;J a=3P.54(b,U);I!a||a.52("3E")==""}G(l=="1y"&&D.14.1f){e=D.1K(V,"1y");I e==""?"1":e}G(D.14.2G&&l=="18"){J d=V.50;V.50="0 7Y 7W";V.50=d}G(l.1I(/4i/i))l=y;G(!k&&V&&V[l])e=V[l];N G(3P.54){G(l.1I(/4i/i))l="4i";l=l.1o(/([A-Z])/g,"-$1").3y();J c=3P.54(f,U);G(c&&!3E(f))e=c.52(l);N{J g=[],2E=[],a=f,i=0;R(;a&&3E(a);a=a.1d)2E.6h(a);R(;i<2E.K;i++)G(3E(2E[i])){g[i]=2E[i].V.18;2E[i].V.18="3I"}e=l=="18"&&g[2E.K-1]!=U?"2F":(c&&c.52(l))||"";R(i=0;i<g.K;i++)G(g[i]!=U)2E[i].V.18=g[i]}G(l=="1y"&&e=="")e="1"}N G(f.4g){J h=l.1o(/\\-(\\w)/g,H(a,b){I b.2r()});e=f.4g[l]||f.4g[h];G(!/^\\d+(2X)?$/i.11(e)&&/^\\d/.11(e)){J j=V.1A,66=f.65.1A;f.65.1A=f.4g.1A;V.1A=e||0;e=V.aM+"2X";V.1A=j;f.65.1A=66}}I e},4h:H(l,h){J k=[];h=h||S;G(1j h.3h==\'12\')h=h.2z||h[0]&&h[0].2z||S;D.P(l,H(i,d){G(!d)I;G(d.1q==4L)d+=\'\';G(1j d=="23"){d=d.1o(/(<(\\w+)[^>]*?)\\/>/g,H(b,a,c){I c.1I(/^(aK|4f|7E|aG|4T|7A|aB|3n|az|ay|av)$/i)?b:a+"></"+c+">"});J f=D.3k(d).3y(),1v=h.3h("1v");J e=!f.1h("<au")&&[1,"<2A 7w=\'7w\'>","</2A>"]||!f.1h("<ar")&&[1,"<7v>","</7v>"]||f.1I(/^<(aq|22|am|ak|ai)/)&&[1,"<1T>","</1T>"]||!f.1h("<4F")&&[2,"<1T><22>","</22></1T>"]||(!f.1h("<af")||!f.1h("<ad"))&&[3,"<1T><22><4F>","</4F></22></1T>"]||!f.1h("<7E")&&[2,"<1T><22></22><7q>","</7q></1T>"]||D.14.1f&&[1,"1v<1v>","</1v>"]||[0,"",""];1v.4H=e[1]+d+e[2];1B(e[0]--)1v=1v.5T;G(D.14.1f){J g=!f.1h("<1T")&&f.1h("<22")<0?1v.1x&&1v.1x.3t:e[1]=="<1T>"&&f.1h("<22")<0?1v.3t:[];R(J j=g.K-1;j>=0;--j)G(D.Y(g[j],"22")&&!g[j].3t.K)g[j].1d.37(g[j]);G(/^\\s/.11(d))1v.39(h.5F(d.1I(/^\\s*/)[0]),1v.1x)}d=D.2d(1v.3t)}G(d.K===0&&(!D.Y(d,"3V")&&!D.Y(d,"2A")))I;G(d[0]==12||D.Y(d,"3V")||d.15)k.1p(d);N k=D.2R(k,d)});I k},1K:H(d,f,c){G(!d||d.16==3||d.16==8)I 12;J e=!D.4n(d),40=c!==12,1f=D.14.1f;f=e&&D.3X[f]||f;G(d.2j){J g=/5Q|4d|V/.11(f);G(f=="2W"&&D.14.2k)d.1d.64;G(f 1n d&&e&&!g){G(40){G(f=="O"&&D.Y(d,"4T")&&d.1d)7p"O a3 a1\'t 9V 9U";d[f]=c}G(D.Y(d,"3V")&&d.7i(f))I d.7i(f).76;I d[f]}G(1f&&e&&f=="V")I D.1K(d.V,"9T",c);G(40)d.9Q(f,""+c);J h=1f&&e&&g?d.4G(f,2):d.4G(f);I h===U?12:h}G(1f&&f=="1y"){G(40){d.6B=1;d.1E=(d.1E||"").1o(/7f\\([^)]*\\)/,"")+(3r(c)+\'\'=="9L"?"":"7f(1y="+c*7a+")")}I d.1E&&d.1E.1h("1y=")>=0?(3d(d.1E.1I(/1y=([^)]*)/)[1])/7a)+\'\':""}f=f.1o(/-([a-z])/9H,H(a,b){I b.2r()});G(40)d[f]=c;I d[f]},3k:H(a){I(a||"").1o(/^\\s+|\\s+$/g,"")},2d:H(b){J a=[];G(b!=U){J i=b.K;G(i==U||b.1R||b.4I||b.1k)a[0]=b;N 1B(i)a[--i]=b[i]}I a},2L:H(b,a){R(J i=0,K=a.K;i<K;i++)G(a[i]===b)I i;I-1},2R:H(a,b){J i=0,T,2S=a.K;G(D.14.1f){1B(T=b[i++])G(T.16!=8)a[2S++]=T}N 1B(T=b[i++])a[2S++]=T;I a},4r:H(a){J c=[],2o={};1U{R(J i=0,K=a.K;i<K;i++){J b=D.L(a[i]);G(!2o[b]){2o[b]=M;c.1p(a[i])}}}1V(e){c=a}I c},3C:H(c,a,d){J b=[];R(J i=0,K=c.K;i<K;i++)G(!d!=!a(c[i],i))b.1p(c[i]);I b},2l:H(d,a){J c=[];R(J i=0,K=d.K;i<K;i++){J b=a(d[i],i);G(b!=U)c[c.K]=b}I c.7d.1w([],c)}});J v=9B.9A.3y();D.14={5B:(v.1I(/.+(?:9y|9x|9w|9v)[\\/: ]([\\d.]+)/)||[])[1],2k:/75/.11(v),2G:/2G/.11(v),1f:/1f/.11(v)&&!/2G/.11(v),42:/42/.11(v)&&!/(9s|75)/.11(v)};J y=D.14.1f?"7o":"72";D.1l({71:!D.14.1f||S.70=="6Z",3X:{"R":"9n","9k":"1F","4i":y,72:y,7o:y,9h:"9f",9e:"9d",9b:"99"}});D.P({6W:H(a){I a.1d},97:H(a){I D.4S(a,"1d")},95:H(a){I D.3a(a,2,"2H")},91:H(a){I D.3a(a,2,"4l")},8Z:H(a){I D.4S(a,"2H")},8X:H(a){I D.4S(a,"4l")},8W:H(a){I D.5v(a.1d.1x,a)},8V:H(a){I D.5v(a.1x)},6Q:H(a){I D.Y(a,"8U")?a.8T||a.8S.S:D.2d(a.3t)}},H(c,d){D.17[c]=H(b){J a=D.2l(7,d);G(b&&1j b=="23")a=D.3g(b,a);I 7.2I(D.4r(a))}});D.P({6P:"3v",8Q:"6F",39:"6E",8P:"5q",8O:"7b"},H(c,b){D.17[c]=H(){J a=19;I 7.P(H(){R(J i=0,K=a.K;i<K;i++)D(a[i])[b](7)})}});D.P({8N:H(a){D.1K(7,a,"");G(7.16==1)7.5l(a)},8M:H(a){D.1F.1e(7,a)},8L:H(a){D.1F.21(7,a)},8K:H(a){D.1F[D.1F.3T(7,a)?"21":"1e"](7,a)},21:H(a){G(!a||D.1E(a,[7]).r.K){D("*",7).1e(7).P(H(){D.W.21(7);D.3b(7)});G(7.1d)7.1d.37(7)}},4E:H(){D(">*",7).21();1B(7.1x)7.37(7.1x)}},H(a,b){D.17[a]=H(){I 7.P(b,19)}});D.P(["6N","4b"],H(i,c){J b=c.3y();D.17[b]=H(a){I 7[0]==1b?D.14.2G&&S.1c["5t"+c]||D.14.2k&&1b["5s"+c]||S.70=="6Z"&&S.1C["5t"+c]||S.1c["5t"+c]:7[0]==S?29.2f(29.2f(S.1c["4y"+c],S.1C["4y"+c]),29.2f(S.1c["2i"+c],S.1C["2i"+c])):a==12?(7.K?D.1g(7[0],b):U):7.1g(b,a.1q==56?a:a+"2X")}});H 25(a,b){I a[0]&&3r(D.2a(a[0],b,M),10)||0}J C=D.14.2k&&3r(D.14.5B)<8H?"(?:[\\\\w*3m-]|\\\\\\\\.)":"(?:[\\\\w\\8F-\\8E*3m-]|\\\\\\\\.)",6L=2B 4v("^>\\\\s*("+C+"+)"),6J=2B 4v("^("+C+"+)(#)("+C+"+)"),6I=2B 4v("^([#.]?)("+C+"*)");D.1l({6H:{"":H(a,i,m){I m[2]=="*"||D.Y(a,m[2])},"#":H(a,i,m){I a.4G("2v")==m[2]},":":{8D:H(a,i,m){I i<m[3]-0},8C:H(a,i,m){I i>m[3]-0},3a:H(a,i,m){I m[3]-0==i},79:H(a,i,m){I m[3]-0==i},3o:H(a,i){I i==0},3S:H(a,i,m,r){I i==r.K-1},6D:H(a,i){I i%2==0},6C:H(a,i){I i%2},"3o-4u":H(a){I a.1d.3H("*")[0]==a},"3S-4u":H(a){I D.3a(a.1d.5T,1,"4l")==a},"8z-4u":H(a){I!D.3a(a.1d.5T,2,"4l")},6W:H(a){I a.1x},4E:H(a){I!a.1x},8y:H(a,i,m){I(a.6O||a.8x||D(a).1r()||"").1h(m[3])>=0},4j:H(a){I"1G"!=a.O&&D.1g(a,"18")!="2F"&&D.1g(a,"5g")!="1G"},1G:H(a){I"1G"==a.O||D.1g(a,"18")=="2F"||D.1g(a,"5g")=="1G"},8w:H(a){I!a.3R},3R:H(a){I a.3R},4J:H(a){I a.4J},2W:H(a){I a.2W||D.1K(a,"2W")},1r:H(a){I"1r"==a.O},5O:H(a){I"5O"==a.O},5L:H(a){I"5L"==a.O},5p:H(a){I"5p"==a.O},3Q:H(a){I"3Q"==a.O},5o:H(a){I"5o"==a.O},6A:H(a){I"6A"==a.O},6z:H(a){I"6z"==a.O},2s:H(a){I"2s"==a.O||D.Y(a,"2s")},4T:H(a){I/4T|2A|6y|2s/i.11(a.Y)},3T:H(a,i,m){I D.2q(m[3],a).K},8t:H(a){I/h\\d/i.11(a.Y)},8s:H(a){I D.3C(D.3O,H(b){I a==b.T}).K}}},6x:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,2B 4v("^([:.#]*)("+C+"+)")],3g:H(a,c,b){J d,1t=[];1B(a&&a!=d){d=a;J f=D.1E(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1t=b?c=f.r:D.2R(1t,f.r)}I 1t},2q:H(t,o){G(1j t!="23")I[t];G(o&&o.16!=1&&o.16!=9)I[];o=o||S;J d=[o],2o=[],3S,Y;1B(t&&3S!=t){J r=[];3S=t;t=D.3k(t);J l=Q,3j=6L,m=3j.2D(t);G(m){Y=m[1].2r();R(J i=0;d[i];i++)R(J c=d[i].1x;c;c=c.2H)G(c.16==1&&(Y=="*"||c.Y.2r()==Y))r.1p(c);d=r;t=t.1o(3j,"");G(t.1h(" ")==0)6M;l=M}N{3j=/^([>+~])\\s*(\\w*)/i;G((m=3j.2D(t))!=U){r=[];J k={};Y=m[2].2r();m=m[1];R(J j=0,3i=d.K;j<3i;j++){J n=m=="~"||m=="+"?d[j].2H:d[j].1x;R(;n;n=n.2H)G(n.16==1){J g=D.L(n);G(m=="~"&&k[g])1X;G(!Y||n.Y.2r()==Y){G(m=="~")k[g]=M;r.1p(n)}G(m=="+")1X}}d=r;t=D.3k(t.1o(3j,""));l=M}}G(t&&!l){G(!t.1h(",")){G(o==d[0])d.4s();2o=D.2R(2o,d);r=d=[o];t=" "+t.6v(1,t.K)}N{J h=6J;J m=h.2D(t);G(m){m=[0,m[2],m[3],m[1]]}N{h=6I;m=h.2D(t)}m[2]=m[2].1o(/\\\\/g,"");J f=d[d.K-1];G(m[1]=="#"&&f&&f.61&&!D.4n(f)){J p=f.61(m[2]);G((D.14.1f||D.14.2G)&&p&&1j p.2v=="23"&&p.2v!=m[2])p=D(\'[@2v="\'+m[2]+\'"]\',f)[0];d=r=p&&(!m[3]||D.Y(p,m[3]))?[p]:[]}N{R(J i=0;d[i];i++){J a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];G(a=="*"&&d[i].Y.3y()=="49")a="3n";r=D.2R(r,d[i].3H(a))}G(m[1]==".")r=D.5m(r,m[2]);G(m[1]=="#"){J e=[];R(J i=0;r[i];i++)G(r[i].4G("2v")==m[2]){e=[r[i]];1X}r=e}d=r}t=t.1o(h,"")}}G(t){J b=D.1E(t,r);d=r=b.r;t=D.3k(b.t)}}G(t)d=[];G(d&&o==d[0])d.4s();2o=D.2R(2o,d);I 2o},5m:H(r,m,a){m=" "+m+" ";J c=[];R(J i=0;r[i];i++){J b=(" "+r[i].1F+" ").1h(m)>=0;G(!a&&b||a&&!b)c.1p(r[i])}I c},1E:H(t,r,h){J d;1B(t&&t!=d){d=t;J p=D.6x,m;R(J i=0;p[i];i++){m=p[i].2D(t);G(m){t=t.8r(m[0].K);m[2]=m[2].1o(/\\\\/g,"");1X}}G(!m)1X;G(m[1]==":"&&m[2]=="4Y")r=62.11(m[3])?D.1E(m[3],r,M).r:D(r).4Y(m[3]);N G(m[1]==".")r=D.5m(r,m[2],h);N G(m[1]=="["){J g=[],O=m[3];R(J i=0,3i=r.K;i<3i;i++){J a=r[i],z=a[D.3X[m[2]]||m[2]];G(z==U||/5Q|4d|2W/.11(m[2]))z=D.1K(a,m[2])||\'\';G((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1h(m[5])||O=="$="&&z.6v(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1h(m[5])>=0)^h)g.1p(a)}r=g}N G(m[1]==":"&&m[2]=="3a-4u"){J e={},g=[],11=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2D(m[3]=="6D"&&"2n"||m[3]=="6C"&&"2n+1"||!/\\D/.11(m[3])&&"8q+"+m[3]||m[3]),3o=(11[1]+(11[2]||1))-0,d=11[3]-0;R(J i=0,3i=r.K;i<3i;i++){J j=r[i],1d=j.1d,2v=D.L(1d);G(!e[2v]){J c=1;R(J n=1d.1x;n;n=n.2H)G(n.16==1)n.4q=c++;e[2v]=M}J b=Q;G(3o==0){G(j.4q==d)b=M}N G((j.4q-d)%3o==0&&(j.4q-d)/3o>=0)b=M;G(b^h)g.1p(j)}r=g}N{J f=D.6H[m[1]];G(1j f=="49")f=f[m[2]];G(1j f=="23")f=6u("Q||H(a,i){I "+f+";}");r=D.3C(r,H(a,i){I f(a,i,m,r)},h)}}I{r:r,t:t}},4S:H(b,c){J a=[],1t=b[c];1B(1t&&1t!=S){G(1t.16==1)a.1p(1t);1t=1t[c]}I a},3a:H(a,e,c,b){e=e||1;J d=0;R(;a;a=a[c])G(a.16==1&&++d==e)1X;I a},5v:H(n,a){J r=[];R(;n;n=n.2H){G(n.16==1&&n!=a)r.1p(n)}I r}});D.W={1e:H(f,i,g,e){G(f.16==3||f.16==8)I;G(D.14.1f&&f.4I)f=1b;G(!g.24)g.24=7.24++;G(e!=12){J h=g;g=7.3M(h,H(){I h.1w(7,19)});g.L=e}J j=D.L(f,"3w")||D.L(f,"3w",{}),1H=D.L(f,"1H")||D.L(f,"1H",H(){G(1j D!="12"&&!D.W.5k)I D.W.1H.1w(19.3L.T,19)});1H.T=f;D.P(i.1R(/\\s+/),H(c,b){J a=b.1R(".");b=a[0];g.O=a[1];J d=j[b];G(!d){d=j[b]={};G(!D.W.2t[b]||D.W.2t[b].4p.1k(f)===Q){G(f.3K)f.3K(b,1H,Q);N G(f.6t)f.6t("4o"+b,1H)}}d[g.24]=g;D.W.26[b]=M});f=U},24:1,26:{},21:H(e,h,f){G(e.16==3||e.16==8)I;J i=D.L(e,"3w"),1L,5i;G(i){G(h==12||(1j h=="23"&&h.8p(0)=="."))R(J g 1n i)7.21(e,g+(h||""));N{G(h.O){f=h.2y;h=h.O}D.P(h.1R(/\\s+/),H(b,a){J c=a.1R(".");a=c[0];G(i[a]){G(f)2U i[a][f.24];N R(f 1n i[a])G(!c[1]||i[a][f].O==c[1])2U i[a][f];R(1L 1n i[a])1X;G(!1L){G(!D.W.2t[a]||D.W.2t[a].4A.1k(e)===Q){G(e.6p)e.6p(a,D.L(e,"1H"),Q);N G(e.6n)e.6n("4o"+a,D.L(e,"1H"))}1L=U;2U i[a]}}})}R(1L 1n i)1X;G(!1L){J d=D.L(e,"1H");G(d)d.T=U;D.3b(e,"3w");D.3b(e,"1H")}}},1P:H(h,c,f,g,i){c=D.2d(c);G(h.1h("!")>=0){h=h.3s(0,-1);J a=M}G(!f){G(7.26[h])D("*").1e([1b,S]).1P(h,c)}N{G(f.16==3||f.16==8)I 12;J b,1L,17=D.1D(f[h]||U),W=!c[0]||!c[0].32;G(W){c.6h({O:h,2J:f,32:H(){},3J:H(){},4C:1z()});c[0][E]=M}c[0].O=h;G(a)c[0].6m=M;J d=D.L(f,"1H");G(d)b=d.1w(f,c);G((!17||(D.Y(f,\'a\')&&h=="4V"))&&f["4o"+h]&&f["4o"+h].1w(f,c)===Q)b=Q;G(W)c.4s();G(i&&D.1D(i)){1L=i.1w(f,b==U?c:c.7d(b));G(1L!==12)b=1L}G(17&&g!==Q&&b!==Q&&!(D.Y(f,\'a\')&&h=="4V")){7.5k=M;1U{f[h]()}1V(e){}}7.5k=Q}I b},1H:H(b){J a,1L,38,5f,4m;b=19[0]=D.W.6l(b||1b.W);38=b.O.1R(".");b.O=38[0];38=38[1];5f=!38&&!b.6m;4m=(D.L(7,"3w")||{})[b.O];R(J j 1n 4m){J c=4m[j];G(5f||c.O==38){b.2y=c;b.L=c.L;1L=c.1w(7,19);G(a!==Q)a=1L;G(1L===Q){b.32();b.3J()}}}I a},6l:H(b){G(b[E]==M)I b;J d=b;b={8o:d};J c="8n 8m 8l 8k 2s 8j 47 5d 6j 5E 8i L 8h 8g 4K 2y 5a 59 8e 8b 58 6f 8a 88 4k 87 86 84 6d 2J 4C 6c O 82 81 35".1R(" ");R(J i=c.K;i;i--)b[c[i]]=d[c[i]];b[E]=M;b.32=H(){G(d.32)d.32();d.80=Q};b.3J=H(){G(d.3J)d.3J();d.7Z=M};b.4C=b.4C||1z();G(!b.2J)b.2J=b.6d||S;G(b.2J.16==3)b.2J=b.2J.1d;G(!b.4k&&b.4K)b.4k=b.4K==b.2J?b.6c:b.4K;G(b.58==U&&b.5d!=U){J a=S.1C,1c=S.1c;b.58=b.5d+(a&&a.2e||1c&&1c.2e||0)-(a.6b||0);b.6f=b.6j+(a&&a.2c||1c&&1c.2c||0)-(a.6a||0)}G(!b.35&&((b.47||b.47===0)?b.47:b.5a))b.35=b.47||b.5a;G(!b.59&&b.5E)b.59=b.5E;G(!b.35&&b.2s)b.35=(b.2s&1?1:(b.2s&2?3:(b.2s&4?2:0)));I b},3M:H(a,b){b.24=a.24=a.24||b.24||7.24++;I b},2t:{27:{4p:H(){55();I},4A:H(){I}},3D:{4p:H(){G(D.14.1f)I Q;D(7).2O("53",D.W.2t.3D.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("53",D.W.2t.3D.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3D";I D.W.1H.1w(7,19)}},3N:{4p:H(){G(D.14.1f)I Q;D(7).2O("51",D.W.2t.3N.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("51",D.W.2t.3N.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3N";I D.W.1H.1w(7,19)}}}};D.17.1l({2O:H(c,a,b){I c=="4X"?7.2V(c,a,b):7.P(H(){D.W.1e(7,c,b||a,b&&a)})},2V:H(d,b,c){J e=D.W.3M(c||b,H(a){D(7).4e(a,e);I(c||b).1w(7,19)});I 7.P(H(){D.W.1e(7,d,e,c&&b)})},4e:H(a,b){I 7.P(H(){D.W.21(7,a,b)})},1P:H(c,a,b){I 7.P(H(){D.W.1P(c,a,7,M,b)})},5C:H(c,a,b){I 7[0]&&D.W.1P(c,a,7[0],Q,b)},2m:H(b){J c=19,i=1;1B(i<c.K)D.W.3M(b,c[i++]);I 7.4V(D.W.3M(b,H(a){7.4Z=(7.4Z||0)%i;a.32();I c[7.4Z++].1w(7,19)||Q}))},7X:H(a,b){I 7.2O(\'3D\',a).2O(\'3N\',b)},27:H(a){55();G(D.2Q)a.1k(S,D);N D.3A.1p(H(){I a.1k(7,D)});I 7}});D.1l({2Q:Q,3A:[],27:H(){G(!D.2Q){D.2Q=M;G(D.3A){D.P(D.3A,H(){7.1k(S)});D.3A=U}D(S).5C("27")}}});J x=Q;H 55(){G(x)I;x=M;G(S.3K&&!D.14.2G)S.3K("69",D.27,Q);G(D.14.1f&&1b==1S)(H(){G(D.2Q)I;1U{S.1C.7V("1A")}1V(3e){3B(19.3L,0);I}D.27()})();G(D.14.2G)S.3K("69",H(){G(D.2Q)I;R(J i=0;i<S.4W.K;i++)G(S.4W[i].3R){3B(19.3L,0);I}D.27()},Q);G(D.14.2k){J a;(H(){G(D.2Q)I;G(S.3f!="68"&&S.3f!="1J"){3B(19.3L,0);I}G(a===12)a=D("V, 7A[7U=7S]").K;G(S.4W.K!=a){3B(19.3L,0);I}D.27()})()}D.W.1e(1b,"43",D.27)}D.P(("7R,7Q,43,85,4y,4X,4V,7P,"+"7O,7N,89,53,51,7M,2A,"+"5o,7L,7K,8d,3e").1R(","),H(i,b){D.17[b]=H(a){I a?7.2O(b,a):7.1P(b)}});J F=H(a,c){J b=a.4k;1B(b&&b!=c)1U{b=b.1d}1V(3e){b=c}I b==c};D(1b).2O("4X",H(){D("*").1e(S).4e()});D.17.1l({67:D.17.43,43:H(g,d,c){G(1j g!=\'23\')I 7.67(g);J e=g.1h(" ");G(e>=0){J i=g.3s(e,g.K);g=g.3s(0,e)}c=c||H(){};J f="2P";G(d)G(D.1D(d)){c=d;d=U}N{d=D.3n(d);f="6g"}J h=7;D.3Y({1a:g,O:f,1O:"2K",L:d,1J:H(a,b){G(b=="1W"||b=="7J")h.2K(i?D("<1v/>").3v(a.4U.1o(/<1m(.|\\s)*?\\/1m>/g,"")).2q(i):a.4U);h.P(c,[a.4U,b,a])}});I 7},aL:H(){I D.3n(7.7I())},7I:H(){I 7.2l(H(){I D.Y(7,"3V")?D.2d(7.aH):7}).1E(H(){I 7.34&&!7.3R&&(7.4J||/2A|6y/i.11(7.Y)||/1r|1G|3Q/i.11(7.O))}).2l(H(i,c){J b=D(7).6e();I b==U?U:b.1q==2p?D.2l(b,H(a,i){I{34:c.34,2x:a}}):{34:c.34,2x:b}}).3p()}});D.P("7H,7G,7F,7D,7C,7B".1R(","),H(i,o){D.17[o]=H(f){I 7.2O(o,f)}});J B=1z();D.1l({3p:H(d,b,a,c){G(D.1D(b)){a=b;b=U}I D.3Y({O:"2P",1a:d,L:b,1W:a,1O:c})},aE:H(b,a){I D.3p(b,U,a,"1m")},aD:H(c,b,a){I D.3p(c,b,a,"3z")},aC:H(d,b,a,c){G(D.1D(b)){a=b;b={}}I D.3Y({O:"6g",1a:d,L:b,1W:a,1O:c})},aA:H(a){D.1l(D.60,a)},60:{1a:5Z.5Q,26:M,O:"2P",2T:0,7z:"4R/x-ax-3V-aw",7x:M,31:M,L:U,5Y:U,3Q:U,4Q:{2N:"4R/2N, 1r/2N",2K:"1r/2K",1m:"1r/4t, 4R/4t",3z:"4R/3z, 1r/4t",1r:"1r/as",4w:"*/*"}},4z:{},3Y:H(s){s=D.1l(M,s,D.1l(M,{},D.60,s));J g,2Z=/=\\?(&|$)/g,1u,L,O=s.O.2r();G(s.L&&s.7x&&1j s.L!="23")s.L=D.3n(s.L);G(s.1O=="4P"){G(O=="2P"){G(!s.1a.1I(2Z))s.1a+=(s.1a.1I(/\\?/)?"&":"?")+(s.4P||"7u")+"=?"}N G(!s.L||!s.L.1I(2Z))s.L=(s.L?s.L+"&":"")+(s.4P||"7u")+"=?";s.1O="3z"}G(s.1O=="3z"&&(s.L&&s.L.1I(2Z)||s.1a.1I(2Z))){g="4P"+B++;G(s.L)s.L=(s.L+"").1o(2Z,"="+g+"$1");s.1a=s.1a.1o(2Z,"="+g+"$1");s.1O="1m";1b[g]=H(a){L=a;1W();1J();1b[g]=12;1U{2U 1b[g]}1V(e){}G(i)i.37(h)}}G(s.1O=="1m"&&s.1Y==U)s.1Y=Q;G(s.1Y===Q&&O=="2P"){J j=1z();J k=s.1a.1o(/(\\?|&)3m=.*?(&|$)/,"$ap="+j+"$2");s.1a=k+((k==s.1a)?(s.1a.1I(/\\?/)?"&":"?")+"3m="+j:"")}G(s.L&&O=="2P"){s.1a+=(s.1a.1I(/\\?/)?"&":"?")+s.L;s.L=U}G(s.26&&!D.4O++)D.W.1P("7H");J n=/^(?:\\w+:)?\\/\\/([^\\/?#]+)/;G(s.1O=="1m"&&O=="2P"&&n.11(s.1a)&&n.2D(s.1a)[1]!=5Z.al){J i=S.3H("6w")[0];J h=S.3h("1m");h.4d=s.1a;G(s.7t)h.aj=s.7t;G(!g){J l=Q;h.ah=h.ag=H(){G(!l&&(!7.3f||7.3f=="68"||7.3f=="1J")){l=M;1W();1J();i.37(h)}}}i.3U(h);I 12}J m=Q;J c=1b.7s?2B 7s("ae.ac"):2B 7r();G(s.5Y)c.6R(O,s.1a,s.31,s.5Y,s.3Q);N c.6R(O,s.1a,s.31);1U{G(s.L)c.4B("ab-aa",s.7z);G(s.5S)c.4B("a9-5R-a8",D.4z[s.1a]||"a7, a6 a5 a4 5N:5N:5N a2");c.4B("X-9Z-9Y","7r");c.4B("9W",s.1O&&s.4Q[s.1O]?s.4Q[s.1O]+", */*":s.4Q.4w)}1V(e){}G(s.7m&&s.7m(c,s)===Q){s.26&&D.4O--;c.7l();I Q}G(s.26)D.W.1P("7B",[c,s]);J d=H(a){G(!m&&c&&(c.3f==4||a=="2T")){m=M;G(f){7k(f);f=U}1u=a=="2T"&&"2T"||!D.7j(c)&&"3e"||s.5S&&D.7h(c,s.1a)&&"7J"||"1W";G(1u=="1W"){1U{L=D.6X(c,s.1O,s.9S)}1V(e){1u="5J"}}G(1u=="1W"){J b;1U{b=c.5I("7g-5R")}1V(e){}G(s.5S&&b)D.4z[s.1a]=b;G(!g)1W()}N D.5H(s,c,1u);1J();G(s.31)c=U}};G(s.31){J f=4I(d,13);G(s.2T>0)3B(H(){G(c){c.7l();G(!m)d("2T")}},s.2T)}1U{c.9P(s.L)}1V(e){D.5H(s,c,U,e)}G(!s.31)d();H 1W(){G(s.1W)s.1W(L,1u);G(s.26)D.W.1P("7C",[c,s])}H 1J(){G(s.1J)s.1J(c,1u);G(s.26)D.W.1P("7F",[c,s]);G(s.26&&!--D.4O)D.W.1P("7G")}I c},5H:H(s,a,b,e){G(s.3e)s.3e(a,b,e);G(s.26)D.W.1P("7D",[a,s,e])},4O:0,7j:H(a){1U{I!a.1u&&5Z.9O=="5p:"||(a.1u>=7e&&a.1u<9N)||a.1u==7c||a.1u==9K||D.14.2k&&a.1u==12}1V(e){}I Q},7h:H(a,c){1U{J b=a.5I("7g-5R");I a.1u==7c||b==D.4z[c]||D.14.2k&&a.1u==12}1V(e){}I Q},6X:H(a,c,b){J d=a.5I("9J-O"),2N=c=="2N"||!c&&d&&d.1h("2N")>=0,L=2N?a.9I:a.4U;G(2N&&L.1C.2j=="5J")7p"5J";G(b)L=b(L,c);G(c=="1m")D.5u(L);G(c=="3z")L=6u("("+L+")");I L},3n:H(a){J s=[];G(a.1q==2p||a.5w)D.P(a,H(){s.1p(3u(7.34)+"="+3u(7.2x))});N R(J j 1n a)G(a[j]&&a[j].1q==2p)D.P(a[j],H(){s.1p(3u(j)+"="+3u(7))});N s.1p(3u(j)+"="+3u(D.1D(a[j])?a[j]():a[j]));I s.6s("&").1o(/%20/g,"+")}});D.17.1l({1N:H(c,b){I c?7.2g({1Z:"1N",2h:"1N",1y:"1N"},c,b):7.1E(":1G").P(H(){7.V.18=7.5D||"";G(D.1g(7,"18")=="2F"){J a=D("<"+7.2j+" />").6P("1c");7.V.18=a.1g("18");G(7.V.18=="2F")7.V.18="3I";a.21()}}).3l()},1M:H(b,a){I b?7.2g({1Z:"1M",2h:"1M",1y:"1M"},b,a):7.1E(":4j").P(H(){7.5D=7.5D||D.1g(7,"18");7.V.18="2F"}).3l()},78:D.17.2m,2m:H(a,b){I D.1D(a)&&D.1D(b)?7.78.1w(7,19):a?7.2g({1Z:"2m",2h:"2m",1y:"2m"},a,b):7.P(H(){D(7)[D(7).3F(":1G")?"1N":"1M"]()})},9G:H(b,a){I 7.2g({1Z:"1N"},b,a)},9F:H(b,a){I 7.2g({1Z:"1M"},b,a)},9E:H(b,a){I 7.2g({1Z:"2m"},b,a)},9D:H(b,a){I 7.2g({1y:"1N"},b,a)},9M:H(b,a){I 7.2g({1y:"1M"},b,a)},9C:H(c,a,b){I 7.2g({1y:a},c,b)},2g:H(k,j,i,g){J h=D.77(j,i,g);I 7[h.36===Q?"P":"36"](H(){G(7.16!=1)I Q;J f=D.1l({},h),p,1G=D(7).3F(":1G"),46=7;R(p 1n k){G(k[p]=="1M"&&1G||k[p]=="1N"&&!1G)I f.1J.1k(7);G(p=="1Z"||p=="2h"){f.18=D.1g(7,"18");f.33=7.V.33}}G(f.33!=U)7.V.33="1G";f.45=D.1l({},k);D.P(k,H(c,a){J e=2B D.28(46,f,c);G(/2m|1N|1M/.11(a))e[a=="2m"?1G?"1N":"1M":a](k);N{J b=a.6r().1I(/^([+-]=)?([\\d+-.]+)(.*)$/),2b=e.1t(M)||0;G(b){J d=3d(b[2]),2M=b[3]||"2X";G(2M!="2X"){46.V[c]=(d||1)+2M;2b=((d||1)/e.1t(M))*2b;46.V[c]=2b+2M}G(b[1])d=((b[1]=="-="?-1:1)*d)+2b;e.3G(2b,d,2M)}N e.3G(2b,a,"")}});I M})},36:H(a,b){G(D.1D(a)||(a&&a.1q==2p)){b=a;a="28"}G(!a||(1j a=="23"&&!b))I A(7[0],a);I 7.P(H(){G(b.1q==2p)A(7,a,b);N{A(7,a).1p(b);G(A(7,a).K==1)b.1k(7)}})},9X:H(b,c){J a=D.3O;G(b)7.36([]);7.P(H(){R(J i=a.K-1;i>=0;i--)G(a[i].T==7){G(c)a[i](M);a.7n(i,1)}});G(!c)7.5A();I 7}});J A=H(b,c,a){G(b){c=c||"28";J q=D.L(b,c+"36");G(!q||a)q=D.L(b,c+"36",D.2d(a))}I q};D.17.5A=H(a){a=a||"28";I 7.P(H(){J q=A(7,a);q.4s();G(q.K)q[0].1k(7)})};D.1l({77:H(b,a,c){J d=b&&b.1q==a0?b:{1J:c||!c&&a||D.1D(b)&&b,2u:b,41:c&&a||a&&a.1q!=9t&&a};d.2u=(d.2u&&d.2u.1q==4L?d.2u:D.28.5K[d.2u])||D.28.5K.74;d.5M=d.1J;d.1J=H(){G(d.36!==Q)D(7).5A();G(D.1D(d.5M))d.5M.1k(7)};I d},41:{73:H(p,n,b,a){I b+a*p},5P:H(p,n,b,a){I((-29.9r(p*29.9q)/2)+0.5)*a+b}},3O:[],48:U,28:H(b,c,a){7.15=c;7.T=b;7.1i=a;G(!c.3Z)c.3Z={}}});D.28.44={4D:H(){G(7.15.2Y)7.15.2Y.1k(7.T,7.1z,7);(D.28.2Y[7.1i]||D.28.2Y.4w)(7);G(7.1i=="1Z"||7.1i=="2h")7.T.V.18="3I"},1t:H(a){G(7.T[7.1i]!=U&&7.T.V[7.1i]==U)I 7.T[7.1i];J r=3d(D.1g(7.T,7.1i,a));I r&&r>-9p?r:3d(D.2a(7.T,7.1i))||0},3G:H(c,b,d){7.5V=1z();7.2b=c;7.3l=b;7.2M=d||7.2M||"2X";7.1z=7.2b;7.2S=7.4N=0;7.4D();J e=7;H t(a){I e.2Y(a)}t.T=7.T;D.3O.1p(t);G(D.48==U){D.48=4I(H(){J a=D.3O;R(J i=0;i<a.K;i++)G(!a[i]())a.7n(i--,1);G(!a.K){7k(D.48);D.48=U}},13)}},1N:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1N=M;7.3G(0,7.1t());G(7.1i=="2h"||7.1i=="1Z")7.T.V[7.1i]="9m";D(7.T).1N()},1M:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1M=M;7.3G(7.1t(),0)},2Y:H(a){J t=1z();G(a||t>7.15.2u+7.5V){7.1z=7.3l;7.2S=7.4N=1;7.4D();7.15.45[7.1i]=M;J b=M;R(J i 1n 7.15.45)G(7.15.45[i]!==M)b=Q;G(b){G(7.15.18!=U){7.T.V.33=7.15.33;7.T.V.18=7.15.18;G(D.1g(7.T,"18")=="2F")7.T.V.18="3I"}G(7.15.1M)7.T.V.18="2F";G(7.15.1M||7.15.1N)R(J p 1n 7.15.45)D.1K(7.T.V,p,7.15.3Z[p])}G(b)7.15.1J.1k(7.T);I Q}N{J n=t-7.5V;7.4N=n/7.15.2u;7.2S=D.41[7.15.41||(D.41.5P?"5P":"73")](7.4N,n,0,1,7.15.2u);7.1z=7.2b+((7.3l-7.2b)*7.2S);7.4D()}I M}};D.1l(D.28,{5K:{9l:9j,9i:7e,74:9g},2Y:{2e:H(a){a.T.2e=a.1z},2c:H(a){a.T.2c=a.1z},1y:H(a){D.1K(a.T.V,"1y",a.1z)},4w:H(a){a.T.V[a.1i]=a.1z+a.2M}}});D.17.2i=H(){J b=0,1S=0,T=7[0],3q;G(T)ao(D.14){J d=T.1d,4a=T,1s=T.1s,1Q=T.2z,5U=2k&&3r(5B)<9c&&!/9a/i.11(v),1g=D.2a,3c=1g(T,"30")=="3c";G(T.7y){J c=T.7y();1e(c.1A+29.2f(1Q.1C.2e,1Q.1c.2e),c.1S+29.2f(1Q.1C.2c,1Q.1c.2c));1e(-1Q.1C.6b,-1Q.1C.6a)}N{1e(T.5X,T.5W);1B(1s){1e(1s.5X,1s.5W);G(42&&!/^t(98|d|h)$/i.11(1s.2j)||2k&&!5U)2C(1s);G(!3c&&1g(1s,"30")=="3c")3c=M;4a=/^1c$/i.11(1s.2j)?4a:1s;1s=1s.1s}1B(d&&d.2j&&!/^1c|2K$/i.11(d.2j)){G(!/^96|1T.*$/i.11(1g(d,"18")))1e(-d.2e,-d.2c);G(42&&1g(d,"33")!="4j")2C(d);d=d.1d}G((5U&&(3c||1g(4a,"30")=="5x"))||(42&&1g(4a,"30")!="5x"))1e(-1Q.1c.5X,-1Q.1c.5W);G(3c)1e(29.2f(1Q.1C.2e,1Q.1c.2e),29.2f(1Q.1C.2c,1Q.1c.2c))}3q={1S:1S,1A:b}}H 2C(a){1e(D.2a(a,"6V",M),D.2a(a,"6U",M))}H 1e(l,t){b+=3r(l,10)||0;1S+=3r(t,10)||0}I 3q};D.17.1l({30:H(){J a=0,1S=0,3q;G(7[0]){J b=7.1s(),2i=7.2i(),4c=/^1c|2K$/i.11(b[0].2j)?{1S:0,1A:0}:b.2i();2i.1S-=25(7,\'94\');2i.1A-=25(7,\'aF\');4c.1S+=25(b,\'6U\');4c.1A+=25(b,\'6V\');3q={1S:2i.1S-4c.1S,1A:2i.1A-4c.1A}}I 3q},1s:H(){J a=7[0].1s;1B(a&&(!/^1c|2K$/i.11(a.2j)&&D.1g(a,\'30\')==\'93\'))a=a.1s;I D(a)}});D.P([\'5e\',\'5G\'],H(i,b){J c=\'4y\'+b;D.17[c]=H(a){G(!7[0])I;I a!=12?7.P(H(){7==1b||7==S?1b.92(!i?a:D(1b).2e(),i?a:D(1b).2c()):7[c]=a}):7[0]==1b||7[0]==S?46[i?\'aI\':\'aJ\']||D.71&&S.1C[c]||S.1c[c]:7[0][c]}});D.P(["6N","4b"],H(i,b){J c=i?"5e":"5G",4f=i?"6k":"6i";D.17["5s"+b]=H(){I 7[b.3y()]()+25(7,"57"+c)+25(7,"57"+4f)};D.17["90"+b]=H(a){I 7["5s"+b]()+25(7,"2C"+c+"4b")+25(7,"2C"+4f+"4b")+(a?25(7,"6S"+c)+25(7,"6S"+4f):0)}})})();',62,669,'|||||||this|||||||||||||||||||||||||||||||||||if|function|return|var|length|data|true|else|type|each|false|for|document|elem|null|style|event||nodeName|||test|undefined||browser|options|nodeType|fn|display|arguments|url|window|body|parentNode|add|msie|css|indexOf|prop|typeof|call|extend|script|in|replace|push|constructor|text|offsetParent|cur|status|div|apply|firstChild|opacity|now|left|while|documentElement|isFunction|filter|className|hidden|handle|match|complete|attr|ret|hide|show|dataType|trigger|doc|split|top|table|try|catch|success|break|cache|height||remove|tbody|string|guid|num|global|ready|fx|Math|curCSS|start|scrollTop|makeArray|scrollLeft|max|animate|width|offset|tagName|safari|map|toggle||done|Array|find|toUpperCase|button|special|duration|id|copy|value|handler|ownerDocument|select|new|border|exec|stack|none|opera|nextSibling|pushStack|target|html|inArray|unit|xml|bind|GET|isReady|merge|pos|timeout|delete|one|selected|px|step|jsre|position|async|preventDefault|overflow|name|which|queue|removeChild|namespace|insertBefore|nth|removeData|fixed|parseFloat|error|readyState|multiFilter|createElement|rl|re|trim|end|_|param|first|get|results|parseInt|slice|childNodes|encodeURIComponent|append|events|elems|toLowerCase|json|readyList|setTimeout|grep|mouseenter|color|is|custom|getElementsByTagName|block|stopPropagation|addEventListener|callee|proxy|mouseleave|timers|defaultView|password|disabled|last|has|appendChild|form|domManip|props|ajax|orig|set|easing|mozilla|load|prototype|curAnim|self|charCode|timerId|object|offsetChild|Width|parentOffset|src|unbind|br|currentStyle|clean|float|visible|relatedTarget|previousSibling|handlers|isXMLDoc|on|setup|nodeIndex|unique|shift|javascript|child|RegExp|_default|deep|scroll|lastModified|teardown|setRequestHeader|timeStamp|update|empty|tr|getAttribute|innerHTML|setInterval|checked|fromElement|Number|jQuery|state|active|jsonp|accepts|application|dir|input|responseText|click|styleSheets|unload|not|lastToggle|outline|mouseout|getPropertyValue|mouseover|getComputedStyle|bindReady|String|padding|pageX|metaKey|keyCode|getWH|andSelf|clientX|Left|all|visibility|container|index|init|triggered|removeAttribute|classFilter|prevObject|submit|file|after|windowData|inner|client|globalEval|sibling|jquery|absolute|clone|wrapAll|dequeue|version|triggerHandler|oldblock|ctrlKey|createTextNode|Top|handleError|getResponseHeader|parsererror|speeds|checkbox|old|00|radio|swing|href|Modified|ifModified|lastChild|safari2|startTime|offsetTop|offsetLeft|username|location|ajaxSettings|getElementById|isSimple|values|selectedIndex|runtimeStyle|rsLeft|_load|loaded|DOMContentLoaded|clientTop|clientLeft|toElement|srcElement|val|pageY|POST|unshift|Bottom|clientY|Right|fix|exclusive|detachEvent|cloneNode|removeEventListener|swap|toString|join|attachEvent|eval|substr|head|parse|textarea|reset|image|zoom|odd|even|before|prepend|exclude|expr|quickClass|quickID|uuid|quickChild|continue|Height|textContent|appendTo|contents|open|margin|evalScript|borderTopWidth|borderLeftWidth|parent|httpData|setArray|CSS1Compat|compatMode|boxModel|cssFloat|linear|def|webkit|nodeValue|speed|_toggle|eq|100|replaceWith|304|concat|200|alpha|Last|httpNotModified|getAttributeNode|httpSuccess|clearInterval|abort|beforeSend|splice|styleFloat|throw|colgroup|XMLHttpRequest|ActiveXObject|scriptCharset|callback|fieldset|multiple|processData|getBoundingClientRect|contentType|link|ajaxSend|ajaxSuccess|ajaxError|col|ajaxComplete|ajaxStop|ajaxStart|serializeArray|notmodified|keypress|keydown|change|mouseup|mousedown|dblclick|focus|blur|stylesheet|hasClass|rel|doScroll|black|hover|solid|cancelBubble|returnValue|wheelDelta|view|round|shiftKey|resize|screenY|screenX|relatedNode|mousemove|prevValue|originalTarget|offsetHeight|keyup|newValue|offsetWidth|eventPhase|detail|currentTarget|cancelable|bubbles|attrName|attrChange|altKey|originalEvent|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|font|gt|lt|uFFFF|u0128|size|417|Boolean|Date|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|wrap|contentWindow|contentDocument|iframe|children|siblings|prevAll|wrapInner|nextAll|outer|prev|scrollTo|static|marginTop|next|inline|parents|able|cellSpacing|adobeair|cellspacing|522|maxLength|maxlength|readOnly|400|readonly|fast|600|class|slow|1px|htmlFor|reverse|10000|PI|cos|compatible|Function|setData|ie|ra|it|rv|getData|userAgent|navigator|fadeTo|fadeIn|slideToggle|slideUp|slideDown|ig|responseXML|content|1223|NaN|fadeOut|300|protocol|send|setAttribute|option|dataFilter|cssText|changed|be|Accept|stop|With|Requested|Object|can|GMT|property|1970|Jan|01|Thu|Since|If|Type|Content|XMLHTTP|th|Microsoft|td|onreadystatechange|onload|cap|charset|colg|host|tfoot|specified|with|1_|thead|leg|plain|attributes|opt|embed|urlencoded|www|area|hr|ajaxSetup|meta|post|getJSON|getScript|marginLeft|img|elements|pageYOffset|pageXOffset|abbr|serialize|pixelLeft'.split('|'),0,{})); 14 // $Id: drupal.js,v 1.41.2.4 2009/07/21 08:59:10 goba Exp $ 15 16 var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes': {}, 'locale': {} }; 17 18 /** 19 * Set the variable that indicates if JavaScript behaviors should be applied 20 */ 21 Drupal.jsEnabled = document.getElementsByTagName && document.createElement && document.createTextNode && document.documentElement && document.getElementById; 22 23 /** 24 * Attach all registered behaviors to a page element. 25 * 26 * Behaviors are event-triggered actions that attach to page elements, enhancing 27 * default non-Javascript UIs. Behaviors are registered in the Drupal.behaviors 28 * object as follows: 29 * @code 30 * Drupal.behaviors.behaviorName = function () { 31 * ... 32 * }; 33 * @endcode 34 * 35 * Drupal.attachBehaviors is added below to the jQuery ready event and so 36 * runs on initial page load. Developers implementing AHAH/AJAX in their 37 * solutions should also call this function after new page content has been 38 * loaded, feeding in an element to be processed, in order to attach all 39 * behaviors to the new content. 40 * 41 * Behaviors should use a class in the form behaviorName-processed to ensure 42 * the behavior is attached only once to a given element. (Doing so enables 43 * the reprocessing of given elements, which may be needed on occasion despite 44 * the ability to limit behavior attachment to a particular element.) 45 * 46 * @param context 47 * An element to attach behaviors to. If none is given, the document element 48 * is used. 49 */ 50 Drupal.attachBehaviors = function(context) { 51 context = context || document; 52 if (Drupal.jsEnabled) { 53 // Execute all of them. 54 jQuery.each(Drupal.behaviors, function() { 55 this(context); 56 }); 57 } 58 }; 59 60 /** 61 * Encode special characters in a plain-text string for display as HTML. 62 */ 63 Drupal.checkPlain = function(str) { 64 str = String(str); 65 var replace = { '&': '&', '"': '"', '<': '<', '>': '>' }; 66 for (var character in replace) { 67 var regex = new RegExp(character, 'g'); 68 str = str.replace(regex, replace[character]); 69 } 70 return str; 71 }; 72 73 /** 74 * Translate strings to the page language or a given language. 75 * 76 * See the documentation of the server-side t() function for further details. 77 * 78 * @param str 79 * A string containing the English string to translate. 80 * @param args 81 * An object of replacements pairs to make after translation. Incidences 82 * of any key in this array are replaced with the corresponding value. 83 * Based on the first character of the key, the value is escaped and/or themed: 84 * - !variable: inserted as is 85 * - @variable: escape plain text to HTML (Drupal.checkPlain) 86 * - %variable: escape text and theme as a placeholder for user-submitted 87 * content (checkPlain + Drupal.theme('placeholder')) 88 * @return 89 * The translated string. 90 */ 91 Drupal.t = function(str, args) { 92 // Fetch the localized version of the string. 93 if (Drupal.locale.strings && Drupal.locale.strings[str]) { 94 str = Drupal.locale.strings[str]; 95 } 96 97 if (args) { 98 // Transform arguments before inserting them 99 for (var key in args) { 100 switch (key.charAt(0)) { 101 // Escaped only 102 case '@': 103 args[key] = Drupal.checkPlain(args[key]); 104 break; 105 // Pass-through 106 case '!': 107 break; 108 // Escaped and placeholder 109 case '%': 110 default: 111 args[key] = Drupal.theme('placeholder', args[key]); 112 break; 113 } 114 str = str.replace(key, args[key]); 115 } 116 } 117 return str; 118 }; 119 120 /** 121 * Format a string containing a count of items. 122 * 123 * This function ensures that the string is pluralized correctly. Since Drupal.t() is 124 * called by this function, make sure not to pass already-localized strings to it. 125 * 126 * See the documentation of the server-side format_plural() function for further details. 127 * 128 * @param count 129 * The item count to display. 130 * @param singular 131 * The string for the singular case. Please make sure it is clear this is 132 * singular, to ease translation (e.g. use "1 new comment" instead of "1 new"). 133 * Do not use @count in the singular string. 134 * @param plural 135 * The string for the plural case. Please make sure it is clear this is plural, 136 * to ease translation. Use @count in place of the item count, as in "@count 137 * new comments". 138 * @param args 139 * An object of replacements pairs to make after translation. Incidences 140 * of any key in this array are replaced with the corresponding value. 141 * Based on the first character of the key, the value is escaped and/or themed: 142 * - !variable: inserted as is 143 * - @variable: escape plain text to HTML (Drupal.checkPlain) 144 * - %variable: escape text and theme as a placeholder for user-submitted 145 * content (checkPlain + Drupal.theme('placeholder')) 146 * Note that you do not need to include @count in this array. 147 * This replacement is done automatically for the plural case. 148 * @return 149 * A translated string. 150 */ 151 Drupal.formatPlural = function(count, singular, plural, args) { 152 var args = args || {}; 153 args['@count'] = count; 154 // Determine the index of the plural form. 155 var index = Drupal.locale.pluralFormula ? Drupal.locale.pluralFormula(args['@count']) : ((args['@count'] == 1) ? 0 : 1); 156 157 if (index == 0) { 158 return Drupal.t(singular, args); 159 } 160 else if (index == 1) { 161 return Drupal.t(plural, args); 162 } 163 else { 164 args['@count['+ index +']'] = args['@count']; 165 delete args['@count']; 166 return Drupal.t(plural.replace('@count', '@count['+ index +']')); 167 } 168 }; 169 170 /** 171 * Generate the themed representation of a Drupal object. 172 * 173 * All requests for themed output must go through this function. It examines 174 * the request and routes it to the appropriate theme function. If the current 175 * theme does not provide an override function, the generic theme function is 176 * called. 177 * 178 * For example, to retrieve the HTML that is output by theme_placeholder(text), 179 * call Drupal.theme('placeholder', text). 180 * 181 * @param func 182 * The name of the theme function to call. 183 * @param ... 184 * Additional arguments to pass along to the theme function. 185 * @return 186 * Any data the theme function returns. This could be a plain HTML string, 187 * but also a complex object. 188 */ 189 Drupal.theme = function(func) { 190 for (var i = 1, args = []; i < arguments.length; i++) { 191 args.push(arguments[i]); 192 } 193 194 return (Drupal.theme[func] || Drupal.theme.prototype[func]).apply(this, args); 195 }; 196 197 /** 198 * Parse a JSON response. 199 * 200 * The result is either the JSON object, or an object with 'status' 0 and 'data' an error message. 201 */ 202 Drupal.parseJson = function (data) { 203 if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) { 204 return { status: 0, data: data.length ? data : Drupal.t('Unspecified error') }; 205 } 206 return eval('(' + data + ');'); 207 }; 208 209 /** 210 * Freeze the current body height (as minimum height). Used to prevent 211 * unnecessary upwards scrolling when doing DOM manipulations. 212 */ 213 Drupal.freezeHeight = function () { 214 Drupal.unfreezeHeight(); 215 var div = document.createElement('div'); 216 $(div).css({ 217 position: 'absolute', 218 top: '0px', 219 left: '0px', 220 width: '1px', 221 height: $('body').css('height') 222 }).attr('id', 'freeze-height'); 223 $('body').append(div); 224 }; 225 226 /** 227 * Unfreeze the body height 228 */ 229 Drupal.unfreezeHeight = function () { 230 $('#freeze-height').remove(); 231 }; 232 233 /** 234 * Wrapper around encodeURIComponent() which avoids Apache quirks (equivalent of 235 * drupal_urlencode() in PHP). This function should only be used on paths, not 236 * on query string arguments. 237 */ 238 Drupal.encodeURIComponent = function (item, uri) { 239 uri = uri || location.href; 240 item = encodeURIComponent(item).replace(/%2F/g, '/'); 241 return (uri.indexOf('?q=') != -1) ? item : item.replace(/%26/g, '%2526').replace(/%23/g, '%2523').replace(/\/\//g, '/%252F'); 242 }; 243 244 /** 245 * Get the text selection in a textarea. 246 */ 247 Drupal.getSelection = function (element) { 248 if (typeof(element.selectionStart) != 'number' && document.selection) { 249 // The current selection 250 var range1 = document.selection.createRange(); 251 var range2 = range1.duplicate(); 252 // Select all text. 253 range2.moveToElementText(element); 254 // Now move 'dummy' end point to end point of original range. 255 range2.setEndPoint('EndToEnd', range1); 256 // Now we can calculate start and end points. 257 var start = range2.text.length - range1.text.length; 258 var end = start + range1.text.length; 259 return { 'start': start, 'end': end }; 260 } 261 return { 'start': element.selectionStart, 'end': element.selectionEnd }; 262 }; 263 264 /** 265 * Build an error message from ahah response. 266 */ 267 Drupal.ahahError = function(xmlhttp, uri) { 268 if (xmlhttp.status == 200) { 269 if (jQuery.trim($(xmlhttp.responseText).text())) { 270 var message = Drupal.t("An error occurred. \n@uri\n@text", {'@uri': uri, '@text': xmlhttp.responseText }); 271 } 272 else { 273 var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri, '@text': xmlhttp.responseText }); 274 } 275 } 276 else { 277 var message = Drupal.t("An HTTP error @status occurred. \n@uri", {'@uri': uri, '@status': xmlhttp.status }); 278 } 279 return message; 280 } 281 282 // Global Killswitch on the <html> element 283 if (Drupal.jsEnabled) { 284 // Global Killswitch on the <html> element 285 $(document.documentElement).addClass('js'); 286 // 'js enabled' cookie 287 document.cookie = 'has_js=1; path=/'; 288 // Attach all behaviors. 289 $(document).ready(function() { 290 Drupal.attachBehaviors(this); 291 }); 292 } 293 294 /** 295 * The default themes. 296 */ 297 Drupal.theme.prototype = { 298 299 /** 300 * Formats text for emphasized display in a placeholder inside a sentence. 301 * 302 * @param str 303 * The text to format (plain-text). 304 * @return 305 * The formatted text (html). 306 */ 307 placeholder: function(str) { 308 return '<em>' + Drupal.checkPlain(str) + '</em>'; 309 } 310 }; 311 ; 312 /* $Id: admin_menu.js,v 1.7.2.9 2010/02/20 23:53:18 sun Exp $ */ 313 314 $(document).ready(function() { 315 if (!$('#admin-menu').length) { 316 return; 317 } 318 319 // Apply margin-top if enabled; directly applying marginTop doesn't work in IE. 320 if (Drupal && Drupal.settings && Drupal.settings.admin_menu) { 321 if (Drupal.settings.admin_menu.margin_top) { 322 $('body').addClass('admin-menu'); 323 } 324 if (Drupal.settings.admin_menu.position_fixed) { 325 $('#admin-menu').css('position', 'fixed'); 326 } 327 // Move page tabs into administration menu. 328 if (Drupal.settings.admin_menu.tweak_tabs) { 329 $('ul.tabs.primary li').each(function() { 330 $(this).addClass('admin-menu-tab').appendTo('#admin-menu > ul'); 331 }); 332 $('ul.tabs.secondary').appendTo('#admin-menu > ul > li.admin-menu-tab.active').removeClass('secondary'); 333 } 334 // Collapse fieldsets on Modules page. For why multiple selectors see #111719. 335 if (Drupal.settings.admin_menu.tweak_modules) { 336 $('#system-modules fieldset:not(.collapsed), #system-modules-1 fieldset:not(.collapsed)').addClass('collapsed'); 337 } 338 } 339 340 // Hover emulation for IE 6. 341 if ($.browser.msie && parseInt(jQuery.browser.version) == 6) { 342 $('#admin-menu li').hover(function() { 343 $(this).addClass('iehover'); 344 }, function() { 345 $(this).removeClass('iehover'); 346 }); 347 } 348 349 // Delayed mouseout. 350 $('#admin-menu li').hover(function() { 351 // Stop the timer. 352 clearTimeout(this.sfTimer); 353 // Display child lists. 354 $('> ul', this).css({left: 'auto', display: 'block'}) 355 // Immediately hide nephew lists. 356 .parent().siblings('li').children('ul').css({left: '-999em', display: 'none'}); 357 }, function() { 358 // Start the timer. 359 var uls = $('> ul', this); 360 this.sfTimer = setTimeout(function() { 361 uls.css({left: '-999em', display: 'none'}); 362 }, 400); 363 }); 364 }); 365 ; 366 // $Id: panels.js,v 1.2.4.1 2009/10/05 22:40:35 merlinofchaos Exp $ 367 368 (function ($) { 369 Drupal.Panels = {}; 370 371 Drupal.Panels.autoAttach = function() { 372 if ($.browser.msie) { 373 // If IE, attach a hover event so we can see our admin links. 374 $("div.panel-pane").hover( 375 function() { 376 $('div.panel-hide', this).addClass("panel-hide-hover"); return true; 377 }, 378 function() { 379 $('div.panel-hide', this).removeClass("panel-hide-hover"); return true; 380 } 381 ); 382 $("div.admin-links").hover( 383 function() { 384 $(this).addClass("admin-links-hover"); return true; 385 }, 386 function(){ 387 $(this).removeClass("admin-links-hover"); return true; 388 } 389 ); 390 } 391 }; 392 393 $(Drupal.Panels.autoAttach); 394 })(jQuery); 395 ; 396 // $Id: tableheader.js,v 1.16.2.2 2009/03/30 12:48:09 goba Exp $ 397 398 Drupal.tableHeaderDoScroll = function() { 399 if (typeof(Drupal.tableHeaderOnScroll)=='function') { 400 Drupal.tableHeaderOnScroll(); 401 } 402 }; 403 404 Drupal.behaviors.tableHeader = function (context) { 405 // This breaks in anything less than IE 7. Prevent it from running. 406 if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7) { 407 return; 408 } 409 410 // Keep track of all cloned table headers. 411 var headers = []; 412 413 $('table.sticky-enabled thead:not(.tableHeader-processed)', context).each(function () { 414 // Clone thead so it inherits original jQuery properties. 415 var headerClone = $(this).clone(true).insertBefore(this.parentNode).wrap('<table class="sticky-header"></table>').parent().css({ 416 position: 'fixed', 417 top: '0px' 418 }); 419 420 headerClone = $(headerClone)[0]; 421 headers.push(headerClone); 422 423 // Store parent table. 424 var table = $(this).parent('table')[0]; 425 headerClone.table = table; 426 // Finish initialzing header positioning. 427 tracker(headerClone); 428 429 $(table).addClass('sticky-table'); 430 $(this).addClass('tableHeader-processed'); 431 }); 432 433 // Define the anchor holding var. 434 var prevAnchor = ''; 435 436 // Track positioning and visibility. 437 function tracker(e) { 438 // Save positioning data. 439 var viewHeight = document.documentElement.scrollHeight || document.body.scrollHeight; 440 if (e.viewHeight != viewHeight) { 441 e.viewHeight = viewHeight; 442 e.vPosition = $(e.table).offset().top - 4; 443 e.hPosition = $(e.table).offset().left; 444 e.vLength = e.table.clientHeight - 100; 445 // Resize header and its cell widths. 446 var parentCell = $('th', e.table); 447 $('th', e).each(function(index) { 448 var cellWidth = parentCell.eq(index).css('width'); 449 // Exception for IE7. 450 if (cellWidth == 'auto') { 451 cellWidth = parentCell.get(index).clientWidth +'px'; 452 } 453 $(this).css('width', cellWidth); 454 }); 455 $(e).css('width', $(e.table).css('width')); 456 } 457 458 // Track horizontal positioning relative to the viewport and set visibility. 459 var hScroll = document.documentElement.scrollLeft || document.body.scrollLeft; 460 var vOffset = (document.documentElement.scrollTop || document.body.scrollTop) - e.vPosition; 461 var visState = (vOffset > 0 && vOffset < e.vLength) ? 'visible' : 'hidden'; 462 $(e).css({left: -hScroll + e.hPosition +'px', visibility: visState}); 463 464 // Check the previous anchor to see if we need to scroll to make room for the header. 465 // Get the height of the header table and scroll up that amount. 466 if (prevAnchor != location.hash) { 467 if (location.hash != '') { 468 var offset = $('td' + location.hash).offset(); 469 if (offset) { 470 var top = offset.top; 471 var scrollLocation = top - $(e).height(); 472 $('body, html').scrollTop(scrollLocation); 473 } 474 } 475 prevAnchor = location.hash; 476 } 477 } 478 479 // Only attach to scrollbars once, even if Drupal.attachBehaviors is called 480 // multiple times. 481 if (!$('body').hasClass('tableHeader-processed')) { 482 $('body').addClass('tableHeader-processed'); 483 $(window).scroll(Drupal.tableHeaderDoScroll); 484 $(document.documentElement).scroll(Drupal.tableHeaderDoScroll); 485 } 486 487 // Track scrolling. 488 Drupal.tableHeaderOnScroll = function() { 489 $(headers).each(function () { 490 tracker(this); 491 }); 492 }; 493 494 // Track resizing. 495 var time = null; 496 var resize = function () { 497 // Ensure minimum time between adjustments. 498 if (time) { 499 return; 500 } 501 time = setTimeout(function () { 502 $('table.sticky-header').each(function () { 503 // Force cell width calculation. 504 this.viewHeight = 0; 505 tracker(this); 506 }); 507 // Reset timer 508 time = null; 509 }, 250); 510 }; 511 $(window).resize(resize); 512 }; 513 ; 514 // $Id: collapse.js,v 1.17 2008/01/29 10:58:25 goba Exp $ 515 516 /** 517 * Toggle the visibility of a fieldset using smooth animations 518 */ 519 Drupal.toggleFieldset = function(fieldset) { 520 if ($(fieldset).is('.collapsed')) { 521 // Action div containers are processed separately because of a IE bug 522 // that alters the default submit button behavior. 523 var content = $('> div:not(.action)', fieldset); 524 $(fieldset).removeClass('collapsed'); 525 content.hide(); 526 content.slideDown( { 527 duration: 'fast', 528 easing: 'linear', 529 complete: function() { 530 Drupal.collapseScrollIntoView(this.parentNode); 531 this.parentNode.animating = false; 532 $('div.action', fieldset).show(); 533 }, 534 step: function() { 535 // Scroll the fieldset into view 536 Drupal.collapseScrollIntoView(this.parentNode); 537 } 538 }); 539 } 540 else { 541 $('div.action', fieldset).hide(); 542 var content = $('> div:not(.action)', fieldset).slideUp('fast', function() { 543 $(this.parentNode).addClass('collapsed'); 544 this.parentNode.animating = false; 545 }); 546 } 547 }; 548 549 /** 550 * Scroll a given fieldset into view as much as possible. 551 */ 552 Drupal.collapseScrollIntoView = function (node) { 553 var h = self.innerHeight || document.documentElement.clientHeight || $('body')[0].clientHeight || 0; 554 var offset = self.pageYOffset || document.documentElement.scrollTop || $('body')[0].scrollTop || 0; 555 var posY = $(node).offset().top; 556 var fudge = 55; 557 if (posY + node.offsetHeight + fudge > h + offset) { 558 if (node.offsetHeight > h) { 559 window.scrollTo(0, posY); 560 } else { 561 window.scrollTo(0, posY + node.offsetHeight - h + fudge); 562 } 563 } 564 }; 565 566 Drupal.behaviors.collapse = function (context) { 567 $('fieldset.collapsible > legend:not(.collapse-processed)', context).each(function() { 568 var fieldset = $(this.parentNode); 569 // Expand if there are errors inside 570 if ($('input.error, textarea.error, select.error', fieldset).size() > 0) { 571 fieldset.removeClass('collapsed'); 572 } 573 574 // Turn the legend into a clickable link and wrap the contents of the fieldset 575 // in a div for easier animation 576 var text = this.innerHTML; 577 $(this).empty().append($('<a href="#">'+ text +'</a>').click(function() { 578 var fieldset = $(this).parents('fieldset:first')[0]; 579 // Don't animate multiple times 580 if (!fieldset.animating) { 581 fieldset.animating = true; 582 Drupal.toggleFieldset(fieldset); 583 } 584 return false; 585 })) 586 .after($('<div class="fieldset-wrapper"></div>') 587 .append(fieldset.children(':not(legend):not(.action)'))) 588 .addClass('collapse-processed'); 589 }); 590 }; 591 ; 592 // $Id: jquery.form.js,v 1.2 2007/11/19 10:05:48 goba Exp $ 593 594 /* 595 * jQuery Form Plugin 596 * version: 2.01 (10/31/2007) 597 * @requires jQuery v1.1 or later 598 * 599 * Examples at: http://malsup.com/jquery/form/ 600 * Dual licensed under the MIT and GPL licenses: 601 * http://www.opensource.org/licenses/mit-license.php 602 * http://www.gnu.org/licenses/gpl.html 603 */ 604 eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.7.1j=5(o){2(P o==\'5\')o={L:o};o=$.2h({1h:4.X(\'2i\')||1E.2u.3D(),I:4.X(\'2g\')||\'29\'},o||{});3 p={};$.M.N(\'R.2P.2L\',[4,o,p]);2(p.1Q)6 4;3 a=4.1z(o.2r);2(o.V){H(3 n 3u o.V)a.C({z:n,A:o.V[n]})}2(o.28&&o.28(a,4,o)===E)6 4;$.M.N(\'R.K.36\',[a,4,o,p]);2(p.1Q)6 4;3 q=$.1x(a);2(o.I.31()==\'29\'){o.1h+=(o.1h.2Z(\'?\')>=0?\'&\':\'?\')+q;o.V=B}8 o.V=q;3 r=4,U=[];2(o.1r)U.C(5(){r.1r()});2(o.1o)U.C(5(){r.1o()});2(!o.18&&o.14){3 u=o.L||5(){};U.C(5(a){2(4.1N)$(o.14).X("1M",a).1N().D(u,1L);8 $(o.14).2t(a).D(u,1L)})}8 2(o.L)U.C(o.L);o.L=5(a,b){H(3 i=0,F=U.G;i<F;i++)U[i](a,b,r)};3 v=$(\'19:3v\',4).15();3 w=E;H(3 j=0;j<v.G;j++)2(v[j])w=T;2(o.2f||w){2($.1i.3o&&o.2a)$.3l(o.2a,1l);8 1l()}8 $.3h(o);$.M.N(\'R.K.3f\',[4,o]);6 4;5 1l(){3 d=r[0];3 f=$.2h({},$.39,o);3 h=\'35\'+$.7.1j.1a++;3 i=$(\'<2f 33="\'+h+\'" z="\'+h+\'" />\');3 j=i[0];3 k=$.1i.20&&1E.20.30()<9;2($.1i.1X||k)j.2Y=\'2W:E;1w.2U("");\';i.2S({2R:\'2Q\',23:\'-24\',1R:\'-24\'});3 l={Z:B,1b:B,2K:0,2J:\'n/a\',2H:5(){},2F:5(){},2E:5(){}};3 g=f.2B;2(g&&!$.1O++)$.M.N("2x");2(g)$.M.N("2w",[l,f]);3 m=0;3 n=0;1f(5(){i.2v(\'1n\');j.1K?j.1K(\'1J\',12):j.2s(\'1I\',12,E);3 a=d.1H?\'1H\':\'2q\';3 t=r.X(\'14\');r.X({14:h,2g:\'3C\',2i:f.1h});d[a]=\'3B/R-V\';2(f.1G)1f(5(){n=T;12()},f.1G);d.K();r.X(\'14\',t)},10);5 12(){2(m++)6;j.2o?j.2o(\'1J\',12):j.3A(\'1I\',12,E);3 a=T;3z{2(n)3x\'1G\';3 b,O;O=j.2n?j.2n.1w:j.2l?j.2l:j.1w;l.Z=O.1n?O.1n.1M:B;l.1b=O.2k?O.2k:O;2(f.18==\'2j\'||f.18==\'3s\'){3 c=O.1D(\'1C\')[0];b=c?c.A:l.Z;2(f.18==\'2j\')3r("V = "+b);8 $.3q(b)}8 2(f.18==\'2m\'){b=l.1b;2(!b&&l.Z!=B)b=2d(l.Z)}8{b=l.Z}}3p(e){a=E;$.3n(f,l,\'2b\',e)}2(a){f.L(b,\'L\');2(g)$.M.N("3m",[l,f])}2(g)$.M.N("3k",[l,f]);2(g&&!--$.1O)$.M.N("3j");2(f.27)f.27(l,a?\'L\':\'2b\');1f(5(){i.3i();l.1b=B},3g)};5 2d(s,a){2(1E.26){a=25 26(\'3d.3c\');a.3b=\'E\';a.3a(s)}8 a=(25 38()).37(s,\'1A/2m\');6(a&&a.22&&a.22.1e!=\'34\')?a:B}}};$.7.1j.1a=0;$.7.W=5(a){6 4.21().K(1m).D(5(){4.1u=$.7.W.1a++;$.7.W.1t[4.1u]=a;$(":K,19:Y",4).1Z(1s)})};$.7.W.1a=1;$.7.W.1t={};5 1s(e){3 a=4.R;a.Q=4;2(4.I==\'Y\'){2(e.1Y!=S){a.11=e.1Y;a.16=e.2X}8 2(P $.7.1U==\'5\'){3 b=$(4).1U();a.11=e.1V-b.1R;a.16=e.1W-b.23}8{a.11=e.1V-4.2V;a.16=e.1W-4.32}}1f(5(){a.Q=a.11=a.16=B},10)};5 1m(){3 a=4.1u;3 b=$.7.W.1t[a];$(4).1j(b);6 E};$.7.21=5(){4.1T(\'K\',1m);6 4.D(5(){$(":K,19:Y",4).1T(\'1Z\',1s)})};$.7.1z=5(b){3 a=[];2(4.G==0)6 a;3 c=4[0];3 d=b?c.1D(\'*\'):c.2T;2(!d)6 a;H(3 i=0,F=d.G;i<F;i++){3 e=d[i];3 n=e.z;2(!n)1v;2(b&&c.Q&&e.I=="Y"){2(!e.1d&&c.Q==e)a.C({z:n+\'.x\',A:c.11},{z:n+\'.y\',A:c.16});1v}3 v=$.15(e,T);2(v&&v.1c==1g){H(3 j=0,1S=v.G;j<1S;j++)a.C({z:n,A:v[j]})}8 2(v!==B&&P v!=\'S\')a.C({z:n,A:v})}2(!b&&c.Q){3 f=c.1D("19");H(3 i=0,F=f.G;i<F;i++){3 g=f[i];3 n=g.z;2(n&&!g.1d&&g.I=="Y"&&c.Q==g)a.C({z:n+\'.x\',A:c.11},{z:n+\'.y\',A:c.16})}}6 a};$.7.2O=5(a){6 $.1x(4.1z(a))};$.7.2N=5(b){3 a=[];4.D(5(){3 n=4.z;2(!n)6;3 v=$.15(4,b);2(v&&v.1c==1g){H(3 i=0,F=v.G;i<F;i++)a.C({z:n,A:v[i]})}8 2(v!==B&&P v!=\'S\')a.C({z:4.z,A:v})});6 $.1x(a)};$.7.15=5(a){H(3 b=[],i=0,F=4.G;i<F;i++){3 c=4[i];3 v=$.15(c,a);2(v===B||P v==\'S\'||(v.1c==1g&&!v.G))1v;v.1c==1g?$.3e(b,v):b.C(v)}6 b};$.15=5(b,c){3 n=b.z,t=b.I,13=b.1e.1F();2(P c==\'S\')c=T;2(c&&(!n||b.1d||t==\'17\'||t==\'2M\'||(t==\'1q\'||t==\'1B\')&&!b.1p||(t==\'K\'||t==\'Y\')&&b.R&&b.R.Q!=b||13==\'J\'&&b.1y==-1))6 B;2(13==\'J\'){3 d=b.1y;2(d<0)6 B;3 a=[],1k=b.2I;3 e=(t==\'J-2e\');3 f=(e?d+1:1k.G);H(3 i=(e?d:0);i<f;i++){3 g=1k[i];2(g.2c){3 v=$.1i.1X&&!(g.2G[\'A\'].3t)?g.1A:g.A;2(e)6 v;a.C(v)}}6 a}6 b.A};$.7.1o=5(){6 4.D(5(){$(\'19,J,1C\',4).2p()})};$.7.2p=$.7.2D=5(){6 4.D(5(){3 t=4.I,13=4.1e.1F();2(t==\'1A\'||t==\'3w\'||13==\'1C\')4.A=\'\';8 2(t==\'1q\'||t==\'1B\')4.1p=E;8 2(13==\'J\')4.1y=-1})};$.7.1r=5(){6 4.D(5(){2(P 4.17==\'5\'||(P 4.17==\'2C\'&&!4.17.3y))4.17()})};$.7.2A=5(b){2(b==S)b=T;6 4.D(5(){4.1d=!b})};$.7.J=5(b){2(b==S)b=T;6 4.D(5(){3 t=4.I;2(t==\'1q\'||t==\'1B\')4.1p=b;8 2(4.1e.1F()==\'1P\'){3 a=$(4).2z(\'J\');2(b&&a[0]&&a[0].I==\'J-2e\'){a.2y(\'1P\').J(E)}4.2c=b}})}})(3E);',62,227,'||if|var|this|function|return|fn|else|||||||||||||||||||||||||||name|value|null|push|each|false|max|length|for|type|select|submit|success|event|trigger|doc|typeof|clk|form|undefined|true|callbacks|data|ajaxForm|attr|image|responseText||clk_x|cb|tag|target|fieldValue|clk_y|reset|dataType|input|counter|responseXML|constructor|disabled|tagName|setTimeout|Array|url|browser|ajaxSubmit|ops|fileUpload|submitHandler|body|clearForm|checked|checkbox|resetForm|clickHandler|optionHash|formPluginId|continue|document|param|selectedIndex|formToArray|text|radio|textarea|getElementsByTagName|window|toLowerCase|timeout|encoding|load|onload|attachEvent|arguments|innerHTML|evalScripts|active|option|veto|left|jmax|unbind|offset|pageX|pageY|msie|offsetX|click|opera|ajaxFormUnbind|documentElement|top|1000px|new|ActiveXObject|complete|beforeSubmit|GET|closeKeepAlive|error|selected|toXml|one|iframe|method|extend|action|json|XMLDocument|contentDocument|xml|contentWindow|detachEvent|clearFields|enctype|semantic|addEventListener|html|location|appendTo|ajaxSend|ajaxStart|find|parent|enable|global|object|clearInputs|setRequestHeader|getResponseHeader|attributes|getAllResponseHeaders|options|statusText|status|serialize|button|fieldSerialize|formSerialize|pre|absolute|position|css|elements|write|offsetLeft|javascript|offsetY|src|indexOf|version|toUpperCase|offsetTop|id|parsererror|jqFormIO|validate|parseFromString|DOMParser|ajaxSettings|loadXML|async|XMLDOM|Microsoft|merge|notify|100|ajax|remove|ajaxStop|ajaxComplete|get|ajaxSuccess|handleError|safari|catch|globalEval|eval|script|specified|in|file|password|throw|nodeType|try|removeEventListener|multipart|POST|toString|jQuery'.split('|'),0,{})) 605 ; 606 // $Id: ajax-responder.js,v 1.18.2.24 2010/08/27 22:09:48 merlinofchaos Exp $ 607 /** 608 * @file 609 * 610 * CTools flexible AJAX responder object. 611 */ 612 613 (function ($) { 614 Drupal.CTools = Drupal.CTools || {}; 615 Drupal.CTools.AJAX = Drupal.CTools.AJAX || {}; 616 Drupal.CTools.AJAX.commands = Drupal.CTools.AJAX.commands || {}; 617 Drupal.CTools.AJAX.commandCache = Drupal.CTools.AJAX.comandCache || {} ; 618 Drupal.CTools.AJAX.scripts = {}; 619 Drupal.CTools.AJAX.css = {}; 620 621 /** 622 * Success callback for an ajax request. 623 * 624 * This function expects to receive a packet of data from a JSON object 625 * which is essentially a list of commands. Each commands must have a 626 * 'command' setting and this setting must resolve to a function in the 627 * Drupal.CTools.AJAX.commands space. 628 */ 629 Drupal.CTools.AJAX.respond = function(data) { 630 for (i in data) { 631 if (data[i]['command'] && Drupal.CTools.AJAX.commands[data[i]['command']]) { 632 Drupal.CTools.AJAX.commands[data[i]['command']](data[i]); 633 } 634 } 635 }; 636 637 /** 638 * Grab the response from the server and store it. 639 */ 640 Drupal.CTools.AJAX.warmCache = function () { 641 // Store this expression for a minor speed improvement. 642 $this = $(this); 643 var old_url = $this.attr('href'); 644 // If we are currently fetching, or if we have fetched this already which is 645 // ideal for things like pagers, where the previous page might already have 646 // been seen in the cache. 647 if ($this.hasClass('ctools-fetching') || Drupal.CTools.AJAX.commandCache[old_url]) { 648 return false; 649 } 650 651 // Grab all the links that match this url and add the fetching class. 652 // This allows the caching system to grab each url once and only once 653 // instead of grabbing the url once per <a>. 654 var $objects = $('a[href=' + old_url + ']') 655 $objects.addClass('ctools-fetching'); 656 try { 657 url = old_url.replace(/\/nojs(\/|$)/g, '/ajax$1'); 658 $.ajax({ 659 type: "POST", 660 url: url, 661 data: { 'js': 1, 'ctools_ajax': 1}, 662 global: true, 663 success: function (data) { 664 Drupal.CTools.AJAX.commandCache[old_url] = data; 665 $objects.addClass('ctools-cache-warmed').trigger('ctools-cache-warm', [data]); 666 }, 667 complete: function() { 668 $objects.removeClass('ctools-fetching'); 669 }, 670 dataType: 'json' 671 }); 672 } 673 catch (err) { 674 $objects.removeClass('ctools-fetching'); 675 return false; 676 } 677 678 return false; 679 }; 680 681 /** 682 * Cachable click handler to fetch the commands out of the cache or from url. 683 */ 684 Drupal.CTools.AJAX.clickAJAXCacheLink = function () { 685 $this = $(this); 686 if ($this.hasClass('ctools-fetching')) { 687 $this.bind('ctools-cache-warm', function (event, data) { 688 Drupal.CTools.AJAX.respond(data); 689 }); 690 return false; 691 } 692 else { 693 if ($this.hasClass('ctools-cache-warmed') && Drupal.CTools.AJAX.commandCache[$this.attr('href')]) { 694 Drupal.CTools.AJAX.respond(Drupal.CTools.AJAX.commandCache[$this.attr('href')]); 695 return false; 696 } 697 else { 698 return Drupal.CTools.AJAX.clickAJAXLink.apply(this); 699 } 700 } 701 }; 702 703 /** 704 * Generic replacement click handler to open the modal with the destination 705 * specified by the href of the link. 706 */ 707 Drupal.CTools.AJAX.clickAJAXLink = function() { 708 if ($(this).hasClass('ctools-ajaxing')) { 709 return false; 710 } 711 712 var url = $(this).attr('href'); 713 var object = $(this); 714 $(this).addClass('ctools-ajaxing'); 715 try { 716 url = url.replace(/\/nojs(\/|$)/g, '/ajax$1'); 717 $.ajax({ 718 type: "POST", 719 url: url, 720 data: { 'js': 1, 'ctools_ajax': 1}, 721 global: true, 722 success: Drupal.CTools.AJAX.respond, 723 error: function(xhr) { 724 Drupal.CTools.AJAX.handleErrors(xhr, url); 725 }, 726 complete: function() { 727 $('.ctools-ajaxing').removeClass('ctools-ajaxing'); 728 }, 729 dataType: 'json' 730 }); 731 } 732 catch (err) { 733 alert("An error occurred while attempting to process " + url); 734 $('.ctools-ajaxing').removeClass('ctools-ajaxing'); 735 return false; 736 } 737 738 return false; 739 }; 740 741 /** 742 * Generic replacement click handler to open the modal with the destination 743 * specified by the href of the link. 744 */ 745 Drupal.CTools.AJAX.clickAJAXButton = function() { 746 if ($(this).hasClass('ctools-ajaxing')) { 747 return false; 748 } 749 750 // Put our button in. 751 this.form.clk = this; 752 753 var url = Drupal.CTools.AJAX.findURL(this); 754 $(this).addClass('ctools-ajaxing'); 755 var object = $(this); 756 try { 757 if (url) { 758 url = url.replace(/\/nojs(\/|$)/g, '/ajax$1'); 759 $.ajax({ 760 type: "POST", 761 url: url, 762 data: { 'js': 1, 'ctools_ajax': 1}, 763 global: true, 764 success: Drupal.CTools.AJAX.respond, 765 error: function(xhr) { 766 Drupal.CTools.AJAX.handleErrors(xhr, url); 767 }, 768 complete: function() { 769 $('.ctools-ajaxing').removeClass('ctools-ajaxing'); 770 }, 771 dataType: 'json' 772 }); 773 } 774 else { 775 var form = this.form; 776 url = $(form).attr('action'); 777 setTimeout(function() { Drupal.CTools.AJAX.ajaxSubmit(form, url); }, 1); 778 } 779 } 780 catch (err) { 781 alert("An error occurred while attempting to process " + url); 782 $(this).removeClass('ctools-ajaxing'); 783 return false; 784 } 785 return false; 786 }; 787 788 /** 789 * Event handler to submit an AJAX form. 790 * 791 * Using a secondary event ensures that our form submission is last, which 792 * is needed when submitting wysiwyg controlled forms, for example. 793 */ 794 Drupal.CTools.AJAX.ajaxSubmit = function (form, url) { 795 $form = $(form); 796 797 if ($form.hasClass('ctools-ajaxing')) { 798 return false; 799 } 800 801 $form.addClass('ctools-ajaxing'); 802 803 try { 804 url = url.replace(/\/nojs(\/|$)/g, '/ajax$1'); 805 806 var ajaxOptions = { 807 type: 'POST', 808 url: url, 809 data: { 'js': 1, 'ctools_ajax': 1}, 810 global: true, 811 success: Drupal.CTools.AJAX.respond, 812 error: function(xhr) { 813 Drupal.CTools.AJAX.handleErrors(xhr, url); 814 }, 815 complete: function() { 816 $('.ctools-ajaxing').removeClass('ctools-ajaxing'); 817 $('div.ctools-ajaxing-temporary').remove(); 818 }, 819 dataType: 'json' 820 }; 821 822 // If the form requires uploads, use an iframe instead and add data to 823 // the submit to support this and use the proper response. 824 if ($form.attr('enctype') == 'multipart/form-data') { 825 $form.append('<input type="hidden" name="ctools_multipart" value="1">'); 826 ajaxIframeOptions = { 827 success: Drupal.CTools.AJAX.iFrameJsonRespond, 828 iframe: true 829 }; 830 ajaxOptions = $.extend(ajaxOptions, ajaxIframeOptions); 831 } 832 833 $form.ajaxSubmit(ajaxOptions); 834 } 835 catch (err) { 836 alert("An error occurred while attempting to process " + url); 837 $('.ctools-ajaxing').removeClass('ctools-ajaxing'); 838 $('div.ctools-ajaxing-temporary').remove(); 839 return false; 840 } 841 }; 842 843 /** 844 * Wrapper for handling JSON responses from an iframe submission 845 */ 846 Drupal.CTools.AJAX.iFrameJsonRespond = function(data) { 847 var myJson = eval(data); 848 Drupal.CTools.AJAX.respond(myJson); 849 } 850 851 /** 852 * Display error in a more fashion way 853 */ 854 Drupal.CTools.AJAX.handleErrors = function(xhr, path) { 855 var error_text = ''; 856 857 if ((xhr.status == 500 && xhr.responseText) || xhr.status == 200) { 858 error_text = xhr.responseText; 859 860 // Replace all < and > by < and > 861 error_text = error_text.replace("/&(lt|gt);/g", function (m, p) { 862 return (p == "lt")? "<" : ">"; 863 }); 864 865 // Now, replace all html tags by empty spaces 866 error_text = error_text.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,""); 867 868 // Fix end lines 869 error_text = error_text.replace(/[\n]+\s+/g,"\n"); 870 } 871 else if (xhr.status == 500) { 872 error_text = xhr.status + ': ' + Drupal.t("Internal server error. Please see server or PHP logs for error information."); 873 } 874 else { 875 error_text = xhr.status + ': ' + xhr.statusText; 876 } 877 878 alert(Drupal.t("An error occurred at @path.\n\nError Description: @error", {'@path': path, '@error': error_text})); 879 } 880 881 /** 882 * Generic replacement for change handler to execute ajax method. 883 */ 884 Drupal.CTools.AJAX.changeAJAX = function () { 885 if ($(this).hasClass('ctools-ajaxing')) { 886 return false; 887 } 888 889 var url = Drupal.CTools.AJAX.findURL(this); 890 $(this).addClass('ctools-ajaxing'); 891 var object = $(this); 892 var form_id = $(object).parents('form').get(0).id; 893 try { 894 if (url) { 895 url = url.replace(/\/nojs(\/|$)/g, '/ajax$1'); 896 $.ajax({ 897 type: "POST", 898 url: url, 899 data: {'ctools_changed': $(this).val(), 'js': 1, 'ctools_ajax': 1 }, 900 global: true, 901 success: Drupal.CTools.AJAX.respond, 902 error: function(xhr) { 903 Drupal.CTools.AJAX.handleErrors(xhr, url); 904 }, 905 complete: function() { 906 $('.ctools-ajaxing').removeClass('ctools-ajaxing'); 907 if ($(object).hasClass('ctools-ajax-submit-onchange')) { 908 $('form#' + form_id).submit(); 909 } 910 }, 911 dataType: 'json' 912 }); 913 } 914 else { 915 if ($(object).hasClass('ctools-ajax-submit-onchange')) { 916 $('form#' + form_id).submit(); 917 } 918 return false; 919 } 920 } 921 catch (err) { 922 alert("An error occurred while attempting to process " + url); 923 $('.ctools-ajaxing').removeClass('ctools-ajaxing'); 924 return false; 925 } 926 return false; 927 }; 928 929 /** 930 * Find a URL for an AJAX button. 931 * 932 * The URL for this gadget will be composed of the values of items by 933 * taking the ID of this item and adding -url and looking for that 934 * class. They need to be in the form in order since we will 935 * concat them all together using '/'. 936 */ 937 Drupal.CTools.AJAX.findURL = function(item) { 938 var url = ''; 939 var url_class = '.' + $(item).attr('id') + '-url'; 940 $(url_class).each( 941 function() { 942 if (url && $(this).val()) { 943 url += '/'; 944 } 945 url += $(this).val(); 946 }); 947 return url; 948 }; 949 950 Drupal.CTools.AJAX.getPath = function (link) { 951 if (!link) { 952 return; 953 } 954 955 var index = link.indexOf('?'); 956 if (index != -1) { 957 link = link.substr(0, index); 958 } 959 960 return link; 961 } 962 963 Drupal.CTools.AJAX.commands.prepend = function(data) { 964 $(data.selector).prepend(data.data); 965 Drupal.attachBehaviors($(data.selector)); 966 }; 967 968 Drupal.CTools.AJAX.commands.append = function(data) { 969 $(data.selector).append(data.data); 970 Drupal.attachBehaviors($(data.selector)); 971 }; 972 973 Drupal.CTools.AJAX.commands.replace = function(data) { 974 $(data.selector).replaceWith(data.data); 975 Drupal.attachBehaviors($(data.selector)); 976 }; 977 978 Drupal.CTools.AJAX.commands.after = function(data) { 979 var object = $(data.data); 980 $(data.selector).after(object); 981 Drupal.attachBehaviors(object); 982 }; 983 984 Drupal.CTools.AJAX.commands.before = function(data) { 985 var object = $(data.data); 986 $(data.selector).before(object); 987 Drupal.attachBehaviors(object); 988 }; 989 990 Drupal.CTools.AJAX.commands.html = function(data) { 991 $(data.selector).html(data.data); 992 Drupal.attachBehaviors($(data.selector)); 993 }; 994 995 Drupal.CTools.AJAX.commands.remove = function(data) { 996 $(data.selector).remove(); 997 }; 998 999 Drupal.CTools.AJAX.commands.changed = function(data) { 1000 if (!$(data.selector).hasClass('changed')) { 1001 $(data.selector).addClass('changed'); 1002 if (data.star) { 1003 $(data.selector).find(data.star).append(' <span class="star">*</span> '); 1004 } 1005 } 1006 }; 1007 1008 Drupal.CTools.AJAX.commands.alert = function(data) { 1009 alert(data.text, data.title); 1010 }; 1011 1012 Drupal.CTools.AJAX.commands.css = function(data) { 1013 /* 1014 if (data.selector && data.selector.contains('* html ')) { 1015 // This indicates an IE hack and we should only do it if we are IE. 1016 if (!jQuery.browser.msie) { 1017 return; 1018 } 1019 data.selector = data.selector.replace('* html ', ''); 1020 } 1021 */ 1022 $(data.selector).css(data.argument); 1023 }; 1024 1025 Drupal.CTools.AJAX.commands.css_files = function(data) { 1026 // Build a list of css files already loaded: 1027 $('link:not(.ctools-temporary-css)').each(function () { 1028 if ($(this).attr('type') == 'text/css') { 1029 var link = Drupal.CTools.AJAX.getPath($(this).attr('href')); 1030 if (link) { 1031 Drupal.CTools.AJAX.css[link] = $(this).attr('href'); 1032 } 1033 } 1034 }); 1035 1036 var html = ''; 1037 for (i in data.argument) { 1038 var link = Drupal.CTools.AJAX.getPath(data.argument[i].file); 1039 if (!Drupal.CTools.AJAX.css[link]) { 1040 html += '<link class="ctools-temporary-css" type="text/css" rel="stylesheet" media="' + data.argument[i].media + 1041 '" href="' + data.argument[i].file + '" />'; 1042 } 1043 } 1044 1045 if (html) { 1046 $('link.ctools-temporary-css').remove(); 1047 $('body').append($(html)); 1048 } 1049 }; 1050 1051 Drupal.CTools.AJAX.commands.settings = function(data) { 1052 $.extend(Drupal.settings, data.argument); 1053 }; 1054 1055 Drupal.CTools.AJAX.commands.scripts = function(data) { 1056 // Build a list of scripts already loaded: 1057 var scripts = {}; 1058 $('script').each(function () { 1059 var link = Drupal.CTools.AJAX.getPath($(this).attr('src')); 1060 if (link) { 1061 Drupal.CTools.AJAX.scripts[link] = $(this).attr('src'); 1062 } 1063 }); 1064 1065 var html = ''; 1066 var head = document.getElementsByTagName('head')[0]; 1067 for (i in data.argument) { 1068 var link = Drupal.CTools.AJAX.getPath(data.argument[i]); 1069 if (!Drupal.CTools.AJAX.scripts[link]) { 1070 Drupal.CTools.AJAX.scripts[link] = link; 1071 // Use this to actually get the script tag into the dom, which is 1072 // needed for scripts that self-reference to determine paths. 1073 var script = document.createElement('script'); 1074 script.type = 'text/javascript'; 1075 script.src = data.argument[i]; 1076 head.appendChild(script); 1077 html += '<script type="text/javascript" src="' + data.argument[i] + '"></script>'; 1078 } 1079 } 1080 1081 if (html) { 1082 $('body').append($(html)); 1083 } 1084 }; 1085 1086 Drupal.CTools.AJAX.commands.data = function(data) { 1087 $(data.selector).data(data.name, data.value); 1088 }; 1089 1090 Drupal.CTools.AJAX.commands.attr = function(data) { 1091 $(data.selector).attr(data.name, data.value); 1092 }; 1093 1094 Drupal.CTools.AJAX.commands.restripe = function(data) { 1095 // :even and :odd are reversed because jquery counts from 0 and 1096 // we count from 1, so we're out of sync. 1097 $('tbody tr:not(:hidden)', $(data.selector)) 1098 .removeClass('even') 1099 .removeClass('odd') 1100 .filter(':even') 1101 .addClass('odd') 1102 .end() 1103 .filter(':odd') 1104 .addClass('even'); 1105 }; 1106 1107 Drupal.CTools.AJAX.commands.redirect = function(data) { 1108 if (data.delay > 0) { 1109 setTimeout(function () { 1110 location.href = data.url; 1111 }, data.delay); 1112 } 1113 else { 1114 location.href = data.url; 1115 } 1116 }; 1117 1118 Drupal.CTools.AJAX.commands.reload = function(data) { 1119 location.reload(); 1120 }; 1121 1122 Drupal.CTools.AJAX.commands.submit = function(data) { 1123 $(data.selector).submit(); 1124 } 1125 1126 1127 /** 1128 * Bind links that will open modals to the appropriate function. 1129 */ 1130 Drupal.behaviors.CToolsAJAX = function(context) { 1131 // Bind links 1132 1133 // Note that doing so in this order means that the two classes can be 1134 // used together safely. 1135 $('a.ctools-use-ajax-cache:not(.ctools-use-ajax-processed)', context) 1136 .addClass('ctools-use-ajax-processed') 1137 .click(Drupal.CTools.AJAX.clickAJAXCacheLink) 1138 .each(function () { 1139 Drupal.CTools.AJAX.warmCache.apply(this); 1140 }); 1141 1142 $('a.ctools-use-ajax:not(.ctools-use-ajax-processed)', context) 1143 .addClass('ctools-use-ajax-processed') 1144 .click(Drupal.CTools.AJAX.clickAJAXLink); 1145 1146 1147 // Bind buttons 1148 $('input.ctools-use-ajax:not(.ctools-use-ajax-processed), button.ctools-use-ajax:not(.ctools-use-ajax-processed)', context) 1149 .addClass('ctools-use-ajax-processed') 1150 .click(Drupal.CTools.AJAX.clickAJAXButton); 1151 1152 // Bind select 1153 $('select, input:text, input:radio, input:checkbox', context) 1154 .filter('.ctools-use-ajax-onchange:not(.ctools-use-ajax-processed)') 1155 .addClass('ctools-use-ajax-processed') 1156 .change(Drupal.CTools.AJAX.changeAJAX); 1157 1158 // Add information about loaded CSS and JS files. 1159 if (Drupal.settings.CToolsAJAX && Drupal.settings.CToolsAJAX.css) { 1160 $.extend(Drupal.CTools.AJAX.css, Drupal.settings.CToolsAJAX.css); 1161 } 1162 if (Drupal.settings.CToolsAJAX && Drupal.settings.CToolsAJAX.scripts) { 1163 $.extend(Drupal.CTools.AJAX.scripts, Drupal.settings.CToolsAJAX.scripts); 1164 } 1165 }; 1166 })(jQuery); 1167 ; 1168 /* 1169 * jQuery UI 1.7.2 1170 * 1171 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 1172 * Dual licensed under the MIT (MIT-LICENSE.txt) 1173 * and GPL (GPL-LICENSE.txt) licenses. 1174 * 1175 * http://docs.jquery.com/UI 1176 */ jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,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}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);; 1177 /* 1178 * jQuery UI Resizable 1.7.2 1179 * 1180 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 1181 * Dual licensed under the MIT (MIT-LICENSE.txt) 1182 * and GPL (GPL-LICENSE.txt) licenses. 1183 * 1184 * http://docs.jquery.com/UI/Resizables 1185 * 1186 * Depends: 1187 * ui.core.js 1188 */ (function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/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=j.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 k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._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.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,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.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);; 1189 /* 1190 * jQuery UI Draggable 1.7.2 1191 * 1192 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 1193 * Dual licensed under the MIT (MIT-LICENSE.txt) 1194 * and GPL (GPL-LICENSE.txt) licenses. 1195 * 1196 * http://docs.jquery.com/UI/Draggables 1197 * 1198 * Depends: 1199 * ui.core.js 1200 */ (function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init: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")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);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.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.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"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){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)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-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():(i?0:b.scrollTop())))),left:(d-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():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,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}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.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;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){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(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.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}if(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();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.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")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);; 1201 /* 1202 * jQuery UI Dialog 1.7.2 1203 * 1204 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) 1205 * Dual licensed under the MIT (MIT-LICENSE.txt) 1206 * and GPL (GPL-LICENSE.txt) licenses. 1207 * 1208 * http://docs.jquery.com/UI/Dialog 1209 * 1210 * Depends: 1211 * ui.core.js 1212 * ui.draggable.js 1213 * ui.resizable.js 1214 */ (function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||" ",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||" ");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);; 1215 // $Id: dialog.js,v 1.1.2.5 2011/01/31 21:03:40 drewish Exp $ 1216 /** 1217 * @file 1218 * 1219 * Display ajax content in a Dialog window. 1220 * 1221 * This javascript relies on the CTools ajax responder and jQueryUI Dialog. 1222 */ 1223 1224 (function ($) { 1225 // Make sure our objects are defined. 1226 Drupal.CTools = Drupal.CTools || {}; 1227 Drupal.Dialog = Drupal.Dialog || {}; 1228 1229 /** 1230 * Display the modal 1231 */ 1232 Drupal.Dialog.show = function() { 1233 if (!Drupal.Dialog.dialog) { 1234 var o = { 1235 modal: true, 1236 height: Drupal.settings.Dialog.height, 1237 width: Drupal.settings.Dialog.width, 1238 position: 'center' 1239 }; 1240 Drupal.Dialog.dialog = $(Drupal.theme('DialogMain')).dialog(o); 1241 1242 // Completely remove the dialog every time it is closed. This is the 1243 // simplest way to get a clean slate on every dialog invokation. 1244 Drupal.Dialog.dialog.bind('dialogclose', function(event, ui) { 1245 $(this).remove(); 1246 Drupal.Dialog.dialog = null; 1247 }); 1248 } 1249 1250 Drupal.CTools.AJAX.commands.dialog_loading(); 1251 }; 1252 1253 /** 1254 * Hide the modal 1255 */ 1256 Drupal.Dialog.dismiss = function() { 1257 if (Drupal.Dialog.dialog) { 1258 Drupal.Dialog.dialog.dialog('close'); 1259 } 1260 }; 1261 1262 /** 1263 * Provide the HTML to create the modal dialog. 1264 */ 1265 Drupal.theme.prototype.DialogMain = function () { 1266 var html = '<div id="dialog-main" />'; 1267 return html; 1268 } 1269 1270 /** 1271 * Provide the HTML to create the throbber. 1272 */ 1273 Drupal.theme.prototype.DialogThrobber = function () { 1274 var html = ''; 1275 html += ' <div id="modal-throbber">'; 1276 html += ' <div class="modal-throbber-wrapper">'; 1277 html += Drupal.settings.Dialog.throbber; 1278 html += ' </div>'; 1279 html += ' </div>'; 1280 1281 return html; 1282 }; 1283 1284 /** 1285 * Generic replacement click handler to open the modal with the destination 1286 * specified by the href of the link. 1287 */ 1288 Drupal.Dialog.clickAjaxLink = function() { 1289 // show the empty dialog right away. 1290 Drupal.Dialog.show(); 1291 Drupal.CTools.AJAX.clickAJAXLink.apply(this); 1292 if (!$(this).hasClass('ctools-ajaxing')) { 1293 Drupal.Dialog.dismiss(); 1294 } 1295 1296 return false; 1297 }; 1298 1299 /** 1300 * Generic replacement click handler to open the modal with the destination 1301 * specified by the href of the link. 1302 */ 1303 Drupal.Dialog.clickAjaxButton = function() { 1304 if ($(this).hasClass('ctools-ajaxing')) { 1305 return false; 1306 } 1307 1308 Drupal.Dialog.show(); 1309 Drupal.CTools.AJAX.clickAJAXButton.apply(this); 1310 if (!$(this).hasClass('ctools-ajaxing')) { 1311 Drupal.Dialog.dismiss(); 1312 } 1313 1314 return false; 1315 }; 1316 1317 /** 1318 * Submit responder to do an AJAX submit on all modal forms. 1319 */ 1320 Drupal.Dialog.submitAjaxForm = function() { 1321 if ($(this).hasClass('ctools-ajaxing')) { 1322 return false; 1323 } 1324 1325 url = $(this).attr('action'); 1326 $(this).addClass('ctools-ajaxing'); 1327 var object = $(this); 1328 try { 1329 url.replace('/nojs/', '/ajax/'); 1330 1331 var ajaxOptions = { 1332 type: 'POST', 1333 url: url, 1334 data: '', 1335 global: true, 1336 success: Drupal.CTools.AJAX.respond, 1337 error: function() { 1338 alert("An error occurred while attempting to process " + url); 1339 }, 1340 complete: function() { 1341 object.removeClass('ctools-ajaxing'); 1342 $('.ctools-ajaxing', object).removeClass('ctools-ajaxing'); 1343 }, 1344 dataType: 'json' 1345 }; 1346 1347 // If the form requires uploads, use an iframe instead and add data to 1348 // the submit to support this and use the proper response. 1349 if ($(this).attr('enctype') == 'multipart/form-data') { 1350 $(this).append('<input type="hidden" name="ctools_multipart" value="1">'); 1351 ajaxIframeOptions = { 1352 success: Drupal.CTools.AJAX.iFrameJsonRespond, 1353 iframe: true 1354 }; 1355 ajaxOptions = $.extend(ajaxOptions, ajaxIframeOptions); 1356 } 1357 1358 $(this).ajaxSubmit(ajaxOptions); 1359 } 1360 catch (err) { 1361 alert("An error occurred while attempting to process " + url); 1362 $(this).removeClass('ctools-ajaxing'); 1363 $('div.ctools-ajaxing', this).remove(); 1364 return false; 1365 } 1366 return false; 1367 }; 1368 1369 /** 1370 * Handle a form button being clicked inside of a dialog. 1371 */ 1372 Drupal.Dialog.clickFormButton = function() { 1373 if (Drupal.autocompleteSubmit && !Drupal.autocompleteSubmit()) { 1374 return false; 1375 } 1376 1377 // Make sure it knows our button. 1378 if (!$(this.form).hasClass('ctools-ajaxing')) { 1379 this.form.clk = this; 1380 $(this).after('<div class="ctools-ajaxing"> </div>'); 1381 1382 // Submit the form. Notice the difference between $().submit() 1383 // which is the ajax submit and form.submit() which is the 1384 // default browser submit. 1385 $(this.form).submit(); 1386 } 1387 1388 return false; 1389 }; 1390 1391 /** 1392 * Bind links that will open modals to the appropriate function. 1393 */ 1394 Drupal.behaviors.Dialog = function(context) { 1395 // Bind links 1396 $('a.ctools-use-dialog:not(.ctools-use-dialog-processed)', context) 1397 .addClass('ctools-use-dialog-processed') 1398 .click(Drupal.Dialog.clickAjaxLink); 1399 1400 // Bind buttons 1401 $('input.ctools-use-dialog:not(.ctools-use-dialog-processed), button.ctools-use-dialog:not(.ctools-use-dialog-processed)', context) 1402 .addClass('ctools-use-dialog-processed') 1403 .click(Drupal.Dialog.clickAjaxButton); 1404 1405 if ($(context).attr('id') == 'dialog-main') { 1406 // Bind submit links in the modal form. 1407 $('form:not(.ctools-use-dialog-processed)', context) 1408 .addClass('ctools-use-dialog-processed') 1409 .submit(Drupal.Dialog.submitAjaxForm); 1410 // add click handlers so that we can tell which button was clicked, 1411 // because the AJAX submit does not set the values properly. 1412 1413 $('input[type="submit"]:not(.ctools-use-dialog-processed), button:not(.ctools-use-dialog-processed)', context) 1414 .addClass('ctools-use-dialog-processed') 1415 .click(Drupal.Dialog.clickFormButton); 1416 1417 var buttons = {}, buttonsMap = {}; 1418 $('.ctools-dialog-button:not(.ctools-dialog-button-processed)', context) 1419 .addClass('ctools-dialog-button-processed') 1420 .hide() 1421 .each(function() { 1422 var text = $(this).is('input') ? $(this).attr('value') : $(this).text(); 1423 buttonsMap[text] = this; 1424 buttons[text] = function(e) { 1425 var text = $(e.target).text(); 1426 var map = $(this).data('dialogButtonsMap'); 1427 var button = map[text]; 1428 1429 $(button).click(); 1430 }; 1431 }); 1432 $(context).data('dialogButtonsMap', buttonsMap); 1433 $(context).dialog('option', 'buttons', buttons); 1434 } 1435 }; 1436 1437 // The following are implementations of AJAX responder commands. 1438 1439 /** 1440 * AJAX responder command to place HTML within the modal. 1441 */ 1442 Drupal.CTools.AJAX.commands.dialog_display = function(command) { 1443 var $el = Drupal.Dialog.dialog; 1444 $el.html(command.output) 1445 // remove any previously added buttons 1446 .dialog('option', 'buttons', {}) 1447 .dialog('option', 'title', command.title) 1448 .dialog('show'); 1449 1450 var defaultOptions = { 1451 height: Drupal.settings.Dialog.height, 1452 width: Drupal.settings.Dialog.width, 1453 position: 'center', 1454 maxHeight: Math.floor($(window).height() * .8) 1455 }; 1456 var o = $.extend(defaultOptions, command.options); 1457 for (i in o) { 1458 $el.dialog('option', i, o[i]); 1459 } 1460 if ($el.height() > o.maxHeight) { 1461 $el.dialog('option', 'height', o.maxHeight); 1462 $el.dialog('option', 'position', o.position); 1463 // This is really ugly, but dialog gives us no way to call 1464 // _size() in a sane way! 1465 $el.data('dialog')._size(); 1466 } 1467 1468 Drupal.attachBehaviors($el); 1469 } 1470 1471 /** 1472 * AJAX responder command to dismiss the modal. 1473 */ 1474 Drupal.CTools.AJAX.commands.dialog_dismiss = function(command) { 1475 Drupal.Dialog.dismiss(); 1476 } 1477 1478 /** 1479 * Display loading 1480 */ 1481 Drupal.CTools.AJAX.commands.dialog_loading = function(command) { 1482 Drupal.CTools.AJAX.commands.dialog_display({ 1483 output: Drupal.theme('DialogThrobber'), 1484 title: Drupal.t('Loading...') 1485 }); 1486 } 1487 })(jQuery); 1488 ; 1489 // $Id: form.js,v 1.1 2007/09/12 18:29:32 goba Exp $ 1490 1491 Drupal.behaviors.multiselectSelector = function() { 1492 // Automatically selects the right radio button in a multiselect control. 1493 $('.multiselect select:not(.multiselectSelector-processed)') 1494 .addClass('multiselectSelector-processed').change(function() { 1495 $('.multiselect input:radio[value="'+ this.id.substr(5) +'"]') 1496 .attr('checked', true); 1497 }); 1498 }; 1499 ; 1500 // $Id: skinr.js,v 1.1.2.22 2010/05/01 20:11:11 jgirlygirl Exp $ 1501 1502 (function ($) { 1503 1504 // Make sure our objects are defined. 1505 Drupal.CTools = Drupal.CTools || {}; 1506 Drupal.Skinr = Drupal.Skinr || { 1507 editUrl: 'admin/build/skinr/edit/nojs', 1508 infoUrl: 'admin/build/skinr/info', 1509 unloadBehaviors: {}, 1510 1511 loadedFiles: { 'css': [], 'js': [] }, 1512 loadedFilesSnapshot: { 'css': [], 'js': [] }, 1513 1514 preparedUnload: {}, 1515 finalizedUnload: {}, 1516 1517 submitted: false 1518 }; 1519 1520 /** 1521 * Register functions to run when a skin is unloaded. This usually happens 1522 * when previewing a skin. 1523 */ 1524 Drupal.Skinr.registerUnload = function($script_id, $skin, $options, $function) { 1525 if (!$.isArray($options)) { 1526 $options = [$options]; 1527 } 1528 1529 if (Drupal.Skinr.unloadBehaviors[$skin] == undefined) { 1530 Drupal.Skinr.unloadBehaviors[$skin] = {}; 1531 } 1532 1533 for (var $i in $options) { 1534 if (Drupal.Skinr.unloadBehaviors[$skin][$options[$i]] == undefined) { 1535 Drupal.Skinr.unloadBehaviors[$skin][$options[$i]] = {}; 1536 } 1537 Drupal.Skinr.unloadBehaviors[$skin][$options[$i]][$script_id] = $function; 1538 } 1539 } 1540 1541 /** 1542 * Register a skin option to be unloaded. 1543 */ 1544 Drupal.Skinr.prepareUnload = function($skin, $options) { 1545 if (!$.isArray($options)) { 1546 $options = [$options]; 1547 } 1548 1549 if (Drupal.Skinr.preparedUnload[$skin] == undefined) { 1550 Drupal.Skinr.preparedUnload[$skin] = []; 1551 } 1552 1553 for (var $i in $options) { 1554 if ($.inArray($options[$i], Drupal.Skinr.preparedUnload[$skin]) < 0) { 1555 Drupal.Skinr.preparedUnload[$skin][Drupal.Skinr.preparedUnload[$skin].length] = $options[$i]; 1556 } 1557 } 1558 } 1559 1560 /** 1561 * Register a skin option to be unloaded when resetting the dialog. 1562 */ 1563 Drupal.Skinr.finalUnload = function($skin, $options) { 1564 if (!$.isArray($options)) { 1565 $options = [$options]; 1566 } 1567 1568 if (Drupal.Skinr.finalizedUnload[$skin] == undefined) { 1569 Drupal.Skinr.finalizedUnload[$skin] = []; 1570 } 1571 1572 for (var $i in $options) { 1573 if ($.inArray($options[$i], Drupal.Skinr.finalizedUnload[$skin]) < 0) { 1574 Drupal.Skinr.finalizedUnload[$skin][Drupal.Skinr.finalizedUnload[$skin].length] = $options[$i]; 1575 } 1576 } 1577 } 1578 1579 /** 1580 * Go through each skin option that was prepared for unload and run the 1581 * associated regaistered function. 1582 */ 1583 Drupal.Skinr.unload = function() { 1584 for (var $skin_name in Drupal.Skinr.preparedUnload) { 1585 if (Drupal.Skinr.preparedUnload[$skin_name] != undefined) { 1586 $skin = Drupal.Skinr.preparedUnload[$skin_name]; 1587 for (var $j in $skin) { 1588 $option = $skin[$j]; 1589 if (Drupal.Skinr.unloadBehaviors[$skin_name] != undefined) { 1590 if (Drupal.Skinr.unloadBehaviors[$skin_name][$option] != undefined) { 1591 $functions = Drupal.Skinr.unloadBehaviors[$skin_name][$option]; 1592 for (var $k in $functions) { 1593 if ($.isFunction(Drupal.Skinr.unloadBehaviors[$skin_name][$option][$k])) { 1594 Drupal.Skinr.unloadBehaviors[$skin_name][$option][$k](); 1595 } 1596 } 1597 } 1598 } 1599 } 1600 } 1601 } 1602 1603 Drupal.Skinr.preparedUnload = {}; 1604 } 1605 1606 /** 1607 * Initialize skinr's edit cogs. 1608 */ 1609 Drupal.behaviors.Skinr = function(context) { 1610 // Take a snapshot of the current list of files. 1611 if (this.initialized == undefined) { 1612 this.initialized = true; 1613 Drupal.Skinr.registerFile(null, null, null); 1614 Drupal.Skinr.freezeFiles(); 1615 } 1616 1617 for (var i in Drupal.settings.skinr['areas']) { 1618 var $module = Drupal.settings.skinr['areas'][i]['module']; 1619 var $sids = Drupal.settings.skinr['areas'][i]['sids']; 1620 var $id = Drupal.settings.skinr['areas'][i]['id']; 1621 1622 var $region = $('.skinr-id-' + $id + ':not(.skinr-region-processed)', context).addClass('skinr-region-processed'); 1623 if (Drupal.settings.skinr['areas'][i]['classes'] == undefined) { 1624 Drupal.settings.skinr['areas'][i]['classes'] = $($region).attr('class'); 1625 } 1626 1627 if ($region.length > 0) { 1628 var $links = ''; 1629 for (var $j in $sids) { 1630 var $classes = ''; 1631 if ($j == 0) { 1632 $classes += ' first'; 1633 } 1634 if ($j == $sids.length - 1) { 1635 $classes += ' last'; 1636 } 1637 if ($sids.length > 1) { 1638 $links += '<li class="skinr-link-' + $j + $classes + '"><a href="' + Drupal.settings.basePath + Drupal.Skinr.editUrl + '/' + $module + '/' + $sids[$j] + '/' + $sids +'" class="skinr-link ctools-use-dialog">' + Drupal.t('Edit skin') + ' ' + (parseInt($j) + 1) + '</a></li>'; 1639 } 1640 else { 1641 $links = '<li class="skinr-link-0 first last"><a href="' + Drupal.settings.basePath + Drupal.Skinr.editUrl + '/' + $module + '/' + $sids[$j] +'" class="skinr-link ctools-use-dialog">' + Drupal.t('Edit skin') + '</a></li>'; 1642 } 1643 } 1644 1645 var $wrapper_classes = ''; 1646 if ($module == 'page') { 1647 $wrapper_classes += ' skinr-links-wrapper-page'; 1648 } 1649 1650 $region.prepend('<div class="skinr-links-wrapper' + $wrapper_classes + '"><ul class="skinr-links">' + $links + '</ul></div>'); 1651 $region.get(0).skinr = { 'module': $module, 'sids': $sids, 'id': $id }; 1652 1653 Drupal.behaviors.Dialog($region); 1654 }; 1655 } 1656 1657 $('div.skinr-links-wrapper:not(.skinr-links-wrapper-processed)', context).addClass('skinr-links-wrapper-processed').each(function () { 1658 var $wrapper = $(this); 1659 var $region = $wrapper.closest('.skinr-region'); 1660 var $links = $wrapper.find('ul.skinr-links'); 1661 var $trigger = $('<a class="skinr-links-trigger" href="#" />').text(Drupal.t('Configure')).click( 1662 function () { 1663 $wrapper.find('ul.skinr-links').stop(true, true).slideToggle(100); 1664 $wrapper.toggleClass('skinr-links-active'); 1665 return false; 1666 } 1667 ); 1668 1669 // Attach hover behavior to trigger and ul.skinr-links. 1670 $trigger.add($links).hover( 1671 function () { $region.addClass('skinr-region-active'); }, 1672 function () { $region.removeClass('skinr-region-active'); } 1673 ); 1674 // Hide the contextual links when user rolls out of the .skinr-links-region. 1675 $region.bind('mouseleave', Drupal.Skinr.hideLinks).click(Drupal.Skinr.hideLinks); 1676 // Prepend the trigger. 1677 $links.end().prepend($trigger); 1678 }); 1679 1680 // Add an open and a close handler to the dialog. 1681 if (Drupal.Dialog.dialog && !Drupal.Dialog.dialog.hasClass('skinr-dialog-processed')) { 1682 Drupal.Dialog.dialog.addClass('skinr-dialog-processed').bind('dialogbeforeclose', Drupal.Skinr.dialogBeforeClose); 1683 } 1684 } 1685 1686 /** 1687 * Disables outline for the region contextual links are associated with. 1688 */ 1689 Drupal.Skinr.hideLinks = function () { 1690 $(this).closest('.skinr-region') 1691 .find('.skinr-links-active').removeClass('skinr-links-active') 1692 .find('ul.skinr-links').hide(); 1693 }; 1694 1695 /** 1696 * Cleanup function run before dialog is closed. 1697 */ 1698 Drupal.Skinr.dialogBeforeClose = function(event, ui) { 1699 if (!Drupal.Skinr.submitted) { 1700 // Unload js. 1701 Drupal.Skinr.preparedUnload = Drupal.Skinr.finalizedUnload; 1702 Drupal.Skinr.unload(); 1703 Drupal.Skinr.finalizedUnload = {}; 1704 1705 Drupal.Skinr.unfreezeFiles(); 1706 1707 // Reset all the applied style changes. 1708 for (var i in Drupal.settings.skinr['areas']) { 1709 var $id = Drupal.settings.skinr['areas'][i]['id']; 1710 var $classes = Drupal.settings.skinr['areas'][i]['classes']; 1711 $('.skinr-id-' + $id).attr('class', $classes); 1712 } 1713 // @todo Remove added CSS during preview. 1714 1715 // Let's do another attach behaviors now that our classes are reset. 1716 Drupal.attachBehaviors(); 1717 } 1718 Drupal.Skinr.submitted = false; 1719 } 1720 1721 /** 1722 * Live preview functionality for skinr. 1723 */ 1724 Drupal.behaviors.SkinrLivePreview = function(context) { 1725 $('#skinr-ui-form .skinr-ui-current-theme :input:not(.skinr-live-preview-processed)', context).addClass('skinr-live-preview-processed').change(function () { 1726 var $tag = $(this).attr('tagName'); 1727 $tag = $tag.toLowerCase(); 1728 1729 var $module = $('#skinr-ui-form #edit-module').val(); 1730 var $sid = $('#skinr-ui-form #edit-sid').val(); 1731 var $sids = $('#skinr-ui-form #edit-sids').val(); 1732 if (!$sids) { 1733 $sids = $sid; 1734 } 1735 1736 var $name = $(this).attr('name'); 1737 $name = $name.replace(/skinr_settings\[.*_group\]\[[^\]]*\]\[widgets\](\[[^\]]*\])?\[([^\]]*)\]/, '$2'); 1738 1739 var $rem_classes = ''; 1740 var $add_classes = $(this).val(); 1741 1742 if ($tag == 'select') { 1743 $(this).find('option').each(function() { 1744 $rem_classes += ' ' + $(this).attr('value'); 1745 }); 1746 } 1747 else if ($tag == 'input') { 1748 var $type = $(this).attr('type'); 1749 if ($type == 'checkbox') { 1750 $add_classes = ''; 1751 $(this).closest('.form-checkboxes').find('input[type=checkbox]').each(function () { 1752 if ($(this).is(':checked')) { 1753 $add_classes += ' ' + $(this).attr('value'); 1754 } 1755 else { 1756 $rem_classes += ' ' + $(this).attr('value'); 1757 } 1758 }); 1759 } 1760 else if ($type == 'radio') { 1761 $(this).closest('.form-radios').find('input[type=radio]').each(function () { 1762 $rem_classes += ' ' + $(this).attr('value'); 1763 }); 1764 } 1765 } 1766 1767 // Use AJAX to grab the CSS and JS filename. 1768 $.ajax({ 1769 type: 'GET', 1770 dataType: 'json', 1771 url: Drupal.settings.basePath + Drupal.Skinr.infoUrl + '/' + $name + '/' + $add_classes, 1772 success: function($data) { 1773 1774 var $command = { 1775 command: 'skinrAfterupdate', 1776 module: $module, 1777 sids: $sids, 1778 classes: { 1779 remove: $rem_classes, 1780 add: $add_classes 1781 }, 1782 css: $data.css, 1783 js: $data.js, 1784 nosave: true 1785 }; 1786 1787 Drupal.CTools.AJAX.commands.skinrAfterupdate($command); 1788 } 1789 }); 1790 }); 1791 } 1792 1793 /** 1794 * AJAX responder command to dismiss the modal. 1795 */ 1796 Drupal.CTools.AJAX.commands.skinrAfterupdate = function(command) { 1797 var $path, $el; 1798 Drupal.Skinr.finalizedUnload = {}; 1799 1800 if (command.nosave == undefined || command.nosave == false) { 1801 // Let the dialogBeforeClose function know we've submitted rather than 1802 Drupal.Skinr.submitted = true; 1803 } 1804 1805 if (command.module && command.sids && (command.classes.remove || command.classes.add)) { 1806 if (command.css) { 1807 // First unload all unecessary stylesheets 1808 for (var j in command.css) { 1809 $path = Drupal.settings.basePath + command.css[j].path + '?' + Drupal.settings.skinr['css_js_query_string']; 1810 if (!command.css[j].enabled) { 1811 Drupal.Skinr.unloadFile('css', $path); 1812 } 1813 } 1814 // Then load the newly enabled ones 1815 for (var j in command.css) { 1816 $path = Drupal.settings.basePath + command.css[j].path + '?' + Drupal.settings.skinr['css_js_query_string']; 1817 if (command.css[j].enabled) { 1818 Drupal.Skinr.loadFile('css', $path, command.css[j].media); 1819 } 1820 } 1821 } 1822 if (command.js) { 1823 for (var j in command.js) { 1824 $path = Drupal.settings.basePath + command.js[j].path + '?' + Drupal.settings.skinr['css_js_query_string']; 1825 if (command.js[j].enabled) { 1826 Drupal.Skinr.loadFile('js', $path, null); 1827 if (command.nosave) { 1828 // Need to disable this js after closing dialog. 1829 Drupal.Skinr.finalUnload(command.js[j].skin, command.js[j].options); 1830 } 1831 } 1832 else { 1833 // Disable js. 1834 Drupal.Skinr.prepareUnload(command.js[j].skin, command.js[j].options); 1835 } 1836 } 1837 } 1838 1839 // Unload. 1840 Drupal.Skinr.unload(); 1841 1842 for (var i in Drupal.settings.skinr['areas']) { 1843 if (Drupal.settings.skinr['areas'][i]['module'] == command.module && Drupal.settings.skinr['areas'][i]['sids'] == command.sids) { 1844 $('.skinr-id-' + Drupal.settings.skinr['areas'][i]['id']).removeClass(command.classes.remove).addClass(command.classes.add); 1845 if (command.nosave == undefined || command.nosave == false) { 1846 Drupal.settings.skinr['areas'][i]['classes'] = $('.skinr-id-' + Drupal.settings.skinr['areas'][i]['id']).attr('class'); 1847 } 1848 } 1849 } 1850 } 1851 1852 if (command.nosave == undefined || command.nosave == false) { 1853 // Update our snapshot of loaded files. 1854 Drupal.Skinr.freezeFiles(); 1855 } 1856 } 1857 1858 /** 1859 * Helper functions to keep track of loaded css and js files, and to 1860 * dynamically load and unload them. 1861 */ 1862 1863 Drupal.Skinr.freezeFiles = function () { 1864 Drupal.Skinr.loadedFilesSnapshot = jQuery.extend(true, {}, Drupal.Skinr.loadedFiles); 1865 } 1866 1867 Drupal.Skinr.unfreezeFiles = function () { 1868 var $diff = Drupal.Skinr.diffFiles(Drupal.Skinr.loadedFiles['css'], Drupal.Skinr.loadedFilesSnapshot['css']); 1869 for ($i in $diff) { 1870 Drupal.Skinr.unloadFile('css', $diff[$i].file, $diff[$i].media); 1871 } 1872 1873 var $diff = Drupal.Skinr.diffFiles(Drupal.Skinr.loadedFilesSnapshot['css'], Drupal.Skinr.loadedFiles['css']); 1874 for ($i in $diff) { 1875 Drupal.Skinr.loadFile('css', $diff[$i].file, $diff[$i].media); 1876 } 1877 } 1878 1879 Drupal.Skinr.diffFiles = function($a, $b) { 1880 var $diff = $.grep($a, function($el, $key) { 1881 for (var $i in $b) { 1882 var $obj = $b[$i]; 1883 if ($el.file == $obj.file && $el.media == $obj.media) { 1884 return false; 1885 } 1886 } 1887 return true; 1888 }); 1889 return $diff; 1890 } 1891 1892 Drupal.Skinr.registerFile = function($type, $file, $media) { 1893 if (this.initialized == undefined) { 1894 this.initialized = true; 1895 $el = $('link[rel*=style]').each(function() { 1896 Drupal.Skinr.registerFile('css', $(this).attr('href'), $(this).attr('media')); 1897 }); 1898 $el = $('script[type*=javascript][src]').each(function() { 1899 Drupal.Skinr.registerFile('js', $(this).attr('src')); 1900 }); 1901 } 1902 1903 if (!$file) { 1904 return false; 1905 } 1906 1907 if ($.inArray({ file: $file, media: $media }, Drupal.Skinr.loadedFiles[$type]) < 0) { 1908 Drupal.Skinr.loadedFiles[$type][Drupal.Skinr.loadedFiles[$type].length] = { file: $file, media: $media }; 1909 return true; 1910 } 1911 return false; 1912 } 1913 1914 Drupal.Skinr.unregisterFile = function($type, $file) { 1915 for (var $key in Drupal.Skinr.loadedFiles[$type]) { 1916 if (Drupal.Skinr.loadedFiles[$type][$key].file == $file) { 1917 Drupal.Skinr.loadedFiles[$type].splice($key, 1); 1918 return true; 1919 } 1920 } 1921 return false; 1922 } 1923 1924 Drupal.Skinr.loadFile = function($type, $file, $media) { 1925 if (Drupal.Skinr.registerFile($type, $file, $media)) { 1926 if ($type == 'css') { 1927 $el = $('link[rel*=style][href=' + $file + ']'); 1928 if ($el.get() == '') { 1929 $('<link />').attr({ 1930 href: $file, 1931 media: $media, 1932 rel: 'stylesheet', 1933 type: 'text/css' 1934 }).appendTo('head'); 1935 } 1936 } 1937 else if ($type == 'js') { 1938 try { 1939 $.getScript($file, function($data) { 1940 // This might be a bit excessive to run on every script load, 1941 // but the scripts load asynchronously. 1942 Drupal.attachBehaviors(); 1943 }); 1944 } 1945 catch (err) { 1946 Drupal.Skinr.unregisterFile($type, $file); 1947 } 1948 } 1949 return true; 1950 } 1951 return false; 1952 } 1953 1954 Drupal.Skinr.unloadFile = function($type, $file) { 1955 if (Drupal.Skinr.unregisterFile($type, $file)) { 1956 if ($type == 'css') { 1957 $el = $('link[rel*=style][href=' + $file + ']'); 1958 if ($el.get() != '') { 1959 $el.disabled = true; 1960 $el.remove(); 1961 } 1962 return true; 1963 } 1964 // Can't unload js files! 1965 } 1966 return false; 1967 } 1968 1969 })(jQuery); 1970 ; 1971 $(function() 1972 { 1973 $("table tr").hover( 1974 function() 1975 { 1976 $(this).addClass("highlight"); 1977 }, 1978 function() 1979 { 1980 $(this).removeClass("highlight"); 1981 } 1982 ) 1983 } 1984 ) 1985 1986 $(document).ready(function() { 1987 $('body.admin-build-modules tr:has(:checkbox:disabled)').addClass('module-disabled'); 1988 1989 $("a[rel=external]").click(function() { 1990 this.target = "_blank"; 1991 }); 1992 1993 $(".description").parent().each(function(){ 1994 $(this).children('label').each(function(){ 1995 $(this).removeClass("option"); 1996 $(this).addClass("label-help"); 1997 }); 1998 }); 1999 2000 }); 2001 ; 2002 $(document).ready(function() { 2003 2004 // Expand Panel 2005 $("#open").click(function(){ 2006 $("div#panel").slideDown("slow"); 2007 2008 }); 2009 2010 // Collapse Panel 2011 $("#close").click(function(){ 2012 $("div#panel").slideUp("slow"); 2013 }); 2014 2015 // Switch buttons from "Log In | Register" to "Close Panel" on click 2016 $("#toggle a").click(function () { 2017 $("#toggle a").toggle(); 2018 }); 2019 2020 });; 2021 // $Id $ 2022 2023 /** 2024 * Cookie plugin 2025 * 2026 * Copyright (c) 2006 Klaus Hartl (stilbuero.de) 2027 * Dual licensed under the MIT and GPL licenses: 2028 * http://www.opensource.org/licenses/mit-license.php 2029 * http://www.gnu.org/licenses/gpl.html 2030 * 2031 */ 2032 2033 /** 2034 * Create a cookie with the given name and value and other optional parameters. 2035 * 2036 * @example $.cookie('the_cookie', 'the_value'); 2037 * @desc Set the value of a cookie. 2038 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); 2039 * @desc Create a cookie with all available options. 2040 * @example $.cookie('the_cookie', 'the_value'); 2041 * @desc Create a session cookie. 2042 * @example $.cookie('the_cookie', null); 2043 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain 2044 * used when the cookie was set. 2045 * 2046 * @param String name The name of the cookie. 2047 * @param String value The value of the cookie. 2048 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. 2049 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. 2050 * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. 2051 * If set to null or omitted, the cookie will be a session cookie and will not be retained 2052 * when the the browser exits. 2053 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). 2054 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). 2055 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will 2056 * require a secure protocol (like HTTPS). 2057 * @type undefined 2058 * 2059 * @name $.cookie 2060 * @cat Plugins/Cookie 2061 * @author Klaus Hartl/klaus.hartl@stilbuero.de 2062 */ 2063 2064 /** 2065 * Get the value of a cookie with the given name. 2066 * 2067 * @example $.cookie('the_cookie'); 2068 * @desc Get the value of a cookie. 2069 * 2070 * @param String name The name of the cookie. 2071 * @return The value of the cookie. 2072 * @type String 2073 * 2074 * @name $.cookie 2075 * @cat Plugins/Cookie 2076 * @author Klaus Hartl/klaus.hartl@stilbuero.de 2077 */ 2078 jQuery.cookie = function(name, value, options) { 2079 if (typeof value != 'undefined') { // name and value given, set cookie 2080 options = options || {}; 2081 if (value === null) { 2082 value = ''; 2083 options.expires = -1; 2084 } 2085 var expires = ''; 2086 if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) { 2087 var date; 2088 if (typeof options.expires == 'number') { 2089 date = new Date(); 2090 date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000)); 2091 } else { 2092 date = options.expires; 2093 } 2094 expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE 2095 } 2096 // CAUTION: Needed to parenthesize options.path and options.domain 2097 // in the following expressions, otherwise they evaluate to undefined 2098 // in the packed version for some reason... 2099 var path = options.path ? '; path=' + (options.path) : ''; 2100 var domain = options.domain ? '; domain=' + (options.domain) : ''; 2101 var secure = options.secure ? '; secure' : ''; 2102 document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join(''); 2103 } else { // only name given, get cookie 2104 var cookieValue = null; 2105 if (document.cookie && document.cookie != '') { 2106 var cookies = document.cookie.split(';'); 2107 for (var i = 0; i < cookies.length; i++) { 2108 var cookie = jQuery.trim(cookies[i]); 2109 // Does this cookie string begin with the name we want? 2110 if (cookie.substring(0, name.length + 1) == (name + '=')) { 2111 cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); 2112 break; 2113 } 2114 } 2115 } 2116 return cookieValue; 2117 } 2118 };; 2119 // $Id $ 2120 2121 if (Drupal.jsEnabled) { 2122 $(document).ready(function() { 2123 // Which div or page element are we resizing? 2124 if (text_resize_scope) { // Admin-specified scope takes precedence. 2125 if ($('#'+text_resize_scope).length > 0) { 2126 var element_to_resize = $('#'+text_resize_scope); // ID specified by admin 2127 } 2128 else if ($('.'+text_resize_scope).length > 0) { 2129 var element_to_resize = $('.'+text_resize_scope); // CLASS specified by admin 2130 } 2131 else { 2132 var element_to_resize = $(text_resize_scope); // It's just a tag specified by admin 2133 } 2134 } 2135 else { // Look for some default scopes that might exist. 2136 if ($('DIV.left-corner').length > 0) { 2137 var element_to_resize = $('DIV.left-corner'); // Main body div for Garland 2138 } 2139 else if ($('#content-inner').length > 0) { 2140 var element_to_resize = $('#content-inner'); // Main body div for Zen-based themes 2141 } 2142 else if ($('#squeeze > #content').length > 0) { 2143 var element_to_resize = $('#squeeze > #content'); // Main body div for Zen Classic 2144 } 2145 } 2146 // Set the initial font size if necessary 2147 if ($.cookie('text_resize') != null) { 2148 element_to_resize.css('font-size', parseFloat($.cookie('text_resize')) + 'px'); 2149 //alert( "Should be size: " + $.cookie('text_resize')); 2150 } 2151 else { 2152 //alert('Couldn\'t find text_resize cookie.'); 2153 } 2154 if (text_resize_line_height_allow) { 2155 //alert('line height adjustment allowed! The current line-height is '+parseFloat(element_to_resize.css('line-height'), 10)); 2156 // Set the initial line height if necessary 2157 if ($.cookie('text_resize_line_height') != null) { 2158 element_to_resize.css('line-height', parseFloat($.cookie('text_resize_line_height')) + 'px'); 2159 } 2160 } 2161 // Changer links will change the text size when clicked 2162 $('a.changer').click(function() { 2163 // Set the current font size of the specified section as a variable 2164 var currentFontSize = parseFloat(element_to_resize.css('font-size'), 10); 2165 //alert('currentFontSize = '+currentFontSize); 2166 // Set the current line-height 2167 var current_line_height = parseFloat(element_to_resize.css('line-height'), 10); 2168 //alert('current_line_height = '+current_line_height); 2169 // javascript lets us choose which link was clicked, by ID 2170 if (this.id == 'text_resize_increase') { 2171 var new_font_size = currentFontSize * 1.2; 2172 if (text_resize_line_height_allow) { var new_line_height = current_line_height * 1.2; } 2173 // Allow resizing as long as font size doesn't go above text_resize_maximum. 2174 if (new_font_size <= text_resize_maximum) { 2175 $.cookie('text_resize', new_font_size, { path: '/' }); 2176 if (text_resize_line_height_allow) { $.cookie('text_resize_line_height', new_line_height, { path: '/' }); } 2177 var allow_change = true; 2178 } 2179 else { 2180 $.cookie('text_resize', text_resize_maximum, { path: '/' }); 2181 if (text_resize_line_height_allow) { $.cookie('text_resize_line_height', text_resize_line_height_max, { path: '/' }); } 2182 var reset_size_max = true; 2183 } 2184 } 2185 else if (this.id == 'text_resize_decrease') { 2186 var new_font_size = currentFontSize * 0.8; 2187 if (text_resize_line_height_allow) { var new_line_height = current_line_height * 0.8; } 2188 if (new_font_size >= text_resize_minimum) { 2189 // Allow resizing as long as font size doesn't go below text_resize_minimum. 2190 $.cookie('text_resize', new_font_size, { path: '/' }); 2191 if (text_resize_line_height_allow) { $.cookie('text_resize_line_height', new_line_height, { path: '/' }); } 2192 var allow_change = true; 2193 } 2194 else { 2195 // If it goes below text_resize_minimum, just leave it at text_resize_minimum. 2196 $.cookie('text_resize', text_resize_minimum, { path: '/' }); 2197 if (text_resize_line_height_allow) { $.cookie('text_resize_line_height', text_resize_line_height_min, { path: '/' }); } 2198 var reset_size_min = true; 2199 } 2200 } 2201 else if (this.id == 'text_resize_reset') { 2202 $.cookie('text_resize', text_resize_minimum, { path: '/' }); 2203 if (text_resize_line_height_allow) { $.cookie('text_resize_line_height', text_resize_line_height_min, { path: '/' }); } 2204 var reset_size_min = true; 2205 } 2206 // jQuery lets us set the font size value of the main text div 2207 if (allow_change == true) { 2208 element_to_resize.css('font-size', new_font_size + 'px'); // Add 'px' onto the end, otherwise ems are used as units by default 2209 if (text_resize_line_height_allow) { element_to_resize.css('line-height', new_line_height + 'px'); } 2210 return false; 2211 } 2212 else if (reset_size_min == true) { 2213 element_to_resize.css('font-size', text_resize_minimum + 'px'); 2214 if (text_resize_line_height_allow) { element_to_resize.css('line-height', text_resize_line_height_min + 'px'); } 2215 return false; 2216 } 2217 else if (reset_size_max == true) { 2218 element_to_resize.css('font-size', text_resize_maximum + 'px'); 2219 if (text_resize_line_height_allow) { element_to_resize.css('line-height', text_resize_line_height_max + 'px'); } 2220 return false; 2221 } 2222 }); 2223 }); 2224 } 2225 // My random jquery 2226 if (Drupal.jsEnabled) { 2227 $(document).ready(function() { 2228 if (jQuery().equalHeights) { 2229 $("div.sidebar-first-inner div.sidebar-last-inner").equalHeights(); 2230 } 2231 }); 2232 } 2233 ;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |