/*
 * jQuery 1.2.6 - New Wave Javascript
 *
 * Copyright (c) 2008 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
 * $Rev: 5685 $
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(H(){J w=1b.4M,3m$=1b.$;J D=1b.4M=1b.$=H(a,b){I 2B D.17.5j(a,b)};J u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,62=/^.[^:#\\[\\.]*$/,12;D.17=D.44={5j:H(d,b){d=d||S;G(d.16){7[0]=d;7.K=1;I 7}G(1j d=="23"){J c=u.2D(d);G(c&&(c[1]||!b)){G(c[1])d=D.4h([c[1]],b);N{J a=S.61(c[3]);G(a){G(a.2v!=c[3])I D().2q(d);I D(a)}d=[]}}N I D(b).2q(d)}N G(D.1D(d))I D(S)[D.17.27?"27":"43"](d);I 7.6Y(D.2d(d))},5w:"1.2.6",8G:H(){I 7.K},K:0,3p:H(a){I a==12?D.2d(7):7[a]},2I:H(b){J a=D(b);a.5n=7;I a},6Y:H(a){7.K=0;2p.44.1p.1w(7,a);I 7},P:H(a,b){I D.P(7,a,b)},5i:H(b){J a=-1;I D.2L(b&&b.5w?b[0]:b,7)},1K:H(c,a,b){J d=c;G(c.1q==56)G(a===12)I 7[0]&&D[b||"1K"](7[0],c);N{d={};d[c]=a}I 7.P(H(i){R(c 1n d)D.1K(b?7.V:7,c,D.1i(7,d[c],b,i,c))})},1g:H(b,a){G((b==\'2h\'||b==\'1Z\')&&3d(a)<0)a=12;I 7.1K(b,a,"2a")},1r:H(b){G(1j b!="49"&&b!=U)I 7.4E().3v((7[0]&&7[0].2z||S).5F(b));J a="";D.P(b||7,H(){D.P(7.3t,H(){G(7.16!=8)a+=7.16!=1?7.76:D.17.1r([7])})});I a},5z:H(b){G(7[0])D(b,7[0].2z).5y().39(7[0]).2l(H(){J a=7;1B(a.1x)a=a.1x;I a}).3v(7);I 7},8Y:H(a){I 7.P(H(){D(7).6Q().5z(a)})},8R:H(a){I 7.P(H(){D(7).5z(a)})},3v:H(){I 7.3W(19,M,Q,H(a){G(7.16==1)7.3U(a)})},6F:H(){I 7.3W(19,M,M,H(a){G(7.16==1)7.39(a,7.1x)})},6E:H(){I 7.3W(19,Q,Q,H(a){7.1d.39(a,7)})},5q:H(){I 7.3W(19,Q,M,H(a){7.1d.39(a,7.2H)})},3l:H(){I 7.5n||D([])},2q:H(b){J c=D.2l(7,H(a){I D.2q(b,a)});I 7.2I(/[^+>] [^+>]/.11(b)||b.1h("..")>-1?D.4r(c):c)},5y:H(e){J f=7.2l(H(){G(D.14.1f&&!D.4n(7)){J a=7.6o(M),5h=S.3h("1v");5h.3U(a);I D.4h([5h.4H])[0]}N I 7.6o(M)});J d=f.2q("*").5c().P(H(){G(7[E]!=12)7[E]=U});G(e===M)7.2q("*").5c().P(H(i){G(7.16==3)I;J c=D.L(7,"3w");R(J a 1n c)R(J b 1n c[a])D.W.1e(d[i],a,c[a][b],c[a][b].L)});I f},1E:H(b){I 7.2I(D.1D(b)&&D.3C(7,H(a,i){I b.1k(a,i)})||D.3g(b,7))},4Y:H(b){G(b.1q==56)G(62.11(b))I 7.2I(D.3g(b,7,M));N b=D.3g(b,7);J a=b.K&&b[b.K-1]!==12&&!b.16;I 7.1E(H(){I a?D.2L(7,b)<0:7!=b})},1e:H(a){I 7.2I(D.4r(D.2R(7.3p(),1j a==\'23\'?D(a):D.2d(a))))},3F:H(a){I!!a&&D.3g(a,7).K>0},7T:H(a){I 7.3F("."+a)},6e:H(b){G(b==12){G(7.K){J c=7[0];G(D.Y(c,"2A")){J e=c.64,63=[],15=c.15,2V=c.O=="2A-2V";G(e<0)I U;R(J i=2V?e:0,2f=2V?e+1:15.K;i<2f;i++){J d=15[i];G(d.2W){b=D.14.1f&&!d.at.2x.an?d.1r:d.2x;G(2V)I b;63.1p(b)}}I 63}N I(7[0].2x||"").1o(/\\r/g,"")}I 12}G(b.1q==4L)b+=\'\';I 7.P(H(){G(7.16!=1)I;G(b.1q==2p&&/5O|5L/.11(7.O))7.4J=(D.2L(7.2x,b)>=0||D.2L(7.34,b)>=0);N G(D.Y(7,"2A")){J a=D.2d(b);D("9R",7).P(H(){7.2W=(D.2L(7.2x,a)>=0||D.2L(7.1r,a)>=0)});G(!a.K)7.64=-1}N 7.2x=b})},2K:H(a){I a==12?(7[0]?7[0].4H:U):7.4E().3v(a)},7b:H(a){I 7.5q(a).21()},79:H(i){I 7.3s(i,i+1)},3s:H(){I 7.2I(2p.44.3s.1w(7,19))},2l:H(b){I 7.2I(D.2l(7,H(a,i){I b.1k(a,i,a)}))},5c:H(){I 7.1e(7.5n)},L:H(d,b){J a=d.1R(".");a[1]=a[1]?"."+a[1]:"";G(b===12){J c=7.5C("9z"+a[1]+"!",[a[0]]);G(c===12&&7.K)c=D.L(7[0],d);I c===12&&a[1]?7.L(a[0]):c}N I 7.1P("9u"+a[1]+"!",[a[0],b]).P(H(){D.L(7,d,b)})},3b:H(a){I 7.P(H(){D.3b(7,a)})},3W:H(g,f,h,d){J e=7.K>1,3x;I 7.P(H(){G(!3x){3x=D.4h(g,7.2z);G(h)3x.9o()}J b=7;G(f&&D.Y(7,"1T")&&D.Y(3x[0],"4F"))b=7.3H("22")[0]||7.3U(7.2z.3h("22"));J c=D([]);D.P(3x,H(){J a=e?D(7).5y(M)[0]:7;G(D.Y(a,"1m"))c=c.1e(a);N{G(a.16==1)c=c.1e(D("1m",a).21());d.1k(b,a)}});c.P(6T)})}};D.17.5j.44=D.17;H 6T(i,a){G(a.4d)D.3Y({1a:a.4d,31:Q,1O:"1m"});N D.5u(a.1r||a.6O||a.4H||"");G(a.1d)a.1d.37(a)}H 1z(){I+2B 8J}D.1l=D.17.1l=H(){J b=19[0]||{},i=1,K=19.K,4x=Q,15;G(b.1q==8I){4x=b;b=19[1]||{};i=2}G(1j b!="49"&&1j b!="H")b={};G(K==i){b=7;--i}R(;i<K;i++)G((15=19[i])!=U)R(J c 1n 15){J a=b[c],2w=15[c];G(b===2w)6M;G(4x&&2w&&1j 2w=="49"&&!2w.16)b[c]=D.1l(4x,a||(2w.K!=U?[]:{}),2w);N G(2w!==12)b[c]=2w}I b};J E="4M"+1z(),6K=0,5r={},6G=/z-?5i|8B-?8A|1y|6B|8v-?1Z/i,3P=S.3P||{};D.1l({8u:H(a){1b.$=3m$;G(a)1b.4M=w;I D},1D:H(a){I!!a&&1j a!="23"&&!a.Y&&a.1q!=2p&&/^[\\s[]?H/.11(a+"")},4n:H(a){I a.1C&&!a.1c||a.2j&&a.2z&&!a.2z.1c},5u:H(a){a=D.3k(a);G(a){J b=S.3H("6w")[0]||S.1C,1m=S.3h("1m");1m.O="1r/4t";G(D.14.1f)1m.1r=a;N 1m.3U(S.5F(a));b.39(1m,b.1x);b.37(1m)}},Y:H(b,a){I b.Y&&b.Y.2r()==a.2r()},1Y:{},L:H(c,d,b){c=c==1b?5r:c;J a=c[E];G(!a)a=c[E]=++6K;G(d&&!D.1Y[a])D.1Y[a]={};G(b!==12)D.1Y[a][d]=b;I d?D.1Y[a][d]:a},3b:H(c,b){c=c==1b?5r:c;J a=c[E];G(b){G(D.1Y[a]){2U D.1Y[a][b];b="";R(b 1n D.1Y[a])1X;G(!b)D.3b(c)}}N{1U{2U c[E]}1V(e){G(c.5l)c.5l(E)}2U D.1Y[a]}},P:H(d,a,c){J e,i=0,K=d.K;G(c){G(K==12){R(e 1n d)G(a.1w(d[e],c)===Q)1X}N R(;i<K;)G(a.1w(d[i++],c)===Q)1X}N{G(K==12){R(e 1n d)G(a.1k(d[e],e,d[e])===Q)1X}N R(J b=d[0];i<K&&a.1k(b,i,b)!==Q;b=d[++i]){}}I d},1i:H(b,a,c,i,d){G(D.1D(a))a=a.1k(b,i);I a&&a.1q==4L&&c=="2a"&&!6G.11(d)?a+"2X":a},1F:{1e:H(c,b){D.P((b||"").1R(/\\s+/),H(i,a){G(c.16==1&&!D.1F.3T(c.1F,a))c.1F+=(c.1F?" ":"")+a})},21:H(c,b){G(c.16==1)c.1F=b!=12?D.3C(c.1F.1R(/\\s+/),H(a){I!D.1F.3T(b,a)}).6s(" "):""},3T:H(b,a){I D.2L(a,(b.1F||b).6r().1R(/\\s+/))>-1}},6q:H(b,c,a){J e={};R(J d 1n c){e[d]=b.V[d];b.V[d]=c[d]}a.1k(b);R(J d 1n c)b.V[d]=e[d]},1g:H(d,e,c){G(e=="2h"||e=="1Z"){J b,3X={30:"5x",5g:"1G",18:"3I"},35=e=="2h"?["5e","6k"]:["5G","6i"];H 5b(){b=e=="2h"?d.8f:d.8c;J a=0,2C=0;D.P(35,H(){a+=3d(D.2a(d,"57"+7,M))||0;2C+=3d(D.2a(d,"2C"+7+"4b",M))||0});b-=29.83(a+2C)}G(D(d).3F(":4j"))5b();N D.6q(d,3X,5b);I 29.2f(0,b)}I D.2a(d,e,c)},2a:H(f,l,k){J e,V=f.V;H 3E(b){G(!D.14.2k)I Q;J a=3P.54(b,U);I!a||a.52("3E")==""}G(l=="1y"&&D.14.1f){e=D.1K(V,"1y");I e==""?"1":e}G(D.14.2G&&l=="18"){J d=V.50;V.50="0 7Y 7W";V.50=d}G(l.1I(/4i/i))l=y;G(!k&&V&&V[l])e=V[l];N G(3P.54){G(l.1I(/4i/i))l="4i";l=l.1o(/([A-Z])/g,"-$1").3y();J c=3P.54(f,U);G(c&&!3E(f))e=c.52(l);N{J g=[],2E=[],a=f,i=0;R(;a&&3E(a);a=a.1d)2E.6h(a);R(;i<2E.K;i++)G(3E(2E[i])){g[i]=2E[i].V.18;2E[i].V.18="3I"}e=l=="18"&&g[2E.K-1]!=U?"2F":(c&&c.52(l))||"";R(i=0;i<g.K;i++)G(g[i]!=U)2E[i].V.18=g[i]}G(l=="1y"&&e=="")e="1"}N G(f.4g){J h=l.1o(/\\-(\\w)/g,H(a,b){I b.2r()});e=f.4g[l]||f.4g[h];G(!/^\\d+(2X)?$/i.11(e)&&/^\\d/.11(e)){J j=V.1A,66=f.65.1A;f.65.1A=f.4g.1A;V.1A=e||0;e=V.aM+"2X";V.1A=j;f.65.1A=66}}I e},4h:H(l,h){J k=[];h=h||S;G(1j h.3h==\'12\')h=h.2z||h[0]&&h[0].2z||S;D.P(l,H(i,d){G(!d)I;G(d.1q==4L)d+=\'\';G(1j d=="23"){d=d.1o(/(<(\\w+)[^>]*?)\\/>/g,H(b,a,c){I c.1I(/^(aK|4f|7E|aG|4T|7A|aB|3n|az|ay|av)$/i)?b:a+"></"+c+">"});J f=D.3k(d).3y(),1v=h.3h("1v");J e=!f.1h("<au")&&[1,"<2A 7w=\'7w\'>","</2A>"]||!f.1h("<ar")&&[1,"<7v>","</7v>"]||f.1I(/^<(aq|22|am|ak|ai)/)&&[1,"<1T>","</1T>"]||!f.1h("<4F")&&[2,"<1T><22>","</22></1T>"]||(!f.1h("<af")||!f.1h("<ad"))&&[3,"<1T><22><4F>","</4F></22></1T>"]||!f.1h("<7E")&&[2,"<1T><22></22><7q>","</7q></1T>"]||D.14.1f&&[1,"1v<1v>","</1v>"]||[0,"",""];1v.4H=e[1]+d+e[2];1B(e[0]--)1v=1v.5T;G(D.14.1f){J g=!f.1h("<1T")&&f.1h("<22")<0?1v.1x&&1v.1x.3t:e[1]=="<1T>"&&f.1h("<22")<0?1v.3t:[];R(J j=g.K-1;j>=0;--j)G(D.Y(g[j],"22")&&!g[j].3t.K)g[j].1d.37(g[j]);G(/^\\s/.11(d))1v.39(h.5F(d.1I(/^\\s*/)[0]),1v.1x)}d=D.2d(1v.3t)}G(d.K===0&&(!D.Y(d,"3V")&&!D.Y(d,"2A")))I;G(d[0]==12||D.Y(d,"3V")||d.15)k.1p(d);N k=D.2R(k,d)});I k},1K:H(d,f,c){G(!d||d.16==3||d.16==8)I 12;J e=!D.4n(d),40=c!==12,1f=D.14.1f;f=e&&D.3X[f]||f;G(d.2j){J g=/5Q|4d|V/.11(f);G(f=="2W"&&D.14.2k)d.1d.64;G(f 1n d&&e&&!g){G(40){G(f=="O"&&D.Y(d,"4T")&&d.1d)7p"O a3 a1\'t 9V 9U";d[f]=c}G(D.Y(d,"3V")&&d.7i(f))I d.7i(f).76;I d[f]}G(1f&&e&&f=="V")I D.1K(d.V,"9T",c);G(40)d.9Q(f,""+c);J h=1f&&e&&g?d.4G(f,2):d.4G(f);I h===U?12:h}G(1f&&f=="1y"){G(40){d.6B=1;d.1E=(d.1E||"").1o(/7f\\([^)]*\\)/,"")+(3r(c)+\'\'=="9L"?"":"7f(1y="+c*7a+")")}I d.1E&&d.1E.1h("1y=")>=0?(3d(d.1E.1I(/1y=([^)]*)/)[1])/7a)+\'\':""}f=f.1o(/-([a-z])/9H,H(a,b){I b.2r()});G(40)d[f]=c;I d[f]},3k:H(a){I(a||"").1o(/^\\s+|\\s+$/g,"")},2d:H(b){J a=[];G(b!=U){J i=b.K;G(i==U||b.1R||b.4I||b.1k)a[0]=b;N 1B(i)a[--i]=b[i]}I a},2L:H(b,a){R(J i=0,K=a.K;i<K;i++)G(a[i]===b)I i;I-1},2R:H(a,b){J i=0,T,2S=a.K;G(D.14.1f){1B(T=b[i++])G(T.16!=8)a[2S++]=T}N 1B(T=b[i++])a[2S++]=T;I a},4r:H(a){J c=[],2o={};1U{R(J i=0,K=a.K;i<K;i++){J b=D.L(a[i]);G(!2o[b]){2o[b]=M;c.1p(a[i])}}}1V(e){c=a}I c},3C:H(c,a,d){J b=[];R(J i=0,K=c.K;i<K;i++)G(!d!=!a(c[i],i))b.1p(c[i]);I b},2l:H(d,a){J c=[];R(J i=0,K=d.K;i<K;i++){J b=a(d[i],i);G(b!=U)c[c.K]=b}I c.7d.1w([],c)}});J v=9B.9A.3y();D.14={5B:(v.1I(/.+(?:9y|9x|9w|9v)[\\/: ]([\\d.]+)/)||[])[1],2k:/75/.11(v),2G:/2G/.11(v),1f:/1f/.11(v)&&!/2G/.11(v),42:/42/.11(v)&&!/(9s|75)/.11(v)};J y=D.14.1f?"7o":"72";D.1l({71:!D.14.1f||S.70=="6Z",3X:{"R":"9n","9k":"1F","4i":y,72:y,7o:y,9h:"9f",9e:"9d",9b:"99"}});D.P({6W:H(a){I a.1d},97:H(a){I D.4S(a,"1d")},95:H(a){I D.3a(a,2,"2H")},91:H(a){I D.3a(a,2,"4l")},8Z:H(a){I D.4S(a,"2H")},8X:H(a){I D.4S(a,"4l")},8W:H(a){I D.5v(a.1d.1x,a)},8V:H(a){I D.5v(a.1x)},6Q:H(a){I D.Y(a,"8U")?a.8T||a.8S.S:D.2d(a.3t)}},H(c,d){D.17[c]=H(b){J a=D.2l(7,d);G(b&&1j b=="23")a=D.3g(b,a);I 7.2I(D.4r(a))}});D.P({6P:"3v",8Q:"6F",39:"6E",8P:"5q",8O:"7b"},H(c,b){D.17[c]=H(){J a=19;I 7.P(H(){R(J i=0,K=a.K;i<K;i++)D(a[i])[b](7)})}});D.P({8N:H(a){D.1K(7,a,"");G(7.16==1)7.5l(a)},8M:H(a){D.1F.1e(7,a)},8L:H(a){D.1F.21(7,a)},8K:H(a){D.1F[D.1F.3T(7,a)?"21":"1e"](7,a)},21:H(a){G(!a||D.1E(a,[7]).r.K){D("*",7).1e(7).P(H(){D.W.21(7);D.3b(7)});G(7.1d)7.1d.37(7)}},4E:H(){D(">*",7).21();1B(7.1x)7.37(7.1x)}},H(a,b){D.17[a]=H(){I 7.P(b,19)}});D.P(["6N","4b"],H(i,c){J b=c.3y();D.17[b]=H(a){I 7[0]==1b?D.14.2G&&S.1c["5t"+c]||D.14.2k&&1b["5s"+c]||S.70=="6Z"&&S.1C["5t"+c]||S.1c["5t"+c]:7[0]==S?29.2f(29.2f(S.1c["4y"+c],S.1C["4y"+c]),29.2f(S.1c["2i"+c],S.1C["2i"+c])):a==12?(7.K?D.1g(7[0],b):U):7.1g(b,a.1q==56?a:a+"2X")}});H 25(a,b){I a[0]&&3r(D.2a(a[0],b,M),10)||0}J C=D.14.2k&&3r(D.14.5B)<8H?"(?:[\\\\w*3m-]|\\\\\\\\.)":"(?:[\\\\w\\8F-\\8E*3m-]|\\\\\\\\.)",6L=2B 4v("^>\\\\s*("+C+"+)"),6J=2B 4v("^("+C+"+)(#)("+C+"+)"),6I=2B 4v("^([#.]?)("+C+"*)");D.1l({6H:{"":H(a,i,m){I m[2]=="*"||D.Y(a,m[2])},"#":H(a,i,m){I a.4G("2v")==m[2]},":":{8D:H(a,i,m){I i<m[3]-0},8C:H(a,i,m){I i>m[3]-0},3a:H(a,i,m){I m[3]-0==i},79:H(a,i,m){I m[3]-0==i},3o:H(a,i){I i==0},3S:H(a,i,m,r){I i==r.K-1},6D:H(a,i){I i%2==0},6C:H(a,i){I i%2},"3o-4u":H(a){I a.1d.3H("*")[0]==a},"3S-4u":H(a){I D.3a(a.1d.5T,1,"4l")==a},"8z-4u":H(a){I!D.3a(a.1d.5T,2,"4l")},6W:H(a){I a.1x},4E:H(a){I!a.1x},8y:H(a,i,m){I(a.6O||a.8x||D(a).1r()||"").1h(m[3])>=0},4j:H(a){I"1G"!=a.O&&D.1g(a,"18")!="2F"&&D.1g(a,"5g")!="1G"},1G:H(a){I"1G"==a.O||D.1g(a,"18")=="2F"||D.1g(a,"5g")=="1G"},8w:H(a){I!a.3R},3R:H(a){I a.3R},4J:H(a){I a.4J},2W:H(a){I a.2W||D.1K(a,"2W")},1r:H(a){I"1r"==a.O},5O:H(a){I"5O"==a.O},5L:H(a){I"5L"==a.O},5p:H(a){I"5p"==a.O},3Q:H(a){I"3Q"==a.O},5o:H(a){I"5o"==a.O},6A:H(a){I"6A"==a.O},6z:H(a){I"6z"==a.O},2s:H(a){I"2s"==a.O||D.Y(a,"2s")},4T:H(a){I/4T|2A|6y|2s/i.11(a.Y)},3T:H(a,i,m){I D.2q(m[3],a).K},8t:H(a){I/h\\d/i.11(a.Y)},8s:H(a){I D.3C(D.3O,H(b){I a==b.T}).K}}},6x:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,2B 4v("^([:.#]*)("+C+"+)")],3g:H(a,c,b){J d,1t=[];1B(a&&a!=d){d=a;J f=D.1E(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1t=b?c=f.r:D.2R(1t,f.r)}I 1t},2q:H(t,o){G(1j t!="23")I[t];G(o&&o.16!=1&&o.16!=9)I[];o=o||S;J d=[o],2o=[],3S,Y;1B(t&&3S!=t){J r=[];3S=t;t=D.3k(t);J l=Q,3j=6L,m=3j.2D(t);G(m){Y=m[1].2r();R(J i=0;d[i];i++)R(J c=d[i].1x;c;c=c.2H)G(c.16==1&&(Y=="*"||c.Y.2r()==Y))r.1p(c);d=r;t=t.1o(3j,"");G(t.1h(" ")==0)6M;l=M}N{3j=/^([>+~])\\s*(\\w*)/i;G((m=3j.2D(t))!=U){r=[];J k={};Y=m[2].2r();m=m[1];R(J j=0,3i=d.K;j<3i;j++){J n=m=="~"||m=="+"?d[j].2H:d[j].1x;R(;n;n=n.2H)G(n.16==1){J g=D.L(n);G(m=="~"&&k[g])1X;G(!Y||n.Y.2r()==Y){G(m=="~")k[g]=M;r.1p(n)}G(m=="+")1X}}d=r;t=D.3k(t.1o(3j,""));l=M}}G(t&&!l){G(!t.1h(",")){G(o==d[0])d.4s();2o=D.2R(2o,d);r=d=[o];t=" "+t.6v(1,t.K)}N{J h=6J;J m=h.2D(t);G(m){m=[0,m[2],m[3],m[1]]}N{h=6I;m=h.2D(t)}m[2]=m[2].1o(/\\\\/g,"");J f=d[d.K-1];G(m[1]=="#"&&f&&f.61&&!D.4n(f)){J p=f.61(m[2]);G((D.14.1f||D.14.2G)&&p&&1j p.2v=="23"&&p.2v!=m[2])p=D(\'[@2v="\'+m[2]+\'"]\',f)[0];d=r=p&&(!m[3]||D.Y(p,m[3]))?[p]:[]}N{R(J i=0;d[i];i++){J a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];G(a=="*"&&d[i].Y.3y()=="49")a="3n";r=D.2R(r,d[i].3H(a))}G(m[1]==".")r=D.5m(r,m[2]);G(m[1]=="#"){J e=[];R(J i=0;r[i];i++)G(r[i].4G("2v")==m[2]){e=[r[i]];1X}r=e}d=r}t=t.1o(h,"")}}G(t){J b=D.1E(t,r);d=r=b.r;t=D.3k(b.t)}}G(t)d=[];G(d&&o==d[0])d.4s();2o=D.2R(2o,d);I 2o},5m:H(r,m,a){m=" "+m+" ";J c=[];R(J i=0;r[i];i++){J b=(" "+r[i].1F+" ").1h(m)>=0;G(!a&&b||a&&!b)c.1p(r[i])}I c},1E:H(t,r,h){J d;1B(t&&t!=d){d=t;J p=D.6x,m;R(J i=0;p[i];i++){m=p[i].2D(t);G(m){t=t.8r(m[0].K);m[2]=m[2].1o(/\\\\/g,"");1X}}G(!m)1X;G(m[1]==":"&&m[2]=="4Y")r=62.11(m[3])?D.1E(m[3],r,M).r:D(r).4Y(m[3]);N G(m[1]==".")r=D.5m(r,m[2],h);N G(m[1]=="["){J g=[],O=m[3];R(J i=0,3i=r.K;i<3i;i++){J a=r[i],z=a[D.3X[m[2]]||m[2]];G(z==U||/5Q|4d|2W/.11(m[2]))z=D.1K(a,m[2])||\'\';G((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1h(m[5])||O=="$="&&z.6v(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1h(m[5])>=0)^h)g.1p(a)}r=g}N G(m[1]==":"&&m[2]=="3a-4u"){J e={},g=[],11=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2D(m[3]=="6D"&&"2n"||m[3]=="6C"&&"2n+1"||!/\\D/.11(m[3])&&"8q+"+m[3]||m[3]),3o=(11[1]+(11[2]||1))-0,d=11[3]-0;R(J i=0,3i=r.K;i<3i;i++){J j=r[i],1d=j.1d,2v=D.L(1d);G(!e[2v]){J c=1;R(J n=1d.1x;n;n=n.2H)G(n.16==1)n.4q=c++;e[2v]=M}J b=Q;G(3o==0){G(j.4q==d)b=M}N G((j.4q-d)%3o==0&&(j.4q-d)/3o>=0)b=M;G(b^h)g.1p(j)}r=g}N{J f=D.6H[m[1]];G(1j f=="49")f=f[m[2]];G(1j f=="23")f=6u("Q||H(a,i){I "+f+";}");r=D.3C(r,H(a,i){I f(a,i,m,r)},h)}}I{r:r,t:t}},4S:H(b,c){J a=[],1t=b[c];1B(1t&&1t!=S){G(1t.16==1)a.1p(1t);1t=1t[c]}I a},3a:H(a,e,c,b){e=e||1;J d=0;R(;a;a=a[c])G(a.16==1&&++d==e)1X;I a},5v:H(n,a){J r=[];R(;n;n=n.2H){G(n.16==1&&n!=a)r.1p(n)}I r}});D.W={1e:H(f,i,g,e){G(f.16==3||f.16==8)I;G(D.14.1f&&f.4I)f=1b;G(!g.24)g.24=7.24++;G(e!=12){J h=g;g=7.3M(h,H(){I h.1w(7,19)});g.L=e}J j=D.L(f,"3w")||D.L(f,"3w",{}),1H=D.L(f,"1H")||D.L(f,"1H",H(){G(1j D!="12"&&!D.W.5k)I D.W.1H.1w(19.3L.T,19)});1H.T=f;D.P(i.1R(/\\s+/),H(c,b){J a=b.1R(".");b=a[0];g.O=a[1];J d=j[b];G(!d){d=j[b]={};G(!D.W.2t[b]||D.W.2t[b].4p.1k(f)===Q){G(f.3K)f.3K(b,1H,Q);N G(f.6t)f.6t("4o"+b,1H)}}d[g.24]=g;D.W.26[b]=M});f=U},24:1,26:{},21:H(e,h,f){G(e.16==3||e.16==8)I;J i=D.L(e,"3w"),1L,5i;G(i){G(h==12||(1j h=="23"&&h.8p(0)=="."))R(J g 1n i)7.21(e,g+(h||""));N{G(h.O){f=h.2y;h=h.O}D.P(h.1R(/\\s+/),H(b,a){J c=a.1R(".");a=c[0];G(i[a]){G(f)2U i[a][f.24];N R(f 1n i[a])G(!c[1]||i[a][f].O==c[1])2U i[a][f];R(1L 1n i[a])1X;G(!1L){G(!D.W.2t[a]||D.W.2t[a].4A.1k(e)===Q){G(e.6p)e.6p(a,D.L(e,"1H"),Q);N G(e.6n)e.6n("4o"+a,D.L(e,"1H"))}1L=U;2U i[a]}}})}R(1L 1n i)1X;G(!1L){J d=D.L(e,"1H");G(d)d.T=U;D.3b(e,"3w");D.3b(e,"1H")}}},1P:H(h,c,f,g,i){c=D.2d(c);G(h.1h("!")>=0){h=h.3s(0,-1);J a=M}G(!f){G(7.26[h])D("*").1e([1b,S]).1P(h,c)}N{G(f.16==3||f.16==8)I 12;J b,1L,17=D.1D(f[h]||U),W=!c[0]||!c[0].32;G(W){c.6h({O:h,2J:f,32:H(){},3J:H(){},4C:1z()});c[0][E]=M}c[0].O=h;G(a)c[0].6m=M;J d=D.L(f,"1H");G(d)b=d.1w(f,c);G((!17||(D.Y(f,\'a\')&&h=="4V"))&&f["4o"+h]&&f["4o"+h].1w(f,c)===Q)b=Q;G(W)c.4s();G(i&&D.1D(i)){1L=i.1w(f,b==U?c:c.7d(b));G(1L!==12)b=1L}G(17&&g!==Q&&b!==Q&&!(D.Y(f,\'a\')&&h=="4V")){7.5k=M;1U{f[h]()}1V(e){}}7.5k=Q}I b},1H:H(b){J a,1L,38,5f,4m;b=19[0]=D.W.6l(b||1b.W);38=b.O.1R(".");b.O=38[0];38=38[1];5f=!38&&!b.6m;4m=(D.L(7,"3w")||{})[b.O];R(J j 1n 4m){J c=4m[j];G(5f||c.O==38){b.2y=c;b.L=c.L;1L=c.1w(7,19);G(a!==Q)a=1L;G(1L===Q){b.32();b.3J()}}}I a},6l:H(b){G(b[E]==M)I b;J d=b;b={8o:d};J c="8n 8m 8l 8k 2s 8j 47 5d 6j 5E 8i L 8h 8g 4K 2y 5a 59 8e 8b 58 6f 8a 88 4k 87 86 84 6d 2J 4C 6c O 82 81 35".1R(" ");R(J i=c.K;i;i--)b[c[i]]=d[c[i]];b[E]=M;b.32=H(){G(d.32)d.32();d.80=Q};b.3J=H(){G(d.3J)d.3J();d.7Z=M};b.4C=b.4C||1z();G(!b.2J)b.2J=b.6d||S;G(b.2J.16==3)b.2J=b.2J.1d;G(!b.4k&&b.4K)b.4k=b.4K==b.2J?b.6c:b.4K;G(b.58==U&&b.5d!=U){J a=S.1C,1c=S.1c;b.58=b.5d+(a&&a.2e||1c&&1c.2e||0)-(a.6b||0);b.6f=b.6j+(a&&a.2c||1c&&1c.2c||0)-(a.6a||0)}G(!b.35&&((b.47||b.47===0)?b.47:b.5a))b.35=b.47||b.5a;G(!b.59&&b.5E)b.59=b.5E;G(!b.35&&b.2s)b.35=(b.2s&1?1:(b.2s&2?3:(b.2s&4?2:0)));I b},3M:H(a,b){b.24=a.24=a.24||b.24||7.24++;I b},2t:{27:{4p:H(){55();I},4A:H(){I}},3D:{4p:H(){G(D.14.1f)I Q;D(7).2O("53",D.W.2t.3D.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("53",D.W.2t.3D.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3D";I D.W.1H.1w(7,19)}},3N:{4p:H(){G(D.14.1f)I Q;D(7).2O("51",D.W.2t.3N.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("51",D.W.2t.3N.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3N";I D.W.1H.1w(7,19)}}}};D.17.1l({2O:H(c,a,b){I c=="4X"?7.2V(c,a,b):7.P(H(){D.W.1e(7,c,b||a,b&&a)})},2V:H(d,b,c){J e=D.W.3M(c||b,H(a){D(7).4e(a,e);I(c||b).1w(7,19)});I 7.P(H(){D.W.1e(7,d,e,c&&b)})},4e:H(a,b){I 7.P(H(){D.W.21(7,a,b)})},1P:H(c,a,b){I 7.P(H(){D.W.1P(c,a,7,M,b)})},5C:H(c,a,b){I 7[0]&&D.W.1P(c,a,7[0],Q,b)},2m:H(b){J c=19,i=1;1B(i<c.K)D.W.3M(b,c[i++]);I 7.4V(D.W.3M(b,H(a){7.4Z=(7.4Z||0)%i;a.32();I c[7.4Z++].1w(7,19)||Q}))},7X:H(a,b){I 7.2O(\'3D\',a).2O(\'3N\',b)},27:H(a){55();G(D.2Q)a.1k(S,D);N D.3A.1p(H(){I a.1k(7,D)});I 7}});D.1l({2Q:Q,3A:[],27:H(){G(!D.2Q){D.2Q=M;G(D.3A){D.P(D.3A,H(){7.1k(S)});D.3A=U}D(S).5C("27")}}});J x=Q;H 55(){G(x)I;x=M;G(S.3K&&!D.14.2G)S.3K("69",D.27,Q);G(D.14.1f&&1b==1S)(H(){G(D.2Q)I;1U{S.1C.7V("1A")}1V(3e){3B(19.3L,0);I}D.27()})();G(D.14.2G)S.3K("69",H(){G(D.2Q)I;R(J i=0;i<S.4W.K;i++)G(S.4W[i].3R){3B(19.3L,0);I}D.27()},Q);G(D.14.2k){J a;(H(){G(D.2Q)I;G(S.3f!="68"&&S.3f!="1J"){3B(19.3L,0);I}G(a===12)a=D("V, 7A[7U=7S]").K;G(S.4W.K!=a){3B(19.3L,0);I}D.27()})()}D.W.1e(1b,"43",D.27)}D.P(("7R,7Q,43,85,4y,4X,4V,7P,"+"7O,7N,89,53,51,7M,2A,"+"5o,7L,7K,8d,3e").1R(","),H(i,b){D.17[b]=H(a){I a?7.2O(b,a):7.1P(b)}});J F=H(a,c){J b=a.4k;1B(b&&b!=c)1U{b=b.1d}1V(3e){b=c}I b==c};D(1b).2O("4X",H(){D("*").1e(S).4e()});D.17.1l({67:D.17.43,43:H(g,d,c){G(1j g!=\'23\')I 7.67(g);J e=g.1h(" ");G(e>=0){J i=g.3s(e,g.K);g=g.3s(0,e)}c=c||H(){};J f="2P";G(d)G(D.1D(d)){c=d;d=U}N{d=D.3n(d);f="6g"}J h=7;D.3Y({1a:g,O:f,1O:"2K",L:d,1J:H(a,b){G(b=="1W"||b=="7J")h.2K(i?D("<1v/>").3v(a.4U.1o(/<1m(.|\\s)*?\\/1m>/g,"")).2q(i):a.4U);h.P(c,[a.4U,b,a])}});I 7},aL:H(){I D.3n(7.7I())},7I:H(){I 7.2l(H(){I D.Y(7,"3V")?D.2d(7.aH):7}).1E(H(){I 7.34&&!7.3R&&(7.4J||/2A|6y/i.11(7.Y)||/1r|1G|3Q/i.11(7.O))}).2l(H(i,c){J b=D(7).6e();I b==U?U:b.1q==2p?D.2l(b,H(a,i){I{34:c.34,2x:a}}):{34:c.34,2x:b}}).3p()}});D.P("7H,7G,7F,7D,7C,7B".1R(","),H(i,o){D.17[o]=H(f){I 7.2O(o,f)}});J B=1z();D.1l({3p:H(d,b,a,c){G(D.1D(b)){a=b;b=U}I D.3Y({O:"2P",1a:d,L:b,1W:a,1O:c})},aE:H(b,a){I D.3p(b,U,a,"1m")},aD:H(c,b,a){I D.3p(c,b,a,"3z")},aC:H(d,b,a,c){G(D.1D(b)){a=b;b={}}I D.3Y({O:"6g",1a:d,L:b,1W:a,1O:c})},aA:H(a){D.1l(D.60,a)},60:{1a:5Z.5Q,26:M,O:"2P",2T:0,7z:"4R/x-ax-3V-aw",7x:M,31:M,L:U,5Y:U,3Q:U,4Q:{2N:"4R/2N, 1r/2N",2K:"1r/2K",1m:"1r/4t, 4R/4t",3z:"4R/3z, 1r/4t",1r:"1r/as",4w:"*/*"}},4z:{},3Y:H(s){s=D.1l(M,s,D.1l(M,{},D.60,s));J g,2Z=/=\\?(&|$)/g,1u,L,O=s.O.2r();G(s.L&&s.7x&&1j s.L!="23")s.L=D.3n(s.L);G(s.1O=="4P"){G(O=="2P"){G(!s.1a.1I(2Z))s.1a+=(s.1a.1I(/\\?/)?"&":"?")+(s.4P||"7u")+"=?"}N G(!s.L||!s.L.1I(2Z))s.L=(s.L?s.L+"&":"")+(s.4P||"7u")+"=?";s.1O="3z"}G(s.1O=="3z"&&(s.L&&s.L.1I(2Z)||s.1a.1I(2Z))){g="4P"+B++;G(s.L)s.L=(s.L+"").1o(2Z,"="+g+"$1");s.1a=s.1a.1o(2Z,"="+g+"$1");s.1O="1m";1b[g]=H(a){L=a;1W();1J();1b[g]=12;1U{2U 1b[g]}1V(e){}G(i)i.37(h)}}G(s.1O=="1m"&&s.1Y==U)s.1Y=Q;G(s.1Y===Q&&O=="2P"){J j=1z();J k=s.1a.1o(/(\\?|&)3m=.*?(&|$)/,"$ap="+j+"$2");s.1a=k+((k==s.1a)?(s.1a.1I(/\\?/)?"&":"?")+"3m="+j:"")}G(s.L&&O=="2P"){s.1a+=(s.1a.1I(/\\?/)?"&":"?")+s.L;s.L=U}G(s.26&&!D.4O++)D.W.1P("7H");J n=/^(?:\\w+:)?\\/\\/([^\\/?#]+)/;G(s.1O=="1m"&&O=="2P"&&n.11(s.1a)&&n.2D(s.1a)[1]!=5Z.al){J i=S.3H("6w")[0];J h=S.3h("1m");h.4d=s.1a;G(s.7t)h.aj=s.7t;G(!g){J l=Q;h.ah=h.ag=H(){G(!l&&(!7.3f||7.3f=="68"||7.3f=="1J")){l=M;1W();1J();i.37(h)}}}i.3U(h);I 12}J m=Q;J c=1b.7s?2B 7s("ae.ac"):2B 7r();G(s.5Y)c.6R(O,s.1a,s.31,s.5Y,s.3Q);N c.6R(O,s.1a,s.31);1U{G(s.L)c.4B("ab-aa",s.7z);G(s.5S)c.4B("a9-5R-a8",D.4z[s.1a]||"a7, a6 a5 a4 5N:5N:5N a2");c.4B("X-9Z-9Y","7r");c.4B("9W",s.1O&&s.4Q[s.1O]?s.4Q[s.1O]+", */*":s.4Q.4w)}1V(e){}G(s.7m&&s.7m(c,s)===Q){s.26&&D.4O--;c.7l();I Q}G(s.26)D.W.1P("7B",[c,s]);J d=H(a){G(!m&&c&&(c.3f==4||a=="2T")){m=M;G(f){7k(f);f=U}1u=a=="2T"&&"2T"||!D.7j(c)&&"3e"||s.5S&&D.7h(c,s.1a)&&"7J"||"1W";G(1u=="1W"){1U{L=D.6X(c,s.1O,s.9S)}1V(e){1u="5J"}}G(1u=="1W"){J b;1U{b=c.5I("7g-5R")}1V(e){}G(s.5S&&b)D.4z[s.1a]=b;G(!g)1W()}N D.5H(s,c,1u);1J();G(s.31)c=U}};G(s.31){J f=4I(d,13);G(s.2T>0)3B(H(){G(c){c.7l();G(!m)d("2T")}},s.2T)}1U{c.9P(s.L)}1V(e){D.5H(s,c,U,e)}G(!s.31)d();H 1W(){G(s.1W)s.1W(L,1u);G(s.26)D.W.1P("7C",[c,s])}H 1J(){G(s.1J)s.1J(c,1u);G(s.26)D.W.1P("7F",[c,s]);G(s.26&&!--D.4O)D.W.1P("7G")}I c},5H:H(s,a,b,e){G(s.3e)s.3e(a,b,e);G(s.26)D.W.1P("7D",[a,s,e])},4O:0,7j:H(a){1U{I!a.1u&&5Z.9O=="5p:"||(a.1u>=7e&&a.1u<9N)||a.1u==7c||a.1u==9K||D.14.2k&&a.1u==12}1V(e){}I Q},7h:H(a,c){1U{J b=a.5I("7g-5R");I a.1u==7c||b==D.4z[c]||D.14.2k&&a.1u==12}1V(e){}I Q},6X:H(a,c,b){J d=a.5I("9J-O"),2N=c=="2N"||!c&&d&&d.1h("2N")>=0,L=2N?a.9I:a.4U;G(2N&&L.1C.2j=="5J")7p"5J";G(b)L=b(L,c);G(c=="1m")D.5u(L);G(c=="3z")L=6u("("+L+")");I L},3n:H(a){J s=[];G(a.1q==2p||a.5w)D.P(a,H(){s.1p(3u(7.34)+"="+3u(7.2x))});N R(J j 1n a)G(a[j]&&a[j].1q==2p)D.P(a[j],H(){s.1p(3u(j)+"="+3u(7))});N s.1p(3u(j)+"="+3u(D.1D(a[j])?a[j]():a[j]));I s.6s("&").1o(/%20/g,"+")}});D.17.1l({1N:H(c,b){I c?7.2g({1Z:"1N",2h:"1N",1y:"1N"},c,b):7.1E(":1G").P(H(){7.V.18=7.5D||"";G(D.1g(7,"18")=="2F"){J a=D("<"+7.2j+" />").6P("1c");7.V.18=a.1g("18");G(7.V.18=="2F")7.V.18="3I";a.21()}}).3l()},1M:H(b,a){I b?7.2g({1Z:"1M",2h:"1M",1y:"1M"},b,a):7.1E(":4j").P(H(){7.5D=7.5D||D.1g(7,"18");7.V.18="2F"}).3l()},78:D.17.2m,2m:H(a,b){I D.1D(a)&&D.1D(b)?7.78.1w(7,19):a?7.2g({1Z:"2m",2h:"2m",1y:"2m"},a,b):7.P(H(){D(7)[D(7).3F(":1G")?"1N":"1M"]()})},9G:H(b,a){I 7.2g({1Z:"1N"},b,a)},9F:H(b,a){I 7.2g({1Z:"1M"},b,a)},9E:H(b,a){I 7.2g({1Z:"2m"},b,a)},9D:H(b,a){I 7.2g({1y:"1N"},b,a)},9M:H(b,a){I 7.2g({1y:"1M"},b,a)},9C:H(c,a,b){I 7.2g({1y:a},c,b)},2g:H(k,j,i,g){J h=D.77(j,i,g);I 7[h.36===Q?"P":"36"](H(){G(7.16!=1)I Q;J f=D.1l({},h),p,1G=D(7).3F(":1G"),46=7;R(p 1n k){G(k[p]=="1M"&&1G||k[p]=="1N"&&!1G)I f.1J.1k(7);G(p=="1Z"||p=="2h"){f.18=D.1g(7,"18");f.33=7.V.33}}G(f.33!=U)7.V.33="1G";f.45=D.1l({},k);D.P(k,H(c,a){J e=2B D.28(46,f,c);G(/2m|1N|1M/.11(a))e[a=="2m"?1G?"1N":"1M":a](k);N{J b=a.6r().1I(/^([+-]=)?([\\d+-.]+)(.*)$/),2b=e.1t(M)||0;G(b){J d=3d(b[2]),2M=b[3]||"2X";G(2M!="2X"){46.V[c]=(d||1)+2M;2b=((d||1)/e.1t(M))*2b;46.V[c]=2b+2M}G(b[1])d=((b[1]=="-="?-1:1)*d)+2b;e.3G(2b,d,2M)}N e.3G(2b,a,"")}});I M})},36:H(a,b){G(D.1D(a)||(a&&a.1q==2p)){b=a;a="28"}G(!a||(1j a=="23"&&!b))I A(7[0],a);I 7.P(H(){G(b.1q==2p)A(7,a,b);N{A(7,a).1p(b);G(A(7,a).K==1)b.1k(7)}})},9X:H(b,c){J a=D.3O;G(b)7.36([]);7.P(H(){R(J i=a.K-1;i>=0;i--)G(a[i].T==7){G(c)a[i](M);a.7n(i,1)}});G(!c)7.5A();I 7}});J A=H(b,c,a){G(b){c=c||"28";J q=D.L(b,c+"36");G(!q||a)q=D.L(b,c+"36",D.2d(a))}I q};D.17.5A=H(a){a=a||"28";I 7.P(H(){J q=A(7,a);q.4s();G(q.K)q[0].1k(7)})};D.1l({77:H(b,a,c){J d=b&&b.1q==a0?b:{1J:c||!c&&a||D.1D(b)&&b,2u:b,41:c&&a||a&&a.1q!=9t&&a};d.2u=(d.2u&&d.2u.1q==4L?d.2u:D.28.5K[d.2u])||D.28.5K.74;d.5M=d.1J;d.1J=H(){G(d.36!==Q)D(7).5A();G(D.1D(d.5M))d.5M.1k(7)};I d},41:{73:H(p,n,b,a){I b+a*p},5P:H(p,n,b,a){I((-29.9r(p*29.9q)/2)+0.5)*a+b}},3O:[],48:U,28:H(b,c,a){7.15=c;7.T=b;7.1i=a;G(!c.3Z)c.3Z={}}});D.28.44={4D:H(){G(7.15.2Y)7.15.2Y.1k(7.T,7.1z,7);(D.28.2Y[7.1i]||D.28.2Y.4w)(7);G(7.1i=="1Z"||7.1i=="2h")7.T.V.18="3I"},1t:H(a){G(7.T[7.1i]!=U&&7.T.V[7.1i]==U)I 7.T[7.1i];J r=3d(D.1g(7.T,7.1i,a));I r&&r>-9p?r:3d(D.2a(7.T,7.1i))||0},3G:H(c,b,d){7.5V=1z();7.2b=c;7.3l=b;7.2M=d||7.2M||"2X";7.1z=7.2b;7.2S=7.4N=0;7.4D();J e=7;H t(a){I e.2Y(a)}t.T=7.T;D.3O.1p(t);G(D.48==U){D.48=4I(H(){J a=D.3O;R(J i=0;i<a.K;i++)G(!a[i]())a.7n(i--,1);G(!a.K){7k(D.48);D.48=U}},13)}},1N:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1N=M;7.3G(0,7.1t());G(7.1i=="2h"||7.1i=="1Z")7.T.V[7.1i]="9m";D(7.T).1N()},1M:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1M=M;7.3G(7.1t(),0)},2Y:H(a){J t=1z();G(a||t>7.15.2u+7.5V){7.1z=7.3l;7.2S=7.4N=1;7.4D();7.15.45[7.1i]=M;J b=M;R(J i 1n 7.15.45)G(7.15.45[i]!==M)b=Q;G(b){G(7.15.18!=U){7.T.V.33=7.15.33;7.T.V.18=7.15.18;G(D.1g(7.T,"18")=="2F")7.T.V.18="3I"}G(7.15.1M)7.T.V.18="2F";G(7.15.1M||7.15.1N)R(J p 1n 7.15.45)D.1K(7.T.V,p,7.15.3Z[p])}G(b)7.15.1J.1k(7.T);I Q}N{J n=t-7.5V;7.4N=n/7.15.2u;7.2S=D.41[7.15.41||(D.41.5P?"5P":"73")](7.4N,n,0,1,7.15.2u);7.1z=7.2b+((7.3l-7.2b)*7.2S);7.4D()}I M}};D.1l(D.28,{5K:{9l:9j,9i:7e,74:9g},2Y:{2e:H(a){a.T.2e=a.1z},2c:H(a){a.T.2c=a.1z},1y:H(a){D.1K(a.T.V,"1y",a.1z)},4w:H(a){a.T.V[a.1i]=a.1z+a.2M}}});D.17.2i=H(){J b=0,1S=0,T=7[0],3q;G(T)ao(D.14){J d=T.1d,4a=T,1s=T.1s,1Q=T.2z,5U=2k&&3r(5B)<9c&&!/9a/i.11(v),1g=D.2a,3c=1g(T,"30")=="3c";G(T.7y){J c=T.7y();1e(c.1A+29.2f(1Q.1C.2e,1Q.1c.2e),c.1S+29.2f(1Q.1C.2c,1Q.1c.2c));1e(-1Q.1C.6b,-1Q.1C.6a)}N{1e(T.5X,T.5W);1B(1s){1e(1s.5X,1s.5W);G(42&&!/^t(98|d|h)$/i.11(1s.2j)||2k&&!5U)2C(1s);G(!3c&&1g(1s,"30")=="3c")3c=M;4a=/^1c$/i.11(1s.2j)?4a:1s;1s=1s.1s}1B(d&&d.2j&&!/^1c|2K$/i.11(d.2j)){G(!/^96|1T.*$/i.11(1g(d,"18")))1e(-d.2e,-d.2c);G(42&&1g(d,"33")!="4j")2C(d);d=d.1d}G((5U&&(3c||1g(4a,"30")=="5x"))||(42&&1g(4a,"30")!="5x"))1e(-1Q.1c.5X,-1Q.1c.5W);G(3c)1e(29.2f(1Q.1C.2e,1Q.1c.2e),29.2f(1Q.1C.2c,1Q.1c.2c))}3q={1S:1S,1A:b}}H 2C(a){1e(D.2a(a,"6V",M),D.2a(a,"6U",M))}H 1e(l,t){b+=3r(l,10)||0;1S+=3r(t,10)||0}I 3q};D.17.1l({30:H(){J a=0,1S=0,3q;G(7[0]){J b=7.1s(),2i=7.2i(),4c=/^1c|2K$/i.11(b[0].2j)?{1S:0,1A:0}:b.2i();2i.1S-=25(7,\'94\');2i.1A-=25(7,\'aF\');4c.1S+=25(b,\'6U\');4c.1A+=25(b,\'6V\');3q={1S:2i.1S-4c.1S,1A:2i.1A-4c.1A}}I 3q},1s:H(){J a=7[0].1s;1B(a&&(!/^1c|2K$/i.11(a.2j)&&D.1g(a,\'30\')==\'93\'))a=a.1s;I D(a)}});D.P([\'5e\',\'5G\'],H(i,b){J c=\'4y\'+b;D.17[c]=H(a){G(!7[0])I;I a!=12?7.P(H(){7==1b||7==S?1b.92(!i?a:D(1b).2e(),i?a:D(1b).2c()):7[c]=a}):7[0]==1b||7[0]==S?46[i?\'aI\':\'aJ\']||D.71&&S.1C[c]||S.1c[c]:7[0][c]}});D.P(["6N","4b"],H(i,b){J c=i?"5e":"5G",4f=i?"6k":"6i";D.17["5s"+b]=H(){I 7[b.3y()]()+25(7,"57"+c)+25(7,"57"+4f)};D.17["90"+b]=H(a){I 7["5s"+b]()+25(7,"2C"+c+"4b")+25(7,"2C"+4f+"4b")+(a?25(7,"6S"+c)+25(7,"6S"+4f):0)}})})();',62,669,'|||||||this|||||||||||||||||||||||||||||||||||if|function|return|var|length|data|true|else|type|each|false|for|document|elem|null|style|event||nodeName|||test|undefined||browser|options|nodeType|fn|display|arguments|url|window|body|parentNode|add|msie|css|indexOf|prop|typeof|call|extend|script|in|replace|push|constructor|text|offsetParent|cur|status|div|apply|firstChild|opacity|now|left|while|documentElement|isFunction|filter|className|hidden|handle|match|complete|attr|ret|hide|show|dataType|trigger|doc|split|top|table|try|catch|success|break|cache|height||remove|tbody|string|guid|num|global|ready|fx|Math|curCSS|start|scrollTop|makeArray|scrollLeft|max|animate|width|offset|tagName|safari|map|toggle||done|Array|find|toUpperCase|button|special|duration|id|copy|value|handler|ownerDocument|select|new|border|exec|stack|none|opera|nextSibling|pushStack|target|html|inArray|unit|xml|bind|GET|isReady|merge|pos|timeout|delete|one|selected|px|step|jsre|position|async|preventDefault|overflow|name|which|queue|removeChild|namespace|insertBefore|nth|removeData|fixed|parseFloat|error|readyState|multiFilter|createElement|rl|re|trim|end|_|param|first|get|results|parseInt|slice|childNodes|encodeURIComponent|append|events|elems|toLowerCase|json|readyList|setTimeout|grep|mouseenter|color|is|custom|getElementsByTagName|block|stopPropagation|addEventListener|callee|proxy|mouseleave|timers|defaultView|password|disabled|last|has|appendChild|form|domManip|props|ajax|orig|set|easing|mozilla|load|prototype|curAnim|self|charCode|timerId|object|offsetChild|Width|parentOffset|src|unbind|br|currentStyle|clean|float|visible|relatedTarget|previousSibling|handlers|isXMLDoc|on|setup|nodeIndex|unique|shift|javascript|child|RegExp|_default|deep|scroll|lastModified|teardown|setRequestHeader|timeStamp|update|empty|tr|getAttribute|innerHTML|setInterval|checked|fromElement|Number|jQuery|state|active|jsonp|accepts|application|dir|input|responseText|click|styleSheets|unload|not|lastToggle|outline|mouseout|getPropertyValue|mouseover|getComputedStyle|bindReady|String|padding|pageX|metaKey|keyCode|getWH|andSelf|clientX|Left|all|visibility|container|index|init|triggered|removeAttribute|classFilter|prevObject|submit|file|after|windowData|inner|client|globalEval|sibling|jquery|absolute|clone|wrapAll|dequeue|version|triggerHandler|oldblock|ctrlKey|createTextNode|Top|handleError|getResponseHeader|parsererror|speeds|checkbox|old|00|radio|swing|href|Modified|ifModified|lastChild|safari2|startTime|offsetTop|offsetLeft|username|location|ajaxSettings|getElementById|isSimple|values|selectedIndex|runtimeStyle|rsLeft|_load|loaded|DOMContentLoaded|clientTop|clientLeft|toElement|srcElement|val|pageY|POST|unshift|Bottom|clientY|Right|fix|exclusive|detachEvent|cloneNode|removeEventListener|swap|toString|join|attachEvent|eval|substr|head|parse|textarea|reset|image|zoom|odd|even|before|prepend|exclude|expr|quickClass|quickID|uuid|quickChild|continue|Height|textContent|appendTo|contents|open|margin|evalScript|borderTopWidth|borderLeftWidth|parent|httpData|setArray|CSS1Compat|compatMode|boxModel|cssFloat|linear|def|webkit|nodeValue|speed|_toggle|eq|100|replaceWith|304|concat|200|alpha|Last|httpNotModified|getAttributeNode|httpSuccess|clearInterval|abort|beforeSend|splice|styleFloat|throw|colgroup|XMLHttpRequest|ActiveXObject|scriptCharset|callback|fieldset|multiple|processData|getBoundingClientRect|contentType|link|ajaxSend|ajaxSuccess|ajaxError|col|ajaxComplete|ajaxStop|ajaxStart|serializeArray|notmodified|keypress|keydown|change|mouseup|mousedown|dblclick|focus|blur|stylesheet|hasClass|rel|doScroll|black|hover|solid|cancelBubble|returnValue|wheelDelta|view|round|shiftKey|resize|screenY|screenX|relatedNode|mousemove|prevValue|originalTarget|offsetHeight|keyup|newValue|offsetWidth|eventPhase|detail|currentTarget|cancelable|bubbles|attrName|attrChange|altKey|originalEvent|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|font|gt|lt|uFFFF|u0128|size|417|Boolean|Date|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|wrap|contentWindow|contentDocument|iframe|children|siblings|prevAll|wrapInner|nextAll|outer|prev|scrollTo|static|marginTop|next|inline|parents|able|cellSpacing|adobeair|cellspacing|522|maxLength|maxlength|readOnly|400|readonly|fast|600|class|slow|1px|htmlFor|reverse|10000|PI|cos|compatible|Function|setData|ie|ra|it|rv|getData|userAgent|navigator|fadeTo|fadeIn|slideToggle|slideUp|slideDown|ig|responseXML|content|1223|NaN|fadeOut|300|protocol|send|setAttribute|option|dataFilter|cssText|changed|be|Accept|stop|With|Requested|Object|can|GMT|property|1970|Jan|01|Thu|Since|If|Type|Content|XMLHTTP|th|Microsoft|td|onreadystatechange|onload|cap|charset|colg|host|tfoot|specified|with|1_|thead|leg|plain|attributes|opt|embed|urlencoded|www|area|hr|ajaxSetup|meta|post|getJSON|getScript|marginLeft|img|elements|pageYOffset|pageXOffset|abbr|serialize|pixelLeft'.split('|'),0,{}));


/**
 * 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
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            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(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        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 { // only name given, get cookie
        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]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

ï»¿/* jQuery UI 1.5.3
 * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
 * Dual licensed under the MIT and GPL licenses. */(function($){$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return}for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name]}var tmp=$('<div class="ui-gen">').addClass(name).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css("cursor"))||(/^[1-9]/).test(tmp.css("height"))||(/^[1-9]/).test(tmp.css("width"))||!(/none/).test(tmp.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css("backgroundColor"))));try{$("body").get(0).removeChild(tmp.get(0))}catch(e){}return $.ui.cssCache[name]},disableSelection:function(el){$(el).attr("unselectable","on").css("MozUserSelect","none")},enableSelection:function(el){$(el).attr("unselectable","off").css("MozUserSelect","")},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?"scrollTop":"scrollLeft",has=false;if(e[scroll]>0){return true}e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).triggerHandler("remove");return _remove.apply(this,arguments)};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args)}else{if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options))}}})};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);this.element=$(element).bind("setData."+name,function(e,key,value){return self.setData(key,value)}).bind("getData."+name,function(e,key){return self.getData(key)}).bind("remove",function(){return self.destroy()});this.init()};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype)};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(key){return this.options[key]},setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};$.widget.defaults={disabled:false};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(e){return self.mouseDown(e)});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},mouseDown:function(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true}}this._mouseMoveDelegate=function(e){return self.mouseMove(e)};this._mouseUpDelegate=function(e){return self.mouseUp(e)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e)}if(this._mouseStarted){this.mouseDrag(e);return false}if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e))}return !this._mouseStarted},mouseUp:function(e){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e)}return false},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance)},mouseDelayMet:function(e){return this._mouseDelayMet},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);

