/**
 * Tabs - jQuery plugin for accessible, unobtrusive tabs
 * @requires jQuery v1.0.3
 *
 * http://stilbuero.de/tabs/
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 2.7.2
 */

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}('(4(z){z.23({9:{2d:0}});z.1z.9=4(y,x){3(K y==\'2E\')x=y;x=z.23({J:(y&&K y==\'1Y\'&&y>0)?--y:0,12:C,H:z.1d?2h:V,R:V,1p:\'2K&#2D;\',21:\'R-2z-\',1A:C,1x:C,1w:C,1v:C,1u:\'34\',2p:C,2o:C,2m:V,2j:C,19:C,16:C,1g:\'9-1H\',N:\'9-29\',1a:\'9-12\',1b:\'9-26\',1t:\'9-1K\',1C:\'9-2B\',22:\'10\'},x||{});z.7.1j=z.7.1j||z.7.Z&&K 2x==\'4\';4 1y(){1X(0,0)}G 5.Y(4(){2 v=5;2 j=z(\'15.\'+x.1g,v);j=j.X()&&j||z(\'>15:6(0)\',v);2 n=z(\'a\',j);3(x.R){2 w={};n.Y(4(){z(5).2l(\'<I>\'+z(5).2l()+\'</I>\');2 a=x.21+(++z.9.2d);2 b=\'#\'+a;w[b]=5.1O;5.1O=b;z(\'<10 W="\'+a+\'" 31="\'+x.1b+\'"></10>\').2g(v)})}2 u=z(\'10.\'+x.1b,v);u=u.X()&&u||z(\'>\'+x.22,v);j.P(\'.\'+x.1g)||j.O(x.1g);u.Y(4(){2 a=z(5);a.P(\'.\'+x.1b)||a.O(x.1b)});2 p=z(\'8\',j).2b(z(\'8.\'+x.N,j)[0]);3(p>=0){x.J=p}3(1c.B){n.Y(4(a){3(5.B==1c.B){x.J=a;3((z.7.Z||z.7.2T)&&!x.R){2 b=z(1c.B);2 c=b.17(\'W\');b.17(\'W\',\'\');1n(4(){b.17(\'W\',c)},2O)}1y();G V}})}3(z.7.Z){1y()}u.18(\':6(\'+x.J+\')\').1F().1o().2I(\':6(\'+x.J+\')\').O(x.1t);3(!x.R){z(\'8\',j).1f(x.N).6(x.J).O(x.N)}3(x.2m){2 t=4(e){2 b=z.2C(u.1l(),4(a){2 h,1B=z(a);3(e){3(z.7.1j){a.11.2A(\'20\');a.11.E=\'\';a.1k=C}h=1B.S({\'1q-E\':\'\'}).E()}D{h=1B.E()}G h}).2y(4(c,d){G d-c});3(z.7.1j){u.Y(4(){5.1k=b[0]+\'1Z\';5.11.2w(\'20\',\'5.11.E = 5.1k ? 5.1k : "2v"\')})}D{u.S({\'1q-E\':b[0]+\'1Z\'})}};t();2 r=v.1W;2 l=v.1h;2 q=z(\'#9-1V-1U-X\').1l(0)||z(\'<I W="9-1V-1U-X">M</I>\').S({1T:\'2u\',2t:\'2s\',2r:\'2q\'}).2g(T.1S).1l(0);2 s=q.1h;32(4(){2 b=v.1W;2 a=v.1h;2 c=q.1h;3(a>l||b!=r||c!=s){t((b>r||c<s));r=b;l=a;s=c}},1R)}2 m={},14={},1Q=x.2p||x.1u,1P=x.2o||x.1u;3(x.1x||x.1A){3(x.1x){m[\'E\']=\'1F\';14[\'E\']=\'1K\'}3(x.1A){m[\'L\']=\'1F\';14[\'L\']=\'1K\'}}D{3(x.1w){m=x.1w}D{m[\'1q-2n\']=0;1Q=x.H?1R:1}3(x.1v){14=x.1v}D{14[\'1q-2n\']=0;1P=x.H?1R:1}}2 o=x.2j,19=x.19,16=x.16;n.1s(\'2k\',4(){2 c=z(5).1e(\'8:6(0)\');3(v.1r||c.P(\'.\'+x.N)||c.P(\'.\'+x.1a)){G V}2 a=5.B;3(z.7.Z){z(5).U(\'13\');3(x.H){z.1d.1N(a);1c.B=a.1M(\'#\',\'\')}}D 3(z.7.1L){2 b=z(\'<2i 30="\'+a+\'"><10><2Z 2X="2f" 2W="h" /></10></2i>\').1l(0);b.2f();z(5).U(\'13\');3(x.H){z.1d.1N(a)}}D{3(x.H){1c.B=a.1M(\'#\',\'\')}D{z(5).U(\'13\')}}});n.1s(\'1J\',4(){2 a=z(5).1e(\'8:6(0)\');3(z.7.1L){a.1i({L:0},1,4(){a.S({L:\'\'})})}a.O(x.1a)});3(x.12&&x.12.1I){2e(2 i=0,k=x.12.1I;i<k;i++){n.6(--x.12[i]).U(\'1J\').1o()}};n.1s(\'2c\',4(){2 a=z(5).1e(\'8:6(0)\');a.1f(x.1a);3(z.7.1L){a.1i({L:1},1,4(){a.S({L:\'\'})})}});n.1s(\'13\',4(b){2 g=b.2V;2 e=5,8=z(5).1e(\'8:6(0)\'),F=z(5.B),Q=u.18(\':2U\');3(v.1r||8.P(\'.\'+x.N)||8.P(\'.\'+x.1a)||K o==\'4\'&&o(5,F[0],Q[0])===V){5.2a();G V}v[\'1r\']=2h;3(F.X()){3(z.7.Z&&x.H){2 d=5.B.1M(\'#\',\'\');F.17(\'W\',\'\');1n(4(){F.17(\'W\',d)},0)}4 1G(){3(x.H&&g){z.1d.1N(e.B)}Q.1i(14,1P,4(){z(e).1e(\'8:6(0)\').O(x.N).2S().1f(x.N);3(K 19==\'4\'){19(e,F[0],Q[0])}Q.O(x.1t).S({1T:\'\',28:\'\',E:\'\',L:\'\'});F.1f(x.1t).1i(m,1Q,4(){F.S({28:\'\',E:\'\',L:\'\'});3(z.7.Z){Q[0].11.18=\'\';F[0].11.18=\'\'}3(K 16==\'4\'){16(e,F[0],Q[0])}v[\'1r\']=C})})}3(!x.R){1G()}D{2 f=z(5),I=z(\'I\',5)[0],27=I.1E;f.O(x.1C);3(x.1p){I.1E=x.1p}1n(4(){z(e.B).2R(w[e.B],4(){1G();3(x.1p){I.1E=27}f.1f(x.1C)})},0)}}D{2Q(\'2P P 2N 2M 26.\')}2 a=1D.2L||T.1m&&T.1m.25||T.1S.25||0;2 c=1D.2J||T.1m&&T.1m.24||T.1S.24||0;1n(4(){1D.1X(a,c)},0);5.2a();G x.H&&!!g});3(x.R){n.6(x.J).U(\'13\').1o()}3(x.H){z.1d.2Y(4(){n.6(x.J).U(\'13\').1o()})}})};2 A=[\'2k\',\'1J\',\'2c\'];2e(2 i=0;i<A.1I;i++){z.1z[A[i]]=(4(d){G 4(c){G 5.Y(4(){2 b=z(\'15.9-1H\',5);b=b.X()&&b||z(\'>15:6(0)\',5);2 a;3(!c||K c==\'1Y\'){a=z(\'8 a\',b).6((c&&c>0&&c-1||0))}D 3(K c==\'2H\'){a=z(\'8 a[@1O$="#\'+c+\'"]\',b)}a.U(d)})}})(A[i])}z.1z.2G=4(){2 c=[];5.Y(4(){2 a=z(\'15.9-1H\',5);a=a.X()&&a||z(\'>15:6(0)\',5);2 b=z(\'8\',a);c.2F(b.2b(b.18(\'.9-29\')[0])+1)});G c[0]}})(33);',62,191,'||var|if|function|this|eq|browser|li|tabs||||||||||||||||||||||||||||hash|null|else|height|toShow|return|bookmarkable|span|initial|typeof|opacity||selectedClass|addClass|is|toHide|remote|css|document|trigger|false|id|size|each|msie|div|style|disabled|click|hideAnim|ul|onShow|attr|filter|onHide|disabledClass|containerClass|location|ajaxHistory|parents|removeClass|navClass|offsetHeight|animate|msie6|minHeight|get|documentElement|setTimeout|end|spinner|min|locked|bind|hideClass|fxSpeed|fxHide|fxShow|fxSlide|unFocus|fn|fxFade|jq|loadingClass|window|innerHTML|show|switchTab|nav|length|disableTab|hide|safari|replace|update|href|hideSpeed|showSpeed|50|body|display|font|watch|offsetWidth|scrollTo|number|px|behaviour|hashPrefix|tabStruct|extend|scrollTop|scrollLeft|container|text|overflow|selected|blur|index|enableTab|remoteCount|for|submit|appendTo|true|form|onClick|triggerTab|html|fxAutoHeight|width|fxHideSpeed|fxShowSpeed|hidden|visibility|absolute|position|block|1px|setExpression|XMLHttpRequest|sort|tab|removeExpression|loading|map|8230|object|push|activeTab|string|not|pageYOffset|Loading|pageXOffset|such|no|500|There|alert|load|siblings|opera|visible|clientX|value|type|initialize|input|action|class|setInterval|jQuery|normal'.split('|'),0,{}))


