Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

merged changes from the 0.4.1 release in my sandbox

git-svn-id: https://dev.teemow.com/svn/jamal/code/branches/sandboxes/teemow@67 794715e2-6a1e-0410-9566-dec274c41937
  • Loading branch information...
commit 3aeae45e07964b7ebf831af67623c6425c1706ee 1 parent ba947f3
Timo Derstappen authored
6  build/build.xml
@@ -58,7 +58,7 @@
58 58
         </java>
59 59
     </target>
60 60
 
61  
-    <target name="test" depends="pack" description="">
  61
+<!--    <target name="test" depends="pack" description="">
62 62
         <copy todir="${TEST_DIR}">
63 63
             <fileset dir="test/" />
64 64
         </copy>
@@ -85,8 +85,8 @@
85 85
     <target name="test_success" depends="test" unless="HAS_ERRORS">
86 86
         <echo message="Success!" />
87 87
     </target>
88  
-    
89  
-    <target name="demo" depends="test_abort,test_success" description="">
  88
+-->    
  89
+    <target name="demo" depends="pack" description="">
90 90
         <echo message="Building demo application..." />
91 91
         <copy todir="${DEMO_DIR}">
92 92
             <fileset dir="demo/" />
2  build/demo/js/controllers/foos_controller.js
@@ -31,8 +31,6 @@
31 31
  *
32 32
  */
