
/** 
* Name:    Highslide JS
* Version: 4.1.9 (2010-07-05)
* Author:  Torstein Hønsi
* Support: www.highslide.com/support
* License: www.highslide.com/#license
*/
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}('q(!m){A m={14:{9s:\'ar\',al:\'eX...\',am:\'8R 2g eY\',bD:\'8R 2g eK 2g ek\',9v:\'en 2g eJ D (f)\',cu:\'ex by <i>ag ah</i>\',cs:\'ez 2g eB ag ah fN\',8t:\'aa\',8n:\'ao\',8f:\'an\',8l:\'af\',8i:\'af (fQ)\',b6:\'fH\',aT:\'ae\',b1:\'ae 1p (ad)\',aW:\'ab\',aU:\'ab 1p (ad)\',8s:\'aa (8Q 18)\',8w:\'ao (8Q 3o)\',8h:\'an\',bb:\'1:1\',3N:\'ff %1 fh %2\',9F:\'8R 2g 2b 2R, fj a8 fy 2g 3A. g3 8Q cR O 1C a8 2W.\'},5p:\'K/dW/\',7M:\'dZ.4X\',5w:\'e0.4X\',7s:5S,9Y:5S,4y:15,9h:15,4T:15,77:15,4t:e1,ak:0.75,91:M,9o:5,3F:2,dV:3,5A:1j,bR:\'4j 3o\',bP:1,c2:M,cp:\'dQ://K.dS/\',cx:\'dv\',az:M,9U:[\'a\',\'5j\'],3i:[],cz:5S,48:0,95:50,7N:1j,7G:M,4z:M,3J:\'5D\',9E:M,4l:\'1Q\',9n:\'1Q\',b7:I,b8:I,9N:M,4B:aZ,5G:aZ,5T:M,1Y:\'dp-dt\',9R:{35:\'<P 1W="K-35"><6c>\'+\'<1K 1W="K-2W">\'+\'<a 24="#" 2j="{m.14.8s}">\'+\'<1D>{m.14.8t}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-3I">\'+\'<a 24="#" 2j="{m.14.b1}">\'+\'<1D>{m.14.aT}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-3r">\'+\'<a 24="#" 2j="{m.14.aU}">\'+\'<1D>{m.14.aW}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-1C">\'+\'<a 24="#" 2j="{m.14.8w}">\'+\'<1D>{m.14.8n}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-3A">\'+\'<a 24="#" 2j="{m.14.8h}">\'+\'<1D>{m.14.8f}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-19-2H">\'+\'<a 24="#" 2j="{m.14.9v}">\'+\'<1D>{m.14.bb}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-2b">\'+\'<a 24="#" 2j="{m.14.8i}" >\'+\'<1D>{m.14.8l}</1D></a>\'+\'</1K>\'+\'</6c></P>\',aK:\'<P 1W="K-fq"><6c>\'+\'<1K 1W="K-2W">\'+\'<a 24="#" 2j="{m.14.8s}" 2n="E m.2W(k)">\'+\'<1D>{m.14.8t}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-1C">\'+\'<a 24="#" 2j="{m.14.8w}" 2n="E m.1C(k)">\'+\'<1D>{m.14.8n}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-3A">\'+\'<a 24="#" 2j="{m.14.8h}" 2n="E 1j">\'+\'<1D>{m.14.8f}</1D></a>\'+\'</1K>\'+\'<1K 1W="K-2b">\'+\'<a 24="#" 2j="{m.14.8i}" 2n="E m.2b(k)">\'+\'<1D>{m.14.8l}</1D></a>\'+\'</1K>\'+\'</6c></P>\'+\'<P 1W="K-1f"></P>\'+\'<P 1W="K-cV"><P>\'+\'<1D 1W="K-4g" 2j="{m.14.b6}"><1D></1D></1D>\'+\'</P></P>\'},6s:[],a0:M,16:[],a1:[\'5T\',\'3x\',\'4l\',\'9n\',\'b7\',\'b8\',\'1Y\',\'3F\',\'cW\',\'cP\',\'dU\',\'aR\',\'e3\',\'eb\',\'ea\',\'aS\',\'cr\',\'9N\',\'4d\',\'64\',\'3i\',\'48\',\'L\',\'N\',\'7X\',\'7N\',\'7G\',\'4z\',\'e9\',\'e5\',\'e4\',\'2F\',\'9E\',\'4f\',\'4m\',\'3J\',\'8e\',\'8Y\',\'4B\',\'5G\',\'6J\',\'8W\',\'aM\',\'2N\',\'2O\',\'cw\',\'ct\',\'1e\'],1T:[],61:0,88:{x:[\'c5\',\'18\',\'4J\',\'3o\',\'c6\'],y:[\'5X\',\'Y\',\'9i\',\'4j\',\'7w\']},7u:{},aS:{},aR:{},8e:{aF:{},2c:{},ax:{}},44:[],5O:[],4A:{},4s:[],6S:[],5b:[],6F:{},a5:{},7l:[],3f:/e8\\/4\\.0/.1a(56.6y)?8:8C((56.6y.6p().31(/.+(?:aB|dO|dN|1E)[\\/: ]([\\d.]+)/)||[0,\'0\'])[1]),1E:(W.6w&&!1S.3u),4H:/dw/.1a(56.6y),5I:/dy.+aB:1\\.[0-8].+dD/.1a(56.6y),$:C(1x){q(1x)E W.92(1x)},2k:C(26,3g){26[26.V]=3g},1b:C(aA,46,3W,5v,au){A el=W.1b(aA);q(46)m.3s(el,46);q(au)m.R(el,{8O:0,8g:\'1F\',97:0});q(3W)m.R(el,3W);q(5v)5v.21(el);E el},3s:C(el,46){O(A x 3e 46)el[x]=46[x];E el},R:C(el,3W){O(A x 3e 3W){q(m.1E&&x==\'1z\'){q(3W[x]>0.99)el.G.dE(\'60\');J el.G.60=\'aN(1z=\'+(3W[x]*2x)+\')\'}J el.G[x]=3W[x]}},2u:C(el,1d,3B){A 4F,54,4v;q(1G 3B!=\'7F\'||3B===I){A 2G=ck;3B={45:2G[2],2O:2G[3],6O:2G[4]}}q(1G 3B.45!=\'3N\')3B.45=5S;3B.2O=1i[3B.2O]||1i.aq;3B.7o=m.3s({},1d);O(A 2X 3e 1d){A e=1J m.fx(el,3B,2X);4F=8C(m.8p(el,2X))||0;54=8C(1d[2X]);4v=2X!=\'1z\'?\'F\':\'\';e.3y(4F,54,4v)}},8p:C(el,1d){q(el.G[1d]){E el.G[1d]}J q(W.84){E W.84.cf(el,I).bB(1d)}J{q(1d==\'1z\')1d=\'60\';A 3g=el.5H[1d.2d(/\\-(\\w)/g,C(a,b){E b.aE()})];q(1d==\'60\')3g=3g.2d(/aN\\(1z=([0-9]+)\\)/,C(a,b){E b/2x});E 3g===\'\'?1:3g}},7k:C(){A d=W,w=1S,6k=d.7t&&d.7t!=\'8I\'?d.59:d.1f;A L=m.1E?6k.8F:(d.59.8F||7q.dM),N=m.1E?6k.ca:7q.dL;m.4e={L:L,N:N,6v:m.1E?6k.6v:dK,69:m.1E?6k.69:dB};E m.4e},71:C(el){q(/5j/i.1a(el.3O)){A 6V=W.2A(\'1R\');O(A i=0;i<6V.V;i++){A u=6V[i].dA;q(u&&u.2d(/^.*?#/,\'\')==el.22.2X){el=6V[i];5a}}}A p={x:el.4O,y:el.8K};5o(el.aO){el=el.aO;p.x+=el.4O;p.y+=el.8K;q(el!=W.1f&&el!=W.59){p.x-=el.6v;p.y-=el.69}}E p},2H:C(a,2c,3y,T){q(!a)a=m.1b(\'a\',I,{1o:\'1F\'},m.29);q(1G a.6d==\'C\')E 2c;q(T==\'3w\'){O(A i=0;i<m.4s.V;i++){q(m.4s[i]&&m.4s[i].a==a){m.4s[i].bt();m.4s[i]=I;E 1j}}m.bd=M}1t{1J m.6l(a,2c,3y,T);E 1j}1v(e){E M}},9T:C(a,2c,3y){E m.2H(a,2c,3y,\'3w\')},7Y:C(){E m.1b(\'P\',{1c:\'K-3w-S\',2i:m.9Q(m.9R.aK)})},4K:C(el,3O,1c){A 1m=el.2A(3O);O(A i=0;i<1m.V;i++){q((1J 5s(1c)).1a(1m[i].1c)){E 1m[i]}}E I},9Q:C(s){s=s.2d(/\\s/g,\' \');A 2o=/{m\\.14\\.([^}]+)\\}/g,6m=s.31(2o),14;q(6m)O(A i=0;i<6m.V;i++){14=6m[i].2d(2o,"$1");q(1G m.14[14]!=\'1V\')s=s.2d(6m[i],m.14[14])}E s},bl:C(){A 1m=W.2A(\'a\');O(A i=0;i<1m.V;i++){A T=m.aI(1m[i]);q(T&&!1m[i].aJ){(C(){A t=T;q(m.1A(m,\'du\',{6A:1m[i],T:t})){1m[i].2n=(T==\'2R\')?C(){E m.2H(k)}:C(){E m.9T(k,{2F:t})}}})();1m[i].aJ=M}}m.5R()},aI:C(el){q(el.6X==\'K\')E\'2R\';J q(el.6X==\'K-2U\')E\'2U\';J q(el.6X==\'K-1k\')E\'1k\';J q(el.6X==\'K-3t\')E\'3t\'},8c:C(a){O(A i=0;i<m.5b.V;i++){q(m.5b[i][0]==a){A c=m.5b[i][1];m.5b[i][1]=c.5B(1);E c}}E I},bw:C(e){A 26=m.5R();O(A i=0;i<26.5t.V;i++){A a=26.5t[i];q(m.43(a,\'2F\')==\'2U\'&&m.43(a,\'9E\'))m.2k(m.6S,a)}m.9A(0)},9A:C(i){q(!m.6S[i])E;A a=m.6S[i];A 6r=m.4o(m.43(a,\'7X\'));q(!6r)6r=m.7Y();A 2U=1J m.7E(a,6r,1);2U.9a=C(){};2U.3z=C(){m.2k(m.5b,[a,6r]);m.9A(i+1)};2U.9C()},b9:C(){A a2=0,7c=-1,16=m.16,B,1B;O(A i=0;i<16.V;i++){B=16[i];q(B){1B=B.U.G.1B;q(1B&&1B>a2){a2=1B;7c=i}}}q(7c==-1)m.2Y=-1;J 16[7c].3P()},43:C(a,6j){a.6d=a.2n;A p=a.6d?a.6d():I;a.6d=I;E(p&&1G p[6j]!=\'1V\')?p[6j]:(1G m[6j]!=\'1V\'?m[6j]:I)},7L:C(a){A 1e=m.43(a,\'1e\');q(1e)E 1e;E a.24},4o:C(1x){A 1O=m.$(1x),4S=m.a5[1x],a={};q(!1O&&!4S)E I;q(!4S){4S=1O.5B(M);4S.1x=\'\';m.a5[1x]=4S;E 1O}J{E 4S.5B(M)}},3v:C(d){q(d)m.8X.21(d);m.8X.2i=\'\'},1w:C(B){q(!m.2S){m.2S=m.1b(\'P\',{1c:\'K-ee K-2t-D\',67:\'\',2n:C(){q(m.1A(m,\'ed\'))m.2b()}},{1n:\'1X\',1z:0},m.29,M)}m.2S.G.1o=\'\';m.2S.67+=\'|\'+B.Q;q(m.5I&&m.ay)m.R(m.2S,{9k:\'7R(\'+m.5p+\'ec.bf)\',1z:1});J m.2u(m.2S,{1z:B.48},m.95)},9H:C(Q){q(!m.2S)E;q(1G Q!=\'1V\')m.2S.67=m.2S.67.2d(\'|\'+Q,\'\');q((1G Q!=\'1V\'&&m.2S.67!=\'\')||(m.2s&&m.43(m.2s,\'48\')))E;q(m.5I&&m.ay)m.2S.G.1o=\'1F\';J m.2u(m.2S,{1z:0},m.95,I,C(){m.2S.G.1o=\'1F\'})},8A:C(78,B){A 1h=B||m.2B();B=1h;q(m.2s)E 1j;J m.1h=1h;m.4R(W,1S.3u?\'7f\':\'7b\',m.5V);1t{m.2s=78;78.2n()}1v(e){m.1h=m.2s=I}1t{q(!78||B.3i[1]!=\'42\')B.2b()}1v(e){}E 1j},6B:C(el,2q){A B=m.2B(el);q(B)E m.8A(B.8J(2q),B);J E 1j},2W:C(el){E m.6B(el,-1)},1C:C(el){E m.6B(el,1)},5V:C(e){q(!e)e=1S.2v;q(!e.2C)e.2C=e.9X;q(1G e.2C.a3!=\'1V\')E M;q(!m.1A(m,\'dR\',e))E M;A B=m.2B();A 2q=I;ba(e.do){28 70:q(B)B.74();E M;28 32:2q=2;5a;28 34:28 39:28 40:2q=1;5a;28 8:28 33:28 37:28 38:2q=-1;5a;28 27:28 13:2q=0}q(2q!==I){m.4R(W,1S.3u?\'7f\':\'7b\',m.5V);q(!m.az)E M;q(e.5g)e.5g();J e.cv=1j;q(B){q(2q==0){B.2b()}J q(2q==2){q(B.1p)B.1p.bi()}J{q(B.1p)B.1p.3r();m.6B(B.Q,2q)}E 1j}}E M},cO:C(11){m.2k(m.1T,m.3s(11,{23:\'23\'+m.61++}))},cQ:C(1r){A 2Z=1r.2N;q(1G 2Z==\'7F\'){O(A i=0;i<2Z.V;i++){A o={};O(A x 3e 1r)o[x]=1r[x];o.2N=2Z[i];m.2k(m.5O,o)}}J{m.2k(m.5O,1r)}},82:C(6A,6P){A el,2o=/^K-U-([0-9]+)$/;el=6A;5o(el.22){q(el.6I!==1V)E el.6I;q(el.1x&&2o.1a(el.1x))E el.1x.2d(2o,"$1");el=el.22}q(!6P){el=6A;5o(el.22){q(el.3O&&m.6U(el)){O(A Q=0;Q<m.16.V;Q++){A B=m.16[Q];q(B&&B.a==el)E Q}}el=el.22}}E I},2B:C(el,6P){q(1G el==\'1V\')E m.16[m.2Y]||I;q(1G el==\'3N\')E m.16[el]||I;q(1G el==\'9p\')el=m.$(el);E m.16[m.82(el,6P)]||I},6U:C(a){E(a.2n&&a.2n.cB().2d(/\\s/g,\' \').31(/m.(cU|e)cT/))},bM:C(){O(A i=0;i<m.16.V;i++)q(m.16[i]&&m.16[i].5i)m.b9()},1A:C(6u,9l,2G){E 6u&&6u[9l]?(6u[9l](6u,2G)!==1j):M},7Z:C(e){q(!e)e=1S.2v;q(e.dn>1)E M;q(!e.2C)e.2C=e.9X;A el=e.2C;5o(el.22&&!(/K-(2R|3A|3w|4g)/.1a(el.1c))){el=el.22}A B=m.2B(el);q(B&&(B.5J||!B.5i))E M;q(B&&e.T==\'7W\'){q(e.2C.a3)E M;A 31=el.1c.31(/K-(2R|3A|4g)/);q(31){m.2w={B:B,T:31[1],18:B.x.H,L:B.x.D,Y:B.y.H,N:B.y.D,b4:e.7r,b3:e.7P};m.2m(W,\'7x\',m.7n);q(e.5g)e.5g();q(/K-(2R|3w)-9K/.1a(B.S.1c)){B.3P();m.9f=M}E 1j}J q(/K-3w/.1a(el.1c)&&m.2Y!=B.Q){B.3P();B.5l(\'1q\')}}J q(e.T==\'bh\'){m.4R(W,\'7x\',m.7n);q(m.2w){q(m.58&&m.2w.T==\'2R\')m.2w.B.S.G.4w=m.58;A 3G=m.2w.3G;q(!3G&&!m.9f&&!/(3A|4g)/.1a(m.2w.T)){q(m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3E}}},4R:C(el,2v,3E){1t{el.4R(2v,3E,1j)}1v(e){1t{el.a9(\'68\'+2v,3E)}1v(e){el[\'68\'+2v]=I}}},7B:C(i){q(m.a0&&m.6s[i]&&m.6s[i]!=\'1V\'){A 1R=W.1b(\'1R\');1R.4L=C(){1R=I;m.7B(i+1)};1R.1e=m.6s[i]}},bu:C(3N){q(3N&&1G 3N!=\'7F\')m.9o=3N;A 26=m.5R();O(A i=0;i<26.5r.V&&i<m.9o;i++){m.2k(m.6s,m.7L(26.5r[i]))}q(m.1Y)1J m.5L(m.1Y,C(){m.7B(0)});J m.7B(0);q(m.5w)A 4X=m.1b(\'1R\',{1e:m.5p+m.5w})},7A:C(){q(!m.29){m.7k();m.5h=m.1E&&m.3f<7;m.bX=m.5h&&8a.fY==\'fT:\';O(A x 3e m.6N){q(1G m[x]!=\'1V\')m.14[x]=m[x];J q(1G m.14[x]==\'1V\'&&1G m.6N[x]!=\'1V\')m.14[x]=m.6N[x]}m.29=m.1b(\'P\',{1c:\'K-29\'},{1l:\'2l\',18:0,Y:0,L:\'2x%\',1B:m.4t,9t:\'ar\'},W.1f,M);m.2r=m.1b(\'a\',{1c:\'K-2r\',2j:m.14.am,2i:m.14.al,24:\'bZ:;\'},{1l:\'2l\',Y:\'-4k\',1z:m.ak,1B:1},m.29);m.8X=m.1b(\'P\',I,{1o:\'1F\'},m.29);m.2t=m.1b(\'P\',{1c:\'K-2t K-2t-D\'},{1n:(m.4H&&m.3f<7O)?\'1X\':\'1q\'},m.29,1);m.3D=m.1b(\'P\',I,{aD:\'aC\',fw:\'fv\'},I,M);1i.fu=C(t,b,c,d){E c*t/d+b};1i.aq=C(t,b,c,d){E c*(t/=d)*t+b};1i.8d=C(t,b,c,d){E-c*(t/=d)*(t-2)+b};m.cG=m.5h;m.cF=((1S.3u&&m.3f<9)||56.aV==\'b0\'||(m.1E&&m.3f<5.5));m.1A(k,\'ft\')}},41:C(){q(m.a4)E;m.a4=M;O(A i=0;i<m.7l.V;i++)m.7l[i]()},93:C(){A el,1m,6w=[],5r=[],5t=[],3h={},2o;O(A i=0;i<m.9U.V;i++){1m=W.2A(m.9U[i]);O(A j=0;j<1m.V;j++){el=1m[j];2o=m.6U(el);q(2o){m.2k(6w,el);q(2o[0]==\'m.2H\')m.2k(5r,el);J q(2o[0]==\'m.9T\')m.2k(5t,el);A g=m.43(el,\'2N\')||\'1F\';q(!3h[g])3h[g]=[];m.2k(3h[g],el)}}}m.4P={6w:6w,3h:3h,5r:5r,5t:5t};E m.4P},5R:C(){E m.4P||m.93()},2b:C(el){A B=m.2B(el);q(B)B.2b();E 1j}};m.fx=C(30,1r,1d){k.1r=1r;k.30=30;k.1d=1d;q(!1r.aH)1r.aH={}};m.fx.5e={9m:C(){(m.fx.3U[k.1d]||m.fx.3U.a7)(k);q(k.1r.3U)k.1r.3U.aj(k.30,k.4i,k)},3y:C(8m,2g,4v){k.8U=(1J 7C()).7D();k.4F=8m;k.54=2g;k.4v=4v;k.4i=k.4F;k.H=k.9r=0;A 7q=k;C t(7v){E 7q.3U(7v)}t.30=k.30;q(t()&&m.44.2k(t)==1){m.ai=fB(C(){A 44=m.44;O(A i=0;i<44.V;i++)q(!44[i]())44.fr(i--,1);q(!44.V){eg(m.ai)}},13)}},3U:C(7v){A t=(1J 7C()).7D();q(7v||t>=k.1r.45+k.8U){k.4i=k.54;k.H=k.9r=1;k.9m();k.1r.7o[k.1d]=M;A 94=M;O(A i 3e k.1r.7o)q(k.1r.7o[i]!==M)94=1j;q(94){q(k.1r.6O)k.1r.6O.aj(k.30)}E 1j}J{A n=t-k.8U;k.9r=n/k.1r.45;k.H=k.1r.2O(n,0,1,k.1r.45);k.4i=k.4F+((k.54-k.4F)*k.H);k.9m()}E M}};m.3s(m.fx,{3U:{1z:C(fx){m.R(fx.30,{1z:fx.4i})},a7:C(fx){1t{q(fx.30.G&&fx.30.G[fx.1d]!=I)fx.30.G[fx.1d]=fx.4i+fx.4v;J fx.30[fx.1d]=fx.4i}1v(e){}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E&&!m.a4){m.2m(W,\'41\',C(){1J m.6l(a,2c,3y,36)});E}k.a=a;k.3y=3y;k.36=36||\'2R\';k.2y=(36==\'3w\');k.2D=!k.2y;m.a0=1j;k.1T=[];k.1h=m.1h;m.1h=I;m.7A();A Q=k.Q=m.16.V;O(A i=0;i<m.a1.V;i++){A 2X=m.a1[i];k[2X]=2c&&1G 2c[2X]!=\'1V\'?2c[2X]:m[2X]}q(!k.1e)k.1e=a.24;A el=(2c&&2c.a6)?m.$(2c.a6):a;el=k.aQ=el.2A(\'1R\')[0]||el;k.7m=el.1x||a.1x;q(!m.1A(k,\'eC\'))E M;O(A i=0;i<m.16.V;i++){q(m.16[i]&&m.16[i].a==a&&!(k.1h&&k.3i[1]==\'42\')){m.16[i].3P();E 1j}}q(!m.eA)O(A i=0;i<m.16.V;i++){q(m.16[i]&&m.16[i].aQ!=el&&!m.16[i].6R){m.16[i].7d()}}m.16[Q]=k;q(!m.91&&!m.2s){q(m.16[Q-1])m.16[Q-1].2b();q(1G m.2Y!=\'1V\'&&m.16[m.2Y])m.16[m.2Y].2b()}k.el=el;k.1L=k.aM||m.71(el);m.7k();A x=k.x=1J m.6T(k,\'x\');x.9w();A y=k.y=1J m.6T(k,\'y\');y.9w();q(/5j/i.1a(el.3O))k.ac(el);k.U=m.1b(\'P\',{1x:\'K-U-\'+k.Q,1c:\'K-U \'+k.8Y},{1n:\'1q\',1l:\'2l\',1B:m.4t+=2},I,M);k.U.eD=k.U.eE=m.aL;q(k.36==\'2R\'&&k.3F==2)k.3F=0;q(!k.1Y||(k.1h&&k.2D&&k.3i[1]==\'42\')){k[k.36+\'9y\']()}J q(m.4A[k.1Y]){k.8S();k[k.36+\'9y\']()}J{k.65();A B=k;1J m.5L(k.1Y,C(){B.8S();B[B.36+\'9y\']()})}E M};m.6l.5e={9L:C(e){q(m.eI)eH(\'eF \'+e.eG+\': \'+e.ew);J 1S.8a.24=k.1e},8S:C(){A 1g=k.1g=m.4A[k.1Y];1g.B=k;1g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m.8c(k.a)){k.65();A B=k;A 2U=1J m.7E(k.a,1s);2U.1e=k.1e;2U.3z=C(){q(m.16[B.Q])B.5Y()};2U.9a=C(){8a.24=B.1e};2U.9C()}J q(k.2F==\'1k\'&&k.3J==\'5D\'){k.6L()}J k.5Y()},5Y:C(){1t{q(!k.S)E;k.S.4L=I;q(k.6R)E;J k.6R=M;A x=k.x,y=k.y;q(k.2r){m.R(k.2r,{Y:\'-4k\'});k.2r=I;m.1A(k,\'ch\')}q(k.2D){x.19=k.S.L;y.19=k.S.N;m.R(k.S,{L:x.t+\'F\',N:y.t+\'F\'});k.U.21(k.S);m.29.21(k.U)}J q(k.8B)k.8B();x.86();y.86();m.R(k.U,{18:(x.1L+x.3m-x.cb)+\'F\',Y:(y.1L+x.3m-y.cb)+\'F\'});k.90();k.c3();A 2V=x.19/y.19;x.87();k.2Q(x);y.87();k.2Q(y);q(k.2y)k.bc();q(k.1u)k.55(0,1);q(k.5T){q(k.2D)k.cl(2V);J k.7T();A 1P=k.1p;q(1P&&k.1h&&1P.35&&1P.aP){A H=1P.cA.1l||\'\',p;O(A 1w 3e m.88)O(A i=0;i<5;i++){p=k[1w];q(H.31(m.88[1w][i])){p.H=k.1h[1w].H+(k.1h[1w].1H-p.1H)+(k.1h[1w].D-p.D)*[0,0,.5,1,1][i];q(1P.aP==\'eL\'){q(p.H+p.D+p.1H+p.3b>p.2a+p.4E-p.4D)p.H=p.2a+p.4E-p.D-p.3p-p.4D-p.1H-p.3b;q(p.H<p.2a+p.3p)p.H=p.2a+p.3p}}}}q(k.2D&&k.x.19>(k.x.1Z||k.x.D)){k.c0();q(k.1T.V==1)k.55()}}k.8Z()}1v(e){k.9L(e)}},8r:C(5v,1Q){A c=m.4K(5v,\'79\',\'K-1f\');q(/(1k|3t)/.1a(k.2F)){q(k.4f)c.G.L=k.4f+\'F\';q(k.4m)c.G.N=k.4m+\'F\'}},6L:C(){q(k.aw)E;A B=k;k.1f=m.4K(k.1s,\'79\',\'K-1f\');q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(2q){A 8M=k.6Q(),as=m.4P.3h[k.2N||\'1F\'];q(as&&!as[8M+2q]&&k.1p&&k.1p.bs){q(2q==1)E as[0];J q(2q==-1)E as[as.V-1]}E(as&&as[8M+2q])||I},6Q:C(){A 26=m.5R().3h[k.2N||\'1F\'];q(26)O(A i=0;i<26.V;i++){q(26[i]==k.a)E i}E I},c1:C(){q(k[k.64]){A 26=m.4P.3h[k.2N||\'1F\'];q(26){A s=m.14.3N.2d(\'%1\',k.6Q()+1).2d(\'%2\',26.V);k[k.64].2i=\'<P 1W="K-3N">\'+s+\'</P>\'+k[k.64].2i}}},90:C(){q(!k.1h){O(A i=0;i<m.5O.V;i++){A 1P=m.5O[i],2Z=1P.2N;q(1G 2Z==\'1V\'||2Z===I||2Z===k.2N)k.1p=1J m.9W(k.Q,1P)}}J{k.1p=k.1h.1p}A 1P=k.1p;q(!1P)E;A Q=1P.4h=k.Q;1P.bp();1P.53(\'19-2H\');q(1P.35){k.4p(m.3s(1P.cA||{},{4I:1P.35,23:\'35\',1B:5}))}q(1P.2J)1P.2J.6K(k);q(!k.1h&&k.4d)1P.3I(M);q(1P.4d){1P.4d=47(C(){m.1C(Q)},(1P.f9||f8))}},7d:C(){m.3v(k.U);m.16[k.Q]=I;q(m.2s==k.a)m.2s=I;m.9H(k.Q);q(k.2r)m.2r.G.18=\'-4k\';m.1A(k,\'ch\')},c8:C(){q(k.5W)E;k.5W=m.1b(\'a\',{24:m.cp,2C:m.cx,1c:\'K-5W\',2i:m.14.cu,2j:m.14.cs});k.4p({4I:k.5W,1l:k.cr||\'Y 18\',23:\'5W\'})},9V:C(8D,cK){O(A i=0;i<8D.V;i++){A T=8D[i],s=I;q(T==\'9M\'&&!m.1A(k,\'f2\'))E;J q(T==\'4U\'&&!m.1A(k,\'f3\'))E;q(!k[T+\'5q\']&&k.7m)k[T+\'5q\']=T+\'-O-\'+k.7m;q(k[T+\'5q\'])k[T]=m.4o(k[T+\'5q\']);q(!k[T]&&!k[T+\'7S\']&&k[T+\'cj\'])1t{s=f4(k[T+\'cj\'])}1v(e){}q(!k[T]&&k[T+\'7S\']){s=k[T+\'7S\']}q(!k[T]&&!s){k[T]=m.4o(k.a[\'ci\'+T+\'5q\']);q(!k[T]){A 1C=k.a.cn;5o(1C&&!m.6U(1C)){q((1J 5s(\'K-\'+T)).1a(1C.1c||I)){q(!1C.1x)k.a[\'ci\'+T+\'5q\']=1C.1x=\'23\'+m.61++;k[T]=m.4o(1C.1x);5a}1C=1C.cn}}}q(!k[T]&&!s&&k.64==T)s=\'\\n\';q(!k[T]&&s)k[T]=m.1b(\'P\',{1c:\'K-\'+T,2i:s});q(cK&&k[T]){A o={1l:(T==\'4U\')?\'5X\':\'7w\'};O(A x 3e k[T+\'cH\'])o[x]=k[T+\'cH\'][x];o.4I=k[T];k.4p(o)}}},5l:C(1n){q(m.cG)k.6W(\'er\',1n);q(m.cF)k.6W(\'eq\',1n);q(m.5I)k.6W(\'*\',1n)},6W:C(3O,1n){A 1m=W.2A(3O);A 1d=3O==\'*\'?\'2e\':\'1n\';O(A i=0;i<1m.V;i++){q(1d==\'1n\'||(W.84.cf(1m[i],"").bB(\'2e\')==\'1Q\'||1m[i].bC(\'1q-by\')!=I)){A 2P=1m[i].bC(\'1q-by\');q(1n==\'1X\'&&2P){2P=2P.2d(\'[\'+k.Q+\']\',\'\');1m[i].5E(\'1q-by\',2P);q(!2P)1m[i].G[1d]=1m[i].9d}J q(1n==\'1q\'){A 3T=m.71(1m[i]);3T.w=1m[i].1N;3T.h=1m[i].1U;q(!k.48){A bz=(3T.x+3T.w<k.x.Z(\'63\')||3T.x>k.x.Z(\'63\')+k.x.Z(\'83\'));A bg=(3T.y+3T.h<k.y.Z(\'63\')||3T.y>k.y.Z(\'63\')+k.y.Z(\'83\'))}A 6Z=m.82(1m[i]);q(!bz&&!bg&&6Z!=k.Q){q(!2P){1m[i].5E(\'1q-by\',\'[\'+k.Q+\']\');1m[i].9d=1m[i].G[1d];1m[i].G[1d]=\'1q\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.61++,23:o.23},{1l:\'2l\',1n:\'1q\',L:L,9t:m.14.9s||\'\',1z:0},4Y?m.2t:k.1u,M);q(4Y)11.6I=k.Q;11.21(el);m.3s(11,{1z:1,bK:0,bL:0,4b:(o.6b===0||o.6b===1j||(o.6b==2&&m.1E))?0:5S});m.3s(11,o);q(k.ce){k.6e(11);q(!11.7J||k.9b)m.2u(11,{1z:11.1z},11.4b)}m.2k(k.1T,m.61-1)},6e:C(11){A p=11.1l||\'9i 4J\',4Y=(11.bq==\'2t\'),6D=11.bK,6H=11.bL;q(4Y){m.2t.G.1o=\'3Q\';11.6I=k.Q;q(11.1N>11.22.1N)11.G.L=\'2x%\'}J q(11.22!=k.1u)k.1u.21(11);q(/18$/.1a(p))11.G.18=6D+\'F\';q(/4J$/.1a(p))m.R(11,{18:\'50%\',4y:(6D-1i.3c(11.1N/2))+\'F\'});q(/3o$/.1a(p))11.G.3o=-6D+\'F\';q(/^c5$/.1a(p)){m.R(11,{3o:\'2x%\',9h:k.x.cb+\'F\',Y:-k.y.cb+\'F\',4j:-k.y.cb+\'F\',2e:\'1Q\'});k.x.1H=11.1N}J q(/^c6$/.1a(p)){m.R(11,{18:\'2x%\',4y:k.x.cb+\'F\',Y:-k.y.cb+\'F\',4j:-k.y.cb+\'F\',2e:\'1Q\'});k.x.3b=11.1N}A 9j=11.22.1U;11.G.N=\'1Q\';q(4Y&&11.1U>9j)11.G.N=m.5h?9j+\'F\':\'2x%\';q(/^Y/.1a(p))11.G.Y=6H+\'F\';q(/^9i/.1a(p))m.R(11,{Y:\'50%\',4T:(6H-1i.3c(11.1U/2))+\'F\'});q(/^4j/.1a(p))11.G.4j=-6H+\'F\';q(/^5X$/.1a(p)){m.R(11,{18:(-k.x.1H-k.x.cb)+\'F\',3o:(-k.x.3b-k.x.cb)+\'F\',4j:\'2x%\',77:k.y.cb+\'F\',L:\'1Q\'});k.y.1H=11.1U}J q(/^7w$/.1a(p)){m.R(11,{1l:\'4n\',18:(-k.x.1H-k.x.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1X\'});q(m.4H)b.G.1n=\'1X\';k.U.21(b);O(A i=0;i<k.1T.V;i++){A o=m.$(\'23\'+k.1T[i]);o.G.1B=o.1B||4;q(!o.7J||k.9b){o.G.1n=\'1X\';m.R(o,{1n:\'1X\',1o:\'\'});m.2u(o,{1z:o.1z},o.4b)}}},7H:C(){q(!k.1T.V)E;q(k.1p){A c=k.1p.35;q(c&&m.2B(c)==k)c.22.8T(c)}O(A i=0;i<k.1T.V;i++){A o=m.$(\'23\'+k.1T[i]);q(o&&o.22==m.2t&&m.2B(o)==k)m.3v(o)}q(k.2y&&k.4z){k.1u.G.Y=\'-4k\';m.29.21(k.1u)}J m.3v(k.1u)},c0:C(){q(k.1p&&k.1p.35){k.1p.4N(\'19-2H\');E}k.7j=m.1b(\'a\',{24:\'bZ:m.16[\'+k.Q+\'].74();\',2j:m.14.9v,1c:\'K-19-2H\'});q(!m.1A(k,\'fi\'))E;k.4p({4I:k.7j,1l:m.bR,7J:M,1z:m.bP})},74:C(){1t{q(!m.1A(k,\'fC\'))E;q(k.7j)m.3v(k.7j);k.3P();A 3a=k.x.D;k.9P(k.x.19,k.y.19);A 3j=k.x.H-(k.x.D-3a)/2;q(3j<m.4y)3j=m.4y;k.9B(3j,k.y.H);k.5l(\'1q\')}1v(e){k.9L(e)}},5z:C(){k.a.1c=k.a.1c.2d(\'K-57-4l\',\'\');k.5l(\'1X\');q(k.2y&&k.4z&&k.3i[1]!=\'42\'){k.bO()}J{q(k.1g&&k.3F)k.1g.6q();m.3v(k.U)}q(m.66)m.66.G.1o=\'1F\';k.7H();q(!m.2t.7Q.V)m.2t.G.1o=\'1F\';q(k.48)m.9H(k.Q);m.1A(k,\'fD\');m.16[k.Q]=I;m.bM()}};m.7E=C(a,S,6G){k.a=a;k.S=S;k.6G=6G};m.7E.5e={9C:C(){A 2T;q(!k.1e)k.1e=m.7L(k.a);q(k.1e.31(\'#\')){A 26=k.1e.6z(\'#\');k.1e=26[0];k.1x=26[1]}q(m.6F[k.1e]){k.bN=m.6F[k.1e];q(k.1x)k.9O();J k.6h();E}1t{2T=1J bU()}1v(e){1t{2T=1J bS("fz.bY")}1v(e){1t{2T=1J bS("bT.bY")}1v(e){k.9a()}}}A 3C=k;2T.fs=C(){q(3C.2T.bW==4){q(3C.1x)3C.9O();J 3C.6h()}};A 1e=k.1e;k.2T=2T;q(m.fA)1e=1e.2d(/$/,(/\\?/.1a(1e)?\'&\':\'?\')+\'fl=\'+(1J 7C()).7D());2T.c7(\'fn\',1e,M);2T.bV(\'X-g0-fI\',\'bU\');2T.bV(\'fL-dx\',\'d9/x-d4-a3-cY\');2T.d2(I)},9O:C(){m.7A();A 46=1S.3u||m.bX?{1e:\'dk:dm\'}:I;k.1k=m.1b(\'1k\',46,{1l:\'2l\',Y:\'-4k\'},m.29);k.6h()},6h:C(){A s=k.bN||k.2T.cX,7g;q(k.6G)m.6F[k.1e]=s;q(!m.1E||m.3f>=5.5){s=s.2d(1J 5s(\'<cM[^>]*>\',\'c9\'),\'\').2d(1J 5s(\'<bQ[^>]*>.*?</bQ>\',\'c9\'),\'\');q(k.1k){A 2z=k.1k.9c;q(!2z&&k.1k.6i)2z=k.1k.6i.W;q(!2z){A 3C=k;47(C(){3C.6h()},25);E}2z.c7();2z.cN(s);2z.2b();1t{s=2z.92(k.1x).2i}1v(e){1t{s=k.1k.W.92(k.1x).2i}1v(e){}}m.3v(k.1k)}J{7g=/(<1f[^>]*>|<\\/1f>)/de;q(7g.1a(s))s=s.6z(7g)[m.1E?1:2]}}m.4K(k.S,\'79\',\'K-1f\').2i=s;k.3z();O(A x 3e k)k[x]=I}};m.9W=C(4h,1r){q(m.dT!==1j)m.93();k.4h=4h;O(A x 3e 1r)k[x]=1r[x];q(k.e2)k.c4();q(k.2J)k.2J=m.bm(k)};m.9W.5e={c4:C(){k.35=m.1b(\'P\',{2i:m.9Q(m.9R.35)},I,m.29);A 6a=[\'3I\',\'3r\',\'2W\',\'1C\',\'3A\',\'19-2H\',\'2b\'];k.1M={};A 3C=k;O(A i=0;i<6a.V;i++){k.1M[6a[i]]=m.4K(k.35,\'1K\',\'K-\'+6a[i]);k.4N(6a[i])}k.1M.3r.G.1o=\'1F\'},bp:C(){q(k.bs||!k.35)E;A B=m.16[k.4h],4X=B.6Q(),2o=/7e$/;q(4X==0)k.53(\'2W\');J q(2o.1a(k.1M.2W.2A(\'a\')[0].1c))k.4N(\'2W\');q(4X+1==m.4P.3h[B.2N||\'1F\'].V){k.53(\'1C\');k.53(\'3I\')}J q(2o.1a(k.1M.1C.2A(\'a\')[0].1c)){k.4N(\'1C\');k.4N(\'3I\')}},4N:C(1M){q(!k.1M)E;A bo=k,a=k.1M[1M].2A(\'a\')[0],2o=/7e$/;a.2n=C(){bo[1M]();E 1j};q(2o.1a(a.1c))a.1c=a.1c.2d(2o,\'\')},53:C(1M){q(!k.1M)E;A a=k.1M[1M].2A(\'a\')[0];a.2n=C(){E 1j};q(!/7e$/.1a(a.1c))a.1c+=\' 7e\'},bi:C(){q(k.4d)k.3r();J k.3I()},3I:C(bk){q(k.1M){k.1M.3I.G.1o=\'1F\';k.1M.3r.G.1o=\'\'}k.4d=M;q(!bk)m.1C(k.4h)},3r:C(){q(k.1M){k.1M.3r.G.1o=\'1F\';k.1M.3I.G.1o=\'\'}e7(k.4d);k.4d=I},2W:C(){k.3r();m.2W(k.1M.2W)},1C:C(){k.3r();m.1C(k.1M.1C)},3A:C(){},\'19-2H\':C(){m.2B().74()},2b:C(){m.2b(k.1M.2b)}};m.bm=C(1p){C 6K(B){m.3s(1r||{},{4I:4Q,23:\'2J\',1c:\'K-2J-\'+51+\'-11 \'+(1r.1c||\'\')});q(m.5h)1r.6b=0;B.4p(1r);m.R(4Q.22,{2e:\'1q\'})};C 2a(3S){4W(1V,1i.3c(3S*4Q[3R?\'1N\':\'1U\']*0.7))};C 4W(i,9J){q(i===1V)O(A j=0;j<6x.V;j++){q(6x[j]==m.16[1p.4h].a){i=j;5a}}q(i===1V)E;A as=4Q.2A(\'a\'),57=as[i],3Y=57.22,18=3R?\'bv\':\'bG\',3o=3R?\'cg\':\'bF\',L=3R?\'bH\':\'bI\',4O=\'1y\'+18,1N=\'1y\'+L,6Y=P.22.22[1N],4V=6Y-2h[1N],6n=3M(2h.G[3R?\'18\':\'Y\'])||0,2M=6n,dz=20;q(9J!==1V){2M=6n-9J;q(4V>0)4V=0;q(2M>0)2M=0;q(2M<4V)2M=4V}J{O(A j=0;j<as.V;j++)as[j].1c=\'\';57.1c=\'K-57-4l\';A 85=i>0?as[i-1].22[4O]:3Y[4O],80=3Y[4O]+3Y[1N]+(as[i+1]?as[i+1].22[1N]:0);q(80>6Y-6n)2M=6Y-80;J q(85<-6n)2M=-85}A 7V=3Y[4O]+(3Y[1N]-76[1N])/2+2M;m.2u(2h,3R?{18:2M}:{Y:2M},I,\'8d\');m.2u(76,3R?{18:7V}:{Y:7V},I,\'8d\');8P.G.1o=2M<0?\'3Q\':\'1F\';8N.G.1o=(2M>4V)?\'3Q\':\'1F\'};A 6x=m.4P.3h[m.16[1p.4h].2N||\'1F\'],1r=1p.2J,51=1r.51||\'bE\',8H=(51==\'dr\'),3Z=8H?[\'P\',\'6c\',\'1K\',\'1D\']:[\'2h\',\'4q\',\'3X\',\'2E\'],3R=(51==\'bE\'),4Q=m.1b(\'P\',{1c:\'K-2J K-2J-\'+51,2i:\'<P 1W="K-2J-dJ">\'+\'<\'+3Z[0]+\'><\'+3Z[1]+\'></\'+3Z[1]+\'></\'+3Z[0]+\'></P>\'+\'<P 1W="K-2a-1I"><P></P></P>\'+\'<P 1W="K-2a-dI"><P></P></P>\'+\'<P 1W="K-76"><P></P></P>\'},{1o:\'1F\'},m.29),6t=4Q.7Q,P=6t[0],8P=6t[1],8N=6t[2],76=6t[3],2h=P.dH,4q=4Q.2A(3Z[1])[0],3X;O(A i=0;i<6x.V;i++){q(i==0||!3R)3X=m.1b(3Z[2],I,I,4q);(C(){A a=6x[i],3Y=m.1b(3Z[3],I,I,3X),dC=i;m.1b(\'a\',{24:a.24,2n:C(){m.2B(k).3P();E m.8A(a)},2i:m.bA?m.bA(a):a.2i},I,3Y)})()}q(!8H){8P.2n=C(){2a(-1)};8N.2n=C(){2a(1)};m.2m(4q,W.dG!==1V?\'dF\':\'ds\',C(e){A 3S=0;e=e||1S.2v;q(e.cy){3S=e.cy/e6;q(m.3u)3S=-3S}J q(e.cE){3S=-e.cE/3}q(3S)2a(-3S*0.2);q(e.5g)e.5g();e.cv=1j})}E{6K:6K,4W:4W}};m.6N=m.14;A dd=m.6l;q(m.1E&&1S==1S.Y){(C(){1t{W.59.di(\'18\')}1v(e){47(ck.dj,50);E}m.41()})()}m.2m(W,\'d7\',m.41);m.2m(1S,\'81\',m.41);m.2m(W,\'41\',C(){q(m.7M||m.48){A G=m.1b(\'G\',{T:\'d5/8p\'},I,W.2A(\'da\')[0]);C 6o(8u,8o){q(!m.1E){G.21(W.cS(8u+" {"+8o+"}"))}J{A 1h=W.cm[W.cm.V-1];q(1G(1h.6o)=="7F")1h.6o(8u,8o)}}C 6g(1d){E\'dP( ( ( dq = W.59.\'+1d+\' ? W.59.\'+1d+\' : W.1f.\'+1d+\' ) ) + \\\'F\\\' );\'}q(m.7M)6o(\'.K 1R\',\'4w: 7R(\'+m.5p+m.7M+\'), 7i !ef;\');6o(\'.K-2t-D\',m.1E&&(m.3f<7||W.7t==\'8I\')?\'1l: 2l; \'+\'18:\'+6g(\'6v\')+\'Y:\'+6g(\'69\')+\'L:\'+6g(\'8F\')+\'N:\'+6g(\'ca\'):\'1l: fg; L: 2x%; N: 2x%; 18: 0; Y: 0\')}});m.2m(1S,\'4g\',C(){m.7k();q(m.2t)O(A i=0;i<m.2t.7Q.V;i++){A 1O=m.2t.7Q[i],B=m.2B(1O);B.6e(1O);q(1O.23==\'2J\')B.1p.2J.4W()}});m.2m(W,\'7x\',C(e){m.7u={x:e.7r,y:e.7P}});m.2m(W,\'7W\',m.7Z);m.2m(W,\'bh\',m.7Z);m.2m(W,\'41\',m.bl);m.2m(1S,\'81\',m.bu);m.2m(1S,\'81\',m.bw)}',62,996,'||||||||||||||||||||this||hs||||if||||||||||var|exp|function|size|return|px|style|pos|null|else|highslide|width|true|height|for|div|key|setStyles|content|type|wrapper|length|document||top|get||overlay|||lang||expanders||left|full|test|createElement|className|prop|src|body|outline|last|Math|false|iframe|position|els|visibility|display|slideshow|hidden|options|innerContent|try|overlayBox|catch|dim|id|offset|opacity|fireEvent|zIndex|next|span|ie|none|typeof|p1|up|new|li|tpos|btn|offsetWidth|node|ss|auto|img|window|overlays|offsetHeight|undefined|class|visible|outlineType|imgSize||appendChild|parentNode|hsId|href||arr||case|container|scroll|close|params|replace|overflow|wsize|to|table|innerHTML|title|push|absolute|addEventListener|onclick|re|scrollerDiv|op|loading|upcoming|viewport|animate|event|dragArgs|100|isHtml|doc|getElementsByTagName|getExpander|target|isImage|td|objectType|args|expand|imgPad|thumbstrip|tgt|minSize|tblPos|slideshowGroup|easing|hiddenBy|justify|image|dimmer|xhr|ajax|ratio|previous|name|focusKey|sg|elem|match||||controls|contentType||||xSize|p2|round|min|in|uaVersion|val|groups|transitions|xpos|lastX|wh|tb|ucwh|right|marginMin|lastY|pause|extend|swf|opera|discardElement|html|useBox|custom|onLoad|move|opt|pThis|clearing|func|outlineWhileAnimating|hasDragged|releaseMask|play|objectLoadTime|changed|graphic|parseInt|number|tagName|focus|block|isX|delta|elPos|step|mediumContent|styles|tr|cell|tree||ready|crossfade|getParam|timers|duration|attribs|setTimeout|dimmingOpacity|xp1|yp1|dur|ySize|autoplay|page|objectWidth|resize|expKey|now|bottom|9999px|anchor|objectHeight|relative|getNode|createOverlay|tbody|blurExp|sleeping|zIndexCounter|ypos|unit|cursor|max|marginLeft|preserveContent|pendingOutlines|minWidth|invPos|marginMax|clientSize|start|setPosition|safari|overlayId|center|getElementByClass|onload|tgtArr|enable|offsetLeft|anchors|dom|removeEventListener|clone|marginTop|heading|minTblPos|selectThumb|cur|relToVP|scrollingContent||mode|allowReduce|disable|end|sizeOverlayBox|navigator|active|styleRestoreCursor|documentElement|break|cacheBindings|fitsize|cNode|prototype|moveOnly|preventDefault|ieLt7|isExpanded|area|hDiff|doShowHide|ruler|wDiff|while|graphicsDir|Id|images|RegExp|htmls|fadeBox|parent|restoreCursor|trans|minX|afterClose|padToMinWidth|cloneNode|fac|before|setAttribute|xsize|minHeight|currentStyle|geckoMac|isClosing|stl|Outline|maxX|maxY|slideshows|after|uclt|getAnchors|250|allowSizeReduction|iDoc|keyHandler|credits|above|contentLoaded|ysize|filter|idCounter|minY|opos|numberPosition|showLoading|mask|owner|on|scrollTop|buttons|fade|ul|getParams|positionOverlay|over|fix|loadHTML|contentWindow|param|iebody|Expander|matches|curTblPos|addRule|toLowerCase|destroy|cache|preloadTheseImages|domCh|obj|scrollLeft|all|group|userAgent|split|element|previousOrNext|afterExpand|offX|yimgPad|cachedGets|pre|offY|hsKey|maxWidth|add|writeExtendedContent|oDiv|langDefaults|complete|expOnly|getAnchorIndex|onLoadStarted|preloadTheseAjax|Dimension|isHsAnchor|imgs|showHideElements|rel|overlayWidth|wrapperKey||getPosition|maincontent|setSize|doFullExpand||marker|marginBottom|adj|DIV|lt|keydown|topmostKey|cancelLoading|disabled|keypress|regBody|ximgPad|pointer|fullExpandLabel|getPageSize|onReady|thumbsUserSetId|dragHandler|curAnim|tId|self|clientX|expandDuration|compatMode|mouse|gotoEnd|below|mousemove|os|dir|init|preloadFullImage|Date|getTime|Ajax|object|allowHeightReduction|destroyOverlays|kdeBugCorr|hideOnMouseOut|panel|getSrc|expandCursor|allowWidthReduction|525|clientY|childNodes|url|Text|fitOverlayBox|correctIframeSize|markerPos|mousedown|contentId|getSelfRendered|mouseClickHandler|activeRight|load|getWrapperKey|osize|defaultView|activeLeft|calcBorders|calcExpanded|oPos|maxsize|location|hasMovedMin|getCacheBinding|easeOutQuad|swfOptions|moveText|border|moveTitle|closeTitle|names|mX|closeText|from|nextText|dec|css|xp2|setObjContainerSize|previousTitle|previousText|sel|props|nextTitle|mY|startOff|yp2|transit|htmlGetSize|parseFloat|types|getIframePageHeight|clientWidth|other|floatMode|BackCompat|getAdjacentAnchor|offsetTop|endOff|current|scrollDown|padding|scrollUp|arrow|Click|connectOutline|removeChild|startTime|genOverlayBox|maxHeight|garbageBin|wrapperClassName|show|initSlideshow|allowMultipleInstances|getElementById|updateAnchors|done|dimmingDuration|swfobject|margin|relatedTarget||onError|mouseIsOver|contentDocument|origProp|hasAlphaImageLoader|hasFocused|doWrapper|marginRight|middle|parOff|background|evt|update|align|numberOfImagesToPreload|string|ucrb|state|cssDirection|direction|ie6|fullExpandTitle|calcThumb|distance|Create|setPos|preloadAjaxElement|moveTo|run|abs|cacheAjax|restoreTitle|loadingPos|undim|loadingPosXfade|scrollBy|blur|error|caption|dragByHeading|getElementContent|resizeTo|replaceLang|skin|sizeDiff|htmlExpand|openerTagNames|getInline|Slideshow|srcElement|restoreDuration|changeSize|continuePreloading|overrides|topZ|form|isReady|clones|thumbnailId|_default|and|detachEvent|Previous|Pause|getImageMapAreaCorrection|spacebar|Play|Close|Highslide|JS|timerId|call|loadingOpacity|loadingText|loadingTitle|Move|Next|preloadGraphic|easeInQuad|ltr||vis|nopad|newHeight|hasExtendedContent|attributes|dimmingGeckoFix|enableKeyListener|tag|rv|both|clear|toUpperCase|flashvars|wmode|orig|isUnobtrusiveAnchor|hsHasSetClick|contentWrapper|wrapperMouseHandler|pageOrigin|alpha|offsetParent|fixedControls|thumb|captionOverlay|headingOverlay|playText|pauseTitle|vendor|pauseText|pow|onGraphicLoad|200|KDE|playTitle|appendTo|clickY|clickX|rb|resizeTitle|targetX|targetY|focusTopmost|switch|fullExpandText|htmlSizeOperations|hasHtmlExpanders|hide|png|clearsY|mouseup|hitSpace|htmlPrepareClose|wait|setClickEvents|Thumbstrip|destroyObject|sls|checkFirstAndLast|relativeTo|reuseOverlay|repeat|awake|preloadImages|Left|preloadAjax|indexOf||clearsX|stripItemFormatter|getPropertyValue|getAttribute|focusTitle|horizontal|Bottom|Top|Width|Height|hand|offsetX|offsetY|reOrder|cachedGet|sleep|fullExpandOpacity|script|fullExpandPosition|ActiveXObject|Microsoft|XMLHttpRequest|setRequestHeader|readyState|ie6SSL|XMLHTTP|javascript|createFullExpand|getNumber|showCredits|getOverlays|getControls|leftpanel|rightpanel|open|writeCredits|gi|clientHeight||showOverlays|doPanels|gotOverlays|getComputedStyle|Right|onHideLoading|_|Eval|arguments|correctRatio|styleSheets|nextSibling|tmpMin|creditsHref|ximgSize|creditsPosition|creditsTitle|fadeInOut|creditsText|returnValue|easingClose|creditsTarget|wheelDelta|transitionDuration|overlayOptions|toString|newImg|prepareNextOutline|detail|hideIframes|hideSelects|Overlay|oldImg|preloadNext|addOverlay|yimgSize|link|write|registerOverlay|captionText|addSlideshow|keys|createTextNode|xpand|htmlE|footer|captionId|responseText|urlencoded|fromElement|mouseover|onDrag|send|toElement|www|text|onMouseOut|DOMContentLoaded|onMouseOver|application|HEAD|dragSensitivity|white|HsExpander|ig|onDrop|onImageClick|01|doScroll|callee|about|sqrt|blank|button|keyCode|drop|ignoreMe|float|DOMMouseScroll|shadow|onSetClickEvent|_self|Safari|Type|Macintosh|mgnRight|useMap|pageYOffset|pI|Gecko|removeAttribute|mousewheel|onmousewheel|firstChild|down|inner|pageXOffset|innerHeight|innerWidth|ra|it|expression|http|onKeyDown|com|dynamicallyUpdateAnchors|captionEval|outlineStartOffset|graphics|||zoomin|zoomout|1001|useControls|headingId|maincontentEval|maincontentText|120|clearTimeout|Trident|maincontentId|headingEval|headingText|geckodimmer|onDimmerClick|dimming|important|clearInterval|blockRightClick|oncontextmenu|imageCreate|front||onShowLoading|Expand|flushImgSize|htmlCreate|IFRAME|SELECT|static|onAfterGetContent|onBeforeGetContent|onBlur|message|Powered|onFocus|Go|allowSimultaneousLoading|the|onInit|onmouseover|onmouseout|Line|lineNumber|alert|debug|actual|bring|fit|rect|clip|insertBefore|nodeName|boolean|reuse|onBeforeExpand|reflow|coords|circle|floor|Loading|cancel|300|onAfterExpand|frameborder|onBeforeGetCaption|onBeforeGetHeading|eval|newWidth|flash|transparent|500|interval|expressInstallSwfurl|version|embedSWF|attachEvent|onBeforeClose|Image|fixed|of|onCreateFullExpand|click|useOnHtml|dummy|borderCollapse|GET|cellSpacing|default|header|splice|onreadystatechange|onActivate|linearTween|1px|paddingTop||drag|Msxml2|forceAjaxReload|setInterval|onDoFullExpand|onAfterClose|collapse|lineHeight|200px|Resize|With|scale|sizingMethod|Content|onCreateOverlay|homepage|StopPlay|removeSWF|esc|AlphaImageLoader|DXImageTransform|https|outlinesDir|onAfterGetHeading|fontSize|outlines|protocol|progid|Requested|shape|onAfterGetCaption|Use'.split('|'),0,{}))