/*
 * Thickbox 3 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/

var tb_pathToImage = "/template-images/js/loadingAnimation.gif";
/*changed iframe src to add src='/e.htm' as a real file with no data in it which avoids the SSL issue in IE6*/
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}('$(o).2Q(9(){1A(\'a.19, 32.19, 2Z.19\');1z=1y 1w();1z.L=33});9 1A(b){$(b).s(9(){6 t=R.W||R.1r||N;6 a=R.z||R.2f;6 g=R.2d||X;1g(t,a,g);R.35();K X})}9 1g(d,f,g){36{3(2j o.u.I.2k==="2e"){$("u","15").q({A:"2c%",v:"2c%"});$("15").q("25","31");3(o.22("1C")===N){$("u").r("<Z 5=\'1C\' L=\'/e.2Y\'></Z><4 5=\'C\'></4><4 5=\'8\'></4>");$("#C").s(J)}}n{3(o.22("C")===N){$("u").r("<4 5=\'C\'></4><4 5=\'8\'></4>");$("#C").s(J)}}3(20()){$("#C").24("2V")}n{$("#C").24("2X")}3(d===N){d=""}$("u").r("<4 5=\'G\'><2a L=\'"+1z.L+"\' /></4>");$(\'#G\').2T();6 h;3(f.M("?")!==-1){h=f.2R(0,f.M("?"))}n{h=f}6 i=/\\.2h$|\\.2x$|\\.2w$|\\.2u$|\\.2v$/;6 j=h.1G().2q(i);3(j==\'.2h\'||j==\'.2x\'||j==\'.2w\'||j==\'.2u\'||j==\'.2v\'){1E="";1H="";11="";1s="";1B="";V="";1p="";1i=X;3(g){F=$("a[@2d="+g+"]").2U();1Z(B=0;((B<F.1a)&&(V===""));B++){6 k=F[B].z.1G().2q(i);3(!(F[B].z==f)){3(1i){1s=F[B].W;1B=F[B].z;V="<1b 5=\'2o\'>&1e;&1e;<a z=\'#\'>2W &37;</a></1b>"}n{1E=F[B].W;1H=F[B].z;11="<1b 5=\'2t\'>&1e;&1e;<a z=\'#\'>&34; 38</a></1b>"}}n{1i=1h;1p="1w "+(B+1)+" 3a "+(F.1a)}}}Y=1y 1w();Y.18=9(){Y.18=N;6 a=2m();6 x=a[0]-1Y;6 y=a[1]-1Y;6 b=Y.v;6 c=Y.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}14=b+30;1f=c+3k;$("#8").r("<a z=\'\' 5=\'2r\' W=\'1m\'><2a 5=\'3i\' L=\'"+f+"\' v=\'"+b+"\' A=\'"+c+"\' 2f=\'"+d+"\'/></a>"+"<4 5=\'3l\'>"+d+"<4 5=\'3n\'>"+1p+11+V+"</4></4><4 5=\'3o\'><a z=\'#\' 5=\'Q\' W=\'1m\'>1j</a> 1F 1o 1n</4>");$("#Q").s(J);3(!(11==="")){9 16(){3($(o).O("s",16)){$(o).O("s",16)}$("#8").D();$("u").r("<4 5=\'8\'></4>");1g(1E,1H,g);K X}$("#2t").s(16)}3(!(V==="")){9 1l(){$("#8").D();$("u").r("<4 5=\'8\'></4>");1g(1s,1B,g);K X}$("#2o").s(1l)}o.1d=9(e){3(e==N){H=1S.1R}n{H=e.1J}3(H==27){J()}n 3(H==3j){3(!(V=="")){o.1d="";1l()}}n 3(H==3h){3(!(11=="")){o.1d="";16()}}};13();$("#G").D();$("#2r").s(J);$("#8").q({S:"U"})};Y.L=f}n{6 l=f.1I(/^[^\\?]+\\??/,\'\');6 m=1K(l);14=(m[\'v\']*1)+30||3d;1f=(m[\'A\']*1)+3g||3b;T=14-30;P=1f-39;3(f.M(\'1N\')!=-1){1D=f.1q(\'3c\');$("#12").D();3(m[\'1x\']!="1h"){$("#8").r("<4 5=\'1P\'><4 5=\'1t\'>"+d+"</4><4 5=\'1V\'><a z=\'#\' 5=\'Q\' W=\'1m\'>1j</a> 1F 1o 1n</4></4><Z 1W=\'0\' 1X=\'0\' L=\'"+1D[0]+"\' 5=\'12\' 1r=\'12"+1c.1Q(1c.1u()*1O)+"\' 18=\'1v()\' I=\'v:"+(T+29)+"p;A:"+(P+17)+"p;\' > </Z>")}n{$("#C").O();$("#8").r("<Z 1W=\'0\' 1X=\'0\' L=\'"+1D[0]+"\' 5=\'12\' 1r=\'12"+1c.1Q(1c.1u()*1O)+"\' 18=\'1v()\' I=\'v:"+(T+29)+"p;A:"+(P+17)+"p;\'> </Z>")}}n{3($("#8").q("S")!="U"){3(m[\'1x\']!="1h"){$("#8").r("<4 5=\'1P\'><4 5=\'1t\'>"+d+"</4><4 5=\'1V\'><a z=\'#\' 5=\'Q\'>1j</a> 1F 1o 1n</4></4><4 5=\'E\' I=\'v:"+T+"p;A:"+P+"p\'></4>")}n{$("#C").O();$("#8").r("<4 5=\'E\' 3e=\'3f\' I=\'v:"+T+"p;A:"+P+"p;\'></4>")}}n{$("#E")[0].I.v=T+"p";$("#E")[0].I.A=P+"p";$("#E")[0].2S=0;$("#1t").15(d)}}$("#Q").s(J);3(f.M(\'3m\')!=-1){$("#E").r($(\'#\'+m[\'1L\']).1M());$("#8").2n(9(){$(\'#\'+m[\'1L\']).r($("#E").1M())});13();$("#G").D();$("#8").q({S:"U"})}n 3(f.M(\'1N\')!=-1){13();3($.1k.2B){$("#G").D();$("#8").q({S:"U"})}}n{$("#E").2D(f+="&1u="+(1y 2C().2y()),9(){13();$("#G").D();1A("#E a.19");$("#8").q({S:"U"})})}}3(!m[\'1x\']){o.1T=9(e){3(e==N){H=1S.1R}n{H=e.1J}3(H==27){J()}}}}2N(e){}}9 1v(){$("#G").D();$("#8").q({S:"U"})}9 J(){$("#2P").O("s");$("#Q").O("s");$("#8").2M("2G",9(){$(\'#8,#C,#1C\').2K("2n").O().D()});$("#G").D();3(2j o.u.I.2k=="2e"){$("u","15").q({A:"1U",v:"1U"});$("15").q("25","")}o.1d="";o.1T="";K X}9 13(){$("#8").q({2H:\'-\'+21((14/2),10)+\'p\',v:14+\'p\'});3(!(2p.1k.2J&&2p.1k.2O<7)){$("#8").q({2I:\'-\'+21((1f/2),10)+\'p\'})}}9 1K(a){6 b={};3(!a){K b}6 c=a.1q(/[;&]/);1Z(6 i=0;i<c.1a;i++){6 d=c[i].1q(\'=\');3(!d||d.1a!=2){2L}6 e=2s(d[0]);6 f=2s(d[1]);f=f.1I(/\\+/g,\' \');b[e]=f}K b}9 2m(){6 a=o.2z;6 w=2l.28||26.28||(a&&a.23)||o.u.23;6 h=2l.2b||26.2b||(a&&a.2i)||o.u.2i;2g=[w,h];K 2g}9 20(){6 a=2A.2E.1G();3(a.M(\'2F\')!=-1&&a.M(\'3p\')!=-1){K 1h}}',62,212,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|css|append|click||body|width||||href|height|TB_Counter|TB_overlay|remove|TB_ajaxContent|TB_TempArray|TB_load|keycode|style|tb_remove|return|src|indexOf|null|unbind|ajaxContentH|TB_closeWindowButton|this|display|ajaxContentW|block|TB_NextHTML|title|false|imgPreloader|iframe||TB_PrevHTML|TB_iframeContent|tb_position|TB_WIDTH|html|goPrev||onload|thickbox|length|span|Math|onkeydown|nbsp|TB_HEIGHT|tb_show|true|TB_FoundURL|close|browser|goNext|Close|Key|Esc|TB_imageCount|split|name|TB_NextCaption|TB_ajaxWindowTitle|random|tb_showIframe|Image|modal|new|imgLoader|tb_init|TB_NextURL|TB_HideSelect|urlNoQuery|TB_PrevCaption|or|toLowerCase|TB_PrevURL|replace|which|tb_parseQuery|inlineId|children|TB_iframe|1000|TB_title|round|keyCode|event|onkeyup|auto|TB_closeAjaxWindow|frameborder|hspace|150|for|tb_detectMacXFF|parseInt|getElementById|clientWidth|addClass|overflow|self||innerWidth||img|innerHeight|100|rel|undefined|alt|arrayPageSize|jpg|clientHeight|typeof|maxHeight|window|tb_getPageSize|unload|TB_next|jQuery|match|TB_ImageOff|unescape|TB_prev|gif|bmp|png|jpeg|getTime|documentElement|navigator|safari|Date|load|userAgent|mac|fast|marginLeft|marginTop|msie|trigger|continue|fadeOut|catch|version|TB_imageOff|ready|substr|scrollTop|show|get|TB_overlayMacFFBGHack|Next|TB_overlayBG|htm|input||hidden|area|tb_pathToImage|lt|blur|try|gt|Prev|45|of|440|TB_|630|class|TB_modal|40|188|TB_Image|190|60|TB_caption|TB_inline|TB_secondLine|TB_closeWindow|firefox'.split('|'),0,{}))

/*
 * Date picker plugin for jQuery
 * http://kelvinluck.com/assets/jquery/datePicker
 *
 * Copyright (c) 2006 Kelvin Luck (kelvinluck.com)
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * $LastChangedDate: 2007-04-12 10:01:01 +0100 (Thu, 12 Apr 2007) $
 * $Rev: 1672 $
 */

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}('8.E=f(){9(1v.23==M){1v.23={3X:f(){}}}4 X=[\'3q\',\'3j\',\'3b\',\'32\',\'45\',\'43\',\'3W\',\'3T\',\'3Q\',\'3M\',\'3E\',\'3x\'];4 1p=[\'3n\',\'3i\',\'3d\',\'3a\',\'35\',\'31\',\'2X\'];4 W={p:\'42\',n:\'3V\',c:\'3S\',b:\'3P 1d\'};4 1h=\'1R\';4 x="/";4 1f=C;4 N;4 G;4 H;4 S;4 A;4 1P=f(2k){4 s=\'0\'+2k;h s.38(s.1C-2)};4 19=f(P){2H(1h){O\'2R\':r=P.1l(x);h t v(r[0],Q(r[1])-1,r[2]);O\'1R\':r=P.1l(x);h t v(r[2],Q(r[1])-1,Q(r[0]));O\'2L\':r=P.1l(x);1N(4 m=0;m<12;m++){9(r[1].1j()==X[m].1J(0,3).1j()){h t v(Q(r[2]),m,Q(r[0]))}}h M;O\'2v\':2D:4 1G=1G?1G:[2,1,0];r=P.1l(x);h t v(r[2],Q(r[0])-1,Q(r[1]))}};4 1F=f(d){4 18=d.g();4 1g=1P(d.k()+1);4 1b=1P(d.14());2H(1h){O\'2R\':h 18+x+1g+x+1b;O\'1R\':h 1b+x+1g+x+18;O\'2L\':h 1b+x+X[d.k()].1J(0,3)+x+18;O\'2v\':2D:h 1g+x+1b+x+18}};4 Y=f(P){4 U=t v();9(P==M){d=t v(U.g(),U.k(),1)}I{d=P;d.2i(1)}9((d.k()<G.k()&&d.g()==G.g())||d.g()<G.g()){d=t v(G.g(),G.k(),1)}I 9((d.k()>H.k()&&d.g()==H.g())||d.g()>H.g()){d=t v(H.g(),H.k(),1)}4 R=8("<j></j>").q(\'u\',\'B-D\');4 1q=17;4 2b=G.14();4 1s=\'\';9(!(d.k()==G.k()&&d.g()==G.g())){1q=C;4 2d=d.k()==0?t v(d.g()-1,11,1):t v(d.g(),d.k()-1,1);4 2c=8("<a></a>").q(\'13\',\'Z:;\').J(W.p).1a(f(){8.E.1S(2d,l);h C});1s=8("<j></j>").q(\'u\',\'1o-37\').J(\'&36;\').o(2c)}4 1B=17;4 1Z=H.14();1H=\'\';9(!(d.k()==H.k()&&d.g()==H.g())){1B=C;4 1X=t v(d.g(),d.k()+1,1);4 1V=8("<a></a>").q(\'13\',\'Z:;\').J(W.n).1a(f(){8.E.1S(1X,l);h C});1H=8("<j></j>").q(\'u\',\'1o-30\').J(\'&2Y;\').2W(1V)}4 1U=8("<a></a>").q(\'13\',\'Z:;\').J(W.c).1a(f(){8.E.2O()});R.o(8("<j></j>").q(\'u\',\'1o-2S\').o(1U),8("<2Q></2Q>").J(X[d.k()]+\' \'+d.g()));4 1T=8("<1n></1n>");1N(4 i=N;i<N+7;i++){4 L=i%7;4 1k=1p[L];1T.o(8("<2P></2P>").q({\'41\':\'40\',\'3Z\':1k,\'1Q\':1k,\'u\':(L==0||L==6?\'2M\':\'L\')}).J(1k.1J(0,1)))}4 1O=8("<2K></2K>");4 2G=(t v(d.g(),d.k()+1,0)).14();4 y=N-d.3U();9(y>0)y-=7;4 2F=(t v()).14();4 2B=d.k()==U.k()&&d.g()==U.g();4 w=0;2z(w++<6){4 1K=8("<1n></1n>");1N(4 i=0;i<7;i++){4 L=(N+i)%7;4 16={\'u\':(L==0||L==6?\'2M \':\'L \')};9(y<0||y>=2G){V=\' \'}I 9(1q&&y<2b-1){V=y+1;16[\'u\']+=\'2x\'}I 9(1B&&y>1Z-1){V=y+1;16[\'u\']+=\'2x\'}I{d.2i(y+1);4 1I=1F(d);V=8("<a></a>").q({\'13\':\'Z:;\',\'2A\':1I}).J(y+1).1a(f(e){8.E.2C(8.q(l,\'2A\'),l);h C})[0];9(S&&S==1I){8(V).q(\'u\',\'3R\')}}9(2B&&y+1==2F){16[\'u\']+=\'U\'}1K.o(8("<2t></2t>").q(16).o(V));y++}1O.o(1K)}R.o(8("<2s></2s>").q(\'3O\',2).o("<1L></1L>").2q("1L").o(1T).1M().o(1O.3N())).o(1s).o(1H);9(8.2p.2o){4 1D=[\'<1D u="3L" 3K="-1" 3J="3I.J" \',\'3F="1x:2m; 3D:3C;\',\'3B: 0;\',\'3A:0;\',\'z-3z:-1; 3y:3w(3v=\\\'0\\\');\',\'3u:2h;\',\'3t:2h"/>\'].3s(\'\');R.o(1y.3r(1D))}R.2g({\'1x\':\'2m\'});h R[0]};4 10=f(c){8(\'j.B-D a\',A[0]).1w();8(\'j.B-D\',A[0]).2f();8(\'j.B-D\',A[0]).3p();A.o(c)};4 T=f(){8(\'j.B-D a\',A).1w();8(\'j.B-D\',A).2f();8(\'j.B-D\',A).2g({\'1x\':\'3o\'});8(1y).1w(\'2e\',1u);3m A;A=3l};4 3k=f(e){4 2a=e.29?e.29:(e.28?e.28:0);9(2a==27){T()}h C};4 1u=f(e){9(!1f){4 1t=8.2p.2o?1v.3h.3g:e.1t;4 26=8(1t).1m(\'j.B-D-1r\');9(26.3f(0).3e!=\'1d-1e-25\'){T()}}};h{24:f(){h W.b},2j:f(){9(A){T()}l.3c();4 F=8(\'F\',8(l).1m(\'F\')[0])[0];G=F.1A;H=F.15;N=F.N;A=8(l).1M().2q(\'>j.B-D-1r\');4 d=8(F).22();9(d!=\'\'){9(1F(19(d))==d){S=d;10(Y(19(d)))}I{S=C;10(Y())}}I{S=C;10(Y())}8(1y).2l(\'2e\',1u)},1S:f(d,e){1f=17;10(Y(d));1f=C},2C:f(d,K){39=d;4 $1z=8(\'F\',8(K).1m(\'F\')[0]);$1z.22(d);$1z.3G(\'3H\');T(K)},2O:f(){T(l)},2u:f(i){i.21=17},2n:f(i){h i.21!=M},34:f(20,1E){1h=20.1j();x=1E?1E:"/"},33:f(1Y,2r,1W){1p=1Y;X=2r;W=1W},2J:f(i,w){9(w==M)w={};9(w.2y==M){i.1A=t v()}I{i.1A=19(w.2y)}9(w.2w==M){i.15=t v();i.15.2Z(i.15.g()+5)}I{i.15=19(w.2w)};i.N=w.2I==M?0:w.2I}}}();8.2E.1m=f(s){4 K=l;2z(17){9(8(s,K[0]).1C>0){h(K)}K=K.1M();9(K[0].1C==0){h C}}};8.2E.E=f(a){l.2V(f(){9(l.3Y.1j()!=\'F\')h;8.E.2J(l,a);9(!8.E.2n(l)){4 1i=8.E.24();4 1c;9(a&&a.2U){1c=8(l).q(\'1Q\',1i).2T(\'1d-1e\')}I{1c=8("<a></a>").q({\'13\':\'Z:;\',\'u\':\'1d-1e\',\'1Q\':1i}).o("<2N>"+1i+"</2N>")}8(l).44(\'<j u="1d-1e-25"></j>\').46(8(\'<j></j>\').q(\'u\',\'B-D-1r\').o(8("<j></j>").q({\'u\':\'B-D\'})),1c);1c.2l(\'1a\',8.E.2j);8.E.2u(l)}});h l};',62,255,'||||var||||jQuery|if||||||function|getFullYear|return||div|getMonth|this|||append||attr|dParts||new|class|Date||dateSeparator|curDay||_openCal|popup|false|calendar|datePicker|input|_firstDate|_lastDate|else|html|ele|weekday|undefined|_firstDayOfWeek|case|dIn|Number|jCalDiv|_selectedDate|_closeDatePicker|today|dayStr|navLinks|months|_getCalendarDiv|javascript|_draw|||href|getDate|_endDate|atts|true|dY|_strToDate|click|dD|calBut|date|picker|_drawingMonth|dM|dateFormat|chooseDate|toLowerCase|day|split|findClosestParent|tr|link|days|firstMonth|wrapper|prevLinkDiv|target|_checkMouse|window|unbind|display|document|theInput|_startDate|finalMonth|length|iframe|separator|_dateToStr|parts|nextLinkDiv|dStr|substr|thisRow|thead|parent|for|tBody|_zeroPad|title|dmy|changeMonth|headRow|closeLink|nextLink|aNavLinks|nextMonth|aDays|lastDate|format|_inited|val|console|getChooseDateStr|holder|cp||which|keyCode|key|firstDate|prevLink|lastMonth|mousedown|empty|css|3000px|setDate|show|num|bind|block|isInited|msie|browser|find|aMonths|table|td|setInited|mdy|endDate|inactive|startDate|while|rel|thisMonth|selectDate|default|fn|todayDate|lastDay|switch|firstDayOfWeek|setDateWindow|tbody|dmmy|weekend|span|closeCalendar|th|h3|ymd|close|addClass|inputClick|each|prepend|Saturday|gt|setFullYear|next|Friday|April|setLanguageStrings|setDateFormat|Thursday|lt|prev|substring|selectedDate|Wednesday|March|blur|Tuesday|className|get|srcElement|event|Monday|February|_handleKeys|null|delete|Sunday|none|remove|January|createElement|join|height|width|Opacity|Alpha|December|filter|index|left|top|absolute|position|November|style|trigger|change|blank|src|tabindex|bgiframe|October|children|cellspacing|Choose|September|selected|Close|August|getDay|Next|July|log|nodeName|abbr|col|scope|Prev|June|wrap|May|after'.split('|'),0,{}))
/*
 * jQuery corner plugin
 *
 * version 1.7 (1/26/2007)
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

/**
 * The corner() method provides a simple way of styling DOM elements.
 *
 * corner() takes a single string argument:  $().corner("effect corners width")
 *
 *   effect:  The name of the effect to apply, such as round or bevel.
 *            If you don't specify an effect, rounding is used.
 *
 *   corners: The corners can be one or more of top, bottom, tr, tl, br, or bl.
 *            By default, all four corners are adorned.
 *
 *   width:   The width specifies the width of the effect; in the case of rounded corners this
 *            will be the radius of the width.
 *            Specify this value using the px suffix such as 10px, and yes it must be pixels.
 *
 * For more details see: http://methvin.com/jquery/jq-corner.html
 * For a full demo see:  http://malsup.com/jquery/corner/
 *
 *
 * @example $('.adorn').corner();
 * @desc Create round, 10px corners
 *
 * @example $('.adorn').corner("25px");
 * @desc Create round, 25px corners
 *
 * @example $('.adorn').corner("notch bottom");
 * @desc Create notched, 10px corners on bottom only
 *
 * @example $('.adorn').corner("tr dog 25px");
 * @desc Create dogeared, 25px corner on the top-right corner only
 *
 * @example $('.adorn').corner("round 8px").parent().css('padding', '4px').corner("round 10px");
 * @desc Create a rounded border effect by styling both the element and its parent
 *
 * @name corner
 * @type jQuery
 * @param String options Options which control the corner style
 * @cat Plugins/Corner
 * @return jQuery
 * @author Dave Methvin (dave.methvin@gmail.com)
 * @author Mike Alsup (malsup@gmail.com)
 */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('k.2i.23=C(o){C E(s){7 s=t(s).2b(16);6(s.27<2)?\'0\'+s:s};C W(q){N(;q&&q.1X.1e()!=\'1R\';q=q.K){7 v=k.r(q,\'1o\');n(v.1Y(\'z\')>=0){z=v.u(/\\d+/g);6\'#\'+E(z[0])+E(z[1])+E(z[2])}n(v&&v!=\'1x\')6 v}6\'#1H\'};C 1l(i){2d(1g){8\'a\':6 5.a(4*(1-5.y(5.S(i/4))));8\'1s\':6 5.a(4*(1+5.y(5.S(i/4))));8\'1a\':6 5.a(4*(1-5.y(5.2f(i/4))));8\'12\':6 5.a(4*(5.y(5.S((4-i-1)/4))));8\'1t\':6 5.a(4*(5.Y(i,4/i)));8\'19\':6 5.a(4*(5.Y(4,(4-i-1))));8\'1u\':6 5.a(4*(5.1B(i)));8\'1A\':6 5.a(4*(5.y(i)));8\'15\':6 5.a(4*(5.1C(i)));8\'1m\':6 5.a(4*(5.2g(i)));8\'1p\':6 5.a(4*(5.1D((4-i-1),4)));8\'1k\':6(i&1)?(i+1):4;8\'1f\':6(i&2)?(i+1):4;8\'1c\':6(i&3)?(i+1):4;8\'14\':6(i%2)*4;8\'11\':6 4;8\'Z\':6 i+1}};o=(o||"").1e();7 U=/U/.x(o);7 H=((o.u(/H:(#[0-1d-f]+)/)||[])[1]);7 Q=((o.u(/Q:(#[0-1d-f]+)/)||[])[1]);7 4=t((o.u(/(\\d+)c/)||[])[1])||10;7 1h=/a|Z|11|12|1s|1a|1t|19|1u|1A|14|15|1p|1m|1c|1f|1k/;7 1g=((o.u(1h)||[\'a\'])[0]);7 P={T:0,B:1};7 h={G:/1j|1K/.x(o),F:/1j|1M/.x(o),V:/J|1O/.x(o),M:/J|1P/.x(o)};n(!h.G&&!h.F&&!h.V&&!h.M)h={G:1,F:1,V:1,M:1};7 p=13.18(\'17\');p.b.1U=\'1V\';p.b.X=\'1W\';p.b.1o=Q||\'1x\';p.b.1v=\'O\';6 9.1Z(C(20){7 l={T:t(k.r(9,\'22\'))||0,R:t(k.r(9,\'24\'))||0,B:t(k.r(9,\'2j\'))||0,L:t(k.r(9,\'28\'))||0};n(k.1q.1r)9.b.29=1;n(!U)9.b.2e=\'A\';p.b.2h=H||W(9.K);7 1b=k.1E(9,\'X\');N(7 j 1G P){7 D=P[j];p.b.1v=\'A \'+(h[j+\'R\']?\'O\':\'A\')+\' A \'+(h[j+\'L\']?\'O\':\'A\');7 d=13.18(\'17\');7 m=d.b;D?9.1i(d):9.1n(d,9.1w);n(D&&1b!=\'1I\'){n(k.r(9,\'I\')==\'1J\')9.b.I=\'1L\';m.I=\'1Q\';m.J=m.1S=m.1T=m.1z=\'0\';n(k.1q.1r)m.21(\'4\',\'9.K.2a\');1y m.4=\'2c%\'}1y{m.1z=!D?\'-\'+l.T+\'c -\'+l.R+\'c \'+(l.T-4)+\'c -\'+l.L+\'c\':(l.B-4)+\'c -\'+l.R+\'c -\'+l.B+\'c -\'+l.L+\'c\'}N(7 i=0;i<4;i++){7 w=5.1N(0,1l(i));7 e=p.25(26);e.b.1F=\'0 \'+(h[j+\'R\']?w:0)+\'c 0 \'+(h[j+\'L\']?w:0)+\'c\';D?d.1i(e):d.1n(e,d.1w)}}})};',62,144,'||||width|Math|return|var|case|this|round|style|px|||||opts|||jQuery|pad|ds|if||strip|node|css||parseInt|match|||test|cos|rgb|none||function|bot|hex2|TR|TL|cc|position|bottom|parentNode||BR|for|solid|edges|sc||asin||keep|BL|gpc|height|atan2|bevel||notch|bite|document|fray|wicked||div|createElement|jut|sharp|cssHeight|dog3|9a|toLowerCase|dog2|fx|re|appendChild|top|dog|getW|long|insertBefore|backgroundColor|sculpt|browser|msie|cool|slide|curl|borderStyle|firstChild|transparent|else|margin|tear|atan|tan|log|curCSS|borderWidth|in|ffffff|auto|static|tl|relative|tr|max|bl|br|absolute|html|left|padding|overflow|hidden|1px|nodeName|indexOf|each|index|setExpression|paddingTop|corner|paddingRight|cloneNode|false|length|paddingLeft|zoom|offsetWidth|toString|100|switch|border|acos|sqrt|borderColor|fn|paddingBottom'.split('|'),0,{}))