/* jQuery UI Slider
 * Depends: ui.core.js */
(function($){$.fn.unwrap=$.fn.unwrap||function(expr){return this.each(function(){$(this).parents(expr).eq(0).after(this).remove()})};$.widget("ui.slider",{plugins:{},ui:function(e){return{options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:Math.round(this.value(null,"x")),y:Math.round(this.value(null,"y"))},range:this.getRange()}},propagate:function(n,e){$.ui.plugin.call(this,n,[e,this.ui()]);this.element.triggerHandler(n=="slide"?n:"slide"+n,[e,this.ui()],this.options[n])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){$(this).data("mouse").mouseDestroy()})}this.generated&&this.generated.remove()},setData:function(key,value){$.widget.prototype.setData.apply(this,arguments);if(/min|max|steps/.test(key)){this.initBoundaries()}if(key=="range"){value?this.handle.length==2&&this.createRange():this.removeRange()}},init:function(){var self=this;this.element.addClass("ui-slider");this.initBoundaries();this.handle=$(this.options.handle,this.element);if(!this.handle.length){self.handle=self.generated=$(self.options.handles||[0]).map(function(){var handle=$("<div/>").addClass("ui-slider-handle").appendTo(self.element);if(this.id){handle.attr("id",this.id)}return handle[0]})}var handleclass=function(el){this.element=$(el);this.element.data("mouse",this);this.options=self.options;this.element.bind("mousedown",function(){if(self.currentHandle){this.blur(self.currentHandle)}self.focus(this,1)});this.mouseInit()};$.extend(handleclass.prototype,$.ui.mouse,{mouseStart:function(e){return self.start.call(self,e,this.element[0])},mouseStop:function(e){return self.stop.call(self,e,this.element[0])},mouseDrag:function(e){return self.drag.call(self,e,this.element[0])},mouseCapture:function(){return true},trigger:function(e){this.mouseDown(e)}});$(this.handle).each(function(){new handleclass(this)}).wrap('<a href="javascript:void(0)" style="outline:none;border:none;"></a>').parent().bind("focus",function(e){self.focus(this.firstChild)}).bind("blur",function(e){self.blur(this.firstChild)}).bind("keydown",function(e){if(!self.options.noKeyboard){self.keydown(e.keyCode,this.firstChild)}});this.element.bind("mousedown.slider",function(e){self.click.apply(self,[e]);self.currentHandle.data("mouse").trigger(e);self.firstValue=self.firstValue+1});$.each(this.options.handles||[],function(index,handle){self.moveTo(handle.start,index,true)});if(!isNaN(this.options.startValue)){this.moveTo(this.options.startValue,0,true)}this.previousHandle=$(this.handle[0]);if(this.handle.length==2&&this.options.range){this.createRange()}},initBoundaries:function(){var element=this.element[0],o=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};$.extend(o,{axis:o.axis||(element.offsetWidth<element.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(o.max,10))?{x:parseInt(o.max,10),y:parseInt(o.max,10)}:({x:o.max&&o.max.x||100,y:o.max&&o.max.y||100}),min:!isNaN(parseInt(o.min,10))?{x:parseInt(o.min,10),y:parseInt(o.min,10)}:({x:o.min&&o.min.x||0,y:o.min&&o.min.y||0})});o.realMax={x:o.max.x-o.min.x,y:o.max.y-o.min.y};o.stepping={x:o.stepping&&o.stepping.x||parseInt(o.stepping,10)||(o.steps?o.realMax.x/(o.steps.x||parseInt(o.steps,10)||o.realMax.x):0),y:o.stepping&&o.stepping.y||parseInt(o.stepping,10)||(o.steps?o.realMax.y/(o.steps.y||parseInt(o.steps,10)||o.realMax.y):0)}},keydown:function(keyCode,handle){if(/(37|38|39|40)/.test(keyCode)){this.moveTo({x:/(37|39)/.test(keyCode)?(keyCode==37?"-":"+")+"="+this.oneStep("x"):0,y:/(38|40)/.test(keyCode)?(keyCode==38?"-":"+")+"="+this.oneStep("y"):0},handle)}},focus:function(handle,hard){this.currentHandle=$(handle).addClass("ui-slider-handle-active");if(hard){this.currentHandle.parent()[0].focus()}},blur:function(handle){$(handle).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==handle){this.previousHandle=this.currentHandle;this.currentHandle=null}},click:function(e){var pointer=[e.pageX,e.pageY];var clickedHandle=false;this.handle.each(function(){if(this==e.target){clickedHandle=true}});if(clickedHandle||this.options.disabled||!(this.currentHandle||this.previousHandle)){return}if(!this.currentHandle&&this.previousHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.moveTo({y:this.convertValue(e.pageY-this.offset.top-this.currentHandle[0].offsetHeight/2,"y"),x:this.convertValue(e.pageX-this.offset.left-this.currentHandle[0].offsetWidth/2,"x")},null,!this.options.distance)},createRange:function(){if(this.rangeElement){return}this.rangeElement=$("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this.updateRange()},removeRange:function(){this.rangeElement.remove();this.rangeElement=null},updateRange:function(){var prop=this.options.axis=="vertical"?"top":"left";var size=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(prop,(parseInt($(this.handle[0]).css(prop),10)||0)+this.handleSize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeElement.css(size,(parseInt($(this.handle[1]).css(prop),10)||0)-(parseInt($(this.handle[0]).css(prop),10)||0))},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10),this.options.axis=="vertical"?"y":"x"):null},handleIndex:function(){return this.handle.index(this.currentHandle[0])},value:function(handle,axis){if(this.handle.length==1){this.currentHandle=this.handle}if(!axis){axis=this.options.axis=="vertical"?"y":"x"}var curHandle=$(handle!=undefined&&handle!==null?this.handle[handle]||handle:this.currentHandle);if(curHandle.data("mouse").sliderValue){return parseInt(curHandle.data("mouse").sliderValue[axis],10)}else{return parseInt(((parseInt(curHandle.css(axis=="x"?"left":"top"),10)/(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(handle,axis)))*this.options.realMax[axis])+this.options.min[axis],10)}},convertValue:function(value,axis){return this.options.min[axis]+(value/(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis)))*this.options.realMax[axis]},translateValue:function(value,axis){return((value-this.options.min[axis])/this.options.realMax[axis])*(this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis))},translateRange:function(value,axis){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&value>=this.translateValue(this.value(1),axis)){value=this.translateValue(this.value(1,axis)-this.oneStep(axis),axis)}if(this.currentHandle[0]==this.handle[1]&&value<=this.translateValue(this.value(0),axis)){value=this.translateValue(this.value(0,axis)+this.oneStep(axis),axis)}}if(this.options.handles){var handle=this.options.handles[this.handleIndex()];if(value<this.translateValue(handle.min,axis)){value=this.translateValue(handle.min,axis)}else{if(value>this.translateValue(handle.max,axis)){value=this.translateValue(handle.max,axis)}}}return value},translateLimits:function(value,axis){if(value>=this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis)){value=this.actualSize[axis=="x"?"width":"height"]-this.handleSize(null,axis)}if(value<=0){value=0}return value},handleSize:function(handle,axis){return $(handle!=undefined&&handle!==null?this.handle[handle]:this.currentHandle)[0]["offset"+(axis=="x"?"Width":"Height")]},oneStep:function(axis){return this.options.stepping[axis]||1},start:function(e,handle){var o=this.options;if(o.disabled){return false}this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(!this.currentHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:e.pageY-this.handleOffset.top,left:e.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate("start",e);this.drag(e,handle);return true},stop:function(e){this.propagate("stop",e);if(this.firstValue!=this.value()){this.propagate("change",e)}this.focus(this.currentHandle,true);return false},drag:function(e,handle){var o=this.options;var position={top:e.pageY-this.offset.top-this.clickOffset.top,left:e.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this.focus(this.previousHandle,true)}position.left=this.translateLimits(position.left,"x");position.top=this.translateLimits(position.top,"y");if(o.stepping.x){var value=this.convertValue(position.left,"x");value=Math.round(value/o.stepping.x)*o.stepping.x;position.left=this.translateValue(value,"x")}if(o.stepping.y){var value=this.convertValue(position.top,"y");value=Math.round(value/o.stepping.y)*o.stepping.y;position.top=this.translateValue(value,"y")}position.left=this.translateRange(position.left,"x");position.top=this.translateRange(position.top,"y");if(o.axis!="vertical"){this.currentHandle.css({left:position.left})}if(o.axis!="horizontal"){this.currentHandle.css({top:position.top})}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(position.left,"x"))||0,y:Math.round(this.convertValue(position.top,"y"))||0};if(this.rangeElement){this.updateRange()}this.propagate("slide",e);return false},moveTo:function(value,handle,noPropagation){var o=this.options;this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};if(handle==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(handle==undefined&&!this.currentHandle){handle=0}if(handle!=undefined){this.currentHandle=this.previousHandle=$(this.handle[handle]||handle)}if(value.x!==undefined&&value.y!==undefined){var x=value.x,y=value.y}else{var x=value,y=value}if(x!==undefined&&x.constructor!=Number){var me=/^\-\=/.test(x),pe=/^\+\=/.test(x);if(me||pe){x=isNaN(this.value(null,"x"))?0:this.value(null,"x")+parseInt(x.replace(me?"=":"+=",""),10)}else{x=isNaN(parseInt(x,10))?undefined:parseInt(x,10)}}if(y!==undefined&&y.constructor!=Number){var me=/^\-\=/.test(y),pe=/^\+\=/.test(y);if(me||pe){y=isNaN(this.value(null,"y"))?0:this.value(null,"y")+parseInt(y.replace(me?"=":"+=",""),10)}else{y=isNaN(parseInt(y,10))?undefined:parseInt(y,10)}}if(o.axis!="vertical"&&x!==undefined){if(o.stepping.x){x=Math.round(x/o.stepping.x)*o.stepping.x}x=this.translateValue(x,"x");x=this.translateLimits(x,"x");x=this.translateRange(x,"x");if(!isNaN(x)){o.animate?this.currentHandle.stop().animate({left:x},(Math.abs(parseInt(this.currentHandle.css("left"))-x))*(!isNaN(parseInt(o.animate))?o.animate:5)):this.currentHandle.css({left:x})}}if(o.axis!="horizontal"&&y!==undefined){if(o.stepping.y){y=Math.round(y/o.stepping.y)*o.stepping.y}y=this.translateValue(y,"y");y=this.translateLimits(y,"y");y=this.translateRange(y,"y");if(!isNaN(y)){o.animate?this.currentHandle.stop().animate({top:y},(Math.abs(parseInt(this.currentHandle.css("top"))-y))*(!isNaN(parseInt(o.animate))?o.animate:5)):this.currentHandle.css({top:y})}}if(this.rangeElement){this.updateRange()}this.currentHandle.data("mouse").sliderValue={x:Math.round(this.convertValue(x,"x"))||0,y:Math.round(this.convertValue(y,"y"))||0};if(!noPropagation){this.propagate("start",null);this.propagate("stop",null);this.propagate("change",null);this.propagate("slide",null)}}});$.ui.slider.getter="value";$.ui.slider.defaults={handle:".ui-slider-handle",distance:1,animate:false}})(jQuery);


(function(A){A.widget("ui.tabs",{init:function(){this.options.event+=".tabs";this.tabify(true)},setData:function(B,C){if((/^selected/).test(B)){this.select(C)}else{this.options[B]=C;this.tabify()}},length:function(){return this.$tabs.length},tabId:function(B){return B.title&&B.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+A.data(B)},ui:function(C,B){return{options:this.options,tab:C,panel:B,index:this.$tabs.index(C)}},tabify:function(O){this.$lis=A("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return A("a",this)[0]});this.$panels=A([]);var P=this,D=this.options;this.$tabs.each(function(R,Q){if(Q.hash&&Q.hash.replace("#","")){P.$panels=P.$panels.add(Q.hash)}else{if(A(Q).attr("href")!="#"){A.data(Q,"href.tabs",Q.href);A.data(Q,"load.tabs",Q.href);var T=P.tabId(Q);Q.href="#"+T;var S=A("#"+T);if(!S.length){S=A(D.panelTemplate).attr("id",T).addClass(D.panelClass).insertAfter(P.$panels[R-1]||P.element);S.data("destroy.tabs",true)}P.$panels=P.$panels.add(S)}else{D.disabled.push(R+1)}}});if(O){this.element.addClass(D.navClass);this.$panels.each(function(){var Q=A(this);Q.addClass(D.panelClass)});if(D.selected===undefined){if(location.hash){this.$tabs.each(function(S,Q){if(Q.hash==location.hash){D.selected=S;if(A.browser.msie||A.browser.opera){var R=A(location.hash),T=R.attr("id");R.attr("id","");setTimeout(function(){R.attr("id",T)},500)}scrollTo(0,0);return false}})}else{if(D.cookie){var J=parseInt(A.cookie("ui-tabs"+A.data(P.element)),10);if(J&&P.$tabs[J]){D.selected=J}}else{if(P.$lis.filter("."+D.selectedClass).length){D.selected=P.$lis.index(P.$lis.filter("."+D.selectedClass)[0])}}}}D.selected=D.selected===null||D.selected!==undefined?D.selected:0;D.disabled=A.unique(D.disabled.concat(A.map(this.$lis.filter("."+D.disabledClass),function(R,Q){return P.$lis.index(R)}))).sort();if(A.inArray(D.selected,D.disabled)!=-1){D.disabled.splice(A.inArray(D.selected,D.disabled),1)}this.$panels.addClass(D.hideClass);this.$lis.removeClass(D.selectedClass);if(D.selected!==null){this.$panels.eq(D.selected).show().removeClass(D.hideClass);this.$lis.eq(D.selected).addClass(D.selectedClass);var K=function(){A(P.element).triggerHandler("tabsshow",[P.fakeEvent("tabsshow"),P.ui(P.$tabs[D.selected],P.$panels[D.selected])],D.show)};if(A.data(this.$tabs[D.selected],"load.tabs")){this.load(D.selected,K)}else{K()}}A(window).bind("unload",function(){P.$tabs.unbind(".tabs");P.$lis=P.$tabs=P.$panels=null})}for(var G=0,N;N=this.$lis[G];G++){A(N)[A.inArray(G,D.disabled)!=-1&&!A(N).hasClass(D.selectedClass)?"addClass":"removeClass"](D.disabledClass)}if(D.cache===false){this.$tabs.removeData("cache.tabs")}var C,I,B={"min-width":0,duration:1},E="normal";if(D.fx&&D.fx.constructor==Array){C=D.fx[0]||B,I=D.fx[1]||B}else{C=I=D.fx||B}var H={display:"",overflow:"",height:""};if(!A.browser.msie){H.opacity=""}function M(R,Q,S){Q.animate(C,C.duration||E,function(){Q.addClass(D.hideClass).css(H);if(A.browser.msie&&C.opacity){Q[0].style.filter=""}if(S){L(R,S,Q)}})}function L(R,S,Q){if(I===B){S.css("display","block")}S.animate(I,I.duration||E,function(){S.removeClass(D.hideClass).css(H);if(A.browser.msie&&I.opacity){S[0].style.filter=""}A(P.element).triggerHandler("tabsshow",[P.fakeEvent("tabsshow"),P.ui(R,S[0])],D.show)})}function F(R,T,Q,S){T.addClass(D.selectedClass).siblings().removeClass(D.selectedClass);M(R,Q,S)}this.$tabs.unbind(".tabs").bind(D.event,function(){var T=A(this).parents("li:eq(0)"),Q=P.$panels.filter(":visible"),S=A(this.hash);if((T.hasClass(D.selectedClass)&&!D.unselect)||T.hasClass(D.disabledClass)||A(this).hasClass(D.loadingClass)||A(P.element).triggerHandler("tabsselect",[P.fakeEvent("tabsselect"),P.ui(this,S[0])],D.select)===false){this.blur();return false}P.options.selected=P.$tabs.index(this);if(D.unselect){if(T.hasClass(D.selectedClass)){P.options.selected=null;T.removeClass(D.selectedClass);P.$panels.stop();M(this,Q);this.blur();return false}else{if(!Q.length){P.$panels.stop();var R=this;P.load(P.$tabs.index(this),function(){T.addClass(D.selectedClass).addClass(D.unselectClass);L(R,S)});this.blur();return false}}}if(D.cookie){A.cookie("ui-tabs"+A.data(P.element),P.options.selected,D.cookie)}P.$panels.stop();if(S.length){var R=this;P.load(P.$tabs.index(this),Q.length?function(){F(R,T,Q,S)}:function(){T.addClass(D.selectedClass);L(R,S)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(A.browser.msie){this.blur()}return false});if(!(/^click/).test(D.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(E,D,C){if(C==undefined){C=this.$tabs.length}var G=this.options;var I=A(G.tabTemplate.replace(/#\{href\}/g,E).replace(/#\{label\}/g,D));I.data("destroy.tabs",true);var H=E.indexOf("#")==0?E.replace("#",""):this.tabId(A("a:first-child",I)[0]);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).addClass(G.hideClass).data("destroy.tabs",true)}F.addClass(G.panelClass);if(C>=this.$lis.length){I.appendTo(this.element);F.appendTo(this.element[0].parentNode)}else{I.insertBefore(this.$lis[C]);F.insertBefore(this.$panels[C])}G.disabled=A.map(G.disabled,function(K,J){return K>=C?++K:K});this.tabify();if(this.$tabs.length==1){I.addClass(G.selectedClass);F.removeClass(G.hideClass);var B=A.data(this.$tabs[0],"load.tabs");if(B){this.load(C,B)}}this.element.triggerHandler("tabsadd",[this.fakeEvent("tabsadd"),this.ui(this.$tabs[C],this.$panels[C])],G.add)},remove:function(B){var D=this.options,E=this.$lis.eq(B).remove(),C=this.$panels.eq(B).remove();if(E.hasClass(D.selectedClass)&&this.$tabs.length>1){this.select(B+(B+1<this.$tabs.length?1:-1))}D.disabled=A.map(A.grep(D.disabled,function(G,F){return G!=B}),function(G,F){return G>=B?--G:G});this.tabify();this.element.triggerHandler("tabsremove",[this.fakeEvent("tabsremove"),this.ui(E.find("a")[0],C[0])],D.remove)},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }var D=this.$lis.eq(B).removeClass(C.disabledClass);if(A.browser.safari){D.css("display","inline-block");setTimeout(function(){D.css("display","block")},0)}C.disabled=A.grep(C.disabled,function(F,E){return F!=B});this.element.triggerHandler("tabsenable",[this.fakeEvent("tabsenable"),this.ui(this.$tabs[B],this.$panels[B])],C.enable)},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.$lis.eq(C).addClass(D.disabledClass);D.disabled.push(C);D.disabled.sort();this.element.triggerHandler("tabsdisable",[this.fakeEvent("tabsdisable"),this.ui(this.$tabs[C],this.$panels[C])],D.disable)}},select:function(B){if(typeof B=="string"){B=this.$tabs.index(this.$tabs.filter("[href$="+B+"]")[0])}this.$tabs.eq(B).trigger(this.options.event)},load:function(G,K){var L=this,D=this.options,E=this.$tabs.eq(G),J=E[0],H=K==undefined||K===false,B=E.data("load.tabs");K=K||function(){};if(!B||!H&&A.data(J,"cache.tabs")){K();return }var M=function(N){var O=A(N),P=O.find("*:last");return P.length&&P.is(":not(img)")&&P||O};var C=function(){L.$tabs.filter("."+D.loadingClass).removeClass(D.loadingClass).each(function(){if(D.spinner){M(this).parent().html(M(this).data("label.tabs"))}});L.xhr=null};if(D.spinner){var I=M(J).html();M(J).wrapInner("<em></em>").find("em").data("label.tabs",I).html(D.spinner)}var F=A.extend({},D.ajaxOptions,{url:B,success:function(O,N){A(J.hash).html(O);C();if(D.cache){A.data(J,"cache.tabs",true)}A(L.element).triggerHandler("tabsload",[L.fakeEvent("tabsload"),L.ui(L.$tabs[G],L.$panels[G])],D.load);D.ajaxOptions.success&&D.ajaxOptions.success(O,N);K()}});if(this.xhr){this.xhr.abort();C()}E.addClass(D.loadingClass);setTimeout(function(){L.xhr=A.ajax(F)},0)},url:function(C,B){this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs",B)},destroy:function(){var B=this.options;this.element.unbind(".tabs").removeClass(B.navClass).removeData("tabs");this.$tabs.each(function(){var C=A.data(this,"href.tabs");if(C){this.href=C}var D=A(this).unbind(".tabs");A.each(["href","load","cache"],function(E,F){D.removeData(F+".tabs")})});this.$lis.add(this.$panels).each(function(){if(A.data(this,"destroy.tabs")){A(this).remove()}else{A(this).removeClass([B.selectedClass,B.unselectClass,B.disabledClass,B.panelClass,B.hideClass].join(" "))}})},fakeEvent:function(B){return A.event.fix({type:B,target:this.element[0]})}});A.ui.tabs.defaults={unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};A.ui.tabs.getter="length";A.extend(A.ui.tabs.prototype,{rotation:null,rotate:function(C,F){F=F||false;var B=this,E=this.options.selected;function G(){B.rotation=setInterval(function(){E=++E<B.$tabs.length?E:0;B.select(E)},C)}function D(H){if(!H||H.clientX){clearInterval(B.rotation)}}if(C){G();if(!F){this.$tabs.bind(this.options.event,D)}else{this.$tabs.bind(this.options.event,function(){D();E=B.options.selected;G()})}}else{D();this.$tabs.unbind(this.options.event,D)}}})})(jQuery)

/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version: 2.30 (02-NOV-2008)
 * 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}(';(4($){8 q=\'2.30\';8 r=$.25.26&&/37 6.0/.1u(38.39);4 1n(){7(27.28&&27.28.1n)27.28.1n(\'[B] \'+3a.3b.3c.3d(2x,\'\'))};$.E.B=4(n){8 o=2x[1];O x.1s(4(){7(n===3e||n===P)n={};7(n.29==2y){3f(n){2a\'3g\':7(x.S)1v(x.S);x.S=0;$(x).1F(\'B.1M\',\'\');O;2a\'2b\':x.1g=1;O;2a\'2z\':x.1g=0;7(o===2c){n=$(x).1F(\'B.1M\');7(!n){1n(\'2A 1o 2B, 2C 1o 2z\');O}7(x.S){1v(x.S);x.S=0}1j(n.1N,n,1,1)}O;3h:n={1p:n}}}Q 7(n.29==3i){8 d=n;n=$(x).1F(\'B.1M\');7(!n){1n(\'2A 1o 2B, 2C 1o 1O 2D\');O}7(d<0||d>=n.1N.L){1n(\'3j 2D 1G: \'+d);O}n.N=d;7(x.S){1v(x.S);x.S=0}1j(n.1N,n,1,d>=n.1b);O}7(x.S)1v(x.S);x.S=0;x.1g=0;8 e=$(x);8 f=n.2d?$(n.2d,x):e.3k();8 g=f.3l();7(g.L<2){1n(\'3m; 3n 3o 3p: \'+g.L);O}8 h=$.3q({},$.E.B.2E,n||{},$.2F?e.2F():$.3r?e.1F():{});7(h.2e)h.2f=h.2g||g.L;e.1F(\'B.1M\',h);h.1w=x;h.1N=g;h.H=h.H?[h.H]:[];h.1k=h.1k?[h.1k]:[];h.1k.1P(4(){h.2h=0});7(h.1x)h.1k.J(4(){1j(g,h,0,!h.1y)});7(r&&h.1Q&&!h.2G)2i(f);8 j=x.3s;h.D=T((j.1H(/w:(\\d+)/)||[])[1])||h.D;h.C=T((j.1H(/h:(\\d+)/)||[])[1])||h.C;h.W=T((j.1H(/t:(\\d+)/)||[])[1])||h.W;7(e.u(\'1R\')==\'3t\')e.u(\'1R\',\'3u\');7(h.D)e.D(h.D);7(h.C&&h.C!=\'1S\')e.C(h.C);7(h.18)h.18=T(h.18);7(h.1l){h.1q=[];1I(8 i=0;i<g.L;i++)h.1q.J(i);h.1q.3v(4(a,b){O 3w.1l()-0.5});h.Z=0;h.18=h.1q[0]}Q 7(h.18>=g.L)h.18=0;8 k=h.18||0;f.u({1R:\'2H\',y:0,9:0}).U().1s(4(i){8 z=k?i>=k?g.L-(i-k):k-i:g.L-i;$(x).u(\'z-1G\',z)});$(g[k]).u(\'1h\',1).V();7($.25.26)g[k].2I.2J(\'2j\');7(h.1m&&h.D)f.D(h.D);7(h.1m&&h.C&&h.C!=\'1S\')f.C(h.C);7(h.2b)e.2K(4(){x.1g=1},4(){x.1g=0});8 l=$.E.B.M[h.1p];7($.2L(l))l(e,f,h);Q 7(h.1p!=\'2k\')1n(\'3x 3y: \'+h.1p);f.1s(4(){8 a=$(x);x.11=(h.1m&&h.C)?h.C:a.C();x.12=(h.1m&&h.D)?h.D:a.D()});h.A=h.A||{};h.I=h.I||{};h.G=h.G||{};f.1o(\':2l(\'+k+\')\').u(h.A);7(h.1f)$(f[k]).u(h.1f);7(h.W){h.W=T(h.W);7(h.19.29==2y)h.19=$.1p.3z[h.19]||T(h.19);7(!h.1T)h.19=h.19/2;3A((h.W-h.19)<3B)h.W+=h.19}7(h.2m)h.1U=h.1V=h.2m;7(!h.1z)h.1z=h.19;7(!h.1J)h.1J=h.19;h.2M=g.L;h.1b=k;7(h.1l){h.N=h.1b;7(++h.Z==g.L)h.Z=0;h.N=h.1q[h.Z]}Q h.N=h.18>=(g.L-1)?0:h.18+1;8 m=f[k];7(h.H.L)h.H[0].1W(m,[m,m,h,2c]);7(h.1k.L>1)h.1k[1].1W(m,[m,m,h,2c]);7(h.1K&&!h.1a)h.1a=h.1K;7(h.1a)$(h.1a).2n(\'1K\',4(){O 1O(g,h,h.1y?-1:1)});7(h.2o)$(h.2o).2n(\'1K\',4(){O 1O(g,h,h.1y?1:-1)});7(h.1r)2N(g,h);h.3C=4(a,b){8 c=$(a),s=c[0];7(!h.2g)h.2f++;g[b?\'1P\':\'J\'](s);7(h.1c)h.1c[b?\'1P\':\'J\'](s);h.2M=g.L;c.u(\'1R\',\'2H\');c[b?\'3D\':\'2O\'](e);7(b){h.1b++;h.N++}7(r&&h.1Q&&!h.2G)2i(c);7(h.1m&&h.D)c.D(h.D);7(h.1m&&h.C&&h.C!=\'1S\')f.C(h.C);s.11=(h.1m&&h.C)?h.C:c.C();s.12=(h.1m&&h.D)?h.D:c.D();c.u(h.A);7(h.1r)$.E.B.2p(g.L-1,s,$(h.1r),g,h);7(1X h.X==\'4\')h.X(c)};7(h.W||h.1x)x.S=1Y(4(){1j(g,h,0,!h.1y)},h.1x?10:h.W+(h.2P||0))})};4 1j(a,b,c,d){7(b.2h)O;8 p=b.1w,1A=a[b.1b],1a=a[b.N];7(p.S===0&&!c)O;7(!c&&!p.1g&&((b.2e&&(--b.2f<=0))||(b.1Z&&!b.1l&&b.N<b.1b))){7(b.2q)b.2q(b);O}7(c||!p.1g){7(b.H.L)$.1s(b.H,4(i,o){o.1W(1a,[1A,1a,b,d])});8 e=4(){7($.25.26&&b.1Q)x.2I.2J(\'2j\');$.1s(b.1k,4(i,o){o.1W(1a,[1A,1a,b,d])})};7(b.N!=b.1b){b.2h=1;7(b.20)b.20(1A,1a,b,e,d);Q 7($.2L($.E.B[b.1p]))$.E.B[b.1p](1A,1a,b,e);Q $.E.B.2k(1A,1a,b,e,c&&b.2Q)}7(b.1l){b.1b=b.N;7(++b.Z==a.L)b.Z=0;b.N=b.1q[b.Z]}Q{8 f=(b.N+1)==a.L;b.N=f?0:b.N+1;b.1b=f?a.L-1:b.N-1}7(b.1r)$.E.B.2r(b.1r,b.1b)}7(b.W&&!b.1x)p.S=1Y(4(){1j(a,b,0,!b.1y)},b.W);Q 7(b.1x&&p.1g)p.S=1Y(4(){1j(a,b,0,!b.1y)},10)};$.E.B.2r=4(a,b){$(a).3E(\'a\').3F(\'2R\').2j(\'a:2l(\'+b+\')\').3G(\'2R\')};4 1O(a,b,c){8 p=b.1w,W=p.S;7(W){1v(W);p.S=0}7(b.1l&&c<0){b.Z--;7(--b.Z==-2)b.Z=a.L-2;Q 7(b.Z==-1)b.Z=a.L-1;b.N=b.1q[b.Z]}Q 7(b.1l){7(++b.Z==a.L)b.Z=0;b.N=b.1q[b.Z]}Q{b.N=b.1b+c;7(b.N<0){7(b.1Z)O 21;b.N=a.L-1}Q 7(b.N>=a.L){7(b.1Z)O 21;b.N=0}}7(b.22&&1X b.22==\'4\')b.22(c>0,b.N,a[b.N]);1j(a,b,1,c>=0);O 21};4 2N(a,b){8 c=$(b.1r);$.1s(a,4(i,o){$.E.B.2p(i,o,c,a,b)});$.E.B.2r(b.1r,b.18)};$.E.B.2p=4(i,a,b,c,d){8 e=(1X d.2s==\'4\')?$(d.2s(i,a)):$(\'<a 3H="#">\'+(i+1)+\'</a>\');7(e.3I(\'3J\').L==0)e.2O(b);e.2n(d.2S,4(){d.N=i;8 p=d.1w,W=p.S;7(W){1v(W);p.S=0}7(1X d.2t==\'4\')d.2t(d.N,c[d.N]);1j(c,d,1,d.1b<i);O 21});7(d.2T)e.2K(4(){d.1w.1g=1},4(){d.1w.1g=0})};4 2i(b){4 23(s){8 s=T(s).3K(16);O s.L<2?\'0\'+s:s};4 2U(e){1I(;e&&e.3L.3M()!=\'3N\';e=e.3O){8 v=$.u(e,\'2V-2W\');7(v.3P(\'3Q\')>=0){8 a=v.1H(/\\d+/g);O\'#\'+23(a[0])+23(a[1])+23(a[2])}7(v&&v!=\'3R\')O v}O\'#3S\'};b.1s(4(){$(x).u(\'2V-2W\',2U(x))})};$.E.B.2k=4(a,b,c,d,e){8 f=$(a),$n=$(b);$n.u(c.A);8 g=e?1:c.1z;8 h=e?1:c.1J;8 i=e?P:c.1U;8 j=e?P:c.1V;8 k=4(){$n.24(c.I,g,i,d)};f.24(c.G,h,j,4(){7(c.K)f.u(c.K);7(!c.1T)k()});7(c.1T)k()};$.E.B.M={2X:4(b,c,d){c.1o(\':2l(\'+d.18+\')\').u(\'1h\',0);d.H.J(4(){$(x).V()});d.I={1h:1};d.G={1h:0};d.A={1h:0};d.K={R:\'Y\'};d.X=4(a){a.U()}}};$.E.B.3T=4(){O q};$.E.B.2E={1p:\'2X\',W:3U,1x:0,19:3V,1z:P,1J:P,1a:P,2o:P,22:P,1r:P,2t:P,2S:\'1K\',2s:P,H:P,1k:P,2q:P,2m:P,1U:P,1V:P,1L:P,I:P,G:P,A:P,K:P,20:P,C:\'1S\',18:0,1T:1,1l:0,1m:0,2b:0,2T:0,2e:0,2g:0,2P:0,2d:P,1Q:0,1Z:0,2Q:0}})(2Y);(4($){$.E.B.M.3W=4(d,e,f){d.u(\'17\',\'1d\');f.H.J(4(a,b,c){$(x).V();c.A.y=b.1B;c.G.y=0-a.1B});f.1f={y:0};f.I={y:0};f.K={R:\'Y\'}};$.E.B.M.3X=4(d,e,f){d.u(\'17\',\'1d\');f.H.J(4(a,b,c){$(x).V();c.A.y=0-b.1B;c.G.y=a.1B});f.1f={y:0};f.I={y:0};f.K={R:\'Y\'}};$.E.B.M.3Y=4(d,e,f){d.u(\'17\',\'1d\');f.H.J(4(a,b,c){$(x).V();c.A.9=b.1C;c.G.9=0-a.1C});f.1f={9:0};f.I={9:0}};$.E.B.M.3Z=4(d,e,f){d.u(\'17\',\'1d\');f.H.J(4(a,b,c){$(x).V();c.A.9=0-b.1C;c.G.9=a.1C});f.1f={9:0};f.I={9:0}};$.E.B.M.40=4(f,g,h){f.u(\'17\',\'1d\').D();h.H.J(4(a,b,c,d){$(x).V();8 e=a.1C,2u=b.1C;c.A=d?{9:2u}:{9:-2u};c.I.9=0;c.G.9=d?-e:e;g.1o(a).u(c.A)});h.1f={9:0};h.K={R:\'Y\'}};$.E.B.M.41=4(f,g,h){f.u(\'17\',\'1d\');h.H.J(4(a,b,c,d){$(x).V();8 e=a.1B,2v=b.1B;c.A=d?{y:-2v}:{y:2v};c.I.y=0;c.G.y=d?e:-e;g.1o(a).u(c.A)});h.1f={y:0};h.K={R:\'Y\'}};$.E.B.M.42=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.X=4(a){a.U()};f.A={F:2};f.I={D:\'V\'};f.G={D:\'U\'}};$.E.B.M.43=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.X=4(a){a.U()};f.A={F:2};f.I={C:\'V\'};f.G={C:\'U\'}};$.E.B.M.1L=4(g,h,j){8 w=g.u(\'17\',\'2Z\').D();h.u({9:0,y:0});j.H.J(4(){$(x).V()});j.19=j.19/2;j.1l=0;j.1L=j.1L||{9:-w,y:15};j.1c=[];1I(8 i=0;i<h.L;i++)j.1c.J(h[i]);1I(8 i=0;i<j.18;i++)j.1c.J(j.1c.31());j.20=4(a,b,c,d,e){8 f=e?$(a):$(b);f.24(c.1L,c.1z,c.1U,4(){e?c.1c.J(c.1c.31()):c.1c.1P(c.1c.44());7(e)1I(8 i=0,2w=c.1c.L;i<2w;i++)$(c.1c[i]).u(\'z-1G\',2w-i);Q{8 z=$(a).u(\'z-1G\');f.u(\'z-1G\',T(z)+1)}f.24({9:0,y:0},c.1J,c.1V,4(){$(e?x:a).U();7(d)d()})})};j.X=4(a){a.U()}};$.E.B.M.45=4(d,e,f){f.H.J(4(a,b,c){$(x).V();c.A.y=b.11;c.I.C=b.11});f.X=4(a){a.U()};f.1f={y:0};f.A={C:0};f.I={y:0};f.G={C:0};f.K={R:\'Y\'}};$.E.B.M.46=4(d,e,f){f.H.J(4(a,b,c){$(x).V();c.I.C=b.11;c.G.y=a.11});f.X=4(a){a.U()};f.1f={y:0};f.A={y:0,C:0};f.G={C:0};f.K={R:\'Y\'}};$.E.B.M.47=4(d,e,f){f.H.J(4(a,b,c){$(x).V();c.A.9=b.12;c.I.D=b.12});f.X=4(a){a.U()};f.A={D:0};f.I={9:0};f.G={D:0};f.K={R:\'Y\'}};$.E.B.M.48=4(d,e,f){f.H.J(4(a,b,c){$(x).V();c.I.D=b.12;c.G.9=a.12});f.X=4(a){a.U()};f.A={9:0,D:0};f.I={9:0};f.G={D:0};f.K={R:\'Y\'}};$.E.B.M.32=4(d,e,f){f.1f={y:0,9:0};f.K={R:\'Y\'};f.H.J(4(a,b,c){$(x).V();c.A={D:0,C:0,y:b.11/2,9:b.12/2};c.K={R:\'Y\'};c.I={y:0,9:0,D:b.12,C:b.11};c.G={D:0,C:0,y:a.11/2,9:a.12/2};$(a).u(\'F\',2);$(b).u(\'F\',1)});f.X=4(a){a.U()}};$.E.B.M.49=4(d,e,f){f.H.J(4(a,b,c){c.A={D:0,C:0,1h:1,9:b.12/2,y:b.11/2,F:1};c.I={y:0,9:0,D:b.12,C:b.11}});f.G={1h:0};f.K={F:0}};$.E.B.M.4a=4(d,e,f){8 w=d.u(\'17\',\'1d\').D();e.V();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.A={9:w,F:2};f.K={F:1};f.I={9:0};f.G={9:w}};$.E.B.M.4b=4(d,e,f){8 h=d.u(\'17\',\'1d\').C();e.V();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.A={y:h,F:2};f.K={F:1};f.I={y:0};f.G={y:h}};$.E.B.M.4c=4(d,e,f){8 h=d.u(\'17\',\'1d\').C();8 w=d.D();e.V();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.A={y:h,9:w,F:2};f.K={F:1};f.I={y:0,9:0};f.G={y:h,9:w}};$.E.B.M.4d=4(d,e,f){f.H.J(4(a,b,c){c.A={9:x.12/2,D:0,F:2};c.I={9:0,D:x.12};c.G={9:0};$(a).u(\'F\',1)});f.X=4(a){a.U().u(\'F\',1)}};$.E.B.M.4e=4(d,e,f){f.H.J(4(a,b,c){c.A={y:x.11/2,C:0,F:2};c.I={y:0,C:x.11};c.G={y:0};$(a).u(\'F\',1)});f.X=4(a){a.U().u(\'F\',1)}};$.E.B.M.4f=4(d,e,f){f.H.J(4(a,b,c){c.A={9:b.12/2,D:0,F:1,R:\'1D\'};c.I={9:0,D:x.12};c.G={9:a.12/2,D:0};$(a).u(\'F\',2)});f.X=4(a){a.U()};f.K={F:1,R:\'Y\'}};$.E.B.M.4g=4(d,e,f){f.H.J(4(a,b,c){c.A={y:b.11/2,C:0,F:1,R:\'1D\'};c.I={y:0,C:x.11};c.G={y:a.11/2,C:0};$(a).u(\'F\',2)});f.X=4(a){a.U()};f.K={F:1,R:\'Y\'}};$.E.B.M.4h=4(e,f,g){8 d=g.33||\'9\';8 w=e.u(\'17\',\'1d\').D();8 h=e.C();g.H.J(4(a,b,c){c.A=c.A||{};c.A.F=2;c.A.R=\'1D\';7(d==\'34\')c.A.9=-w;Q 7(d==\'35\')c.A.y=h;Q 7(d==\'36\')c.A.y=-h;Q c.A.9=w;$(a).u(\'F\',1)});7(!g.I)g.I={9:0,y:0};7(!g.G)g.G={9:0,y:0};g.K=g.K||{};g.K.F=2;g.K.R=\'Y\'};$.E.B.M.4i=4(e,f,g){8 d=g.33||\'9\';8 w=e.u(\'17\',\'1d\').D();8 h=e.C();g.H.J(4(a,b,c){c.A.R=\'1D\';7(d==\'34\')c.G.9=w;Q 7(d==\'35\')c.G.y=-h;Q 7(d==\'36\')c.G.y=h;Q c.G.9=-w;$(a).u(\'F\',2);$(b).u(\'F\',1)});g.X=4(a){a.U()};7(!g.I)g.I={9:0,y:0};g.A=g.A||{};g.A.y=0;g.A.9=0;g.K=g.K||{};g.K.F=1;g.K.R=\'Y\'};$.E.B.M.4j=4(d,e,f){8 w=d.u(\'17\',\'2Z\').D();8 h=d.C();f.H.J(4(a,b,c){$(a).u(\'F\',2);c.A.R=\'1D\';7(!c.G.9&&!c.G.y)c.G={9:w*2,y:-h/2,1h:0};Q c.G.1h=0});f.X=4(a){a.U()};f.A={9:0,y:0,F:1,1h:1};f.I={9:0};f.K={F:2,R:\'Y\'}};$.E.B.M.4k=4(o,p,q){8 w=o.u(\'17\',\'1d\').D();8 h=o.C();q.A=q.A||{};8 s;7(q.1i){7(/4l/.1u(q.1i))s=\'1t(1e 1e \'+h+\'14 1e)\';Q 7(/4m/.1u(q.1i))s=\'1t(1e \'+w+\'14 \'+h+\'14 \'+w+\'14)\';Q 7(/4n/.1u(q.1i))s=\'1t(1e \'+w+\'14 1e 1e)\';Q 7(/4o/.1u(q.1i))s=\'1t(\'+h+\'14 \'+w+\'14 \'+h+\'14 1e)\';Q 7(/32/.1u(q.1i)){8 t=T(h/2);8 l=T(w/2);s=\'1t(\'+t+\'14 \'+l+\'14 \'+t+\'14 \'+l+\'14)\'}}q.A.1i=q.A.1i||s||\'1t(1e 1e 1e 1e)\';8 d=q.A.1i.1H(/(\\d+)/g);8 t=T(d[0]),r=T(d[1]),b=T(d[2]),l=T(d[3]);q.H.J(4(g,i,j){7(g==i)O;8 k=$(g).u(\'F\',2);8 m=$(i).u({F:3,R:\'1D\'});8 n=1,1E=T((j.1z/13))-1;4 f(){8 a=t?t-T(n*(t/1E)):0;8 c=l?l-T(n*(l/1E)):0;8 d=b<h?b+T(n*((h-b)/1E||1)):h;8 e=r<w?r+T(n*((w-r)/1E||1)):w;m.u({1i:\'1t(\'+a+\'14 \'+e+\'14 \'+d+\'14 \'+c+\'14)\'});(n++<=1E)?1Y(f,13):k.u(\'R\',\'Y\')}f()});q.K={};q.I={9:0};q.G={9:0}}})(2Y);',62,273,'||||function|||if|var|left|||||||||||||||||||||css|||this|top||cssBefore|cycle|height|width|fn|zIndex|animOut|before|animIn|push|cssAfter|length|transitions|nextSlide|return|null|else|display|cycleTimeout|parseInt|hide|show|timeout|onAddSlide|none|randomIndex||cycleH|cycleW||px|||overflow|startingSlide|speed|next|currSlide|els|hidden|0px|cssFirst|cyclePause|opacity|clip|go|after|random|fit|log|not|fx|randomMap|pager|each|rect|test|clearTimeout|container|continuous|rev|speedIn|curr|offsetHeight|offsetWidth|block|count|data|index|match|for|speedOut|click|shuffle|opts|elements|advance|unshift|cleartype|position|auto|sync|easeIn|easeOut|apply|typeof|setTimeout|nowrap|fxFn|false|prevNextClick|hex|animate|browser|msie|window|console|constructor|case|pause|true|slideExpr|autostop|countdown|autostopCount|busy|clearTypeFix|filter|custom|eq|easing|bind|prev|createPagerAnchor|end|updateActivePagerLink|pagerAnchorBuilder|pagerClick|nextW|nextH|len|arguments|String|resume|options|found|can|slide|defaults|metadata|cleartypeNoBg|absolute|style|removeAttribute|hover|isFunction|slideCount|buildPager|appendTo|delay|fastOnEvent|activeSlide|pagerEvent|pauseOnPagerHover|getBg|background|color|fade|jQuery|visible||shift|zoom|direction|right|up|down|MSIE|navigator|userAgent|Array|prototype|join|call|undefined|switch|stop|default|Number|invalid|children|get|terminating|too|few|slides|extend|meta|className|static|relative|sort|Math|unknown|transition|speeds|while|250|addSlide|prependTo|find|removeClass|addClass|href|parents|body|toString|nodeName|toLowerCase|html|parentNode|indexOf|rgb|transparent|ffffff|ver|4000|1000|scrollUp|scrollDown|scrollLeft|scrollRight|scrollHorz|scrollVert|slideX|slideY|pop|turnUp|turnDown|turnLeft|turnRight|fadeZoom|blindX|blindY|blindZ|growX|growY|curtainX|curtainY|cover|uncover|toss|wipe|l2r|r2l|t2b|b2t'.split('|'),0,{}));


/* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 * Copyright Â© 2008 George McGinley Smith
 * Open source under the BSD License. */
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(e,a,c,b,d){return jQuery.easing[jQuery.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a+c;return-b/2*((--a)*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a+c;return b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a+c;return-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a*a+c;return b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,a,c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return(a==0)?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return(a==d)?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){if(a==0)return c;if(a==d)return c+b;if((a/=d/2)<1)return b/2*Math.pow(2,10*(a-1))+c;return b/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(e,a,c,b,d){return-b*(Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){if((a/=d/2)<1)return-b/2*(Math.sqrt(1-a*a)-1)+c;return b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){var f=1.70158;var g=0;var h=b;if(a==0)return c;if((a/=d)==1)return c+b;if(!g)g=d*.3;if(h<Math.abs(b)){h=b;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(b/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*d-f)*(2*Math.PI)/g))+c},easeOutElastic:function(e,a,c,b,d){var f=1.70158;var g=0;var h=b;if(a==0)return c;if((a/=d)==1)return c+b;if(!g)g=d*.3;if(h<Math.abs(b)){h=b;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(b/h);return h*Math.pow(2,-10*a)*Math.sin((a*d-f)*(2*Math.PI)/g)+b+c},easeInOutElastic:function(e,a,c,b,d){var f=1.70158;var g=0;var h=b;if(a==0)return c;if((a/=d/2)==2)return c+b;if(!g)g=d*(.3*1.5);if(h<Math.abs(b)){h=b;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(b/h);if(a<1)return-.5*(h*Math.pow(2,10*(a-=1))*Math.sin((a*d-f)*(2*Math.PI)/g))+c;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*d-f)*(2*Math.PI)/g)*.5+b+c},easeInBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;if((a/=d/2)<1)return b/2*(a*a*(((f*=(1.525))+1)*a-f))+c;return b/2*((a-=2)*a*(((f*=(1.525))+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-jQuery.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){if((a/=d)<(1/2.75)){return b*(7.5625*a*a)+c}else if(a<(2/2.75)){return b*(7.5625*(a-=(1.5/2.75))*a+.75)+c}else if(a<(2.5/2.75)){return b*(7.5625*(a-=(2.25/2.75))*a+.9375)+c}else{return b*(7.5625*(a-=(2.625/2.75))*a+.984375)+c}},easeInOutBounce:function(e,a,c,b,d){if(a<d/2)return jQuery.easing.easeInBounce(e,a*2,0,b,d)*.5+c;return jQuery.easing.easeOutBounce(e,a*2-d,0,b,d)*.5+b*.5+c}});

/* jQuery truncateText Plugin
   Intelligently truncates the content of the passed element.
   By Livingston Samuel - http://livingstonsamuel.com */
;(function(d){d.fn.truncateText=function(a){var g={length:10,ellipsisText:"...",contentType:'text'};var a=d.extend(g,a);return this.each(function(){var b=d(this);var c=(a.contentType=="text")?b.text():b.html();if(c.length>a.length){var f=c.indexOf(' ',a.length);if(f!="-1"){var e=c.substring(0,f);if(a.contentType=="text"){e+=a.ellipsisText;b.text(e);b.attr({title:c})}else if(a.contentType=="html"){b.html(e);b.append(a.ellipsisText)}}}})}})(jQuery);

/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * $LastChangedDate: 2007-12-14 23:57:10 -0600 (Fri, 14 Dec 2007) $
 * $Rev: 4163 $
 *
 * Version: 3.0
 * 
 * Requires: $ 1.2.2+
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.6.j.4={L:5(){9 b=$.6.j.4.i;7($.8.f)$(2).o(\'y.4\',5(a){$.d(2,\'h\',{x:a.x,l:a.l,s:a.s,r:a.r})});7(2.q)2.q(($.8.f?\'v\':\'4\'),b,n);m 2.w=b},D:5(){9 a=$.6.j.4.i;$(2).k(\'y.4\');7(2.u)2.u(($.8.f?\'v\':\'4\'),a,n);m 2.w=5(){};$.A(2,\'h\')},i:5(a){9 c=U.T.S.P(O,1);a=$.6.N(a||M.6);$.t(a,$.d(2,\'h\')||{});9 b=0,K=J;7(a.e)b=a.e/I;7(a.p)b=-a.p/3;7($.8.H)b=-a.e;a.d=a.d||{};a.G="4";c.z(b);c.z(a);g $.6.F.E(2,c)}};$.Q.t({4:5(a){g a?2.o("4",a):2.R("4")},C:5(a){g 2.k("4",a)}})})(B);',57,57,'||this||mousewheel|function|event|if|browser|var||||data|wheelDelta|mozilla|return|mwcursorposdata|handler|special|unbind|pageY|else|false|bind|detail|addEventListener|clientY|clientX|extend|removeEventListener|DOMMouseScroll|onmousewheel|pageX|mousemove|unshift|removeData|jQuery|unmousewheel|teardown|apply|handle|type|opera|120|true|returnValue|setup|window|fix|arguments|call|fn|trigger|slice|prototype|Array'.split('|'),0,{}));

/* Copyright (c) 2006 Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * See http://kelvinluck.com/assets/jquery/jScrollPane/
 * $Id: jScrollPane.js 4765 2008-02-17 21:14:59Z kelvinluck $
 */

/**
 * Replace the vertical scroll bars on any matched elements with a fancy
 * styleable (via CSS) version. With JS disabled the elements will
 * gracefully degrade to the browsers own implementation of overflow:auto.
 * If the mousewheel plugin has been included on the page then the scrollable areas will also
 * respond to the mouse wheel.
 *
 * @example jQuery(".scroll-pane").jScrollPane();
 *
 * @name jScrollPane
 * @type jQuery
 * @param Object	settings	hash with options, described below.
 *								scrollbarWidth	-	The width of the generated scrollbar in pixels
 *								scrollbarMargin	-	The amount of space to leave on the side of the scrollbar in pixels
 *								wheelSpeed		-	The speed the pane will scroll in response to the mouse wheel in pixels
 *								showArrows		-	Whether to display arrows for the user to scroll with
 *								arrowSize		-	The height of the arrow buttons if showArrows=true
 *								animateTo		-	Whether to animate when calling scrollTo and scrollBy
 *								dragMinHeight	-	The minimum height to allow the drag bar to be
 *								dragMaxHeight	-	The maximum height to allow the drag bar to be
 *								animateInterval	-	The interval in milliseconds to update an animating scrollPane (default 100)
 *								animateStep		-	The amount to divide the remaining scroll distance by when animating (default 3)
 *								maintainPosition-	Whether you want the contents of the scroll pane to maintain it's position when you re-initialise it - so it doesn't scroll as you add more content (default true)
 *								scrollbarOnLeft	-	Display the scrollbar on the left side?  (needs stylesheet changes, see examples.html)
 * @return jQuery
 * @cat Plugins/jScrollPane
 * @author Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 */
jQuery.jScrollPane = {
	active : []
};
jQuery.fn.jScrollPane = function(settings)
{
	settings = jQuery.extend(
		{
			scrollbarWidth : 10,
			scrollbarMargin : 5,
			wheelSpeed : 18,
			showArrows : false,
			arrowSize : 0,
			animateTo : false,
			dragMinHeight : 1,
			dragMaxHeight : 99999,
			animateInterval : 100,
			animateStep: 3,
			maintainPosition: true,
			scrollbarOnLeft: false,
			prefix : "jScroll"
		}, settings
	);

	return this.each(
		function()
		{
			var $this = jQuery(this);
			if (jQuery(this).parent().is('.' + settings.prefix + 'PaneContainer')) {
				var currentScrollPosition = settings.maintainPosition ? $this.offset({relativeTo:jQuery(this).parent()[0]}).top : 0;
				var $c = jQuery(this).parent();
				var paneWidth = $c.innerWidth();
				var paneHeight = $c.outerHeight();
				var trackHeight = paneHeight;
				if ($c.unmousewheel) {
					$c.unmousewheel();
				}
				jQuery('>.' + settings.prefix + 'PaneTrack, >.' + settings.prefix + 'ArrowUp, >.' + settings.prefix + 'ArrowDown', $c).remove();
				$this.css({'top':0});
			} else {
				var currentScrollPosition = 0;
				this.originalPadding = $this.css('paddingTop') + ' ' + $this.css('paddingRight') + ' ' + $this.css('paddingBottom') + ' ' + $this.css('paddingLeft');
				this.originalSidePaddingTotal = (parseInt($this.css('paddingLeft')) || 0) + (parseInt($this.css('paddingRight')) || 0);
				var paneWidth = $this.innerWidth();
				var paneHeight = $this.innerHeight();
				var trackHeight = paneHeight;
				$this.wrap(
					jQuery('<div></div>').attr(
						{'className':settings.prefix+'PaneContainer'}
					).css(
						{
							'height':paneHeight+'px', 
							'width':paneWidth+'px'
						}
					)
				);
				// deal with text size changes (if the jquery.em plugin is included)
				// and re-initialise the scrollPane so the track maintains the
				// correct size
				jQuery(document).bind(
					'emchange', 
					function(e)
					{
						$this.jScrollPane(settings);
					}
				);
			}

			var p = this.originalSidePaddingTotal;
			if (typeof(p) == "undefined") { p = 0 }; // can be undefined in ie7
			var cssWidth = paneWidth - settings.scrollbarWidth - settings.scrollbarMargin - p;
			var cssToApply = {
				'height':'auto',
				'width': cssWidth + 'px'
			}

			if(settings.scrollbarOnLeft) {
				cssToApply.paddingLeft = settings.scrollbarMargin + settings.scrollbarWidth + 'px';
			} else {
				cssToApply.paddingRight = settings.scrollbarMargin + 'px';
			}

      $this.css(cssToApply);
			var contentHeight = $this.outerHeight();
			var percentInView = paneHeight / contentHeight;
			if (percentInView < .99) {
				var $container = $this.parent();
				$container.append(
					jQuery('<div></div>').attr({'className':settings.prefix + 'PaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append(
						jQuery('<div></div>').attr({'className':settings.prefix + 'PaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append(
							jQuery('<div></div>').attr({'className':settings.prefix + 'PaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),
							jQuery('<div></div>').attr({'className':settings.prefix + 'PaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'})
						)
					)
				);
				var $track = jQuery('>.' + settings.prefix + 'PaneTrack', $container);
				var $drag = jQuery('>.' + settings.prefix + 'PaneTrack .' + settings.prefix + 'PaneDrag', $container);
				
				if (settings.showArrows) {
					
					var currentArrowButton;
					var currentArrowDirection;
					var currentArrowInterval;
					var currentArrowInc;
					var whileArrowButtonDown = function()
					{
						if (currentArrowInc > 4 || currentArrowInc%4==0) {
							positionDrag(dragPosition + currentArrowDirection * mouseWheelMultiplier);
						}
						currentArrowInc ++;
					};
					var onArrowMouseUp = function(event)
					{
						jQuery('html').unbind('mouseup', onArrowMouseUp);
						currentArrowButton.removeClass(settings.prefix + 'ActiveArrowButton');
						clearInterval(currentArrowInterval);
						//console.log($(event.target));
						//currentArrowButton.parent().removeClass(settings.prefix + 'ArrowUpClicked ' + settings.prefix + 'ArrowDownClicked');
					};
					var onArrowMouseDown = function() {
						//console.log(direction);
						//currentArrowButton = $(this);
						jQuery('html').bind('mouseup', onArrowMouseUp);
						currentArrowButton.addClass(settings.prefix + 'ActiveArrowButton');
						currentArrowInc = 0;
						whileArrowButtonDown();
						currentArrowInterval = setInterval(whileArrowButtonDown, 100);
					};
					$container
						.append(
							jQuery('<a></a>')
								.attr({'href':'javascript:;', 'className':settings.prefix + 'ArrowUp'})
								.css({'width':settings.scrollbarWidth+'px'})
								.html('Scroll up')
								.bind('mousedown', function()
								{
									currentArrowButton = jQuery(this);
									currentArrowDirection = -1;
									onArrowMouseDown();
									this.blur();
									return false;
								}),
							jQuery('<a></a>')
								.attr({'href':'javascript:;', 'className':settings.prefix + 'ArrowDown'})
								.css({'width':settings.scrollbarWidth+'px'})
								.html('Scroll down')
								.bind('mousedown', function()
								{
									currentArrowButton = jQuery(this);
									currentArrowDirection = 1;
									onArrowMouseDown();
									this.blur();
									return false;
								})
						);
					var $upArrow = jQuery('>.' + settings.prefix + 'ArrowUp', $container);
					var $downArrow = jQuery('>.' + settings.prefix + 'ArrowDown', $container);
					if (settings.arrowSize) {
						trackHeight = paneHeight - settings.arrowSize - settings.arrowSize;
						$track
							.css({'height': trackHeight+'px', top:settings.arrowSize+'px'})
					} else {
						var topArrowHeight = $upArrow.height();
						settings.arrowSize = topArrowHeight;
						trackHeight = paneHeight - topArrowHeight - $downArrow.height();
						$track
							.css({'height': trackHeight+'px', top:topArrowHeight+'px'})
					}
				}
				
				var $pane = jQuery(this).css({'position':'absolute', 'overflow':'visible'});
				
				var currentOffset;
				var maxY;
				var mouseWheelMultiplier;
				// store this in a seperate variable so we can keep track more accurately than just updating the css property..
				var dragPosition = 0;
				var dragMiddle = percentInView*paneHeight/2;
				
				// pos function borrowed from tooltip plugin and adapted...
				var getPos = function (event, c) {
					var p = c == 'X' ? 'Left' : 'Top';
					return event['page' + c] || (event['client' + c] + (document.documentElement['scroll' + p] || document.body['scroll' + p])) || 0;
				};
				
				var ignoreNativeDrag = function() {	return false; };
				
				var initDrag = function()
				{
					ceaseAnimation();
					currentOffset = $drag.offset(false);
					currentOffset.top -= dragPosition;
					maxY = trackHeight - $drag[0].offsetHeight;
					mouseWheelMultiplier = 2 * settings.wheelSpeed * maxY / contentHeight;
				};
				
				var onStartDrag = function(event)
				{
					initDrag();
					dragMiddle = getPos(event, 'Y') - dragPosition - currentOffset.top;
					jQuery('html').bind('mouseup', onStopDrag).bind('mousemove', updateScroll);
					if (jQuery.browser.msie) {
						jQuery('html').bind('dragstart', ignoreNativeDrag).bind('selectstart', ignoreNativeDrag);
					}
					return false;
				};
				var onStopDrag = function()
				{
					jQuery('html').unbind('mouseup', onStopDrag).unbind('mousemove', updateScroll);
					dragMiddle = percentInView*paneHeight/2;
					if (jQuery.browser.msie) {
						jQuery('html').unbind('dragstart', ignoreNativeDrag).unbind('selectstart', ignoreNativeDrag);
					}
				};
				var positionDrag = function(destY)
				{
					destY = destY < 0 ? 0 : (destY > maxY ? maxY : destY);
					dragPosition = destY;
					$drag.css({'top':destY+'px'});
					var p = destY / maxY;
					$pane.css({'top':((paneHeight-contentHeight)*p) + 'px'});
					$this.trigger('scroll');
					if (settings.showArrows) {
						$upArrow[destY == 0 ? 'addClass' : 'removeClass']('disabled');
						$downArrow[destY == maxY ? 'addClass' : 'removeClass']('disabled');
					}
				};
				var updateScroll = function(e)
				{
					positionDrag(getPos(e, 'Y') - currentOffset.top - dragMiddle);
				};
				
				var dragH = Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2), settings.dragMaxHeight), settings.dragMinHeight);
				
				$drag.css(
					{'height':dragH+'px'}
				).bind('mousedown', onStartDrag);
				
				var trackScrollInterval;
				var trackScrollInc;
				var trackScrollMousePos;
				var doTrackScroll = function()
				{
					if (trackScrollInc > 8 || trackScrollInc%4==0) {
						positionDrag((dragPosition - ((dragPosition - trackScrollMousePos) / 2)));
					}
					trackScrollInc ++;
				};
				var onStopTrackClick = function()
				{
					clearInterval(trackScrollInterval);
					jQuery('html').unbind('mouseup', onStopTrackClick).unbind('mousemove', onTrackMouseMove);
				};
				var onTrackMouseMove = function(event)
				{
					trackScrollMousePos = getPos(event, 'Y') - currentOffset.top - dragMiddle;
				};
				var onTrackClick = function(event)
				{
					initDrag();
					onTrackMouseMove(event);
					trackScrollInc = 0;
					jQuery('html').bind('mouseup', onStopTrackClick).bind('mousemove', onTrackMouseMove);
					trackScrollInterval = setInterval(doTrackScroll, 100);
					doTrackScroll();
				};
				
				$track.bind('mousedown', onTrackClick);
				
				// if the mousewheel plugin has been included then also react to the mousewheel
				if ($container.mousewheel) {
					$container.mousewheel(
						function (event, delta) {
							initDrag();
							ceaseAnimation();
							var d = dragPosition;
							positionDrag(dragPosition - delta * mouseWheelMultiplier);
							var dragOccured = d != dragPosition;
							return !dragOccured;
						},
						false
					);					
				}
				var _animateToPosition;
				var _animateToInterval;
				function animateToPosition()
				{
					var diff = (_animateToPosition - dragPosition) / settings.animateStep;
					if (diff > 1 || diff < -1) {
						positionDrag(dragPosition + diff);
					} else {
						positionDrag(_animateToPosition);
						ceaseAnimation();
					}
				}
				var ceaseAnimation = function()
				{
					if (_animateToInterval) {
						clearInterval(_animateToInterval);
						delete _animateToPosition;
					}
				};
				var scrollTo = function(pos, preventAni)
				{
					if (typeof pos == "string") {
						$e = jQuery(pos, this);
						if (!$e.length) return;
						pos = $e.offset().top - $this.offset().top;
					}
					ceaseAnimation();
					var destDragPosition = -pos/(paneHeight-contentHeight) * maxY;
					if (preventAni || !settings.animateTo) {
						positionDrag(destDragPosition);
					} else {
						_animateToPosition = destDragPosition;
						_animateToInterval = setInterval(animateToPosition, settings.animateInterval);
					}
				};
				$this[0].scrollTo = scrollTo;
				
				$this[0].scrollBy = function(delta)
				{
					var currentPos = -parseInt($pane.css('top')) || 0;
					scrollTo(currentPos + delta);
				};
				
				initDrag();
				
				scrollTo(-currentScrollPosition, true);
				
				jQuery.jScrollPane.active.push($this[0]);

			} else {
			  if (typeof(this.originalSidePaddingTotal) == "undefined") { this.originalSidePaddingTotal = 0; }
				$this.css(
					{
						'height':paneHeight+'px',
						'width':paneWidth-this.originalSidePaddingTotal+'px',
						'padding':this.originalPadding
					}
				);
				// remove from active list?
			}
		}
	)
};

// clean up the scrollTo expandos
jQuery(window)
	.bind('unload', function() {
		var els = jQuery.jScrollPane.active; 
		for (var i=0; i<els.length; i++) {
			els[i].scrollTo = els[i].scrollBy = null;
		}
	}
);

/* jQuery custom selectboxes
  Copyright (c) 2008 Krzysztof SuszyÅ„ski (suszynski.org)
  Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
  @version 0.6.1
  @original_author Krzysztof SuszyÅ„ski <k.suszynski@wit.edu.pl>
  @Modifications Livingston Samuel <livingston@thoughtworks.com>, ThoughtWorks

  NOTE: Any item with value "default" will be shown when any option is not selected and will be gone once any of the option is selected
*/
jQuery.fn.selectbox = function(options) {
	var handleSelected = function(e) {
		var classToAdd = ( settings.selectedAction === "highlight")? "selValue listelementhover" : "selValue hidden";
		var classToRemove = ( settings.selectedAction === "highlight")? "selValue listelementhover" : "selValue listelementhover hidden";

		var currentSelectBox = jQuery("div[rel="+ e.attr("rel") +"]");
		jQuery('.selValue', currentSelectBox ).removeClass('selValue');

		var selectedValue = jQuery('.' + settings.className + '-currentItem', currentSelectBox).attr('rel');

		jQuery('.' + settings.className + '-item', currentSelectBox).each(function(){
			var currentVal = jQuery(this).attr('rel');
			if ( currentVal === selectedValue ) {
				if ( selectedValue === "default" ) {
					jQuery(this).remove();
					return;
				}
				jQuery(this).addClass(classToAdd);
			} else
				jQuery(this).removeClass(classToRemove);
		});
	};

  /* Default settings */
  var settings = {
	className: 'jquery-selectbox',
	animationSpeed: "fast",
	listboxMaxSize: 10,
	replaceInvisible: false,
	fixWidth: false,
	  fixHeight: false,
	  numVisibleElements: 5,
	setfirstval: true,
	selectedAction : "hide" //  'hide' / 'highlight'
  };
  var commonClass = 'jquery-custom-selectboxes-replaced';
  var listOpen = false;
  var showList = function(listObj) {
	var selectbox = listObj.parents('.' + settings.className + '');
	listObj.find("span[rel=default]").remove();
	  listObj.slideDown(settings.animationSpeed, function() { listOpen = true });
	selectbox.addClass('selecthover');
	  if (settings.fixHeight)
		listObj.find(".list_wrapper").jScrollPane({showArrows:false});
	jQuery(document).bind('click', onBlurList);
	return listObj;
  };
  var hideList = function(listObj) {
	listObj.slideUp(settings.animationSpeed, function() {
	  listOpen = false;
	  jQuery(this).parents('.' + settings.className + '').removeClass('selecthover');
	  handleSelected(jQuery(this).parents('.' + settings.className + ''));
	});
	jQuery(document).unbind('click', onBlurList);
	return listObj;
  };
  var onBlurList = function(e) {
	var currentListElements = jQuery('.' + settings.className + '-list:visible').parent().find('*').andSelf();
	if (jQuery.inArray( e.target, currentListElements ) < 0 && listOpen)
	  hideList(jQuery('.' + commonClass + '-list'));
	return false;
  };

  settings = jQuery.extend(settings, options || {}); //Extend default settings

  /* Wrapping all passed elements */
  return this.each(function() {
	var _this = jQuery(this);
	if (_this.filter(':visible').length == 0 && !settings.replaceInvisible)
	  return;
	var replacement = jQuery(
	  '<div class="' + settings.className + ' ' + commonClass + '" rel="' + _this.attr("id") + '">' +
		  '<div class="' + settings.className + '-list ' + commonClass + '-list">' +
		  '<div class="list_wrapper" />' +
		  '<div class="corner bottom"><em></em></div>' +
		'</div>' +
		'<span class="' + settings.className + '-currentItem" />' +
	  '</div>');

		var defaultValue = (settings.setfirstval)? jQuery("option:first", _this).val() : jQuery("option:selected", _this).val();

	_this.val(defaultValue);

	jQuery('option', _this).each(function(k, v) {
	  var v = jQuery(v);
		var itemVal = v.val();
	  if ( itemVal === "" ) return;
	  var set_class = ( defaultValue === itemVal && itemVal !== "default" )? " selValue listelementhover hidden" : "";
	  var option_text = (itemVal === "default")? "" : v.text();
	  var listElement = jQuery(
						  '<span class="' + settings.className + '-item value-' + itemVal + ' item-' + k + set_class + '" rel="' + itemVal + '">' +
							option_text
						  + '</span>');
	  listElement.click(function() {
		var thisListElement = jQuery(this);
		var thisReplacment = thisListElement.parents('.' + settings.className);
		var thisIndex = thisListElement[0].className.split(' ');
		for (var k1 in thisIndex) {
		  if (/^item-[0-9]+$/.test(thisIndex[k1])) {
			thisIndex = parseInt(thisIndex[k1].replace('item-', ''), 10);
			break;
		  }
		}
		var thisValue = thisListElement[0].className.split(' ');
		for (var k2 in thisValue) {
		  if (/^value-.+$/.test(thisValue[k2])) {
			thisValue = thisValue[k2].replace('value-', '');
			break;
		  }
		}
		thisReplacment.find('.' + settings.className + '-currentItem')
							.text(thisListElement.text()).attr("rel",thisValue);
		thisReplacment.find('.' + settings.className + '-item[rel="default"]')
							.text("");
		thisReplacment.find('select')
							.val(thisValue)
							.triggerHandler('change');
		var thisSublist = thisReplacment.find('.' + settings.className + '-list');
		if (thisSublist.filter(":visible").length > 0)
		  hideList(thisSublist);
		else
		  showList(thisSublist);
	  }).bind('mouseenter', function() {
		jQuery('.selValue').removeClass('listelementhover');
		jQuery(this).addClass('listelementhover');
	  }).bind('mouseleave', function() {
		jQuery(this).removeClass('listelementhover');
		jQuery('.selValue').addClass('listelementhover');
	  });
	  jQuery('.' + settings.className + '-list .list_wrapper', replacement).append(listElement);
	  if (v.filter(':selected').length > 0)
		jQuery('.' + settings.className + '-currentItem', replacement).text(v.text()).attr("rel",v.val());
	});

	replacement.find('.' + settings.className + '-currentItem').click(function() {
	  var thisMoreButton = jQuery(this);
	  var currentSelectBox = thisMoreButton.parent();
	  var otherLists = jQuery('.' + settings.className + '-list').not(thisMoreButton.siblings('.' + settings.className + '-list'));
	  hideList(otherLists);
	  var thisList = thisMoreButton.siblings('.' + settings.className + '-list');
	  var thisListPrecise = jQuery('.' + settings.className + '-list', currentSelectBox);
	  if (thisList.filter(":visible").length > 0)
		  hideList(thisListPrecise);
		else
		  showList(thisListPrecise);
	});
	_this.hide().replaceWith(replacement).appendTo(replacement);
	var thisListBox = replacement.find('.' + settings.className + '-list');
	var thisListBoxSize = thisListBox.find('.' + settings.className + '-item').length;
	if (thisListBoxSize > settings.listboxMaxSize)
	  thisListBoxSize = settings.listboxMaxSize;
	if (thisListBoxSize == 0)
	  thisListBoxSize = 1;
	var thisListBoxWidth = Math.round(_this.width() + 15);
	if (jQuery.browser.safari)
	  thisListBoxWidth = thisListBoxWidth + 2;
	replacement.css('width', thisListBoxWidth + 'px');
	var listBoxWidth = (settings.fixWidth)? thisListBoxWidth : Math.round(thisListBoxWidth + 7);
	  if (settings.fixHeight) {
		  thisListBox.find(".list_wrapper").css({
			  height: (settings.numVisibleElements * 21)+ 'px',
			  overflow: 'hidden'
			});
		  thisListBox.css({
			  width: listBoxWidth + 'px'
		  });
	  } else {
		  thisListBox.css({
			  width: listBoxWidth + 'px',
			  height: 'auto',
			  maxHeight: (thisListBoxSize * 10)+ 'em'
			});
	  }
  });
};
jQuery.fn.unselectbox = function() {
  var commonClass = 'jquery-custom-selectboxes-replaced';
  return this.each(function() {
	var selectToRemove = jQuery(this).filter('.' + commonClass);
	selectToRemove.replaceWith(selectToRemove.find('select').show());
  });
};

;(function($) {
	$.fn.setHintText = function(options) {
		var defaults = {
			defaultText: "Enter here..."
		};
    var options = $.extend(defaults, options);
    return this.each(function() {
      var me = $(this);
      var textContent = (me.val().length > 0)? me.val() : options.defaultText;
      me.val(textContent).addClass("setHint");
      if(textContent.length > 0) {
        me.focus(function(){
            if($.trim(me.val()) == textContent) me.val("").removeClass("setHint");
          }).blur(function(){
            if($.trim(me.val()) == "")  me.val(textContent).addClass("setHint");
          });
       }
    });
  }
})(jQuery);


;(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnDoubleNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null,onBuild:null,onChange:null},o||{});return this.each(function(){var running=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var div=$(this),ul=$("ul",div),tLi=$("li",ul),tl=tLi.size(),v=o.visible;var tmpHtml="";if(o.circular){ul.prepend(tLi.slice(tl-v).clone()).append(tLi.slice(0,v).clone());o.start+=v;}var li=$("li",ul),itemLength=li.size(),curr=o.start;div.css("visibility","visible");li.css("overflow","hidden").css("float",o.vertical?"none":"left").children().css("overflow","hidden");ul.css("margin","0").css("padding","0").css("position","relative").css("list-style-type","none").css("z-index","1");div.css("overflow","hidden").css("position","relative").css("z-index","2").css("left","0px");var liSize=o.vertical?height(li):width(li);var ulSize=liSize*itemLength;var divSize=liSize*v;li.css("width",li.width()).css("height",li.height());ul.css(sizeCss,ulSize+"px").css(animCss,-(curr*liSize));div.css(sizeCss,divSize+"px");if(o.onBuild){o.onBuild.call(this,vis());}if(o.btnPrev){$(o.btnPrev).click(function(){if(o.onClick){o.onClick.call(this);}return go(curr-o.scroll);});}if(o.btnNext){$(o.btnNext).click(function(){if(o.onClick){o.onClick.call(this);}return go(curr+o.scroll);});}if(o.btnDoubleNext){$(o.btnDoubleNext).click(function(){o.scroll++;o.speed-=500;go(curr+o.scroll,true);o.scroll--;o.speed+=500;return false;});}if(o.btnGo){$.each(o.btnGo,function(i,val){$(val).click(function(){return go(o.circular?o.visible+i:i);});});}if(o.mouseWheel&&div.mousewheel){div.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll);});}if(o.auto){setInterval(function(){go(curr+o.scroll);},o.auto+o.speed);}function vis(){return li.slice(curr).slice(0,v);}function go(to,isDouble){if(!running){if(o.beforeStart){o.beforeStart.call(this,vis());}if(o.circular){if(to<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*liSize)+"px");curr=to==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll;}else{if(to>=itemLength-v+1){if(isDouble&&o.visible==1){tmpHtml=$(li).eq(v).html();$(li).eq(v).html($(li).eq(li.length-1).html());}ul.css(animCss,-((v)*liSize)+"px");curr=to==itemLength-v+1?v+1:v+o.scroll;}else{curr=to;}}}else{if(to<0||to>itemLength-v){return;}else{curr=to;}}running=true;if(!isDouble){tmpSpeed=o.speed;}else{tmpSpeed=o.speed;}ul.animate(animCss=="left"?{left:-(curr*liSize)}:{top:-(curr*liSize)},tmpSpeed,o.easing,function(){if(isDouble&&tmpHtml!=""){$(li).eq(v).html(tmpHtml);tmpHtml="";}if(o.afterEnd){o.afterEnd.call(this,vis());}if(o.onChange){o.onChange.call(this,curr);}running=false;});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled");}}return false;}});};function css(el,prop){return parseInt($.css(el[0],prop))||0;}function width(el){return el[0].offsetWidth+css(el,"marginLeft")+css(el,"marginRight");}function height(el){return el[0].offsetHeight+css(el,"marginTop")+css(el,"marginBottom");}})(jQuery);

(function(a){a.fn.jPerspectiveCarousel=function(c){var b={mainCarouselDiv:null,secondaryCarouselDiv:null,nextBtnName:null,prevBtnName:null,totalNumHolder:null,currentPositionHolder:null,noBackgroundClass:null,easing:"swing",speed:500,numVisibleInPreview:2,onBuild:null,onShift:null,currentLinkText:null,afterEnd:null,beforeStart:null};var c=a.extend(b,c);return this.each(function(){var h=a(this);var f=a(c.mainCarouselDiv,h);var d=a(c.secondaryCarouselDiv,h);var k=a(c.nextBtnName,h);var i=a(c.prevBtnName,h);var g;if(c.currentLinkText){a(".carousel_see_all a",h).text(c.currentLinkText);}if(c.currentLinkText=="NULL"){a(".carousel_see_all a",h).hide();}var j=a("li",f).length;a(c.totalNumHolder,h).html(j);if(j==2){c.numVisibleInPreview=1;}if(j==1){c.numVisibleInPreview=0;a(k).add(i).hide();a("li",f).addClass(c.noBackgroundClass);k=null;i=null;h.addClass("one_book");}if(j>1){c.numVisibleInPreview=2;a(d).html("<ul>");a("ul",d).append(a("li:not(:first)",f).clone());a("ul",d).append(a("li:first",f).clone());if(j==2){c.numVisibleInPreview=1;a(f).addClass("two_book_main_carousel");}}var l=0;var e=function(m){a("li.book"+m+" .bookCover img",h).each(function(){a(this).attr({src:a(this).attr("rel")}).removeAttr("rel");});};a(f).jCarouselLite({btnNext:k,btnPrev:i,visible:1,speed:c.speed,easing:c.easing,scroll:1,onBuild:function(){if(j>0){for(var m=1;m<=4;m++){e(m);}if(j>4){e(j);}}},onChange:function(m){if(!m||m==0){m=j;}else{if(m>j){m=m-j;}}a(c.currentPositionHolder,h).html(m);if(c.onShift){c.onShift.call(this,m);}g=m;},onClick:function(){if(a(this).hasClass("carousel_next_button")){if(g!=1&&typeof(g)!="undefined"){l=g+3;if((l<=j)){e(l);}}}if(a(this).hasClass("carousel_prev_button")){if(g>5||g==j){l=Math.abs(parseInt(g-1));if((l<=j&&l>0)){e(l);}}}}});if(j>1){a(d).jCarouselLite({btnNext:k,btnPrev:i,visible:c.numVisibleInPreview,speed:c.speed,scroll:1,easing:c.easing});}if(c.onBuild){c.onBuild.call(this);}});};})(jQuery);

$(document).ready(function(){
  $("div.book_carousel").jPerspectiveCarousel({
    nextBtnName: ".carousel_next_button",
    prevBtnName : ".carousel_prev_button",
    totalNumHolder : "span.total_books",
    currentPositionHolder : "span.current_book",
    mainCarouselDiv : ".carousel_main",
    secondaryCarouselDiv : ".carousel_secondary",
    noBackgroundClass: "no_background",
    onBuild: function(obj){
      $(".carousel_secondary ul .bookTitle",obj).truncateText({length: '30'});
      $(".carousel_main ul li",obj).each(function() {
        if ($(".bookTitle",this).text().length > 50 ) { $(".bookBlurb", this).hide(); }
      });
    }
  });
});

$(document).ready(function() {
	var invokeAds = function() {
		if ( typeof(Ads) != "undefined" ) setTimeout("Ads.display_ads()", 250);
	};

  $('.drawer-holder .drawer').not($('.drawer-holder.accordion .drawer, .drawer-holder .drawer.about_book')).each(function() {
    var drawer = $(this);
    var elements = drawer.find(".content a, .content span.current");
    if  ( elements.length == 0) { drawer.find(".title, .content").remove(); }
  });
  $('.drawer-holder .drawer > .title').not($('.drawer-holder.accordion .drawer > .title')).click(function() {
    $(this).next().toggle('fast');
    $(this).parent().toggleClass('closed');
    invokeAds();
  });

  $('.drawer-holder.accordion').not($('.drawer-holder.click')).each(function() {
    var drawerCount = $('.drawer', this).length;
    $(this).addClass( "drawers" + drawerCount);
    var maxHeight=0;
    if ( !$(this).hasClass("special") )
      $('.drawer:first', this).removeClass("closed");
	  
    $('.drawer > .content',this).each(function() { maxHeight = Math.max(maxHeight, $(this).outerHeight()); });
    $('.drawer.closed .content',this).css('height', 0);
    $(this).data("mh",maxHeight);
  });

  $('.drawer-holder.accordion .drawer > .title').not($('.drawer-holder.accordion.click .drawer > .title')).mouseover(function() {
    $this = $(this);
    setTimeout(function() {
      if ($this.parent().hasClass('closed')) {
	      var parent = $this.parent();
        var holder = parent.parent();
        var maxHeight = holder.data("mh");
        //var allContents = $('.drawer > .content',holder);
        var others = $('.drawer',holder).not(parent);
        var open = $this.next();
        var close = $('div.drawer:not(.closed)  > .content',holder);
        //var otherContents = allContents.not(open).not(close);

        open.animate({height:maxHeight},700);
        close.animate({height:0},700);

        parent.removeClass('closed');
        others.addClass('closed');
      }
      },350);
    });

    $('.drawer-holder.accordion.click .drawer > .title').click(function() {
      $this = $(this);
			var parent = $this.parent();
			var holder = parent.parent();

      if (parent.hasClass('closed')) {
        var others = $('.drawer',holder).not(parent);
        var open = $this.next();
        var close = $('div.drawer:not(.closed)  > .content',holder);
        
        close.slideUp();
        open.slideDown('fast', invokeAds );

        parent.removeClass('closed');
        others.addClass('closed');
      } else {
        var content = $this.next();
        content.slideUp("fast", invokeAds );
        parent.addClass('closed');
      }
    });
  });

/*
Popupwindow plugin for jQuery.
by: Tony Petruzzi
homepage: http://rip747.wordpress.com
plugin download: http://rip747.wordpress.com/2007/03/02/the-return-of-popupwindow-jquery-plugin/
*/
jQuery.fn.popupwindow=function(p){var profiles=p||{};return this.each(function(index){var settings,parameters,mysettings,b,a;mysettings=(jQuery(this).attr("rel")||"").split(",");settings={height:600,width:600,toolbar:0,scrollbars:0,status:0,resizable:1,left:0,top:0,center:0,createnew:1,location:0,menubar:0};if(mysettings.length==1&&mysettings[0].split(":").length==1){a=mysettings[0];if(typeof profiles[a]!="undefined"){settings=jQuery.extend(settings,profiles[a]);}}else{for(var i=0;i<mysettings.length;i++){b=mysettings[i].split(":");if(typeof settings[b[0]]!="undefined"&&b.length==2){settings[b[0]]=b[1];}}}if(settings.center==1){settings.top=(screen.height-(settings.height+110))/2;settings.left=(screen.width-settings.width)/2;}parameters="location="+settings.location+",menubar="+settings.menubar+",height="+settings.height+",width="+settings.width+",toolbar="+settings.toolbar+",scrollbars="+settings.scrollbars+",status="+settings.status+",resizable="+settings.resizable+",left="+settings.left+",screenX="+settings.left+",top="+settings.top+",screenY="+settings.top;jQuery(this).bind("click",function(){var name=settings.createnew?"PopUpWindow"+index:"PopUpWindow";window.open(this.href,name,parameters).focus();return false;});});};

var popup_profiles = {
    print: {
      height:750,
      width:800,
      menubar:1,
      center:1,
      resizable:0,
      status:1
    },

    contact_us: {
      height:700,
      width:660,
      scrollbars:0,
      status:1,
      center:1,
      resizable:0
    }
  };

$(document).ready(function() {
  $(".popup_window").popupwindow(popup_profiles);
});

$(document).ready(function(){
  $("#main_navigation > li.hasMenu").hover(
    function(){ $("a:first", this).addClass("overState"); $(".sub_menu", this).slideDown("fast"); },
    function(){ $("a:first", this).removeClass("overState"); $(".sub_menu", this).slideUp("fast"); }
  );

/* 
	The styling that this is for is very hard to understand because it is based upon cookies.  Since it is currently broken
	we are commenting the code out to see if it is even needed.  At least this way the javeascript on pages doesn't break.
	
	TODO: delete this code if later then August 13th 2010.
	baeDomain was => var baseDomain = "http://www.<%= domain_with_or_without_port %>";
	from commit => https://github.com/snsdigital/mtnops/blob/b95b9f06faefaf6287ba74b8107cdab738dd69d0/app/views/common/_browserRedir.html.erb
	
*/
/*	if(isSite("net")) {
		$("#nav_teaching, #nav_academics").click(function(){return false;})
		var section_name = $("#header").attr("class");
		if(section_name  !=  "") {
			$.cookie('navigationCookie', section_name , {domain: baseDomain, path: "/"});
		} else if($.cookie('navigationCookie')) {
			$("#header").addClass($.cookie('navigationCookie'));
		}
	}*/
});

$(document).ready(function(){
  if ($('#monopoly-carousel .carousel ul li').length < 6) $(".next, .prev", "#monopoly-carousel").hide();
  $('#monopoly-carousel .carousel').jCarouselLite({
    btnNext: '#monopoly-carousel .next',
    btnPrev: '#monopoly-carousel .prev',
    visible: 5,
    speed: 250,
    scroll: 1,
    easing: 'swing'
  });
});

function doCheckViewport() { if($(window).width() <= '1300') { $('.offPort').addClass('offViewport'); } else { $('.offPort').removeClass('offViewport'); }}

$(document).ready(function(){
  doCheckViewport();
  $(window).resize( function() { doCheckViewport(); } );
});

var isSite = function (site) {
		return ( site && $("body").attr("id").indexOf("site_" + site) != "-1" );
};

$(document).ready(function(){
  $('.scroll_section').jScrollPane({showArrows:true, scrollbarWidth: 27, reinitialiseOnImageLoad: true});

  $('.tabs').each(function(index) { $(this).addClass('tabs-'+$('li',this).length); });
  $(".tabs").tabs({
    show: function(ui) {
      var currentIndex = $(this).data('selected.tabs');
      var items = $('li', this);
      $(items).each(function(index) {
        if (index<currentIndex) $(this).css('background-position','right');
        if (index>currentIndex) $(this).css('background-position','left');
      });
      var items = $('li a',this);
      // for the author appearances
      if (typeof(initialize_map_twitter)!="undefined" && items[currentIndex].hash == "#twitter_updates") initialize_map_twitter();
      if (typeof(initialize_map)!="undefined" && items[currentIndex].hash == "#local_appearances") initialize_map();
      if (items[currentIndex].hash == "#bv_reviews") { Ads.notify(["bv_tab_show"]); }
      if (items[currentIndex].hash == "#bv_discussions") { Ads.notify(["bv_tab_show"]); }
    }
  });
  $('#author_voices_updates .tabs').bind('tabsshow',function(event, ui){
      $('.scroll_section', ui.panel).jScrollPane({showArrows:true, scrollbarWidth: 27});
  });
  
  $('#author_appearances').mouseover(function(){$('#page').css('z-index', 100);$('#header').css('z-index',0);});
  $('#author_appearances').mouseout(function(){$('#page').css('z-index', 0);$('#header').css('z-index',100);});

    $("#search_simonsays #query").setHintText({ defaultText : "Search" });
    $("#search_simonsays").submit(function(){
		var searchField = $("#query", this)
		var searchTerm = $.trim(searchField.val()).toLowerCase();
		if ( searchTerm == "" || searchTerm == "search") {
			searchField.val("").focus();
			return false;
		}
    });
});

$(document).ready(function(){
  $(".options a.option", "#billboard").each(function() {
    var desc_len = $(".description", this).text().length;
		if ( desc_len > 31 ) {
      $(this).addClass("padded");
			if ( desc_len > 70 )
				$(".description", this).truncateText({length: '65'});
		}
  });
  $('#billboard .rudiments').cycle({
    fx: 'fade',
    speed: '1000',
    pager: '#billboard .options',
    pause: 1,
    pauseOnPagerHover: 1,
    pagerAnchorBuilder: function(idx, slide) {
      return '#billboard .options a:eq(' + (idx) + ')';
    }
  });
});

/* Thickbox 3.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
 * Modified by Livingston Samuel, ThoughtWorks */
var tb_pathToImage="/images/loadingAnimation.gif";$(document).ready(function(){tb_init('a.thickbox,area.thickbox,input.thickbox');init_image();});function init_image(){imgLoader=new Image();imgLoader.src=tb_pathToImage;}function handleThickboxOverThickbox(){$("a.thickboxOverThickbox").bind("click",function(){tb_remove();var link=$(this).attr("href");setTimeout(function(){tb_show("",link,false);},500);return false;});};function tb_init(domChunk){$(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false;});};function tb_show(caption,url,imageGroup){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height: "100%",width: "100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{$("#TB_overlay").addClass("TB_overlayBG");}if(caption===null){caption="";}$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"'/></div>");$('#TB_load').show();var baseURL;if(url.indexOf("?")!==-1){baseURL=url.substr(0,url.indexOf("?"));}else{baseURL=url;}var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=$("a[@rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>  <a href='#'>Next></a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>  <a href='#'><Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=tb_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>"+"<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a></div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;}$("#TB_prev").click(goPrev);}if(!(TB_NextHTML==="")){function goNext(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false;}$("#TB_next").click(goNext);}document.onkeydown=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}if(keycode==27){tb_remove();}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"});};imgPreloader.src=url;}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)+126||630;TB_HEIGHT=(params['height']*1)+92||440;ajaxContentW=TB_WIDTH-96;ajaxContentH=TB_HEIGHT-92;if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.split('TB_');$("#TB_iframeContent").remove();if(params['modal']!="true"){$("#TB_window").append("<div class='corners top'><em></em></div><div class='thickbox_wrap_outer'><div class='thickbox_wrap_inner' style='height: 440px'><div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe();' style='width:"+(ajaxContentW)+"px;height:"+(ajaxContentH)+"px;'></iframe></div></div><div class='corners bottom'><em></em></div>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'></iframe>");}}else{if($("#TB_window").css("display")!="block"){if(params['modal']!="true"){$("#TB_window").append("<div class='corners top'><em></em></div><div class='thickbox_wrap_outer'><div class='thickbox_wrap_inner'><div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div></div></div><div class='corners bottom'><em></em></div>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(caption);}}$("#TB_closeWindowButton").click(tb_remove);if(url.indexOf('TB_inline')!=-1){$("#TB_ajaxContent").append($('#'+params['inlineId']).children());$("#TB_window").unload(function(){$('#'+params['inlineId']).append($("#TB_ajaxContent").children());});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"});}}else{$("#TB_ajaxContent").load(url+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"});});}}if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}if(keycode==27){tb_remove();}};}}catch(e){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"});}function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height: "auto",width: "auto"});$("html").css("overflow","");}document.onkeydown="";document.onkeyup="";return false;}function tb_position(){$("#TB_window").css({marginLeft: '-'+parseInt((TB_WIDTH/2),10)+'px',width: TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop: '-'+parseInt((TB_HEIGHT/2),10)+'px'});}}function tb_parseQuery(query){var Params={};if(!query){return Params;}var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}return Params;}function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;}function tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true;}}

/* jQuery Form Plugin 2.16 (17-OCT-2008)
 * @requires jQuery v1.2.2 or later
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses - http://www.opensource.org/licenses/mit-license.php, http://www.gnu.org/licenses/gpl.html */
;(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log("ajaxSubmit: skipping submit process - no element selected");return this;}if(typeof options=="function"){options={success:options};}options=$.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},options||{});var veto={};this.trigger("form-pre-serialize",[this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this;}var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data){if(options.data[n] instanceof Array){for(var k in options.data[n]){a.push({name:n,value:options.data[n][k]});}}else{a.push({name:n,value:options.data[n]});}}}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log("ajaxSubmit: submit aborted via beforeSubmit callback");return this;}this.trigger("form-submit-validate",[a,this,options,veto]);if(veto.veto){log("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this;}var q=$.param(a);if(options.type.toUpperCase()=="GET"){options.url+=(options.url.indexOf("?")>=0?"&":"?")+q;options.data=null;}else{options.data=q;}var $form=this,callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});}if(options.clearForm){callbacks.push(function(){$form.clearForm();});}if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments);});}else{if(options.success){callbacks.push(options.success);}}options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(options,[data,status,$form]);}};var files=$("input:file",this).fieldValue();var found=false;for(var j=0;j<files.length;j++){if(files[j]){found=true;}}if(options.iframe||found){if($.browser.safari&&options.closeKeepAlive){$.get(options.closeKeepAlive,fileUpload);}else{fileUpload();}}else{$.ajax(options);}this.trigger("form-submit-notify",[this,options]);return this;function fileUpload(){var form=$form[0];if($(":input[@name=submit]",form).length){alert('Error: Form elements must not be named "submit".');return;}var opts=$.extend({},$.ajaxSettings,options);var s=jQuery.extend(true,{},$.extend(true,{},$.ajaxSettings),opts);var id="jqFormIO"+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" />');var io=$io[0];if($.browser.msie||$.browser.opera){io.src='javascript:false;document.write("");';}$io.css({position:"absolute",top:"-1000px",left:"-1000px"});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;$io.attr("src","about:blank");}};var g=opts.global;if(g&&!$.active++){$.event.trigger("ajaxStart");}if(g){$.event.trigger("ajaxSend",[xhr,opts]);}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;return;}if(xhr.aborted){return;}var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+".x"]=form.clk_x;options.extraData[name+".y"]=form.clk_y;}}}setTimeout(function(){var t=$form.attr("target"),a=$form.attr("action");$form.attr({target:id,method:"POST",action:opts.url});if(!options.skipEncodingOverride){$form.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});}if(opts.timeout){setTimeout(function(){timedOut=true;cb();},opts.timeout);}var extraInputs=[];try{if(options.extraData){for(var n in options.extraData){extraInputs.push($('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />').appendTo(form)[0]);}}$io.appendTo("body");io.attachEvent?io.attachEvent("onload",cb):io.addEventListener("load",cb,false);form.submit();}finally{$form.attr("action",a);t?$form.attr("target",t):$form.removeAttr("target");$(extraInputs).remove();}},10);function cb(){if(cbInvoked++){return;}io.detachEvent?io.detachEvent("onload",cb):io.removeEventListener("load",cb,false);var operaHack=0;var ok=true;try{if(timedOut){throw"timeout";}var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;if(doc.body==null&&!operaHack&&$.browser.opera){operaHack=1;cbInvoked--;setTimeout(cb,100);return;}xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={"content-type":opts.dataType};return headers[header];};if(opts.dataType=="json"||opts.dataType=="script"){var ta=doc.getElementsByTagName("textarea")[0];xhr.responseText=ta?ta.value:xhr.responseText;}else{if(opts.dataType=="xml"&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}}data=$.httpData(xhr,opts.dataType);}catch(e){ok=false;$.handleError(opts,xhr,"error",e);}if(ok){opts.success(data,"success");if(g){$.event.trigger("ajaxSuccess",[xhr,opts]);}}if(g){$.event.trigger("ajaxComplete",[xhr,opts]);}if(g&&!--$.active){$.event.trigger("ajaxStop");}if(opts.complete){opts.complete(xhr,ok?"success":"error");}setTimeout(function(){$io.remove();xhr.responseXML=null;},100);}function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,"text/xml");}return(doc&&doc.documentElement&&doc.documentElement.tagName!="parsererror")?doc:null;}}};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){$(this).ajaxSubmit(options);return false;}).each(function(){$(":submit,input:image",this).bind("click.form-plugin",function(e){var form=this.form;form.clk=this;if(this.type=="image"){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else{if(typeof $.fn.offset=="function"){var offset=$(this).offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-this.offsetLeft;form.clk_y=e.pageY-this.offsetTop;}}}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},10);});});};$.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){$(":submit,input:image",this).unbind("click.form-plugin");});};$.fn.formToArray=function(semantic){var a=[];if(this.length==0){return a;}var form=this[0];var els=semantic?form.getElementsByTagName("*"):form.elements;if(!els){return a;}for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n){continue;}if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y});}continue;}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:n,value:v});}}}if(!semantic&&form.clk){var inputs=form.getElementsByTagName("input");for(var i=0,max=inputs.length;i<max;i++){var input=inputs[i];var n=input.name;if(n&&!input.disabled&&input.type=="image"&&form.clk==input){a.push({name:n+".x",value:form.clk_x},{name:n+".y",value:form.clk_y});}}}return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;}var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else{if(v!==null&&typeof v!="undefined"){a.push({name:this.name,value:v});}}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=="undefined"||(v.constructor==Array&&!v.length)){continue;}v.constructor==Array?$.merge(val,v):val.push(v);}return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=="undefined"){successful=true;}if(successful&&(!n||el.disabled||t=="reset"||t=="button"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")&&el.form&&el.form.clk!=el||tag=="select"&&el.selectedIndex==-1)){return null;}if(tag=="select"){var index=el.selectedIndex;if(index<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=$.browser.msie&&!(op.attributes.value.specified)?op.text:op.value;if(one){return v;}a.push(v);}}return a;}return el.value;};$.fn.clearForm=function(){return this.each(function(){$("input,select,textarea",this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=="text"||t=="password"||tag=="textarea"){this.value="";}else{if(t=="checkbox"||t=="radio"){this.checked=false;}else{if(tag=="select"){this.selectedIndex=-1;}}}});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(b){if(b==undefined){b=true;}return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select==undefined){select=true;}return this.each(function(){var t=this.type;if(t=="checkbox"||t=="radio"){this.checked=select;}else{if(this.tagName.toLowerCase()=="option"){var $sel=$(this).parent("select");if(select&&$sel[0]&&$sel[0].type=="select-one"){$sel.find("option").selected(false);}this.selected=select;}}});};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log){window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""));}}})(jQuery);

$(document).ready(function(){
  var initializeNewsleterSignup = function(config) {
			var emailField = $(config.email),
				submitField = $(config.submit),
				sigupFormField = $(config.signup),
				signupTarget = config.signupTarget;
			
		    emailField.setHintText({ defaultText : "Email" });

			var newsletterSignupFormSubmission = function() {
					var hintTxt = $.trim(emailField.val()).toLowerCase();
					if ( hintTxt == "" || hintTxt == "email") {
						emailField.val("").focus().removeClass("setHint");
						return false;
					}
					submitField.unbind('click');
					submitField.parent().animate({opacity: 0.5});
					sigupFormField.ajaxSubmit({target: signupTarget, success: initializeNewsleterSignup });
					return false;
		    };

	      submitField.click(newsletterSignupFormSubmission);
	      sigupFormField.submit(newsletterSignupFormSubmission);
  };

  initializeNewsleterSignup({
							  email: "#wrapper #newsletter_signup_form #subscriber_email_id",
							  submit: "#wrapper #newsletter_submit",
							  signup: "#wrapper #newsletter_signup_form",
							  signupTarget: "#wrapper #newsletterSignup"
							});

  initializeNewsleterSignup({
								email: "#footer #newsletter_signup_form #subscriber_email_id",
								submit: "#footer #newsletter_submit",
								signup: "#footer #newsletter_signup_form",
								signupTarget: "#footer #newsletterSignup"
							});

});

var registerSubmitButtonClick = function() {
	$("#light_registration_form select[id$=_dob_1i] option:eq(0)").text("Year").attr({ value : "default" });
	$("#light_registration_form select[id$=_dob_2i] option:eq(0)").text("Month").attr({ value : "default" });
	$("#light_registration_form select[id$=_dob_3i] option:eq(0)").text("Day").attr({ value : "default" });
  $('#light_registration_form select').not($("#light_registration_form select#appearance_reminder_time_period")).selectbox({ fixHeight : true });
  $("#light_registration_form select#appearance_reminder_time_period").selectbox();
  $('#light_registration_form').submit(function(){
    $("#light_registration_submit").parent().animate({opacity: 0.5});
    $('#light_registration_form').ajaxSubmit({target: '#TB_ajaxContent'});
    return false;
  });
};

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	if (window.opera || !document.all) return;
	var objects = document.getElementsByTagName("OBJECT");
	for (var i=0; i < objects.length; i++) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
// fixes bug in fp9 see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
deconcept.SWFObjectUtil.prepUnload = function() {
	__flash_unloadHandler = function(){};
	__flash_savedUnloadHandler = function(){};
	if (typeof window.onunload == 'function') {
		var oldUnload = window.onunload;
		window.onunload = function() {
			deconcept.SWFObjectUtil.cleanupSWFs();
			oldUnload();
		}
	} else {
		window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
	}
}
if (typeof window.onbeforeunload == 'function') {
	var oldBeforeUnload = window.onbeforeunload;
	window.onbeforeunload = function() {
		deconcept.SWFObjectUtil.prepUnload();
		oldBeforeUnload();
	}
} else {
	window.onbeforeunload = deconcept.SWFObjectUtil.prepUnload;
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;


/*************************************************************
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2006-2009 Adobe Systems Incorporated
 * All Rights Reserved
 *
 * NOTICE: Adobe permits you to use, modify, and distribute
 * this file in accordance with the terms of the Adobe license
 * agreement accompanying it. If you have received this file
 * from a source other than Adobe, then your use, modification,
 * or distribution of it requires the prior written permission
 * of Adobe.
 *
 *************************************************************/
 
// ********************
//	DigitalEditionsDetection.js
//
//  This file uses the Open Source SWFObject to perform Flash Detection and 
//  instantiate instance of the ade_web_library.swf.  The parameter sendADEInstalled
//  is used on this instance of the SWF to signal the JS if ADE is installed or not
//  This JS is used in the ADE Detection HTML example
//
//  NOTE: This code and the sample code should be used from a web browser for
//  true test of the environment.  Opening the sample HTML files directly from the
//  file system may produce un-desirable results due to the flash security model
//  To ensure good test results, place the sample code all in a single folder then expose
//  that folder as a virtual directory from your favorite web server.
// ********************

//-----------------------------------------------------------------------------
//  Maintenance Log:
//  
//  10/20/2008	ADEVersion update.	ADEVersion CAN NOT be "1" or "2" anymore
//  04/17/2008	the (3) buttonLabel params were removed
//				buttonLabelNotRequirements, buttonLabelNot, buttonLabelInst
//				ALSO badgeImagePath is removed
//  04/03/2008	Adjust buttonLabel settings to use internal defaults in some cases
//				ADEVersion moved to "2" by default now (ADE 1.5)
//  01/23/2008	update to use locale, ADEVersion, sendSWFVersion, sendButtonPush
//				Assign Marked background image for clear ID of SWF in testing
//-----------------------------------------------------------------------------

var G_nPlatform = 888;		// 1-WIN 2-Mac 3-Linux 4-Unknown
var G_bFlashInstalled = false;
var G_nav_platform = "";

var	GD_at_ShowADE_DivLayer = 0;
var	GD_at_ADE_Detect_doOnLoad = 0;

// ********************
// set_ADE_TestDetectionForm_Data
// Update the data in the test form
//
// Stub function provided to support operation
// independent of use of test_DigitalEditionsDetection.js
// If using that JS, then comment this stub function
// ********************
//function set_ADE_TestDetectionForm_Data()
//{
	// Comment this function if using test_DigitalEditionsDetection.js
//}

// ********************
// onShowADE_ShowContentDiv
// Do dynamic layout
//
// Stub function provided to support operation
// independent of implementation in HTML file
// You would have this function in HTML page to 
// ********************
//function onShowADE_ShowContentDiv()
//{
	// PLEASE SEE THE REFERENCE HTML FILE 
	
	// Code is added in this function in the HTML/Display file that instantiates
	// instances of the DigitalEditions Launcher using the function
	//	ADEBadgeLauncherInstance(<params>);
//}

// ********************
// Decide what layer (1 of 4) to show
//
// This function is replacement function for the 
// stub provided in ADEBadgeLauncher.js
// ********************
function ShowADE_DivLayer()
{
	GD_at_ShowADE_DivLayer++;

	// see comments inline below
	var bShowADE_DetectAndInstallDiv = false;
	var bShowADE_UnsupportedOSDiv = false;
	var bShowADE_NeedFlashDiv = false;
	var bShowADE_ShowContentDiv = false;
	
	// master logic
	// Show 1 of the 4 layers
	if ((G_nPlatform != 1) && (G_nPlatform != 2))
	{
		// div ADE_UnsupportedOSDiv is shown if Unsupported operating system is detected 
		bShowADE_UnsupportedOSDiv = true;
	}
	else	// Windows
	{
		if (G_bFlashInstalled)
		{
			if (G_nADEInstalled == 1)
			{
				// everything is good, let page show what it wants
				bShowADE_ShowContentDiv = true;
			}
			else	// need ADE
			{
				// div ADE_DetectAndInstallDiv is placeholder for ADE launcher SWF, using deconcept flash detection.
				// This object does reliable flash detection to ensure the ade_web_library.swf can load -->
				bShowADE_DetectAndInstallDiv = true;
			}
		}
		else // no Flash
		{
			// div ADE_NeedFlashDiv is shown if basic Flash is not detected
			bShowADE_NeedFlashDiv = true;
		}
	}
	
	// Set the div states
	// block, inline, none
	var element = document.getElementById("ADE_DetectAndInstallDiv");
	if (bShowADE_DetectAndInstallDiv)
		element.style.display = "block";
	else		
		element.style.display = "none";
	
	element = document.getElementById("ADE_UnsupportedOSDiv");
	if (bShowADE_UnsupportedOSDiv)
		element.style.display = "block";
	else		
		element.style.display = "none";
	
	element = document.getElementById("ADE_NeedFlashDiv");
	if (bShowADE_NeedFlashDiv)
		element.style.display = "block";
	else		
		element.style.display = "none";
	
	element = document.getElementById("ADE_ShowContentDiv");
	if (bShowADE_ShowContentDiv)
	{
//		onShowADE_ShowContentDiv();
		element.style.display = "block";
	}
	else		
	{
		element.style.display = "none";
	}
	
	// Update the debugging DIV
	//
	// have code like this on a page
	// <hr/>
	// DEBUGGING DIV <br/><br/>
	// <!-- div ADE_DebugDiv -->
	// <div id="ADE_DebugDiv"></div>
	
/**********************************	
	element = document.getElementById("ADE_DebugDiv");
	
	var strDBG = "at_doOnLoad (" + GD_at_doOnLoad + ")";
	strDBG += (" at_setG_nADEInstalled (" + GD_at_setG_nADEInstalled + ")");
	strDBG += (" at_onShowADE_ShowContentDiv (" + GD_at_onShowADE_ShowContentDiv + ")");
	strDBG += (" at_ShowADE_DivLayer (" + GD_at_ShowADE_DivLayer + ")");
	strDBG += (" at_ADE_Detect_doOnLoad (" + GD_at_ADE_Detect_doOnLoad + ")");
	strDBG += (" at_setG_strSWFVersion (" + GD_at_setG_strSWFVersion + ")");
	
	strDBG += "<br/>";
	
	strDBG += (" at_set_ADE_TestDetectionForm_Data (" + GD_at_set_ADE_TestDetectionForm_Data + ")");
	strDBG += (" at_TPlat (" + GD_at_TPlat + ")");
	strDBG += (" at_TFlash (" + GD_at_TFlash + ")");
	strDBG += (" at_TADE (" + GD_at_TADE + ")");

	element.innerHTML = strDBG;
	element.style.display = "block";
**********************************/
	
	// Update ADE_TestDetectionForm, if using test_DigitalEditionsDetection.js
	// This calls stub function, above.  Comment that out if actually
	// using test_DigitalEditionsDetection.js to have the call land there
	set_ADE_TestDetectionForm_Data();
}

// ********************
// ADE_Detect_doOnLoad()
// HTML <body> bootstrap script
// ********************
function ADE_Detect_doOnLoad(badFlashRedirectURL, autoInstall, autoLaunch)
{
	GD_at_ADE_Detect_doOnLoad++;
	
	G_nPlatform = 999;	// MAC
	G_bFlashInstalled = false;
//	G_nADEInstalled = 0;
	
	G_nav_platform = navigator.platform;
	
	// the real code for OS, uses navigator.platform
	if (G_nav_platform.indexOf("Win") != -1)
		G_nPlatform = 1;	// win
	else if (G_nav_platform.indexOf("Mac") != -1)
		G_nPlatform = 2;	// Mac
	else if (G_nav_platform.indexOf("linux") != -1)
		G_nPlatform = 3;	// linux
	else		
		G_nPlatform = 4;	// unknown
		
	// ONLY GET FANCIER (use deconcept) if we have WINDOWS or MAC
	if ((G_nPlatform == 1) || (G_nPlatform == 2))
	{
		G_bFlashInstalled = false;
		
		// function from  ADEBadgeLauncher.js
		// SWFObject sets the MMredirectURL via the xiRedirectUrl
		// SWFObject performs escape internally, so dont do that here
		var bEscape = false;
		var finalBadFlashRedirectURL = getFinalBadFlashRedirectURL(badFlashRedirectURL, bEscape);
		
		// Use the deconcept SWFObject to detect FLASH or not	
		// We let deconcept create a special instance of the launcher SWF
		// This has the setting for sendADEInstalled = true
		var swf = "ade_web_library.swf";
		var id = "ADEBadgeDetector";
		
		var w = "315";	// Release 1.0 (june, 2007)
		var h = "220";	// Release 1.0 (june, 2007)
		var ver = "7"
		var color = "#ffffff";
		var useExpressInstall = null;
		var quality = null;
		var xiRedirectUrl = finalBadFlashRedirectURL;
		var redirectUrl = null;
		var detectKey = null;

		var swfObj = new SWFObject(swf, id, w, h, ver, color, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey);

		// This is the SWFObject method to add parameters to your SWF
		// These are the ade_web_library.swf parameters.
		// Please see ADEBadgeLauncher.js for details
		// The key here is to set sendADEInstalled = true
		// Then, THIS INSTANCE of the SWF will communicate with 
		// the function setG_nADEInstalled() [from ADEBadgeLauncher.js]
		
		// NOTES for LOCALE:
		// See documentation in ADEBadgeLauncher.js
		// Also may try navigator.userLanguage, navigator.systemLanguage;
		// navigator.language did not produce good results with IE7
		var locale = navigator.browserLanguage;
		var userAgent = navigator.userAgent;
		var strAutoInstall = "false";
		var strAutoLaunch = "false";
		if (autoInstall)
		{
			strAutoInstall = "true";
		}
		
		if (autoLaunch)
		{
			strAutoLaunch = "true";
		}
		
		// See io_ADEVersion documentation in ADEBadgeLauncher.js
		var ADEVersion = "4"; // "4" is ADE 1.7 or greater - "3" is ADE 1.7 Beta or greater
		
		swfObj.addVariable("ADEVersion", ADEVersion); // "4" is ADE 1.7 or greater - "3" is ADE 1.7 Beta or greater
		swfObj.addVariable("badgeJSLauncher", "true");
		swfObj.addVariable("userAgent", userAgent);
		swfObj.addVariable("locale", locale);
// NOTE: THis is done internally in SWFObject via xiRedirectUrl			
//		swfObj.addVariable("MMredirectURL", finalBadFlashRedirectURL);
		swfObj.addVariable("contentURL", "");
		swfObj.addVariable("autoInstall", strAutoInstall);
		swfObj.addVariable("autoLaunch", strAutoLaunch);

		swfObj.addVariable("doFulfillmentLink", "false");
		swfObj.addVariable("sendADEInstalled", "true");
//		swfObj.addVariable("sendSWFVersion", "false");	// not sent is same as "false"
//		swfObj.addVariable("sendButtonPush", "false");	// not sent is same as "false"
		swfObj.addParam("allowscriptaccess", "samedomain");
		
		// command SWFObject to install the SWF at the div Layer specified
		// SWFObject will perform basic flash detection and run the SWF
		// if it is able to do so.  If failure is indicated, this means that
		// SWFobject has not detected basic flash to run the SWF
		var bFlash = swfObj.write("ADE_DetectAndInstallDiv");

		// Check and see if valid FLASH detected
		if (bFlash)
		{
			G_bFlashInstalled = true;
		}
	}

	// prepare the content layers so they can be revealed when needed
	onShowADE_ShowContentDiv();
	
	// in all cases, show the appropriate DIV Layer	
	ShowADE_DivLayer();
}


/*************************************************************
 *
 * ADOBE SYSTEMS INCORPORATED
 * Copyright 2006-2009 Adobe Systems Incorporated
 * All Rights Reserved
 *
 * NOTICE: Adobe permits you to use, modify, and distribute
 * this file in accordance with the terms of the Adobe license
 * agreement accompanying it. If you have received this file
 * from a source other than Adobe, then your use, modification,
 * or distribution of it requires the prior written permission
 * of Adobe.
 *
 *************************************************************/
 
// ********************
//	ADEBadgeLauncher.js
//
//  This is the single file that provides the support to host the ade_web_library.swf
//  Installer/Launcher SWF for Adobe Digital Editions.  The master documentation for the 
//  SWF parameters are included below. 
//  This script is referenced on HTML pages that need to host instance of the SWF and 
//  contains the helper JS functions to instantiate the SWF object on the HTML page. 
//  This script also hosts the callback JS functions that may be used depending on the
//  parameters that are sent into the SWF. Typically the JS callbacks then call 
//  Stub functions that must be enabled in your implementation to support the operation.
//
//  NOTE: This code and the sample code should be used from a web browser for
//  true test of the environment.  Opening the sample HTML files directly from the
//  file system may produce un-desirable results due to the flash security model
//  To ensure good test results, place the sample code all in a single folder then expose
//  that folder as a virtual directory from your favorite web server.
// ********************

//-----------------------------------------------------------------------------
//  Maintenance Log:
//  
//  01/16/2009	FlashVars documentation update for locale (io_locale)
//  10/20/2008	FlashVars documentation update for ADEVersion.
//				ADEVersion CAN NOT be "1" or "2" anymore
//  04/17/2008	Major update to SWF for look & feel. FlashVars documentation update.
//				ADEVersion CAN NOT be "1" anymore
//				the (3) buttonLabel params were removed
//				buttonLabelNotRequirements, buttonLabelNot, buttonLabelInst
//				ALSO badgeImagePath is removed
//				Make the reference to the swf in variable "swfPath" to make it more obvious to alter the path
//				
//				These functions were re-defined to DROP the (3) buttonLabel params:
//				ADEBadgeLauncherInstance()
//				SetADEBadgeLauncherDefaults()
//				ADEBadgeInstallerInstance()
//				SetADEBadgeInstallerDefaults()
//
//  04/03/2008	SWF update for localization and FlashVars update to detail that all (3)
//				buttonLabel FlashVars parameters must be used to override internal strings
//				Add description of default localized button text
//				ADEVersion moved to "2" by default now (ADE 1.5)
//  04/01/2008	1.3	Move fix_gblink_plus_characters into ADEBadgeLauncher.js (here), commenting update
//				update documentation for io_contentURL, io_doFulfillmentLink
//	02/01/2008  set hc_contentURL = "";	for the ADEBadgeInstallerInstance method
//  01/23/2008	Documentation for (4) new SWF parameters:
//				"locale", "ADEVersion", "sendSWFVersion", "sendButtonPush"
//				update everywhere to use locale, ADEVersion, sendSWFVersion, sendButtonPush
//				New Callbacks setG_strSWFVersion(), send_ADE_SWF_ButtonPush()
//				Stub EXAMPLES stubs ShowSWFVersion_DivLayer(), ADE_SWF_ButtonPush_action()
//				New Helper API for Badge Installer mode of operation:
//				ADEBadgeInstallerInstance(), ADEBadgeInstallerInstanceWithDefs(), SetADEBadgeInstallerDefaults()
//
//-----------------------------------------------------------------------------

// ********************
// Global script variables that can be used to simplify the call convention for the Launcher
// If every instance uses these same basic settings, then a single could be made to
// SetADEBadgeLauncherDefaults, and then separate calls to ADEBadgeLauncherInstanceWithDefs
//
// For Installer mode, make single call to 
// SetADEBadgeInstallerDefaults, and then separate calls to ADEBadgeInstallerInstanceWithDefs
// ********************
var G_someLocale = null;
var G_bAutoInstall = false;
var G_bAutoLaunch = false;

var G_bSendADEInstalled = false;
var G_bSendSWFVersion = false;
var G_bSendButtonPush = false;  // if true, only call the JS function - contentURL would be ignored if used
var G_strBadFlashRedirectURL = null;

// ********************
// Global script variable to indicate installed state for Digital Editions
// 0-NOT installed 1-Installed
// ********************
var G_bSawADEInstalled = false;
var G_nADEInstalled = 0;
var G_bForce_nADEInstalled_zero = false;	// used during debug/demo modes

var G_bTEST_nADEInstalled_control = false;	// used during debug/demo modes

var	GD_at_setG_nADEInstalled = 0;

// ********************
// Global script variable to hold SWF Version
// ********************
var G_strSWFVersion = "";
var G_bUpdateSWFVersion = true;
var	GD_at_setG_strSWFVersion = 0;

// ********************
// Stub function provided to support operation
// independent of DigitalEditionsDetection.js
// ********************
//function ShowADE_DivLayer()
//{
	// Copy and enable this function into your
	// implementations not using DigitalEditionsDetection.js
//}

// ********************
// Stub function provided to support operation for SWF Version
// This is called when sendSWFVersion = "true"
// and the script at setG_strSWFVersion() detects a fresh string
// ********************
//function ShowSWFVersion_DivLayer()
//{
	// Copy and enable this function into your
	// implementations that display the version
	//
	// This is sample. You may or may not do like this
	
/***************************	
	if (G_bUpdateSWFVersion)
	{
		G_bUpdateSWFVersion = false;
		var element = document.getElementById("swfVersionDiv");
	
		if (G_strSWFVersion.length > 0)
		{
			element.innerHTML = "<hr/>Adobe Digital Editions SWF Version:<br/><br/>" + G_strSWFVersion;
			// kick in the pants to be sure to display
			element.style.display = "block";
		}
		else
		{
			element.style.display = "none";
		}
	}
***************************/

//	return;
//}

// ********************
// Stub function provided to support send_ADE_SWF_ButtonPush()
// That anchor function will call the stub
// This way, the anchor function is always defined, and various
// implementations can provide the stub where needed
// ********************
//function ADE_SWF_ButtonPush_action()
//{
	// Copy and enable this function into your
	// implementations where sendButtonPush = "true"
	
	//  NOTE: When sendButtonPush = "true", then even if contentURL is set, it will not
	//  be sent to ADE after it is launched.  When sendButtonPush = "true", all that happens
	//  after ADE is launched is that the JS Callback is made, and that is it.
	
	// return;
//}

// ********************
// setG_nADEInstalled()
//
// Callback function for the ade_web_library.swf
// to indicate the installed state of Digital editions
//
// CONTROLLED BY: io_sendADEInstalled
//
// NOTE:
// if you are using the DigitalEditionsDetection.js file
// then you must disable the stub ShowADE_DivLayer() above
// to allow the Detection function to be called
// ********************
function setG_nADEInstalled(numberAsString)
{
	var nADEInstalled_current = G_nADEInstalled;
	
	GD_at_setG_nADEInstalled++;
	
	// ON MAC firefox, observed that the test control caused the
	// page to enter this function (call the SWF again?)
	// anyway, if control just pushed, ignore this hit
	if (G_bTEST_nADEInstalled_control)
	{
		G_bTEST_nADEInstalled_control = false;
	}
	else  // normal
	{
		var nResult = parseInt(numberAsString);
		if (!(nResult == Number.NaN))
		{
			if (G_bForce_nADEInstalled_zero)
			{
				G_nADEInstalled = 0;
			}
			else // normal case
			{
				G_nADEInstalled = nResult;
			}
			
			// If have not seen first report of installed state
			// OR State has changed, then wiggle the layers
			if (!G_bSawADEInstalled || (nADEInstalled_current != G_nADEInstalled))
			{
				ShowADE_DivLayer();	
			}
			
			G_bSawADEInstalled = true;
		}
	}
}

// ********************
// setG_strSWFVersion()
//
// CONTROLLED BY: io_sendSWFVersion
//
// This is called when sendSWFVersion = "true"
//
// Callback function for the ade_web_library.swf
// to indicate the version of ade_web_library.swf
// ********************
function setG_strSWFVersion(strSWFVersion)
{
	GD_at_setG_strSWFVersion++;
	if (strSWFVersion)
	{
		// If have not seen this, then wiggle the layers and save
		if (strSWFVersion != G_strSWFVersion)
		{
			G_strSWFVersion = strSWFVersion;
			G_bUpdateSWFVersion = true;
			
			// also do this if needed - implement the stub somewhere
			ShowSWFVersion_DivLayer();	
		}
	}
}

// ********************
// send_ADE_SWF_ButtonPush()
//
// CONTROLLED BY: io_sendButtonPush
//
// Callback function for the ade_web_library.swf
// when implementations set sendButtonPush = "true"
//
// NOTE: When io_sendButtonPush is true, then even if io_contentURL is set, it will not
// be sent to ADE after it is launched.  When io_sendButtonPush is true, all that happens
// after ADE is launched is that the JS Callback is made, and that is it.
//
// This callback indicates that ADE is installed, launched, and user pushed the button
// ********************
function send_ADE_SWF_ButtonPush()
{
	// you can add Script code here to call out to 
	// other parts of your script to take action
	// Default is call to this stub API that you can move around where needed
	// and leave this JS file intact
	ADE_SWF_ButtonPush_action();
}

// ********************
//
//  Flash SWF parameters (FlashVars):
//  =========================
//
//  FlashVars Documentation
//
//  The Adobe Digital Editions launcher SWF utilizes built-in Flash mechanisims
//  to detect, install, launch Adobe Digital Editions through the Flash add-in mechanism
//
//  Badge Mode:
//  The SWF for Badge Mode is specified as 315 x 220 Pixels
//  Badge mode is the mode when used with ADEBadgeLauncher.js
//
//  Badge Layout:
//  The badge layout has 3 sections:
//  Upper Badge text
//  Button (middle section)
//  Lower Badge Text
//
//  ------------------------------
//  Localized upper Badge Text area
//  The upper badge area contains this text
//  ------------------------------
//	English = "Adobe® Digital Editions Installer";
//	German = "Adobe® Digital Editions Installateur";
//	French = "Installateur d'Adobe® Digital Editions";
//
//  ------------------------------
//  The button in the center of the SWF has these localized values as default
//  ------------------------------
//  For "Launch/Install" mode (where contentURL is not used)
//  
//  When ADE is Installed
//	English = "Launch";
//	German = "Starten";
//	French = "Lancer";
//  
//  When ADE is NOT Installed
//	English = "Install";
//	German = "Installieren";
//	French = "Installer";
//  
//  ------------------------------
//  For "Read/Download/Fulfill" mode (where contentURL is used)
//  
//  When ADE is Installed
//  English = "Download Item";
//  German = "Element herunterladen";
//  French = "Télécharger l'élément";
//  
//  When ADE is NOT Installed
//  English = "Install and Read";
//  German = "Installieren und lesen";
//  French = "Installer et lire";
//  
//  ------------------------------
//  When the SWF detects that system requirements for ADE Are not met
//  
//  English = "System Requirements";
//  German = "System Anforderungen";
//  French = "Conditions de Système";
//  
//  ------------------------------
//  Localized lower Badge Text area
//  The lower badge area contains this text
//  ------------------------------
//  When ADE is Installed
//  English = "Launch Adobe Digital Editions";
//  German = "Adobe Digital Editions starten";
//  French = "Lancer Adobe Digital Editions";
//
//  When ADE is NOT Installed
//  English = "Click to install Adobe Digital Editions";
//  German = "Klicken Sie, um Adobe Digital Editions zu installieren";
//  French = "Cliquez pour installer Adobe Digital Editions";
//
//  When the SWF detects that system requirements for ADE Are not met
//  English = "Sorry, but your system does not meet the minimum system requirements.";
//  German = "Leider entspricht Ihr System nicht den minimalen System Anforderungen.";
//  French = "Désolé, mais votre système ne satisfait pas les besoins de système minimaux.";
//
//  =========================
//  Here is the documentation for external FlashVars that can be passed into the SWF
//
//  Flash SWF parameters (FlashVars):
//  PLEASE NOTE: the io_ prefix is NOT INCLUDED for the actual parameters that
//  are passed into the SWF.  Example, use "autoLaunch" for "io_autoLaunch"
//  This applies to every parameter described below
//
//  ------------------------------
//  io_userAgent - (string)
//  This is the Browser UserAgent that is needed to help determine if the
//  environment is suitable to install DE.
//  Collected automatically from the Adobe Labs implementation, and the
//  ADEBadgeLauncher.js automatically uses navigator.userAgent property
//  to pass this into the SWF
//
//  ------------------------------
//  io_locale - (string)
//  This parameter is used to specify the language localization option
//  that the  launcher should display.  
//
//  If io_locale is not sent, then the SWF will set the locale according
//  to the flash.system.Capabilities.language setting.  
//
//  IMPORTANT: It should be noted that the flash.system.Capabilities.language setting
//  Is what will be used to automatically provision the SWF with strings for the
//  little white dialog that appears during the INSTALL workflow.
//  This is REGARDLESS and INDEPENDENT of any setting passed in io_locale.
//
//  So if in fact io_locale is set to a different value than the 
//  flash.system.Capabilities.language setting, then the SWF will show strings of different
//  language inside the little white box displayed during the INSTALL workflow
//
//  The valid values for io_locale match the actionscript definitions for Locale as found here:
//  http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/Capabilities.html#language
//
//  The language is specified as a lowercase two-letter language code from ISO 639-1. 
//  For Chinese, an additional uppercase two-letter country code from ISO 3166 distinguishes
//  between Simplified and Traditional Chinese. The languages codes are based on the English 
//  names of the language: for example, hu specifies Hungarian. 
//
//	The current supported languages are these:
//
//  Dutch "nl"
//  English "en"
//  French "fr"
//  German "de"
//  Italian "it"
//  Japanese "ja"
//  Korean "ko"
//  Portuguese "pt"
//  Simplified Chinese "zh-CN"
//  Spanish "es"
//  Traditional Chinese "zh-TW"
//
//  THESE ARE NOT SUPPORTED, and if used, default to English
//  Czech "cs"
//  Danish "da"
//  Finnish "fi"
//  Hungarian "hu"
//  Norwegian "no"
//  Other/unknown "xu"
//  Polish "pl"
//  Russian "ru"
//  Swedish "sv"
//  Turkish "tr"
//
//  ------------------------------
//  io_ADEVersion - (string - NUMBER)
//  This controls the Adobe Digital Editions version
//  that will be installed or launched by this SWF
//  Send the string version of a Number to control the version
//
//  '1' - DEPRECATED - ILLEGAL VALUE - System Requirements
//  '2' - Digital Editions 1.5 series - DEPRECATED - ILLEGAL VALUE - System Requirements
//  '3' - Digital Editions 1.7 series and greater BETA INSTALL
//  '4' - Digital Editions 1.7 series and greater
//  
//  sending any other value chooses the 1.7 series (like "4")
//
//  AS of 04/15/2008, using '1' is no longer supported
//  if the value of '1' is supplied, then the badge will enter "system Requirements" state
//
//  AS of 10/20/2008, using '2' is no longer supported
//  if the value of '2' is supplied, then the badge will enter "system Requirements" state
//
//  ------------------------------
//  io_badgeJSLauncher - (true, false)
//  NOT USED by the Adobe Labs Library mode
//  true - if from ADEBadgeLauncher.js
//
//  ------------------------------
//	io_contentURL - (string) 
//  NOT USED by the Adobe Labs Library mode
//  This parameter is used by ADEBadgeLauncher.js
//
//  How the ADE Launcher SWF handles this parameter is based on
//  the setting of io_doFulfillmentLink.
//
//  If io_doFulfillmentLink is false, then io_contentURL is
//  intended to be a URL path to an un-encrypted ePub or PDF Document.
//  io_contentURL will be sent to DE by the Launcher SWF and then
//  DE will download the file, add to the DE library, and open for reading
//
//  If io_doFulfillmentLink is true, then io_contentURL is
//  intended to be a GBLink fulfillment URL for Adobe Content Server DRM fulfillment
//  The launcher SWF will play the io_contentURL into the browser frame to
//  simulate a user clicking a GBLink URL href on a HTML page.  The target
//  ACS server will respond in the normal way with the ETD mime response to 
//  be handed to DE by the browser.  DE will handle the ETD response as usual and
//  fulfill the ACS DRM protected content.
//
//  VERY IMPORTANT:
//  The io_contentURL must be escaped (js escape() function) to retain its integrity
//
//  USE fix_gblink_plus_characters() with ACS GBLink URL
//  There is a helper function named fix_gblink_plus_characters() in the ADE Launcher SDK
//  that is provided to perform the final fix for io_contentURL that is used with 
//  io_doFulfillmentLink = true for GBLink URLs.  Please read the documentation and example
//  at fix_gblink_plus_characters() and in the ADE Launcher SDK examples
//
//  NOTE: When io_sendButtonPush is true, then even if io_contentURL is set, it will not
//  be sent to ADE after it is launched.  When io_sendButtonPush is true, all that happens
//  after ADE is launched is that the JS Callback is made, and that is it.
//
//  ------------------------------
//	io_autoInstall - (true, false)
//  true - If DE is not installed then install it. When installation of DE starts, 
//  the the Adobe EULA always appears.  The user must click through the EULA to complete the install.
//  false - Take no special action to install DE
//
//  ------------------------------
//	io_autoLaunch - (true, false)
//  true - If DE is installed then launch it.  If DE not installed, do nothing special
//  false - Take no special action to launch DE
//
//  ------------------------------
//  io_MMredirectURL - (string)
//  This is a URL that is used if NO Flash Version is detected or the Flash Version
//  is too low to run the Launcher SWF.
//  This URL should go to a warning page that is maintained by the
//  partner that says something like
//
//  Can't see this content? To view this content, JavaScript must be enabled, 
//  and you need the latest version of the Adobe Flash Player. Download the Flash Player now! 
//
//  www.adobe.com/go/getflashplayer is the Adobe GO URL to provide a link for FlashPlayer
//
//  ------------------------------
//  io_doFulfillmentLink - (true, false)
//  true - submit "io_contentURL" parameter into browser (for ACS GBLink DRM fulfillment URL)
//  false - pass "io_contentURL" through LocalConnection into DE. DE will download the 
//  content from the URL, add to the library, and then and open into reading mode
//
//  ------------------------------
//  io_sendADEInstalled - (true, false) 
//  true - SWF performs call back into Jscript function setG_nADEInstalled() to indicate 
//  installed state of DE.
//  false - DO NOT perform any JScript callback
//
//  ------------------------------
//  io_sendSWFVersion - (true, false) 
//  true - SWF performs call back into Jscript function setG_strSWFVersion() to indicate 
//  Version of the Adobe Digital Editions Launcher SWF
//  false - DO NOT perform any JScript callback
//
//  ------------------------------
//  io_sendButtonPush - (true, false) 
//  true - SWF performs call back into Jscript function send_ADE_SWF_ButtonPush() to indicate 
//  ADE is installed and the Button on the SWF is pushed
//  false - DO NOT perform any JScript callback
//
//  NOTE: When io_sendButtonPush is true, then even if io_contentURL is set, it will not
//  be sent to ADE after it is launched.  When io_sendButtonPush is true, all that happens
//  after ADE is launched is that the JS Callback is made, and that is it.
//
//  ------------------------------
//  io_debug_PlayerNotReady - (true, false)
//  Test-DEBUGGING option to simulate Bad Flash Version to run the SWF
//
//  ------------------------------
//  io_debug_BadOperatingSystem - (true, false)
//  Test-DEBUGGING option to simulate invalid Operating System
//
//  ------------------------------


// ********************
//  ADEBadgeLauncherInstance()
//
//  Launcher construction function
//
//  Places an instance of ade_web_library.swf (<object> tag with <embed> element) 
//  into a <div> section on HTML Page.  The id of the <div> section as well as the desired id
//  for the <object> tag are passed in.  
//
//  In addition, the parameters to control the behavior of the SWF are passed in
//
//  HTML Section params:
//  =========================
//	HTMLdivID  - id of the <div> which will hold the SWF
//  HTMLobjectID - desired ID for the HTML <object> that contains the SWF (may be null - default is ADEBadgeLauncherInstance)
//
//  Flash SWF parameters (FlashVars):
//  =========================
//  See the flashvars documentation just above
//
// NOTE: on 04/17/08, the (3) buttonLabel params were removed
// buttonLabelNotRequirements, buttonLabelNot, buttonLabelInst
// ********************
function ADEBadgeLauncherInstance(HTMLdivID, HTMLobjectID, 
contentURL,		    // MUST BE escaped
doFulfillmentLink,	// controls use of contentURL
autoInstall,
autoLaunch,
badFlashRedirectURL,
sendADEInstalled,
sendSWFVersion,
sendButtonPush)
{
//	var debug_PlayerNotReady = true;
//	var debug_BadOperatingSystem = true;

	// allow for NULL to default HTMLobjectID
	if (!HTMLobjectID)
		HTMLobjectID = 'ADEBadgeLauncherInstance';
		
	// These params are script-provided, or finalized by this script
	// See io_ADEVersion documentation, above
	var ADEVersion = "4"; // "4" is ADE 1.7 or greater - "3" is ADE 1.7 Beta or greater
	var badgeJSLauncher = "true";	// ALWAYS true from here
	
	var userAgent = navigator.userAgent;
	
	// NOTES for LOCALE:
	// See documentation above
	// If you try to use any of the HTML Browser navigator Object properties,
	// there is not one that is reliable across Browsers and Operating systems

	// As example on WIN XP and WIN IE7 Found these navigator settings: 
	// navigator.browserLanguage = en-us
	// navigator.userLanguage = fr	(WIN Control panel setting - not affected by Browser request language)
	// navigator.systemLanguage = en-us
	// navigator.language = undefined
	
	// However, navigator.userLanguage is not available in other browsers or on a MAC
	// As of (4/16/08) the SWF now uses flash.system.Capabilities.language internally
	// so it is not really necesary to send in locale, unless you want to take control
	
	// on WINDOWS, using control panel-regional and language settings will alter the locale for Flash
	// on MAC, system preferences-International-Language will alter the locale for Flash
	
	// also please note that if you take control of Locale, but the system locale is different, you will get
	// strange behavior because during an install, the text in the white box that appears is loaded from a
	// localized string resource on the internet that is based on the flash.system.Capabilities.language.  
	// This is part of  the automated install operation and not in programmatic control of the SWF
	
	var locale = ""; 
	if (G_someLocale)
		locale = G_someLocale;
	
	var bEscape = true;
	var finalBadFlashRedirectURL = getFinalBadFlashRedirectURL(badFlashRedirectURL, bEscape);
			
	// sum up the variables to be passed into the SWF
	// NOTE: on 04/17/08, the following (4) params were removed from the SWF
	// badgeImagePath, buttonLabelNotRequirements, buttonLabelNot, buttonLabelInst
	var strFlashVars = 'ADEVersion=' + ADEVersion +
					'&badgeJSLauncher=' + badgeJSLauncher +
//					'&debug_PlayerNotReady=' + debug_PlayerNotReady +
//					'&debug_BadOperatingSystem=' + debug_BadOperatingSystem +
					'&userAgent=' + userAgent +
					'&locale=' + locale +
					'&MMredirectURL=' + finalBadFlashRedirectURL +
					'&contentURL=' + contentURL +	// MUST BE escaped
					'&autoInstall=' + autoInstall +
					'&autoLaunch=' + autoLaunch +
					'&doFulfillmentLink=' + doFulfillmentLink +   // controls use of contentURL
					'&sendADEInstalled=' + sendADEInstalled +
					'&sendSWFVersion=' + sendSWFVersion +
					'&sendButtonPush=' + sendButtonPush;
					
	// size of the SWF.  This size is specified in the .FLA Flash design file
	// NOTE leading & trailing space is required to be built into this string
	//	var swfSize = ' width="225" height="170" ';	// This was the Beta3 Launcher
	var swfSize = ' width="315" height="220" ';		// This is the Ver 1.0 Launcher (june, 2007)
	
	// color, quality - declared 1 place
	var qualityValue = '"high"';
	var bgColorValue = '"#ffffff"';
	
	// path to the SWF just in case its not in same folder/place as this file
	// for example a relatitive path to the swf that is one directory higher might be
	// var swfPath = '"../parentpath/ade_web_library.swf"';
	var swfPath = '"/flash/ade_web_library.swf"';
	
	// Create object/embed tag for ade_web_library.swf
	var swf  = '<object id="' + HTMLobjectID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + swfSize + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">';
		swf += '<param name="movie" value=' + swfPath + ' />';
		swf += '<param name="quality" value=' + qualityValue + ' />';
		swf += '<param name="bgcolor" value=' + bgColorValue + ' />';
		swf += '<param name="allowscriptaccess" value="samedomain" />';
		swf += '<param name="flashVars" value="' + strFlashVars + '" />';
		swf += '<embed type="application/x-shockwave-flash" src=' + swfPath + swfSize + 'id="' + HTMLobjectID + '" name="' + HTMLobjectID + '"allowscriptaccess="samedomain" flashVars="' + strFlashVars + '" swLiveConnect="true" quality=' + qualityValue + ' bgcolor=' + bgColorValue + 'align="" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
		swf += '</object>';
		
	// Now place the SWF object/embed tag into the HTML at the divID
	var element = document.getElementById(HTMLdivID);
	element.innerHTML = swf;
	
	// kick in the pants to be sure to display
	element.style.display = "block";
	
}

// *********************************************************
// *
// * Launcher mode helper API
// * For running launcher with default settings
// *
// *********************************************************

// ********************
// SetADEBadgeLauncherLocale()
// hardcode a Locale to use
// ********************
function SetADEBadgeLauncherLocale(theirLocale)
{
	G_someLocale = theirLocale;
}

// ********************
// ADEBadgeLauncherInstanceWithDefs()
//
// Create an instance of the ade_web_library.swf using defaults for most settings
// Set the defaults with SetADEBadgeLauncherDefaults
//
// NOTE:
// contentURL must be escaped
// doFulfillmentLink controls use of contentURL
// ********************
function ADEBadgeLauncherInstanceWithDefs(HTMLdivID, HTMLobjectID, contentURL, doFulfillmentLink)
{
	return ADEBadgeLauncherInstance(HTMLdivID, HTMLobjectID, contentURL, doFulfillmentLink, G_bAutoInstall, G_bAutoLaunch, G_strBadFlashRedirectURL, G_bSendADEInstalled, G_bSendSWFVersion, G_bSendButtonPush);
}

// ********************
// SetADEBadgeLauncherDefaults()
//
// Setup defaults to then use ADEBadgeLauncherInstanceWithDefs()
// NOTE: on 04/17/08, the (3) buttonLabel params were removed
// buttonLabelNotRequirements, buttonLabelNot, buttonLabelInst
// ********************
function SetADEBadgeLauncherDefaults(autoInstall, autoLaunch, badFlashRedirectURL, sendADEInstalled)
{
	G_bAutoInstall = autoInstall;
	G_bAutoLaunch = autoLaunch;
	G_bSendADEInstalled = sendADEInstalled;
	G_strBadFlashRedirectURL = badFlashRedirectURL;
	
	return;
}

// *********************************************************
// *
// * Installer mode helper API
// * For running launcher as Simple Installer
// *
// *********************************************************

// ********************
// ADEBadgeInstallerInstance()
//
// Create an instance of the ade_web_library.swf for Installer mode
//
// Never using contentURL, doFulfillmentLink, sendADEInstalled
// NOTE: on 04/17/08, the (3) buttonLabel params were removed
// buttonLabelNotRequirements, buttonLabelNot, buttonLabelInst
// ********************
function ADEBadgeInstallerInstance(HTMLdivID, HTMLobjectID,
autoInstall,
autoLaunch,
badFlashRedirectURL,
sendSWFVersion,
sendButtonPush)
{
	// installer mode never using these parameters
	// hc_ = hardcode
	var hc_contentURL = "";	
	var hc_doFulfillmentLink = false;
	var hc_sendADEInstalled = false;
	
	return ADEBadgeLauncherInstance(HTMLdivID, HTMLobjectID, hc_contentURL, hc_doFulfillmentLink, autoInstall, autoLaunch, badFlashRedirectURL, hc_sendADEInstalled, sendSWFVersion, sendButtonPush);
}

// ********************
// ADEBadgeInstallerInstanceWithDefs()
//
// Create an instance of the ade_web_library.swf using defaults for most settings
// Set the defaults with SetADEBadgeInstallerDefaults
// ********************
function ADEBadgeInstallerInstanceWithDefs(HTMLdivID, HTMLobjectID)
{
	return ADEBadgeInstallerInstance(HTMLdivID, HTMLobjectID, G_bAutoInstall, G_bAutoLaunch, G_strBadFlashRedirectURL, G_bSendSWFVersion, G_bSendButtonPush);
}

// ********************
// SetADEBadgeInstallerDefaults()
//
// Setup defaults to then use ADEBadgeInstallerInstanceWithDefs()
// NOTE: on 04/17/08, the (3) buttonLabel params were removed
// buttonLabelNotRequirements, buttonLabelNot, buttonLabelInst
// ********************
function SetADEBadgeInstallerDefaults(autoInstall, autoLaunch, badFlashRedirectURL, sendSWFVersion, sendButtonPush)
{
	G_bAutoInstall = autoInstall;
	G_bAutoLaunch = autoLaunch;
	G_strBadFlashRedirectURL = badFlashRedirectURL;
	G_bSendSWFVersion = sendSWFVersion;
	G_bSendButtonPush = sendButtonPush;  // if true, only call the JS function - contentURL would be ignored if used
	
	return;
}

// ********************
// getFinalBadFlashRedirectURL()
//
// Utility function to escape the URL.
// If not provided, use current window with params added (?flash=bad")
// ********************
function getFinalBadFlashRedirectURL(badFlashRedirectURL, bEscape)
{
	var scriptBadFlashRedirectURL = null;
	var finalBadFlashRedirectURL = null;
	if  (badFlashRedirectURL)
	{
		scriptBadFlashRedirectURL = badFlashRedirectURL;
	}
	else	// nothing special provided, use current window.
	{
		scriptBadFlashRedirectURL = window.location;
		
		// Modify to add any special URL parameters here
		scriptBadFlashRedirectURL += "?flash=bad"
	}
	
	if (bEscape)
	{
		finalBadFlashRedirectURL = escape(scriptBadFlashRedirectURL);
	}
	else
	{
		finalBadFlashRedirectURL = scriptBadFlashRedirectURL;
	}
	
	return finalBadFlashRedirectURL;
}

// ********************
// fix_gblink_plus_characters
//
// This function is required from server-side implementations where GBLink URL are
// constructed in the server, and will be passed into the ADEBadgeLauncherInstance functions.  
//
// Somewhere in the server variables scope, you would declare a variable that
// receives the GBLink Signed URL that is built in the server-side code
//
// This variable would be declared outside this client-side script block in the server scope
//
// var server_side_GBLinkURL;   // assign GBLink URL into this somewhere in server code
//
// The server-side code that uses GBlink to build a URL is called
//
// Construct the GBLink object
// var oGBLink = Server.CreateObject("ActiveGBLink.GBLink");
// var strQueryParams = oGBLink.BuildQuery( PARAMS );
// var strSignedQuery = oGBLink.SignQuery(strSignatureKey, strQueryParams);
//
// now append the signed query to the base fulfillment server (note the "?")
// server_side_GBLinkURL = "http://" + strFulfillmentServer  + "/fulfill/ebx.etd?" + strSignedQuery; 
//
// This line would plop the server_side_GBLinkURL as text into the client javascript
// var escapedContentURL = escape("<%=server_side_GBLinkURL%>");
//
// This line will fix the + into %2B for proper operation
// escapedContentURL = fix_gblink_plus_characters(escapedContentURL);
//
// ADEBadgeLauncherInstance(..., escapedContentURL, ...);
//
// ********************
//
// Please see supporting file GBLinkExample_ADE_JS.asp as well
//
// ********************
// fix_gblink_plus_characters
//
// Utility function to CHANGE "+" to escaped plus "%2B"
//
// Gblink URL's contain the + character as a space replacement
// in the gbauthdate parameter.  
//
// We discovered that the javascript escape() method leaves the + symbol
// alone, but that inside the Launcher SWF when the URL is played into the
// browser frame, then the + was converted to %20, and the ACS Server would
// give the Malformed Request message
//
// So, we take the extra step to change the "+" to escaped plus "%2B"
// in the string that is the result of the js escape() function
//
// here is what last part of Original gblink URL looks like
// &gbauthdate=6%2F18%2F2007+11%3A33+UTC
// &dateval=1182166430
// &gblver=3
// &auth=a0abe3dae50755f3e0c8e9ce6d334d4472186e22
//
// ********************
function fix_gblink_plus_characters(escapedContentURL)
{
	// CHANGE "+" to escaped plus "%2B"
	//
	var fixedURL = "";
	
	var strFind = "+";
	var lenFind = strFind.length;
	var strReplace = "%2B";	// ASCII + is 0x2B
	
	var iNext = 0;
	
	// Only start if we see gbauthdate
	var iStart = escapedContentURL.indexOf("gbauthdate", 1);
	if (iStart > 0)
	{
		// Serach for find string after gbauthdate
		iStart = escapedContentURL.indexOf(strFind, iStart);
	}
	
	// Replace all instances of the found string
	// Could also write a regexp to do this if desired
	while (iStart > 0)
	{
		// grab data that is before the found string
		fixedURL += escapedContentURL.substring(iNext, iStart);
		
		// replace the found string with replacement string
		fixedURL += strReplace;
		
		// move after the found string
		iNext = iStart + lenFind;
		
		// Check again
		iStart = escapedContentURL.indexOf(strFind, iNext);
	}
	
	// perform the final concat and update escapedContentURL
	if (iNext > 0)
	{
		fixedURL += escapedContentURL.substring(iNext);
	}
	else // never found anything to replace
	{
		//send back original
		fixedURL = escapedContentURL;
	}
	
	return fixedURL;

}


// END of file ADEBadgeLauncher.js