// The gallery example on the front page
  var galleryOptions = {
  slideshowGroup: 'bofrostHFKGallery',
  outlineType: '',
  dimmingOpacity: 0.8,
  align: 'center',
  transitions: ['expand','crossfade'],
  fadeInOut: true,
  wrapperClassName: 'draggable-header no-footer',
  marginLeft: 100,
  marginBottom: 80,
  numberPosition: 'caption',
  useControls: true,
  preserveContent: false

};


if (hs.addSlideshow) hs.addSlideshow({
  slideshowGroup: ['bofrostHFKGallery'],
  interval: 5000,
  repeat: false,
  useControls: true,
  overlayOptions: {
    className: 'text-controls',
    position: 'bottom center',
    relativeTo: 'expander',
    offsetY: 100
  }
}); 


hs.registerOverlay({
  html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>',
  position: 'top right',
  useOnHtml: true,
  fade: 2 // fading the semi-transparent overlay looks bad in IE
});

/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<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>";
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);

/*!
* jQuery UI 1.8.5
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI
*/
(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.5",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,
"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");
if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"));if(!isNaN(b)&&b!=0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind("mousedown.ui-disableSelection selectstart.ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f,
"border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c.style(this,h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c.style(this,
h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}});
c(function(){var a=document.createElement("div"),b=document.body;c.extend(a.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.appendChild(a).offsetHeight===100;b.removeChild(a).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,
d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&&c.ui.isOverAxis(b,e,i)}})}})(jQuery);
;/*
* jQuery UI Effects 1.8.5
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/
*/
jQuery.effects||function(f,j){function l(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return m.transparent;return m[f.trim(c).toLowerCase()]}function r(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return l(b)}function n(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function o(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in s||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function t(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:f.fx.speeds[b]||f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=r(b.elem,a);b.end=l(b.end);b.colorInit=
true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var m={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,
183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,
165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},p=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=o(n.call(this)),q,u=e.attr("className");f.each(p,function(v,
i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?
f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.5",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==
null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();
var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});
c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments);a={options:a[1],duration:a[2],callback:a[3]};var b=f.effects[c];return b&&!f.fx.off?b.call(this,a):this},_show:f.fn.show,show:function(c){if(!c||
typeof c=="number"||f.fx.speeds[c]||!f.effects[c])return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(!c||typeof c=="number"||f.fx.speeds[c]||!f.effects[c])return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(!c||typeof c=="number"||f.fx.speeds[c]||!f.effects[c]||typeof c==
"boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,
a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=
e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+
b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/
2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*
a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;
return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,
a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
;/*
* jQuery UI Effects Highlight 1.8.5
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Highlight
*
* Depends:
* jquery.effects.core.js
*/
(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
;/*
* jQuery UI Effects Pulsate 1.8.5
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Effects/Pulsate
*
* Depends:
* jquery.effects.core.js
*/
(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);

/**
 * Cookie plugin
 *
 * 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
 *
 */
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options=$.extend({},options);options.expires=-1;}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires='; expires='+date.toUTCString();}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};

/*
* SimpleModal 1.4.2 - jQuery Plugin
* http://simplemodal.com/
* Copyright (c) 2011 Eric Martin
* Licensed under MIT and GPL
* Date: Sat, Dec 17 2011 15:35:38 -0800
*/
(function(b){"function"===typeof define&&define.amd?define(["jquery"],b):b(jQuery)})(function(b){var j=[],k=b(document),l=b.browser.msie&&6===parseInt(b.browser.version)&&"object"!==typeof window.XMLHttpRequest,n=b.browser.msie&&7===parseInt(b.browser.version),m=null,h=b(window),i=[];b.modal=function(a,d){return b.modal.impl.init(a,d)};b.modal.close=function(){b.modal.impl.close()};b.modal.focus=function(a){b.modal.impl.focus(a)};b.modal.setContainerDimensions=function(){b.modal.impl.setContainerDimensions()};
b.modal.setPosition=function(){b.modal.impl.setPosition()};b.modal.update=function(a,d){b.modal.impl.update(a,d)};b.fn.modal=function(a){return b.modal.impl.init(this,a)};b.modal.defaults={appendTo:"body",focus:!0,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:!1,autoPosition:!0,zIndex:1E3,close:!0,closeHTML:'<a class="modalCloseImg" title="Close"></a>',
closeClass:"simplemodal-close",escClose:!0,overlayClose:!1,fixed:!0,position:null,persist:!1,modal:!0,onOpen:null,onShow:null,onClose:null};b.modal.impl={d:{},init:function(a,d){if(this.d.data)return!1;m=b.browser.msie&&!b.boxModel;this.o=b.extend({},b.modal.defaults,d);this.zIndex=this.o.zIndex;this.occb=!1;if("object"===typeof a){if(a=a instanceof jQuery?a:b(a),this.d.placeholder=!1,0<a.parent().parent().size()&&(a.before(b("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"})),
this.d.placeholder=!0,this.display=a.css("display"),!this.o.persist))this.d.orig=a.clone(!0)}else if("string"===typeof a||"number"===typeof a)a=b("<div></div>").html(a);else return alert("SimpleModal Error: Unsupported data type: "+typeof a),this;this.create(a);this.open();b.isFunction(this.o.onShow)&&this.o.onShow.apply(this,[this.d]);return this},create:function(a){this.getDimensions();if(this.o.modal&&l)this.d.iframe=b('<iframe src="javascript:false;"></iframe>').css(b.extend(this.o.iframeCss,
{display:"none",opacity:0,position:"fixed",height:i[0],width:i[1],zIndex:this.o.zIndex,top:0,left:0})).appendTo(this.o.appendTo);this.d.overlay=b("<div></div>").attr("id",this.o.overlayId).addClass("simplemodal-overlay").css(b.extend(this.o.overlayCss,{display:"none",opacity:this.o.opacity/100,height:this.o.modal?j[0]:0,width:this.o.modal?j[1]:0,position:"fixed",left:0,top:0,zIndex:this.o.zIndex+1})).appendTo(this.o.appendTo);this.d.container=b("<div></div>").attr("id",this.o.containerId).addClass("simplemodal-container").css(b.extend({position:this.o.fixed?
"fixed":"absolute"},this.o.containerCss,{display:"none",zIndex:this.o.zIndex+2})).append(this.o.close&&this.o.closeHTML?b(this.o.closeHTML).addClass(this.o.closeClass):"").appendTo(this.o.appendTo);this.d.wrap=b("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(this.d.container);this.d.data=a.attr("id",a.attr("id")||this.o.dataId).addClass("simplemodal-data").css(b.extend(this.o.dataCss,{display:"none"})).appendTo("body");this.setContainerDimensions();
this.d.data.appendTo(this.d.wrap);(l||m)&&this.fixIE()},bindEvents:function(){var a=this;b("."+a.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();a.close()});a.o.modal&&a.o.close&&a.o.overlayClose&&a.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();a.close()});k.bind("keydown.simplemodal",function(b){a.o.modal&&9===b.keyCode?a.watchTab(b):a.o.close&&a.o.escClose&&27===b.keyCode&&(b.preventDefault(),a.close())});h.bind("resize.simplemodal orientationchange.simplemodal",
function(){a.getDimensions();a.o.autoResize?a.setContainerDimensions():a.o.autoPosition&&a.setPosition();l||m?a.fixIE():a.o.modal&&(a.d.iframe&&a.d.iframe.css({height:i[0],width:i[1]}),a.d.overlay.css({height:j[0],width:j[1]}))})},unbindEvents:function(){b("."+this.o.closeClass).unbind("click.simplemodal");k.unbind("keydown.simplemodal");h.unbind(".simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var a=this.o.position;b.each([this.d.iframe||null,!this.o.modal?null:this.d.overlay,
"fixed"===this.d.container.css("position")?this.d.container:null],function(b,f){if(f){var g=f[0].style;g.position="absolute";if(2>b)g.removeExpression("height"),g.removeExpression("width"),g.setExpression("height",'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"'),g.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"');else{var c,e;a&&a.constructor===
Array?(c=a[0]?"number"===typeof a[0]?a[0].toString():a[0].replace(/px/,""):f.css("top").replace(/px/,""),c=-1===c.indexOf("%")?c+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':parseInt(c.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',a[1]&&(e="number"===typeof a[1]?
a[1].toString():a[1].replace(/px/,""),e=-1===e.indexOf("%")?e+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(e.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"')):(c='(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"',
e='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"');g.removeExpression("top");g.removeExpression("left");g.setExpression("top",c);g.setExpression("left",e)}}})},focus:function(a){var d=this,a=a&&-1!==b.inArray(a,["first","last"])?a:"first",f=b(":input:enabled:visible:"+a,d.d.wrap);setTimeout(function(){0<f.length?f.focus():d.d.wrap.focus()},
10)},getDimensions:function(){var a=b.browser.opera&&"9.5"<b.browser.version&&"1.3">b.fn.jquery||b.browser.opera&&"9.5">b.browser.version&&"1.2.6"<b.fn.jquery?h[0].innerHeight:h.height();j=[k.height(),k.width()];i=[a,h.width()]},getVal:function(a,b){return a?"number"===typeof a?a:"auto"===a?0:0<a.indexOf("%")?parseInt(a.replace(/%/,""))/100*("h"===b?i[0]:i[1]):parseInt(a.replace(/px/,"")):null},update:function(a,b){if(!this.d.data)return!1;this.d.origHeight=this.getVal(a,"h");this.d.origWidth=this.getVal(b,
"w");this.d.data.hide();a&&this.d.container.css("height",a);b&&this.d.container.css("width",b);this.setContainerDimensions();this.d.data.show();this.o.focus&&this.focus();this.unbindEvents();this.bindEvents()},setContainerDimensions:function(){var a=l||n,d=this.d.origHeight?this.d.origHeight:b.browser.opera?this.d.container.height():this.getVal(a?this.d.container[0].currentStyle.height:this.d.container.css("height"),"h"),a=this.d.origWidth?this.d.origWidth:b.browser.opera?this.d.container.width():
this.getVal(a?this.d.container[0].currentStyle.width:this.d.container.css("width"),"w"),f=this.d.data.outerHeight(!0),g=this.d.data.outerWidth(!0);this.d.origHeight=this.d.origHeight||d;this.d.origWidth=this.d.origWidth||a;var c=this.o.maxHeight?this.getVal(this.o.maxHeight,"h"):null,e=this.o.maxWidth?this.getVal(this.o.maxWidth,"w"):null,c=c&&c<i[0]?c:i[0],e=e&&e<i[1]?e:i[1],h=this.o.minHeight?this.getVal(this.o.minHeight,"h"):"auto",d=d?this.o.autoResize&&d>c?c:d<h?h:d:f?f>c?c:this.o.minHeight&&
"auto"!==h&&f<h?h:f:h,c=this.o.minWidth?this.getVal(this.o.minWidth,"w"):"auto",a=a?this.o.autoResize&&a>e?e:a<c?c:a:g?g>e?e:this.o.minWidth&&"auto"!==c&&g<c?c:g:c;this.d.container.css({height:d,width:a});this.d.wrap.css({overflow:f>d||g>a?"auto":"visible"});this.o.autoPosition&&this.setPosition()},setPosition:function(){var a,b;a=i[0]/2-this.d.container.outerHeight(!0)/2;b=i[1]/2-this.d.container.outerWidth(!0)/2;var f="fixed"!==this.d.container.css("position")?h.scrollTop():0;this.o.position&&"[object Array]"===
Object.prototype.toString.call(this.o.position)?(a=f+(this.o.position[0]||a),b=this.o.position[1]||b):a=f+a;this.d.container.css({left:b,top:a})},watchTab:function(a){if(0<b(a.target).parents(".simplemodal-container").length){if(this.inputs=b(":input:enabled:visible:first, :input:enabled:visible:last",this.d.data[0]),!a.shiftKey&&a.target===this.inputs[this.inputs.length-1]||a.shiftKey&&a.target===this.inputs[0]||0===this.inputs.length)a.preventDefault(),this.focus(a.shiftKey?"last":"first")}else a.preventDefault(),
this.focus()},open:function(){this.d.iframe&&this.d.iframe.show();b.isFunction(this.o.onOpen)?this.o.onOpen.apply(this,[this.d]):(this.d.overlay.show(),this.d.container.show(),this.d.data.show());this.o.focus&&this.focus();this.bindEvents()},close:function(){if(!this.d.data)return!1;this.unbindEvents();if(b.isFunction(this.o.onClose)&&!this.occb)this.occb=!0,this.o.onClose.apply(this,[this.d]);else{if(this.d.placeholder){var a=b("#simplemodal-placeholder");this.o.persist?a.replaceWith(this.d.data.removeClass("simplemodal-data").css("display",
this.display)):(this.d.data.hide().remove(),a.replaceWith(this.d.orig))}else this.d.data.hide().remove();this.d.container.hide().remove();this.d.overlay.hide();this.d.iframe&&this.d.iframe.hide().remove();this.d.overlay.remove();this.d={}}}}});