/****************************************************************
 *                                                              *
 *  curvyCorners                                                *
 *  ------------                                                *
 *                                                              *
 *  This script generates rounded corners for your divs.        *
 *                                                              *
 *  Version 1.2.11                                              *
 *  Modified by Mac Chan                                        *
 *  - pretty print and fix all errors reported by JSLint        *
 *  - include a 14k packed version                              *
 *  - change method name from corner() to curvy() to avoid      *
 *    conflict with other plugin                                *
 *  - options can be passed as object literal                   *
 *                                                              *
 *    {tl: { radius: 10 },                                      *
 *     tr: { radius: 10 },                                      *
 *     bl: { radius: 10 },                                      *
 *     br: { radius: 10 },                                      *
 *     antiAlias: true   ,                                      *
 *     autoPad: true     }                                      *
 *                                                              *
 *    or string, which is space delimited options.              *
 *                                                              *
 *    "20px top bottom tl tr bl br"                             *
 *                                                              *
 *  Version 1.2.10                                              *
 *  Modified by Stefan Holmberg - for jquery usage              *
 *  http://www.aspcode.net                                      *
 *                                                              *
 *  Version 1.2.9                                               *
 *  Copyright (c) 2006 Cameron Cooke                            *
 *  By: Cameron Cooke and Tim Hutchison.                        *
 *                                                              *
 *                                                              *
 *  Website: http://www.curvycorners.net                        *
 *  Email:   info@totalinfinity.com                             *
 *  Forum:   http://www.curvycorners.net/forum/                 *
 *                                                              *
 *                                                              *
 *  This library is free software; you can redistribute         *
 *  it and/or modify it under the terms of the GNU              *
 *  Lesser General Public License as published by the           *
 *  Free Software Foundation; either version 2.1 of the         *
 *  License, or (at your option) any later version.             *
 *                                                              *
 *  This library is distributed in the hope that it will        *
 *  be useful, but WITHOUT ANY WARRANTY; without even the       *
 *  implied warranty of MERCHANTABILITY or FITNESS FOR A        *
 *  PARTICULAR PURPOSE. See the GNU Lesser General Public       *
 *  License for more details.                                   *
 *                                                              *
 *  You should have received a copy of the GNU Lesser           *
 *  General Public License along with this library;             *
 *  Inc., 59 Temple Place, Suite 330, Boston,                   *
 *  MA 02111-1307 USA                                           *
 *                                                              *
 ****************************************************************/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(M($){8 2s={K:{o:10},N:{o:10},P:{o:10},R:{o:10},2F:1s,2M:1s,4P:["4z"]};2i.4O.4B=M(1D){8 g;a(23(1D)==\'4C\'){8 1q=J((1D.4D(/(\\d+)c/)||[])[1],10)||10;8 1t={K:/1e|K/.2k(1D),N:/1e|N/.2k(1D),P:/1U|P/.2k(1D),R:/1U|R/.2k(1D)};a(!1t.K&&!1t.N&&!1t.P&&!1t.R)1t={K:1,N:1,P:1,R:1};1w(8 j 2b 1t)1t[j]={o:1t[j]?1q:0};g=2i.32({},2s,1t)}w a(23(1D)==\'4E\'){g=2i.32({},2s,1D)}w{g=2i.32({},2s)}L 6.4F(M(){(1Y 3D(g,6)).3M()})};M 3D(){6.G=3C[1];6.g=3C[0];6.1p=2h;6.1l=2h;6.2j=1Y 2z();6.3e=2h;8 1j=1E(6.G,"T","T");8 1v=1E(6.G,"1q","1q");8 m=1E(6.G,"3N","3i-1e-1q");8 1y=1E(6.G,"4H","3i-1e-3g");8 1F=1E(6.G,"1W","3G-3g");8 Z=1E(6.G,"Z","3G-2T");8 37=1E(6.G,"O","O");8 1f=1E(6.G,"3b","3K-1e");6.1j=J(((1j!=""&&1j!="2C"&&1j.V("%")==-1)?1j.1m(0,1j.V("c")):6.G.4I));6.1v=J(((1v!=""&&1v!="2C"&&1v.V("%")==-1)?1v.1m(0,1v.V("c")):6.G.4J));6.m=J(((m!=""&&m.V("c")!==-1)?m.3J(0,m.V("c")):0));6.1F=2N(1F);6.1f=J(((1f!=""&&1f.V("c")!==-1)?1f.3J(0,1f.V("c")):0));6.1y=2N(1y);6.19=6.m+"c"+" 4K "+6.1y;6.Z=((Z!="2L")?Z:"");6.3a=6.G.2O;a(37!="1b")6.G.7.O="2q";6.G.7.3K="I";8 3L=2e.2g.29().V("4M")>-1;a(3L&&1v=="2C"&&1j=="2C")6.G.7.1q="U%";a(6.g.2M==1s&&6.1f>0)6.G.2O="";6.3M=M(){1w(8 t=0;t<2;t++){1J(t){q 0:a(6.g.K||6.g.N){8 H=1B.1O("1L");H.7.1q="U%";H.7.1T="1N";H.7.1V="1X";H.7.O="1b";H.7.2P=6.m+"c";H.7.2Q=6.m+"c";8 1c=h.27(6.g.K?6.g.K.o:0,6.g.N?6.g.N.o:0);H.7.T=1c+"c";H.7.1e=0-1c+"c";H.7.1d=0-6.m+"c";6.1p=6.G.1a(H)}v;q 1:a(6.g.P||6.g.R){8 H=1B.1O("1L");H.7.1q="U%";H.7.1T="1N";H.7.1V="1X";H.7.O="1b";H.7.2P=6.m+"c";H.7.2Q=6.m+"c";8 1k=h.27(6.g.P?6.g.P.o:0,6.g.R?6.g.R.o:0);H.7.T=1k+"c";H.7.1U=0-1k+"c";H.7.1d=0-6.m+"c";6.1l=6.G.1a(H)}v}}a(6.1p)6.G.7.3N="I";a(6.1l)6.G.7.4N="I";8 34=["N","K","R","P"];1w(8 i 2b 34){a(i>-1<4){8 p=34[i];a(!6.g[p]){a(((p=="N"||p=="K")&&6.1p!=2h)||((p=="R"||p=="P")&&6.1l!=2h)){8 f=1B.1O("1L");f.7.O="2q";f.7.1T="1N";f.7.1V="1X";a(6.Z=="")f.7.1W=6.1F;w f.7.Z=6.Z;1J(p){q"K":f.7.T=1c-6.m+"c";f.7.2o=6.g.N.o-(6.m*2)+"c";f.7.2t=6.19;f.7.2J=6.19;f.7.1d=-6.m+"c";v;q"N":f.7.T=1c-6.m+"c";f.7.2n=6.g.K.o-(6.m*2)+"c";f.7.2u=6.19;f.7.2J=6.19;f.7.1u="-"+(1c+6.m)+"c I";f.7.1d=6.m+"c";v;q"P":f.7.T=1k-6.m+"c";f.7.2o=6.g.R.o-(6.m*2)+"c";f.7.2t=6.19;f.7.2K=6.19;f.7.1d=-6.m+"c";f.7.1u="-"+(6.m)+"c -"+(6.1j+(1k+6.m))+"c";v;q"R":f.7.T=1k-6.m+"c";f.7.2n=6.g.P.o-(6.m*2)+"c";f.7.2u=6.19;f.7.2K=6.19;f.7.1d=6.m+"c";f.7.1u="-"+(1k+6.m)+"c -"+(6.1j+(1k+6.m))+"c";v}}}w{a(6.2j[6.g[p].o]){8 f=6.2j[6.g[p].o].3o(1s)}w{8 f=1B.1O("1L");f.7.T=6.g[p].o+"c";f.7.1q=6.g[p].o+"c";f.7.O="1b";f.7.1T="1N";f.7.1V="1X";8 1G=J(6.g[p].o-6.m);1w(8 s=0,j=6.g[p].o;s<j;s++){a((s+1)>=1G)8 1H=-1;w 8 1H=(h.3O(h.1M(h.Y(1G,2)-h.Y((s+1),2)))-1);a(1G!=j){a((s)>=1G)8 1K=-1;w 8 1K=h.3I(h.1M(h.Y(1G,2)-h.Y(s,2)));a((s+1)>=j)8 1P=-1;w 8 1P=(h.3O(h.1M(h.Y(j,2)-h.Y((s+1),2)))-1)}a((s)>=j)8 2Z=-1;w 8 2Z=h.3I(h.1M(h.Y(j,2)-h.Y(s,2)));a(1H>-1)6.1I(s,0,6.1F,U,(1H+1),f,-1,6.g[p].o);a(1G!=j){1w(8 X=(1H+1);X<1K;X++){a(6.g.2F){a(6.Z!=""){8 3P=(2A(s,X,1G)*U);a(3P<30){6.1I(s,X,6.1y,U,1,f,0,6.g[p].o)}w{6.1I(s,X,6.1y,U,1,f,-1,6.g[p].o)}}w{8 3S=3s(6.1F,6.1y,2A(s,X,1G));6.1I(s,X,3S,U,1,f,0,6.g[p].o,p)}}}a(6.g.2F){a(1P>=1K){a(1K==-1)1K=0;6.1I(s,1K,6.1y,U,(1P-1K+1),f,0,0)}}w{a(1P>=1H){6.1I(s,(1H+1),6.1y,U,(1P-1H),f,0,0)}}8 2G=6.1y}w{8 2G=6.1F;8 1P=1H}a(6.g.2F){1w(8 X=(1P+1);X<2Z;X++){6.1I(s,X,2G,(2A(s,X,j)*U),1,f,((6.m>0)?0:-1),6.g[p].o)}}}6.2j[6.g[p].o]=f.3o(1s)}a(p!="R"){1w(8 t=0,k=f.35.2S;t<k;t++){8 1n=f.35[t];8 26=J(1n.7.1e.1m(0,1n.7.1e.V("c")));8 25=J(1n.7.1d.1m(0,1n.7.1d.V("c")));8 2x=J(1n.7.T.1m(0,1n.7.T.V("c")));a(p=="K"||p=="P"){1n.7.1d=6.g[p].o-25-1+"c"}a(p=="N"||p=="K"){1n.7.1e=6.g[p].o-2x-26+"c"}1J(p){q"N":1n.7.1u="-"+h.1r((6.1v-6.g[p].o+6.m)+25)+"c -"+h.1r(6.g[p].o-2x-26-6.m)+"c";v;q"K":1n.7.1u="-"+h.1r((6.g[p].o-25-1)-6.m)+"c -"+h.1r(6.g[p].o-2x-26-6.m)+"c";v;q"P":1n.7.1u="-"+h.1r((6.g[p].o-25-1)-6.m)+"c -"+h.1r((6.1j+6.g[p].o+26)-6.m)+"c";v}}}}a(f){1J(p){q"K":a(f.7.O=="1b")f.7.1e="I";a(f.7.O=="1b")f.7.1d="I";a(6.1p)6.1p.1a(f);v;q"N":a(f.7.O=="1b")f.7.1e="I";a(f.7.O=="1b")f.7.2p="I";a(6.1p)6.1p.1a(f);v;q"P":a(f.7.O=="1b")f.7.1U="I";a(f.7.O=="1b")f.7.1d="I";a(6.1l)6.1l.1a(f);v;q"R":a(f.7.O=="1b")f.7.1U="I";a(f.7.O=="1b")f.7.2p="I";a(6.1l)6.1l.1a(f);v}}}}8 1Z=1Y 2z();1Z["t"]=h.1r(6.g.K.o-6.g.N.o);1Z["b"]=h.1r(6.g.P.o-6.g.R.o);1w(8 z 2b 1Z){a(z=="t"||z=="b"){a(1Z[z]){8 2I=((6.g[z+"l"].o<6.g[z+"r"].o)?z+"l":z+"r");8 u=1B.1O("1L");u.7.T=1Z[z]+"c";u.7.1q=6.g[2I].o+"c";u.7.O="1b";u.7.1T="1N";u.7.1V="1X";u.7.1W=6.1F;1J(2I){q"K":u.7.1U="I";u.7.1d="I";u.7.2t=6.19;6.1p.1a(u);v;q"N":u.7.1U="I";u.7.2p="I";u.7.2u=6.19;6.1p.1a(u);v;q"P":u.7.1e="I";u.7.1d="I";u.7.2t=6.19;6.1l.1a(u);v;q"R":u.7.1e="I";u.7.2p="I";u.7.2u=6.19;6.1l.1a(u);v}}8 S=1B.1O("1L");S.7.O="2q";S.7.1T="1N";S.7.1V="1X";S.7.1W=6.1F;S.7.Z=6.Z;1J(z){q"t":a(6.1p){a(6.g.K.o&&6.g.N.o){S.7.T=1c-6.m+"c";S.7.2n=6.g.K.o-6.m+"c";S.7.2o=6.g.N.o-6.m+"c";S.7.2J=6.19;a(6.Z!="")S.7.1u="-"+(1c+6.m)+"c I";6.1p.1a(S)}6.G.7.1u="I -"+(1c-6.m)+"c"}v;q"b":a(6.1l){a(6.g.P.o&&6.g.R.o){S.7.T=1k-6.m+"c";S.7.2n=6.g.P.o-6.m+"c";S.7.2o=6.g.R.o-6.m+"c";S.7.2K=6.19;a(6.Z!="")S.7.1u="-"+(1k+6.m)+"c -"+(6.1j+(1c+6.m))+"c";6.1l.1a(S)}}v}}}a(6.g.2M==1s&&6.1f>0){8 1C=1B.1O("1L");1C.7.O="2q";1C.2O=6.3a;1C.44="46";8 3c=h.1r(1c-6.1f);8 47=h.1r(1k-6.1f);a(1c<6.1f)1C.7.3b=3c+"c";a(1k<6.1f)1C.7.49=1k+"c";1C.7.2P=6.1f+"c";1C.7.2Q=6.1f+"c";6.3e=6.G.1a(1C)}};6.1I=M(s,X,17,2V,T,f,2T,3h){8 1g=1B.1O("1L");1g.7.T=T+"c";1g.7.1q="1N";1g.7.O="1b";1g.7.1T="1N";1g.7.1V="1X";8 1c=h.27(6.g["N"].o,6.g["K"].o);a(2T==-1&&6.Z!=""){1g.7.Z=6.Z;1g.7.1u="-"+(6.1v-(3h-s)+6.m)+"c -"+((6.1j+1c+X)-6.m)+"c"}w{1g.7.1W=17}a(2V!=U)3m(1g,2V);1g.7.1e=X+"c";1g.7.1d=s+"c";f.1a(1g)}}M 4s(3n,3p,3q){3n.4t(3p,3q.4v)}M 3s(2v,2w,1x){8 3v=J(2v.1Q(1,2),16);8 3x=J(2v.1Q(3,2),16);8 3z=J(2v.1Q(5,2),16);8 3w=J(2w.1Q(1,2),16);8 3y=J(2w.1Q(3,2),16);8 3A=J(2w.1Q(5,2),16);a(1x>1||1x<0)1x=1;8 24=h.2Y((3v*1x)+(3w*(1-1x)));a(24>21)24=21;a(24<0)24=0;8 20=h.2Y((3x*1x)+(3y*(1-1x)));a(20>21)20=21;a(20<0)20=0;8 22=h.2Y((3z*1x)+(3A*(1-1x)));a(22>21)22=21;a(22<0)22=0;L"#"+1S(24)+1S(20)+1S(22)}M 1S(31){8 2E=31/16;8 33=31%16;2E=2E-(33/16);8 3E=2W(2E);8 3R=2W(33);L 3E+\'\'+3R}M 2W(x){a((x>=0)&&(x<=9)){L x}w{1J(x){q 10:L"A";q 11:L"B";q 12:L"C";q 13:L"D";q 14:L"E";q 15:L"F"}}}M 2A(x,y,r){8 1R=0;8 1h=1Y 2z(1);8 1i=1Y 2z(1);8 18=0;8 1A="";8 W=h.1M((h.Y(r,2)-h.Y(x,2)));a((W>=y)&&(W<(y+1))){1A="3V";1h[18]=0;1i[18]=W-y;18=18+1}8 W=h.1M((h.Y(r,2)-h.Y(y+1,2)));a((W>=x)&&(W<(x+1))){1A=1A+"3X";1h[18]=W-x;1i[18]=1;18=18+1}8 W=h.1M((h.Y(r,2)-h.Y(x+1,2)));a((W>=y)&&(W<(y+1))){1A=1A+"3Y";1h[18]=1;1i[18]=W-y;18=18+1}8 W=h.1M((h.Y(r,2)-h.Y(y,2)));a((W>=x)&&(W<(x+1))){1A=1A+"40";1h[18]=W-x;1i[18]=0}1J(1A){q"41":1R=h.2r(1i[0],1i[1])+((h.27(1i[0],1i[1])-h.2r(1i[0],1i[1]))/2);v;q"42":1R=1-(((1-1h[0])*(1-1i[1]))/2);v;q"43":1R=h.2r(1h[0],1h[1])+((h.27(1h[0],1h[1])-h.2r(1h[0],1h[1]))/2);v;q"4a":1R=(1i[0]*1h[1])/2;v;4b:1R=1}L 1R}M 2R(2c){3T{8 1z=2X(2c);8 2y=J(1z[0]);8 2l=J(1z[1]);8 2D=J(1z[2]);8 3j="#"+1S(2y)+1S(2l)+1S(2D)}3d(e){4e("4f 4g 4i 4j 4l 4m 4n 28 4o 4p 2b M 2R")}L 3j}M 2X(2c){8 3k=2c.1m(4,2c.V(")"));8 1z=3k.4r(", ");L 1z}M 3m(Q,1o){8 2f=((2e.2g.29().V(\'3t\')!=-1)&&(2e.2g.29().V(\'3r\')!=-1))?1s:2B;1o=(1o==U)?4u.4w:1o;a(2f&&Q.4x!="4y"){8 1z=2X(Q.7.1W);8 2y=J(1z[0]);8 2l=J(1z[1]);8 2D=J(1z[2]);Q.7.1W="4A("+2y+", "+2l+", "+2D+", "+1o/U+")"}w a(23(Q.7.1o)!="2m"){Q.7.1o=1o/U}w a(23(Q.7.3F)!="2m"){Q.7.3F=1o/U}w a(23(Q.7.3H)!="2m"){Q.7.3H="4L(1o:"+1o+")"}w a(23(Q.7.3Q)!="2m"){Q.7.3Q=1o/U}}M 3U(2a,28){1w(8 i=0;i<2a.2S;i++){a(2a[i]===28)L i}L 2B}M 3Z(2a,28){1w(8 39 2b 2a){a(39===28)L 1s}L 2B}M 2N(17){8 2d="#45";a(17!=""&&17!="48"){a(17.1Q(0,3)=="4c"){2d=2R(17)}w a(17.2S==4){2d="#"+17.1m(1,2)+17.1m(1,2)+17.1m(2,3)+17.1m(2,3)+17.1m(3,4)+17.1m(3,4)}w{2d=17}}L 2d}M 1E(Q,38,3l){8 2f=((2e.2g.29().V(\'3t\')!=-1)&&(2e.2g.29().V(\'3r\')!=-1))?1s:2B;3T{a(Q.36){8 2U=3W("Q.36."+38)}w{a(2f&&Q.7.2H=="2L"){Q.7.2H="";8 3B=1s}8 2U=1B.4h.4k(Q,\'\').4q(3l);a(2f&&3B){Q.7.2H="2L"}}}3d(e){}L 2U}M 4G(3f){L 1Y 3u("4d 3u:\\n"+3f)}})(2i);',62,300,'||||||this|style|var||if||px|||newCorner|settings|Math|||||borderWidth||radius|cc|case||intx||newFiller|break|else||||||||||box|newMainContainer|0px|parseInt|tl|return|function|tr|position|bl|obj|br|newFillerBar|height|100|indexOf|intersect|inty|pow|backgroundImage||||||||colour|point|borderString|appendChild|absolute|topMaxRadius|left|top|boxPadding|pixel|xvalues|yvalues|boxHeight|botMaxRadius|bottomContainer|substring|pixelBar|opacity|topContainer|width|abs|true|opts|backgroundPosition|boxWidth|for|Col1Fraction|borderColour|rgbArray|whatsides|document|contentContainer|options|get_style|boxColour|borderRadius|y1|drawPixel|switch|y2|DIV|sqrt|1px|createElement|y3|substr|pixelfraction|IntToHex|fontSize|bottom|overflow|backgroundColor|hidden|new|radiusDiff|endGreen|255|endBlue|typeof|endRed|pixelBarLeft|pixelBarTop|max|value|toLowerCase|array|in|rgbColour|returnColour|navigator|isSafari|userAgent|null|jQuery|masterCorners|test|green|undefined|marginLeft|marginRight|right|relative|min|defaults|borderLeft|borderRight|Col1|Col2|pixelBarHeight|red|Array|pixelFraction|false|auto|blue|base|antiAlias|outsideColour|display|smallerCornerType|borderTop|borderBottom|none|autoPad|format_colour|innerHTML|paddingLeft|paddingRight|rgb2Hex|length|image|returnVal|transAmount|MakeHex|rgb2Array|round|y4||strNum|extend|rem|corners|childNodes|currentStyle|boxPosition|property|key|boxContent|paddingTop|topPadding|catch|contentDIV|errorMessage|color|cornerRadius|border|hexColour|rgbValues|propertyNS|setOpacity|parent|cloneNode|node|referenceNode|mac|BlendColour|safari|Error|red1|red2|green1|green2|blue1|blue2|wasHidden|arguments|curvyObject|baseS|MozOpacity|background|filter|ceil|slice|padding|isIE|applyCorners|borderTopWidth|floor|borderFract|KHTMLOpacity|remS|pixelcolour|try|inArray|Left|eval|Top|Right|inArrayKey|Bottom|LeftRight|TopRight|TopBottom|className|ffffff|autoPadDiv|botPadding|transparent|paddingBottom|LeftBottom|default|rgb|curvyCorners|alert|There|was|defaultView|an|error|getComputedStyle|converting|the|RGB|to|Hexadecimal|getPropertyValue|split|insertAfter|insertBefore|99|nextSibling|999|tagName|IFRAME|div|rgba|curvy|string|match|object|each|newCurvyError|borderTopColor|scrollHeight|scrollWidth|solid|alpha|msie|borderBottomWidth|fn|validTags'.split('|'),0,{}))

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


/**

http://www.reach1to1.com/sandbox/jquery/testform.html


 * This function sets the values of form element variables from an array
 * This is the reverse process of Mark Constable's serialize function
 * It is expected to be used as a call back for an ajax call that retrieves the form data
 * @param data : array or hash containing name,value pairs for elements in the form
 *
 * Examples
 *
 * 1. Deserialize from an array
 *    $('#form-id').deserialize([{'name':'firstname','value':'John'},{'name':'lastname','value':'Resig'}]);
 *
 * 2. Deserialize from a hash(object)
 *    $('#form-id').deserialize({'firstname':'John','lastname':'Resig'});
 *
 * 3. Deserialize multiple config for select/radio/checkbox
 *    $('#form-id').deserialize({'toppings':['capsicum','mushroom','extra_cheese'],'size':'medium'})
 * which will set the corresponding select/radio/checkbox config for toppings
 *
 * 3. Deserialize multiple config for select/radio/checkbox and with isPHPnaming = true
 *    $('#form-id').deserialize({'toppings':['capsicum','mushroom','extra_cheese'],'size':'medium'},{isPHPnaming:true})
 * which will set the corresponding select/radio/checkbox config for toppings, but will ignore select names ending with []
 *
 * @return         the jQuery Object
 * @author         Ashutosh Bijoor (bijoor@reach1to1.com)
 * @version        0.35
 */
$.fn.deserialize = function(d,config) {
	var data= d;
	me  = this;

	if (d === undefined) {
		return me;
	}

	config = $.extend({ isPHPnaming	: false,
						overwrite	: true},config);

	// check if data is an array, and convert to hash, converting multiple entries of
	// same name to an array
	if (d.constructor == Array)	{
		data={};
		for(var i=0; i<d.length; i++) {
			if (typeof data[d[i].name] != 'undefined') {
				if (data[d[i].name].constructor!= Array) {
					data[d[i].name]=[data[d[i].name],d[i].value];
				} else {
					data[d[i].name].push(d[i].value);
				}
			} else {
				data[d[i].name]=d[i].value;
			}
		}
	}

	// now data is a hash. insert each parameter into the form
	$('input,select,textarea',me)
	.each(function() {
			  var p=this.name;
			  var v = [];

			  // handle wierd PHP names if required
			  if (config.isPHPnaming) {
				  p=p.replace(/\[\]$/,'');
			  }
			  if(p && data[p] != undefined) {
				  v = data[p].constructor == Array ? data[p] : [data[p]];
			  }
			  // Additional parameter overwrite
			  if (config.overwrite === true || data[p]) {
				  switch(this.type || this.tagName.toLowerCase()) {
				  case "radio":
				  case "checkbox":
					  this.checked=false;
					  for(var i=0;i<v.length;i++) {
						  this.checked|=(this.value!='' && v[i]==this.value);
					  }
					  break;
				  case "select-multiple" || "select":
					  for( i=0;i<this.options.length;i++) {
						  this.options[i].selected=false;
						  for(var j=0;j<v.length;j++) {
							  this.options[i].selected|=(this.options[i].value!='' && this.options[i].value==v[j]);
						  }
					  }
					  break;
				  case "button":
				  case "submit":
					  this.value=v.length>0?v.join(','):this.value;
						  break;
				  default:
					  this.value=v.join(',');
				  }
			  }
		  });
	return me;
};




/*
 * jQuery Form Plugin
 * @requires jQuery v1.1 or later
 *
 * Examples at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id$
 */
 (function($) {
/**
 * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX.
 *
 * ajaxSubmit accepts a single argument which can be either a success callback function
 * or an options Object.  If a function is provided it will be invoked upon successful
 * completion of the submit and will be passed the response from the server.
 * If an options Object is provided, the following attributes are supported:
 *
 *  target:   Identifies the element(s) in the page to be updated with the server response.
 *            This value may be specified as a jQuery selection string, a jQuery object,
 *            or a DOM element.
 *            default value: null
 *
 *  url:      URL to which the form data will be submitted.
 *            default value: value of form's 'action' attribute
 *
 *  type:     The method in which the form data should be submitted, 'GET' or 'POST'.
 *            default value: value of form's 'method' attribute (or 'GET' if none found)
 *
 *  data:     Additional data to add to the request, specified as key/value pairs (see $.ajax).
 *
 *  beforeSubmit:  Callback method to be invoked before the form is submitted.
 *            default value: null
 *
 *  success:  Callback method to be invoked after the form has been successfully submitted
 *            and the response has been returned from the server
 *            default value: null
 *
 *  dataType: Expected dataType of the response.  One of: null, 'xml', 'script', or 'json'
 *            default value: null
 *
 *  semantic: Boolean flag indicating whether data must be submitted in semantic order (slower).
 *            default value: false
 *
 *  resetForm: Boolean flag indicating whether the form should be reset if the submit is successful
 *
 *  clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful
 *
 *
 * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for
 * validating the form data.  If the 'beforeSubmit' callback returns false then the form will
 * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data
 * in array format, the jQuery object, and the options object passed into ajaxSubmit.
 * The form data array takes the following form:
 *
 *     [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 *
 * If a 'success' callback method is provided it is invoked after the response has been returned
 * from the server.  It is passed the responseText or responseXML value (depending on dataType).
 * See jQuery.ajax for further details.
 *
 *
 * The dataType option provides a means for specifying how the server response should be handled.
 * This maps directly to the jQuery.httpData method.  The following values are supported:
 *
 *      'xml':    if dataType == 'xml' the server response is treated as XML and the 'success'
 *                   callback method, if specified, will be passed the responseXML value
 *      'json':   if dataType == 'json' the server response will be evaluted and passed to
 *                   the 'success' callback, if specified
 *      'script': if dataType == 'script' the server response is evaluated in the global context
 *
 *
 * Note that it does not make sense to use both the 'target' and 'dataType' options.  If both
 * are provided the target will be ignored.
 *
 * The semantic argument can be used to force form serialization in semantic order.
 * This is normally true anyway, unless the form contains input elements of type='image'.
 * If your form must be submitted with name/value pairs in semantic order and your form
 * contains an input of type='image" then pass true for this arg, otherwise pass false
 * (or nothing) to avoid the overhead for this logic.
 *
 *
 * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this:
 *
 * $("#form-id").submit(function() {
 *     $(this).ajaxSubmit(options);
 *     return false; // cancel conventional submit
 * });
 *
 * When using ajaxForm(), however, this is done for you.
 *
 * @example
 * $('#myForm').ajaxSubmit(function(data) {
 *     alert('Form submit succeeded! Server returned: ' + data);
 * });
 * @desc Submit form and alert server response
 *
 *
 * @example
 * var options = {
 *     target: '#myTargetDiv'
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Submit form and update page element with server response
 *
 *
 * @example
 * var options = {
 *     success: function(responseText) {
 *         alert(responseText);
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Submit form and alert the server response
 *
 *
 * @example
 * var options = {
 *     beforeSubmit: function(formArray, jqForm) {
 *         if (formArray.length == 0) {
 *             alert('Please enter data.');
 *             return false;
 *         }
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Pre-submit validation which aborts the submit operation if form data is empty
 *
 *
 * @example
 * var options = {
 *     url: myJsonUrl.php,
 *     dataType: 'json',
 *     success: function(data) {
 *        // 'data' is an object representing the the evaluated json data
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc json data returned and evaluated
 *
 *
 * @example
 * var options = {
 *     url: myXmlUrl.php,
 *     dataType: 'xml',
 *     success: function(responseXML) {
 *        // responseXML is XML document object
 *        var data = $('myElement', responseXML).text();
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc XML data returned from server
 *
 *
 * @example
 * var options = {
 *     resetForm: true
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc submit form and reset it if successful
 *
 * @example
 * $('#myForm).submit(function() {
 *    $(this).ajaxSubmit();
 *    return false;
 * });
 * @desc Bind form's submit event to use ajaxSubmit
 *
 *
 * @name ajaxSubmit
 * @type jQuery
 * @param options  object literal containing options which control the form submission process
 * @cat Plugins/Form
 * @return jQuery
 */
$.fn.ajaxSubmit = function(options) {
    if (typeof options == 'function')
        options = { success: options };

    options = $.extend({
        url:  this.attr('action') || window.location,
        type: this.attr('method') || 'GET'
    }, options || {});

    // hook for manipulating the form data before it is extracted;
    // convenient for use with rich editors like tinyMCE or FCKEditor
    var veto = {};
    $.event.trigger('form.pre.serialize', [this, options, veto]);
    if (veto.veto) return this;

    var a = this.formToArray(options.semantic);
	if (options.data) {
	    for (var n in options.data)
	        a.push( { name: n, value: options.data[n] } );
	}

    // give pre-submit callback an opportunity to abort the submit
    if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this;

    // fire vetoable 'validate' event
    $.event.trigger('form.submit.validate', [a, this, options, veto]);
    if (veto.veto) return this;

    var q = $.param(a);//.replace(/%20/g,'+');

    if (options.type.toUpperCase() == 'GET') {
        options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
        options.data = null;  // data is null for 'get'
    }
    else
        options.data = q; // data is the query string for 'post'

    var $form = this, callbacks = [];
    if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
    if (options.clearForm) callbacks.push(function() { $form.clearForm(); });

    // perform a load on the target only if dataType is not provided
    if (!options.dataType && options.target) {
        var oldSuccess = options.success || function(){};
        callbacks.push(function(data) {
            if (this.evalScripts)
                $(options.target).attr("innerHTML", data).evalScripts().each(oldSuccess, arguments);
            else // jQuery v1.1.4
                $(options.target).html(data).each(oldSuccess, arguments);
        });
    }
    else if (options.success)
        callbacks.push(options.success);

    options.success = function(data, status) {
        for (var i=0, max=callbacks.length; i < max; i++)
            callbacks[i](data, status, $form);
    };

    // are there files to upload?
    var files = $('input:file', this).fieldValue();
    var found = false;
    for (var j=0; j < files.length; j++)
        if (files[j])
            found = true;

    if (options.iframe || found) // options.iframe allows user to force iframe mode
        fileUpload();
    else
        $.ajax(options);

    // fire 'notify' event
    $.event.trigger('form.submit.notify', [this, options]);
    return this;


    // private function for handling file uploads (hat tip to YAHOO!)
    function fileUpload() {
        var form = $form[0];
        var opts = $.extend({}, $.ajaxSettings, options);

        var id = 'jqFormIO' + $.fn.ajaxSubmit.counter++;
        var $io = $('<iframe id="' + id + '" name="' + id + '" />');
        var io = $io[0];
        var op8 = $.browser.opera && window.opera.version() < 9;
        if ($.browser.msie || op8) io.src = 'javascript:false;document.write("");';
        $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });

        var xhr = { // mock object
            responseText: null,
            responseXML: null,
            status: 0,
            statusText: 'n/a',
            getAllResponseHeaders: function() {},
            getResponseHeader: function() {},
            setRequestHeader: function() {}
        };

        var g = opts.global;
        // trigger ajax global events so that activity/block indicators work like normal
        if (g && ! $.active++) $.event.trigger("ajaxStart");
        if (g) $.event.trigger("ajaxSend", [xhr, opts]);

        var cbInvoked = 0;
        var timedOut = 0;

        // take a breath so that pending repaints get some cpu time before the upload starts
        setTimeout(function() {
            $io.appendTo('body');
            // jQuery's event binding doesn't work for iframe events in IE
            io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);

            // make sure form attrs are set
            var encAttr = form.encoding ? 'encoding' : 'enctype';
            var t = $form.attr('target');
            $form.attr({
                target:   id,
                method:  'POST',
                action:   opts.url
            });
            form[encAttr] = 'multipart/form-data';

            // support timout
            if (opts.timeout)
                setTimeout(function() { timedOut = true; cb(); }, opts.timeout);

            form.submit();
            $form.attr('target', t); // reset target
        }, 10);

        function cb() {
            if (cbInvoked++) return;

            io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);

            var ok = true;
            try {
                if (timedOut) throw 'timeout';
                // extract the server response from the iframe
                var data, doc;
                doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
                xhr.responseText = doc.body ? doc.body.innerHTML : null;
                xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;

                if (opts.dataType == 'json' || opts.dataType == 'script') {
                    var ta = doc.getElementsByTagName('textarea')[0];
                    data = ta ? ta.value : xhr.responseText;
                    if (opts.dataType == 'json')
                        eval("data = " + data);
                    else
                        $.globalEval(data);
                }
                else if (opts.dataType == 'xml') {
                    data = xhr.responseXML;
                    if (!data && xhr.responseText != null)
                        data = toXml(xhr.responseText);
                }
                else {
                    data = xhr.responseText;
                }
            }
            catch(e){
                ok = false;
                $.handleError(opts, xhr, 'error', e);
            }

            // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
            if (ok) {
                opts.success(data, 'success');
                if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
            }
            if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
            if (g && ! --$.active) $.event.trigger("ajaxStop");
            if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');

            // clean up
            setTimeout(function() {
                $io.remove();
                xhr.responseXML = null;
            }, 100);
        };

        function toXml(s, doc) {
            if (window.ActiveXObject) {
                doc = new ActiveXObject('Microsoft.XMLDOM');
                doc.async = 'false';
                doc.loadXML(s);
            }
            else
                doc = (new DOMParser()).parseFromString(s, 'text/xml');
            return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
        };
    };
};
$.fn.ajaxSubmit.counter = 0; // used to create unique iframe ids