33 33
 $j.c({Foos: {
34  
-    name: 'FoosController',
35  
-    
36 34
     /**
37 35
      * Foo index
38 36
      */
22  build/demo/js/jquery.js
... ...
@@ -1,11 +1,19 @@
1 1
 /*
2  
- * jQuery @VERSION - New Wave Javascript
  2
+ * jQuery JavaScript Library v1.3
  3
+ * http://jquery.com/
3 4
  *
4  
- * Copyright (c) 2007 John Resig (jquery.com)
5  
- * Dual licensed under the MIT (MIT-LICENSE.txt)
6  
- * and GPL (GPL-LICENSE.txt) licenses.
  5
+ * Copyright (c) 2009 John Resig
  6
+ * Dual licensed under the MIT and GPL licenses.
  7
+ * http://docs.jquery.com/License
7 8
  *
8  
- * $Date$
9  
- * $Rev$
  9
+ * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009)
  10
+ * Revision: 6104
10 11
  */
11  
-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}('7(1g 15.6=="J"){15.J=15.J;u 6=q(a,c){7(15==9||!9.3X)v 14 6(a,c);v 9.3X(a,c)};7(1g $!="J")6.1R$=$;u $=6;6.Y=6.8s={3X:q(a,c){a=a||P;7(6.17(a))v 14 6(P)[6.Y.1D?"1D":"1X"](a);7(1g a=="1v"){u m=/^[^<]*(<(.|\\s)+>)[^>]*$/.1W(a);7(m)a=6.35([m[1]]);B v 14 6(c).1I(a)}v 9.5k(a.16==2a&&a||(a.3C||a.C&&a!=15&&!a.1r&&a[0]!=J&&a[0].1r)&&6.2O(a)||[a])},3C:"@81",7R:q(){v 9.C},C:0,1L:q(a){v a==J?6.2O(9):9[a]},20:q(a){u b=6(a);b.5n=9;v b},5k:q(a){9.C=0;[].Q.O(9,a);v 9},F:q(a,b){v 6.F(9,a,b)},2q:q(a){u b=-1;9.F(q(i){7(9==a)b=i});v b},1c:q(f,d,e){u c=f;7(f.16==32)7(d==J)v 9.C&&6[e||"1c"](9[0],f)||J;B{c={};c[f]=d}v 9.F(q(a){E(u b V c)6.1c(e?9.U:9,b,6.4N(9,c[b],e,a,b))})},19:q(b,a){v 9.1c(b,a,"2I")},2H:q(e){7(1g e=="1v")v 9.3p().3l(P.68(e));u t="";6.F(e||9,q(){6.F(9.2U,q(){7(9.1r!=8)t+=9.1r!=1?9.5Q:6.Y.2H([9])})});v t},8a:q(){u a,1T=1d;v 9.F(q(){7(!a)a=6.35(1T,9.2Q);u b=a[0].3q(K);9.L.2N(b,9);1t(b.1f)b=b.1f;b.4e(9)})},3l:q(){v 9.2G(1d,K,1,q(a){9.4e(a)})},5u:q(){v 9.2G(1d,K,-1,q(a){9.2N(a,9.1f)})},5s:q(){v 9.2G(1d,N,1,q(a){9.L.2N(a,9)})},5r:q(){v 9.2G(1d,N,-1,q(a){9.L.2N(a,9.1U)})},2E:q(){v 9.5n||6([])},1I:q(t){u b=6.3f(9,q(a){v 6.1I(t,a)});v 9.20(/[^+>] [^+>]/.18(t)||t.I("..")>-1?6.5e(b):b)},7s:q(e){u d=9.1A(9.1I("*"));d.F(q(){9.1R$1e={};E(u a V 9.$1e)9.1R$1e[a]=6.1a({},9.$1e[a])}).3P();u r=9.20(6.3f(9,q(a){v a.3q(e!=J?e:K)}));d.F(q(){u b=9.1R$1e;E(u a V b)E(u c V b[a])6.S.1A(9,a,b[a][c],b[a][c].W);9.1R$1e=H});v r},1l:q(t){v 9.20(6.17(t)&&6.2A(9,q(b,a){v t.O(b,[a])})||6.2z(t,9))},50:q(t){v 9.20(t.16==32&&6.2z(t,9,K)||6.2A(9,q(a){v(t.16==2a||t.3C)?6.2u(a,t)<0:a!=t}))},1A:q(t){v 9.20(6.22(9.1L(),t.16==32?6(t).1L():t.C!=J&&(!t.R||t.R=="6Q")?t:[t]))},34:q(a){v a?6.2z(a,9).C>0:N},6J:q(a){v a==J?(9.C?9[0].2x:H):9.1c("2x",a)},3L:q(a){v a==J?(9.C?9[0].27:H):9.3p().3l(a)},2G:q(f,d,g,e){u c=9.C>1,a;v 9.F(q(){7(!a){a=6.35(f,9.2Q);7(g<0)a.6y()}u b=9;7(d&&6.R(9,"1s")&&6.R(a[0],"39"))b=9.3R("1y")[0]||9.4e(P.5h("1y"));6.F(a,q(){e.O(b,[c?9.3q(K):9])})})}};6.1a=6.Y.1a=q(){u c=1d[0],a=1;7(1d.C==1){c=9;a=0}u b;1t((b=1d[a++])!=H)E(u i V b)c[i]=b[i];v c};6.1a({6o:q(){7(6.1R$)$=6.1R$;v 6},17:q(a){v!!a&&1g a!="1v"&&!a.R&&a.16!=2a&&/q/i.18(a+"")},48:q(a){v a.4B&&a.2Q&&!a.2Q.4z},R:q(b,a){v b.R&&b.R.1B()==a.1B()},F:q(a,b,c){7(a.C==J)E(u i V a)b.O(a[i],c||[i,a[i]]);B E(u i=0,5y=a.C;i<5y;i++)7(b.O(a[i],c||[i,a[i]])===N)1G;v a},4N:q(c,b,d,e,a){7(6.17(b))b=b.4i(c,[e]);u f=/z-?2q|5Y-?8r|1b|5S|8g-?1u/i;v b&&b.16==3A&&d=="2I"&&!f.18(a)?b+"4q":b},12:{1A:q(b,c){6.F(c.2S(/\\s+/),q(i,a){7(!6.12.3u(b.12,a))b.12+=(b.12?" ":"")+a})},1E:q(b,c){b.12=c!=J?6.2A(b.12.2S(/\\s+/),q(a){v!6.12.3u(c,a)}).5J(" "):""},3u:q(t,c){v 6.2u(c,(t.12||t).3s().2S(/\\s+/))>-1}},4o:q(e,o,f){E(u i V o){e.U["2P"+i]=e.U[i];e.U[i]=o[i]}f.O(e,[]);E(u i V o)e.U[i]=e.U["2P"+i]},19:q(e,p){7(p=="1u"||p=="2i"){u b={},3o,3n,d=["80","7X","7W","7U"];6.F(d,q(){b["7Q"+9]=0;b["7P"+9+"7O"]=0});6.4o(e,b,q(){7(6(e).34(\':4d\')){3o=e.7M;3n=e.7L}B{e=6(e.3q(K)).1I(":3Y").5t("2J").2E().19({46:"1z",3d:"7H",T:"2f",7E:"0",7B:"0"}).5l(e.L)[0];u a=6.19(e.L,"3d")||"3g";7(a=="3g")e.L.U.3d="7A";3o=e.7x;3n=e.7w;7(a=="3g")e.L.U.3d="3g";e.L.3w(e)}});v p=="1u"?3o:3n}v 6.2I(e,p)},2I:q(e,a,d){u g;7(a=="1b"&&6.M.1h){g=6.1c(e.U,"1b");v g==""?"1":g}7(a.3t(/3v/i))a=6.23;7(!d&&e.U[a])g=e.U[a];B 7(P.3B&&P.3B.3U){7(a.3t(/3v/i))a="3v";a=a.1o(/([A-Z])/g,"-$1").2p();u b=P.3B.3U(e,H);7(b)g=b.55(a);B 7(a=="T")g="1H";B 6.4o(e,{T:"2f"},q(){u c=P.3B.3U(9,"");g=c&&c.55(a)||""})}B 7(e.3O){u f=a.1o(/\\-(\\w)/g,q(m,c){v c.1B()});g=e.3O[a]||e.3O[f]}v g},35:q(a,c){u r=[];c=c||P;6.F(a,q(i,b){7(!b)v;7(b.16==3A)b=b.3s();7(1g b=="1v"){u s=6.2D(b).2p(),1w=c.5h("1w"),1P=[];u a=!s.I("<1M")&&[1,"<2C>","</2C>"]||!s.I("<7c")&&[1,"<51>","</51>"]||(!s.I("<78")||!s.I("<1y")||!s.I("<76")||!s.I("<75"))&&[1,"<1s>","</1s>"]||!s.I("<39")&&[2,"<1s><1y>","</1y></1s>"]||(!s.I("<72")||!s.I("<71"))&&[3,"<1s><1y><39>","</39></1y></1s>"]||!s.I("<6Z")&&[2,"<1s><4W>","</4W></1s>"]||[0,"",""];1w.27=a[1]+b+a[2];1t(a[0]--)1w=1w.1f;7(6.M.1h){7(!s.I("<1s")&&s.I("<1y")<0)1P=1w.1f&&1w.1f.2U;B 7(a[1]=="<1s>"&&s.I("<1y")<0)1P=1w.2U;E(u n=1P.C-1;n>=0;--n)7(6.R(1P[n],"1y")&&!1P[n].2U.C)1P[n].L.3w(1P[n])}b=6.2O(1w.2U)}7(0===b.C&&(!6.R(b,"2X")&&!6.R(b,"2C")))v;7(b[0]==J||6.R(b,"2X")||b.6R)r.Q(b);B r=6.22(r,b)});v r},1c:q(c,d,a){u e=6.48(c)?{}:6.3I;7(e[d]){7(a!=J)c[e[d]]=a;v c[e[d]]}B 7(a==J&&6.M.1h&&6.R(c,"2X")&&(d=="6P"||d=="6N"))v c.6M(d).5Q;B 7(c.4B){7(a!=J)c.6K(d,a);7(6.M.1h&&/4V|2t/.18(d)&&!6.48(c))v c.30(d,2);v c.30(d)}B{7(d=="1b"&&6.M.1h){7(a!=J){c.5S=1;c.1l=(c.1l||"").1o(/4Q\\([^)]*\\)/,"")+(2Y(a).3s()=="6F"?"":"4Q(1b="+a*4P+")")}v c.1l?(2Y(c.1l.3t(/1b=([^)]*)/)[1])/4P).3s():""}d=d.1o(/-([a-z])/6C,q(z,b){v b.1B()});7(a!=J)c[d]=a;v c[d]}},2D:q(t){v t.1o(/^\\s+|\\s+$/g,"")},2O:q(a){u r=[];7(1g a!="6B")E(u i=0,2c=a.C;i<2c;i++)r.Q(a[i]);B r=a.4M(0);v r},2u:q(b,a){E(u i=0,2c=a.C;i<2c;i++)7(a[i]==b)v i;v-1},22:q(a,b){E(u i=0;b[i];i++)a.Q(b[i]);v a},5e:q(a){u r=[],42=6.1i++;E(u i=0,4K=a.C;i<4K;i++)7(42!=a[i].1i){a[i].1i=42;r.Q(a[i])}v r},1i:0,2A:q(c,b,d){7(1g b=="1v")b=14 3F("a","i","v "+b);u a=[];E(u i=0,2W=c.C;i<2W;i++)7(!d&&b(c[i],i)||d&&!b(c[i],i))a.Q(c[i]);v a},3f:q(c,b){7(1g b=="1v")b=14 3F("a","v "+b);u d=[];E(u i=0,2W=c.C;i<2W;i++){u a=b(c[i],i);7(a!==H&&a!=J){7(a.16!=2a)a=[a];d=d.6v(a)}}v d}});14 q(){u b=6u.6t.2p();6.M={4D:(b.3t(/.+(?:6s|6p|6n|6l)[\\/: ]([\\d.]+)/)||[])[1],1Z:/5p/.18(b),2o:/2o/.18(b),1h:/1h/.18(b)&&!/2o/.18(b),2V:/2V/.18(b)&&!/(6i|5p)/.18(b)};6.6h=!6.M.1h||P.6e=="6c";6.23=6.M.1h?"23":"5D",6.3I={"E":"69","67":"12","3v":6.23,5D:6.23,23:6.23,27:"27",12:"12",2x:"2x",2M:"2M",2J:"2J",63:"61",2T:"2T",5Z:"5X"}};6.F({4v:"a.L",4u:"6.4u(a)",8p:"6.24(a,2,\'1U\')",8k:"6.24(a,2,\'4t\')",8h:"6.4s(a.L.1f,a)",8e:"6.4s(a.1f)"},q(i,n){6.Y[i]=q(a){u b=6.3f(9,n);7(a&&1g a=="1v")b=6.2z(a,b);v 9.20(b)}});6.F({5l:"3l",8d:"5u",2N:"5s",8c:"5r"},q(i,n){6.Y[i]=q(){u a=1d;v 9.F(q(){E(u j=0,2c=a.C;j<2c;j++)6(a[j])[n](9)})}});6.F({5t:q(a){6.1c(9,a,"");9.8b(a)},89:q(c){6.12.1A(9,c)},88:q(c){6.12.1E(9,c)},87:q(c){6.12[6.12.3u(9,c)?"1E":"1A"](9,c)},1E:q(a){7(!a||6.1l(a,[9]).r.C)9.L.3w(9)},3p:q(){1t(9.1f)9.3w(9.1f)}},q(i,n){6.Y[i]=q(){v 9.F(n,1d)}});6.F(["5N","5M","5L","5K"],q(i,n){6.Y[n]=q(a,b){v 9.1l(":"+n+"("+a+")",b)}});6.F(["1u","2i"],q(i,n){6.Y[n]=q(h){v h==J?(9.C?6.19(9[0],n):H):9.19(n,h.16==32?h:h+"4q")}});6.1a({4p:{"":"m[2]==\'*\'||6.R(a,m[2])","#":"a.30(\'2l\')==m[2]",":":{5M:"i<m[3]-0",5L:"i>m[3]-0",24:"m[3]-0==i",5N:"m[3]-0==i",2R:"i==0",2r:"i==r.C-1",5H:"i%2==0",5G:"i%2","2R-3r":"a.L.3R(\'*\')[0]==a","2r-3r":"6.24(a.L.5F,1,\'4t\')==a","85-3r":"!6.24(a.L.5F,2,\'4t\')",4v:"a.1f",3p:"!a.1f",5K:"(a.5E||a.84||\'\').I(m[3])>=0",4d:\'"1z"!=a.G&&6.19(a,"T")!="1H"&&6.19(a,"46")!="1z"\',1z:\'"1z"==a.G||6.19(a,"T")=="1H"||6.19(a,"46")=="1z"\',82:"!a.2M",2M:"a.2M",2J:"a.2J",2T:"a.2T||6.1c(a,\'2T\')",2H:"\'2H\'==a.G",3Y:"\'3Y\'==a.G",5C:"\'5C\'==a.G",4n:"\'4n\'==a.G",5B:"\'5B\'==a.G",4l:"\'4l\'==a.G",5A:"\'5A\'==a.G",5z:"\'5z\'==a.G",1J:\'"1J"==a.G||6.R(a,"1J")\',5x:"/5x|2C|7Y|1J/i.18(a.R)"},"[":"6.1I(m[2],a).C"},5w:[/^\\[ *(@)([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,14 3m("^([:.#]*)("+(6.2y=6.M.1Z&&6.M.4D<"3.0.0"?"\\\\w":"(?:[\\\\w\\7T-\\7S*1R-]|\\\\\\\\.)")+"+)")],2z:q(a,c,b){u d,1Q=[];1t(a&&a!=d){d=a;u f=6.1l(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1Q=b?c=f.r:6.22(1Q,f.r)}v 1Q},1I:q(t,l){7(1g t!="1v")v[t];7(l&&!l.1r)l=H;l=l||P;7(!t.I("//")){l=l.4f;t=t.2L(2,t.C)}B 7(!t.I("/")&&!l.2Q){l=l.4f;t=t.2L(1,t.C);7(t.I("/")>=1)t=t.2L(t.I("/"),t.C)}u b=[l],2m=[],2r;1t(t&&2r!=t){u r=[];2r=t;t=6.2D(t).1o(/^\\/\\//,"");u k=N;u g=14 3m("^[/>]\\\\s*("+6.2y+"+)");u m=g.1W(t);7(m){u o=m[1].1B();E(u i=0;b[i];i++)E(u c=b[i].1f;c;c=c.1U)7(c.1r==1&&(o=="*"||c.R.1B()==o.1B()))r.Q(c);b=r;t=t.1o(g,"");7(t.I(" ")==0)7N;k=K}B{g=/^((\\/?\\.\\.)|([>\\/+~]))\\s*([a-z]*)/i;7((m=g.1W(t))!=H){r=[];u o=m[4],1i=6.1i++;m=m[1];E(u j=0,2e=b.C;j<2e;j++)7(m.I("..")<0){u n=m=="~"||m=="+"?b[j].1U:b[j].1f;E(;n;n=n.1U)7(n.1r==1){7(m=="~"&&n.1i==1i)1G;7(!o||n.R.1B()==o.1B()){7(m=="~")n.1i=1i;r.Q(n)}7(m=="+")1G}}B r.Q(b[j].L);b=r;t=6.2D(t.1o(g,""));k=K}}7(t&&!k){7(!t.I(",")){7(l==b[0])b.4c();2m=6.22(2m,b);r=b=[l];t=" "+t.2L(1,t.C)}B{u h=14 3m("^("+6.2y+"+)(#)("+6.2y+"+)");u m=h.1W(t);7(m){m=[0,m[2],m[3],m[1]]}B{h=14 3m("^([#.]?)("+6.2y+"*)");m=h.1W(t)}m[2]=m[2].1o(/\\\\/g,"");u f=b[b.C-1];7(m[1]=="#"&&f&&f.4b){u p=f.4b(m[2]);7((6.M.1h||6.M.2o)&&p&&1g p.2l=="1v"&&p.2l!=m[2])p=6(\'[@2l="\'+m[2]+\'"]\',f)[0];b=r=p&&(!m[3]||6.R(p,m[3]))?[p]:[]}B{E(u i=0;b[i];i++){u a=m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&b[i].R.2p()=="7K")a="2K";r=6.22(r,b[i].3R(a))}7(m[1]==".")r=6.3W(r,m[2]);7(m[1]=="#"){u e=[];E(u i=0;r[i];i++)7(r[i].30("2l")==m[2]){e=[r[i]];1G}r=e}b=r}t=t.1o(h,"")}}7(t){u d=6.1l(t,r);b=r=d.r;t=6.2D(d.t)}}7(t)b=[];7(b&&l==b[0])b.4c();2m=6.22(2m,b);v 2m},3W:q(r,m,a){m=" "+m+" ";u b=[];E(u i=0;r[i];i++){u c=(" "+r[i].12+" ").I(m)>=0;7(!a&&c||a&&!c)b.Q(r[i])}v b},1l:q(t,r,h){u d;1t(t&&t!=d){d=t;u p=6.5w,m;E(u i=0;p[i];i++){m=p[i].1W(t);7(m){t=t.7I(m[0].C);m[2]=m[2].1o(/\\\\/g,"");1G}}7(!m)1G;7(m[1]==":"&&m[2]=="50")r=6.1l(m[3],r,K).r;B 7(m[1]==".")r=6.3W(r,m[2],h);B 7(m[1]=="@"){u g=[],G=m[3];E(u i=0,2e=r.C;i<2e;i++){u a=r[i],z=a[6.3I[m[2]]||m[2]];7(z==H||/4V|2t/.18(m[2]))z=6.1c(a,m[2])||\'\';7((G==""&&!!z||G=="="&&z==m[5]||G=="!="&&z!=m[5]||G=="^="&&z&&!z.I(m[5])||G=="$="&&z.2L(z.C-m[5].C)==m[5]||(G=="*="||G=="~=")&&z.I(m[5])>=0)^h)g.Q(a)}r=g}B 7(m[1]==":"&&m[2]=="24-3r"){u e=6.1i++,g=[],18=/(\\d*)n\\+?(\\d*)/.1W(m[3]=="5H"&&"2n"||m[3]=="5G"&&"2n+1"||!/\\D/.18(m[3])&&"n+"+m[3]||m[3]),2R=(18[1]||1)-0,d=18[2]-0;E(u i=0,2e=r.C;i<2e;i++){u j=r[i],L=j.L;7(e!=L.1i){u c=1;E(u n=L.1f;n;n=n.1U)7(n.1r==1)n.47=c++;L.1i=e}u b=N;7(2R==1){7(d==0||j.47==d)b=K}B 7((j.47+d)%2R==0)b=K;7(b^h)g.Q(j)}r=g}B{u f=6.4p[m[1]];7(1g f!="1v")f=6.4p[m[1]][m[2]];45("f = q(a,i){v "+f+"}");r=6.2A(r,f,h)}}v{r:r,t:t}},4u:q(c){u b=[];u a=c.L;1t(a&&a!=P){b.Q(a);a=a.L}v b},24:q(a,e,c,b){e=e||1;u d=0;E(;a;a=a[c])7(a.1r==1&&++d==e)1G;v a},4s:q(n,a){u r=[];E(;n;n=n.1U){7(n.1r==1&&(!a||n!=a))r.Q(n)}v r}});6.S={1A:q(d,e,c,b){7(6.M.1h&&d.3e!=J)d=15;7(!c.1N)c.1N=9.1N++;7(b!=J){u f=c;c=q(){v f.O(9,1d)};c.W=b;c.1N=f.1N}7(!d.$1e)d.$1e={};7(!d.$1p)d.$1p=q(){u a;7(1g 6=="J"||6.S.44)v a;a=6.S.1p.O(d,1d);v a};u g=d.$1e[e];7(!g){g=d.$1e[e]={};7(d.43)d.43(e,d.$1p,N);B d.7F("5q"+e,d.$1p)}g[c.1N]=c;7(!9.11[e])9.11[e]=[];7(6.2u(d,9.11[e])==-1)9.11[e].Q(d)},1N:1,11:{},1E:q(b,c,a){u d=b.$1e,1Y,2q;7(d){7(c&&c.G){a=c.41;c=c.G}7(!c){E(c V d)9.1E(b,c)}B 7(d[c]){7(a)3i d[c][a.1N];B E(a V b.$1e[c])3i d[c][a];E(1Y V d[c])1G;7(!1Y){7(b.40)b.40(c,b.$1p,N);B b.7D("5q"+c,b.$1p);1Y=H;3i d[c];1t(9.11[c]&&((2q=6.2u(b,9.11[c]))>=0))3i 9.11[c][2q]}}E(1Y V d)1G;7(!1Y)b.$1p=b.$1e=H}},1q:q(c,b,d){b=6.2O(b||[]);7(!d)6.F(9.11[c]||[],q(){6.S.1q(c,b,9)});B{u a,1Y,Y=6.17(d[c]||H);b.5m(9.4a({G:c,1K:d}));7(6.17(d.$1p)&&(a=d.$1p.O(d,b))!==N)9.44=K;7(Y&&a!==N&&!6.R(d,\'a\'))d[c]();9.44=N}},1p:q(b){u a;b=6.S.4a(b||15.S||{});u c=9.$1e&&9.$1e[b.G],1T=[].4M.4i(1d,1);1T.5m(b);E(u j V c){1T[0].41=c[j];1T[0].W=c[j].W;7(c[j].O(9,1T)===N){b.2k();b.2B();a=N}}7(6.M.1h)b.1K=b.2k=b.2B=b.41=b.W=H;v a},4a:q(c){u a=c;c=6.1a({},a);c.2k=q(){7(a.2k)v a.2k();a.7z=N};c.2B=q(){7(a.2B)v a.2B();a.7y=K};7(!c.1K&&c.5j)c.1K=c.5j;7(6.M.1Z&&c.1K.1r==3)c.1K=a.1K.L;7(!c.4m&&c.4k)c.4m=c.4k==c.1K?c.7v:c.4k;7(c.5g==H&&c.5I!=H){u e=P.4f,b=P.4z;c.5g=c.5I+(e&&e.5f||b.5f);c.7u=c.7t+(e&&e.5d||b.5d)}7(!c.3b&&(c.5c||c.5b))c.3b=c.5c||c.5b;7(!c.5a&&c.59)c.5a=c.59;7(!c.3b&&c.1J)c.3b=(c.1J&1?1:(c.1J&2?3:(c.1J&4?2:0)));v c}};6.Y.1a({3z:q(c,a,b){v c=="3x"?9.3V(c,a,b):9.F(q(){6.S.1A(9,c,b||a,b&&a)})},3V:q(d,b,c){v 9.F(q(){6.S.1A(9,d,q(a){6(9).3P(a);v(c||b).O(9,1d)},c&&b)})},3P:q(a,b){v 9.F(q(){6.S.1E(9,a,b)})},1q:q(a,b){v 9.F(q(){6.S.1q(a,b,9)})},1O:q(){u a=1d;v 9.57(q(e){9.3T=0==9.3T?1:0;e.2k();v a[9.3T].O(9,[e])||N})},7r:q(f,g){q 3S(e){u p=e.4m;1t(p&&p!=9)25{p=p.L}2h(e){p=9};7(p==9)v N;v(e.G=="3Q"?f:g).O(9,[e])}v 9.3Q(3S).56(3S)},1D:q(f){7(6.3a)f.O(P,[6]);B 6.2F.Q(q(){v f.O(9,[6])});v 9}});6.1a({3a:N,2F:[],1D:q(){7(!6.3a){6.3a=K;7(6.2F){6.F(6.2F,q(){9.O(P)});6.2F=H}7(6.M.2V||6.M.2o)P.40("54",6.1D,N);7(!15.7q.C)6(15).1X(q(){6("#3D").1E()})}}});14 q(){6.F(("7p,7o,1X,7n,7m,3x,57,7l,"+"7k,7j,7i,3Q,56,7h,2C,"+"4l,7g,7f,7e,2d").2S(","),q(i,o){6.Y[o]=q(f){v f?9.3z(o,f):9.1q(o)}});7(6.M.2V||6.M.2o)P.43("54",6.1D,N);B 7(6.M.1h){P.7d("<7b"+"7a 2l=3D 79=K "+"2t=//:><\\/37>");u a=P.4b("3D");7(a)a.77=q(){7(9.36!="1n")v;6.1D()};a=H}B 7(6.M.1Z)6.3K=3e(q(){7(P.36=="74"||P.36=="1n"){3E(6.3K);6.3K=H;6.1D()}},10);6.S.1A(15,"1X",6.1D)};7(6.M.1h)6(15).3V("3x",q(){u a=6.S.11;E(u b V a){u c=a[b],i=c.C;7(i&&b!=\'3x\')73 c[i-1]&&6.S.1E(c[i-1],b);1t(--i)}});6.Y.1a({1k:q(b,a){v b?9.1x({1u:"1k",2i:"1k",1b:"1k"},b,a):9.1l(":1z").F(q(){9.U.T=9.2b?9.2b:"";7(6.19(9,"T")=="1H")9.U.T="2f"}).2E()},1m:q(b,a){v b?9.1x({1u:"1m",2i:"1m",1b:"1m"},b,a):9.1l(":4d").F(q(){9.2b=9.2b||6.19(9,"T");7(9.2b=="1H")9.2b="2f";9.U.T="1H"}).2E()},4Z:6.Y.1O,1O:q(a,b){v 6.17(a)&&6.17(b)?9.4Z(a,b):a?9.1x({1u:"1O",2i:"1O",1b:"1O"},a,b):9.F(q(){6(9)[6(9).34(":1z")?"1k":"1m"]()})},70:q(b,a){v 9.1x({1u:"1k"},b,a)},6Y:q(b,a){v 9.1x({1u:"1m"},b,a)},6V:q(b,a){v 9.1x({1u:"1O"},b,a)},6U:q(b,a){v 9.1x({1b:"1k"},b,a)},6T:q(b,a){v 9.1x({1b:"1m"},b,a)},6S:q(c,a,b){v 9.1x({1b:a},c,b)},1x:q(d,h,f,g){v 9.1j(q(){u c=6(9).34(":1z"),1M=6.4U(h,f,g),4T=9;E(u p V d){7(d[p]=="1m"&&c||d[p]=="1k"&&!c)v 6.17(1M.1n)&&1M.1n.O(9);7(p=="1u"||p=="2i"){1M.T=6.19(9,"T");1M.29=9.U.29}}7(1M.29!=H)9.U.29="1z";9.28=6.1a({},d);6.F(d,q(a,b){u e=14 6.2v(4T,1M,a);7(b.16==3A)e.31(e.1Q(),b);B e[b=="1O"?c?"1k":"1m":b](d)})})},1j:q(a,b){7(!b){b=a;a="2v"}v 9.F(q(){7(!9.1j)9.1j={};7(!9.1j[a])9.1j[a]=[];9.1j[a].Q(b);7(9.1j[a].C==1)b.O(9)})}});6.1a({4U:q(b,a,c){u d=b&&b.16==6O?b:{1n:c||!c&&a||6.17(b)&&b,1F:b,2w:c&&a||a&&a.16!=3F&&a||(6.2w.3H?"3H":"4S")};d.1F=(d.1F&&d.1F.16==3A?d.1F:{6L:6W,6X:4Y}[d.1F])||6I;d.2P=d.1n;d.1n=q(){6.4R(9,"2v");7(6.17(d.2P))d.2P.O(9)};v d},2w:{4S:q(p,n,b,a){v b+a*p},3H:q(p,n,b,a){v((-4X.6H(p*4X.6G)/2)+0.5)*a+b}},1j:{},4R:q(b,a){a=a||"2v";7(b.1j&&b.1j[a]){b.1j[a].4c();u f=b.1j[a][0];7(f)f.O(b)}},2Z:[],2v:q(f,e,g){u z=9;u y=f.U;z.a=q(){7(e.33)e.33.O(f,[z.2g]);7(g=="1b")6.1c(y,"1b",z.2g);B{y[g]=6E(z.2g)+"4q";y.T="2f"}};z.53=q(){v 2Y(6.19(f,g))};z.1Q=q(){u r=2Y(6.2I(f,g));v r&&r>-6D?r:z.53()};z.31=q(c,b){z.3J=(14 4O()).52();z.2g=c;z.a();6.2Z.Q(q(){v z.33(c,b)});7(6.2Z.C==1){u d=3e(q(){u a=6.2Z;E(u i=0;i<a.C;i++)7(!a[i]())a.6A(i--,1);7(!a.C)3E(d)},13)}};z.1k=q(){7(!f.1S)f.1S={};f.1S[g]=6.1c(f.U,g);e.1k=K;z.31(0,9.1Q());7(g!="1b")y[g]="6z";6(f).1k()};z.1m=q(){7(!f.1S)f.1S={};f.1S[g]=6.1c(f.U,g);e.1m=K;z.31(9.1Q(),0)};z.33=q(a,c){u t=(14 4O()).52();7(t>e.1F+z.3J){z.2g=c;z.a();7(f.28)f.28[g]=K;u b=K;E(u i V f.28)7(f.28[i]!==K)b=N;7(b){7(e.T!=H){y.29=e.29;y.T=e.T;7(6.19(f,"T")=="1H")y.T="2f"}7(e.1m)y.T="1H";7(e.1m||e.1k)E(u p V f.28)6.1c(y,p,f.1S[p])}7(b&&6.17(e.1n))e.1n.O(f);v N}B{u n=t-9.3J;u p=n/e.1F;z.2g=6.2w[e.2w](p,n,a,(c-a),e.1F);z.a()}v K}}});6.Y.1a({6x:q(c,b,a){9.1X(c,b,a,1)},1X:q(g,d,c,e){7(6.17(g))v 9.3z("1X",g);c=c||q(){};u f="3G";7(d)7(6.17(d)){c=d;d=H}B{d=6.2K(d);f="4L"}u h=9;6.3c({1C:g,G:f,W:d,2s:e,1n:q(a,b){7(b=="26"||!e&&b=="4J")h.1c("27",a.38).3M().F(c,[a.38,b,a]);B c.O(h,[a.38,b,a])}});v 9},6w:q(){v 6.2K(9)},3M:q(){v 9.1I("37").F(q(){7(9.2t)6.4I(9.2t);B 6.3N(9.2H||9.5E||9.27||"")}).2E()}});6.F("4H,4G,58,4F,4E,5o".2S(","),q(i,o){6.Y[o]=q(f){v 9.3z(o,f)}});6.1a({1L:q(e,c,a,d,b){7(6.17(c)){a=c;c=H}v 6.3c({G:"3G",1C:e,W:c,26:a,3Z:d,2s:b})},6r:q(d,b,a,c){v 6.1L(d,b,a,c,1)},4I:q(b,a){v 6.1L(b,H,a,"37")},6q:q(c,b,a){v 6.1L(c,b,a,"5i")},7C:q(d,b,a,c){7(6.17(b)){a=b;b={}}v 6.3c({G:"4L",1C:d,W:b,26:a,3Z:c})},6m:q(a){6.3h.1V=a},7G:q(a){6.1a(6.3h,a)},3h:{11:K,G:"3G",1V:0,4C:"6k/x-7J-2X-6j",4A:K,3j:K,W:H},3k:{},3c:q(s){s=6.1a({},6.3h,s);7(s.W){7(s.4A&&1g s.W!="1v")s.W=6.2K(s.W);7(s.G.2p()=="1L"){s.1C+=((s.1C.I("?")>-1)?"&":"?")+s.W;s.W=H}}7(s.11&&!6.49++)6.S.1q("4H");u f=N;u h=15.5v?14 5v("6g.6f"):14 4y();h.6d(s.G,s.1C,s.3j);7(s.W)h.4g("7V-6b",s.4C);7(s.2s)h.4g("6a-4h-7Z",6.3k[s.1C]||"66, 65 64 83 4j:4j:4j 62");h.4g("X-86-60","4y");7(s.4x)s.4x(h);7(s.11)6.S.1q("5o",[h,s]);u g=q(d){7(h&&(h.36==4||d=="1V")){f=K;7(i){3E(i);i=H}u c;25{c=6.4w(h)&&d!="1V"?s.2s&&6.5W(h,s.1C)?"4J":"26":"2d";7(c!="2d"){u b;25{b=h.4r("5P-4h")}2h(e){}7(s.2s&&b)6.3k[s.1C]=b;u a=6.5O(h,s.3Z);7(s.26)s.26(a,c);7(s.11)6.S.1q("4E",[h,s])}B 6.3y(s,h,c)}2h(e){c="2d";6.3y(s,h,c,e)}7(s.11)6.S.1q("58",[h,s]);7(s.11&&!--6.49)6.S.1q("4G");7(s.1n)s.1n(h,c);7(s.3j)h=H}};u i=3e(g,13);7(s.1V>0)5V(q(){7(h){h.8q();7(!f)g("1V")}},s.1V);25{h.8n(s.W)}2h(e){6.3y(s,h,H,e)}7(!s.3j)g();v h},3y:q(s,a,b,e){7(s.2d)s.2d(a,b,e);7(s.11)6.S.1q("4F",[a,s,e])},49:0,4w:q(r){25{v!r.21&&8m.8l=="4n:"||(r.21>=4Y&&r.21<8j)||r.21==5T||6.M.1Z&&r.21==J}2h(e){}v N},5W:q(a,c){25{u b=a.4r("5P-4h");v a.21==5T||b==6.3k[c]||6.M.1Z&&a.21==J}2h(e){}v N},5O:q(r,b){u c=r.4r("8i-G");u a=!b&&c&&c.I("5R")>=0;a=b=="5R"||a?r.8o:r.38;7(b=="37")6.3N(a);7(b=="5i")a=45("("+a+")");7(b=="3L")6("<1w>").3L(a).3M();v a},2K:q(a){u s=[];7(a.16==2a||a.3C)6.F(a,q(){s.Q(2j(9.8f)+"="+2j(9.2x))});B E(u j V a)7(a[j]&&a[j].16==2a)6.F(a[j],q(){s.Q(2j(j)+"="+2j(9))});B s.Q(2j(j)+"="+2j(a[j]));v s.5J("&")},3N:q(a){7(15.5U)15.5U(a);B 7(6.M.1Z)15.5V(a,0);B 45.4i(15,a)}})}',62,525,'||||||jQuery|if||this|||||||||||||||||function||||var|return||||||else|length||for|each|type|null|indexOf|undefined|true|parentNode|browser|false|apply|document|push|nodeName|event|display|style|in|data||fn|||global|className||new|window|constructor|isFunction|test|css|extend|opacity|attr|arguments|events|firstChild|typeof|msie|mergeNum|queue|show|filter|hide|complete|replace|handle|trigger|nodeType|table|while|height|string|div|animate|tbody|hidden|add|toUpperCase|url|ready|remove|duration|break|none|find|button|target|get|opt|guid|toggle|tb|cur|_|orig|args|nextSibling|timeout|exec|load|ret|safari|pushStack|status|merge|styleFloat|nth|try|success|innerHTML|curAnim|overflow|Array|oldblock|al|error|rl|block|now|catch|width|encodeURIComponent|preventDefault|id|done||opera|toLowerCase|index|last|ifModified|src|inArray|fx|easing|value|chars|multiFilter|grep|stopPropagation|select|trim|end|readyList|domManip|text|curCSS|checked|param|substr|disabled|insertBefore|makeArray|old|ownerDocument|first|split|selected|childNodes|mozilla|el|form|parseFloat|timers|getAttribute|custom|String|step|is|clean|readyState|script|responseText|tr|isReady|which|ajax|position|setInterval|map|static|ajaxSettings|delete|async|lastModified|append|RegExp|oWidth|oHeight|empty|cloneNode|child|toString|match|has|float|removeChild|unload|handleError|bind|Number|defaultView|jquery|__ie_init|clearInterval|Function|GET|swing|props|startTime|safariTimer|html|evalScripts|globalEval|currentStyle|unbind|mouseover|getElementsByTagName|handleHover|lastToggle|getComputedStyle|one|classFilter|init|radio|dataType|removeEventListener|handler|num|addEventListener|triggered|eval|visibility|nodeIndex|isXMLDoc|active|fix|getElementById|shift|visible|appendChild|documentElement|setRequestHeader|Modified|call|00|fromElement|submit|relatedTarget|file|swap|expr|px|getResponseHeader|sibling|previousSibling|parents|parent|httpSuccess|beforeSend|XMLHttpRequest|body|processData|tagName|contentType|version|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|getScript|notmodified|fl|POST|slice|prop|Date|100|alpha|dequeue|linear|self|speed|href|colgroup|Math|200|_toggle|not|fieldset|getTime|max|DOMContentLoaded|getPropertyValue|mouseout|click|ajaxComplete|ctrlKey|metaKey|keyCode|charCode|scrollTop|unique|scrollLeft|pageX|createElement|json|srcElement|setArray|appendTo|unshift|prevObject|ajaxSend|webkit|on|after|before|removeAttr|prepend|ActiveXObject|parse|input|ol|reset|image|password|checkbox|cssFloat|textContent|lastChild|odd|even|clientX|join|contains|gt|lt|eq|httpData|Last|nodeValue|xml|zoom|304|execScript|setTimeout|httpNotModified|maxLength|font|maxlength|With|readOnly|GMT|readonly|Jan|01|Thu|class|createTextNode|htmlFor|If|Type|CSS1Compat|open|compatMode|XMLHTTP|Microsoft|boxModel|compatible|urlencoded|application|ie|ajaxTimeout|ra|noConflict|it|getJSON|getIfModified|rv|userAgent|navigator|concat|serialize|loadIfModified|reverse|1px|splice|array|ig|10000|parseInt|NaN|PI|cos|400|val|setAttribute|slow|getAttributeNode|method|Object|action|FORM|options|fadeTo|fadeOut|fadeIn|slideToggle|600|fast|slideUp|col|slideDown|th|td|do|loaded|colg|tfoot|onreadystatechange|thead|defer|ipt|scr|leg|write|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|dblclick|scroll|resize|focus|blur|frames|hover|clone|clientY|pageY|toElement|clientWidth|clientHeight|cancelBubble|returnValue|relative|left|post|detachEvent|right|attachEvent|ajaxSetup|absolute|substring|www|object|offsetWidth|offsetHeight|continue|Width|border|padding|size|uFFFF|u0128|Left|Content|Right|Bottom|textarea|Since|Top|VERSION|enabled|1970|innerText|only|Requested|toggleClass|removeClass|addClass|wrap|removeAttribute|insertAfter|prependTo|children|name|line|siblings|content|300|prev|protocol|location|send|responseXML|next|abort|weight|prototype'.split('|'),0,{}))
  12
+(function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return !!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return !!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E<I;E++){var F=L[E];if(F.selected){J=n(F).val();if(G){return J}K.push(J)}}return K}return(D.value||"").replace(/\r/g,"")}return g}if(typeof J==="number"){J+=""}return this.each(function(){if(this.nodeType!=1){return}if(n.isArray(J)&&/radio|checkbox/.test(this.type)){this.checked=(n.inArray(this.value,J)>=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),G>0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return +new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G<H;G++){if((F=arguments[G])!=null){for(var E in F){var J=I[E],K=F[E];if(I===K){continue}if(D&&K&&typeof K==="object"&&!K.nodeType){I[E]=n.extend(D,J||(K.length!=null?[]:{}),K)}else{if(K!==g){I[E]=K}}}}}return I};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,p=document.defaultView||{},r=Object.prototype.toString;n.extend({noConflict:function(D){l.$=o;if(D){l.jQuery=x}return n},isFunction:function(D){return r.call(D)==="[object Function]"},isArray:function(D){return r.call(D)==="[object Array]"},isXMLDoc:function(D){return D.documentElement&&!D.body||D.tagName&&D.ownerDocument&&!D.ownerDocument.body},globalEval:function(F){F=n.trim(F);if(F){var E=document.getElementsByTagName("head")[0]||document.documentElement,D=document.createElement("script");D.type="text/javascript";if(n.support.scriptEval){D.appendChild(document.createTextNode(F))}else{D.text=F}E.insertBefore(D,E.firstChild);E.removeChild(D)}},nodeName:function(E,D){return E.nodeName&&E.nodeName.toUpperCase()==D.toUpperCase()},each:function(F,J,E){var D,G=0,H=F.length;if(E){if(H===g){for(D in F){if(J.apply(F[D],E)===false){break}}}else{for(;G<H;){if(J.apply(F[G++],E)===false){break}}}}else{if(H===g){for(D in F){if(J.call(F[D],D,F[D])===false){break}}}else{for(var I=F[0];G<H&&J.call(I,G,I)!==false;I=F[++G]){}}}return F},prop:function(G,H,F,E,D){if(n.isFunction(H)){H=H.call(G,E)}return typeof H==="number"&&F=="curCSS"&&!b.test(D)?H+"px":H},className:{add:function(D,E){n.each((E||"").split(/\s+/),function(F,G){if(D.nodeType==1&&!n.className.has(D.className,G)){D.className+=(D.className?" ":"")+G}})},remove:function(D,E){if(D.nodeType==1){D.className=E!==g?n.grep(D.className.split(/\s+/),function(F){return !n.className.has(E,F)}).join(" "):""}},has:function(E,D){return n.inArray(D,(E.className||E).toString().split(/\s+/))>-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+"></"+R+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!N.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!N.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!N.indexOf("<td")||!N.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!N.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!n.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf("<table")&&N.indexOf("<tbody")<0?K.firstChild&&K.firstChild.childNodes:P[1]=="<table>"&&N.indexOf("<tbody")<0?K.childNodes:[];for(var L=M.length-1;L>=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D<E;D++){if(G[D]===F){return D}}return -1},merge:function(G,D){var E=0,F,H=G.length;if(!n.support.getAll){while((F=D[E++])!=null){if(F.nodeType!=8){G[H++]=F}}}else{while((F=D[E++])!=null){G[H++]=F}}return G},unique:function(J){var E=[],D={};try{for(var F=0,G=J.length;F<G;F++){var I=n.data(J[F]);if(!D[I]){D[I]=true;E.push(J[F])}}}catch(H){E=J}return E},grep:function(E,I,D){var F=[];for(var G=0,H=E.length;G<H;G++){if(!D!=!I(E[G],G)){F.push(E[G])}}return F},map:function(D,I){var E=[];for(var F=0,G=D.length;F<G;F++){var H=I(D[F],F);if(H!=null){E[E.length]=H}}return E.concat.apply([],E)}});var B=navigator.userAgent.toLowerCase();n.browser={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)};n.each({parent:function(D){return D.parentNode},parents:function(D){return n.dir(D,"parentNode")},next:function(D){return n.nth(D,2,"nextSibling")},prev:function(D){return n.nth(D,2,"previousSibling")},nextAll:function(D){return n.dir(D,"nextSibling")},prevAll:function(D){return n.dir(D,"previousSibling")},siblings:function(D){return n.sibling(D.parentNode.firstChild,D)},children:function(D){return n.sibling(D.firstChild)},contents:function(D){return n.nodeName(D,"iframe")?D.contentDocument||D.contentWindow.document:n.makeArray(D.childNodes)}},function(D,E){n.fn[D]=function(F){var G=n.map(this,E);if(F&&typeof F=="string"){G=n.multiFilter(F,G)}return this.pushStack(n.unique(G),D,F)}});n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(D,E){n.fn[D]=function(){var F=arguments;return this.each(function(){for(var G=0,H=F.length;G<H;G++){n(F[G])[E](this)}})}});n.each({removeAttr:function(D){n.attr(this,D,"");if(this.nodeType==1){this.removeAttribute(D)}},addClass:function(D){n.className.add(this,D)},removeClass:function(D){n.className.remove(this,D)},toggleClass:function(E,D){if(typeof D!=="boolean"){D=!n.className.has(this,E)}n.className[D?"add":"remove"](this,E)},remove:function(D){if(!D||n.filter(D,[this]).length){n("*",this).add([this]).each(function(){n.event.remove(this);n.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){n(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}});
  13
+/*
  14
+ * Sizzle CSS Selector Engine - v0.9.1
  15
+ *  Copyright 2009, The Dojo Foundation
  16
+ *  Released under the MIT, BSD, and GPL Licenses.
  17
+ *  More information: http://sizzlejs.com/
  18
+ */
  19
+(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af<ad;af++){E(ae,Y[af],P)}Y=P}}}else{var ai=V?{expr:ab.pop(),set:D(V)}:E.find(ab.pop(),ab.length===1&&S.parentNode?S.parentNode:S);Y=E.filter(ai.expr,ai.set);if(ab.length>0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R<P;R++){var T=G.order[R],Q;if((Q=G.match[T].exec(V))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){Q[1]=(Q[1]||"").replace(/\\/g,"");W=G.find[T](Q,S);if(W!=null){V=V.replace(G.match[T],"");break}}}}if(!W){W=S.getElementsByTagName("*")}return{set:W,expr:V}};E.filter=function(S,ac,ad,T){var Q=S,Y=[],ah=ac,V,ab;while(S&&ac.length){for(var U in G.filter){if((V=G.match[U].exec(S))!=null){var Z=G.filter[U],R=null,X=0,aa,ag;ab=false;if(ah==Y){Y=[]}if(G.preFilter[U]){V=G.preFilter[U](V,ah,ad,Y,T);if(!V){ab=aa=true}else{if(V===true){continue}else{if(V[0]===true){R=[];var W=null,af;for(var ae=0;(af=ah[ae])!==g;ae++){if(af&&W!==af){R.push(af);W=af}}}}}}if(V){for(var ae=0;(ag=ah[ae])!==g;ae++){if(ag){if(R&&ag!=R[X]){X++}aa=Z(ag,V,X,R);var P=T^!!aa;if(ad&&aa!=null){if(P){ab=true}else{ah[ae]=false}}else{if(P){Y.push(ag);ab=true}}}}}if(aa!==g){if(!ad){ah=Y}S=S.replace(G.match[U],"");if(!ab){return[]}break}}}S=S.replace(/\s*,\s*/,"");if(S==Q){if(ab==null){throw"Syntax error, unrecognized expression: "+S}else{break}}Q=S}return ah};var G=E.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(P){return P.getAttribute("href")}},relative:{"+":function(T,Q){for(var R=0,P=T.length;R<P;R++){var S=T[R];if(S){var U=S.previousSibling;while(U&&U.nodeType!==1){U=U.previousSibling}T[R]=typeof Q==="string"?U||false:U===Q}}if(typeof Q==="string"){E.filter(Q,T,true)}},">":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){var S=T.parentNode;U[R]=S.nodeName===Q?S:false}}}else{for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){U[R]=typeof Q==="string"?T.parentNode:T.parentNode===Q}}if(typeof Q==="string"){E.filter(Q,U,true)}}},"":function(S,Q,U){var R="done"+(I++),P=O;if(!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("parentNode",Q,R,S,T,U)},"~":function(S,Q,U){var R="done"+(I++),P=O;if(typeof Q==="string"&&!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("previousSibling",Q,R,S,T,U)}},find:{ID:function(Q,R){if(R.getElementById){var P=R.getElementById(Q[1]);return P?[P]:[]}},NAME:function(P,Q){return Q.getElementsByName?Q.getElementsByName(P[1]):null},TAG:function(P,Q){return Q.getElementsByTagName(P[1])}},preFilter:{CLASS:function(S,Q,R,P,U){S=" "+S[1].replace(/\\/g,"")+" ";for(var T=0;Q[T];T++){if(U^(" "+Q[T].className+" ").indexOf(S)>=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return !!P.firstChild},empty:function(P){return !P.firstChild},has:function(R,Q,P){return !!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return Q<P[3]-0},gt:function(R,Q,P){return Q>P[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S<P;S++){if(U[S]===V){return false}}return true}}}},ID:function(Q,P){return Q.nodeType===1&&Q.getAttribute("id")===P},TAG:function(Q,P){return(P==="*"&&Q.nodeType===1)||Q.nodeName===P},CLASS:function(Q,P){return P.test(Q.className)},ATTR:function(T,R){var P=G.attrHandle[R[1]]?G.attrHandle[R[1]](T):T[R[1]]||T.getAttribute(R[1]),U=P+"",S=R[2],Q=R[4];return P==null?false:S==="="?U===Q:S==="*="?U.indexOf(Q)>=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R<P;R++){Q.push(T[R])}}else{for(var R=0;T[R];R++){Q.push(T[R])}}}return Q}}(function(){var Q=document.createElement("form"),R="script"+(new Date).getTime();Q.innerHTML="<input name='"+R+"'/>";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="<a href='#'></a>";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T<R;T++){var P=Z[T];if(P){P=P[Q];var U=false;while(P&&P.nodeType){var S=P[V];if(S){U=Z[S];break}if(P.nodeType===1&&!Y){P[V]=T}if(P.nodeName===W){U=P;break}P=P[Q]}Z[T]=U}}}function O(Q,V,U,Y,W,X){for(var S=0,R=Y.length;S<R;S++){var P=Y[S];if(P){P=P[Q];var T=false;while(P&&P.nodeType){if(P[U]){T=Y[P[U]];break}if(P.nodeType===1){if(!X){P[U]=S}if(typeof V!=="string"){if(P===V){T=true;break}}else{if(E.filter(V,[P]).length>0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E<D.length){n.event.proxy(F,D[E++])}return this.click(n.event.proxy(F,function(G){this.lastToggle=(this.lastToggle||0)%E;G.preventDefault();return D[this.lastToggle++].apply(this,arguments)||false}))},hover:function(D,E){return this.mouseenter(D).mouseleave(E)},ready:function(D){A();if(n.isReady){D.call(document,n)}else{n.readyList.push(D)}return this},live:function(F,E){var D=n.event.proxy(E);D.guid+=this.selector+F;n(document).bind(i(F,this.selector),this.selector,D);return this},die:function(E,D){n(document).unbind(i(E,this.selector),D?{guid:D.guid+this.selector+E}:null);return this}});function c(G){var D=RegExp("(^|\\.)"+G.type+"(\\.|$)"),F=true,E=[];n.each(n.data(this,"events").live||[],function(H,I){if(D.test(I.type)){var J=n(G.target).closest(I.data)[0];if(J){E.push({elem:J,fn:I})}}});n.each(E,function(){if(!G.isImmediatePropagationStopped()&&this.fn.call(this.elem,G,this.fn.data)===false){F=false}});return F}function i(E,D){return["live",E,D.replace(/\./g,"`").replace(/ /g,"|")].join(".")}n.extend({isReady:false,readyList:[],ready:function(){if(!n.isReady){n.isReady=true;if(n.readyList){n.each(n.readyList,function(){this.call(document,n)});n.readyList=null}n(document).triggerHandler("ready")}}});var w=false;function A(){if(w){return}w=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);n.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);n.ready()}});if(document.documentElement.doScroll&&!l.frameElement){(function(){if(n.isReady){return}try{document.documentElement.doScroll("left")}catch(D){setTimeout(arguments.callee,0);return}n.ready()})()}}}n.event.add(l,"load",n.ready)}n.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(E,D){n.fn[D]=function(F){return F?this.bind(D,F):this.trigger(D)}});n(l).bind("unload",function(){for(var D in n.cache){if(D!=1&&n.cache[D].handle){n.event.remove(n.cache[D].handle.elem)}}});(function(){n.support={};var E=document.documentElement,F=document.createElement("script"),J=document.createElement("div"),I="script"+(new Date).getTime();J.style.display="none";J.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var G=J.getElementsByTagName("*"),D=J.getElementsByTagName("a")[0];if(!G||!G.length||!D){return}n.support={leadingWhitespace:J.firstChild.nodeType==3,tbody:!J.getElementsByTagName("tbody").length,objectAll:!!J.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(D.getAttribute("style")),hrefNormalized:D.getAttribute("href")==="/a",opacity:D.style.opacity==="0.5",cssFloat:!!D.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};F.type="text/javascript";try{F.appendChild(document.createTextNode("window."+I+"=1;"))}catch(H){}E.insertBefore(F,E.firstChild);if(l[I]){n.support.scriptEval=true;delete l[I]}E.removeChild(F);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function(){n.support.noCloneEvent=false;J.detachEvent("onclick",arguments.callee)});J.cloneNode(true).fireEvent("onclick")}n(function(){var K=document.createElement("div");K.style.width="1px";K.style.paddingLeft="1px";document.body.appendChild(K);n.boxModel=n.support.boxModel=K.offsetWidth===2;document.body.removeChild(K)})})();var v=n.support.cssFloat?"cssFloat":"styleFloat";n.props={"for":"htmlFor","class":"className","float":v,cssFloat:v,styleFloat:v,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};n.fn.extend({_load:n.fn.load,load:function(F,I,J){if(typeof F!=="string"){return this._load(F)}var H=F.indexOf(" ");if(H>=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return !E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G<E;G++){var D=n.data(this[G],"olddisplay");this[G].style.display=D||"";if(n.css(this[G],"display")==="none"){var F=this[G].tagName,J;if(m[F]){J=m[F]}else{var H=n("<"+F+" />").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F<E;F++){var D=n.data(this[F],"olddisplay");if(!D&&D!=="none"){n.data(this[F],"olddisplay",n.css(this[F],"display"))}this[F].style.display="none"}return this}},_toggle:n.fn.toggle,toggle:function(F,E){var D=typeof F==="boolean";return n.isFunction(F)&&n.isFunction(E)?this._toggle.apply(this,arguments):F==null||D?this.each(function(){var G=D?F:n(this).is(":hidden");n(this)[G?"show":"hide"]()}):this.animate(s("toggle",3),F,E)},fadeTo:function(D,F,E){return this.animate({opacity:F},D,E)},animate:function(H,E,G,F){var D=n.speed(E,G,F);return this[D.queue===false?"each":"queue"](function(){var J=n.extend({},D),L,K=this.nodeType==1&&n(this).is(":hidden"),I=this;for(L in H){if(H[L]=="hide"&&K||H[L]=="show"&&!K){return J.complete.call(this)}if((L=="height"||L=="width")&&this.style){J.display=n.css(this,"display");J.overflow=this.style.overflow}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=n.extend({},H);n.each(H,function(N,R){var Q=new n.fx(I,J,N);if(/toggle|show|hide/.test(R)){Q[R=="toggle"?K?"show":"hide":R](H)}else{var P=R.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),S=Q.cur(true)||0;if(P){var M=parseFloat(P[2]),O=P[3]||"px";if(O!="px"){I.style[N]=(M||1)+O;S=((M||1)/Q.cur(true))*S;I.style[N]=S+O}if(P[1]){M=((P[1]=="-="?-1:1)*M)+S}Q.custom(S,M,O)}else{Q.custom(S,R,"")}}});return true})},stop:function(E,D){var F=n.timers;if(E){this.queue([])}this.each(function(){for(var G=F.length-1;G>=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I<J.length;I++){if(!J[I]()){J.splice(I--,1)}}if(!J.length){clearInterval(n.timerId);n.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());n(this.elem).show()},hide:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(G){var F=e();if(G||F>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})();
129  build/test/env.js
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2  
- * Simulated browser environment for Rhino
  2
+ * Pure JavaScript Browser Environment
3 3
  *   By John Resig <http://ejohn.org/>
4  
- * Copyright 2007 John Resig, under the MIT License
  4
+ * Copyright 2008 John Resig, under the MIT License
5 5
  */
6 6
 
7 7
 // The window Object
@@ -143,6 +143,9 @@ var window = this;
143 143
 	};
144 144
 	
145 145
 	DOMDocument.prototype = {
  146
+		get nodeType(){
  147
+			return 9;
  148
+		},
146 149
 		createTextNode: function(text){
147 150
 			return makeNode( this._dom.createTextNode(
148 151
 				text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")) );
@@ -154,6 +157,19 @@ var window = this;
154 157
 			return new DOMNodeList( this._dom.getElementsByTagName(
155 158
 				name.toLowerCase()) );
156 159
 		},
  160
+		getElementsByName: function(name){
  161
+			var elems = this._dom.getElementsByTagName("*"), ret = [];
  162
+			ret.item = function(i){ return this[i]; };
  163
+			ret.getLength = function(){ return this.length; };
  164
+			
  165
+			for ( var i = 0; i < elems.length; i++ ) {
  166
+				var elem = elems.item(i);
  167
+				if ( elem.getAttribute("name") == name )
  168
+					ret.push( elem );
  169
+			}
  170
+			
  171
+			return new DOMNodeList( ret );
  172
+		},
157 173
 		getElementById: function(id){
158 174
 			var elems = this._dom.getElementsByTagName("*");
159 175
 			
@@ -264,6 +280,9 @@ var window = this;
264 280
 		get nodeName() {
265 281
 			return this._dom.getNodeName();
266 282
 		},
  283
+		get childNodes(){
  284
+			return new DOMNodeList( this._dom.getChildNodes() );
  285
+		},
267 286
 		cloneNode: function(deep){
268 287
 			return makeNode( this._dom.cloneNode(deep) );
269 288
 		},
@@ -290,6 +309,19 @@ var window = this;
290 309
 		}
291 310
 	};
292 311
 
  312
+	window.DOMComment = function(node){
  313
+		this._dom = node;
  314
+	};
  315
+
  316
+	DOMComment.prototype = extend(new DOMNode(), {
  317
+		get nodeType(){
  318
+			return 8;
  319
+		},
  320
+		get outerHTML(){
  321
+			return "<!--" + this.nodeValue + "-->";
  322
+		}
  323
+	});
  324
+
293 325
 	// DOM Element
294 326
 
295 327
 	window.DOMElement = function(elem){
@@ -307,14 +339,37 @@ var window = this;
307 339
 			if ( style.length == 2 )
308 340
 				this.style[ style[0] ] = style[1];
309 341
 		}
  342
+		
  343
+		if ( this.nodeName == "FORM" ) {
  344
+			this.__defineGetter__("elements", function(){
  345
+				return this.getElementsByTagName("*");
  346
+			});
  347
+			
  348
+			this.__defineGetter__("length", function(){
  349
+				var elems = this.elements;
  350
+				for ( var i = 0; i < elems.length; i++ ) {
  351
+					this[i] = elems[i];
  352
+				}
  353
+				
  354
+				return elems.length;
  355
+			});
  356
+		}
  357
+
  358
+		if ( this.nodeName == "SELECT" ) {
  359
+			this.__defineGetter__("options", function(){
  360
+				return this.getElementsByTagName("option");
  361
+			});
  362
+		}
  363
+
  364
+		this.defaultValue = this.value;
310 365
 	};
311 366
 	
312 367
 	DOMElement.prototype = extend( new DOMNode(), {
313 368
 		get nodeName(){
314  
-			return this.tagName.toUpperCase();
  369
+			return this.tagName;
315 370
 		},
316 371
 		get tagName(){
317  
-			return this._dom.getTagName();
  372
+			return this._dom.getTagName().toUpperCase();
318 373
 		},
319 374
 		toString: function(){
320 375
 			return "<" + this.tagName + (this.id ? "#" + this.id : "" ) + ">";
@@ -349,7 +404,7 @@ var window = this;
349 404
 		set innerHTML(html){
350 405
 			html = html.replace(/<\/?([A-Z]+)/g, function(m){
351 406
 				return m.toLowerCase();
352  
-			});
  407
+			}).replace(/&nbsp;/g, " ");
353 408
 			
354 409
 			var nodes = this.ownerDocument.importNode(
355 410
 				new DOMDocument( new java.io.ByteArrayInputStream(
@@ -435,7 +490,10 @@ var window = this;
435 490
 		
436 491
 		get type() { return this.getAttribute("type") || ""; },
437 492
 		set type(val) { return this.setAttribute("type",val); },
438  
-		
  493
+
  494
+		get defaultValue() { return this.getAttribute("defaultValue") || ""; },
  495
+		set defaultValue(val) { return this.setAttribute("defaultValue",val); },
  496
+
439 497
 		get value() { return this.getAttribute("value") || ""; },
440 498
 		set value(val) { return this.setAttribute("value",val); },
441 499
 		
@@ -471,6 +529,21 @@ var window = this;
471 529
 		},
472 530
 		insertBefore: function(node,before){
473 531
 			this._dom.insertBefore( node._dom, before ? before._dom : before );
  532
+			
  533
+			execScripts( node );
  534
+			
  535
+			function execScripts( node ) {
  536
+				if ( node.nodeName == "SCRIPT" ) {
  537
+					if ( !node.getAttribute("src") ) {
  538
+						eval.call( window, node.textContent );
  539
+					}
  540
+				} else {
  541
+					var scripts = node.getElementsByTagName("script");
  542
+					for ( var i = 0; i < scripts.length; i++ ) {
  543
+						execScripts( node );
  544
+					}
  545
+				}
  546
+			}
474 547
 		},
475 548
 		removeChild: function(node){
476 549
 			this._dom.removeChild( node._dom );
@@ -502,9 +575,6 @@ var window = this;
502 575
 			event.initEvent("blur");
503 576
 			this.dispatchEvent(event);
504 577
 		},
505  
-		get elements(){
506  
-			return this.getElementsByTagName("*");
507  
-		},
508 578
 		get contentWindow(){
509 579
 			return this.nodeName == "IFRAME" ? {
510 580
 				document: this.contentDocument
@@ -548,9 +618,11 @@ var window = this;
548 618
 	function makeNode(node){
549 619
 		if ( node ) {
550 620
 			if ( !obj_nodes.containsKey( node ) )
551  
-				obj_nodes.put( node, node.getNodeType() == 
552  
-					Packages.org.w3c.dom.Node.ELEMENT_NODE ?
553  
-						new DOMElement( node ) : new DOMNode( node ) );
  621
+				obj_nodes.put( node, node.getNodeType() == 1?
  622
+					new DOMElement( node ) :
  623
+					node.getNodeType() == 8 ?
  624
+					new DOMComment( node ) :
  625
+					new DOMNode( node ) );
554 626
 			
555 627
 			return obj_nodes.get(node);
556 628
 		} else
@@ -628,18 +700,33 @@ var window = this;
628 700
 					self.readyState = 4;
629 701
 					self.status = parseInt(connection.responseCode) || undefined;
630 702
 					self.statusText = connection.responseMessage || "";
  703
+
  704
+					var contentEncoding = connection.getContentEncoding() || "utf-8",
  705
+						stream = (contentEncoding.equalsIgnoreCase("gzip") || contentEncoding.equalsIgnoreCase("decompress") )?
  706
+       							new java.util.zip.GZIPInputStream(connection.getInputStream()) :
  707
+       							connection.getInputStream(),
  708
+						baos = new java.io.ByteArrayOutputStream(),
  709
+       						buffer = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024),
  710
+						length,
  711
+						responseXML = null;
  712
+
  713
+					while ((length = stream.read(buffer)) != -1) {
  714
+						baos.write(buffer, 0, length);
  715
+					}
  716
+
  717
+					baos.close();
  718
+					stream.close();
  719
+
  720
+					self.responseText = java.nio.charset.Charset.forName(contentEncoding)
  721
+						.decode(java.nio.ByteBuffer.wrap(baos.toByteArray())).toString();
631 722
 					
632  
-					var stream = new java.io.InputStreamReader(connection.getInputStream()),
633  
-						buffer = new java.io.BufferedReader(stream), line;
634  
-					
635  
-					while ((line = buffer.readLine()) != null)
636  
-						self.responseText += line;
637  
-						
638  
-					self.responseXML = null;
  723
+					self.__defineGetter__("responseXML", function(){
  724
+						return responseXML;
  725
+					});
639 726
 					
640 727
 					if ( self.responseText.match(/^\s*</) ) {
641 728
 						try {
642  
-							self.responseXML = new DOMDocument(
  729
+							responseXML = new DOMDocument(
643 730
 								new java.io.ByteArrayInputStream(
644 731
 									(new java.lang.String(
645 732
 										self.responseText)).getBytes("UTF8")));
@@ -665,7 +752,7 @@ var window = this;
665 752
 			else {
666 753
 				var returnedHeaders = [];
667 754
 				for (var rHeader in this.responseHeaders) {
668  
-					if (rHeader.match(new Regexp(header, "i")))
  755
+					if (rHeader.match(new RegExp(header, "i")))
669 756
 						returnedHeaders.push(this.responseHeaders[rHeader]);
670 757
 				}
671 758
 			
128  src/jamal/jamal.js
@@ -260,7 +260,7 @@ jamal.fn = jamal.prototype = {
260 260
      * @example jamal.error('Controller not found!');
261 261
      *
262 262
      * @public
263  
-     * @name start
  263
+     * @name error
264 264
      * @type debug
265 265
      * @param String message Error message to be displayed on the console
266 266
      * @param Object e (optional) Error object to display the original error
@@ -271,15 +271,21 @@ jamal.fn = jamal.prototype = {
271 271
             if (arguments.length>1 && arguments[1]) {
272 272
                 e = arguments[1];
273 273
                 
274  
-                window.console.error('Jamal Error: ' + message, e);
275  
-                if (typeof e.message === "object") {
276  
-                    this.log(e.name + ': ');
277  
-                    this.dir(e.message);
  274
+                window.console.error('Jamal Error: '+message, e);
  275
+                if(typeof e === "object") {
  276
+                    if(typeof e.message === "object") {
  277
+                        this.log(e.name+': ');
  278
+                        this.dir(e.message);
  279
+                    } else {
  280
+                        this.log(e.name+': '+e.message);
  281
+                    }
  282
+                    this.dir(e);
  283
+                    this.log('Stack: ' + e.stack);
278 284
                 } else {
279  
-                    this.log(e.name + ': ' + e.message);
  285
+                    this.log(e);
  286
+                    this.log('Stack:');
  287
+                    this.dir(this.callstack());
280 288
                 }
281  
-                this.dir(e);
282  
-                this.log('Stack: ' + e.stack);
283 289
             } else {
284 290
                 window.console.error('Jamal Error: ' + message);
285 291
             }
@@ -287,6 +293,41 @@ jamal.fn = jamal.prototype = {
287 293
     },
288 294
     
289 295
     /**
  296
+     * This function returns an array of objects that contain the 
  297
+     * information about call stack.
  298
+     *
  299
+     * @example callstack = jamal.callstack();
  300
+     *
  301
+     * @public
  302
+     * @name callstack
  303
+     * @type debug
  304
+     * @cat log
  305
+     */
  306
+    callstack: function() {
  307
+        var re_without_parenthesis = /[(][^)]*[)]/;
  308
+        var re_file_line = /(.*):(\d+)$/;
  309
+        
  310
+        var stack = new Error().stack.split('\n');
  311
+        stack.splice(0,2); // remove first two stack frames
  312
+        
  313
+        var frames = [];
  314
+        for(var i in stack) {
  315
+            // a stack frame string split into parts
  316
+            var frame = stack[i].split('@');
  317
+            if(frame && frame.length == 2) {
  318
+                frame = {
  319
+                    // Stackframe object
  320
+                    'name': frame[0],
  321
+                    'source': frame[0].replace(re_without_parenthesis, ''),
  322
+                    'file': frame[1].match(re_file_line)[1], // first group
  323
+                    'line': frame[1].match(re_file_line)[2]  // second group
  324
+                };
  325
+                this.log('at ' + frame.file + ' (' + frame.name + ': ' + frame.line + ')');
  326
+            }
  327
+        }
  328
+    },
  329
+    
  330
+    /**
290 331
      * Log objects to the console
291 332
      *
292 333
      * @example jamal.dir(obj);
@@ -326,7 +367,7 @@ jamal.fn = jamal.prototype = {
326 367
      */
327 368
     configure: function() {
328 369
         try {
329  
-            var data = jQuery(this.root+'.jamal').data();
  370
+            var data = jQuery(this.root+'.jamal').metadata();
330 371
         } catch(e) {
331 372
             this.debug = true;
332 373
             this.error('jQuery Metadata Plugin failed to read the configuration. '+
@@ -358,46 +399,47 @@ jamal.fn = jamal.prototype = {
358 399
      */
359 400
     load: function () {
360 401
         var loaded = false;
361  
-        if (typeof this.c[this.name] === 'object') {
362  
-            
363  
-            // controller
364  
-            try {
365  
-                this.current = this.c[this.name];
366  
-            } catch(e) {
367  
-                this.error('Controller error!', e);
368  
-            }
369  
-            
370  
-            // callback before the action
371  
-            this.current.beforeAction();
372  
-            
373  
-            // components
374  
-            if(this.current.components) {
375  
-                for(var i in this.current.components) {
376  
-                    try {
377  
-                        this[this.current.components[i]]();
378  
-                    } catch(e) {
379  
-                        this.error(this.current.components[i]+' component error!', e);
380  
-                    }
381  
-                }
382  
-            }
383  
-            
384  
-            // action
385  
-            if (typeof this.c[this.name][this.action] === 'function') {
  402
+        if (typeof this.c[this.name] !== 'object') {
  403
+            jamal.fn = jamal;
  404
+            $j.c({Generic: {}});
  405
+            this.name = 'Generic';
  406
+        }
  407
+        
  408
+        // controller
  409
+        try {
  410
+            this.current = this.c[this.name];
  411
+        } catch(e) {
  412
+            this.error('Controller error!', e);
  413
+        }
  414
+        
  415
+        // callback before the action
  416
+        this.current.beforeAction();
  417
+        
  418
+        // components
  419
+        if(this.current.components) {
  420
+            for(var i in this.current.components) {
386 421
                 try {
387  
-                    this.current[this.action]();
388  
-                    loaded = true;
  422
+                    this[this.current.components[i]]();
389 423
                 } catch(e) {
390  
-                    this.error('Action couldn\'t be started!', e);
  424
+                    this.error(this.current.components[i]+' component error!', e);
391 425
                 }
392  
-            } else {
393  
-                this.log('Action not found!');
394 426
             }
395  
-            
396  
-            // callback after the action
397  
-            this.current.afterAction();
  427
+        }
  428
+        
  429
+        // action
  430
+        if (typeof this.c[this.name][this.action] === 'function') {
  431
+            try {
  432
+                this.current[this.action]();
  433
+                loaded = true;
  434
+            } catch(e) {
  435
+                this.error('Action couldn\'t be started!', e);
  436
+            }
398 437
         } else {
399  
-            this.log('Controller not found!');
  438
+            this.log('Action not found!');
400 439
         }
  440
+        
  441
+        // callback after the action
  442
+        this.current.afterAction();
401 443
         return loaded;
402 444
     },
403 445
 
147  src/jamal/plugins/metadata.js
... ...
@@ -1,13 +1,13 @@
1 1
 /*
2 2
  * Metadata - jQuery plugin for parsing metadata from elements
3 3
  *
4  
- * Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer
  4
+ * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
5 5
  *
6 6
  * Dual licensed under the MIT and GPL licenses:
7 7
  *   http://www.opensource.org/licenses/mit-license.php
8 8
  *   http://www.gnu.org/licenses/gpl.html
9 9
  *
10  
- * Revision: $Id: metadata.js 1915 2007-05-18 14:25:48Z joern.zaefferer $
  10
+ * Revision: $Id$
11 11
  *
12 12
  */
13 13
 
@@ -29,21 +29,21 @@
29 29
  * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
30 30
  * matched by expr, then redefine the metadata type and run another $(expr) for other elements.
31 31
  * 
32  
- * @name $.meta.setType
  32
+ * @name $.metadata.setType
33 33
  *
34 34
  * @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
35  
- * @before $.meta.setType("class")
36  
- * @after $("#one").data().item_id == 1; $("#one")[0].item_label == "Label"
  35
+ * @before $.metadata.setType("class")
  36
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
37 37
  * @desc Reads metadata from the class attribute
38 38
  * 
39 39
  * @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
40  
- * @before $.meta.setType("attr", "data")
41  
- * @after $("#one").data().item_id == 1; $("#one")[0].item_label == "Label"
  40
+ * @before $.metadata.setType("attr", "data")
  41
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
42 42
  * @desc Reads metadata from a "data" attribute
43 43
  * 
44 44
  * @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
45  
- * @before $.meta.setType("elem", "script")
46  
- * @after $("#one").data().item_id == 1; $("#one")[0].item_label == "Label"
  45
+ * @before $.metadata.setType("elem", "script")
  46
+ * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
47 47
  * @desc Reads metadata from a nested script element
48 48
  * 
49 49
  * @param String type The encoding type
@@ -51,70 +51,71 @@
51 51
  * @cat Plugins/Metadata
52 52
  * @descr Sets the type of encoding to be used when loading metadata for the first time
53 53
  * @type undefined
54  
- * @see data()
  54
+ * @see metadata()
55 55
  */
56 56
 
57 57
 (function($) {
58  
-	// settings
59  
-	$.meta = {
60  
-	  type: "class",
61  
-	  name: "metadata",
62  
-	  setType: function(type,name){
63  
-	    this.type = type;
64  
-	    this.name = name;
65  
-	  },
66  
-	  cre: /({.*})/,
67  
-	  single: 'metadata'
68  
-	};
69  
-	
70  
-	// reference to original setArray()
71  
-	var setArray = $.fn.setArray;
72  
-	
73  
-	// define new setArray()
74  
-	$.fn.setArray = function(arr){
75  
-	    return setArray.apply( this, arguments ).each(function(){
76  
-	      if ( this.nodeType == 9 || $.isXMLDoc(this) || this.metaDone ) return;
77  
-	      
78  
-	      var data = "{}";
79  
-	      
80  
-	      if ( $.meta.type == "class" ) {
81  
-	        var m = $.meta.cre.exec( this.className );
82  
-	        if ( m )
83  
-	          data = m[1];
84  
-	      } else if ( $.meta.type == "elem" ) {
85  
-	      	if( !this.getElementsByTagName ) return;
86  
-	        var e = this.getElementsByTagName($.meta.name);
87  
-	        if ( e.length )
88  
-	          data = $.trim(e[0].innerHTML);
89  
-	      } else if ( this.getAttribute != undefined ) {
90  
-	        var attr = this.getAttribute( $.meta.name );
91  
-	        if ( attr )
92  
-	          data = attr;
93  
-	      }
94  
-	      
95  
-	      if ( !/^{/.test( data ) )
96  
-	        data = "{" + data + "}";
97  
-	
98  
-	      data = eval("(" + data + ")");
99  
-	
100  
-	      if ( $.meta.single )
101  
-	        this[ $.meta.single ] = data;
102  
-	      else
103  
-	        $.extend( this, data );
104  
-	      
105  
-	      this.metaDone = true;
106  
-	    });
107  
-	};
108  
-	
109  
-	/**
110  
-	 * Returns the metadata object for the first member of the jQuery object.
111  
-	 *
112  
-	 * @name data
113  
-	 * @descr Returns element's metadata object
114  
-	 * @type jQuery
115  
-	 * @cat Plugins/Metadata
116  
-	 */
117  
-	$.fn.data = function() {
118  
-	  return this[0][$.meta.single];
119  
-	};
120  
-})(jQuery);
  58
+
  59
+$.extend({
  60
+	metadata : {
  61
+		defaults : {
  62
+			type: 'class',
  63
+			name: 'metadata',
  64
+			cre: /({.*})/,
  65
+			single: 'metadata'
  66
+		},
  67
+		setType: function( type, name ){
  68
+			this.defaults.type = type;
  69
+			this.defaults.name = name;
  70
+		},
  71
+		get: function( elem, opts ){
  72
+			var settings = $.extend({},this.defaults,opts);
  73
+			// check for empty string in single property
  74
+			if ( !settings.single.length ) settings.single = 'metadata';
  75
+			
  76
+			var data = $.data(elem, settings.single);
  77
+			// returned cached data if it already exists
  78
+			if ( data ) return data;
  79
+			
  80
+			data = "{}";
  81
+			
  82
+			if ( settings.type == "class" ) {
  83
+				var m = settings.cre.exec( elem.className );
  84
+				if ( m )
  85
+					data = m[1];
  86
+			} else if ( settings.type == "elem" ) {
  87
+				if( !elem.getElementsByTagName ) return;
  88
+				var e = elem.getElementsByTagName(settings.name);
  89
+				if ( e.length )
  90
+					data = $.trim(e[0].innerHTML);
  91
+			} else if ( elem.getAttribute != undefined ) {
  92
+				var attr = elem.getAttribute( settings.name );
  93
+				if ( attr )
  94
+					data = attr;
  95
+			}
  96
+			
  97
+			if ( data.indexOf( '{' ) <0 )
  98
+			data = "{" + data + "}";
  99
+			
  100
+			data = eval("(" + data + ")");
  101
+			
  102
+			$.data( elem, settings.single, data );
  103
+			return data;
  104
+		}
  105
+	}
  106
+});
  107
+
  108
+/**
  109
+ * Returns the metadata object for the first member of the jQuery object.
  110
+ *
  111
+ * @name metadata
  112
+ * @descr Returns element's metadata object
  113
+ * @param Object opts An object contianing settings to override the defaults
  114
+ * @type jQuery
  115
+ * @cat Plugins/Metadata
  116
+ */
  117
+$.fn.metadata = function( opts ){
  118
+	return $.metadata.get( this[0], opts );
  119
+};
  120
+
  121
+})(jQuery);

0 notes on commit 3aeae45

Please sign in to comment.
Something went wrong with that request. Please try again.