/*!
 * jQuery Smart Banner
 * Copyright (c) 2012 Arnold Daniels <arnold@jasny.net>
 * Based on 'jQuery Smart Web App Banner' by Kurt Zenisek @ kzeni.com
 */
(function(root, factory) {
  if (typeof define == 'function' && define.amd) {
    define(['jquery'], factory);
  } else {
    factory(root.jQuery);
  }
})(this, function($) {
  var UA = navigator.userAgent;
  var isEdge = /Edge/i.test(UA);

  var SmartBanner = function(options) {
    // Get the original margin-top of the HTML element so we can take that into account.
    this.origHtmlMargin = parseFloat($('html').css('margin-top'));
    this.options = $.extend({}, $.smartbanner.defaults, options);

    // Check if it's already a standalone web app or running within a webui view of an app (not mobile safari).
    var standalone = navigator.standalone;

    // Detect banner type (iOS or Android).
    if (this.options.force) {
      this.type = this.options.force;
    }
    else if (UA.match(/Windows Phone/i) !== null && UA.match(/Edge|Touch/i) !== null) {
      this.type = 'windows';
    }
    else if (UA.match(/iPhone|iPod/i) !== null || (UA.match(/iPad/) && this.options.iOSUniversalApp)) {
      if (UA.match(/Safari/i) !== null &&
          (UA.match(/CriOS/i) !== null ||
           UA.match(/FxiOS/i) != null ||
            window.Number(UA.substr(UA.indexOf('OS ') + 3, 3).replace('_', '.')) < 6)) {
        // Check webview and native smart banner support (iOS 6+).
        this.type = 'ios';
      }
    }
    else if (UA.match(/\bSilk\/(.*\bMobile Safari\b)?/) || UA.match(/\bKF\w/) || UA.match('Kindle Fire')) {
      this.type = 'kindle';
    }
    else if (UA.match(/Android/i) !== null) {
      this.type = 'android';
    }
    // Don't show banner if device isn't iOS or Android, website is loaded in app or user dismissed banner.
    if (!this.type || standalone || this.getCookie('sb-closed') || this.getCookie('sb-installed')) {
      return;
    }
    // Calculate scale.
    this.scale = this.options.scale == 'auto' ? $(window).width() / window.screen.width : this.options.scale;
    if (this.scale < 1) {
      this.scale = 1;
    }
    // Get info from meta data.
    var meta = $(
      this.type == 'android'
        ? 'meta[name="google-play-app"]'
        : (this.type == 'ios'
            ? 'meta[name="apple-itunes-app"]'
            : (this.type == 'kindle'
                ? 'meta[name="kindle-fire-app"]'
                : 'meta[name="msApplication-ID"]'
              )
          )
    );

    if (!meta.length) {
      return;
    }
    // For Windows Store apps, get the PackageFamilyName for protocol launch.
    if (this.type == 'windows') {
      if (isEdge) {
        this.appId = $('meta[name="msApplication-PackageEdgeName"]').attr('content');
      }
      if (!this.appId) {
        this.appId = $('meta[name="msApplication-PackageFamilyName"]').attr('content');
      }
    }
    else {
      // Try to pull the appId out of the meta tag and store the result.
      var parsedMetaContent = /app-id=([^\s,]+)/.exec(meta.attr('content'));
      if (parsedMetaContent) {
        this.appId = parsedMetaContent[1];
      } else {
        return;
      }
    }
    this.title = this.options.title
      ? this.options.title
      : (meta.data('title') || $('title').text().replace(/\s*[|\-·].*$/, ''));

    this.author = this.options.author
      ? this.options.author
      : (meta.data('author') || ($('meta[name="author"]').length ? $('meta[name="author"]').attr('content') : window.location.hostname));

    this.iconUrl = meta.data('icon-url');
    this.price = meta.data('price');

    // Set default onInstall callback if not set in options.
    if (typeof this.options.onInstall == 'function') {
      this.options.onInstall = this.options.onInstall;
    } else {
      this.options.onInstall = function() {};
    }
    // Set default onClose callback if not set in options.
    if (typeof this.options.onClose == 'function') {
      this.options.onClose = this.options.onClose;
    } else {
      this.options.onClose = function() {};
    }
    // Create banner.
    this.create();
    this.show();
    this.listen();
  };

  SmartBanner.prototype = {

    constructor: SmartBanner,

    create: function() {
      var iconURL;
      var price = this.price || this.options.price;

      var link = this.options.url || (function() {
        switch (this.type) {
          case 'android':
            return 'market://details?id=';
          case 'kindle':
            return 'amzn://apps/android?asin=';
          case 'windows':
            return isEdge
              ? 'ms-windows-store://pdp/?productid='
              : 'ms-windows-store:navigate?appid=';
        }
        return 'https://itunes.apple.com/' + this.options.appStoreLanguage + '/app/id';
      }.call(this) + this.appId);

      var inStore = !price ? '' : (function() {
        var result = price + ' - ';
        switch (this.type) {
          case 'android':
            return result + this.options.inGooglePlay;
          case 'kindle':
            return result + this.options.inAmazonAppStore;
          case 'windows':
            return result + this.options.inWindowsStore;
        }
        return result + this.options.inAppStore
      }.call(this));

      var gloss = this.options.iconGloss == null
        ? (this.type=='ios')
        : this.options.iconGloss;

      if (this.type == 'android' && this.options.GooglePlayParams) {
        link += '&referrer=' + this.options.GooglePlayParams;
      }
      var banner = (
        '<div id="smartbanner" class="' + this.type + '">' +
          '<div class="sb-container">' +
            '<a href="#" class="sb-close">&times;</a>' +
            '<span class="sb-icon"></span>' +
            '<div class="sb-info">' +
              '<strong>' + this.title + '</strong>' +
              '<span>' + this.author + '</span>' +
              '<span>' + inStore + '</span>' +
            '</div>' +
            '<a href="' + link + '" class="sb-button">' +
              '<span>' + this.options.button + '</span>' +
            '</a>' +
          '</div>' +
        '</div>'
      );
      if (this.options.layer) {
        $(this.options.appendToSelector).append(banner);
      } else {
        $(this.options.appendToSelector).prepend(banner);
      }
      if (this.options.icon) {
        iconURL = this.options.icon;
      } else if(this.iconUrl) {
        iconURL = this.iconUrl;
      } else if ($('link[rel="apple-touch-icon-precomposed"]').length > 0) {
        iconURL = $('link[rel="apple-touch-icon-precomposed"]').attr('href');
        if (this.options.iconGloss == null) {
          gloss = false;
        }
      } else if ($('link[rel="apple-touch-icon"]').length > 0) {
        iconURL = $('link[rel="apple-touch-icon"]').attr('href');
      } else if ($('meta[name="msApplication-TileImage"]').length > 0) {
        iconURL = $('meta[name="msApplication-TileImage"]').attr('content');
      } else if ($('meta[name="msapplication-TileImage"]').length > 0) {
        // Redundant because ms docs show two case usages.
        iconURL = $('meta[name="msapplication-TileImage"]').attr('content');
      }
      if (iconURL) {
        $('#smartbanner .sb-icon').css('background-image', 'url(' + iconURL + ')');
        if (gloss) {
          $('#smartbanner .sb-icon').addClass('gloss');
        }
      } else{
        $('#smartbanner').addClass('no-icon');
      }
      this.bannerHeight = $('#smartbanner').outerHeight() + 2;

      if (this.scale > 1) {
        $('#smartbanner')
          .css('top', parseFloat($('#smartbanner').css('top')) * this.scale)
          .css('height', parseFloat($('#smartbanner').css('height')) * this.scale)
          .hide();
        $('#smartbanner .sb-container')
          .css('-webkit-transform', 'scale(' + this.scale + ')')
          .css('-msie-transform', 'scale(' + this.scale + ')')
          .css('-moz-transform', 'scale(' + this.scale + ')')
          .css('width', $(window).width() / this.scale);
      }
      $('#smartbanner')
        .css('position', this.options.layer ? 'absolute' : 'static');
    },

    listen: function() {
      $('#smartbanner .sb-close').on('click', $.proxy(this.close, this));
      $('#smartbanner .sb-button').on('click', $.proxy(this.install, this));
    },

    show: function(callback) {
      var banner = $('#smartbanner');
      banner.stop();

      if (this.options.layer) {
        banner
          .animate({ top: 0, display: 'block' }, this.options.speedIn)
          .addClass('shown')
          .show();
        $(this.pushSelector)
          .animate({
            paddingTop: this.origHtmlMargin + (this.bannerHeight * this.scale)
          }, this.options.speedIn, 'swing', callback);
      }
      else {
        if ($.support.transition) {
          banner.animate({ top: 0 }, this.options.speedIn).addClass('shown');
          var transitionCallback = function() {
            $('html').removeClass('sb-animation');
            if (callback) {
              callback();
            }
          };
          $(this.pushSelector)
            .addClass('sb-animation')
            .one($.support.transition.end, transitionCallback)
            .emulateTransitionEnd(this.options.speedIn)
            .css('margin-top', this.origHtmlMargin + (this.bannerHeight * this.scale));
        }
        else {
          banner
            .slideDown(this.options.speedIn)
            .addClass('shown');
        }
      }
    },

    hide: function(callback) {
      var banner = $('#smartbanner');
      banner.stop();

      if (this.options.layer) {
        banner.animate({
          top: -1 * this.bannerHeight * this.scale,
          display: 'block'
        }, this.options.speedIn)
        .removeClass('shown');

        $(this.pushSelector)
          .animate({
            paddingTop: this.origHtmlMargin
          }, this.options.speedIn, 'swing', callback);
      }
      else {
        if ($.support.transition) {
          if (this.type !== 'android') {
            banner
              .css('top', -1 * this.bannerHeight * this.scale)
              .removeClass('shown');
          }
          else {
            banner
              .css({display:'none'})
              .removeClass('shown');
          }
          var transitionCallback = function() {
            $('html').removeClass('sb-animation');
            if (callback) {
              callback();
            }
          };
          $(this.pushSelector)
            .addClass('sb-animation')
            .one($.support.transition.end, transitionCallback)
            .emulateTransitionEnd(this.options.speedOut)
            .css('margin-top', this.origHtmlMargin);
        }
        else {
          banner.slideUp(this.options.speedOut).removeClass('shown');
        }
      }
    },

    close: function(e) {
      e.preventDefault();
      this.hide();
      this.setCookie('sb-closed', 'true', this.options.daysHidden);
      this.options.onClose(e);
    },

    install: function(e) {
      if (this.options.hideOnInstall) {
        this.hide();
      }
      this.setCookie('sb-installed', 'true', this.options.daysReminder);
      this.options.onInstall(e);
    },

    setCookie: function(name, value, exdays) {
      var exdate = new Date();
      exdate.setDate(exdate.getDate() + exdays);
      value = encodeURI(value) + ((exdays == null) ? '' : '; expires=' + exdate.toUTCString());
      document.cookie = name + '=' + value + '; path=/;';
    },

    getCookie: function(name) {
      var i, x, y, ARRcookies = document.cookie.split(';');
      for (i = 0; i < ARRcookies.length; i++) {
        x = ARRcookies[i].substr(0, ARRcookies[i].indexOf('='));
        y = ARRcookies[i].substr(ARRcookies[i].indexOf('=') + 1);
        x = x.replace(/^\s+|\s+$/g, '');
        if (x == name) {
          return decodeURI(y);
        }
      }
      return null;
    },

    // Demo only.
    switchType: function() {
      var that = this;

      this.hide(function() {
        that.type = that.type == 'android' ? 'ios' : 'android';
        var meta = $(that.type == 'android' ? 'meta[name="google-play-app"]' : 'meta[name="apple-itunes-app"]').attr('content');
        that.appId = /app-id=([^\s,]+)/.exec(meta)[1];

        $('#smartbanner').detach();
        that.create();
        that.show();
      });
    }
  };

  $.smartbanner = function(option) {
    var $window = $(window);
    var data = $window.data('smartbanner');
    var options = typeof option == 'object' && option;
    if (!data) {
      $window.data('smartbanner', (data = new SmartBanner(options)));
    }
    if (typeof option == 'string') {
      data[option]();
    }
  };

  // override these globally if you like (they are all optional)
  $.smartbanner.defaults = {
    title: null, // What the title of the app should be in the banner (defaults to <title>)
    author: null, // What the author of the app should be in the banner (defaults to <meta name="author"> or hostname)
    price: 'FREE', // Price of the app
    appStoreLanguage: 'us', // Language code for App Store
    inAppStore: 'On the App Store', // Text of price for iOS
    inGooglePlay: 'In Google Play', // Text of price for Android
    inAmazonAppStore: 'In the Amazon Appstore',
    inWindowsStore: 'In the Windows Store', //Text of price for Windows
    GooglePlayParams: null, // Aditional parameters for the market
    icon: null, // The URL of the icon (defaults to <meta name="apple-touch-icon">)
    iconGloss: null, // Force gloss effect for iOS even for precomposed
    button: 'VIEW', // Text for the install button
    url: null, // The URL for the button. Keep null if you want the button to link to the app store.
    scale: 'auto', // Scale based on viewport size (set to 1 to disable)
    speedIn: 300, // Show animation speed of the banner
    speedOut: 400, // Close animation speed of the banner
    daysHidden: 15, // Duration to hide the banner after being closed (0 = always show banner)
    daysReminder: 90, // Duration to hide the banner after "VIEW" is clicked *separate from when the close button is clicked* (0 = always show banner)
    force: null, // Choose 'ios', 'android' or 'windows'. Don't do a browser check, just always show this banner
    hideOnInstall: true, // Hide the banner after "VIEW" is clicked.
    layer: false, // Display as overlay layer or slide down the page
    iOSUniversalApp: true, // If the iOS App is a universal app for both iPad and iPhone, display Smart Banner to iPad users, too.
    appendToSelector: 'body', //Append the banner to a specific selector
    pushSelector: 'html' // What element is going to push the site content down; this is where the banner append animation will start.
  };

  $.smartbanner.Constructor = SmartBanner;

  // ============================================================
  // Bootstrap transition
  // Copyright 2011-2014 Twitter, Inc.
  // Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)

  function transitionEnd () {
    var el = document.createElement('smartbanner');

    var transEndEventNames = {
      WebkitTransition: 'webkitTransitionEnd',
      MozTransition: 'transitionend',
      OTransition: 'oTransitionEnd otransitionend',
      transition: 'transitionend'
    };

    for (var name in transEndEventNames) {
      if (el.style[name] !== undefined) {
        return {end: transEndEventNames[name]};
      }
    }
    // Explicit for ie8.
    return false;
  }
  if ($.support.transition !== undefined) {
    // Prevent conflict with Twitter Bootstrap.
    return;
  }

  // http://blog.alexmaccaw.com/css-transitions
  $.fn.emulateTransitionEnd = function(duration) {
    var called = false, $el = this;
    $(this).one($.support.transition.end, function() {
      called = true;
    });
    var callback = function() {
      if (!called) {
        $($el).trigger($.support.transition.end);
      }
    };
    setTimeout(callback, duration);
    return this;
  };

  $(function() {
    $.support.transition = transitionEnd();
  });
  // ============================================================
});


