eval(function(p,a,c,k,e,r){e=function(c){return(c35?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}('(G(){9(1l v!="11")H u=v;H v=18.15=G(a,b){I 6 7a v?6.6Y(a,b):1v v(a,b)};9(1l $!="11")H w=$;18.$=v;H x=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;v.1a=v.3x={6Y:G(a,b){a=a||U;9(1l a=="1F"){H m=x.2S(a);9(m&&(m[1]||!b)){9(m[1])a=v.4C([m[1]],b);J{H c=U.3S(m[3]);9(c)9(c.1W!=m[3])I v().1Y(a);J{6[0]=c;6.K=1;I 6}J a=[]}}J I 1v v(b).1Y(a)}J 9(v.1o(a))I 1v v(U)[v.1a.2f?"2f":"3d"](a);I 6.6r(a.1d==1E&&a||(a.4a||a.K&&a!=18&&!a.1y&&a[0]!=11&&a[0].1y)&&v.2p(a)||[a])},4a:"1.2.1",7T:G(){I 6.K},K:0,1V:G(a){I a==11?v.2p(6):6[a]},2k:G(a){H b=v(a);b.4U=6;I b},6r:G(a){6.K=0;1E.3x.1b.16(6,a);I 6},O:G(a,b){I v.O(6,a,b)},4J:G(a){H b=-1;6.O(G(i){9(6==a)b=i});I b},1A:G(c,d,e){H f=c;9(c.1d==3U)9(d==11)I 6.K&&v[e||"1A"](6[0],c)||11;J{f={};f[c]=d}I 6.O(G(a){L(H b 1j f)v.1A(e?6.Q:6,b,v.1e(6,f[b],e,a,b))})},17:G(a,b){I 6.1A(a,b,"3O")},2b:G(e){9(1l e!="5r"&&e!=S)I 6.4n().2Z(U.6E(e));H t="";v.O(e||6,G(){v.O(6.3k,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:v.1a.2b([6])})});I t},5i:G(b){9(6[0])v(b,6[0].3D).6u().3e(6[0]).21(G(){H a=6;22(a.1u)a=a.1u;I a}).2Z(6);I 6},8i:G(a){I 6.O(G(){v(6).6o().5i(a)})},88:G(a){I 6.O(G(){v(6).5i(a)})},2Z:G(){I 6.3z(1q,R,1,G(a){6.58(a)})},6g:G(){I 6.3z(1q,R,-1,G(a){6.3e(a,6.1u)})},6d:G(){I 6.3z(1q,P,1,G(a){6.12.3e(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3e(a,6.2l)})},2F:G(){I 6.4U||v([])},1Y:G(t){H b=v.21(6,G(a){I v.1Y(t,a)});I 6.2k(/[^+>] [^+>]/.14(t)||t.1f("..")>-1?v.4W(b):b)},6u:G(d){H e=6.21(G(){I 6.66?v(6.66)[0]:6.4R(R)});H f=e.1Y("*").4P().O(G(){9(6[y]!=11)6[y]=S});9(d===R)6.1Y("*").4P().O(G(i){H a=v.M(6,"2E");L(H b 1j a)L(H c 1j a[b])v.1i.1g(f[i],b,a[b][c],a[b][c].M)});I e},1D:G(t){I 6.2k(v.1o(t)&&v.3j(6,G(a,b){I t.16(a,[b])})||v.3n(t,6))},5S:G(t){I 6.2k(t.1d==3U&&v.3n(t,6,R)||v.3j(6,G(a){I(t.1d==1E||t.4a)?v.2C(a,t)<0:a!=t}))},1g:G(t){I 6.2k(v.1S(6.1V(),t.1d==3U?v(t).1V():t.K!=11&&(!t.W||v.W(t,"2X"))?t:[t]))},3l:G(a){I a?v.3n(a,6).K>0:P},7b:G(a){I 6.3l("."+a)},30:G(b){9(b==11){9(6.K){H c=6[0];9(v.W(c,"2c")){H d=c.4x,a=[],Y=c.Y,2H=c.N=="2c-2H";9(d<0)I S;L(H i=2H?d:0,38=2H?d+1:Y.K;i<38;i++){H e=Y[i];9(e.24){H b=v.V.1h&&!e.9O["1Q"].9E?e.2b:e.1Q;9(2H)I b;a.1b(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.O(G(){9(b.1d==1E&&/4m|5s/.14(6.N))6.2R=(v.2C(6.1Q,b)>=0||v.2C(6.2M,b)>=0);J 9(v.W(6,"2c")){H a=b.1d==1E?b:[b];v("9b",6).O(G(){6.24=(v.2C(6.1Q,a)>=0||v.2C(6.2b,a)>=0)});9(!a.K)6.4x=-1}J 6.1Q=b})},4o:G(a){I a==11?(6.K?6[0].3L:S):6.4n().2Z(a)},6H:G(a){I 6.50(a).2d()},6G:G(i){I 6.2O(i,i+1)},2O:G(){I 6.2k(1E.3x.2O.16(6,1q))},21:G(b){I 6.2k(v.21(6,G(a,i){I b.2I(a,i,a)}))},4P:G(){I 6.1g(6.4U)},3z:G(c,d,e,f){H g=6.K>1,a;I 6.O(G(){9(!a){a=v.4C(c,6.3D);9(e<0)a.8P()}H b=6;9(d&&v.W(6,"1G")&&v.W(a[0],"4r"))b=6.4g("1J")[0]||6.58(U.5l("1J"));v.O(a,G(){H a=g?6.4R(R):6;9(!5k(0,a))f.2I(b,a)})})}};G 5k(i,a){H b=v.W(a,"1K");9(b){9(a.3g)v.3E({1c:a.3g,3c:P,1X:"1K"});J v.5f(a.2b||a.6s||a.3L||"");9(a.12)a.12.3a(a)}J 9(a.1y==1)v("1K",a).O(5k);I b}v.1m=v.1a.1m=G(){H b=1q[0]||{},a=1,2g=1q.K,5e=P;9(b.1d==8m){5e=b;b=1q[1]||{}}9(2g==1){b=6;a=0}H c;L(;a<2g;a++)9((c=1q[a])!=S)L(H i 1j c){9(b==c[i])6q;9(5e&&1l c[i]==\'5r\'&&b[i])v.1m(b[i],c[i]);J 9(c[i]!=11)b[i]=c[i]}I b};H y="15"+(1v 3B()).3A(),6p=0,5b={};v.1m({87:G(a){18.$=w;9(a)18.15=u;I v},1o:G(a){I!!a&&1l a!="1F"&&!a.W&&a.1d!=1E&&/G/i.14(a+"")},49:G(a){I a.37&&!a.1H||a.36&&a.3D&&!a.3D.1H},5f:G(a){a=v.35(a);9(a){9(18.6k)18.6k(a);J 9(v.V.1P)18.57(a,0);J 3p.2I(18,a)}},W:G(a,b){I a.W&&a.W.25()==b.25()},1L:{},M:G(a,b,c){a=a==18?5b:a;H d=a[y];9(!d)d=a[y]=++6p;9(b&&!v.1L[d])v.1L[d]={};9(c!=11)v.1L[d][b]=c;I b?v.1L[d][b]:d},33:G(a,b){a=a==18?5b:a;H c=a[y];9(b){9(v.1L[c]){2G v.1L[c][b];b="";L(b 1j v.1L[c])23;9(!b)v.33(a)}}J{27{2G a[y]}29(e){9(a.51)a.51(y)}2G v.1L[c]}},O:G(a,b,c){9(c){9(a.K==11)L(H i 1j a)b.16(a[i],c);J L(H i=0,45=a.K;i<45;i++)9(b.16(a[i],c)===P)23}J{9(a.K==11)L(H i 1j a)b.2I(a[i],i,a[i]);J L(H i=0,45=a.K,30=a[0];i<45&&b.2I(30,i,30)!==P;30=a[++i]){}}I a},1e:G(a,b,c,d,e){9(v.1o(b))b=b.2I(a,[d]);H f=/z-?4J|7Q-?7P|1r|68|7O-?1I/i;I b&&b.1d==4Y&&c=="3O"&&!f.14(e)?b+"2K":b},1n:{1g:G(b,c){v.O((c||"").2t(/\\s+/),G(i,a){9(!v.1n.3H(b.1n,a))b.1n+=(b.1n?" ":"")+a})},2d:G(b,c){b.1n=c!=11?v.3j(b.1n.2t(/\\s+/),G(a){I!v.1n.3H(c,a)}).65(" "):""},3H:G(t,c){I v.2C(c,(t.1n||t).3u().2t(/\\s+/))>-1}},2u:G(e,o,f){L(H i 1j o){e.Q["3K"+i]=e.Q[i];e.Q[i]=o[i]}f.16(e,[]);L(H i 1j o)e.Q[i]=e.Q["3K"+i]},17:G(e,p){9(p=="1I"||p=="2Q"){H b={},41,40,d=["7I","7G","7F","7D"];v.O(d,G(){b["7B"+6]=0;b["7A"+6+"5Y"]=0});v.2u(e,b,G(){9(v(e).3l(\':3R\')){41=e.7z;40=e.7x}J{e=v(e.4R(R)).1Y(":4m").5U("2R").2F().17({4B:"1N",2W:"4D",19:"2Y",7o:"0",1R:"0"}).5Q(e.12)[0];H a=v.17(e.12,"2W")||"3W";9(a=="3W")e.12.Q.2W="7h";41=e.7e;40=e.7c;9(a=="3W")e.12.Q.2W="3W";e.12.3a(e)}});I p=="1I"?41:40}I v.3O(e,p)},3O:G(d,e,f){H g,2w=[],2u=[];G 3N(a){9(!v.V.1P)I P;H b=U.3r.3Z(a,S);I!b||b.4y("3N")==""}9(e=="1r"&&v.V.1h){g=v.1A(d.Q,"1r");I g==""?"1":g}9(e.1t(/4l/i))e=B;9(!f&&d.Q[e])g=d.Q[e];J 9(U.3r&&U.3r.3Z){9(e.1t(/4l/i))e="4l";e=e.1p(/([A-Z])/g,"-$1").2o();H h=U.3r.3Z(d,S);9(h&&!3N(d))g=h.4y(e);J{L(H a=d;a&&3N(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3N(2w[a])){2u[a]=2w[a].Q.19;2w[a].Q.19="2Y"}g=e=="19"&&2u[2w.K-1]!=S?"2h":U.3r.3Z(d,S).4y(e)||"";L(a=0;a<2u.K;a++)9(2u[a]!=S)2w[a].Q.19=2u[a]}9(e=="1r"&&g=="")g="1"}J 9(d.4h){H i=e.1p(/\\-(\\w)/g,G(m,c){I c.25()});g=d.4h[e]||d.4h[i];9(!/^\\d+(2K)?$/i.14(g)&&/^\\d/.14(g)){H j=d.Q.1R;H k=d.4v.1R;d.4v.1R=d.4h.1R;d.Q.1R=g||0;g=d.Q.70+"2K";d.Q.1R=j;d.4v.1R=k}}I g},4C:G(a,e){H r=[];e=e||U;v.O(a,G(i,c){9(!c)I;9(c.1d==4Y)c=c.3u();9(1l c=="1F"){c=c.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(6Z|9U|6W|9N|4c|9K|9G|39|9C|9z)$/i)?m:a+">"});H s=v.35(c).2o(),1w=e.5l("1w"),2q=[];H d=!s.1f("<9u")&&[1,"<2c>",""]||!s.1f("<9q")&&[1,"<6Q>",""]||s.1t(/^<(9p|1J|9o|9m|9j)/)&&[1,"<1G>",""]||!s.1f("<4r")&&[2,"<1G><1J>",""]||(!s.1f("<9h")||!s.1f("<9e"))&&[3,"<1G><1J><4r>",""]||!s.1f("<6W")&&[2,"<1G><1J><6L>",""]||v.V.1h&&[1,"1w<1w>",""]||[0,"",""];1w.3L=d[1]+c+d[2];22(d[0]--)1w=1w.5p;9(v.V.1h){9(!s.1f("<1G")&&s.1f("<1J")<0)2q=1w.1u&&1w.1u.3k;J 9(d[1]=="<1G>"&&s.1f("<1J")<0)2q=1w.3k;L(H n=2q.K-1;n>=0;--n)9(v.W(2q[n],"1J")&&!2q[n].3k.K)2q[n].12.3a(2q[n]);9(/^\\s/.14(c))1w.3e(e.6E(c.1t(/^\\s*/)[0]),1w.1u)}c=v.2p(1w.3k)}9(0===c.K&&(!v.W(c,"2X")&&!v.W(c,"2c")))I;9(c[0]==11||v.W(c,"2X")||c.Y)r.1b(c);J r=v.1S(r,c)});I r},1A:G(a,c,d){H e=v.49(a)?{}:v.5o;9(c=="24"&&v.V.1P)a.12.4x;9(e[c]){9(d!=11)a[e[c]]=d;I a[e[c]]}J 9(v.V.1h&&c=="Q")I v.1A(a.Q,"9a",d);J 9(d==11&&v.V.1h&&v.W(a,"2X")&&(c=="97"||c=="94"))I a.91(c).6x;J 9(a.36){9(d!=11){9(c=="N"&&v.W(a,"4c")&&a.12)6I"N 90 8Z\'t 8Y 8X";a.8W(c,d)}9(v.V.1h&&/6D|3g/.14(c)&&!v.49(a))I a.4p(c,2);I a.4p(c)}J{9(c=="1r"&&v.V.1h){9(d!=11){a.68=1;a.1D=(a.1D||"").1p(/6C\\([^)]*\\)/,"")+(3C(d).3u()=="8O"?"":"6C(1r="+d*6A+")")}I a.1D?(3C(a.1D.1t(/1r=([^)]*)/)[1])/6A).3u():""}c=c.1p(/-([a-z])/8N,G(z,b){I b.25()});9(d!=11)a[c]=d;I a[c]}},35:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2p:G(a){H r=[];9(1l a!="8M")L(H i=0,2g=a.K;i<2g;i++)r.1b(a[i]);J r=a.2O(0);I r},2C:G(b,a){L(H i=0,2g=a.K;i<2g;i++)9(a[i]==b)I i;I-1},1S:G(a,b){9(v.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1b(b[i])}J L(H i=0;b[i];i++)a.1b(b[i]);I a},4W:G(a){H r=[],28={};27{L(H i=0,6y=a.K;i<6y;i++){H b=v.M(a[i]);9(!28[b]){28[b]=R;r.1b(a[i])}}}29(e){r=a}I r},3j:G(a,b,c){9(1l b=="1F")b=3p("P||G(a,i){I "+b+"}");H d=[];L(H i=0,4t=a.K;i<4t;i++)9(!c&&b(a[i],i)||c&&!b(a[i],i))d.1b(a[i]);I d},21:G(a,b){9(1l b=="1F")b=3p("P||G(a){I "+b+"}");H c=[];L(H i=0,4t=a.K;i<4t;i++){H d=b(a[i],i);9(d!==S&&d!=11){9(d.1d!=1E)d=[d];c=c.8J(d)}}I c}});H A=8H.8G.2o();v.V={4d:(A.1t(/.+(?:8E|8C|8B|8A)[\\/: ]([\\d.]+)/)||[])[1],1P:/6v/.14(A),3f:/3f/.14(A),1h:/1h/.14(A)&&!/3f/.14(A),34:/34/.14(A)&&!/(8y|6v)/.14(A)};H B=v.V.1h?"4i":"5h";v.1m({5g:!v.V.1h||U.8x=="8w",4i:v.V.1h?"4i":"5h",5o:{"L":"8v","8u":"1n","4l":B,5h:B,4i:B,3L:"3L",1n:"1n",1Q:"1Q",3b:"3b",2R:"2R",8t:"8s",24:"24",8r:"8q"}});v.O({1C:"a.12",8p:"15.4f(a,\'12\')",8o:"15.2J(a,2,\'2l\')",8n:"15.2J(a,2,\'4e\')",8l:"15.4f(a,\'2l\')",8k:"15.4f(a,\'4e\')",8j:"15.5d(a.12.1u,a)",8h:"15.5d(a.1u)",6o:"15.W(a,\'8g\')?a.8e||a.8d.U:15.2p(a.3k)"},G(i,n){v.1a[i]=G(a){H b=v.21(6,n);9(a&&1l a=="1F")b=v.3n(a,b);I 6.2k(v.4W(b))}});v.O({5Q:"2Z",8c:"6g",3e:"6d",8b:"50",8a:"6H"},G(i,n){v.1a[i]=G(){H a=1q;I 6.O(G(){L(H j=0,2g=a.K;j<2g;j++)v(a[j])[n](6)})}});v.O({5U:G(a){v.1A(6,a,"");6.51(a)},89:G(c){v.1n.1g(6,c)},86:G(c){v.1n.2d(6,c)},85:G(c){v.1n[v.1n.3H(6,c)?"2d":"1g"](6,c)},2d:G(a){9(!a||v.1D(a,[6]).r.K){v.33(6);6.12.3a(6)}},4n:G(){v("*",6).O(G(){v.33(6)});22(6.1u)6.3a(6.1u)}},G(i,n){v.1a[i]=G(){I 6.O(n,1q)}});v.O(["84","5Y"],G(i,a){H n=a.2o();v.1a[n]=G(h){I 6[0]==18?v.V.1P&&3m["83"+a]||v.5g&&2V.38(U.37["5a"+a],U.1H["5a"+a])||U.1H["5a"+a]:6[0]==U?2V.38(U.1H["6m"+a],U.1H["6l"+a]):h==11?(6.K?v.17(6[0],n):S):6.17(n,h.1d==3U?h:h+"2K")}});H C=v.V.1P&&3y(v.V.4d)<82?"(?:[\\\\w*59-]|\\\\\\\\.)":"(?:[\\\\w\\81-\\80*59-]|\\\\\\\\.)",6j=1v 48("^>\\\\s*("+C+"+)"),6i=1v 48("^("+C+"+)(#)("+C+"+)"),6h=1v 48("^([#.]?)("+C+"*)");v.1m({55:{"":"m[2]==\'*\'||15.W(a,m[2])","#":"a.4p(\'1W\')==m[2]",":":{7Z:"im[3]-0",2J:"m[3]-0==i",6G:"m[3]-0==i",3w:"i==0",3v:"i==r.K-1",6f:"i%2==0",6e:"i%2","3w-47":"a.12.4g(\'*\')[0]==a","3v-47":"15.2J(a.12.5p,1,\'4e\')==a","7X-47":"!15.2J(a.12.5p,2,\'4e\')",1C:"a.1u",4n:"!a.1u",7W:"(a.6s||a.7V||15(a).2b()||\'\').1f(m[3])>=0",3R:\'"1N"!=a.N&&15.17(a,"19")!="2h"&&15.17(a,"4B")!="1N"\',1N:\'"1N"==a.N||15.17(a,"19")=="2h"||15.17(a,"4B")=="1N"\',7U:"!a.3b",3b:"a.3b",2R:"a.2R",24:"a.24||15.1A(a,\'24\')",2b:"\'2b\'==a.N",4m:"\'4m\'==a.N",5s:"\'5s\'==a.N",54:"\'54\'==a.N",53:"\'53\'==a.N",52:"\'52\'==a.N",6c:"\'6c\'==a.N",6b:"\'6b\'==a.N",2m:\'"2m"==a.N||15.W(a,"2m")\',4c:"/4c|2c|6a|2m/i.14(a.W)",3H:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.W)",7R:"15.3j(15.32,G(1a){I a==1a.T;}).K"}},69:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1v 48("^([:.#]*)("+C+"+)")],3n:G(a,b,c){H d,2e=[];22(a&&a!=d){d=a;H f=v.1D(a,b,c);a=f.t.1p(/^\\s*,\\s*/,"");2e=c?b=f.r:v.1S(2e,f.r)}I 2e},1Y:G(t,a){9(1l t!="1F")I[t];9(a&&!a.1y)a=S;a=a||U;H b=[a],28=[],3v;22(t&&3v!=t){H r=[];3v=t;t=v.35(t);H d=P;H e=6j;H m=e.2S(t);9(m){H f=m[1].25();L(H i=0;b[i];i++)L(H c=b[i].1u;c;c=c.2l)9(c.1y==1&&(f=="*"||c.W.25()==f.25()))r.1b(c);b=r;t=t.1p(e,"");9(t.1f(" ")==0)6q;d=R}J{e=/^([>+~])\\s*(\\w*)/i;9((m=e.2S(t))!=S){r=[];H f=m[2],1S={};m=m[1];L(H j=0,31=b.K;j<31;j++){H n=m=="~"||m=="+"?b[j].2l:b[j].1u;L(;n;n=n.2l)9(n.1y==1){H g=v.M(n);9(m=="~"&&1S[g])23;9(!f||n.W.25()==f.25()){9(m=="~")1S[g]=R;r.1b(n)}9(m=="+")23}}b=r;t=v.35(t.1p(e,""));d=R}}9(t&&!d){9(!t.1f(",")){9(a==b[0])b.44();28=v.1S(28,b);r=b=[a];t=" "+t.67(1,t.K)}J{H h=6i;H m=h.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{h=6h;m=h.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H k=b[b.K-1];9(m[1]=="#"&&k&&k.3S&&!v.49(k)){H l=k.3S(m[2]);9((v.V.1h||v.V.3f)&&l&&1l l.1W=="1F"&&l.1W!=m[2])l=v(\'[@1W="\'+m[2]+\'"]\',k)[0];b=r=l&&(!m[3]||v.W(l,m[3]))?[l]:[]}J{L(H i=0;b[i];i++){H o=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(o=="*"&&b[i].W.2o()=="5r")o="39";r=v.1S(r,b[i].4g(o))}9(m[1]==".")r=v.4Z(r,m[2]);9(m[1]=="#"){H p=[];L(H i=0;r[i];i++)9(r[i].4p("1W")==m[2]){p=[r[i]];23}r=p}b=r}t=t.1p(h,"")}}9(t){H q=v.1D(t,r);b=r=q.r;t=v.35(q.t)}}9(t)b=[];9(b&&a==b[0])b.44();28=v.1S(28,b);I 28},4Z:G(r,m,a){m=" "+m+" ";H b=[];L(H i=0;r[i];i++){H c=(" "+r[i].1n+" ").1f(m)>=0;9(!a&&c||a&&!c)b.1b(r[i])}I b},1D:G(t,r,b){H d;22(t&&t!=d){d=t;H p=v.69,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7N(m[0].K);m[2]=m[2].1p(/\\\\/g,"");23}}9(!m)23;9(m[1]==":"&&m[2]=="5S")r=v.1D(m[3],r,R).r;J 9(m[1]==".")r=v.4Z(r,m[2],b);J 9(m[1]=="["){H e=[],N=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[v.5o[m[2]]||m[2]];9(z==S||/6D|3g|24/.14(m[2]))z=v.1A(a,m[2])||\'\';9((N==""&&!!z||N=="="&&z==m[5]||N=="!="&&z!=m[5]||N=="^="&&z&&!z.1f(m[5])||N=="$="&&z.67(z.K-m[5].K)==m[5]||(N=="*="||N=="~=")&&z.1f(m[5])>=0)^b)e.1b(a)}r=e}J 9(m[1]==":"&&m[2]=="2J-47"){H g={},e=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3w=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H h=r[i],12=h.12,1W=v.M(12);9(!g[1W]){H c=1;L(H n=12.1u;n;n=n.2l)9(n.1y==1)n.4X=c++;g[1W]=R}H j=P;9(3w==1){9(d==0||h.4X==d)j=R}J 9((h.4X+d)%3w==0)j=R;9(j^b)e.1b(h)}r=e}J{H f=v.55[m[1]];9(1l f!="1F")f=v.55[m[1]][m[2]];f=3p("P||G(a,i){I "+f+"}");r=v.3j(r,f,b)}}I{r:r,t:t}},4f:G(a,b){H c=[];H d=a[b];22(d&&d!=U){9(d.1y==1)c.1b(d);d=d[b]}I c},2J:G(a,b,c,d){b=b||1;H e=0;L(;a;a=a[c])9(a.1y==1&&++e==b)23;I a},5d:G(n,a){H r=[];L(;n;n=n.2l){9(n.1y==1&&(!a||n!=a))r.1b(n)}I r}});v.1i={1g:G(b,c,d,e){9(v.V.1h&&b.43!=11)b=18;9(!d.2s)d.2s=6.2s++;9(e!=11){H f=d;d=G(){I f.16(6,1q)};d.M=e;d.2s=f.2s}H g=c.2t(".");c=g[0];d.N=g[1];H h=v.M(b,"2E")||v.M(b,"2E",{});H i=v.M(b,"2r",G(){H a;9(1l v=="11"||v.1i.4V)I a;a=v.1i.2r.16(b,1q);I a});H j=h[c];9(!j){j=h[c]={};9(b.4T)b.4T(c,i,P);J b.7M("42"+c,i)}j[d.2s]=d;6.1U[c]=R},2s:1,1U:{},2d:G(a,b,c){H d=v.M(a,"2E"),2N,4J;9(1l b=="1F"){H e=b.2t(".");b=e[0]}9(d){9(b&&b.N){c=b.4S;b=b.N}9(!b){L(b 1j d)6.2d(a,b)}J 9(d[b]){9(c)2G d[b][c.2s];J L(c 1j d[b])9(!e[1]||d[b][c].N==e[1])2G d[b][c];L(2N 1j d[b])23;9(!2N){9(a.4Q)a.4Q(b,v.M(a,"2r"),P);J a.7L("42"+b,v.M(a,"2r"));2N=S;2G d[b]}}L(2N 1j d)23;9(!2N){v.33(a,"2E");v.33(a,"2r")}}},1M:G(a,b,c,d,e){b=v.2p(b||[]);9(!c){9(6.1U[a])v("*").1g([18,U]).1M(a,b)}J{H f,2N,1a=v.1o(c[a]||S),4O=!b[0]||!b[0].2P;9(4O)b.4w(6.4N({N:a,2v:c}));b[0].N=a;9(v.1o(v.M(c,"2r")))f=v.M(c,"2r").16(c,b);9(!1a&&c["42"+a]&&c["42"+a].16(c,b)===P)f=P;9(4O)b.44();9(e&&e.16(c,b)===P)f=P;9(1a&&d!==P&&f!==P&&!(v.W(c,\'a\')&&a=="4M")){6.4V=R;c[a]()}6.4V=P}I f},2r:G(a){H b;a=v.1i.4N(a||18.1i||{});H d=a.N.2t(".");a.N=d[0];H c=v.M(6,"2E")&&v.M(6,"2E")[a.N],3t=1E.3x.2O.2I(1q,1);3t.4w(a);L(H j 1j c){3t[0].4S=c[j];3t[0].M=c[j].M;9(!d[1]||c[j].N==d[1]){H e=c[j].16(6,3t);9(b!==P)b=e;9(e===P){a.2P();a.3s()}}}9(v.V.1h)a.2v=a.2P=a.3s=a.4S=a.M=S;I b},4N:G(a){H c=a;a=v.1m({},c);a.2P=G(){9(c.2P)c.2P();c.7K=P};a.3s=G(){9(c.3s)c.3s();c.7J=R};9(!a.2v&&a.64)a.2v=a.64;9(v.V.1P&&a.2v.1y==3)a.2v=c.2v.12;9(!a.4L&&a.4K)a.4L=a.4K==a.2v?a.7H:a.4K;9(a.63==S&&a.62!=S){H e=U.37,b=U.1H;a.63=a.62+(e&&e.2U||b.2U||0);a.7E=a.7C+(e&&e.2A||b.2A||0)}9(!a.3Y&&(a.61||a.60))a.3Y=a.61||a.60;9(!a.5Z&&a.5X)a.5Z=a.5X;9(!a.3Y&&a.2m)a.3Y=(a.2m&1?1:(a.2m&2?3:(a.2m&4?2:0)));I a}};v.1a.1m({3T:G(a,b,c){I a=="5W"?6.2H(a,b,c):6.O(G(){v.1i.1g(6,a,c||b,c&&b)})},2H:G(b,c,d){I 6.O(G(){v.1i.1g(6,b,G(a){v(6).5L(a);I(d||c).16(6,1q)},d&&c)})},5L:G(a,b){I 6.O(G(){v.1i.2d(6,a,b)})},1M:G(a,b,c){I 6.O(G(){v.1i.1M(a,b,6,R,c)})},7y:G(a,b,c){9(6[0])I v.1i.1M(a,b,6[0],P,c)},2a:G(){H a=1q;I 6.4M(G(e){6.4I=0==6.4I?1:0;e.2P();I a[6.4I].16(6,[e])||P})},7w:G(f,g){G 4G(e){H p=e.4L;22(p&&p!=6)27{p=p.12}29(e){p=6};9(p==6)I P;I(e.N=="4F"?f:g).16(6,[e])}I 6.4F(4G).5T(4G)},2f:G(f){5P();9(v.3X)f.16(U,[v]);J v.3o.1b(G(){I f.16(6,[v])});I 6}});v.1m({3X:P,3o:[],2f:G(){9(!v.3X){v.3X=R;9(v.3o){v.O(v.3o,G(){6.16(U)});v.3o=S}9(v.V.34||v.V.3f)U.4Q("5R",v.2f,P);9(!18.7v.K)v(18).3d(G(){v("#4E").2d()})}}});v.O(("7u,7s,3d,7r,6m,5W,4M,7q,"+"7p,7n,7m,4F,5T,7l,2c,"+"52,7k,7j,7t,3V").2t(","),G(i,o){v.1a[o]=G(f){I f?6.3T(o,f):6.1M(o)}});H D=P;G 5P(){9(D)I;D=R;9(v.V.34||v.V.3f)U.4T("5R",v.2f,P);J 9(v.V.1h){U.7i("<7g"+"7f 1W=4E 7d=R "+"3g=//:><\\/1K>");H a=U.3S("4E");9(a)a.5V=G(){9(6.2z!="1k")I;v.2f()};a=S}J 9(v.V.1P)v.4H=43(G(){9(U.2z=="5O"||U.2z=="1k"){4A(v.4H);v.4H=S;v.2f()}},10);v.1i.1g(18,"3d",v.2f)}v.1a.1m({3d:G(c,d,e){9(v.1o(c))I 6.3T("3d",c);H f=c.1f(" ");9(f>=0){H g=c.2O(f,c.K);c=c.2O(0,f)}e=e||G(){};H h="4z";9(d)9(v.1o(d)){e=d;d=S}J{d=v.39(d);h="5N"}H i=6;v.3E({1c:c,N:h,M:d,1k:G(a,b){9(b=="1B"||b=="5M")i.4o(g?v("<1w/>").2Z(a.4u.1p(/<1K(.|\\s)*?\\/1K>/g,"")).1Y(g):a.4u);57(G(){i.O(e,[a.4u,b,a])},13)}});I 6},79:G(){I v.39(6.5K())},5K:G(){I 6.21(G(){I v.W(6,"2X")?v.2p(6.78):6}).1D(G(){I 6.2M&&!6.3b&&(6.2R||/2c|6a/i.14(6.W)||/2b|1N|53/i.14(6.N))}).21(G(i,b){H c=v(6).30();I c==S?S:c.1d==1E?v.21(c,G(a,i){I{2M:b.2M,1Q:a}}):{2M:b.2M,1Q:c}}).1V()}});v.O("5J,5I,6t,5H,5G,5F".2t(","),G(i,o){v.1a[o]=G(f){I 6.3T(o,f)}});H E=(1v 3B).3A();v.1m({1V:G(a,b,c,d){9(v.1o(b)){c=b;b=S}I v.3E({N:"4z",1c:a,M:b,1B:c,1X:d})},77:G(a,b){I v.1V(a,S,b,"1K")},76:G(a,b,c){I v.1V(a,b,c,"46")},75:G(a,b,c,d){9(v.1o(b)){c=b;b={}}I v.3E({N:"5N",1c:a,M:b,1B:c,1X:d})},74:G(a){v.1m(v.56,a)},56:{1U:R,N:"4z",2y:0,5E:"73/x-72-2X-71",6n:R,3c:R,M:S},3Q:{},3E:G(s){H c,2B=/=(\\?|%3F)/g,1s,M;s=v.1m(R,s,v.1m(R,{},v.56,s));9(s.M&&s.6n&&1l s.M!="1F")s.M=v.39(s.M);9(s.1X=="4b"){9(s.N.2o()=="1V"){9(!s.1c.1t(2B))s.1c+=(s.1c.1t(/\\?/)?"&":"?")+(s.4b||"5D")+"=?"}J 9(!s.M||!s.M.1t(2B))s.M=(s.M?s.M+"&":"")+(s.4b||"5D")+"=?";s.1X="46"}9(s.1X=="46"&&(s.M&&s.M.1t(2B)||s.1c.1t(2B))){c="4b"+E++;9(s.M)s.M=s.M.1p(2B,"="+c);s.1c=s.1c.1p(2B,"="+c);s.1X="1K";18[c]=G(a){M=a;1B();1k();18[c]=11;27{2G 18[c]}29(e){}}}9(s.1X=="1K"&&s.1L==S)s.1L=P;9(s.1L===P&&s.N.2o()=="1V")s.1c+=(s.1c.1t(/\\?/)?"&":"?")+"59="+(1v 3B()).3A();9(s.M&&s.N.2o()=="1V"){s.1c+=(s.1c.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1U&&!v.5c++)v.1i.1M("5J");9(!s.1c.1f("8f")&&s.1X=="1K"){H d=U.4g("9T")[0];H f=U.5l("1K");f.3g=s.1c;9(!c&&(s.1B||s.1k)){H g=P;f.9Q=f.5V=G(){9(!g&&(!6.2z||6.2z=="5O"||6.2z=="1k")){g=R;1B();1k();d.3a(f)}}}d.58(f);I}H h=P;H i=18.6X?1v 6X("9P.9M"):1v 6V();i.9L(s.N,s.1c,s.3c);9(s.M)i.5A("9I-9H",s.5E);9(s.5y)i.5A("9F-5x-9D",v.3Q[s.1c]||"9B, 9A 9y 9x 5w:5w:5w 9w");i.5A("X-9v-9r","6V");9(s.6T)s.6T(i);9(s.1U)v.1i.1M("5F",[i,s]);H j=G(a){9(!h&&i&&(i.2z==4||a=="2y")){h=R;9(k){4A(k);k=S}1s=a=="2y"&&"2y"||!v.6S(i)&&"3V"||s.5y&&v.6R(i,s.1c)&&"5M"||"1B";9(1s=="1B"){27{M=v.6w(i,s.1X)}29(e){1s="5j"}}9(1s=="1B"){H b;27{b=i.5u("6P-5x")}29(e){}9(s.5y&&b)v.3Q[s.1c]=b;9(!c)1B()}J v.5t(s,i,1s);1k();9(s.3c)i=S}};9(s.3c){H k=43(j,13);9(s.2y>0)57(G(){9(i){i.9n();9(!h)j("2y")}},s.2y)}27{i.9l(s.M)}29(e){v.5t(s,i,S,e)}9(!s.3c)j();I i;G 1B(){9(s.1B)s.1B(M,1s);9(s.1U)v.1i.1M("5G",[i,s])}G 1k(){9(s.1k)s.1k(i,1s);9(s.1U)v.1i.1M("6t",[i,s]);9(s.1U&&!--v.5c)v.1i.1M("5I")}},5t:G(s,a,b,e){9(s.3V)s.3V(a,b,e);9(s.1U)v.1i.1M("5H",[a,s,e])},5c:0,6S:G(r){27{I!r.1s&&9k.9i=="54:"||(r.1s>=6O&&r.1s<9g)||r.1s==6N||v.V.1P&&r.1s==11}29(e){}I P},6R:G(a,b){27{H c=a.5u("6P-5x");I a.1s==6N||c==v.3Q[b]||v.V.1P&&a.1s==11}29(e){}I P},6w:G(r,a){H b=r.5u("9d-N");H c=a=="6M"||!a&&b&&b.1f("6M")>=0;H d=c?r.9c:r.4u;9(c&&d.37.36=="5j")6I"5j";9(a=="1K")v.5f(d);9(a=="46")d=3p("("+d+")");I d},39:G(a){H s=[];9(a.1d==1E||a.4a)v.O(a,G(){s.1b(3h(6.2M)+"="+3h(6.1Q))});J L(H j 1j a)9(a[j]&&a[j].1d==1E)v.O(a[j],G(){s.1b(3h(j)+"="+3h(6))});J s.1b(3h(j)+"="+3h(a[j]));I s.65("&").1p(/%20/g,"+")}});v.1a.1m({1x:G(a,b){I a?6.1T({1I:"1x",2Q:"1x",1r:"1x"},a,b):6.1D(":1N").O(G(){6.Q.19=6.3i?6.3i:"";9(v.17(6,"19")=="2h")6.Q.19="2Y"}).2F()},1z:G(a,b){I a?6.1T({1I:"1z",2Q:"1z",1r:"1z"},a,b):6.1D(":3R").O(G(){6.3i=6.3i||v.17(6,"19");9(6.3i=="2h")6.3i="2Y";6.Q.19="2h"}).2F()},6K:v.1a.2a,2a:G(a,b){I v.1o(a)&&v.1o(b)?6.6K(a,b):a?6.1T({1I:"2a",2Q:"2a",1r:"2a"},a,b):6.O(G(){v(6)[v(6).3l(":1N")?"1x":"1z"]()})},99:G(a,b){I 6.1T({1I:"1x"},a,b)},98:G(a,b){I 6.1T({1I:"1z"},a,b)},96:G(a,b){I 6.1T({1I:"2a"},a,b)},95:G(a,b){I 6.1T({1r:"1x"},a,b)},93:G(a,b){I 6.1T({1r:"1z"},a,b)},92:G(a,b,c){I 6.1T({1r:b},a,c)},1T:G(g,h,i,j){H k=v.6J(h,i,j);I 6[k.3q===P?"O":"3q"](G(){k=v.1m({},k);H f=v(6).3l(":1N"),3m=6;L(H p 1j g){9(g[p]=="1z"&&f||g[p]=="1x"&&!f)I v.1o(k.1k)&&k.1k.16(6);9(p=="1I"||p=="2Q"){k.19=v.17(6,"19");k.2D=6.Q.2D}}9(k.2D!=S)6.Q.2D="1N";k.3J=v.1m({},g);v.O(g,G(a,b){H e=1v v.2j(3m,k,a);9(/2a|1x|1z/.14(b))e[b=="2a"?f?"1x":"1z":b](g);J{H c=b.3u().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2e(R)||0;9(c){H d=3C(c[2]),2i=c[3]||"2K";9(2i!="2K"){3m.Q[a]=(d||1)+2i;1O=((d||1)/e.2e(R))*1O;3m.Q[a]=1O+2i}9(c[1])d=((c[1]=="-="?-1:1)*d)+1O;e.3I(1O,d,2i)}J e.3I(1O,b,"")}});I R})},3q:G(a,b){9(v.1o(a)){b=a;a="2j"}9(!a||(1l a=="1F"&&!b))I F(6[0],a);I 6.O(G(){9(b.1d==1E)F(6,a,b);J{F(6,a).1b(b);9(F(6,a).K==1)b.16(6)}})},9f:G(){H a=v.32;I 6.O(G(){L(H i=0;i-8L?r:3C(v.17(6.T,6.1e))||0},3I:G(b,c,d){6.5n=(1v 3B()).3A();6.1O=b;6.2F=c;6.2i=d||6.2i||"2K";6.2x=6.1O;6.4q=6.4s=0;6.4k();H e=6;G t(){I e.2L()}t.T=6.T;v.32.1b(t);9(v.32.K==1){H f=43(G(){H a=v.32;L(H i=0;i6.Y.26+6.5n){6.2x=6.2F;6.4q=6.4s=1;6.4k();6.Y.3J[6.1e]=R;H a=R;L(H i 1j 6.Y.3J)9(6.Y.3J[i]!==R)a=P;9(a){9(6.Y.19!=S){6.T.Q.2D=6.Y.2D;6.T.Q.19=6.Y.19;9(v.17(6.T,"19")=="2h")6.T.Q.19="2Y"}9(6.Y.1z)6.T.Q.19="2h";9(6.Y.1z||6.Y.1x)L(H p 1j 6.Y.3J)v.1A(6.T.Q,p,6.Y.3G[p])}9(a&&v.1o(6.Y.1k))6.Y.1k.16(6.T);I P}J{H n=t-6.5n;6.4s=n/6.Y.26;6.4q=v.3M[6.Y.3M||(v.3M.5v?"5v":"6B")](6.4s,n,0,1,6.Y.26);6.2x=6.1O+((6.2F-6.1O)*6.4q);6.4k()}I R}};v.2j.2L={2U:G(a){a.T.2U=a.2x},2A:G(a){a.T.2A=a.2x},1r:G(a){v.1A(a.T.Q,"1r",a.2x)},6z:G(a){a.T.Q[a.1e]=a.2x+a.2i}};v.1a.6l=G(){H b=0,3P=0,T=6[0],5m;9(T)8I(v.V){H c=v.17(T,"2W")=="4D",1C=T.12,1Z=T.1Z,2T=T.3D,4j=1P&&3y(4d)<9J;9(T.6U){5z=T.6U();1g(5z.1R+2V.38(2T.37.2U,2T.1H.2U),5z.3P+2V.38(2T.37.2A,2T.1H.2A));9(1h){H d=v("4o").17("8F");d=(d=="8D"||v.5g&&3y(4d)>=7)&&2||d;1g(-d,-d)}}J{1g(T.5C,T.5B);22(1Z){1g(1Z.5C,1Z.5B);9(34&&/^t[d|h]$/i.14(1C.36)||!4j)d(1Z);9(4j&&!c&&v.17(1Z,"2W")=="4D")c=R;1Z=1Z.1Z}22(1C.36&&!/^1H|4o$/i.14(1C.36)){9(!/^9R|1G-9S.*$/i.14(v.17(1C,"19")))1g(-1C.2U,-1C.2A);9(34&&v.17(1C,"2D")!="3R")d(1C);1C=1C.12}9(4j&&c)1g(-2T.1H.5C,-2T.1H.5B)}5m={3P:3P,1R:b}}I 5m;G d(a){1g(v.17(a,"8z"),v.17(a,"9V"))}G 1g(l,t){b+=3y(l)||0;3P+=3y(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|type|each|false|style|true|null|elem|document|browser|nodeName||options|||undefined|parentNode||test|jQuery|apply|css|window|display|fn|push|url|constructor|prop|indexOf|add|msie|event|in|complete|typeof|extend|className|isFunction|replace|arguments|opacity|status|match|firstChild|new|div|show|nodeType|hide|attr|success|parent|filter|Array|string|table|body|height|tbody|script|cache|trigger|hidden|start|safari|value|left|merge|animate|global|get|id|dataType|find|offsetParent||map|while|break|selected|toUpperCase|duration|try|done|catch|toggle|text|select|remove|cur|ready|al|none|unit|fx|pushStack|nextSibling|button||toLowerCase|makeArray|tb|handle|guid|split|swap|target|stack|now|timeout|readyState|scrollTop|jsre|inArray|overflow|events|end|delete|one|call|nth|px|step|name|ret|slice|preventDefault|width|checked|exec|doc|scrollLeft|Math|position|form|block|append|val|rl|timers|removeData|mozilla|trim|tagName|documentElement|max|param|removeChild|disabled|async|load|insertBefore|opera|src|encodeURIComponent|oldblock|grep|childNodes|is|self|multiFilter|readyList|eval|queue|defaultView|stopPropagation|args|toString|last|first|prototype|parseInt|domManip|getTime|Date|parseFloat|ownerDocument|ajax||orig|has|custom|curAnim|old|innerHTML|easing|color|curCSS|top|lastModified|visible|getElementById|bind|String|error|static|isReady|which|getComputedStyle|oWidth|oHeight|on|setInterval|shift|ol|json|child|RegExp|isXMLDoc|jquery|jsonp|input|version|previousSibling|dir|getElementsByTagName|currentStyle|styleFloat|safari2|update|float|radio|empty|html|getAttribute|pos|tr|state|el|responseText|runtimeStyle|unshift|selectedIndex|getPropertyValue|GET|clearInterval|visibility|clean|absolute|__ie_init|mouseover|handleHover|safariTimer|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|cloneNode|handler|addEventListener|prevObject|triggered|unique|nodeIndex|Number|classFilter|after|removeAttribute|submit|password|file|expr|ajaxSettings|setTimeout|appendChild|_|client|win|active|sibling|deep|globalEval|boxModel|cssFloat|wrapAll|parsererror|evalScript|createElement|results|startTime|props|lastChild|dequeue|object|checkbox|handleError|getResponseHeader|swing|00|Modified|ifModified|box|setRequestHeader|offsetTop|offsetLeft|callback|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|unbind|notmodified|POST|loaded|bindReady|appendTo|DOMContentLoaded|not|mouseout|removeAttr|onreadystatechange|unload|ctrlKey|Width|metaKey|keyCode|charCode|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|before|odd|even|prepend|quickClass|quickID|quickChild|execScript|offset|scroll|processData|contents|uuid|continue|setArray|textContent|ajaxComplete|clone|webkit|httpData|nodeValue|fl|_default|100|linear|alpha|href|createTextNode|splice|eq|replaceWith|throw|speed|_toggle|colgroup|xml|304|200|Last|fieldset|httpNotModified|httpSuccess|beforeSend|getBoundingClientRect|XMLHttpRequest|col|ActiveXObject|init|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|instanceof|hasClass|clientWidth|defer|clientHeight|ipt|scr|relative|write|keypress|keydown|change|mousemove|mouseup|right|mousedown|dblclick|resize|focus|keyup|blur|frames|hover|offsetWidth|triggerHandler|offsetHeight|border|padding|clientY|Left|pageY|Right|Bottom|toElement|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|font|animated|header|size|enabled|innerText|contains|only|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|noConflict|wrap|addClass|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|http|iframe|children|wrapInner|siblings|prevAll|nextAll|Boolean|prev|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderLeftWidth|ie|ra|it|medium|rv|borderWidth|userAgent|navigator|with|concat|1px|10000|array|ig|NaN|reverse|400|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|getAttributeNode|fadeTo|fadeOut|method|fadeIn|slideToggle|action|slideUp|slideDown|cssText|option|responseXML|content|th|stop|300|td|protocol|cap|location|send|colg|abort|tfoot|thead|leg|With|cos|PI|opt|Requested|GMT|1970|Jan|area|01|Thu|hr|Since|specified|If|meta|Type|Content|522|link|open|XMLHTTP|img|attributes|Microsoft|onload|inline|row|head|br|borderTopWidth'.split('|'),0,{})); //------------ /****************************************************************************** Name: Highslide JS Version: 3.1.9 (April 30 2007) Author: Torstein Hønsi Support: http://vikjavev.no/highslide/forum Email: See http://vikjavev.no/megsjol Licence: Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 License (http://creativecommons.org/licenses/by-nc/2.5/). You are free: * to copy, distribute, display, and perform the work * to make derivative works Under the following conditions: * Attribution. You must attribute the work in the manner specified by the author or licensor. * Noncommercial. You may not use this work for commercial purposes. * For any reuse or distribution, you must make clear to others the license terms of this work. * Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. ******************************************************************************/ var hs = { // Apply your own settings here, or override them in the html file. graphicsDir : 'highslide/', restoreCursor : "zoomout.cur", // necessary for preload fullExpandIcon : 'fullexpand.gif', expandSteps : 10, // number of steps in zoom. Each step lasts for duration/step milliseconds. expandDuration : 250, // milliseconds restoreSteps : 10, restoreDuration : 250, allowMultipleInstances: true, hideThumbOnExpand : true, captionSlideSpeed : 1, // set to 0 to disable slide in effect outlineWhileAnimating : false, // not recommended for image popups, animation gets jerky on slow systems. outlineStartOffset : 3, // ends at 10 marginLeft : 10, marginRight : 35, // leave room for scrollbars + outline marginTop : 10, marginBottom : 35, // leave room for scrollbars + outline zIndexCounter : 1001, // adjust to other absolutely positioned elements fullExpandTitle : 'Expand to actual size', restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.', focusTitle : 'Click to bring to front', loadingText : 'Loading...', loadingTitle : 'Click to cancel', loadingOpacity : 0.75, showCredits : false, // you can set this to false if you want creditsText : 'Powered by Highslide JS', creditsHref : 'http://vikjavev.no/highslide/?user=1', creditsTitle : 'Go to the Highslide JS homepage', // These settings can also be overridden inline for each image anchor : 'auto', // where the image expands from align : 'auto', // position in the client (overrides anchor) targetX: null, // the id of a target element targetY: null, captionId : null, captionTemplateId : null, slideshowGroup : null, // defines groups for next/previous links and keystrokes spaceForCaption : 30, // leaves space below images with captions minWidth: 200, minHeight: 200, allowSizeReduction: true, // allow the image to reduce to fit client size. If false, this overrides minWidth and minHeight outlineType : 'drop-shadow', // set null to disable outlines wrapperClassName : null, // for enhanced css-control enableKeyListener : true, // END OF YOUR SETTINGS // declare internal properties preloadTheseImages : new Array(), continuePreloading: true, expandedImagesCounter : 0, expanders : new Array(), overrides : new Array( 'anchor', 'align', 'targetX', 'targetY', 'outlineType', 'outlineWhileAnimating', 'spaceForCaption', 'wrapperClassName', 'minWidth', 'minHeight', 'captionId', 'captionTemplateId', 'allowSizeReduction', 'slideshowGroup', 'enableKeyListener' ), overlays : new Array(), pendingOutlines : new Array(), origNodes : new Array(), ie : (document.all && !window.opera), safari : navigator.userAgent.indexOf("Safari") != -1, hasFocused : false, $ : function (id) { return document.getElementById(id); }, push : function (arr, val) { arr[arr.length] = val; }, createElement : function (tag, attribs, styles, parent) { var el = document.createElement(tag); if (attribs) hs.setAttribs(el, attribs); if (styles) hs.setStyles(el, styles); if (parent) parent.appendChild(el); return el; }, setAttribs : function (el, attribs) { for (var x in attribs) { el[x] = attribs[x]; } }, setStyles : function (el, styles) { for (var x in styles) { try { el.style[x] = styles[x]; } catch (e) {} } }, ieVersion : function () { arr = navigator.appVersion.split("MSIE"); return parseFloat(arr[1]); }, clientInfo : function () { var iebody = document.compatMode && document.compatMode != "BackCompat" ? document.documentElement : document.body; this.width = hs.ie ? iebody.clientWidth : self.innerWidth; this.height = hs.ie ? iebody.clientHeight : self.innerHeight; this.scrollLeft = hs.ie ? iebody.scrollLeft : pageXOffset; this.scrollTop = hs.ie ? iebody.scrollTop : pageYOffset; } , position : function(el) { var parent = el; var p = { x: parent.offsetLeft, y: parent.offsetTop }; while (parent.offsetParent) { parent = parent.offsetParent; p.x += parent.offsetLeft; p.y += parent.offsetTop; if (parent != document.body && parent != document.documentElement) { p.x -= parent.scrollLeft; p.y -= parent.scrollTop; } } return p; }, expand : function(a, params, contentType) { try { new HsExpander(a, params, contentType); return false; } catch (e) { return true; } }, focusTopmost : function() { var topZ = 0; var topmostKey = -1; for (i = 0; i < hs.expanders.length; i++) { if (hs.expanders[i]) { if (hs.expanders[i].wrapper.style.zIndex && hs.expanders[i].wrapper.style.zIndex > topZ) { topZ = hs.expanders[i].wrapper.style.zIndex; topmostKey = i; } } } if (topmostKey == -1) hs.focusKey = -1; else hs.expanders[topmostKey].focus(); }, closeId : function(elId) { // for text links for (i = 0; i < hs.expanders.length; i++) { if (hs.expanders[i] && (hs.expanders[i].thumb.id == elId || hs.expanders[i].a.id == elId)) { hs.expanders[i].doClose(); return; } } }, close : function(el) { var key = hs.getWrapperKey(el); if (hs.expanders[key]) hs.expanders[key].doClose(); return false; }, toggleImages : function(closeId, expandEl) { if (closeId) hs.closeId(closeId); if (hs.ie) expandEl.href = expandEl.href.replace('about:(blank)?', ''); // mysterious IE thing hs.toggleImagesExpandEl = expandEl; return false; }, getAdjacentAnchor : function(key, op) { var aAr = document.getElementsByTagName('A'); var hsAr = new Array; var activeI = -1; var j = 0; for (i = 0; i < aAr.length; i++) { if (hs.isHsAnchor(aAr[i]) && ((hs.expanders[key].slideshowGroup == hs.getParam(aAr[i], 'slideshowGroup')))) { hsAr[j] = aAr[i]; if (hs.expanders[key] && aAr[i] == hs.expanders[key].a) { activeI = j; } j++; } } return hsAr[activeI + op]; }, getParam : function (a, param) { try { var s = a.onclick.toString(); var oneLine = s.replace(/\s/g, ' '); var sParams = oneLine.replace(/.*?hs.(htmlE|e)xpand\s*?\(\s*?this\s*?,\s*?\{(.*?)\}.*?$/, '$2'); if (hs.safari) { // stupid bug for (var i = 0; i < hs.overrides.length; i++) { sParams = sParams.replace(hs.overrides[i] +':', ','+ hs.overrides[i] +':').replace(/^\s*?,/, ''); } } if (oneLine == sParams) return null; eval('var arr = {'+ sParams +'};'); for (var x in arr) { if (x == param) return arr[x]; } } catch (e) { return null; } }, getSrc : function (a) { var src = hs.getParam(a, 'src'); if (src) return src; return a.rel.replace(/_slash_/g, '/') || a.href; }, cloneNode : function (id) { if (!hs.$(id) && !hs.origNodes[id]) return null; var clone; if (hs.origNodes[id]) { clone = hs.origNodes[id].cloneNode(1); hs.setId(clone, /-hsOrig$/, 1); } else { clone = hs.$(id).cloneNode(1); hs.origNodes[id] = hs.$(id); hs.setId(hs.$(id), '-hsOrig'); } return clone; }, setId : function (d, suff, remove) { if (d.id) d.id = remove ? d.id.replace(suff, '') : d.id + suff; if (d.name) d.name = remove ? d.name.replace(suff, '') : d.name + suff; if (hs.geckoBug && hs.geckoBug(d)) return; var a = d.childNodes; for (var i = 0; i < a.length; i++) { if (a[i]) hs.setId(a[i], suff, remove); } }, purge : function(d) { var a = d.attributes, i, l, n; if (a) { l = a.length; for (i = 0; i < l; i += 1) { n = a[i].name; if (typeof d[n] === 'function') { d[n] = null; } } } if (hs.geckoBug && hs.geckoBug(d)) return; a = d.childNodes; if (a) { l = a.length; for (i = 0; i < l; i += 1) { hs.purge(d.childNodes[i]); } } }, previousOrNext : function (el, op) { if (typeof el == 'object') var activeKey = hs.getWrapperKey(el); else if (typeof el == 'number') var activeKey = el; if (hs.expanders[activeKey]) { //hs.toggleImagesExpandEl = hs.getAdjacentAnchor(activeKey, op); try { hs.getAdjacentAnchor(activeKey, op).onclick(); } catch (e) {} hs.expanders[activeKey].doClose(); } return false; }, previous : function (el) { return hs.previousOrNext(el, -1); }, next : function (el) { return hs.previousOrNext(el, 1); }, keyHandler : function(e) { if (!e) e = window.event; if (!e.target) e.target = e.srcElement; // ie if (e.target.form) return; // form element has focus var op = null; switch (e.keyCode) { case 34: // Page Down case 39: // Arrow right case 40: // Arrow left op = 1; break; case 33: // Page Up case 37: // Arrow left case 38: // Arrow down op = -1; break; case 27: // Escape case 13: // Enter if (hs.expanders[hs.focusKey]) hs.expanders[hs.focusKey].doClose(); return false; } if (op != null) { hs.removeEventListener(document, 'keydown', hs.keyHandler); if (hs.expanders[hs.focusKey] && !hs.expanders[hs.focusKey].enableKeyListener) return true; return hs.previousOrNext(hs.focusKey, op); } else return true; }, registerOverlay : function (overlay) { hs.push(hs.overlays, overlay); }, getWrapperKey : function (el) { var key = -1; while (el.parentNode) { el = el.parentNode; if (el.id && el.id.match(/^highslide-wrapper-[0-9]+$/)) { key = el.id.replace(/^highslide-wrapper-([0-9]+)$/, "$1"); break; } } return key; }, cleanUp : function () { if (hs.toggleImagesExpandEl) { hs.toggleImagesExpandEl.onclick(); hs.toggleImagesExpandEl = null; } else { for (i = 0; i < hs.expanders.length; i++) { if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost(); } } }, mouseClickHandler : function(e) { if (!e) e = window.event; if (e.button > 1) return true; if (!e.target) e.target = e.srcElement; var fobj = e.target; while (fobj.parentNode && !(fobj.className && fobj.className.match(/highslide-(image|move|html)/))) { fobj = fobj.parentNode; } if (!fobj.parentNode) return; hs.dragKey = hs.getWrapperKey(fobj); if (fobj.className.match(/highslide-(image|move)/)) { var isDraggable = true; var wLeft = parseInt(hs.expanders[hs.dragKey].wrapper.style.left); var wTop = parseInt(hs.expanders[hs.dragKey].wrapper.style.top); } if (e.type == 'mousedown') { if (isDraggable) // drag or focus { hs.dragObj = hs.expanders[hs.dragKey].content; if (fobj.className.match('highslide-image')) hs.dragObj.style.cursor = 'move'; hs.wLeft = wLeft; hs.wTop = wTop; hs.dragX = e.clientX; hs.dragY = e.clientY; hs.addEventListener(document, 'mousemove', hs.mouseMoveHandler); if (e.preventDefault) e.preventDefault(); // FF if (hs.dragObj.className.match(/highslide-(image|html)-blur/)) { hs.expanders[hs.dragKey].focus(); hs.hasFocused = true; } return false; } else if (fobj.className.match(/highslide-html/)) { // just focus hs.expanders[hs.dragKey].focus(); hs.expanders[hs.dragKey].redoShowHide(); hs.hasFocused = false; // why?? } } else if (e.type == 'mouseup') { hs.removeEventListener(document, 'mousemove', hs.mouseMoveHandler); if (isDraggable && hs.expanders[hs.dragKey]) { if (fobj.className.match('highslide-image')) { fobj.style.cursor = hs.styleRestoreCursor; } var hasMoved = wLeft != hs.wLeft || wTop != hs.wTop; if (!hasMoved && !hs.hasFocused && !fobj.className.match(/highslide-move/)) { hs.expanders[hs.dragKey].doClose(); } else if (hasMoved || (!hasMoved && hs.hasHtmlExpanders)) { hs.expanders[hs.dragKey].redoShowHide(); } hs.hasFocused = false; } else if (fobj.className.match('highslide-image-blur')) { fobj.style.cursor = hs.styleRestoreCursor; } } }, mouseMoveHandler : function(e) { if (!hs.expanders[hs.dragKey] || !hs.expanders[hs.dragKey].wrapper) return; if (!e) e = window.event; var exp = hs.expanders[hs.dragKey]; var w = exp.wrapper; w.style.left = hs.wLeft + e.clientX - hs.dragX +'px'; w.style.top = hs.wTop + e.clientY - hs.dragY +'px'; if (exp.objOutline) { var o = exp.objOutline; o.outer.style.left = (parseInt(w.style.left) - o.offset) +'px'; o.outer.style.top = (parseInt(w.style.top) - o.offset) +'px'; } return false; }, addEventListener : function (el, event, func) { if (document.addEventListener) el.addEventListener(event, func, false); else if (document.attachEvent) el.attachEvent('on'+ event, func); else el['on'+ event] = func; }, removeEventListener : function (el, event, func) { if (document.removeEventListener) el.removeEventListener(event, func, false); else if (document.detachEvent) el.detachEvent('on'+ event, func); else el[event] = null; }, isHsAnchor : function (a) { return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/)); }, preloadFullImage : function (i) { if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') { var img = document.createElement('img'); img.onload = function() { hs.preloadFullImage(i + 1); }; img.src = hs.preloadTheseImages[i]; } }, preloadImages : function (number) { if (number && typeof number != 'object') hs.numberOfImagesToPreload = number; var re, j = 0; var aTags = document.getElementsByTagName('A'); for (i = 0; i < aTags.length; i++) { a = aTags[i]; re = hs.isHsAnchor(a); if (re && re[0] == 'hs.expand') { if (j < hs.numberOfImagesToPreload) { hs.preloadTheseImages[j] = hs.getSrc(a); j++; } } } // preload outlines new HsOutline(hs.outlineType, function () { hs.preloadFullImage(0)} ); // preload cursor var cur = document.createElement('img'); cur.src = hs.graphicsDir + hs.restoreCursor; }, genContainer : function () { if (!hs.container) { hs.container = hs.createElement('div', null, { position: 'absolute', left: 0, top: 0, width: '100%', zIndex: hs.zIndexCounter }, document.body ); } } }; // end hs object //----------------------------------------------------------------------------- HsOutline = function (outlineType, onLoad) { if (!outlineType) return; if (onLoad) this.onLoad = onLoad; this.outlineType = outlineType; this.outline = new Array(); var v = hs.ieVersion(); hs.genContainer(); this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 8; this.hasPngSupport = !hs.ie || (hs.ie && v >= 8); this.hasOutline = this.outlineType && (this.hasAlphaImageLoader || this.hasPngSupport); this.outer = hs.createElement( 'table', { cellSpacing: 0 // saf }, { visibility: 'hidden', position: 'absolute', zIndex: hs.zIndexCounter++, borderCollapse: 'collapse' }, hs.container ); this.tbody = hs.createElement('tbody', null, null, this.outer); this.preloadOutlineElement(1); // recursive }; HsOutline.prototype.preloadOutlineElement = function (i) { if (this.outline[i] && this.outline[i].onload) { // Gecko multiple onloads bug this.outline[i].onload = null; return; } this.offset = this.hasOutline ? 10 : 0; if (i == 1 || i == 4 || i == 6) this.tr = hs.createElement('tr', null, null, this.tbody); if (i == 5) this.inner = hs.createElement('td', null, { padding: 0, margin: 0, border: 0, position: 'relative' }, this.tr); var files = Array (0,8,1,2,7,3,6,5,4); var src = hs.graphicsDir + "outlines/"+ this.outlineType +"/"+ files[i] +".png"; if (this.hasAlphaImageLoader) { var bgKey = 'filter'; var bgValue = "progid:DXImageTransform.Microsoft.AlphaImageLoader(" + "enabled=true, sizingMethod=scale src='"+ src + "') "; } else if (this.hasPngSupport || this.hasIe7Bug) { var bgKey = 'background'; var bgValue = 'url('+ src +')'; } var styles = { lineHeight: 0, fontSize: 0, padding: 0, margin: 0, border: 0 }; if (this.hasOutline) styles[bgKey] = bgValue; var td = hs.createElement('td', null, styles); var img = hs.createElement('img', null, { visibility: 'hidden', display: 'block', padding: 0, margin: 0, border: 0 }, td); // for onload trigger var dim = 2 * this.offset; hs.setStyles (td, { height: dim +'px', width: dim +'px'} ); var pThis = this; if (i < 8) img.onload = function() { pThis.preloadOutlineElement(i + 1); }; else img.onload = function() { hs.pendingOutlines[pThis.outlineType] = pThis; if (pThis.onLoad) pThis.onLoad(); }; this.tr.appendChild(td); if (this.hasOutline) img.src = src; else img.onload(); }; HsOutline.prototype.destroy = function() { hs.purge(this.outer); try { this.outer.parentNode.removeChild(this.outer); } catch (e) {} }; //----------------------------------------------------------------------------- // The expander object HsExpander = function(a, params, contentType) { hs.continuePreloading = false; // override inline parameters for (i = 0; i < hs.overrides.length; i++) { var name = hs.overrides[i]; if (params && typeof params[name] != 'undefined') this[name] = params[name]; else this[name] = hs[name]; } if (params && params.thumbnailId) { var el = hs.$(params.thumbnailId); } else { // first img within anchor for (i = 0; i < a.childNodes.length; i++) { if (a.childNodes[i].tagName && a.childNodes[i].tagName == 'IMG') { var el = a.childNodes[i]; break; } } } if (!el) el = a; // cancel other for (i = 0; i < hs.expanders.length; i++) { if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) { hs.expanders[i].cancelLoading(); } } // check if already open for (i = 0; i < hs.expanders.length; i++) { if (hs.expanders[i] && hs.expanders[i].thumb == el) { hs.expanders[i].focus(); return false; } } if (!hs.allowMultipleInstances) { var prev = hs.expandedImagesCounter - 1; if (hs.expanders[prev]) hs.expanders[prev].doClose(); } this.key = hs.expandedImagesCounter++; hs.expanders[this.key] = this; if (contentType == 'html') { this.isHtml = true; this.contentType = 'html'; } else { this.isImage = true; this.contentType = 'image'; } this.a = a; this.thumbsUserSetId = el.id || a.id; this.thumb = el; this.overlays = new Array(); var pos = hs.position(el); // instanciate the wrapper this.wrapper = hs.createElement( 'div', { id: 'highslide-wrapper-'+ this.key, className: this.wrapperClassName }, { visibility: 'hidden', position: 'absolute', zIndex: hs.zIndexCounter++ } ); // store properties of thumbnail this.thumbWidth = el.width ? el.width : el.offsetWidth; this.thumbHeight = el.height ? el.height : el.offsetHeight; this.thumbLeft = pos.x; this.thumbTop = pos.y; this.thumbClass = el.className; // thumb borders this.thumbOffsetBorderW = (this.thumb.offsetWidth - this.thumbWidth) / 2; this.thumbOffsetBorderH = (this.thumb.offsetHeight - this.thumbHeight) / 2; // get the wrapper hs.genContainer(); if (hs.pendingOutlines[this.outlineType]) { this.connectOutline(); this[this.contentType +'Create'](); } else if (!this.outlineType) { this[this.contentType +'Create'](); } else { this.displayLoading(); var pThis = this; new HsOutline(this.outlineType, function () { pThis.connectOutline(); pThis[pThis.contentType +'Create'](); } ); } }; HsExpander.prototype.connectOutline = function(x, y) { var w = hs.pendingOutlines[this.outlineType]; this.objOutline = w; hs.pendingOutlines[this.outlineType] = null; }; HsExpander.prototype.displayLoading = function() { if (this.onLoadStarted || this.loading) return; this.originalCursor = this.a.style.cursor; this.a.style.cursor = 'wait'; if (!hs.loading) { hs.loading = hs.createElement('a', { className: 'highslide-loading', title: hs.loadingTitle, innerHTML: hs.loadingText }, { position: 'absolute' }, hs.container ); if (hs.ie) hs.loading.style.filter = 'alpha(opacity='+ (100*hs.loadingOpacity) +')'; else hs.loading.style.opacity = hs.loadingOpacity; } this.loading = hs.loading; this.loading.href = 'javascript:hs.expanders['+ this.key +'].cancelLoading()'; this.loading.visibility = 'visible'; this.loading.style.left = (this.thumbLeft + this.thumbOffsetBorderW + (this.thumbWidth - this.loading.offsetWidth) / 2) +'px'; this.loading.style.top = (this.thumbTop + (this.thumbHeight - this.loading.offsetHeight) / 2) +'px'; setTimeout( "if (hs.expanders["+ this.key +"] && hs.expanders["+ this.key +"].loading) " + "hs.expanders["+ this.key +"].loading.style.visibility = 'visible';", 100 ); }; HsExpander.prototype.imageCreate = function() { var img = document.createElement('img'); var key = this.key; var img = document.createElement('img'); this.content = img; img.onload = function () { if (hs.expanders[key]) hs.expanders[key].onLoad(); }; img.className = 'highslide-image '+ this.thumbClass; img.style.visibility = 'hidden'; // prevent flickering in IE img.style.display = 'block'; img.style.position = 'absolute'; img.style.zIndex = 3; img.title = hs.restoreTitle; img.onmouseover = function () { if (hs.expanders[key]) hs.expanders[key].onMouseOver(); }; img.onmouseout = function (e) { var rel = e ? e.relatedTarget : event.toElement; if (hs.expanders[key]) hs.expanders[key].onMouseOut(rel); }; if (hs.safari) hs.container.appendChild(img); img.src = hs.getSrc(this.a); this.displayLoading(); }; HsExpander.prototype.onLoad = function() { try { if (!this.content) return; if (this.onLoadStarted) return; // old Gecko loop else this.onLoadStarted = true; if (this.loading) { this.loading.style.visibility = 'hidden'; this.loading = null; this.a.style.cursor = this.originalCursor || ''; } if (this.isImage) { this.newWidth = this.content.width; this.newHeight = this.content.height; this.fullExpandWidth = this.newWidth; this.fullExpandHeight = this.newHeight; this.content.width = this.thumbWidth; this.content.height = this.thumbHeight; } else if (this.htmlGetSize) this.htmlGetSize(); // identify caption div var modMarginBottom = hs.marginBottom; if (!this.captionId && this.thumbsUserSetId) this.captionId = 'caption-for-'+ this.thumbsUserSetId; if (this.captionId) { this.caption = hs.cloneNode(this.captionId); } if (this.captionTemplateId) { var s = (this.caption) ? this.caption.innerHTML : ''; this.caption = hs.cloneNode(this.captionTemplateId); if (this.caption) this.caption.innerHTML = this.caption.innerHTML.replace(/\s/g, ' ').replace('{caption}', s); } var modMarginBottom = hs.marginBottom; if (this.caption) modMarginBottom += this.spaceForCaption; this.wrapper.appendChild(this.content); this.content.style.position = 'relative'; // Saf if (this.caption) this.wrapper.appendChild(this.caption); this.wrapper.style.left = this.thumbLeft +'px'; this.wrapper.style.top = this.thumbTop +'px'; hs.container.appendChild(this.wrapper); // correct for borders this.offsetBorderW = (this.content.offsetWidth - this.thumbWidth) / 2; this.offsetBorderH = (this.content.offsetHeight - this.thumbHeight) / 2; var modMarginRight = hs.marginRight + 2 * this.offsetBorderW; modMarginBottom += 2 * this.offsetBorderH; var ratio = this.newWidth / this.newHeight; var minWidth = this.allowSizeReduction ? this.minWidth : this.newWidth; var minHeight = this.allowSizeReduction ? this.minHeight : this.newHeight; var justify = { x: 'auto', y: 'auto' }; if (this.align == 'center') { justify.x = 'center'; justify.y = 'center'; } else { if (this.anchor.match(/^top/)) justify.y = null; if (this.anchor.match(/right$/)) justify.x = 'max'; if (this.anchor.match(/^bottom/)) justify.y = 'max'; if (this.anchor.match(/left$/)) justify.x = null; } client = new hs.clientInfo(); // justify this.x = { min: parseInt(this.thumbLeft) - this.offsetBorderW + this.thumbOffsetBorderW, span: this.newWidth, minSpan: this.newWidth < minWidth ? this.newWidth : minWidth, justify: justify.x, target: this.targetX, marginMin: hs.marginLeft, marginMax: modMarginRight, scroll: client.scrollLeft, clientSpan: client.width, thumbSpan: this.thumbWidth }; var oldRight = this.x.min + parseInt(this.thumbWidth); this.x = this.justify(this.x); this.y = { min: parseInt(this.thumbTop) - this.offsetBorderH + this.thumbOffsetBorderH, span: this.newHeight, minSpan: this.newHeight < minHeight ? this.newHeight : minHeight, justify: justify.y, target: this.targetY, marginMin: hs.marginTop, marginMax: modMarginBottom, scroll: client.scrollTop, clientSpan: client.height, thumbSpan: this.thumbHeight }; var oldBottom = this.y.min + parseInt(this.thumbHeight); this.y = this.justify(this.y); if (this.isHtml) this.htmlSizeOperations(); if (this.isImage) this.correctRatio(ratio); var x = this.x; var y = this.y; // Selectbox bug var imgPos = {x: x.min - 20, y: y.min - 20, w: x.span + 40, h: y.span + 40 + this.spaceForCaption}; hs.hideSelects = (hs.ie && hs.ieVersion() < 7); if (hs.hideSelects) this.showHideElements('SELECT', 'hidden', imgPos); // Iframes bug hs.hideIframes = (window.opera || navigator.vendor == 'KDE' || (hs.ie && hs.ieVersion() < 5.5)); if (hs.hideIframes) this.showHideElements('IFRAME', 'hidden', imgPos); // Make outline ready if (this.objOutline && !this.outlineWhileAnimating) this.positionOutline(x.min, y.min, x.span, y.span); var o2 = this.objOutline ? this.objOutline.offset : 0; // Apply size change this.changeSize( 1, this.thumbLeft + this.thumbOffsetBorderW - this.offsetBorderW, this.thumbTop + this.thumbOffsetBorderH - this.offsetBorderH, this.thumbWidth, this.thumbHeight, x.min, y.min, x.span, y.span, hs.expandDuration, hs.expandSteps, hs.outlineStartOffset, o2 ); } catch (e) { if (hs.expanders[this.key] && hs.expanders[this.key].a) window.location.href = hs.getSrc(hs.expanders[this.key].a); } }; HsExpander.prototype.justify = function (p) { var tgt, dim = p == this.x ? 'x' : 'y'; if (p.target && p.target.match(/ /)) { tgt = p.target.split(' '); p.target = tgt[0]; } if (hs.$(p.target)) { p.min = hs.position(hs.$(p.target))[dim]; if (tgt && tgt[1] && tgt[1].match(/^[-]?[0-9]+px$/)) p.min += parseInt(tgt[1]); } else if (p.justify == 'auto' || p.justify == 'center') { var hasMovedMin = false; var allowReduce = true; // calculate p.min if (p.justify == 'center') p.min = Math.round(p.scroll + (p.clientSpan - p.span - p.marginMax) / 2); else p.min = Math.round(p.min - ((p.span - p.thumbSpan) / 2)); // auto if (p.min < p.scroll + p.marginMin && !hs.$(p.target)) { p.min = p.scroll + p.marginMin; hasMovedMin = true; } if (p.span < p.minSpan) { p.span = p.minSpan; allowReduce = false; } // calculate right/newWidth if (p.min + p.span > p.scroll + p.clientSpan - p.marginMax) { if (hasMovedMin && allowReduce) p.span = p.clientSpan - p.marginMin - p.marginMax; // can't expand more else if (p.span < p.clientSpan - p.marginMin - p.marginMax) { // move newTop up p.min = p.scroll + p.clientSpan - p.span - p.marginMin - p.marginMax; } else { // image larger than client p.min = p.scroll + p.marginMin; if (allowReduce) p.span = p.clientSpan - p.marginMin - p.marginMax; } } if (p.span < p.minSpan) { p.span = p.minSpan; allowReduce = false; } } else if (p.justify == 'max') { p.min = Math.floor(p.min - p.span + p.thumbSpan); } if (p.min < p.marginMin) { tmpMin = p.min; p.min = p.marginMin; if (allowReduce) p.span = p.span - (p.min - tmpMin); } return p; }; HsExpander.prototype.correctRatio = function(ratio) { var x = this.x; var y = this.y; var changed = false; if (x.span / y.span > ratio) { // width greater var tmpWidth = x.span; x.span = y.span * ratio; if (x.span < x.minSpan) { // below minWidth x.span = x.minSpan; y.span = x.span / ratio; } changed = true; } else if (x.span / y.span < ratio) { // height greater var tmpHeight = y.span; y.span = x.span / ratio; changed = true; } if (changed) { x.min = parseInt(this.thumbLeft) - this.offsetBorderW + this.thumbOffsetBorderW; x.minSpan = x.span; this.x = this.justify(x); y.min = parseInt(this.thumbTop) - this.offsetBorderH + this.thumbOffsetBorderH; y.minSpan = y.span; this.y = this.justify(y); } }; HsExpander.prototype.changeSize = function(dir, x1, y1, w1, h1, x2, y2, w2, h2, dur, steps, oo1, oo2) { dW = (w2 - w1) / steps; dH = (h2 - h1) / steps; dX = (x2 - x1) / steps; dY = (y2 - y1) / steps; dOo = (oo2 - oo1) /steps; for (i = 1; i <= steps; i++) { w1 += dW; h1 += dH; x1 += dX; y1 += dY; oo1 += dOo; var obj = "hs.expanders["+ this.key +"]"; var s = "if ("+ obj +") {"; if (i == 1) { s += obj +".content.style.visibility = 'visible';" + "if ("+ obj +".thumb.tagName == 'IMG' && hs.hideThumbOnExpand) "+ obj +".thumb.style.visibility = 'hidden';" } if (i == steps) { w1 = w2; h1 = h2; x1 = x2; y1 = y2; oo1 = oo2; } s += obj +"."+ this.contentType +"SetSize("+ Math.round(w1) +", "+ Math.round(h1) +", " + Math.round(x1) +", "+ Math.round(y1) +", "+ Math.round(oo1); if (i == steps) s += ', '+ dir; s += ");}"; setTimeout(s, Math.round(i * (dur / steps))); } }; HsExpander.prototype.imageSetSize = function (w, h, x, y, offset, end) { try { this.content.width = w; this.content.height = h; if (this.objOutline && this.outlineWhileAnimating) { var o = this.objOutline.offset - offset; this.positionOutline(x + o, y + o, w - 2 * o, h - 2 * o, 1); } hs.setStyles ( this.wrapper, { 'visibility': 'visible', 'left': x +'px', 'top': y +'px' } ); var exp = 'hs.expanders['+ this.key +']'; if (end == 1) setTimeout('if ('+ exp +')'+ exp +'.onExpanded()', 0); // jerk in IE else if (end == -1) setTimeout('if ('+ exp +')'+ exp +'.onEndClose()', 0); } catch (e) { window.location.href = hs.getSrc(this.a); } }; HsExpander.prototype.positionOutline = function(x, y, w, h, vis) { if (!this.objOutline) return; var o = this.objOutline; if (vis) o.outer.style.visibility = 'visible'; o.outer.style.left = (x - o.offset) +'px'; o.outer.style.top = (y - o.offset) +'px'; o.outer.style.width = (w + 2 * (this.offsetBorderW + o.offset)) +'px'; w += 2 * (this.offsetBorderW - o.offset); h += + 2 * (this.offsetBorderH - o.offset); o.inner.style.width = w >= 0 ? w +'px' : 0; o.inner.style.height = h >= 0 ? h +'px' : 0; }; HsExpander.prototype.onExpanded = function() { if (this.objOutline) this.objOutline.outer.style.visibility = 'visible'; this.isExpanded = true; this.focus(); if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent(); this.createCustomOverlays(); if (hs.showCredits) this.writeCredits(); if (this.caption) this.writeCaption(); if (this.fullExpandWidth > this.x.span) this.createFullExpand(); if (!this.caption) this.onDisplayFinished(); }; HsExpander.prototype.onDisplayFinished = function() { var key = this.key; var outlineType = this.outlineType; new HsOutline(outlineType, function () { if (hs.expanders[key]) hs.expanders[key].preloadNext(); }); }; HsExpander.prototype.preloadNext = function() { var nextA = hs.getAdjacentAnchor(this.key, 1); if (nextA) { var img = document.createElement('img'); img.src = hs.getSrc(nextA); } }; HsExpander.prototype.cancelLoading = function() { this.a.style.cursor = this.originalCursor; if (this.loading) hs.loading.style.visibility = 'hidden'; hs.expanders[this.key] = null; }; HsExpander.prototype.writeCredits = function () { var credits = hs.createElement('a', { href: hs.creditsHref, className: 'highslide-credits', innerHTML: hs.creditsText, title: hs.creditsTitle } ); this.createOverlay(credits, 'top left'); }; HsExpander.prototype.writeCaption = function() { try { this.wrapper.style.width = this.wrapper.offsetWidth +'px'; this.caption.style.visibility = 'hidden'; this.caption.style.position = 'relative'; if (hs.ie) this.caption.style.zoom = 1; this.caption.className += ' highslide-display-block'; var capHeight = this.caption.offsetHeight; var slideHeight = (capHeight < this.content.height) ? capHeight : this.content.height; this.caption.style.top = '-'+ slideHeight +'px'; this.caption.style.zIndex = 2; var step = 1; if (slideHeight > 400) step = 4; else if (slideHeight > 200) step = 2; else if (slideHeight > 100) step = 1; if (hs.captionSlideSpeed) step = step * hs.captionSlideSpeed; else step = slideHeight; var t = 0; for (var top = -slideHeight; top <= 0; top += step, t += 10) { var end = (top >= 0) ? 1 : 0; var eval = "if (hs.expanders["+ this.key +"]) { " + "hs.expanders["+ this.key +"].placeCaption("+ top +", "+ end +");" + "}"; setTimeout (eval, t); } } catch (e) {} }; HsExpander.prototype.placeCaption = function(top, end) { if (!this.caption) return; this.caption.style.top = top +'px'; this.caption.style.visibility = 'visible'; if (this.objOutline) this.objOutline.inner.style.height = (this.wrapper.offsetHeight + top - 2 * this.objOutline.offset) +'px'; if (end) this.onDisplayFinished(); }; HsExpander.prototype.showHideElements = function (tagName, visibility, imgPos) { var els = document.getElementsByTagName(tagName); if (els) { for (i = 0; i < els.length; i++) { if (els[i].nodeName == tagName) { var hiddenBy = els[i].getAttribute('hidden-by'); if (visibility == 'visible' && hiddenBy) { hiddenBy = hiddenBy.replace('['+ this.key +']', ''); els[i].setAttribute('hidden-by', hiddenBy); if (!hiddenBy) els[i].style.visibility = 'visible'; } else if (visibility == 'hidden') { // hide if behind var elPos = hs.position(els[i]); elPos.w = els[i].offsetWidth; elPos.h = els[i].offsetHeight; var clearsX = (elPos.x + elPos.w < imgPos.x || elPos.x > imgPos.x + imgPos.w); var clearsY = (elPos.y + elPos.h < imgPos.y || elPos.y > imgPos.y + imgPos.h); var wrapperKey = hs.getWrapperKey(els[i]); if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image if (!els[i].currentStyle || (els[i].currentStyle && els[i].currentStyle['visibility'] != 'hidden')) { // IE if (!hiddenBy) { els[i].setAttribute('hidden-by', '['+ this.key +']'); } else if (!hiddenBy.match('['+ this.key +']')) { els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']'); } els[i].style.visibility = 'hidden'; } } else if (hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey) { // on move els[i].setAttribute('hidden-by', ''); els[i].style.visibility = 'visible'; } else if (hiddenBy && hiddenBy.match('['+ this.key +']')) { els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', '')); } } } } } }; HsExpander.prototype.focus = function() { // blur others for (i = 0; i < hs.expanders.length; i++) { if (hs.expanders[i] && i == hs.focusKey) { var blurExp = hs.expanders[i]; blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur'; if (blurExp.caption) { hs.setId(blurExp.caption, '-hsBlur'+i); blurExp.caption.className += ' highslide-caption-blur'; } if (blurExp.isImage) { blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer'; blurExp.content.title = hs.focusTitle; } else { hs.setId(blurExp.innerContent, '-hsBlur'+i); } } } // focus this this.wrapper.style.zIndex = hs.zIndexCounter++; if (this.objOutline) this.objOutline.outer.style.zIndex = this.wrapper.style.zIndex; this.content.className = 'highslide-'+ this.contentType; if (this.caption) { hs.setId(this.caption, '-hsBlur' + this.key, 1); this.caption.className = this.caption.className.replace(' highslide-caption-blur', ''); } if (this.isImage) { this.content.title = hs.restoreTitle; hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer'; if (hs.ie && hs.ieVersion() < 6) hs.styleRestoreCursor = 'hand'; this.content.style.cursor = hs.styleRestoreCursor; } else { hs.setId(this.innerContent, '-hsBlur' + this.key, 1); } hs.focusKey = this.key; hs.addEventListener(document, 'keydown', hs.keyHandler); }; HsExpander.prototype.doClose = function() { hs.removeEventListener(document, 'keydown', hs.keyHandler); try { if (!hs.expanders[this.key]) return; this.isClosing = true; var x = parseInt(this.wrapper.style.left); var y = parseInt(this.wrapper.style.top); var w = (this.isImage) ? this.content.width : parseInt(this.content.style.width); var h = (this.isImage) ? this.content.height : parseInt(this.content.style.height); if (this.objOutline && this.outlineWhileAnimating) this.positionOutline(x, y, w, h); else if (this.objOutline) this.objOutline.destroy(); // remove children var n = this.wrapper.childNodes.length; for (i = n - 1; i >= 0 ; i--) { var child = this.wrapper.childNodes[i]; if (child != this.content) { hs.purge(this.wrapper.childNodes[i]); this.wrapper.removeChild(this.wrapper.childNodes[i]); } } if (this.isHtml) this.htmlOnClose(); this.wrapper.style.width = 'auto'; this.content.style.cursor = 'default'; var o2 = this.objOutline ? this.objOutline.offset : 0; this.changeSize( -1, x, y, w, h, this.thumbLeft - this.offsetBorderW + this.thumbOffsetBorderW, this.thumbTop - this.offsetBorderH + this.thumbOffsetBorderH, this.thumbWidth, this.thumbHeight, hs.restoreDuration, hs.restoreSteps, o2, hs.outlineStartOffset ); } catch (e) { hs.expanders[this.key].onEndClose(); } }; HsExpander.prototype.onEndClose = function () { this.thumb.style.visibility = 'visible'; if (hs.hideSelects) this.showHideElements('SELECT', 'visible'); if (hs.hideIframes) this.showHideElements('IFRAME', 'visible'); if (this.objOutline && this.outlineWhileAnimating) this.objOutline.destroy(); hs.purge(this.wrapper); this.wrapper.parentNode.removeChild(this.wrapper); hs.expanders[this.key] = null; hs.cleanUp(); }; HsExpander.prototype.createOverlay = function (el, position, hideOnMouseOut, opacity) { if (typeof el == 'string') el = hs.cloneNode(el); if (!el || typeof el == 'string' || !this.isImage) return; if (!position) var position = 'center center'; var overlay = hs.createElement( 'div', null, { 'position' : 'absolute', 'zIndex' : 3 }, this.wrapper ); if (opacity && opacity < 1) { if (hs.ie) overlay.style.filter = 'alpha(opacity='+ (opacity * 100) +')'; else overlay.style.opacity = opacity; } el.className += ' highslide-display-block'; overlay.appendChild(el); var left = this.offsetBorderW; var dLeft = this.content.width - overlay.offsetWidth; var top = this.offsetBorderH; var dTop = this.content.height - overlay.offsetHeight; if (position.match(/^bottom/)) top += dTop; if (position.match(/^center/)) top += dTop / 2; if (position.match(/right$/)) left += dLeft; if (position.match(/center$/)) left += dLeft / 2; overlay.style.left = left +'px'; overlay.style.top = top +'px'; if (hideOnMouseOut) overlay.setAttribute('hideOnMouseOut', true); hs.push(this.overlays, overlay); }; HsExpander.prototype.createCustomOverlays = function() { for (i = 0; i < hs.overlays.length; i++) { var o = hs.overlays[i]; if (o.thumbnailId == null || o.thumbnailId == this.thumbsUserSetId) { this.createOverlay(o.overlayId, o.position, o.hideOnMouseOut, o.opacity); } } }; HsExpander.prototype.onMouseOver = function () { for (i = 0; i < this.overlays.length; i++) { this.overlays[i].style.visibility = 'visible'; } }; HsExpander.prototype.onMouseOut = function(rel) { var hideThese = new Array(); var j = 0; for (i = 0; i < this.overlays.length; i++) { var node = rel; while (node && node.parentNode) { if (node == this.overlays[i]) return; node = node.parentNode; } if (this.overlays[i].getAttribute('hideOnMouseOut')) { hideThese[j] = this.overlays[i]; j++; } } for (i = 0; i < hideThese.length; i++) { hideThese[i].style.visibility = 'hidden'; } }; HsExpander.prototype.createFullExpand = function () { var a = hs.createElement( 'a', { href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();', title: hs.fullExpandTitle }, { background: 'url('+ hs.graphicsDir + hs.fullExpandIcon+')', display: 'block', margin: '0 10px 10px 0', width: '45px', height: '44px' } ); this.createOverlay(a, 'bottom right', true, 0.75); this.fullExpandIcon = a; }; HsExpander.prototype.doFullExpand = function () { try { hs.purge(this.fullExpandIcon); this.fullExpandIcon.parentNode.removeChild(this.fullExpandIcon); this.focus(); this.x.min = parseInt(this.wrapper.style.left) - (this.fullExpandWidth - this.content.width) / 2; if (this.x.min < hs.marginLeft) this.x.min = hs.marginLeft; this.wrapper.style.left = this.x.min +'px'; var borderOffset = this.wrapper.offsetWidth - this.content.width; this.content.width = this.fullExpandWidth; this.content.height = this.fullExpandHeight; this.x.span = this.content.width; this.wrapper.style.width = (this.x.span + borderOffset) +'px'; this.y.span = this.wrapper.offsetHeight - 2 * this.offsetBorderH; this.positionOutline(this.x.min, this.y.min, this.x.span, this.y.span); // reposition overlays for (x in this.overlays) { hs.purge(this.overlays[x]); this.overlays[x].parentNode.removeChild(this.overlays[x]); } if (hs.showCredits) this.writeCredits(); this.createCustomOverlays(); this.redoShowHide(); } catch (e) { window.location.href = hs.expanders[this.key].content.src; } }; // on end move and resize HsExpander.prototype.redoShowHide = function() { var imgPos = { x: parseInt(this.wrapper.style.left) - 20, y: parseInt(this.wrapper.style.top) - 20, w: this.content.offsetWidth + 40, h: this.content.offsetHeight + 40 + this.spaceForCaption }; if (hs.hideSelects) this.showHideElements('SELECT', 'hidden', imgPos); if (hs.hideIframes) this.showHideElements('IFRAME', 'hidden', imgPos); }; // set handlers hs.addEventListener(document, 'mousedown', hs.mouseClickHandler); hs.addEventListener(document, 'mouseup', hs.mouseClickHandler); hs.addEventListener(window, 'load', hs.preloadImages); //------------ /** * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * */ 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(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}this.addParam("wmode","transparent");var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!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 _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; //------------ /* * jQuery Simple Tooltip 0.9 * * Copyright (c) 2007 Pierre Bertet (pierrebertet.net) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?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}('(b($j){$j.M=b(){F 14.V||L.1o&&u.O.B||u.A.B};$j.U.R=b(4){3 t=[];3 I=b(e){e.D();3 1=e.m.1;3 6=e.m.6;3 8=e.m.8;3 9=e.m.9;3 q=$j(f).y();3 Q=$j(f).C();3 v=(f.1v||u.O.1r)+$j.M();7(1.d&&(1.d=="1l"||1.d=="1j"||1.d=="G")){f.1g("6."+1.d+"(\'1d\')")}c{6.G()}7(!1.k){1.k=6.y();1.l=6.C()}3 h=e.17-(1.k/2);3 i=e.12-(1.l/2);7(h<0){h=1.g}c 7(h+1.k>q){h=q-1.k-1.g}7(i<0){i=1.g}c 7(i+1.l>v){i=v-1.l-1.g}3 r=11 Z();6.z({"T":h+"x","S":i+"x","W":"X"});7(9){6.Y().P(b(){f.10(r)},b(){r=f.1w(b(){6.N()},8*1t)})}};p.1q(b(){3 o=$j(p).1p("K");7(o&&o.1n(/^#.+/)){3 6=$j(o);7(6.1m>0){3 1=6.1k(0);7(!1.J){t.1h(1);7(4&&4.H){1.g=4.H}c{1.g=5}7(4&&4.E){1.d=4.E}c{1.d=1f}6.1e("a[K^=#][1i=1c]").n(b(e){e.D();6.N()});1.J=w}7(4&&4.9!=1b){3 9=4.9}c{3 9=w}7(4&&4.n&&4.n==w){3 s="n"}c{3 s="1a"}7(4&&4.8&&4.8>0){3 8=4.8}c{3 8=0}$j(p).19(s,{"1":1,"6":6,"8":8,"9":9},I)}}});$j(t).18("A").z({"16":"1s","15":"1u","13":"1x"});F p}})(L);',62,96,'|tooltipE||var|options||tooltip|if|hideDelay|hideOnMouseOut||function|else|_effect||window|_margin|tPosX|tPosY||_width|_height|data|click|currentHref|this|winWidth|timer|showEvent|all_tooltips|document|winYViewLimit|true|px|width|css|body|clientHeight|height|preventDefault|effect|return|show|margin|openTooltip|_tooltipInit|href|jQuery|viewportHeight|hide|documentElement|hover|winHeight|simpletooltip|top|left|fn|innerHeight|cursor|help|unbind|Number|clearTimeout|new|pageY|display|self|zIndex|position|pageX|appendTo|bind|mouseover|null|close|fast|find|false|eval|push|rel|slideDown|get|fadeIn|length|match|boxModel|attr|each|scrollTop|absolute|1000|9999|pageYOffset|setTimeout|none'.split('|'),0,{})) //------------ /* * Copyright 2007-2009 by Tobia Conforto * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along with this program; if not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Versions: 0.1 2007-08-19 Initial release * 2008-08-21 Re-released under GPL v2 * 0.1.1 2008-09-18 Compatibility with prototype.js * 0.2 2008-10-15 Linkable images, contributed by Tim Rainey * 0.3 2008-10-22 Added option to repeat the animation a number of times, then stop * 0.3.1 2008-11-11 Better error messages * 0.3.2 2008-11-11 Fixed a couple of CSS bugs, contributed by Erwin Bot * 0.3.3 2008-12-14 Added onclick option * 0.3.4 2009-03-12 Added shuffle option, contributed by Ralf Santbergen * 0.3.5 2009-03-12 Fixed usage of href parameter in 'Ken Burns' mode */ jQuery.fn.crossSlide = function(opts, plan) { var self = this, self_width = this.width(), self_height = this.height(); // generic utilities function format(str) { for (var i = 1; i < arguments.length; i++) str = str.replace(new RegExp('\\{' + (i-1) + '}', 'g'), arguments[i]); return str; } function abort() { arguments[0] = 'crossSlide: ' + arguments[0]; throw format.apply(null, arguments); } // first preload all the images, while getting their actual width and height (function(proceed) { var n_loaded = 0; function loop(i, img) { // for (i = 0; i < plan.length; i++) but with independent var i, img (for the closures) img.onload = function(e) { n_loaded++; plan[i].width = img.width; plan[i].height = img.height; if (n_loaded == plan.length) proceed(); } img.src = plan[i].src; if (i + 1 < plan.length) loop(i + 1, new Image()); } loop(0, new Image()); })(function() { // then proceed // utility to parse "from" and "to" parameters function parse_position_param(param) { var zoom = 1; var tokens = param.replace(/^\s*|\s*$/g, '').split(/\s+/); if (tokens.length > 3) throw new Error(); if (tokens[0] == 'center') if (tokens.length == 1) tokens = ['center', 'center']; else if (tokens.length == 2 && tokens[1].match(/^[\d.]+x$/i)) tokens = ['center', 'center', tokens[1]]; if (tokens.length == 3) zoom = parseFloat(tokens[2].match(/^([\d.]+)x$/i)[1]); var pos = tokens[0] + ' ' + tokens[1]; if (pos == 'left top' || pos == 'top left') return { xrel: 0, yrel: 0, zoom: zoom }; if (pos == 'left center' || pos == 'center left') return { xrel: 0, yrel: .5, zoom: zoom }; if (pos == 'left bottom' || pos == 'bottom left') return { xrel: 0, yrel: 1, zoom: zoom }; if (pos == 'center top' || pos == 'top center') return { xrel: .5, yrel: 0, zoom: zoom }; if (pos == 'center center') return { xrel: .5, yrel: .5, zoom: zoom }; if (pos == 'center bottom' || pos == 'bottom center') return { xrel: .5, yrel: 1, zoom: zoom }; if (pos == 'right top' || pos == 'top right') return { xrel: 1, yrel: 0, zoom: zoom }; if (pos == 'right center' || pos == 'center right') return { xrel: 1, yrel: .5, zoom: zoom }; if (pos == 'right bottom' || pos == 'bottom right') return { xrel: 1, yrel: 1, zoom: zoom }; return { xrel: parseInt(tokens[0].match(/^(\d+)%$/)[1]) / 100, yrel: parseInt(tokens[1].match(/^(\d+)%$/)[1]) / 100, zoom: zoom }; } // utility to compute the css for a given phase between p.from and p.to // phase = 1: begin fade-in, 2: end fade-in, 3: begin fade-out, 4: end fade-out function position_to_css(p, phase) { switch (phase) { case 1: var pos = 0; break; case 2: var pos = fade_ms / (p.time_ms + 2 * fade_ms); break; case 3: var pos = 1 - fade_ms / (p.time_ms + 2 * fade_ms); break; case 4: var pos = 1; break; } return { left: Math.round(p.from.left + pos * (p.to.left - p.from.left )), top: Math.round(p.from.top + pos * (p.to.top - p.from.top )), width: Math.round(p.from.width + pos * (p.to.width - p.from.width )), height: Math.round(p.from.height + pos * (p.to.height - p.from.height)) }; } // check global params if (! opts.fade) abort('missing fade parameter.'); if (opts.speed && opts.sleep) abort('you cannot set both speed and sleep at the same time.'); // conversion from sec to ms; from px/sec to px/ms var fade_ms = Math.round(opts.fade * 1000); if (opts.sleep) var sleep = Math.round(opts.sleep * 1000); if (opts.speed) var speed = opts.speed / 1000, fade_px = Math.round(fade_ms * speed); // set container css self.empty().css({ overflow: 'hidden', padding: 0 }); if (! self.css('position').match(/absolute|relative|fixed/)) self.css({ position: 'relative' }); if (! self.width() || ! self.height()) abort('container element does not have its own width and height'); // random sorting if (opts.shuffle) plan.sort(function() { return Math.random() - 0.5; }); // prepare each image for (var i = 0; i < plan.length; ++i) { var p = plan[i]; if (! p.src) abort('missing src parameter in picture {0}.', i + 1); if (speed) { // speed/dir mode // check parameters and translate speed/dir mode into full mode (from/to/time) switch (p.dir) { case 'up': p.from = { xrel: .5, yrel: 0, zoom: 1 }; p.to = { xrel: .5, yrel: 1, zoom: 1 }; var slide_px = p.height - self_height - 2 * fade_px; break; case 'down': p.from = { xrel: .5, yrel: 1, zoom: 1 }; p.to = { xrel: .5, yrel: 0, zoom: 1 }; var slide_px = p.height - self_height - 2 * fade_px; break; case 'left': p.from = { xrel: 0, yrel: .5, zoom: 1 }; p.to = { xrel: 1, yrel: .5, zoom: 1 }; var slide_px = p.width - self_width - 2 * fade_px; break; case 'right': p.from = { xrel: 1, yrel: .5, zoom: 1 }; p.to = { xrel: 0, yrel: .5, zoom: 1 }; var slide_px = p.width - self_width - 2 * fade_px; break; default: abort('missing or malformed "dir" parameter in picture {0}.', i + 1); } if (slide_px <= 0) abort('picture number {0} is too short for the desired fade duration.', i + 1); p.time_ms = Math.round(slide_px / speed); } else if (! sleep) { // full mode // check and parse parameters if (! p.from || ! p.to || ! p.time) abort('missing either speed/sleep option, or from/to/time params in picture {0}.', i + 1); try { p.from = parse_position_param(p.from) } catch (e) { abort('malformed "from" parameter in picture {0}.', i + 1); } try { p.to = parse_position_param(p.to) } catch (e) { abort('malformed "to" parameter in picture {0}.', i + 1); } if (! p.time) abort('missing "time" parameter in picture {0}.', i + 1); p.time_ms = Math.round(p.time * 1000) } // precalculate left/top/width/height bounding values if (p.from) jQuery.each([ p.from, p.to ], function(i, from_to) { from_to.width = Math.round(p.width * from_to.zoom); from_to.height = Math.round(p.height * from_to.zoom); from_to.left = Math.round((self_width - from_to.width) * from_to.xrel); from_to.top = Math.round((self_height - from_to.height) * from_to.yrel); }); // append the image (or anchor) element to the container var elm; if (p.href) elm = jQuery(format('', p.href, p.src)); else elm = jQuery(format('', p.src)); if (p.onclick) elm.click(p.onclick); elm.appendTo(self); } speed = undefined; // speed mode has now been translated to full mode // find images to animate and set initial css attributes var imgs = self.find('img').css({ position: 'absolute', visibility: 'hidden', top: 0, left: 0, border: 0 }); // show first image imgs.eq(0).css({ visibility: 'visible' }); if (! sleep) imgs.eq(0).css(position_to_css(plan[0], 2)); // create animation chain var countdown = opts.loop; function create_chain(i, chainf) { // building the chain backwards, or inside out if (i % 2 == 0) { if (sleep) { // still image sleep var i_sleep = i / 2, i_hide = (i_sleep - 1 + plan.length) % plan.length, img_sleep = imgs.eq(i_sleep), img_hide = imgs.eq(i_hide); var newf = function() { img_hide.css('visibility', 'hidden'); setTimeout(chainf, sleep); }; } else { // single image slide var i_slide = i / 2, i_hide = (i_slide - 1 + plan.length) % plan.length, img_slide = imgs.eq(i_slide), img_hide = imgs.eq(i_hide), time = plan[i_slide].time_ms, slide_anim = position_to_css(plan[i_slide], 3); var newf = function() { img_hide.css('visibility', 'hidden'); img_slide.animate(slide_anim, time, 'linear', chainf); }; } } else { if (sleep) { // still image cross-fade var i_from = Math.floor(i / 2), i_to = Math.ceil(i / 2) % plan.length, img_from = imgs.eq(i_from), img_to = imgs.eq(i_to), from_anim = {}, to_init = { visibility: 'visible' }, to_anim = {}; if (i_to > i_from) { to_init.opacity = 0; to_anim.opacity = 1; } else { from_anim.opacity = 0; } var newf = function() { img_to.css(to_init); if (from_anim.opacity != undefined) img_from.animate(from_anim, fade_ms, 'linear', chainf); else img_to.animate(to_anim, fade_ms, 'linear', chainf); }; } else { // cross-slide + cross-fade var i_from = Math.floor(i / 2), i_to = Math.ceil(i / 2) % plan.length, img_from = imgs.eq(i_from), img_to = imgs.eq(i_to), from_anim = position_to_css(plan[i_from], 4), to_init = position_to_css(plan[i_to], 1), to_anim = position_to_css(plan[i_to], 2); if (i_to > i_from) { to_init.opacity = 0; to_anim.opacity = 1; } else { from_anim.opacity = 0; } to_init.visibility = 'visible'; var newf = function() { img_from.animate(from_anim, fade_ms, 'linear'); img_to.css(to_init); img_to.animate(to_anim, fade_ms, 'linear', chainf); }; } } // if the loop option was requested, push a countdown check if (opts.loop && i == plan.length * 2 - 2) { var newf_orig = newf; newf = function() { if (--countdown) newf_orig(); } } if (i > 0) return create_chain(i - 1, newf); else return newf; } var animation = create_chain(plan.length * 2 - 1, function() { return animation(); }); // start animation animation(); }); return self; }; //------------ /* * 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 */ var tb_pathToImage = "http://www.cavalog.com/theme/loadingAnimation.gif"; /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ //on page load call tb_init $(document).ready(function(){ tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox imgLoader = new Image();// preload image imgLoader.src = tb_pathToImage; }); //add thickbox to href & area elements that have a class of .thickbox function tb_init(domChunk){ $(domChunk).unbind("click"); $(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) {//function called when the user clicks on a thickbox link try { if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 $("body","html").css({height: "100%", width: "100%"}); $("html").css("overflow","hidden"); if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 $("body").append("
"); $("#TB_overlay").click(tb_remove); } }else{//all others if(document.getElementById("TB_overlay") === null){ $("body").append("
"); $("#TB_overlay").click(tb_remove); } } if(tb_detectMacXFF()){ $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash }else{ $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity } if(caption===null){caption="";} $("body").append("
");//add loader to the page $('#TB_load').show();//show loader var baseURL; if(url.indexOf("?")!==-1){ //ff there is a query string involved 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'){//code to show images 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 = "  Next >"; } else { TB_PrevCaption = TB_TempArray[TB_Counter].title; TB_PrevURL = TB_TempArray[TB_Counter].href; TB_PrevHTML = "  < Prev"; } } else { TB_FoundURL = true; TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); } } } imgPreloader = new Image(); imgPreloader.onload = function(){ imgPreloader.onload = null; // Resizing large images - orginal by Christian Montoya edited by me. 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; } } // End Resizing TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; if(document.location.href.indexOf('/en/')!='-1') { $("#TB_window").append(""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
Close or Esc
"); } else { $("#TB_window").append(""+caption+"" + "
"+caption+"
" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "
Fermer ou Esc
"); } $("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) { function goPrev(){ if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} $("#TB_window").remove(); $("body").append("
"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } $("#TB_prev").click(goPrev); } if (!(TB_NextHTML === "")) { function goNext(){ $("#TB_window").remove(); $("body").append("
"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } $("#TB_next").click(goNext); } document.onkeydown = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla keycode = e.which; } if(keycode == 27){ // close tb_remove(); } else if(keycode == 190){ // display previous image if(!(TB_NextHTML == "")){ document.onkeydown = ""; goNext(); } } else if(keycode == 188){ // display next image if(!(TB_PrevHTML == "")){ document.onkeydown = ""; goPrev(); } } }; tb_position(); $("#TB_load").remove(); $("#TB_ImageOff").click(tb_remove); $("#TB_window").css({display:"block"}); //for safari using css instead of show }; imgPreloader.src = url; }else{//code to show html var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window urlNoQuery = url.split('TB_'); $("#TB_iframeContent").remove(); if(params['modal'] != "true"){//iframe no modal if(document.location.href.indexOf('/en/')!='-1') { $("#TB_window").append("
"+caption+"
Clorse or Esc
"); }else { $("#TB_window").append("
"+caption+"
Fermer ou Esc
"); } }else{//iframe modal $("#TB_overlay").unbind(); $("#TB_window").append(""); } }else{// not an iframe, ajax if($("#TB_window").css("display") != "block"){ if(params['modal'] != "true"){//ajax no modal if(document.location.href.indexOf('/en/')!='-1') { $("#TB_window").append("
"+caption+"
Close or Esc
"); }else { $("#TB_window").append("
"+caption+"
Fermer ou Esc
"); } }else{//ajax modal $("#TB_overlay").unbind(); $("#TB_window").append("
"); } }else{//this means the window is already up, we are just loading new content via ajax $("#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() ); // move elements back when you're finished }); tb_position(); $("#TB_load").remove(); $("#TB_window").css({display:"block"}); }else if(url.indexOf('TB_iframe') != -1){ tb_position(); if($.browser.safari){//safari needs help because it will not fire iframe onload $("#TB_load").remove(); $("#TB_window").css({display:"block"}); } }else{ $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method 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) { // ie keycode = event.keyCode; } else { // mozilla keycode = e.which; } if(keycode == 27){ // close tb_remove(); } }; } } catch(e) { //nothing here } } //helper functions below 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") {//if IE 6 $("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)) { // take away IE6 $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); } } function tb_parseQuery ( query ) { var Params = {}; if ( ! query ) {return Params;}// return empty object 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; } } //------------