/**
 * ajaxForm() provides a mechanism for fully automating form submission.
 *
 * The advantages of using this method instead of ajaxSubmit() are:
 *
 * 1: This method will include coordinates for <input type="image" /> elements (if the element
 *    is used to submit the form).
 * 2. This method will include the submit element's name/value data (for the element that was
 *    used to submit the form).
 * 3. This method binds the submit() method to the form for you.
 *
 * Note that for accurate x/y coordinates of image submit elements in all browsers
 * you need to also use the "dimensions" plugin (this method will auto-detect its presence).
 *
 * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
 * passes the options argument along after properly binding events for submit elements and
 * the form itself.  See ajaxSubmit for a full description of the options argument.
 *
 *
 * @example
 * var options = {
 *     target: '#myTargetDiv'
 * };
 * $('#myForm').ajaxSForm(options);
 * @desc Bind form's submit event so that 'myTargetDiv' is updated with the server response
 *       when the form is submitted.
 *
 *
 * @example
 * var options = {
 *     success: function(responseText) {
 *         alert(responseText);
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Bind form's submit event so that server response is alerted after the form is submitted.
 *
 *
 * @example
 * var options = {
 *     beforeSubmit: function(formArray, jqForm) {
 *         if (formArray.length == 0) {
 *             alert('Please enter data.');
 *             return false;
 *         }
 *     }
 * };
 * $('#myForm').ajaxSubmit(options);
 * @desc Bind form's submit event so that pre-submit callback is invoked before the form
 *       is submitted.
 *
 *
 * @name   ajaxForm
 * @param  options  object literal containing options which control the form submission process
 * @return jQuery
 * @cat    Plugins/Form
 * @type   jQuery
 */