/*
### jQuery Star Rating Plugin v3.13 - 2009-03-26 ###
* Home: http://www.fyneworks.com/jquery/star-rating/
* Code: http://code.google.com/p/jquery-star-rating-plugin/
*
* Dual licensed under the MIT and GPL licenses:
*   http://www.opensource.org/licenses/mit-license.php
*   http://www.gnu.org/licenses/gpl.html
###
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';5(29.1j)(7($){5($.1L.1J)1I{1t.1H("1K",J,H)}1M(e){};$.n.3=7(i){5(4.Q==0)k 4;5(A I[0]==\'1h\'){5(4.Q>1){8 j=I;k 4.W(7(){$.n.3.y($(4),j)})};$.n.3[I[0]].y(4,$.1T(I).1U(1)||[]);k 4};8 i=$.12({},$.n.3.1s,i||{});$.n.3.K++;4.2a(\'.9-3-1f\').o(\'9-3-1f\').W(7(){8 a,l=$(4);8 b=(4.23||\'21-3\').1v(/\\[|\\]/g,\'Z\').1v(/^\\Z+|\\Z+$/g,\'\');8 c=$(4.1X||1t.1W);8 d=c.6(\'3\');5(!d||d.18!=$.n.3.K)d={z:0,18:$.n.3.K};8 e=d[b];5(e)a=e.6(\'3\');5(e&&a)a.z++;x{a=$.12({},i||{},($.1b?l.1b():($.1S?l.6():s))||{},{z:0,F:[],v:[]});a.w=d.z++;e=$(\'<1R V="9-3-1Q"/>\');l.1P(e);e.o(\'3-15-T-17\');5(l.S(\'R\'))a.m=H;e.1c(a.E=$(\'<P V="3-E"><a 14="\'+a.E+\'">\'+a.1d+\'</a></P>\').1g(7(){$(4).3(\'O\');$(4).o(\'9-3-N\')}).1i(7(){$(4).3(\'u\');$(4).G(\'9-3-N\')}).1l(7(){$(4).3(\'r\')}).6(\'3\',a))};8 f=$(\'<P V="9-3 q-\'+a.w+\'"><a 14="\'+(4.14||4.1p)+\'">\'+4.1p+\'</a></P>\');e.1c(f);5(4.11)f.S(\'11\',4.11);5(4.1r)f.o(4.1r);5(a.1F)a.t=2;5(A a.t==\'1u\'&&a.t>0){8 g=($.n.10?f.10():0)||a.1w;8 h=(a.z%a.t),Y=1y.1z(g/a.t);f.10(Y).1A(\'a\').1B({\'1C-1D\':\'-\'+(h*Y)+\'1E\'})};5(a.m)f.o(\'9-3-1o\');x f.o(\'9-3-1G\').1g(7(){$(4).3(\'1n\');$(4).3(\'D\')}).1i(7(){$(4).3(\'u\');$(4).3(\'C\')}).1l(7(){$(4).3(\'r\')});5(4.L)a.p=f;l.1q();l.1N(7(){$(4).3(\'r\')});f.6(\'3.l\',l.6(\'3.9\',f));a.F[a.F.Q]=f[0];a.v[a.v.Q]=l[0];a.q=d[b]=e;a.1O=c;l.6(\'3\',a);e.6(\'3\',a);f.6(\'3\',a);c.6(\'3\',d)});$(\'.3-15-T-17\').3(\'u\').G(\'3-15-T-17\');k 4};$.12($.n.3,{K:0,D:7(){8 a=4.6(\'3\');5(!a)k 4;5(!a.D)k 4;8 b=$(4).6(\'3.l\')||$(4.U==\'13\'?4:s);5(a.D)a.D.y(b[0],[b.M(),$(\'a\',b.6(\'3.9\'))[0]])},C:7(){8 a=4.6(\'3\');5(!a)k 4;5(!a.C)k 4;8 b=$(4).6(\'3.l\')||$(4.U==\'13\'?4:s);5(a.C)a.C.y(b[0],[b.M(),$(\'a\',b.6(\'3.9\'))[0]])},1n:7(){8 a=4.6(\'3\');5(!a)k 4;5(a.m)k;4.3(\'O\');4.1a().19().X(\'.q-\'+a.w).o(\'9-3-N\')},O:7(){8 a=4.6(\'3\');5(!a)k 4;5(a.m)k;a.q.1V().X(\'.q-\'+a.w).G(\'9-3-1k\').G(\'9-3-N\')},u:7(){8 a=4.6(\'3\');5(!a)k 4;4.3(\'O\');5(a.p){a.p.6(\'3.l\').S(\'L\',\'L\');a.p.1a().19().X(\'.q-\'+a.w).o(\'9-3-1k\')}x $(a.v).1m(\'L\');a.E[a.m||a.1Y?\'1q\':\'1Z\']();4.20()[a.m?\'o\':\'G\'](\'9-3-1o\')},r:7(a,b){8 c=4.6(\'3\');5(!c)k 4;5(c.m)k;c.p=s;5(A a!=\'B\'){5(A a==\'1u\')k $(c.F[a]).3(\'r\',B,b);5(A a==\'1h\')$.W(c.F,7(){5($(4).6(\'3.l\').M()==a)$(4).3(\'r\',B,b)})}x c.p=4[0].U==\'13\'?4.6(\'3.9\'):(4.22(\'.q-\'+c.w)?4:s);4.6(\'3\',c);4.3(\'u\');8 d=$(c.p?c.p.6(\'3.l\'):s);5((b||b==B)&&c.1e)c.1e.y(d[0],[d.M(),$(\'a\',c.p)[0]])},m:7(a,b){8 c=4.6(\'3\');5(!c)k 4;c.m=a||a==B?H:J;5(b)$(c.v).S("R","R");x $(c.v).1m("R");4.6(\'3\',c);4.3(\'u\')},1x:7(){4.3(\'m\',H,H)},24:7(){4.3(\'m\',J,J)}});$.n.3.1s={E:\'25 26\',1d:\'\',t:0,1w:16};$(7(){$(\'l[27=28].9\').3()})})(1j);',62,135,'|||rating|this|if|data|function|var|star|||||||||||return|input|readOnly|fn|addClass|current|rater|select|null|split|draw|inputs|serial|else|apply|count|typeof|undefined|blur|focus|cancel|stars|removeClass|true|arguments|false|calls|checked|val|hover|drain|div|length|disabled|attr|be|tagName|class|each|filter|spw|_|width|id|extend|INPUT|title|to||drawn|call|andSelf|prevAll|metadata|append|cancelValue|callback|applied|mouseover|string|mouseout|jQuery|on|click|removeAttr|fill|readonly|value|hide|className|options|document|number|replace|starWidth|disable|Math|floor|find|css|margin|left|px|half|live|execCommand|try|msie|BackgroundImageCache|browser|catch|change|context|before|control|span|meta|makeArray|slice|children|body|form|required|show|siblings|unnamed|is|name|enable|Cancel|Rating|type|radio|window|not'.split('|'),0,{}))

/**
* @author simonius
*/
var params = new Object();
$(document).ready(function(){
  var navi = $("#navivertical ul.mainnavivertical");
  if(navi != null)
  {
    if(!navi.hasClass('noJsPositioning')){
      navi.attr(
          "style", "margin-top:" + (( 230 - $("#navivertical ul.mainnavivertical").height()) / 2) + "px;"
      );
    }
  }


/**
  * document.location.params will store all document parameters 
  * found in location after '?'. E.g. 'index.html?foo=bar&lorem=ipsum' 
  * becomes an object { 'foo':'bar', 'lorem':'ipsum'}
  */
jQuery.extend(document.location, {'params':{}});
var _params = document.location.search;
if( _params ){
  // get stuff after '?'
  _params = _params.match(/\?(.*)/);
  if( undefined != _params[1] ){
   // split parameter sets
   _params = _params[1].split('&');
   for( i=0; i<_params.length; i++ ){
    // split key from value
    var tmp = _params[i].split('=');
    document.location.params[ tmp[0] ] = tmp[1];
   }
  }
}

$('#kontaktformular .rating-container span.starDesc').hide();

/**
  * Homepage mainmenu flyouts
  */
  
$("li.produkte").hover(
  function(){ $("div", this).show(10); }, 
  function(){ $("div", this).hide(10); } 
);
if (document.all) {
  $("li.produkte").hoverClass ("navhover");
}

$("li.rezepte").hover(
  function(){ $("div", this).show(10); }, 
  function(){ $("div", this).hide(10); } 
);
if (document.all) {
  $("li.rezepte").hoverClass ("navhover");
}

$("li.geniessen").hover(
  function(){ $("div", this).show(10); }, 
  function(){ $("div", this).hide(10); } 
);
if (document.all) {
  $("li.geniessen").hoverClass ("navhover");
}

$("li.beratung").hover(
  function(){ $("div", this).show(10); }, 
  function(){ $("div", this).hide(10); } 
);
if (document.all) {
  $("li.beratung").hoverClass ("navhover");
}

});

/**
* navigation mouseover
*/
$.fn.hoverClass = function(c) {
return this.each(function(){
        $(this).hover( 
                function() { $(this).addClass(c); },
                function() { $(this).removeClass(c); }
        );
});
};

/**
* font sizing scripts
*/ 
function fontsizeup() {
  active = getActiveStyleSheet();
  switch (active) {
    case 'A+' : 
     setActiveStyleSheet('A++');
     break;
    case 'A++' : 
     setActiveStyleSheet('A++');
     break;
    default :
     setActiveStyleSheet('A+');
     break;
  }
  return false;
}
function fontsizedown() {
  active = getActiveStyleSheet();
  switch (active) {
    case 'A++' : 
     setActiveStyleSheet('A+');
     break;
    case 'A+' : 
     setActiveStyleSheet('A');
     break;
    default :
     setActiveStyleSheet('A');
     break;
  }
  return false;
}

/**
* Add class for boplans without points
*/
$(document).ready(function(){
  var element = $('.boplans2013 #points .BonusPoints');
    if ($(element).text().length > 15)
    {
     $('.boplans2013 #points').addClass('text');
    }
    
    
   $('#teaserempfehlungenabstand').removeClass('redaktion');
    if ($('.redaktion').length > 0)
    {
     $('#teaserempfehlungenabstand').addClass('redaktion');
    }  

   $('.redaktion').removeClass('category');
    if ($('#teaserempfehlungenabstand').length > 0)
    {
     $('.redaktion').addClass('category');
    }         
});

/* IE recognition and fixes */
$(document).ready( function() {
   if (checkBrowserName('msie')) $('body').addClass('ie');
   if (checkBrowserName('msie 9')) $('body').addClass('ie9');
   if (checkBrowserName('msie 7')) $('body').addClass('ie7');   
   if (checkBrowserName('msie 8')) $('body').addClass('ie8');      
   if (checkBrowserName('opera')) $('body').addClass('opera');
   if (checkBrowserName('chrome')) $('body').addClass('chrome'); 
   
   function checkBrowserName(name)
   {  
    var agent = navigator.userAgent.toLowerCase();  
    if (agent.indexOf(name.toLowerCase())>-1)
    {  
     return true;  
    }  
    return false;  
   }  
});    

$(document).ready(function(){
  if($('#topteaser #layerClick').length > 0 || $('.teaser #layerClick').length > 0)
  {
    $('body').addClass('teaserLayer');
  }

});

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
     a.disabled = true;
     if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
  createCookie("style", title, 365);
}
function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}
function getPreferredStyleSheet() {
	return ('A');
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  } else {
    expires = "";
  }
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

/**
* Initializing stylesheets, image rotator and ticker 
*/
/*
$(document).ready(function(e) {
	var cookie = readCookie("style");
	var title = (cookie != null) ? cookie : getPreferredStyleSheet();
	setActiveStyleSheet(title);
});
*/

/**
* Image rotator
*/
var ImageRotation = {
init:function(){
  this.images=$('#image_holder img');
  this.smallImages= $('#katalogVarianten img');
  if( this.images.length > 0 ){
   this.prev=-1;
   this.cur=-1;
   this.playing=true;
   this.play();
  }
},
play:function(){
  var _this=this;
  if(!this.playing) return false;
  this.step(1);
  this.tm=setTimeout(function(){_this.play()},10000);
},
step:function(num){
  this.prev=this.cur;
  this.cur+=num;
  if(this.cur>=this.images.length) this.cur=0;
  if(this.cur<0) this.cur=this.images.length-1;
  if(this.prev>0)
  { 
    $(this.images[this.prev]).fadeOut('slow');
    if(this.smallImages != null)
      $(this.smallImages[this.prev]).fadeOut('slow');
  }
  $(this.images[this.cur]).fadeIn('slow');
  if(this.smallImages != null)
    $(this.smallImages[this.cur]).fadeIn('slow');

  return false;
},
pause:function(obj){
  obj.blur();
  if(this.playing){
   obj.parentNode.parentNode.className="zoomImageNav_act";
   this.playing=false;
   clearTimeout(this.tm);
  }
  else{
   obj.parentNode.parentNode.className="zoomImageNav";
   this.playing=true;
   this.play();
  }
  return false;
}
}


// init when document is ready
$(document).ready(function(e){
ImageRotation.init();
});

/**
* Ticker
*/
var TickerRotation={
init:function(){
  this.meldung=$('#ticker div');
  this.prev=-1;
  this.cur=-1;
  this.playing=true;
  this.play();
},
play:function(){
  var _this=this;
  if(!this.playing) return false;
  this.step(1);
  this.tm=setTimeout(function(){_this.play()},8666);
},
step:function(num){
  this.prev=this.cur;
  this.cur+=num;
  if(this.cur>=this.meldung.length) this.cur=0;
  if(this.cur<0) this.cur=this.meldung.length-1;
  if(this.prev>0) $(this.meldung[this.prev]).fadeOut('slow');
  $(this.meldung[this.cur]).fadeIn('slow');
  return false;
}
}

// init when document is ready
$(document).ready(function(e){
TickerRotation.init();
});