$.fn.ajaxForm = function(options) {
    return this.ajaxFormUnbind().submit(submitHandler).each(function() {
        // store options in hash
        this.formPluginId = $.fn.ajaxForm.counter++;
        $.fn.ajaxForm.optionHash[this.formPluginId] = options;
        $(":submit,input:image", this).click(clickHandler);
    });
};

$.fn.ajaxForm.counter = 1;
$.fn.ajaxForm.optionHash = {};

function clickHandler(e) {
    var $form = this.form;
    $form.clk = this;
    if (this.type == 'image') {
        if (e.offsetX != undefined) {
            $form.clk_x = e.offsetX;
            $form.clk_y = e.offsetY;
        } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
            var offset = $(this).offset();
            $form.clk_x = e.pageX - offset.left;
            $form.clk_y = e.pageY - offset.top;
        } else {
            $form.clk_x = e.pageX - this.offsetLeft;
            $form.clk_y = e.pageY - this.offsetTop;
        }
    }
    // clear form vars
    setTimeout(function() { $form.clk = $form.clk_x = $form.clk_y = null; }, 10);
};

function submitHandler() {
    // retrieve options from hash
    var id = this.formPluginId;
    var options = $.fn.ajaxForm.optionHash[id];
    $(this).ajaxSubmit(options);
    return false;
};