/**
* Toggles content in .readtoggler DIVs, when H2 is clicked
*/
var ReadToggler = {
/**
  * UI texts
  */
showTxt: '[anzeigen]',
hideTxt: '[schließen]',

/**
  * Initializes the read toggler
  */
init: function(){
  // find all readtoggle DIVs and add interaction
  $('div.readtoggler').children('h2, h3').click(function() {
    var $this = $(this);
    
    if ($this.parent().hasClass('readtoggler-open')) {
      ReadToggler.hide(this);
    } else {
      ReadToggler.show(this);
    }
  });
  
  if (location.href.match(/#\d+$/)) {
    var aid = location.href.substring(location.href.lastIndexOf('#') + 1);
    ReadToggler.show($(document.body).find('h2#' + aid));
  }

  // initial click
  $(document.body).find('#artikeldetail div.readtoggler>h2, #artikeldetail div.readtoggler>h3').trigger('click');
  $(document.body).find('#artikeldetail div.readtoggler-default-open>h2, #artikeldetail div.readtoggler-default-open>h3').trigger('click');
},

/**
  * Shows the toggable elements
  */
show: function(trigger){
  
  $(trigger).siblings('.toggle').slideDown('fast', function(){
   $(trigger).parents('.readtoggler').addClass('readtoggler-open'); 
  });
  $(trigger).children('span').html(ReadToggler.hideTxt);
},

/**
  * Hides the toggable elements
  */
hide: function(trigger){
  $(trigger).siblings('.toggle').hide('fast', function(){
   $(trigger).parents('.readtoggler').removeClass('readtoggler-open');   
  });
  $(trigger).children('span').html(ReadToggler.showTxt);
}

} 

// init when document is ready
$(document).ready(function(e){
ReadToggler.init();
});

/**
* Tabbed content controller.
*/
var Tabber = {
/**
  * Initializes the tabber
  */
init: function(){
  // save a position for each tab and register a click event
  $.each($(document.body).find('.tabliste ul.reiter li'), function(i,n){
   // save data
   $(n).data('position', i);
   // register click event on child link
   $(n).find('a').click(function(evt){
    var pos = $(this).parent('li').data('position');
    Tabber.reset(this);
    Tabber.show(this, pos);
    return false;
   });
  });
  // choose first tab in all tabbers in the document
  $(document.body).find('.tabliste ul.reiter li a').filter(':first').trigger('click');
},

/**
  * Shows desired content and sets tab as active
  */
show: function(trigger, pos){
  // activate tab
  $(trigger).parents('li').addClass('active');
  
  // show desired content
  var contentObjs = $(trigger).parents('.tabliste').find('.tabliste_content');
  if( contentObjs[pos] ){
   var contentObj = contentObjs[pos];
   $(contentObj).fadeIn();
  }
  
},

/**
  * Hides all content and sets all tabs as not active
  */
reset: function(trigger){
  $(trigger).parents('ul.reiter').find('li').removeClass('active');
  $(trigger).parents('.tabliste').find('.tabliste_content').hide();
}

}
// init when document is ready
$(document).ready(function(e){
Tabber.init();
});

/**
* All Basket functions wrapped in this object
*/
var Basket = {

/**
  * Initializes the Basket
  */
init: function(){
  // register an onkey event that will reset all "add to Basket" layers
  $(document).keyup(function(event){
   // cache escape key
   if (event.keyCode == 27) {
    Basket.hideAllAddLayer();
   }
  });
  // register click event on document to reset all "add to Basket" layers
  $(document).click(function(event){
   var t = event.target;
   var found = false;
   // check if p.bestellenlayer or a.addtobasket bubbled
   do {
    if( ($(t).is('p.bestellenlayer') || $(t).is('a.addtobasket')) && $(t).closest("#middlesection").length == 0){
     found = true;
     break;
    }
   } while( t = t.parentNode );
   // if there was no click on a "add to Basket" related item
   // hide all layers
   if( !found ){
    Basket.hideAllAddLayer();
   } 
  });
},

/**
  * shows the desired "add to Basket" layer
  */
showAddLayer: function(srcObj){
  // hide all first
  Basket.hideAllAddLayer();
  // get current layer and show it
  var layer = $(srcObj).parents('ul.options').siblings('form').find('.bestellenlayer');
  layer.show();
  layer.find('input.anzahl').focus().select();
  return false;
},

/**
  * hides all "add to Basket" layers
  */
hideAllAddLayer: function(){
  $.each($(document.body).find('.bestellenlayer'), function(i,n){
   if ($(this).closest("#middlesection").length == 0) $(n).hide();
  });
},

/**
  * Add all items to basket
  */
addAllItems: function(trigger,prefix,url){ 
Basket.hideAllAddLayer();

var datastr = '';
var itemsstr = '';
for(i=0; i < trigger.elements.length; i++) 
{
  if(trigger.elements[i].type == 'text' && trigger.elements[i].name.indexOf(prefix) == 0)
  {
   datastr += (datastr.length == 0 ? '' : '&') + trigger.elements[i].name + '=' + trigger.elements[i].value;   
  }
  if(trigger.elements[i].type == 'hidden' && trigger.elements[i].name == 'ItemID')
  {
   itemsstr += (itemsstr.length == 0 ? '' : ',') + "#sub3 table tr#" + trigger.elements[i].value;   
  }
}

var xml = $.ajax({
     type: "POST",
     url: url,
     data: datastr,      
     dataType: "xml",
     async: false,      
     success: function(xml) {
   if( $(xml).find('data').attr('status') == 'ok')
   {
          $('ul#toolbox li#cart').html($(xml).find('data').text());
        
    // set toolbox 
    $('#toolbox #cart>a').click( function(evt){
     $('#toolbox #sub3:visible').length ? Toolbox.reset() : Toolbox.openCart();
     return false;
    });          
    Toolbox.openCart();
        
    // highlight added entry
    $(itemsstr).find('td').effect("pulsate", { times: 3 }, 250).effect("highlight", {}, 2000);

   }      
     }
}).responseXML;

if($(xml).find('data').attr('status') == 'ok')       
  return false;
else
  return true; 
},

/**
  * Add an item into the basket
  */
addItem: function(url,productrefid,itemid,quantity){

  Basket.hideAllAddLayer();
  var xml = $.ajax({
      type: "POST",
      url: url,
      data: "Quantity=" + quantity + "&ProductRefID=" + productrefid ,      
      dataType: "xml",
      async: false,      
      success: function(xml) {
       
       if( $(xml).find('data').attr('status') == 'ok')
       {        
        $('ul#toolbox li#cart').html($(xml).find('data').text());
        
     // set toolbox 
      $('#toolbox #cart>a').click( function(evt){
       $('#toolbox #sub3:visible').length ? Toolbox.reset() : Toolbox.openCart();
       return false;
      });          
     Toolbox.openCart();
         
     // highlight added entry
     $('#sub3 table tr#'+itemid).find('td').effect("pulsate", { times: 3 }, 250).effect("highlight", {}, 2000);
    
     // reset the toolbox after effects finished
     /*
     setTimeout(function(){
      Toolbox.reset();
     }, 3000);
     */
    }
   }
      }).responseXML;
      
  if($(xml).find('data').attr('status') == 'ok')       
   return false;
  else
   return true;
},

/**
  * Removes an item from the basket
  */
removeItem: function(trigger){
  // Ajax calls should come here and the following line 
  // should be outsourced to a callback function of the ajax call 
  
$.ajax({
    type: "GET",
    url: trigger.href,
    dataType: "xml",
    success: function(xml){
       var triggerid;      
    if( 1 == $(trigger).parents('table').find('tr').not('.total').length ){
     // only one row left so clear the basket
     Basket.clear(trigger); 
     
     $('#basketform').html($(xml).find('data').text());
    } else {
     
     $('#cart').find('a.tab').html($(xml).find('data plicount').eq(0).text());
    
     // multiple items left so simply remove item
     triggerid = $(trigger).parents('tr').attr('id');
     $(trigger).parents('tr').find('td').hide("pulsate", { times: 3 }, 250, function(){
      // really remove row after effect                 
      $(trigger).parents('tr').remove();
     });
     
     $('#basket').find('tr#'+triggerid).hide("pulsate", { times: 3 }, 250, function(){
      // really remove row after effect
      $('#basket').find('tr#'+triggerid).remove();
     });
     
     $('#cart').find('tr.total td.price').html($(xml).find('data grandtotal').eq(0).text());
     $('#basket').find('tr.gesamtsumme td.summe strong').html($(xml).find('data grandtotal').eq(0).text());

     $('#cart').find('tr.bonuspoints td.bonuspoints').html($(xml).find('data bonuspointsvaluetotal').eq(0).text());
     $('#basket').find('tr.bonuspoints td.summe strong').html($(xml).find('data bonuspointsvaluetotal').eq(0).text());
     $('#basket').find('tr.bonuspoints td.summe span.pointsproduct').html($(xml).find('data bonuspointsvalueproductstotal').eq(0).text());
     $('#basket').find('tr.bonuspoints td.summe span.pointsbasket').html($(xml).find('data bonuspointsvaluebaskettotal').eq(0).text());
    }    
    }
});    
return false;
},

/**
  * Clears the basket (removes all item from the cart)
  */
clear: function(trigger){
  // This is only for demonstration of course
  // Ajax calls should come here and the rest should be outsourced to 
  // a callback function. 
  var tableObj = $(trigger).parents('table');
  tableObj.hide("pulsate", { times: 3 }, 250, function(){
   tableObj.siblings('p.order, p.delivery').remove();
   tableObj.parents('#cart').find('li.status a').html("Ihr Warenkorb ist leer.");
   $(trigger).parents('#cart').find('a.tab').html("Warenkorb (0)");
  });
  return false;
}
}

// init when document is ready
$(document).ready(function(e){
Basket.init();
});

/**
* All toolbox functions wrapped in this object
*/
var Toolbox = {

/**
  * Initializes the toolbox
  */
init: function(){

  $('#toolbox #login>a').click( function(evt){
   $('#toolbox #sub1:visible, #toolbox #sub2:visible').length ? Toolbox.reset() : Toolbox.openLogin();
   return false;
  });
  
  $('#toolbox #cart>a').click( function(evt){
   if (window.matchMedia("(min-width: 768px)").matches) {
     $('#toolbox #sub3:visible').length ? Toolbox.reset() : Toolbox.openCart();
     return false;
   }
  });
  $('#toolbox .close, #toolbox .cartclose').click(function(evt){
   if (window.matchMedia("(min-width: 768px)").matches) {
     Toolbox.reset();
     return false;
   }
  });
  
},

/**
  * Activates the login layer
  */
openLogin: function(){
  Toolbox.reset();
  $('#toolbox').addClass('loginActive');
  if(typeof(document.location.params) !== "undefined" && '1' == document.location.params.loggedout ){
   // is logged out
   $('#sub1').hide('fast');
   $('#sub2').slideDown('fast');
  } else {
   // is logged in
   $('#sub1').slideDown('fast');  
   $('#sub2').hide('fast'); 
  }
},

/**
  * Activates the cart layer
  */
openCart: function(){
  Toolbox.reset();
  $('#toolbox').addClass('cartActive');
  $('#sub3').slideDown('fast');
},

/**
  * Reset all layers
  */
reset: function(){
  $('#toolbox').removeClass('loginActive');
  $('#toolbox').removeClass('cartActive');
  $('#sub1').hide('fast');
  $('#sub2').hide('fast');
  $('#sub3').hide('fast');
}
}
// init when document is ready
$(document).ready(function(e){
Toolbox.init();
});

/**
* Handles form error layers
*/
var FormErrors = {

/**
  * Initializes the FormErrors
  */
init: function(){
  var errorInputObjs = $(document.body).find('form .fehler').not('label').filter('[name]');
  $.each(errorInputObjs, function(i,n){
   var ident = $(n).attr('name');
   var layerObj = $(document.body).find('.fehlerlayer.'+ident);
   $(n).focus(function(evt){
    layerObj.fadeIn();
   });
   $(n).blur(function(evt){
    layerObj.fadeOut();
   });
  });
  
  // focus the first error field in the document
  $(document.body).find('form .fehler').not('label').filter(':first').trigger('focus');
}

}
// init when document is ready
$(document).ready(function(e){
FormErrors.init();
});

$(document).ready(function() {
  $(".lightview").click(function (e) {
    e.preventDefault();
    var target = (e.target.tagName.toLowerCase() != "img") ? e.target.href : e.target.parentNode.href;
    var close = "Schließen [ x ]";

    $("<iframe frameborder=\"0\" scrollbars=\"no\" style=\"border:0;margin:0\" width=\"521px\" height=\"375px\" src=\"" + target + "\"></iframe>").modal({
        closeHTML: "<div class='modal-close'><a href='#' title='" + close + "'>" + close + "</a></div>",
        position: ["15%",],
        overlayId: 'recipe-video-overlay',
        containerId: 'recipe-video-container',
        onOpen: video.open,
        onClose: video.close
    });
  });
  
  // observe buttons for closing the layer
  $(".modal-close").click(function (e) {
/*
    Omniture.trackUserAction(e, "Bestellbestätigung - Umfrage - nein");
*/
  });
  $(".no-button").click(function (e) {
    Omniture.trackUserAction(e, "Bestellbestätigung - Umfrage - nein");
  });
  
  // observe the "yes"-button for tracking
  $(".yes-button").click(function (e) {
    $.modal.close();
    Omniture.trackUserAction(e, "Bestellbestätigung - Umfrage - ja");
  });
});

var video = {
  message: null,
  open: function (dialog) {
    dialog.overlay.fadeIn('slow', function () {
      dialog.data.hide();
      dialog.container.slideDown('slow', function () {
        dialog.data.fadeIn('slow');
        dialog.overlay.click(function(e) { video.close(dialog); });
      });
    });
  },
  close: function (dialog) {
    dialog.data.fadeOut('slow', function () {
      dialog.container.slideUp('slow', function () {
        dialog.overlay.fadeOut('slow', function () {
          $.modal.close(); // must call this!
        });
      });
    });
  }
};

var lightbox = {
  message: null,
  open: function (dialog) {
    dialog.overlay.fadeIn('slow', function () {
      dialog.data.hide();
      dialog.data.fadeIn('slow', function () {
        dialog.container.slideDown('slow');
        dialog.overlay.click(function(e) { lightbox.close(dialog); });
      });
    });
  },
  close: function (dialog) {
      dialog.container.slideUp('slow', function () {
        dialog.overlay.fadeOut('slow', function () {
          $.modal.close(); // must call this!
        });
      });
  }
};




function openLayer() {
if ($('#layer').length > 0)
{
  $('#layer').modal({
      closeHTML: "<div class='modal-close'><a href='#' title='" + close + "'>" + " Schließen [ x ]" + "</a></div>",
      position: ["15%", "25%"],
      autoResize: true,
      overlayId: 'overlay',
      containerId: 'overlay-container',
      onOpen: lightbox.open,
      onClose: lightbox.close
  });
  
  if ($('.layerBig').length > 0)
  {
     $('.modal-close').hide();
     $('#overlay-container').css('padding', '0');
  }
  //createCookie("bofrostLayer" + bofrostLayerId, title, 365);
  }
}

function openLayerClick(instance) {
  var content = (instance !== undefined && instance !== null) ? $("#layerClick[data-instance = '" + instance + "']") : $("#layerClick");

	content.modal({
      closeHTML: "<div class='modal-close'><a href='#' title='" + close + "'>" + " <span>Fenster Schließen</span> " + "</a></div>",
      position: ["15%",],
      autoResize: true,
      overlayId: 'overlay',
      containerId: 'overlay-container',
      onOpen: lightbox.open,
      onClose: lightbox.close
  });
  
  if ($('.layerBig').length > 0)
  {
     $('.modal-close').hide();
     $('#overlay-container').css('padding', '0');
  }
  createCookie("bofrostLayer" + bofrostLayerId, title, 365);
}


function lightviewExternal(target, w, h) {
  var width = (w != null) ? w : 521;
  var height = (h != null) ? h : 375;

  $("<iframe id=\"overlayIFrame\" frameborder=\"0\" scrollbars=\"no\" style=\"border:0;margin:0\" width=\"" + width + "px\" height=\"" + height + "px\" src=\"" + target + "\"></iframe>").modal({
      closeHTML: "<div class='modal-close'><a href='#' title='" + close + "'>" + " Schließen [x]" + "</a></div>",
      position: ["15%",],
      autoResize: true,
      overlayId: 'recipe-video-overlay',
      containerId: 'overlay-container',
      onOpen: lightbox.open,
      onClose: lightbox.close
  });
}

$(document).ready(function() {
  $(".redaktion .toggle").css("display", "none");
  
  $("a.toggleLink").click(function() {
    var $redaktion = $(this).closest(".redaktion");

    if($(this).hasClass("closed"))
    {
      $redaktion.find(".toggle").slideToggle(600, function() {
        $("a.toggleLink").removeClass("closed").addClass("open").html(closeText);
      });
    }
    else if ($(this).hasClass("open"))
    {
      $redaktion.find(".toggle").slideToggle(600, function() {
        $("a.toggleLink").removeClass("open").addClass("closed").html(openText);
      });
    }
  });
});

jQuery(document).ready(function() {
  jQuery("#disrupter .background").click(function(){
    var $this = $(this);    
    if(Econda!= undefined && $this.hasClass("close") ){
      // track only, if the fixed action bar was clicked to open the box
      Econda.marker('ServiceLayer'); 
    }
  });  
});

// init Smart Banner (see: http://www.jasny.net/jquery.smartbanner/)
$(document).ready(function(){
  if($.smartbanner !== undefined && $('meta[name="apple-itunes-app"], meta[name="google-play-app"]').length > 0){
    var options ={
      inAppStore: 'Im App Store',
      inGooglePlay: 'Im Google Play Store',
      price: 'KOSTENLOS',
      button: 'Zur App',
      icon:'http://www.bofrost.lu/is-bin/INTERSHOP.enfinity/WFS/bofrost-shopLU-Site/de_LU/-/EUR/Onion-Binary;pgid=oK5IC0oA.kk000EIe8gk88YZ000059zkVpQ1;sid=154cUgIMBNhXU1g27BPOs8DVHUOQEoJhQ38=?Id=o309337_23default'
    };

    if($('html').is('[lang]')){
      options.appStoreLanguage = $('html').attr('lang');
    }    
    $.smartbanner(options);
  }  
});


function queryParameter(param, toLower) {
	var vars = {};
	window.location.href.replace( location.hash, '' ).replace( 
		/[?&]+([^=&]+)=?([^&]*)?/gi, // regexp
		function( m, key, value ) { // callback
			vars[key] = value !== undefined ? value : '';
		}
	);

	if ( param ) {
    return vars[param] ? (toLower === true ? vars[param].toLowerCase() : vars[param]) : null;	
	}
	return vars;
}

function parse_query_string(query, keyToLowerString) {
  
  keyToLowerString = keyToLowerString || false;
  var vars = query.split("&");
  var query_string = {};
  for (var i = 0; i < vars.length; i++) {
    var pair = vars[i].split("=");
    var key = keyToLowerString && pair[0] && pair[0].toLowerCase ? pair[0].toLowerCase() : pair[0];
    // If first entry with this name
    if (typeof query_string[key] === "undefined") {      
      query_string[key] = decodeURIComponent(pair[1]);
      // If second entry with this name
    } else if (typeof query_string[key] === "string") {
      var arr = [query_string[key], decodeURIComponent(pair[1])];
      query_string[key] = arr;
      // If third or later entry with this name
    } else {
      query_string[key].push(decodeURIComponent(pair[1]));
    }
  }
  return query_string;
}

$( window ).load(function() {
  var query = window.location.search.substring(1);
	var qs = parse_query_string(query, true);  
  if(qs && qs.ecid && createCookie){
    createCookie('Affiliate', qs.ecid, 30);
  }
});

/*
* Metadata - jQuery plugin for parsing metadata from elements
*
* Copyright (c) 2006 John Resig, Yehuda Katz, Jörn Zaefferer, Paul McLanahan
*
* 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$
*
*/

/**
* Sets the type of metadata to use. Metadata is encoded in JSON, and each property
* in the JSON will become a property of the element itself.
*
* There are three supported types of metadata storage:
*
*   attr:  Inside an attribute. The name parameter indicates *which* attribute.
*          
*   class: Inside the class attribute, wrapped in curly braces: { }
*   
*   elem:  Inside a child element (e.g. a script tag). The
*          name parameter indicates *which* element.
*          
* The metadata for an element is loaded the first time the element is accessed via jQuery.
*
* As a result, you can define the metadata type, use $(expr) to load the metadata into the elements
* matched by expr, then redefine the metadata type and run another $(expr) for other elements.
* 
* @name $.metadata.setType
*
* @example <p id="one" class="some_class {item_id: 1, item_label: 'Label'}">This is a p</p>
* @before $.metadata.setType("class")
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
* @desc Reads metadata from the class attribute
* 
* @example <p id="one" class="some_class" data="{item_id: 1, item_label: 'Label'}">This is a p</p>
* @before $.metadata.setType("attr", "data")
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
* @desc Reads metadata from a "data" attribute
* 
* @example <p id="one" class="some_class"><script>{item_id: 1, item_label: 'Label'}</script>This is a p</p>
* @before $.metadata.setType("elem", "script")
* @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label"
* @desc Reads metadata from a nested script element
* 
* @param String type The encoding type
* @param String name The name of the attribute to be used to get metadata (optional)
* @cat Plugins/Metadata
* @descr Sets the type of encoding to be used when loading metadata for the first time
* @type undefined
* @see metadata()
*/

(function($) {

$.extend({
metadata : {
  defaults : {
   type: 'class',
   name: 'metadata',
   cre: /({.*})/,
   single: 'metadata'
  },
  setType: function( type, name ){
   this.defaults.type = type;
   this.defaults.name = name;
  },
  get: function( elem, opts ){
   var settings = $.extend({},this.defaults,opts);
   // check for empty string in single property
   if ( !settings.single.length ) settings.single = 'metadata';
   
   var data = $.data(elem, settings.single);
   // returned cached data if it already exists
   if ( data ) return data;
   
   data = "{}";
   
   if ( settings.type == "class" ) {
    var m = settings.cre.exec( elem.className );
    if ( m )
     data = m[1];
   } else if ( settings.type == "elem" ) {
    if( !elem.getElementsByTagName ) return;
    var e = elem.getElementsByTagName(settings.name);
    if ( e.length )
     data = $.trim(e[0].innerHTML);
   } else if ( elem.getAttribute != undefined ) {
    var attr = elem.getAttribute( settings.name );
    if ( attr )
     data = attr;
   }
   
   if ( data.indexOf( '{' ) <0 )
   data = "{" + data + "}";
   
   data = eval("(" + data + ")");
   
   $.data( elem, settings.single, data );
   return data;
  }
}
});

/**
* Returns the metadata object for the first member of the jQuery object.
*
* @name metadata
* @descr Returns element's metadata object
* @param Object opts An object contianing settings to override the defaults
* @type jQuery
* @cat Plugins/Metadata
*/
$.fn.metadata = function( opts ){
return $.metadata.get( this[0], opts );
};

})(jQuery);

/*
* jQuery textareaLimiter plugin
* @author Kristian Augustin - http://www.getit.de
* @version 0.1
* @date October 10, 2010
* @category jQuery plugin
* @copyright (c) 2010 getit GmbH (www.getit.de)
* Licensed under the GPL license: http://www.gnu.org/licenses/gpl.html
*/
(function($){
$.fn.textareaLimiter = function(options) {
  var defaults =  {
   maxLength : 5
  };
  var options = $.extend(defaults, options);

  return this.each(function() {  
   var id = $(this).attr('id');
   var o = options;

   var valBefore = null;
   $(this).keydown(function(e) {
    valBefore = $(this).val();
   });
   $(this).keyup(function(e) {
    var length = $(this).val().length;
    if (length > o.maxLength) {
     alert ("Sie haben die maximale Anzahl an Zeichen erreicht.");
     $(this).val(valBefore);
    }
    else {
     $('#'+id + "-counter").html("(Noch "+(o.maxLength-length)+" Zeichen)");
    }
    
   });
  });  
};
})(jQuery);

jQuery.fn.pulse = function( properties, duration, numTimes, interval) {  
   
   if (duration === undefined || duration < 0) duration = 500;
   if (duration < 0) duration = 500;

   if (numTimes === undefined) numTimes = 1;
   if (numTimes < 0) numTimes = 0;

   if (interval === undefined || interval < 0) interval = 0;

   return this.each(function() {
      var $this = jQuery(this);
      var origProperties = {};
      for (property in properties) {
         origProperties[property] = $this.css(property);
      }

      var subsequentTimeout = 0;
      for (var i = 0; i < numTimes; i++) {
         window.setTimeout(function() {
            $this.animate(
               properties,
               {
                  duration:duration / 2,
                  complete:function(){
                     $this.animate(origProperties, duration / 2)}
               }
            );
         }, (duration + interval)* i);
      }
   });
  
};

/*!
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.9995 (09-AUG-2011)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.3.2 or later
 */
;(function($) {

var ver = '2.9995';

// if $.support is not defined (pre jQuery 1.3) add what I need
if ($.support == undefined) {
 $.support = {
  opacity: !($.browser.msie)
 };
}

function debug(s) {
 $.fn.cycle.debug && log(s);
}  
function log() {
 window.console && console.log && console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
}
$.expr[':'].paused = function(el) {
 return el.cyclePause;
}


// the options arg can be...
//   a number  - indicates an immediate transition should occur to the given slide index
//   a string  - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
//   an object - properties to control the slideshow
//
// the arg2 arg can be...
//   the name of an fx (only used in conjunction with a numeric value for 'options')
//   the value true (only used in first arg == 'resume') and indicates
//  that the resume should occur immediately (not wait for next timeout)

$.fn.cycle = function(options, arg2) {
 var o = { s: this.selector, c: this.context };

 // in 1.3+ we can fix mistakes with the ready state
 if (this.length === 0 && options != 'stop') {
  if (!$.isReady && o.s) {
   log('DOM not ready, queuing slideshow');
   $(function() {
    $(o.s,o.c).cycle(options,arg2);
   });
   return this;
  }
  // is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
  log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
  return this;
 }

 // iterate the matched nodeset
 return this.each(function() {
  var opts = handleArguments(this, options, arg2);
  if (opts === false)
   return;

  opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
  
  // stop existing slideshow for this container (if there is one)
  if (this.cycleTimeout)
   clearTimeout(this.cycleTimeout);
  this.cycleTimeout = this.cyclePause = 0;

  var $cont = $(this);
  var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
  var els = $slides.get();

  var opts2 = buildOptions($cont, $slides, els, opts, o);
  if (opts2 === false)
   return;

  if (els.length < 2) {
   log('terminating; too few slides: ' + els.length);
   return;
  }

  var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);

  // if it's an auto slideshow, kick it off
  if (startTime) {
   startTime += (opts2.delay || 0);
   if (startTime < 10)
    startTime = 10;
   debug('first timeout: ' + startTime);
   this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards)}, startTime);
  }
 });
};

function triggerPause(cont, byHover, onPager) {
 var opts = $(cont).data('cycle.opts');
 var paused = !!cont.cyclePause;
 if (paused && opts.paused)
  opts.paused(cont, opts, byHover, onPager);
 else if (!paused && opts.resumed)
  opts.resumed(cont, opts, byHover, onPager);
}

// process the args that were passed to the plugin fn
function handleArguments(cont, options, arg2) {
 if (cont.cycleStop == undefined)
  cont.cycleStop = 0;
 if (options === undefined || options === null)
  options = {};
 if (options.constructor == String) {
  switch(options) {
  case 'destroy':
  case 'stop':
   var opts = $(cont).data('cycle.opts');
   if (!opts)
    return false;
   cont.cycleStop++; // callbacks look for change
   if (cont.cycleTimeout)
    clearTimeout(cont.cycleTimeout);
   cont.cycleTimeout = 0;
   opts.elements && $(opts.elements).stop();
   $(cont).removeData('cycle.opts');
   if (options == 'destroy')
    destroy(opts);
   return false;
  case 'toggle':
   cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
   checkInstantResume(cont.cyclePause, arg2, cont);
   triggerPause(cont);
   return false;
  case 'pause':
   cont.cyclePause = 1;
   triggerPause(cont);
   return false;
  case 'resume':
   cont.cyclePause = 0;
   checkInstantResume(false, arg2, cont);
   triggerPause(cont);
   return false;
  case 'prev':
  case 'next':
   var opts = $(cont).data('cycle.opts');
   if (!opts) {
    log('options not found, "prev/next" ignored');
    return false;
   }
   $.fn.cycle[options](opts);
   return false;
  default:
   options = { fx: options };
  };
  return options;
 }
 else if (options.constructor == Number) {
  // go to the requested slide
  var num = options;
  options = $(cont).data('cycle.opts');
  if (!options) {
   log('options not found, can not advance slide');
   return false;
  }
  if (num < 0 || num >= options.elements.length) {
   log('invalid slide index: ' + num);
   return false;
  }
  options.nextSlide = num;
  if (cont.cycleTimeout) {
   clearTimeout(cont.cycleTimeout);
   cont.cycleTimeout = 0;
  }
  if (typeof arg2 == 'string')
   options.oneTimeFx = arg2;
  go(options.elements, options, 1, num >= options.currSlide);
  return false;
 }
 return options;
 
 function checkInstantResume(isPaused, arg2, cont) {
  if (!isPaused && arg2 === true) { // resume now!
   var options = $(cont).data('cycle.opts');
   if (!options) {
    log('options not found, can not resume');
    return false;
   }
   if (cont.cycleTimeout) {
    clearTimeout(cont.cycleTimeout);
    cont.cycleTimeout = 0;
   }
   go(options.elements, options, 1, !options.backwards);
  }
 }
};

function removeFilter(el, opts) {
 if (!$.support.opacity && opts.cleartype && el.style.filter) {
  try { el.style.removeAttribute('filter'); }
  catch(smother) {} // handle old opera versions
 }
};

// unbind event handlers
function destroy(opts) {
 if (opts.next)
  $(opts.next).unbind(opts.prevNextEvent);
 if (opts.prev)
  $(opts.prev).unbind(opts.prevNextEvent);
 
 if (opts.pager || opts.pagerAnchorBuilder)
  $.each(opts.pagerAnchors || [], function() {
   this.unbind().remove();
  });
 opts.pagerAnchors = null;
 if (opts.destroy) // callback
  opts.destroy(opts);
};

// one-time initialization
function buildOptions($cont, $slides, els, options, o) {
 // support metadata plugin (v1.0 and v2.0)
 var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
 var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
 if (meta)
  opts = $.extend(opts, meta);
 if (opts.autostop)
  opts.countdown = opts.autostopCount || els.length;

 var cont = $cont[0];
 $cont.data('cycle.opts', opts);
 opts.$cont = $cont;
 opts.stopCount = cont.cycleStop;
 opts.elements = els;
 opts.before = opts.before ? [opts.before] : [];
 opts.after = opts.after ? [opts.after] : [];

 // push some after callbacks
 if (!$.support.opacity && opts.cleartype)
  opts.after.push(function() { removeFilter(this, opts); });
 if (opts.continuous)
  opts.after.push(function() { go(els,opts,0,!opts.backwards); });

 saveOriginalOpts(opts);

 // clearType corrections
 if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
  clearTypeFix($slides);

 // container requires non-static position so that slides can be position within
 if ($cont.css('position') == 'static')
  $cont.css('position', 'relative');
 if (opts.width)
  $cont.width(opts.width);
 if (opts.height && opts.height != 'auto')
  $cont.height(opts.height);

 if (opts.startingSlide)
  opts.startingSlide = parseInt(opts.startingSlide,10);
 else if (opts.backwards)
  opts.startingSlide = els.length - 1;

 // if random, mix up the slide array
 if (opts.random) {
  opts.randomMap = [];
  for (var i = 0; i < els.length; i++)
   opts.randomMap.push(i);
  opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
  opts.randomIndex = 1;
  opts.startingSlide = opts.randomMap[1];
 }
 else if (opts.startingSlide >= els.length)
  opts.startingSlide = 0; // catch bogus input
 opts.currSlide = opts.startingSlide || 0;
 var first = opts.startingSlide;

 // set position and zIndex on all the slides
 $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
  var z;
  if (opts.backwards)
   z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
  else
   z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
  $(this).css('z-index', z)
 });

 // make sure first slide is visible
 $(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
 removeFilter(els[first], opts);

 // stretch slides
 if (opts.fit) {
  if (!opts.aspect) {
         if (opts.width)
             $slides.width(opts.width);
         if (opts.height && opts.height != 'auto')
             $slides.height(opts.height);
  } else {
   $slides.each(function(){
    var $slide = $(this);
    var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
    if( opts.width && $slide.width() != opts.width ) {
     $slide.width( opts.width );
     $slide.height( opts.width / ratio );
    }

    if( opts.height && $slide.height() < opts.height ) {
     $slide.height( opts.height );
     $slide.width( opts.height * ratio );
    }
   });
  }
 }

 if (opts.center && ((!opts.fit) || opts.aspect)) {
  $slides.each(function(){
   var $slide = $(this);
   $slide.css({
    "margin-left": opts.width ?
     ((opts.width - $slide.width()) / 2) + "px" :
     0,
    "margin-top": opts.height ?
     ((opts.height - $slide.height()) / 2) + "px" :
     0
   });
  });
 }

 if (opts.center && !opts.fit && !opts.slideResize) {
    $slides.each(function(){
      var $slide = $(this);
      $slide.css({
         "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
         "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
      });
    });
 }
  
 // stretch container
 var reshape = opts.containerResize && !$cont.innerHeight();
 if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
  var maxw = 0, maxh = 0;
  for(var j=0; j < els.length; j++) {
   var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
   if (!w) w = e.offsetWidth || e.width || $e.attr('width');
   if (!h) h = e.offsetHeight || e.height || $e.attr('height');
   maxw = w > maxw ? w : maxw;
   maxh = h > maxh ? h : maxh;
  }
  if (maxw > 0 && maxh > 0)
   $cont.css({width:maxw+'px',height:maxh+'px'});
 }

 var pauseFlag = false;  // https://github.com/malsup/cycle/issues/44
 if (opts.pause)
  $cont.hover(
   function(){
    pauseFlag = true;
    this.cyclePause++;
    triggerPause(cont, true);
   },
   function(){
    pauseFlag && this.cyclePause--;
    triggerPause(cont, true);
   }
  );

 if (supportMultiTransitions(opts) === false)
  return false;

 // apparently a lot of people use image slideshows without height/width attributes on the images.
 // Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
 var requeue = false;
 options.requeueAttempts = options.requeueAttempts || 0;
 $slides.each(function() {
  // try to get height/width of each slide
  var $el = $(this);
  this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
  this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);

  if ( $el.is('img') ) {
   // sigh..  sniffing, hacking, shrugging...  this crappy hack tries to account for what browsers do when
   // an image is being downloaded and the markup did not include sizing info (height/width attributes);
   // there seems to be some "default" sizes used in this situation
   var loadingIE = ($.browser.msie  && this.cycleW == 28 && this.cycleH == 30 && !this.complete);
   var loadingFF = ($.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete);
   var loadingOp = ($.browser.opera && ((this.cycleW == 42 && this.cycleH == 19) || (this.cycleW == 37 && this.cycleH == 17)) && !this.complete);
   var loadingOther = (this.cycleH == 0 && this.cycleW == 0 && !this.complete);
   // don't requeue for images that are still loading but have a valid size
   if (loadingIE || loadingFF || loadingOp || loadingOther) {
    if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
     log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
     setTimeout(function() {$(o.s,o.c).cycle(options)}, opts.requeueTimeout);
     requeue = true;
     return false; // break each loop
    }
    else {
     log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
    }
   }
  }
  return true;
 });

 if (requeue)
  return false;

 opts.cssBefore = opts.cssBefore || {};
 opts.cssAfter = opts.cssAfter || {};
 opts.cssFirst = opts.cssFirst || {};
 opts.animIn = opts.animIn || {};
 opts.animOut = opts.animOut || {};

 $slides.not(':eq('+first+')').css(opts.cssBefore);
 $($slides[first]).css(opts.cssFirst);

 if (opts.timeout) {
  opts.timeout = parseInt(opts.timeout,10);
  // ensure that timeout and speed settings are sane
  if (opts.speed.constructor == String)
   opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
  if (!opts.sync)
   opts.speed = opts.speed / 2;
  
  var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
  while((opts.timeout - opts.speed) < buffer) // sanitize timeout
   opts.timeout += opts.speed;
 }
 if (opts.easing)
  opts.easeIn = opts.easeOut = opts.easing;
 if (!opts.speedIn)
  opts.speedIn = opts.speed;
 if (!opts.speedOut)
  opts.speedOut = opts.speed;

 opts.slideCount = els.length;
 opts.currSlide = opts.lastSlide = first;
 if (opts.random) {
  if (++opts.randomIndex == els.length)
   opts.randomIndex = 0;
  opts.nextSlide = opts.randomMap[opts.randomIndex];
 }
 else if (opts.backwards)
  opts.nextSlide = opts.startingSlide == 0 ? (els.length-1) : opts.startingSlide-1;
 else
  opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;

 // run transition init fn
 if (!opts.multiFx) {
  var init = $.fn.cycle.transitions[opts.fx];
  if ($.isFunction(init))
   init($cont, $slides, opts);
  else if (opts.fx != 'custom' && !opts.multiFx) {
   log('unknown transition: ' + opts.fx,'; slideshow terminating');
   return false;
  }
 }

 // fire artificial events
 var e0 = $slides[first];
 if (!opts.skipInitializationCallbacks) {
  if (opts.before.length)
   opts.before[0].apply(e0, [e0, e0, opts, true]);
  if (opts.after.length)
   opts.after[0].apply(e0, [e0, e0, opts, true]);
 }
 if (opts.next)
  $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)});
 if (opts.prev)
  $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)});
 if (opts.pager || opts.pagerAnchorBuilder)
  buildPager(els,opts);

 exposeAddSlide(opts, els);

 return opts;
};

// save off original opts so we can restore after clearing state
function saveOriginalOpts(opts) {
 opts.original = { before: [], after: [] };
 opts.original.cssBefore = $.extend({}, opts.cssBefore);
 opts.original.cssAfter  = $.extend({}, opts.cssAfter);
 opts.original.animIn = $.extend({}, opts.animIn);
 opts.original.animOut   = $.extend({}, opts.animOut);
 $.each(opts.before, function() { opts.original.before.push(this); });
 $.each(opts.after,  function() { opts.original.after.push(this); });
};

function supportMultiTransitions(opts) {
 var i, tx, txs = $.fn.cycle.transitions;
 // look for multiple effects
 if (opts.fx.indexOf(',') > 0) {
  opts.multiFx = true;
  opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
  // discard any bogus effect names
  for (i=0; i < opts.fxs.length; i++) {
   var fx = opts.fxs[i];
   tx = txs[fx];
   if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
    log('discarding unknown transition: ',fx);
    opts.fxs.splice(i,1);
    i--;
   }
  }
  // if we have an empty list then we threw everything away!
  if (!opts.fxs.length) {
   log('No valid transitions named; slideshow terminating.');
   return false;
  }
 }
 else if (opts.fx == 'all') {  // auto-gen the list of transitions
  opts.multiFx = true;
  opts.fxs = [];
  for (p in txs) {
   tx = txs[p];
   if (txs.hasOwnProperty(p) && $.isFunction(tx))
    opts.fxs.push(p);
  }
 }
 if (opts.multiFx && opts.randomizeEffects) {
  // munge the fxs array to make effect selection random
  var r1 = Math.floor(Math.random() * 20) + 30;
  for (i = 0; i < r1; i++) {
   var r2 = Math.floor(Math.random() * opts.fxs.length);
   opts.fxs.push(opts.fxs.splice(r2,1)[0]);
  }
  debug('randomized fx sequence: ',opts.fxs);
 }
 return true;
};

// provide a mechanism for adding slides after the slideshow has started
function exposeAddSlide(opts, els) {
 opts.addSlide = function(newSlide, prepend) {
  var $s = $(newSlide), s = $s[0];
  if (!opts.autostopCount)
   opts.countdown++;
  els[prepend?'unshift':'push'](s);
  if (opts.els)
   opts.els[prepend?'unshift':'push'](s); // shuffle needs this
  opts.slideCount = els.length;

  $s.css('position','absolute');
  $s[prepend?'prependTo':'appendTo'](opts.$cont);

  if (prepend) {
   opts.currSlide++;
   opts.nextSlide++;
  }

  if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
   clearTypeFix($s);

  if (opts.fit && opts.width)
   $s.width(opts.width);
  if (opts.fit && opts.height && opts.height != 'auto')
   $s.height(opts.height);
  s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
  s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();

  $s.css(opts.cssBefore);

  if (opts.pager || opts.pagerAnchorBuilder)
   $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);

  if ($.isFunction(opts.onAddSlide))
   opts.onAddSlide($s);
  else
   $s.hide(); // default behavior
 };
}

// reset internal state; we do this on every pass in order to support multiple effects
$.fn.cycle.resetState = function(opts, fx) {
 fx = fx || opts.fx;
 opts.before = []; opts.after = [];
 opts.cssBefore = $.extend({}, opts.original.cssBefore);
 opts.cssAfter  = $.extend({}, opts.original.cssAfter);
 opts.animIn = $.extend({}, opts.original.animIn);
 opts.animOut   = $.extend({}, opts.original.animOut);
 opts.fxFn = null;
 $.each(opts.original.before, function() { opts.before.push(this); });
 $.each(opts.original.after,  function() { opts.after.push(this); });

 // re-init
 var init = $.fn.cycle.transitions[fx];
 if ($.isFunction(init))
  init(opts.$cont, $(opts.elements), opts);
};

// this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
function go(els, opts, manual, fwd) {
 // opts.busy is true if we're in the middle of an animation
 if (manual && opts.busy && opts.manualTrump) {
  // let manual transitions requests trump active ones
  debug('manualTrump in go(), stopping active transition');
  $(els).stop(true,true);
  opts.busy = 0;
 }
 // don't begin another timeout-based transition if there is one active
 if (opts.busy) {
  debug('transition active, ignoring new tx request');
  return;
 }

 var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];

 // stop cycling if we have an outstanding stop request
 if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
  return;

 // check to see if we should stop cycling based on autostop options
 if (!manual && !p.cyclePause && !opts.bounce &&
  ((opts.autostop && (--opts.countdown <= 0)) ||
  (opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
  if (opts.end)
   opts.end(opts);
  return;
 }

 // if slideshow is paused, only transition on a manual trigger
 var changed = false;
 if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
  changed = true;
  var fx = opts.fx;
  // keep trying to get the slide size if we don't have it yet
  curr.cycleH = curr.cycleH || $(curr).height();
  curr.cycleW = curr.cycleW || $(curr).width();
  next.cycleH = next.cycleH || $(next).height();
  next.cycleW = next.cycleW || $(next).width();

  // support multiple transition types
  if (opts.multiFx) {
   if (fwd && (opts.lastFx == undefined || ++opts.lastFx >= opts.fxs.length))
    opts.lastFx = 0;
   else if (!fwd && (opts.lastFx == undefined || --opts.lastFx < 0))
    opts.lastFx = opts.fxs.length - 1;
   fx = opts.fxs[opts.lastFx];
  }

  // one-time fx overrides apply to:  $('div').cycle(3,'zoom');
  if (opts.oneTimeFx) {
   fx = opts.oneTimeFx;
   opts.oneTimeFx = null;
  }

  $.fn.cycle.resetState(opts, fx);

  // run the before callbacks
  if (opts.before.length)
   $.each(opts.before, function(i,o) {
    if (p.cycleStop != opts.stopCount) return;
    o.apply(next, [curr, next, opts, fwd]);
   });

  // stage the after callacks
  var after = function() {
   opts.busy = 0;
   $.each(opts.after, function(i,o) {
    if (p.cycleStop != opts.stopCount) return;
    o.apply(next, [curr, next, opts, fwd]);
   });
  };

  debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
  
  // get ready to perform the transition
  opts.busy = 1;
  if (opts.fxFn) // fx function provided?
   opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
  else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
   $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
  else
   $.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
 }

 if (changed || opts.nextSlide == opts.currSlide) {
  // calculate the next slide
  opts.lastSlide = opts.currSlide;
  if (opts.random) {
   opts.currSlide = opts.nextSlide;
   if (++opts.randomIndex == els.length)
    opts.randomIndex = 0;
   opts.nextSlide = opts.randomMap[opts.randomIndex];
   if (opts.nextSlide == opts.currSlide)
    opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
  }
  else if (opts.backwards) {
   var roll = (opts.nextSlide - 1) < 0;
   if (roll && opts.bounce) {
    opts.backwards = !opts.backwards;
    opts.nextSlide = 1;
    opts.currSlide = 0;
   }
   else {
    opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
    opts.currSlide = roll ? 0 : opts.nextSlide+1;
   }
  }
  else { // sequence
   var roll = (opts.nextSlide + 1) == els.length;
   if (roll && opts.bounce) {
    opts.backwards = !opts.backwards;
    opts.nextSlide = els.length-2;
    opts.currSlide = els.length-1;
   }
   else {
    opts.nextSlide = roll ? 0 : opts.nextSlide+1;
    opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
   }
  }
 }
 if (changed && opts.pager)
  opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
 
 // stage the next transition
 var ms = 0;
 if (opts.timeout && !opts.continuous)
  ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
 else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
  ms = 10;
 if (ms > 0)
  p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards) }, ms);
};

// invoked after transition
$.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
   $(pager).each(function() {
       $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
   });
};

// calculate timeout value for current transition
function getTimeout(curr, next, opts, fwd) {
 if (opts.timeoutFn) {
  // call user provided calc fn
  var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
  while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
   t += opts.speed;
  debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
  if (t !== false)
   return t;
 }
 return opts.timeout;
};

// expose next/prev function, caller must pass in state
$.fn.cycle.next = function(opts) { advance(opts,1); };
$.fn.cycle.prev = function(opts) { advance(opts,0);};

// advance slide forward or back
function advance(opts, moveForward) {
 var val = moveForward ? 1 : -1;
 var els = opts.elements;
 var p = opts.$cont[0], timeout = p.cycleTimeout;
 if (timeout) {
  clearTimeout(timeout);
  p.cycleTimeout = 0;
 }
 if (opts.random && val < 0) {
  // move back to the previously display slide
  opts.randomIndex--;
  if (--opts.randomIndex == -2)
   opts.randomIndex = els.length-2;
  else if (opts.randomIndex == -1)
   opts.randomIndex = els.length-1;
  opts.nextSlide = opts.randomMap[opts.randomIndex];
 }
 else if (opts.random) {
  opts.nextSlide = opts.randomMap[opts.randomIndex];
 }
 else {
  opts.nextSlide = opts.currSlide + val;
  if (opts.nextSlide < 0) {
   if (opts.nowrap) return false;
   opts.nextSlide = els.length - 1;
  }
  else if (opts.nextSlide >= els.length) {
   if (opts.nowrap) return false;
   opts.nextSlide = 0;
  }
 }

 var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
 if ($.isFunction(cb))
  cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
 go(els, opts, 1, moveForward);
 return false;
};

function buildPager(els, opts) {
 var $p = $(opts.pager);
 $.each(els, function(i,o) {
  $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
 });
 opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
};

$.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
 var a;
 if ($.isFunction(opts.pagerAnchorBuilder)) {
  a = opts.pagerAnchorBuilder(i,el);
  debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
 }
 else
  a = '<a href="#">'+(i+1)+'</a>';
  
 if (!a)
  return;
 var $a = $(a);
 // don't reparent if anchor is in the dom
 if ($a.parents('body').length === 0) {
  var arr = [];
  if ($p.length > 1) {
   $p.each(function() {
    var $clone = $a.clone(true);
    $(this).append($clone);
    arr.push($clone[0]);
   });
   $a = $(arr);
  }
  else {
   $a.appendTo($p);
  }
 }

 opts.pagerAnchors =  opts.pagerAnchors || [];
 opts.pagerAnchors.push($a);
 
 var pagerFn = function(e) {
  e.preventDefault();
  opts.nextSlide = i;
  var p = opts.$cont[0], timeout = p.cycleTimeout;
  if (timeout) {
   clearTimeout(timeout);
   p.cycleTimeout = 0;
  }
  var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
  if ($.isFunction(cb))
   cb(opts.nextSlide, els[opts.nextSlide]);
  go(els,opts,1,opts.currSlide < i); // trigger the trans
//  return false; // <== allow bubble
 }
 
 if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
  $a.hover(pagerFn, function(){/* no-op */} );
 }
 else {
  $a.bind(opts.pagerEvent, pagerFn);
 }
 
 if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
  $a.bind('click.cycle', function(){return false;}); // suppress click
 
 var cont = opts.$cont[0];
 var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
 if (opts.pauseOnPagerHover) {
  $a.hover(
   function() { 
    pauseFlag = true;
    cont.cyclePause++; 
    triggerPause(cont,true,true);
   }, function() { 
    pauseFlag && cont.cyclePause--; 
    triggerPause(cont,true,true);
   } 
  );
 }
};

// helper fn to calculate the number of slides between the current and the next
$.fn.cycle.hopsFromLast = function(opts, fwd) {
 var hops, l = opts.lastSlide, c = opts.currSlide;
 if (fwd)
  hops = c > l ? c - l : opts.slideCount - l;
 else
  hops = c < l ? l - c : l + opts.slideCount - c;
 return hops;
};

// fix clearType problems in ie6 by setting an explicit bg color
// (otherwise text slides look horrible during a fade transition)
function clearTypeFix($slides) {
 debug('applying clearType background-color hack');
 function hex(s) {
  s = parseInt(s,10).toString(16);
  return s.length < 2 ? '0'+s : s;
 };
 function getBg(e) {
  for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
   var v = $.css(e,'background-color');
   if (v && v.indexOf('rgb') >= 0 ) {
    var rgb = v.match(/\d+/g);
    return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
   }
   if (v && v != 'transparent')
    return v;
  }
  return '#ffffff';
 };
 $slides.each(function() { $(this).css('background-color', getBg(this)); });
};

// reset common props before the next transition
$.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
 $(opts.elements).not(curr).hide();
 if (typeof opts.cssBefore.opacity == 'undefined')
  opts.cssBefore.opacity = 1;
 opts.cssBefore.display = 'block';
 if (opts.slideResize && w !== false && next.cycleW > 0)
  opts.cssBefore.width = next.cycleW;
 if (opts.slideResize && h !== false && next.cycleH > 0)
  opts.cssBefore.height = next.cycleH;
 opts.cssAfter = opts.cssAfter || {};
 opts.cssAfter.display = 'none';
 $(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
 $(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
};

// the actual fn for effecting a transition
$.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
 var $l = $(curr), $n = $(next);
 var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut;
 $n.css(opts.cssBefore);
 if (speedOverride) {
  if (typeof speedOverride == 'number')
   speedIn = speedOut = speedOverride;
  else
   speedIn = speedOut = 1;
  easeIn = easeOut = null;
 }
 var fn = function() {
  $n.animate(opts.animIn, speedIn, easeIn, function() {
   cb();
  });
 };
 $l.animate(opts.animOut, speedOut, easeOut, function() {
  $l.css(opts.cssAfter);
  if (!opts.sync) 
   fn();
 });
 if (opts.sync) fn();
};