/**
 * ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
 *
 * @name   ajaxFormUnbind
 * @return jQuery
 * @cat    Plugins/Form
 * @type   jQuery
 */
$.fn.ajaxFormUnbind = function() {
    this.unbind('submit', submitHandler);
    return this.each(function() {
        $(":submit,input:image", this).unbind('click', clickHandler);
    });

};

/**
 * formToArray() gathers form element data into an array of objects that can
 * be passed to any of the following ajax functions: $.get, $.post, or load.
 * Each object in the array has both a 'name' and 'value' property.  An example of
 * an array for a simple login form might be:
 *
 * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
 *
 * It is this array that is passed to pre-submit callback functions provided to the
 * ajaxSubmit() and ajaxForm() methods.
 *
 * The semantic argument can be used to force form serialization in semantic order.
 * This is normally true anyway, unless the form contains input elements of type='image'.
 * If your form must be submitted with name/value pairs in semantic order and your form
 * contains an input of type='image" then pass true for this arg, otherwise pass false
 * (or nothing) to avoid the overhead for this logic.
 *
 * @example var data = $("#myForm").formToArray();
 * $.post( "myscript.cgi", data );
 * @desc Collect all the data from a form and submit it to the server.
 *
 * @name formToArray
 * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
 * @type Array<Object>
 * @cat Plugins/Form
 */