// transition definitions - only fade is defined here, transition pack defines the rest
$.fn.cycle.transitions = {
 fade: function($cont, $slides, opts) {
  $slides.not(':eq('+opts.currSlide+')').css('opacity',0);
  opts.before.push(function(curr,next,opts) {
   $.fn.cycle.commonReset(curr,next,opts);
   opts.cssBefore.opacity = 0;
  });
  opts.animIn    = { opacity: 1 };
  opts.animOut   = { opacity: 0 };
  opts.cssBefore = { top: 0, left: 0 };
 }
};

$.fn.cycle.ver = function() { return ver; };

// override these globally if you like (they are all optional)
$.fn.cycle.defaults = {
 activePagerClass: 'activeSlide', // class name used for the active pager link
 after:     null,  // transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag)
 allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
 animIn:     null,  // properties that define how the slide animates in
 animOut:    null,  // properties that define how the slide animates out
 aspect:     false,  // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
 autostop:    0,   // true to end slideshow after X transitions (where X == slide count)
 autostopCount: 0,   // number of transitions (optionally used with autostop to define X)
 backwards:     false, // true to start slideshow at last slide and move backwards through the stack
 before:     null,  // transition callback (scope set to element to be shown):  function(currSlideElement, nextSlideElement, options, forwardFlag)
 center:     null,  // set to true to have cycle add top/left margin to each slide (use with width and height options)
 cleartype:    !$.support.opacity,  // true if clearType corrections should be applied (for IE)
 cleartypeNoBg: false, // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
 containerResize: 1,   // resize container to fit largest slide
 continuous:    0,   // true to start next transition immediately after current one completes
 cssAfter:    null,  // properties that defined the state of the slide after transitioning out
 cssBefore:    null,  // properties that define the initial state of the slide before transitioning in
 delay:     0,   // additional delay (in ms) for first transition (hint: can be negative)
 easeIn:     null,  // easing for "in" transition
 easeOut:    null,  // easing for "out" transition
 easing:     null,  // easing method for both in and out transitions
 end:     null,  // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
 fastOnEvent:   0,   // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
 fit:     0,   // force slides to fit container
 fx:     'fade', // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
 fxFn:     null,  // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
 height:    'auto', // container height (if the 'fit' option is true, the slides will be set to this height as well)
 manualTrump:   true,  // causes manual transition to stop an active transition instead of being ignored
 metaAttr:     'cycle',// data- attribute that holds the option data for the slideshow
 next:     null,  // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
 nowrap:     0,   // true to prevent slideshow from wrapping
 onPagerEvent:  null,  // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
 onPrevNextEvent: null,// callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
 pager:     null,  // element, jQuery object, or jQuery selector string for the element to use as pager container
 pagerAnchorBuilder: null, // callback fn for building anchor links:  function(index, DOMelement)
 pagerEvent:   'click.cycle', // name of event which drives the pager navigation
 pause:     0,   // true to enable "pause on hover"
 pauseOnPagerHover: 0, // true to pause when hovering over pager link
 prev:     null,  // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
 prevNextEvent:'click.cycle',// event which drives the manual transition to the previous or next slide
 random:     0,   // true for random, false for sequence (not applicable to shuffle fx)
 randomizeEffects: 1,  // valid when multiple effects are used; true to make the effect sequence random
 requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
 requeueTimeout: 250,  // ms delay for requeue
 rev:     0,   // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
 shuffle:    null,  // coords for shuffle animation, ex: { top:15, left: 200 }
 skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
 slideExpr:    null,  // expression for selecting slides (if something other than all children is required)
 slideResize:   1,     // force slide width/height to fixed size before every transition
 speed:     1000,  // speed of the transition (any valid fx speed value)
 speedIn:    null,  // speed of the 'in' transition
 speedOut:    null,  // speed of the 'out' transition
 startingSlide: 0,   // zero-based index of the first slide to be displayed
 sync:     1,   // true if in/out transitions should occur simultaneously
 timeout:    4000,  // milliseconds between slide transitions (0 to disable auto advance)
 timeoutFn:     null,  // callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag)
 updateActivePagerLink: null, // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
 width:         null   // container width (if the 'fit' option is true, the slides will be set to this width as well)
};

})(jQuery);


/*!
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:  2.73
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($) {

//
// These functions define slide initialization and properties for the named
// transitions. To save file size feel free to remove any of these that you
// don't need.
//
$.fn.cycle.transitions.none = function($cont, $slides, opts) {
 opts.fxFn = function(curr,next,opts,after){
  $(next).show();
  $(curr).hide();
  after();
 };
};

// not a cross-fade, fadeout only fades out the top slide
$.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
 $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
 opts.before.push(function(curr,next,opts,w,h,rev) {
  $(curr).css('zIndex',opts.slideCount + (!rev === true ? 1 : 0));
  $(next).css('zIndex',opts.slideCount + (!rev === true ? 0 : 1));
 });
 opts.animIn.opacity = 1;
 opts.animOut.opacity = 0;
 opts.cssBefore.opacity = 1;
 opts.cssBefore.display = 'block';
 opts.cssAfter.zIndex = 0;
};

// scrollUp/Down/Left/Right
$.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
 $cont.css('overflow','hidden');
 opts.before.push($.fn.cycle.commonReset);
 var h = $cont.height();
 opts.cssBefore.top = h;
 opts.cssBefore.left = 0;
 opts.cssFirst.top = 0;
 opts.animIn.top = 0;
 opts.animOut.top = -h;
};
$.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
 $cont.css('overflow','hidden');
 opts.before.push($.fn.cycle.commonReset);
 var h = $cont.height();
 opts.cssFirst.top = 0;
 opts.cssBefore.top = -h;
 opts.cssBefore.left = 0;
 opts.animIn.top = 0;
 opts.animOut.top = h;
};
$.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
 $cont.css('overflow','hidden');
 opts.before.push($.fn.cycle.commonReset);
 var w = $cont.width();
 opts.cssFirst.left = 0;
 opts.cssBefore.left = w;
 opts.cssBefore.top = 0;
 opts.animIn.left = 0;
 opts.animOut.left = 0-w;
};
$.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
 $cont.css('overflow','hidden');
 opts.before.push($.fn.cycle.commonReset);
 var w = $cont.width();
 opts.cssFirst.left = 0;
 opts.cssBefore.left = -w;
 opts.cssBefore.top = 0;
 opts.animIn.left = 0;
 opts.animOut.left = w;
};
$.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
 $cont.css('overflow','hidden').width();
 opts.before.push(function(curr, next, opts, fwd) {
  if (opts.rev)
   fwd = !fwd;
  $.fn.cycle.commonReset(curr,next,opts);
  opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
  opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
 });
 opts.cssFirst.left = 0;
 opts.cssBefore.top = 0;
 opts.animIn.left = 0;
 opts.animOut.top = 0;
};
$.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
 $cont.css('overflow','hidden');
 opts.before.push(function(curr, next, opts, fwd) {
  if (opts.rev)
   fwd = !fwd;
  $.fn.cycle.commonReset(curr,next,opts);
  opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
  opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
 });
 opts.cssFirst.top = 0;
 opts.cssBefore.left = 0;
 opts.animIn.top = 0;
 opts.animOut.left = 0;
};

// slideX/slideY
$.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $(opts.elements).not(curr).hide();
  $.fn.cycle.commonReset(curr,next,opts,false,true);
  opts.animIn.width = next.cycleW;
 });
 opts.cssBefore.left = 0;
 opts.cssBefore.top = 0;
 opts.cssBefore.width = 0;
 opts.animIn.width = 'show';
 opts.animOut.width = 0;
};
$.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $(opts.elements).not(curr).hide();
  $.fn.cycle.commonReset(curr,next,opts,true,false);
  opts.animIn.height = next.cycleH;
 });
 opts.cssBefore.left = 0;
 opts.cssBefore.top = 0;
 opts.cssBefore.height = 0;
 opts.animIn.height = 'show';
 opts.animOut.height = 0;
};

// shuffle
$.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
 var i, w = $cont.css('overflow', 'visible').width();
 $slides.css({left: 0, top: 0});
 opts.before.push(function(curr,next,opts) {
  $.fn.cycle.commonReset(curr,next,opts,true,true,true);
 });
 // only adjust speed once!
 if (!opts.speedAdjusted) {
  opts.speed = opts.speed / 2; // shuffle has 2 transitions
  opts.speedAdjusted = true;
 }
 opts.random = 0;
 opts.shuffle = opts.shuffle || {left:-w, top:15};
 opts.els = [];
 for (i=0; i < $slides.length; i++)
  opts.els.push($slides[i]);

 for (i=0; i < opts.currSlide; i++)
  opts.els.push(opts.els.shift());

 // custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
 opts.fxFn = function(curr, next, opts, cb, fwd) {
  if (opts.rev)
   fwd = !fwd;
  var $el = fwd ? $(curr) : $(next);
  $(next).css(opts.cssBefore);
  var count = opts.slideCount;
  $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
   var hops = $.fn.cycle.hopsFromLast(opts, fwd);
   for (var k=0; k < hops; k++)
    fwd ? opts.els.push(opts.els.shift()) : opts.els.unshift(opts.els.pop());
   if (fwd) {
    for (var i=0, len=opts.els.length; i < len; i++)
     $(opts.els[i]).css('z-index', len-i+count);
   }
   else {
    var z = $(curr).css('z-index');
    $el.css('z-index', parseInt(z,10)+1+count);
   }
   $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
    $(fwd ? this : curr).hide();
    if (cb) cb();
   });
  });
 };
 $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
};

// turnUp/Down/Left/Right
$.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,true,false);
  opts.cssBefore.top = next.cycleH;
  opts.animIn.height = next.cycleH;
  opts.animOut.width = next.cycleW;
 });
 opts.cssFirst.top = 0;
 opts.cssBefore.left = 0;
 opts.cssBefore.height = 0;
 opts.animIn.top = 0;
 opts.animOut.height = 0;
};
$.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,true,false);
  opts.animIn.height = next.cycleH;
  opts.animOut.top   = curr.cycleH;
 });
 opts.cssFirst.top = 0;
 opts.cssBefore.left = 0;
 opts.cssBefore.top = 0;
 opts.cssBefore.height = 0;
 opts.animOut.height = 0;
};
$.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,false,true);
  opts.cssBefore.left = next.cycleW;
  opts.animIn.width = next.cycleW;
 });
 opts.cssBefore.top = 0;
 opts.cssBefore.width = 0;
 opts.animIn.left = 0;
 opts.animOut.width = 0;
};
$.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,false,true);
  opts.animIn.width = next.cycleW;
  opts.animOut.left = curr.cycleW;
 });
 $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
 opts.animIn.left = 0;
 opts.animOut.width = 0;
};

// zoom
$.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,false,false,true);
  opts.cssBefore.top = next.cycleH/2;
  opts.cssBefore.left = next.cycleW/2;
  $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
  $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
 });
 opts.cssFirst.top = 0;
 opts.cssFirst.left = 0;
 opts.cssBefore.width = 0;
 opts.cssBefore.height = 0;
};

// fadeZoom
$.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,false,false);
  opts.cssBefore.left = next.cycleW/2;
  opts.cssBefore.top = next.cycleH/2;
  $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
 });
 opts.cssBefore.width = 0;
 opts.cssBefore.height = 0;
 opts.animOut.opacity = 0;
};

// blindX
$.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
 var w = $cont.css('overflow','hidden').width();
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts);
  opts.animIn.width = next.cycleW;
  opts.animOut.left   = curr.cycleW;
 });
 opts.cssBefore.left = w;
 opts.cssBefore.top = 0;
 opts.animIn.left = 0;
 opts.animOut.left = w;
};
// blindY
$.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
 var h = $cont.css('overflow','hidden').height();
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts);
  opts.animIn.height = next.cycleH;
  opts.animOut.top   = curr.cycleH;
 });
 opts.cssBefore.top = h;
 opts.cssBefore.left = 0;
 opts.animIn.top = 0;
 opts.animOut.top = h;
};
// blindZ
$.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
 var h = $cont.css('overflow','hidden').height();
 var w = $cont.width();
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts);
  opts.animIn.height = next.cycleH;
  opts.animOut.top   = curr.cycleH;
 });
 opts.cssBefore.top = h;
 opts.cssBefore.left = w;
 opts.animIn.top = 0;
 opts.animIn.left = 0;
 opts.animOut.top = h;
 opts.animOut.left = w;
};

// growX - grow horizontally from centered 0 width
$.fn.cycle.transitions.growX = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,false,true);
  opts.cssBefore.left = this.cycleW/2;
  opts.animIn.left = 0;
  opts.animIn.width = this.cycleW;
  opts.animOut.left = 0;
 });
 opts.cssBefore.top = 0;
 opts.cssBefore.width = 0;
};
// growY - grow vertically from centered 0 height
$.fn.cycle.transitions.growY = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,true,false);
  opts.cssBefore.top = this.cycleH/2;
  opts.animIn.top = 0;
  opts.animIn.height = this.cycleH;
  opts.animOut.top = 0;
 });
 opts.cssBefore.height = 0;
 opts.cssBefore.left = 0;
};

// curtainX - squeeze in both edges horizontally
$.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,false,true,true);
  opts.cssBefore.left = next.cycleW/2;
  opts.animIn.left = 0;
  opts.animIn.width = this.cycleW;
  opts.animOut.left = curr.cycleW/2;
  opts.animOut.width = 0;
 });
 opts.cssBefore.top = 0;
 opts.cssBefore.width = 0;
};
// curtainY - squeeze in both edges vertically
$.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,true,false,true);
  opts.cssBefore.top = next.cycleH/2;
  opts.animIn.top = 0;
  opts.animIn.height = next.cycleH;
  opts.animOut.top = curr.cycleH/2;
  opts.animOut.height = 0;
 });
 opts.cssBefore.height = 0;
 opts.cssBefore.left = 0;
};

// cover - curr slide covered by next slide
$.fn.cycle.transitions.cover = function($cont, $slides, opts) {
 var d = opts.direction || 'left';
 var w = $cont.css('overflow','hidden').width();
 var h = $cont.height();
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts);
  if (d == 'right')
   opts.cssBefore.left = -w;
  else if (d == 'up')
   opts.cssBefore.top = h;
  else if (d == 'down')
   opts.cssBefore.top = -h;
  else
   opts.cssBefore.left = w;
 });
 opts.animIn.left = 0;
 opts.animIn.top = 0;
 opts.cssBefore.top = 0;
 opts.cssBefore.left = 0;
};

// uncover - curr slide moves off next slide
$.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
 var d = opts.direction || 'left';
 var w = $cont.css('overflow','hidden').width();
 var h = $cont.height();
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,true,true,true);
  if (d == 'right')
   opts.animOut.left = w;
  else if (d == 'up')
   opts.animOut.top = -h;
  else if (d == 'down')
   opts.animOut.top = h;
  else
   opts.animOut.left = -w;
 });
 opts.animIn.left = 0;
 opts.animIn.top = 0;
 opts.cssBefore.top = 0;
 opts.cssBefore.left = 0;
};

// toss - move top slide and fade away
$.fn.cycle.transitions.toss = function($cont, $slides, opts) {
 var w = $cont.css('overflow','visible').width();
 var h = $cont.height();
 opts.before.push(function(curr, next, opts) {
  $.fn.cycle.commonReset(curr,next,opts,true,true,true);
  // provide default toss settings if animOut not provided
  if (!opts.animOut.left && !opts.animOut.top)
   $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
  else
   opts.animOut.opacity = 0;
 });
 opts.cssBefore.left = 0;
 opts.cssBefore.top = 0;
 opts.animIn.left = 0;
};

// wipe - clip animation
$.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
 var w = $cont.css('overflow','hidden').width();
 var h = $cont.height();
 opts.cssBefore = opts.cssBefore || {};
 var clip;
 if (opts.clip) {
  if (/l2r/.test(opts.clip))
   clip = 'rect(0px 0px '+h+'px 0px)';
  else if (/r2l/.test(opts.clip))
   clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
  else if (/t2b/.test(opts.clip))
   clip = 'rect(0px '+w+'px 0px 0px)';
  else if (/b2t/.test(opts.clip))
   clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
  else if (/zoom/.test(opts.clip)) {
   var top = parseInt(h/2,10);
   var left = parseInt(w/2,10);
   clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
  }
 }

 opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';

 var d = opts.cssBefore.clip.match(/(\d+)/g);
 var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);

 opts.before.push(function(curr, next, opts) {
  if (curr == next) return;
  var $curr = $(curr), $next = $(next);
  $.fn.cycle.commonReset(curr,next,opts,true,true,false);
  opts.cssAfter.display = 'block';

  var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
  (function f() {
   var tt = t ? t - parseInt(step * (t/count),10) : 0;
   var ll = l ? l - parseInt(step * (l/count),10) : 0;
   var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
   var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
   $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
   (step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
  })();
 });
 $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
 opts.animIn    = { left: 0 };
 opts.animOut   = { left: 0 };
};

})(jQuery);

$(document).ready(function(){
  $(".ehfk2013 .donationTicker").appendTo($(".ehfk2013 #start"));
});

/* Adventskalender 2013 */
$(window).bind("message", function(e){
  if(e.originalEvent.origin == "http://aktion.bofrost.de"){
    var jsonData = jQuery.parseJSON(e.originalEvent.data);
    if(undefined != jsonData.documentHeight){
      $("#middlecontent > iframe").attr('height', jsonData.documentHeight);
      $(window).scrollTop(0);  
    }
  }
});

$(document).ready( function() {

$('#competition-form .text-inputs input').focus(function() {
  $(this).parent().find('label').hide();
});

$('#competition-form .text-inputs input').blur(function() {
  if ($(this).val() == '')
   $(this).parent().find('label').show();
});

$('#competition-form .text-inputs label').click(function() {
  $(this).parent().find('input').focus();
});

$('#competition-form .text-inputs input').each(function() {
  if ($(this).val() == '')
   $(this).parent().find('label').show();
  else
   $(this).parent().find('label').hide();
});
});

function displayNewsletterRegistrationLayer (action) {
  hs.maxHeight = 530;
  hs.maxWidth = 632;

  // Language strings
  hs.lang = {
    cssDirection:     'ltr',
    loadingText :     'Lade...',
    loadingTitle :    'Klick zum Abbrechen',    
    closeText :       'Fenster schließen',
    closeTitle :      'Fenster schließen (Esc)'
  };      
  
  hs.registerOverlay({
    html: '<div class="closebutton" onclick="return hs.close(this)" title="Close">Schließen</div>',
    position: 'top right',
    useOnHtml: true,
    fade: 2 // fading the semi-transparent overlay looks bad in IE
  });      
  hs.dimmingOpacity = 0.7;
  
  $(document).ready(function() {
    $("body").append(
      $(document.createElement("a")).attr("href", action).click(function() {
        return hs.htmlExpand(this, {wrapperClassName: 'newsletter-registration-layer', objectType: 'ajax', width: 632, height: 510, outlineType: '', align: 'center', useBox: false});
      }).addClass("newsletter-registration-layer")
    );
  
     var $anchor = $("a.newsletter-registration-layer");
     $anchor.click();
     $anchor.parent().remove($anchor);
     
     window.setTimeout(function() {
       var $form = $("#newsletter_layer_anmeldeformular").children("div");
       var $checkbox = $form.children("label.confirmation").children("input#input_privacyAccepted");
       var $submit = $form.children("input.submit");

       $checkbox.click(function() {
         if ($(this).is(":checked")) {
           $submit.removeAttr("disabled");
           $submit.addClass("enabled");
         } else {
           $submit.attr("disabled", "disabled");
           $submit.removeClass("enabled");
         }
       })

       $submit.click(function() {
         return $checkbox.is(":checked");
       });
     }, 500);
  });
}

function openDefaultLayer($container) {
  hs.maxHeight = 510;
  hs.maxWidth = $container.outerWidth(true);;

  hs.registerOverlay({
    html: '<div class="closebutton" onclick="return hs.close(this);" title="Close">Schließen</div>',
		position: 'top right',
		useOnHtml: true,
		fade: 2 // fading the semi-transparent overlay looks bad in IE
	});      
	hs.dimmingOpacity = 0.7;

	$(document).ready(function() {
		hs.htmlExpand(null, { contentId: 'highslide-default-layer', width: $container.outerWidth(true), height: 510, outlineType: '', align: 'center', useBox: false});
	});
}

$(document).ready(function() {
  var $container = $("#highslide-default-layer");
	if ($container.length > 0) {
		var id = $container.attr("data-id");
		var expires = $container.attr("data-expires");
		var params = $container.attr("data-params");
		var cookiename = 'layer-hide-' + id;
		
		var paramsOk = true;
		if (params.length > 0) {
			paramsOk = false;
			var parameter = jQuery.parseJSON(params);
			var url = document.location.href.toLowerCase();
			for (var i = 0; i < parameter.length; i++) {
				paramsOk = true;
				var q = (parameter[i][0] + "=" + (parameter[i][1].length === 0 ? ".*" : parameter[i][1])).toLowerCase();
				q = "(\\?|\\&)((" + q + "(\\?|\\&))|(" + q + "$))";
				if (url.match(q) === null) {
					paramsOk = false;
					break;
				}
			}
		}

		if ((expires.length === 0 || readCookie(cookiename) === null) && paramsOk) {
			$container.css("display", "inline-block");
  		openDefaultLayer($container);

			if (expires.length > 0) {
    		var date = new Date();
    		date.setTime(date.getTime()+(expires*1000));
    		var data = "; expires="+date.toGMTString();
  			document.cookie = cookiename + "=true" + data + "; path=/";
			}
		}
	}
});