$.fn.formToArray = function(semantic) {
    var a = [];
    if (this.length == 0) return a;

    var form = this[0];
    var els = semantic ? form.getElementsByTagName('*') : form.elements;
    if (!els) return a;
    for(var i=0, max=els.length; i < max; i++) {
        var el = els[i];
        var n = el.name;
        if (!n) continue;

        if (semantic && form.clk && el.type == "image") {
            // handle image inputs on the fly when semantic == true
            if(!el.disabled && form.clk == el)
                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
            continue;
        }

        var v = $.fieldValue(el, true);
        if (v && v.constructor == Array) {
            for(var j=0, jmax=v.length; j < jmax; j++)
                a.push({name: n, value: v[j]});
        }
        else if (v !== null && typeof v != 'undefined')
            a.push({name: n, value: v});
    }

    if (!semantic && form.clk) {
        // input type=='image' are not found in elements array! handle them here
        var inputs = form.getElementsByTagName("input");
        for(var i=0, max=inputs.length; i < max; i++) {
            var input = inputs[i];
            var n = input.name;
            if(n && !input.disabled && input.type == "image" && form.clk == input)
                a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
        }
    }
    return a;
};


/**
 * Serializes form data into a 'submittable' string. This method will return a string
 * in the format: name1=value1&amp;name2=value2
 *
 * The semantic argument can be used to force form serialization in semantic order.
 * If your form must be submitted with name/value pairs in semantic order then pass
 * true for this arg, otherwise pass false (or nothing) to avoid the overhead for
 * this logic (which can be significant for very large forms).
 *
 * @example var data = $("#myForm").formSerialize();
 * $.ajax('POST', "myscript.cgi", data);
 * @desc Collect all the data from a form into a single string
 *
 * @name formSerialize
 * @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
 * @type String
 * @cat Plugins/Form
 */
$.fn.formSerialize = function(semantic) {
    //hand off to jQuery.param for proper encoding
    return $.param(this.formToArray(semantic));
};


/**
 * Serializes all field elements in the jQuery object into a query string.
 * This method will return a string in the format: name1=value1&amp;name2=value2
 *
 * The successful argument controls whether or not serialization is limited to
 * 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.
 *
 * @example var data = $("input").formSerialize();
 * @desc Collect the data from all successful input elements into a query string
 *
 * @example var data = $(":radio").formSerialize();
 * @desc Collect the data from all successful radio input elements into a query string
 *
 * @example var data = $("#myForm :checkbox").formSerialize();
 * @desc Collect the data from all successful checkbox input elements in myForm into a query string
 *
 * @example var data = $("#myForm :checkbox").formSerialize(false);
 * @desc Collect the data from all checkbox elements in myForm (even the unchecked ones) into a query string
 *
 * @example var data = $(":input").formSerialize();
 * @desc Collect the data from all successful input, select, textarea and button elements into a query string
 *
 * @name fieldSerialize
 * @param successful true if only successful controls should be serialized (default is true)
 * @type String
 * @cat Plugins/Form
 */
$.fn.fieldSerialize = function(successful) {
    var a = [];
    this.each(function() {
        var n = this.name;
        if (!n) return;
        var v = $.fieldValue(this, successful);
        if (v && v.constructor == Array) {
            for (var i=0,max=v.length; i < max; i++)
                a.push({name: n, value: v[i]});
        }
        else if (v !== null && typeof v != 'undefined')
            a.push({name: this.name, value: v});
    });
    //hand off to jQuery.param for proper encoding
    return $.param(a);
};


/**
 * Returns the value(s) of the element in the matched set.  For example, consider the following form:
 *
 *  <form><fieldset>
 *      <input name="A" type="text" />
 *      <input name="A" type="text" />
 *      <input name="B" type="checkbox" value="B1" />
 *      <input name="B" type="checkbox" value="B2"/>
 *      <input name="C" type="radio" value="C1" />
 *      <input name="C" type="radio" value="C2" />
 *  </fieldset></form>
 *
 *  var v = $(':text').fieldValue();
 *  // if no values are entered into the text inputs
 *  v == ['','']
 *  // if values entered into the text inputs are 'foo' and 'bar'
 *  v == ['foo','bar']
 *
 *  var v = $(':checkbox').fieldValue();
 *  // if neither checkbox is checked
 *  v === undefined
 *  // if both checkboxes are checked
 *  v == ['B1', 'B2']
 *
 *  var v = $(':radio').fieldValue();
 *  // if neither radio is checked
 *  v === undefined
 *  // if first radio is checked
 *  v == ['C1']
 *
 * The successful argument controls whether or not the field element must be 'successful'
 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.  If this value is false the value(s)
 * for each element is returned.
 *
 * Note: This method *always* returns an array.  If no valid value can be determined the
 *       array will be empty, otherwise it will contain one or more values.
 *
 * @example var data = $("#myPasswordElement").fieldValue();
 * alert(data[0]);
 * @desc Alerts the current value of the myPasswordElement element
 *
 * @example var data = $("#myForm :input").fieldValue();
 * @desc Get the value(s) of the form elements in myForm
 *
 * @example var data = $("#myForm :checkbox").fieldValue();
 * @desc Get the value(s) for the successful checkbox element(s) in the jQuery object.
 *
 * @example var data = $("#mySingleSelect").fieldValue();
 * @desc Get the value(s) of the select control
 *
 * @example var data = $(':text').fieldValue();
 * @desc Get the value(s) of the text input or textarea elements
 *
 * @example var data = $("#myMultiSelect").fieldValue();
 * @desc Get the values for the select-multiple control
 *
 * @name fieldValue
 * @param Boolean successful true if only the values for successful controls should be returned (default is true)
 * @type Array<String>
 * @cat Plugins/Form
 */
$.fn.fieldValue = function(successful) {
    for (var val=[], i=0, max=this.length; i < max; i++) {
        var el = this[i];
        var v = $.fieldValue(el, successful);
        if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
            continue;
        v.constructor == Array ? $.merge(val, v) : val.push(v);
    }
    return val;
};

/**
 * Returns the value of the field element.
 *
 * The successful argument controls whether or not the field element must be 'successful'
 * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
 * The default value of the successful argument is true.  If the given element is not
 * successful and the successful arg is not false then the returned value will be null.
 *
 * Note: If the successful flag is true (default) but the element is not successful, the return will be null
 * Note: The value returned for a successful select-multiple element will always be an array.
 * Note: If the element has no value the return value will be undefined.
 *
 * @example var data = jQuery.fieldValue($("#myPasswordElement")[0]);
 * @desc Gets the current value of the myPasswordElement element
 *
 * @name fieldValue
 * @param Element el The DOM element for which the value will be returned
 * @param Boolean successful true if value returned must be for a successful controls (default is true)
 * @type String or Array<String> or null or undefined
 * @cat Plugins/Form
 */
$.fieldValue = function(el, successful) {
    var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
    if (typeof successful == 'undefined') successful = true;

    if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
        (t == 'checkbox' || t == 'radio') && !el.checked ||
        (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
        tag == 'select' && el.selectedIndex == -1))
            return null;

    if (tag == 'select') {
        var index = el.selectedIndex;
        if (index < 0) return null;
        var a = [], ops = el.options;
        var one = (t == 'select-one');
        var max = (one ? index+1 : ops.length);
        for(var i=(one ? index : 0); i < max; i++) {
            var op = ops[i];
            if (op.selected) {
                // extra pain for IE...
                var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
                if (one) return v;
                a.push(v);
            }
        }
        return a;
    }
    return el.value;
};


/**
 * Clears the form data.  Takes the following actions on the form's input fields:
 *  - input text fields will have their 'value' property set to the empty string
 *  - select elements will have their 'selectedIndex' property set to -1
 *  - checkbox and radio inputs will have their 'checked' property set to false
 *  - inputs of type submit, button, reset, and hidden will *not* be effected
 *  - button elements will *not* be effected
 *
 * @example $('form').clearForm();
 * @desc Clears all forms on the page.
 *
 * @name clearForm
 * @type jQuery
 * @cat Plugins/Form
 */
$.fn.clearForm = function() {
    return this.each(function() {
        $('input,select,textarea', this).clearFields();
    });
};

/**
 * Clears the selected form elements.  Takes the following actions on the matched elements:
 *  - input text fields will have their 'value' property set to the empty string
 *  - select elements will have their 'selectedIndex' property set to -1
 *  - checkbox and radio inputs will have their 'checked' property set to false
 *  - inputs of type submit, button, reset, and hidden will *not* be effected
 *  - button elements will *not* be effected
 *
 * @example $('.myInputs').clearFields();
 * @desc Clears all inputs with class myInputs
 *
 * @name clearFields
 * @type jQuery
 * @cat Plugins/Form
 */
$.fn.clearFields = $.fn.clearInputs = function() {
    return this.each(function() {
        var t = this.type, tag = this.tagName.toLowerCase();
        if (t == 'text' || t == 'password' || tag == 'textarea')
            this.value = '';
        else if (t == 'checkbox' || t == 'radio')
            this.checked = false;
        else if (tag == 'select')
            this.selectedIndex = -1;
    });
};


/**
 * Resets the form data.  Causes all form elements to be reset to their original value.
 *
 * @example $('form').resetForm();
 * @desc Resets all forms on the page.
 *
 * @name resetForm
 * @type jQuery
 * @cat Plugins/Form
 */
$.fn.resetForm = function() {
    return this.each(function() {
        // guard against an input with the name of 'reset'
        // note that IE reports the reset function as an 'object'
        if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
            this.reset();
    });
};

})(jQuery);

// =========================================================

// jq-innerfade.js

// Datum: 2006-09-01
// Firma: Medienfreunde Hofmann & Baldes GbR
// Autor: Torsten Baldes
// Mail: t.baldes@medienfreunde.com
// Web: http://medienfreunde.com

// based on the work of Matt Oakes http://portfolio.gizone.co.uk/applications/slideshow/

// =========================================================


$.fn.innerfade = function(options) {
	return this.each(function(){

		var settings = {
			speed: 'normal',
			timeout: 2000,
			type: 'sequence',
			containerheight: 'auto'
		}

		if(options)
			$.extend(settings, options);

		var elements = $(this).children().get();

		if (elements.length > 1) {

			$(this).parent().css('position', 'relative');

			$(this).css('height', settings.containerheight);

			for ( var i = 0; i < elements.length; i++ ) {
				$(elements[i]).css('z-index', elements.length - i).css('position', 'absolute');
				$(elements[i]).hide();
			}

			if ( settings.type == 'sequence' ) {
				setTimeout(function(){
					$.innerfade.next(elements, settings, 1, 0);
				}, settings.timeout);
				$(elements[0]).show();
			}
			else if ( settings.type == 'random' ) {
				setTimeout(function(){
					do { current = Math.floor ( Math.random ( ) * ( elements.length ) ); } while ( current == 0 )
					$.innerfade.next(elements, settings, current, 0);
				}, settings.timeout);
				$(elements[0]).show();
			}
			else {
				alert('type must either be \'sequence\' or \'random\'');
			}

		}

	});
};


$.innerfade = function() {}
$.innerfade.next = function (elements, settings, current, last) {

	$(elements[last]).fadeOut(settings.speed);
	$(elements[current]).fadeIn(settings.speed);

	if ( settings.type == 'sequence' ) {
		if ( ( current + 1 ) < elements.length ) {
			current = current + 1;
			last = current - 1;
		}
		else {
			current = 0;
			last = elements.length - 1;
		}
	}
	else if ( settings.type == 'random' ) {
		last = current;
		while (	current == last ) {
			current = Math.floor ( Math.random ( ) * ( elements.length ) );
		}
	}
	else {
		alert('type must either be \'sequence\' or \'random\'');
	}
	setTimeout((function(){$.innerfade.next(elements, settings, current, last);}), settings.timeout);
}
