/* jQuery "static" classes compilation.
 *
 * Contains:
 *
 * - jQuery 1.2.5
 * - jCarouselLite 1.0.1 (minified)
 * - jQuery Cycle 2.80 (minified)
 * - jQuery Mousewheel 3.0.2
 * - jQuery Curvy Corners 1.81
 * - jQuery Curvy Corners 1.81
 * - jQuery Easing v1.3
 * - jQuery SelectBoxes 2.2.4
 * - extra: Highslide JS 4.1.4 (April 17 2009)
 * - extra: AJAX Suggestions
 */


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

/*
 * jCarouselLite 1.0.1 (minified)
 */

(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var b=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var c=$(this),ul=$("ul",c),tLi=$("li",ul),tl=tLi.size(),v=o.visible;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v}var f=$("li",ul),itemLength=f.size(),curr=o.start;c.css("visibility","visible");f.css({overflow:"hidden",float:o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});c.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var g=o.vertical?height(f):width(f);var h=g*itemLength;var j=g*v;f.css({width:f.width(),height:f.height()});ul.css(sizeCss,h+"px").css(animCss,-(curr*g));c.css(sizeCss,j+"px");if(o.btnPrev)$(o.btnPrev).click(function(){return go(curr-o.scroll)});if(o.btnNext)$(o.btnNext).click(function(){return go(curr+o.scroll)});if(o.btnGo)$.each(o.btnGo,function(i,a){$(a).click(function(){return go(o.circular?o.visible+i:i)})});if(o.mouseWheel&&c.mousewheel)c.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll)});if(o.auto)setInterval(function(){go(curr+o.scroll)},o.auto+o.speed);function vis(){return f.slice(curr).slice(0,v)};function go(a){if(!b){if(o.beforeStart)o.beforeStart.call(this,vis());if(o.circular){if(a<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*g)+"px");curr=a==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll}else if(a>=itemLength-v+1){ul.css(animCss,-((v)*g)+"px");curr=a==itemLength-v+1?v+1:v+o.scroll}else curr=a}else{if(a<0||a>itemLength-v)return;else curr=a}b=true;ul.animate(animCss=="left"?{left:-(curr*g)}:{top:-(curr*g)},o.speed,o.easing,function(){if(o.afterEnd)o.afterEnd.call(this,vis());b=false});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled")}}return false}})};function css(a,b){return parseInt($.css(a[0],b))||0};function width(a){return a[0].offsetWidth+css(a,'marginLeft')+css(a,'marginRight')};function height(a){return a[0].offsetHeight+css(a,'marginTop')+css(a,'marginBottom')}})(jQuery);

/*
 * jQuery Cycle Plugin (core)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.80 (05-MAR-2010)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.6 or later
 */
(function($){var ver="2.80";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(opts2.currSlide,opts2.nextSlide,opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts2.rev);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;if(arg2===true){options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,1);}return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}while((opts.timeout-opts.speed)<250){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){$(els).stop(true,true);opts.busy=false;}if(opts.busy){return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after);}else{$.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent);}}opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}if(opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(curr,next,opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).find("a").removeClass(clsName).filter("a:eq("+currSlide+")").addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}if($.isFunction(opts.prevNextClick)){opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if($.isFunction(opts.pagerClick)){opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click.cycle",pager:null,pagerClick:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null};})(jQuery);

/*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * Version: 3.0.2
 *
 * Requires: 1.2.2+
 */

(function($) {

var types = ['DOMMouseScroll', 'mousewheel'];

$.event.special.mousewheel = {
	setup: function() {
		if ( this.addEventListener )
			for ( var i=types.length; i; )
				this.addEventListener( types[--i], handler, false );
		else
			this.onmousewheel = handler;
	},

	teardown: function() {
		if ( this.removeEventListener )
			for ( var i=types.length; i; )
				this.removeEventListener( types[--i], handler, false );
		else
			this.onmousewheel = null;
	}
};

$.fn.extend({
	mousewheel: function(fn) {
		return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
	},

	unmousewheel: function(fn) {
		return this.unbind("mousewheel", fn);
	}
});


function handler(event) {
	var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true;

	event = $.event.fix(event || window.event);
	event.type = "mousewheel";

	if ( event.wheelDelta ) delta = event.wheelDelta/120;
	if ( event.detail     ) delta = -event.detail/3;

	// Add events and delta to the front of the arguments
	args.unshift(event, delta);

	return $.event.handle.apply(this, args);
}

})(jQuery);

 /****************************************************************
  *                                                              *
  *  JQuery Curvy Corners by Mike Jolley                         *
  *	 http://blue-anvil.com                                       *
  *  ------------                                                *
  *  Version 1.81                                                 *
  *                                                              *
  *  Origionaly by: Cameron Cooke and Tim Hutchison.             *
  *  Website: http://www.curvycorners.net                        *
  ****************************************************************/
(function($){$.fn.corner=function(Z){function BlendColour(a,b,c){var d=parseInt(a.substr(1,2),16);var e=parseInt(a.substr(3,2),16);var f=parseInt(a.substr(5,2),16);var g=parseInt(b.substr(1,2),16);var h=parseInt(b.substr(3,2),16);var i=parseInt(b.substr(5,2),16);if(c>1||c<0)c=1;var j=Math.round((d*c)+(g*(1-c)));if(j>255)j=255;if(j<0)j=0;var k=Math.round((e*c)+(h*(1-c)));if(k>255)k=255;if(k<0)k=0;var l=Math.round((f*c)+(i*(1-c)));if(l>255)l=255;if(l<0)l=0;return"#"+IntToHex(j)+IntToHex(k)+IntToHex(l)}function IntToHex(a){base=a/16;rem=a%16;base=base-(rem/16);baseS=MakeHex(base);remS=MakeHex(rem);return baseS+''+remS}function MakeHex(x){if((x>=0)&&(x<=9)){return x}else{switch(x){case 10:return"A";case 11:return"B";case 12:return"C";case 13:return"D";case 14:return"E";case 15:return"F"};return"F"}}function pixelFraction(x,y,r){var a=0;var b=new Array(1);var c=new Array(1);var d=0;var e="";var f=Math.sqrt((Math.pow(r,2)-Math.pow(x,2)));if((f>=y)&&(f<(y+1))){e="Left";b[d]=0;c[d]=f-y;d=d+1};var f=Math.sqrt((Math.pow(r,2)-Math.pow(y+1,2)));if((f>=x)&&(f<(x+1))){e=e+"Top";b[d]=f-x;c[d]=1;d=d+1};var f=Math.sqrt((Math.pow(r,2)-Math.pow(x+1,2)));if((f>=y)&&(f<(y+1))){e=e+"Right";b[d]=1;c[d]=f-y;d=d+1};var f=Math.sqrt((Math.pow(r,2)-Math.pow(y,2)));if((f>=x)&&(f<(x+1))){e=e+"Bottom";b[d]=f-x;c[d]=0};switch(e){case"LeftRight":a=Math.min(c[0],c[1])+((Math.max(c[0],c[1])-Math.min(c[0],c[1]))/2);break;case"TopRight":a=1-(((1-b[0])*(1-c[1]))/2);break;case"TopBottom":a=Math.min(b[0],b[1])+((Math.max(b[0],b[1])-Math.min(b[0],b[1]))/2);break;case"LeftBottom":a=(c[0]*b[1])/2;break;default:a=1};return a}function rgb2Hex(a){try{var b=rgb2Array(a);var c=parseInt(b[0]);var d=parseInt(b[1]);var f=parseInt(b[2]);var g="#"+IntToHex(c)+IntToHex(d)+IntToHex(f)}catch(e){alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex")};return g}function rgb2Array(a){var b=a.substring(4,a.indexOf(")"));var c=b.split(", ");return c}function format_colour(a){var b="transparent";if(a!=""&&a!="transparent"){if(a.substr(0,3)=="rgb"){b=rgb2Hex(a)}else if(a.length==4){b="#"+a.substring(1,2)+a.substring(1,2)+a.substring(2,3)+a.substring(2,3)+a.substring(3,4)+a.substring(3,4)}else{b=a}};return b};function strip_px(a){return parseInt(((a!="auto"&&a.indexOf("%")==-1&&a!=""&&a.indexOf("px")!==-1)?a.slice(0,a.indexOf("px")):0))}function drawPixel(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o=$(a);var p=document.createElement("div");$(p).css({height:f,width:"1px",position:"absolute","font-size":"1px",overflow:"hidden"});var q=Math.max(n.tl?n.tl.radius:0,n.tr?n.tr.radius:0);if(h==-1&&i!=""){if(q>0)$(p).css("background-position","-"+((m-j-l)+b)+"px -"+((o.height()+q-l)-c)+"px");else $(p).css("background-position","-"+((m-j-l)+b)+"px -"+((o.height())-c)+"px");$(p).css({"background-image":i,"background-repeat":o.css("background-repeat"),"background-color":d})}else{if(!k)$(p).css("background-color",d).addClass('hasBackgroundColor');else $(p).css("background-color",d)};if(e!=100)setOpacity(p,e);$(p).css({top:c+"px",left:b+"px"});return p};function setOpacity(a,b){b=(b==100)?99.999:b;if($.browser.safari&&a.tagName!="IFRAME"){var c=rgb2Array(a.style.backgroundColor);var d=parseInt(c[0]);var e=parseInt(c[1]);var f=parseInt(c[2]);a.style.backgroundColor="rgba("+d+", "+e+", "+f+", "+b/100+")"}else if(typeof(a.style.opacity)!="undefined"){a.style.opacity=b/100}else if(typeof(a.style.MozOpacity)!="undefined"){a.style.MozOpacity=b/100}else if(typeof(a.style.filter)!="undefined"){a.style.filter="alpha(opacity:"+b+")"}else if(typeof(a.style.KHTMLOpacity)!="undefined"){a.style.KHTMLOpacity=b/100}}function applyCorners(a,b){var c=$(a);var d=c.css("backgroundImage");var e=null;var f=null;var g=new Array();var h=null;var l=strip_px(c.css("height"))?strip_px(c.css("height")):a.scrollHeight;var m=strip_px(c.css("width"))?strip_px(c.css("width")):a.scrollWidth;var n=strip_px(c.css("borderTopWidth"))?strip_px(c.css("borderTopWidth")):0;var o=strip_px(c.css("paddingTop"));var p=strip_px(c.css("paddingBottom"));var q=strip_px(c.css("paddingLeft"));var r=strip_px(c.css("paddingRight"));var s=format_colour(c.css("backgroundColor"));var u=(d!="none"&&d!="initial")?d:"";var v=format_colour(c.css("borderTopColor"));var w=n+"px"+" solid "+v;var x=Math.max(b.tl?b.tl.radius:0,b.tr?b.tr.radius:0);var y=Math.max(b.bl?b.bl.radius:0,b.br?b.br.radius:0);c.addClass('hasCorners').css({"padding":"0","borderColor":a.style.borderColour,'overflow':'visible'});if(a.style.position!="absolute")c.css("position","relative");if(($.browser.msie)){if($.browser.version==6&&a.style.width=="auto"&&a.style.height=="auto")c.css("width","100%");c.css("zoom","1");$(c+" *").css("zoom","normal")}for(var t=0;t<2;t++){switch(t){case 0:if(b.tl||b.tr){var A=document.createElement("div");e=a.appendChild(A);$(e).css({width:"100%","font-size":"1px",overflow:"hidden",position:"absolute","padding-left":n,"padding-right":n,height:x+"px",top:0-x+"px",left:0-n+"px"}).addClass('topContainer')};break;case 1:if(b.bl||b.br){var A=document.createElement("div");f=a.appendChild(A);$(f).css({width:"100%","font-size":"1px",overflow:"hidden",position:"absolute","padding-left":n,"padding-right":n,height:y,bottom:0-y+"px",left:0-n+"px"}).addClass('bottomContainer')};break}};if(b.autoPad==true){var B=document.createElement("div");var C=document.createElement("div");var D=document.createElement("div");$(C).css({margin:"0","padding-bottom":p,"padding-top":o,"padding-left":q,"padding-right":r,'overflow':'visible'}).addClass('hasBackgroundColor content_container');$(B).css({position:"relative",'float':"left",width:"100%","margin-top":"-"+(x-n)+"px","margin-bottom":"-"+(y-n)+"px"}).addClass="autoPadDiv";$(D).css("clear","both");C.appendChild(B);C.appendChild(D);c.wrapInner(C)};if(e)c.css("border-top",0);if(f)c.css("border-bottom",0);var E=["tr","tl","br","bl"];for(var i in E){if(i>-1<4){var F=E[i];if(!b[F]){if(((F=="tr"||F=="tl")&&e!=null)||((F=="br"||F=="bl")&&f!=null)){var G=document.createElement("div");$(G).css({position:"relative","font-size":"1px",overflow:"hidden"});if(u=="")$(G).css("background-color",s);else $(G).css("background-image",u).css("background-color",s);switch(F){case"tl":$(G).css({height:x-n,"margin-right":b.tr.radius-(n*2),"border-left":w,"border-top":w,left:-n+"px","background-repeat":c.css("background-repeat"),"background-position":n+"px 0px"});break;case"tr":$(G).css({height:x-n,"margin-left":b.tl.radius-(n*2),"border-right":w,"border-top":w,left:n+"px","background-repeat":c.css("background-repeat"),"background-position":"-"+(x+n)+"px 0px"});break;case"bl":if(x>0)$(G).css({height:y-n,"margin-right":b.br.radius-(n*2),"border-left":w,"border-bottom":w,left:-n+"px","background-repeat":c.css("background-repeat"),"background-position":"0px -"+(c.height()+x-n+1)+"px"});else $(G).css({height:y-n,"margin-right":b.br.radius-(n*2),"border-left":w,"border-bottom":w,left:-n+"px","background-repeat":c.css("background-repeat"),"background-position":"0px -"+(c.height())+"px"});break;case"br":if(x>0)$(G).css({height:y-n,"margin-left":b.bl.radius-(n*2),"border-right":w,"border-bottom":w,left:n+"px","background-repeat":c.css("background-repeat"),"background-position":"-"+b.bl.radius+n+"px -"+(c.height()+x-n+1)+"px"});else $(G).css({height:y-n,"margin-left":b.bl.radius-(n*2),"border-right":w,"border-bottom":w,left:n+"px","background-repeat":c.css("background-repeat"),"background-position":"-"+b.bl.radius+n+"px -"+(c.height())+"px"});break}}}else{if(g[b[F].radius]){var G=g[b[F].radius].cloneNode(true)}else{var G=document.createElement("DIV");$(G).css({height:b[F].radius,width:b[F].radius,position:"absolute","font-size":"1px",overflow:"hidden"});var H=parseInt(b[F].radius-n);for(var I=0,j=b[F].radius;I<j;I++){if((I+1)>=H)var J=-1;else var J=(Math.floor(Math.sqrt(Math.pow(H,2)-Math.pow((I+1),2)))-1);if(H!=j){if((I)>=H)var K=-1;else var K=Math.ceil(Math.sqrt(Math.pow(H,2)-Math.pow(I,2)));if((I+1)>=j)var L=-1;else var L=(Math.floor(Math.sqrt(Math.pow(j,2)-Math.pow((I+1),2)))-1)};if((I)>=j)var M=-1;else var M=Math.ceil(Math.sqrt(Math.pow(j,2)-Math.pow(I,2)));if(J>-1)G.appendChild(drawPixel(a,I,0,s,100,(J+1),G,-1,u,b[F].radius,0,n,m,b));if(H!=j){for(var N=(J+1);N<K;N++){if(b.antiAlias){if(u!=""){var O=(pixelFraction(I,N,H)*100);if(O<30){G.appendChild(drawPixel(a,I,N,v,100,1,G,0,u,b[F].radius,1,n,m,b))}else{G.appendChild(drawPixel(a,I,N,v,100,1,G,-1,u,b[F].radius,1,n,m,b))}}else{var P=BlendColour(s,v,pixelFraction(I,N,H));G.appendChild(drawPixel(a,I,N,P,100,1,G,0,u,b[F].radius,F,1,n,m,b))}}};if(b.antiAlias){if(L>=K){if(K==-1)K=0;G.appendChild(drawPixel(a,I,K,v,100,(L-K+1),G,0,u,0,1,n,m,b))}}else{if(L>=J){G.appendChild(drawPixel(a,I,(J+1),v,100,(L-J),G,0,u,0,1,n,m,b))}};var Q=v}else{var Q=s;var L=J};if(b.antiAlias){for(var N=(L+1);N<M;N++){G.appendChild(drawPixel(a,I,N,Q,(pixelFraction(I,N,j)*100),1,G,((n>0)?0:-1),u,b[F].radius,1,n,m,b))}}};g[b[F].radius]=G.cloneNode(true)};if(F!="br"){for(var t=0,k=G.childNodes.length;t<k;t++){var R=G.childNodes[t];var S=strip_px($(R).css("top"));var T=strip_px($(R).css("left"));var U=strip_px($(R).css("height"));if(F=="tl"||F=="bl"){$(R).css("left",b[F].radius-T-1+"px")};if(F=="tr"||F=="tl"){$(R).css("top",b[F].radius-U-S+"px")};switch(F){case"tr":$(R).css("background-position","-"+Math.abs((m-b[F].radius+n)+T)+"px -"+Math.abs(b[F].radius-U-S-n)+"px");break;case"tl":$(R).css("background-position","-"+Math.abs((b[F].radius-T-1)-n)+"px -"+Math.abs(b[F].radius-U-S-n)+"px");break;case"bl":if(x>0)$(R).css("background-position","-"+Math.abs((b[F].radius-T-1)-n)+"px -"+Math.abs((c.height()+x-n+1))+"px");else $(R).css("background-position","-"+Math.abs((b[F].radius-T-1)-n)+"px -"+Math.abs((c.height()))+"px");break}}}};if(G){switch(F){case"tl":if($(G).css("position")=="absolute")$(G).css("top","0");if($(G).css("position")=="absolute")$(G).css("left","0");if(e)e.appendChild(G);break;case"tr":if($(G).css("position")=="absolute")$(G).css("top","0");if($(G).css("position")=="absolute")$(G).css("right","0");if(e)e.appendChild(G);break;case"bl":if($(G).css("position")=="absolute")$(G).css("bottom","0");if(G.style.position=="absolute")$(G).css("left","0");if(f)f.appendChild(G);break;case"br":if($(G).css("position")=="absolute")$(G).css("bottom","0");if($(G).css("position")=="absolute")$(G).css("right","0");if(f)f.appendChild(G);break}}}};var V=new Array();V["t"]=Math.abs(b.tl.radius-b.tr.radius);V["b"]=Math.abs(b.bl.radius-b.br.radius);for(z in V){if(z=="t"||z=="b"){if(V[z]){var W=((b[z+"l"].radius<b[z+"r"].radius)?z+"l":z+"r");var X=document.createElement("div");$(X).css({height:V[z],width:b[W].radius+"px",position:"absolute","font-size":"1px",overflow:"hidden","background-color":s,"background-image":u});switch(W){case"tl":$(X).css({"bottom":"0","left":"0","border-left":w,"background-position":"0px -"+(b[W].radius-n)});e.appendChild(X);break;case"tr":$(X).css({"bottom":"0","right":"0","border-right":w,"background-position":"0px -"+(b[W].radius-n)+"px"});e.appendChild(X);break;case"bl":$(X).css({"top":"0","left":"0","border-left":w,"background-position":"0px -"+(c.height()+b[W].radius-n)});f.appendChild(X);break;case"br":$(X).css({"top":"0","right":"0","border-right":w,"background-position":"0px -"+(c.height()+b[W].radius-n)});f.appendChild(X);break}};var Y=document.createElement("div");$(Y).css({position:"relative","font-size":"1px",overflow:"hidden","background-color":s,"background-image":u,"background-repeat":c.css("background-repeat")});switch(z){case"t":if(e){if(b.tl.radius&&b.tr.radius){$(Y).css({height:x-n+"px","margin-left":b.tl.radius-n+"px","margin-right":b.tr.radius-n+"px","border-top":w}).addClass('hasBackgroundColor');if(u!="")$(Y).css("background-position","-"+(x+n)+"px 0px");e.appendChild(Y)};c.css("background-position","0px -"+(x-n+1)+"px")};break;case"b":if(f){if(b.bl.radius&&b.br.radius){$(Y).css({height:y-n+"px","margin-left":b.bl.radius-n+"px","margin-right":b.br.radius-n+"px","border-bottom":w});if(u!=""&&x>0)$(Y).css("background-position","-"+(b.bl.radius-n)+"px -"+(c.height()+x-n+1)+"px");else $(Y).css("background-position","-"+(b.bl.radius-n)+"px -"+(c.height())+"px").addClass('hasBackgroundColor');f.appendChild(Y)}};break}}};c.prepend(e);c.prepend(f)}var bb={tl:{radius:8},tr:{radius:8},bl:{radius:8},br:{radius:8},antiAlias:true,autoPad:true,validTags:["div"]};if(Z&&typeof(Z)!='string')$.extend(bb,Z);return this.each(function(){if(!$(this).is('.hasCorners')){applyCorners(this,bb)}})}})(jQuery);

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * Open source under the BSD License.
 *
 * Copyright © 2008 George McGinley Smith
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 * jQuery SelectBoxes 2.2.4
 * Copyright (c) 2006-2009 Sam Collett (http://www.texotela.co.uk)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version 2.2.4
 * Demo: http://www.texotela.co.uk/code/jquery/select/
 *
 * $LastChangedDate: 2009-02-08 00:28:12 +0000 (Sun, 08 Feb 2009) $
 * $Rev: 6185 $
 *
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[3-9q-suw-zA-Y]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(6(h){h.w.L=6(){5 j=6(a,f,c,g){5 d=document.createElement("S");d.r=f,d.G=c;5 b=a.C;5 e=b.s;3(!a.z){a.z={};y(5 i=0;i<e;i++){a.z[b[i].r]=i}}3(9 a.z[f]=="T")a.z[f]=e;a.C[a.z[f]]=d;3(g){d.u=8}};5 k=U;3(k.s==0)7 4;5 l=8;5 m=A;5 n,o,p;3(9(k[0])=="D"){m=8;n=k[0]}3(k.s>=2){3(9(k[1])=="M")l=k[1];q 3(9(k[2])=="M")l=k[2];3(!m){o=k[0];p=k[1]}}4.x(6(){3(4.E.B()!="F")7;3(m){y(5 a in n){j(4,a,n[a],l)}}q{j(4,o,p,l)}});7 4};h.w.ajaxAddOption=6(c,g,d,b,e){3(9(c)!="I")7 4;3(9(g)!="D")g={};3(9(d)!="M")d=8;4.x(6(){5 f=4;h.getJSON(c,g,6(a){h(f).L(a,d);3(9 b=="6"){3(9 e=="D"){b.apply(f,e)}q{b.N(f)}}})});7 4};h.w.V=6(){5 d=U;3(d.s==0)7 4;5 b=9(d[0]);5 e,i;3(b=="I"||b=="D"||b=="6"){e=d[0];3(e.H==W){5 j=e.s;y(5 k=0;k<j;k++){4.V(e[k],d[1])}7 4}}q 3(b=="number")i=d[0];q 7 4;4.x(6(){3(4.E.B()!="F")7;3(4.z)4.z=X;5 a=A;5 f=4.C;3(!!e){5 c=f.s;y(5 g=c-1;g>=0;g--){3(e.H==O){3(f[g].r.P(e)){a=8}}q 3(f[g].r==e){a=8}3(a&&d[1]===8)a=f[g].u;3(a){f[g]=X}a=A}}q{3(d[1]===8){a=f[i].u}q{a=8}3(a){4.remove(i)}}});7 4};h.w.sortOptions=6(e){5 i=h(4).Y();5 j=9(e)=="T"?8:!!e;4.x(6(){3(4.E.B()!="F")7;5 c=4.C;5 g=c.s;5 d=[];y(5 b=0;b<g;b++){d[b]={v:c[b].r,t:c[b].G}}d.sort(6(a,f){J=a.t.B(),K=f.t.B();3(J==K)7 0;3(j){7 J<K?-1:1}q{7 J>K?-1:1}});y(5 b=0;b<g;b++){c[b].G=d[b].t;c[b].r=d[b].v}}).Q(i,8);7 4};h.w.Q=6(g,d){5 b=g;5 e=9(g);3(e=="D"&&b.H==W){5 i=4;h.x(b,6(){i.Q(4,d)})};5 j=d||A;3(e!="I"&&e!="6"&&e!="D")7 4;4.x(6(){3(4.E.B()!="F")7 4;5 a=4.C;5 f=a.s;y(5 c=0;c<f;c++){3(b.H==O){3(a[c].r.P(b)){a[c].u=8}q 3(j){a[c].u=A}}q{3(a[c].r==b){a[c].u=8}q 3(j){a[c].u=A}}}});7 4};h.w.copyOptions=6(g,d){5 b=d||"u";3(h(g).size()==0)7 4;4.x(6(){3(4.E.B()!="F")7 4;5 a=4.C;5 f=a.s;y(5 c=0;c<f;c++){3(b=="all"||(b=="u"&&a[c].u)){h(g).L(a[c].r,a[c].G)}}});7 4};h.w.containsOption=6(g,d){5 b=A;5 e=g;5 i=9(e);5 j=9(d);3(i!="I"&&i!="6"&&i!="D")7 j=="6"?4:b;4.x(6(){3(4.E.B()!="F")7 4;3(b&&j!="6")7 A;5 a=4.C;5 f=a.s;y(5 c=0;c<f;c++){3(e.H==O){3(a[c].r.P(e)){b=8;3(j=="6")d.N(a[c],c)}}q{3(a[c].r==e){b=8;3(j=="6")d.N(a[c],c)}}}});7 j=="6"?4:b};h.w.Y=6(){5 a=[];4.R().x(6(){a[a.s]=4.r});7 a};h.w.selectedTexts=6(){5 a=[];4.R().x(6(){a[a.s]=4.G});7 a};h.w.R=6(){7 4.find("S:u")}})(jQuery);',[],61,'|||if|this|var|function|return|true|typeof|||||||||||||||||else|value|length||selected||fn|each|for|cache|false|toLowerCase|options|object|nodeName|select|text|constructor|string|o1t|o2t|addOption|boolean|call|RegExp|match|selectOptions|selectedOptions|option|undefined|arguments|removeOption|Array|null|selectedValues'.split('|'),0,{}));

/******************************************************************************
Name:    Highslide JS
Version: 4.1.4 (April 17 2009)
Config:  default
Author:  Torstein Hřnsi
Support: http://highslide.com/support

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 = {
// Language strings
lang : {
	cssDirection: 'ltr',
	loadingText : 'Loading...',
	loadingTitle : 'Click to cancel',
	focusTitle : 'Click to bring to front',
	fullExpandTitle : 'Expand to actual size (f)',
	creditsText : 'Powered by <i>Highslide JS</i>',
	creditsTitle : 'Go to the Highslide JS homepage',
	restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
},
// See http://highslide.com/ref for examples of settings
graphicsDir : 'http://images.realitynamape.sk/highslide/graphics/',
expandCursor : 'zoomin.cur', // null disables
restoreCursor : 'zoomout.cur', // null disables
expandDuration : 250, // milliseconds
restoreDuration : 250,
marginLeft : 15,
marginRight : 15,
marginTop : 15,
marginBottom : 15,
zIndexCounter : 1001, // adjust to other absolutely positioned elements
loadingOpacity : 0.75,
allowMultipleInstances: true,
numberOfImagesToPreload : 5,
outlineWhileAnimating : 2, // 0 = never, 1 = always, 2 = HTML only
outlineStartOffset : 3, // ends at 10
padToMinWidth : false, // pad the popup width to make room for wide caption
fullExpandPosition : 'bottom right',
fullExpandOpacity : 1,
showCredits : true, // you can set this to false if you want
creditsHref : 'http://highslide.com/',
enableKeyListener : true,
openerTagNames : ['a'], // Add more to allow slideshow indexing

dragByHeading: true,
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 : 'highslide-wrapper', // for enhanced css-control
// END OF YOUR SETTINGS


// declare internal properties
preloadTheseImages : [],
continuePreloading: true,
expanders : [],
overrides : [
	'allowSizeReduction',
	'useBox',
	'outlineType',
	'outlineWhileAnimating',
	'captionId',
	'captionText',
	'captionEval',
	'captionOverlay',
	'headingId',
	'headingText',
	'headingEval',
	'headingOverlay',
	'creditsPosition',
	'dragByHeading',

	'width',
	'height',

	'wrapperClassName',
	'minWidth',
	'minHeight',
	'maxWidth',
	'maxHeight',
	'slideshowGroup',
	'easing',
	'easingClose',
	'fadeInOut',
	'src'
],
overlays : [],
idCounter : 0,
oPos : {
	x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
	y: ['above', 'top', 'middle', 'bottom', 'below']
},
mouse: {},
headingOverlay: {},
captionOverlay: {},
timers : [],

pendingOutlines : {},
clones : {},
onReady: [],
uaVersion: parseFloat((navigator.userAgent.toLowerCase().match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1]),
ie : (document.all && !window.opera),
safari : /Safari/.test(navigator.userAgent),
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),

$ : function (id) {
	if (id) return document.getElementById(id);
},

push : function (arr, val) {
	arr[arr.length] = val;
},

createElement : function (tag, attribs, styles, parent, nopad) {
	var el = document.createElement(tag);
	if (attribs) hs.extend(el, attribs);
	if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
	if (styles) hs.setStyles(el, styles);
	if (parent) parent.appendChild(el);
	return el;
},

extend : function (el, attribs) {
	for (var x in attribs) el[x] = attribs[x];
	return el;
},

setStyles : function (el, styles) {
	for (var x in styles) {
		if (hs.ie && x == 'opacity') {
			if (styles[x] > 0.99) el.style.removeAttribute('filter');
			else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')';
		}
		else el.style[x] = styles[x];
	}
},
animate: function(el, prop, opt) {
	var start,
		end,
		unit;
	if (typeof opt != 'object' || opt === null) {
		var args = arguments;
		opt = {
			duration: args[2],
			easing: args[3],
			complete: args[4]
		};
	}
	if (typeof opt.duration != 'number') opt.duration = 250;
	opt.easing = Math[opt.easing] || Math.easeInQuad;
	opt.curAnim = hs.extend({}, prop);
	for (var name in prop) {
		var e = new hs.fx(el, opt , name );

		start = parseFloat(hs.css(el, name)) || 0;
		end = parseFloat(prop[name]);
		unit = name != 'opacity' ? 'px' : '';

		e.custom( start, end, unit );
	}
},
css: function(el, prop) {
	if (document.defaultView) {
		return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);

	} else {
		if (prop == 'opacity') prop = 'filter';
		var val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b){ return b.toUpperCase(); })];
		if (prop == 'filter')
			val = val.replace(/alpha\(opacity=([0-9]+)\)/,
				function (a, b) { return b / 100 });
		return val === '' ? 1 : val;
	}
},

getPageSize : function () {
	var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
		? d.documentElement : d.body;

	var width = hs.ie ? iebody.clientWidth :
			(d.documentElement.clientWidth || self.innerWidth),
		height = hs.ie ? iebody.clientHeight : self.innerHeight;

	return {
		width: width,
		height: height,
		scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset,
		scrollTop: hs.ie ? iebody.scrollTop : pageYOffset
	}
},

getPosition : function(el)	{
	var p = { x: el.offsetLeft, y: el.offsetTop };
	while (el.offsetParent)	{
		el = el.offsetParent;
		p.x += el.offsetLeft;
		p.y += el.offsetTop;
		if (el != document.body && el != document.documentElement) {
			p.x -= el.scrollLeft;
			p.y -= el.scrollTop;
		}
	}
	return p;
},

expand : function(a, params, custom, type) {
	if (!a) a = hs.createElement('a', null, { display: 'none' }, hs.container);
	if (typeof a.getParams == 'function') return params;
	try {
		new hs.Expander(a, params, custom);
		return false;
	} catch (e) { return true; }
},


focusTopmost : function() {
	var topZ = 0,
		topmostKey = -1,
		expanders = hs.expanders,
		exp,
		zIndex;
	for (var i = 0; i < expanders.length; i++) {
		exp = expanders[i];
		if (exp) {
			zIndex = exp.wrapper.style.zIndex;
			if (zIndex && zIndex > topZ) {
				topZ = zIndex;
				topmostKey = i;
			}
		}
	}
	if (topmostKey == -1) hs.focusKey = -1;
	else expanders[topmostKey].focus();
},

getParam : function (a, param) {
	a.getParams = a.onclick;
	var p = a.getParams ? a.getParams() : null;
	a.getParams = null;

	return (p && typeof p[param] != 'undefined') ? p[param] :
		(typeof hs[param] != 'undefined' ? hs[param] : null);
},

getSrc : function (a) {
	var src = hs.getParam(a, 'src');
	if (src) return src;
	return a.href;
},

getNode : function (id) {
	var node = hs.$(id), clone = hs.clones[id], a = {};
	if (!node && !clone) return null;
	if (!clone) {
		clone = node.cloneNode(true);
		clone.id = '';
		hs.clones[id] = clone;
		return node;
	} else {
		return clone.cloneNode(true);
	}
},

discardElement : function(d) {
	hs.garbageBin.appendChild(d);
	hs.garbageBin.innerHTML = '';
},
transit : function (adj, exp) {
	var last = exp = exp || hs.getExpander();
	if (hs.upcoming) return false;
	else hs.last = last;
	try {
		hs.upcoming = adj;
		adj.onclick();
	} catch (e){
		hs.last = hs.upcoming = null;
	}
	try {
		exp.close();
	} catch (e) {}
	return false;
},

previousOrNext : function (el, op) {
	var exp = hs.getExpander(el);
	if (exp) {
		adj = exp.getAdjacentAnchor(op);
		return hs.transit(adj, exp);
	} else 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 (typeof e.target.form != 'undefined') return true; // form element has focus
	var exp = hs.getExpander();

	var op = null;
	switch (e.keyCode) {
		case 70: // f
			if (exp) exp.doFullExpand();
			return true;
		case 32: // Space
		case 34: // Page Down
		case 39: // Arrow right
		case 40: // Arrow down
			op = 1;
			break;
		case 8:  // Backspace
		case 33: // Page Up
		case 37: // Arrow left
		case 38: // Arrow up
			op = -1;
			break;
		case 27: // Escape
		case 13: // Enter
			op = 0;
	}
	if (op !== null) {hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
		if (!hs.enableKeyListener) return true;

		if (e.preventDefault) e.preventDefault();
    	else e.returnValue = false;
    	if (exp) {
			if (op == 0) {
				exp.close();
			} else {
				hs.previousOrNext(exp.key, op);
			}
			return false;
		}
	}
	return true;
},


registerOverlay : function (overlay) {
	hs.push(hs.overlays, hs.extend(overlay, { hsId: 'hsId'+ hs.idCounter++ } ));
},


getWrapperKey : function (element, expOnly) {
	var el, re = /^highslide-wrapper-([0-9]+)$/;
	// 1. look in open expanders
	el = element;
	while (el.parentNode)	{
		if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
		el = el.parentNode;
	}
	// 2. look in thumbnail
	if (!expOnly) {
		el = element;
		while (el.parentNode)	{
			if (el.tagName && hs.isHsAnchor(el)) {
				for (var key = 0; key < hs.expanders.length; key++) {
					var exp = hs.expanders[key];
					if (exp && exp.a == el) return key;
				}
			}
			el = el.parentNode;
		}
	}
	return null;
},

getExpander : function (el, expOnly) {
	if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
	if (typeof el == 'number') return hs.expanders[el] || null;
	if (typeof el == 'string') el = hs.$(el);
	return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
},

isHsAnchor : function (a) {
	return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
},

reOrder : function () {
	for (var 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 el = e.target;
	while (el.parentNode
		&& !(/highslide-(image|move|html|resize)/.test(el.className)))
	{
		el = el.parentNode;
	}
	var exp = hs.getExpander(el);
	if (exp && (exp.isClosing || !exp.isExpanded)) return true;

	if (exp && e.type == 'mousedown') {
		if (e.target.form) return true;
		var match = el.className.match(/highslide-(image|move|resize)/);
		if (match) {
			hs.dragArgs = { exp: exp , type: match[1], left: exp.x.pos, width: exp.x.size, top: exp.y.pos,
				height: exp.y.size, clickX: e.clientX, clickY: e.clientY };


			hs.addEventListener(document, 'mousemove', hs.dragHandler);
			if (e.preventDefault) e.preventDefault(); // FF

			if (/highslide-(image|html)-blur/.test(exp.content.className)) {
				exp.focus();
				hs.hasFocused = true;
			}
			return false;
		}
	} else if (e.type == 'mouseup') {

		hs.removeEventListener(document, 'mousemove', hs.dragHandler);

		if (hs.dragArgs) {
			if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
				hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
			var hasDragged = hs.dragArgs.hasDragged;

			if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
				exp.close();
			}
			else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
				hs.dragArgs.exp.doShowHide('hidden');
			}

			hs.hasFocused = false;
			hs.dragArgs = null;

		} else if (/highslide-image-blur/.test(el.className)) {
			el.style.cursor = hs.styleRestoreCursor;
		}
	}
	return false;
},

dragHandler : function(e)
{
	if (!hs.dragArgs) return true;
	if (!e) e = window.event;
	var a = hs.dragArgs, exp = a.exp;

	a.dX = e.clientX - a.clickX;
	a.dY = e.clientY - a.clickY;

	var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
	if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
		|| (distance > (hs.dragSensitivity || 5));

	if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {

		if (a.type == 'resize') exp.resize(a);
		else {
			exp.moveTo(a.left + a.dX, a.top + a.dY);
			if (a.type == 'image') exp.content.style.cursor = 'move';
		}
	}
	return false;
},

wrapperMouseHandler : function (e) {
	try {
		if (!e) e = window.event;
		var over = /mouseover/i.test(e.type);
		if (!e.target) e.target = e.srcElement; // ie
		if (hs.ie) e.relatedTarget =
			over ? e.fromElement : e.toElement; // ie
		var exp = hs.getExpander(e.target);
		if (!exp.isExpanded) return;
		if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget, true) == exp
			|| hs.dragArgs) return;
		for (var i = 0; i < exp.overlays.length; i++) (function() {
			var o = hs.$('hsId'+ exp.overlays[i]);
			if (o && o.hideOnMouseOut) {
				if (over) hs.setStyles(o, { visibility: 'visible' });
				hs.animate(o, { opacity: over ? o.opacity : 0 }, o.dur);
			}
		})();
	} catch (e) {}
},
addEventListener : function (el, event, func) {
	if (el == document && event == 'ready') hs.push(hs.onReady, func);
	try {
		el.addEventListener(event, func, false);
	} catch (e) {
		try {
			el.detachEvent('on'+ event, func);
			el.attachEvent('on'+ event, func);
		} catch (e) {
			el['on'+ event] = func;
		}
	}
},

removeEventListener : function (el, event, func) {
	try {
		el.removeEventListener(event, func, false);
	} catch (e) {
		try {
			el.detachEvent('on'+ event, func);
		} catch (e) {
			el['on'+ event] = null;
		}
	}
},

preloadFullImage : function (i) {
	if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
		var img = document.createElement('img');
		img.onload = function() {
			img = null;
			hs.preloadFullImage(i + 1);
		};
		img.src = hs.preloadTheseImages[i];
	}
},
preloadImages : function (number) {
	if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;

	var arr = hs.getAnchors();
	for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
		hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
	}

	// preload outlines
	if (hs.outlineType)	new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
	else

	hs.preloadFullImage(0);

	// preload cursor
	if (hs.restoreCursor) var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
},


init : function () {
	if (!hs.container) {

		hs.page = hs.getPageSize();
		hs.ieLt7 = hs.ie && hs.uaVersion < 7;
		for (var x in hs.langDefaults) {
			if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
			else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
				hs.lang[x] = hs.langDefaults[x];
		}

		hs.container = hs.createElement('div', {
				className: 'highslide-container'
			}, {
				position: 'absolute',
				left: 0,
				top: 0,
				width: '100%',
				zIndex: hs.zIndexCounter,
				direction: 'ltr'
			},
			document.body,
			true
		);
		hs.loading = hs.createElement('a', {
				className: 'highslide-loading',
				title: hs.lang.loadingTitle,
				innerHTML: hs.lang.loadingText,
				href: 'javascript:;'
			}, {
				position: 'absolute',
				top: '-9999px',
				opacity: hs.loadingOpacity,
				zIndex: 1
			}, hs.container
		);
		hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);

		// http://www.robertpenner.com/easing/
		Math.linearTween = function (t, b, c, d) {
			return c*t/d + b;
		};
		Math.easeInQuad = function (t, b, c, d) {
			return c*(t/=d)*t + b;
		};

		hs.hideSelects = hs.ieLt7;
		hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
			|| (hs.ie && hs.uaVersion < 5.5));
	}
},
ready : function() {
	if (hs.isReady) return;
	hs.isReady = true;

	for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
},

updateAnchors : function() {
	var el, els, all = [], images = [],groups = {}, re;

	for (var i = 0; i < hs.openerTagNames.length; i++) {
		els = document.getElementsByTagName(hs.openerTagNames[i]);
		for (var j = 0; j < els.length; j++) {
			el = els[j];
			re = hs.isHsAnchor(el);
			if (re) {
				hs.push(all, el);
				if (re[0] == 'hs.expand') hs.push(images, el);
				var g = hs.getParam(el, 'slideshowGroup') || 'none';
				if (!groups[g]) groups[g] = [];
				hs.push(groups[g], el);
			}
		}
	}
	hs.anchors = { all: all, groups: groups, images: images };
	return hs.anchors;

},

getAnchors : function() {
	return hs.anchors || hs.updateAnchors();
},


close : function(el) {
	var exp = hs.getExpander(el);
	if (exp) exp.close();
	return false;
}
}; // end hs object
hs.fx = function( elem, options, prop ){
	this.options = options;
	this.elem = elem;
	this.prop = prop;

	if (!options.orig) options.orig = {};
};
hs.fx.prototype = {
	update: function(){
		(hs.fx.step[this.prop] || hs.fx.step._default)(this);

		if (this.options.step)
			this.options.step.call(this.elem, this.now, this);

	},
	custom: function(from, to, unit){
		this.startTime = (new Date()).getTime();
		this.start = from;
		this.end = to;
		this.unit = unit;// || this.unit || "px";
		this.now = this.start;
		this.pos = this.state = 0;

		var self = this;
		function t(gotoEnd){
			return self.step(gotoEnd);
		}

		t.elem = this.elem;

		if ( t() && hs.timers.push(t) == 1 ) {
			hs.timerId = setInterval(function(){
				var timers = hs.timers;

				for ( var i = 0; i < timers.length; i++ )
					if ( !timers[i]() )
						timers.splice(i--, 1);

				if ( !timers.length ) {
					clearInterval(hs.timerId);
				}
			}, 13);
		}
	},
	step: function(gotoEnd){
		var t = (new Date()).getTime();
		if ( gotoEnd || t >= this.options.duration + this.startTime ) {
			this.now = this.end;
			this.pos = this.state = 1;
			this.update();

			this.options.curAnim[ this.prop ] = true;

			var done = true;
			for ( var i in this.options.curAnim )
				if ( this.options.curAnim[i] !== true )
					done = false;

			if ( done ) {
				if (this.options.complete) this.options.complete.call(this.elem);
			}
			return false;
		} else {
			var n = t - this.startTime;
			this.state = n / this.options.duration;
			this.pos = this.options.easing(n, 0, 1, this.options.duration);
			this.now = this.start + ((this.end - this.start) * this.pos);
			this.update();
		}
		return true;
	}

};

hs.extend( hs.fx, {
	step: {

		opacity: function(fx){
			hs.setStyles(fx.elem, { opacity: fx.now });
		},

		_default: function(fx){
			if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
				fx.elem.style[ fx.prop ] = fx.now + fx.unit;
			else
				fx.elem[ fx.prop ] = fx.now;
		}
	}
});

hs.Outline =  function (outlineType, onLoad) {
	this.onLoad = onLoad;
	this.outlineType = outlineType;
	var v = hs.uaVersion, tr;

	this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7;
	if (!outlineType) {
		if (onLoad) onLoad();
		return;
	}

	hs.init();
	this.table = hs.createElement(
		'table', {
			cellSpacing: 0
		}, {
			visibility: 'hidden',
			position: 'absolute',
			borderCollapse: 'collapse',
			width: 0
		},
		hs.container,
		true
	);
	var tbody = hs.createElement('tbody', null, null, this.table, 1);

	this.td = [];
	for (var i = 0; i <= 8; i++) {
		if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
		this.td[i] = hs.createElement('td', null, null, tr, true);
		var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
		hs.setStyles(this.td[i], style);
	}
	this.td[4].className = outlineType +' highslide-outline';

	this.preloadGraphic();
};

hs.Outline.prototype = {
preloadGraphic : function () {
	var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png";

	var appendTo = hs.safari ? hs.container : null;
	this.graphic = hs.createElement('img', null, { position: 'absolute',
		top: '-9999px' }, appendTo, true); // for onload trigger

	var pThis = this;
	this.graphic.onload = function() { pThis.onGraphicLoad(); };

	this.graphic.src = src;
},

onGraphicLoad : function () {
	var o = this.offset = this.graphic.width / 4,
		pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],
		dim = { height: (2*o) +'px', width: (2*o) +'px' };
	for (var i = 0; i <= 8; i++) {
		if (pos[i]) {
			if (this.hasAlphaImageLoader) {
				var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px';
				var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
				hs.createElement ('div', null, {
						filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')",
						position: 'absolute',
						width: w,
						height: this.graphic.height +'px',
						left: (pos[i][0]*o)+'px',
						top: (pos[i][1]*o)+'px'
					},
				div,
				true);
			} else {
				hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
			}

			if (window.opera && (i == 3 || i ==5))
				hs.createElement('div', null, dim, this.td[i], true);

			hs.setStyles (this.td[i], dim);
		}
	}
	this.graphic = null;
	if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
	hs.pendingOutlines[this.outlineType] = this;
	if (this.onLoad) this.onLoad();
},

setPosition : function (pos, offset, vis, dur, easing) {
	var exp = this.exp,
		stl = exp.wrapper.style,
		offset = offset || 0,
		pos = pos || {
			x: exp.x.pos + offset,
			y: exp.y.pos + offset,
			w: exp.x.get('wsize') - 2 * offset,
			h: exp.y.get('wsize') - 2 * offset
		};
	if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
		? 'visible' : 'hidden';
	hs.setStyles(this.table, {
		left: (pos.x - this.offset) +'px',
		top: (pos.y - this.offset) +'px',
		width: (pos.w + 2 * this.offset) +'px'
	});

	pos.w -= 2 * this.offset;
	pos.h -= 2 * this.offset;
	hs.setStyles (this.td[4], {
		width: pos.w >= 0 ? pos.w +'px' : 0,
		height: pos.h >= 0 ? pos.h +'px' : 0
	});
	if (this.hasAlphaImageLoader) this.td[3].style.height
		= this.td[5].style.height = this.td[4].style.height;

},

destroy : function(hide) {
	if (hide) this.table.style.visibility = 'hidden';
	else hs.discardElement(this.table);
}
};

hs.Dimension = function(exp, dim) {
	this.exp = exp;
	this.dim = dim;
	this.ucwh = dim == 'x' ? 'Width' : 'Height';
	this.wh = this.ucwh.toLowerCase();
	this.uclt = dim == 'x' ? 'Left' : 'Top';
	this.lt = this.uclt.toLowerCase();
	this.ucrb = dim == 'x' ? 'Right' : 'Bottom';
	this.rb = this.ucrb.toLowerCase();
	this.p1 = this.p2 = 0;
};
hs.Dimension.prototype = {
get : function(key) {
	switch (key) {
		case 'loadingPos':
			return this.tpos + this.tb + (this.t - hs.loading['offset'+ this.ucwh]) / 2;
		case 'wsize':
			return this.size + 2 * this.cb + this.p1 + this.p2;
		case 'fitsize':
			return this.clientSize - this.marginMin - this.marginMax;
		case 'maxsize':
			return this.get('fitsize') - 2 * this.cb - this.p1 - this.p2 ;
		case 'opos':
			return this.pos - (this.exp.outline ? this.exp.outline.offset : 0);
		case 'osize':
			return this.get('wsize') + (this.exp.outline ? 2*this.exp.outline.offset : 0);
		case 'imgPad':
			return this.imgSize ? Math.round((this.size - this.imgSize) / 2) : 0;

	}
},
calcBorders: function() {
	// correct for borders
	this.cb = (this.exp.content['offset'+ this.ucwh] - this.t) / 2;
	this.marginMax = hs['margin'+ this.ucrb] + 2 * this.cb;
},
calcThumb: function() {
	this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
		this.exp.el['offset'+ this.ucwh];
	this.tpos = this.exp.tpos[this.dim];
	this.tb = (this.exp.el['offset'+ this.ucwh] - this.t) / 2;
	if (this.tpos == 0) {
		this.tpos = (hs.page[this.wh] / 2) + hs.page['scroll'+ this.uclt];
	};
},
calcExpanded: function() {
	var exp = this.exp;
	this.justify = 'auto';


	// size and position
	this.pos = this.tpos - this.cb + this.tb;
	this.size = Math.min(this.full, exp['max'+ this.ucwh] || this.full);
	this.minSize = exp.allowSizeReduction ?
		Math.min(exp['min'+ this.ucwh], this.full) :this.full;
	if (exp.isImage && exp.useBox)	{
		this.size = exp[this.wh];
		this.imgSize = this.full;
	}
	if (this.dim == 'x' && hs.padToMinWidth) this.minSize = exp.minWidth;
	this.marginMin = hs['margin'+ this.uclt];
	this.scroll = hs.page['scroll'+ this.uclt];
	this.clientSize = hs.page[this.wh];
},
setSize: function(i) {
	var exp = this.exp;
	if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
		this.imgSize = i;
		this.size = Math.max(this.size, this.imgSize);
		exp.content.style[this.lt] = this.get('imgPad')+'px';
	} else
	this.size = i;

	exp.content.style[this.wh] = i +'px';
	exp.wrapper.style[this.wh] = this.get('wsize') +'px';
	if (exp.outline) exp.outline.setPosition();
	if (this.dim == 'x' && exp.overlayBox) exp.sizeOverlayBox(true);
},
setPos: function(i) {
	this.pos = i;
	this.exp.wrapper.style[this.lt] = i +'px';

	if (this.exp.outline) this.exp.outline.setPosition();

}
};

hs.Expander = function(a, params, custom, contentType) {
	if (document.readyState && hs.ie && !hs.isReady) {
		hs.addEventListener(document, 'ready', function() {
			new hs.Expander(a, params, custom, contentType);
		});
		return;
	}
	this.a = a;
	this.custom = custom;
	this.contentType = contentType || 'image';
	this.isImage = !this.isHtml;

	hs.continuePreloading = false;
	this.overlays = [];
	hs.init();
	var key = this.key = hs.expanders.length;
	// override inline parameters
	for (var i = 0; i < hs.overrides.length; i++) {
		var name = hs.overrides[i];
		this[name] = params && typeof params[name] != 'undefined' ?
			params[name] : hs[name];
	}
	if (!this.src) this.src = a.href;

	// get thumb
	var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
	el = this.thumb = el.getElementsByTagName('img')[0] || el;
	this.thumbsUserSetId = el.id || a.id;

	// check if already open
	for (var i = 0; i < hs.expanders.length; i++) {
		if (hs.expanders[i] && hs.expanders[i].a == a) {
			hs.expanders[i].focus();
			return false;
		}
	}

	// cancel other
	for (var i = 0; i < hs.expanders.length; i++) {
		if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
			hs.expanders[i].cancelLoading();
		}
	}
	hs.expanders[this.key] = this;
	if (!hs.allowMultipleInstances && !hs.upcoming) {
		if (hs.expanders[key-1]) hs.expanders[key-1].close();
		if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
			hs.expanders[hs.focusKey].close();
	}

	// initiate metrics
	this.el = el;
	this.tpos = hs.getPosition(el);
	hs.page = hs.getPageSize();
	var x = this.x = new hs.Dimension(this, 'x');
	x.calcThumb();
	var y = this.y = new hs.Dimension(this, 'y');
	y.calcThumb();
	this.wrapper = hs.createElement(
		'div', {
			id: 'highslide-wrapper-'+ this.key,
			className: this.wrapperClassName
		}, {
			visibility: 'hidden',
			position: 'absolute',
			zIndex: hs.zIndexCounter++
		}, null, true );

	this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
	if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
		this.outlineWhileAnimating = 0;

	// get the outline
	if (!this.outlineType) {
		this[this.contentType +'Create']();

	} else if (hs.pendingOutlines[this.outlineType]) {
		this.connectOutline();
		this[this.contentType +'Create']();

	} else {
		this.showLoading();
		var exp = this;
		new hs.Outline(this.outlineType,
			function () {
				exp.connectOutline();
				exp[exp.contentType +'Create']();
			}
		);
	}
	return true;
};

hs.Expander.prototype = {
error : function(e) {
	//alert ('Line '+ e.lineNumber +': '+ e.message);
	window.location.href = this.src;
},

connectOutline : function() {
	var outline = this.outline = hs.pendingOutlines[this.outlineType];
	outline.exp = this;
	outline.table.style.zIndex = this.wrapper.style.zIndex;
	hs.pendingOutlines[this.outlineType] = null;
},

showLoading : function() {
	if (this.onLoadStarted || this.loading) return;

	this.loading = hs.loading;
	var exp = this;
	this.loading.onclick = function() {
		exp.cancelLoading();
	};
	var exp = this,
		l = this.x.get('loadingPos') +'px',
		t = this.y.get('loadingPos') +'px';
	setTimeout(function () {
		if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t, zIndex: hs.zIndexCounter++ })}
	, 100);
},

imageCreate : function() {
	var exp = this;

	var img = document.createElement('img');
    this.content = img;
    img.onload = function () {
    	if (hs.expanders[exp.key]) exp.contentLoaded();
	};
    if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
    img.className = 'highslide-image';
    hs.setStyles(img, {
    	visibility: 'hidden',
    	display: 'block',
    	position: 'absolute',
		maxWidth: '9999px',
		zIndex: 3
	});
    img.title = hs.lang.restoreTitle;
    if (hs.safari) hs.container.appendChild(img);
    if (hs.ie) img.src = 'res://';
	img.src = this.src;

	this.showLoading();
},

contentLoaded : function() {
	try {
		if (!this.content) return;
		this.content.onload = null;
		if (this.onLoadStarted) return;
		else this.onLoadStarted = true;

		var x = this.x, y = this.y;

		if (this.loading) {
			hs.setStyles(this.loading, { top: '-9999px' });
			this.loading = null;
		}
			x.full = this.content.width;
			y.full = this.content.height;

			hs.setStyles(this.content, {
				width: x.t +'px',
				height: y.t +'px'
			});
			this.wrapper.appendChild(this.content);
			hs.container.appendChild(this.wrapper);

		x.calcBorders();
		y.calcBorders();

		hs.setStyles (this.wrapper, {
			left: (x.tpos + x.tb - x.cb) +'px',
			top: (y.tpos + x.tb - y.cb) +'px'
		});
		this.getOverlays();

		var ratio = x.full / y.full;

		x.calcExpanded();
		this.justify(x);

		y.calcExpanded();
		this.justify(y);
		if (this.overlayBox) this.sizeOverlayBox(0, 1);

		if (this.allowSizeReduction) {
				this.correctRatio(ratio);
			if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
				this.createFullExpand();
				if (this.overlays.length == 1) this.sizeOverlayBox();
			}
		}
		this.show();

	} catch (e) {
		this.error(e);
	}
},

justify : function (p, moveOnly) {
	var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';

		var hasMovedMin = false;

		var allowReduce = p.exp.allowSizeReduction;
			p.pos = Math.round(p.pos - ((p.get('wsize') - p.t) / 2));
		if (p.pos < p.scroll + p.marginMin) {
			p.pos = p.scroll + p.marginMin;
			hasMovedMin = true;
		}
		if (!moveOnly && p.size < p.minSize) {
			p.size = p.minSize;
			allowReduce = false;
		}
		if (p.pos + p.get('wsize') > p.scroll + p.clientSize - p.marginMax) {
			if (!moveOnly && hasMovedMin && allowReduce) {
				p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
			} else if (p.get('wsize') < p.get('fitsize')) {
				p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
			} else { // image larger than viewport
				p.pos = p.scroll + p.marginMin;
				if (!moveOnly && allowReduce) p.size = p.get(dim == 'y' ? 'fitsize' : 'maxsize');
			}
		}

		if (!moveOnly && p.size < p.minSize) {
			p.size = p.minSize;
			allowReduce = false;
		}



	if (p.pos < p.marginMin) {
		var tmpMin = p.pos;
		p.pos = p.marginMin;

		if (allowReduce && !moveOnly) p.size = p.size - (p.pos - tmpMin);

	}
},

correctRatio : function(ratio) {
	var x = this.x,
		y = this.y,
		changed = false,
		xSize = Math.min(x.full, x.size),
		ySize = Math.min(y.full, y.size),
		useBox = (this.useBox || hs.padToMinWidth);

	if (xSize / ySize > ratio) { // width greater
		xSize = ySize * ratio;
		if (xSize < x.minSize) { // below minWidth
			xSize = x.minSize;
			ySize = xSize / ratio;
		}
		changed = true;

	} else if (xSize / ySize < ratio) { // height greater
		ySize = xSize / ratio;
		changed = true;
	}

	if (hs.padToMinWidth && x.full < x.minSize) {
		x.imgSize = x.full;
		y.size = y.imgSize = y.full;
	} else if (this.useBox) {
		x.imgSize = xSize;
		y.imgSize = ySize;
	} else {
		x.size = xSize;
		y.size = ySize;
	}
	this.fitOverlayBox(useBox ? null : ratio);
	if (useBox && y.size < y.imgSize) {
		y.imgSize = y.size;
		x.imgSize = y.size * ratio;
	}
	if (changed || useBox) {
		x.pos = x.tpos - x.cb + x.tb;
		x.minSize = x.size;
		this.justify(x, true);

		y.pos = y.tpos - y.cb + y.tb;
		y.minSize = y.size;
		this.justify(y, true);
		if (this.overlayBox) this.sizeOverlayBox();
	}
},
fitOverlayBox : function(ratio) {
	var x = this.x, y = this.y;
	if (this.overlayBox) {
		while (y.size > this.minHeight && x.size > this.minWidth
				&&  y.get('wsize') > y.get('fitsize')) {
			y.size -= 10;
			if (ratio) x.size = y.size * ratio;
			this.sizeOverlayBox(0, 1);
		}
	}
},

show : function () {
	var x = this.x, y = this.y;
	this.doShowHide('hidden');

	// Apply size change
	this.changeSize(
		1, {
			wrapper: {
				width : x.get('wsize'),
				height : y.get('wsize'),
				left: x.pos,
				top: y.pos
			},
			content: {
				left: x.p1 + x.get('imgPad'),
				top: y.p1 + y.get('imgPad'),
				width:x.imgSize ||x.size,
				height:y.imgSize ||y.size
			}
		},
		hs.expandDuration
	);
},

changeSize : function(up, to, dur) {

	if (this.outline && !this.outlineWhileAnimating) {
		if (up) this.outline.setPosition();
		else this.outline.destroy();
	}


	if (!up) this.destroyOverlays();

	var exp = this,
		x = exp.x,
		y = exp.y,
		easing = this.easing;
	if (!up) easing = this.easingClose || easing;
	var after = up ?
		function() {

			if (exp.outline) exp.outline.table.style.visibility = "visible";
			setTimeout(function() {
				exp.afterExpand();
			}, 50);
		} :
		function() {
			exp.afterClose();
		};
	if (up) hs.setStyles( this.wrapper, {
		width: x.t +'px',
		height: y.t +'px'
	});
	if (this.fadeInOut) {
		hs.setStyles(this.wrapper, { opacity: up ? 0 : 1 });
		hs.extend(to.wrapper, { opacity: up });
	}
	hs.animate( this.wrapper, to.wrapper, {
		duration: dur,
		easing: easing,
		step: function(val, args) {
			if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
				var fac = up ? args.pos : 1 - args.pos;
				var pos = {
					w: x.t + (x.get('wsize') - x.t) * fac,
					h: y.t + (y.get('wsize') - y.t) * fac,
					x: x.tpos + (x.pos - x.tpos) * fac,
					y: y.tpos + (y.pos - y.tpos) * fac
				};
				exp.outline.setPosition(pos, 0, 1);
			}
		}
	});
	hs.animate( this.content, to.content, dur, easing, after);
	if (up) {
		this.wrapper.style.visibility = 'visible';
		this.content.style.visibility = 'visible';
		this.a.className += ' highslide-active-anchor';
	}
},




afterExpand : function() {
	this.isExpanded = true;
	this.focus();
	if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
	this.prepareNextOutline();
	var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
	this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
		&& this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
	if (this.overlayBox) this.showOverlays();

},


prepareNextOutline : function() {
	var key = this.key;
	var outlineType = this.outlineType;
	new hs.Outline(outlineType,
		function () { try { hs.expanders[key].preloadNext(); } catch (e) {} });
},


preloadNext : function() {
	var next = this.getAdjacentAnchor(1);
	if (next && next.onclick.toString().match(/hs\.expand/))
		var img = hs.createElement('img', { src: hs.getSrc(next) });
},


getAdjacentAnchor : function(op) {
	var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];

	/*< ? if ($cfg->slideshow) : ?>s*/
	if (!as[current + op] && this.slideshow && this.slideshow.repeat) {
		if (op == 1) return as[0];
		else if (op == -1) return as[as.length-1];
	}
	/*< ? endif ?>s*/
	return as[current + op] || null;
},

getAnchorIndex : function() {
	var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
	if (arr) for (var i = 0; i < arr.length; i++) {
		if (arr[i] == this.a) return i;
	}
	return null;
},


cancelLoading : function() {
	hs.expanders[this.key] = null;
	if (this.loading) hs.loading.style.left = '-9999px';
},

writeCredits : function () {
	this.credits = hs.createElement('a', {
		href: hs.creditsHref,
		className: 'highslide-credits',
		innerHTML: hs.lang.creditsText,
		title: hs.lang.creditsTitle
	});
	this.createOverlay({
		overlayId: this.credits,
		position: this.creditsPosition || 'top left'
	});
},

getInline : function(types, addOverlay) {
	for (var i = 0; i < types.length; i++) {
		var type = types[i], s = null;
		if (!this[type +'Id'] && this.thumbsUserSetId)
			this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId;
		if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
		if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try {
			s = eval(this[type +'Eval']);
		} catch (e) {}
		if (!this[type] && this[type +'Text']) {
			s = this[type +'Text'];
		}
		if (!this[type] && !s) {
			var next = this.a.nextSibling;
			while (next && !hs.isHsAnchor(next)) {
				if ((new RegExp('highslide-'+ type)).test(next.className || null)) {
					this[type] = next.cloneNode(1);
					break;
				}
				next = next.nextSibling;
			}
		}

		if (!this[type] && s) this[type] = hs.createElement('div',
				{ className: 'highslide-'+ type, innerHTML: s } );

		if (addOverlay && this[type]) {
			var o = { position: (type == 'heading') ? 'above' : 'below' };
			for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x];
			o.overlayId = this[type];
			this.createOverlay(o);
		}
	}
},


// on end move and resize
doShowHide : function(visibility) {
	if (hs.hideSelects) this.showHideElements('SELECT', visibility);
	if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
	if (hs.geckoMac) this.showHideElements('*', visibility);
},
showHideElements : function (tagName, visibility) {
	var els = document.getElementsByTagName(tagName);
	var prop = tagName == '*' ? 'overflow' : 'visibility';
	for (var i = 0; i < els.length; i++) {
		if (prop == 'visibility' || (document.defaultView.getComputedStyle(
				els[i], "").getPropertyValue('overflow') == 'auto'
				|| els[i].getAttribute('hidden-by') != null)) {
			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[prop] = els[i].origProp;
			} else if (visibility == 'hidden') { // hide if behind
				var elPos = hs.getPosition(els[i]);
				elPos.w = els[i].offsetWidth;
				elPos.h = els[i].offsetHeight;


					var clearsX = (elPos.x + elPos.w < this.x.get('opos')
						|| elPos.x > this.x.get('opos') + this.x.get('osize'));
					var clearsY = (elPos.y + elPos.h < this.y.get('opos')
						|| elPos.y > this.y.get('opos') + this.y.get('osize'));
				var wrapperKey = hs.getWrapperKey(els[i]);
				if (!clearsX && !clearsY && wrapperKey != this.key) { // element falls behind image
					if (!hiddenBy) {
						els[i].setAttribute('hidden-by', '['+ this.key +']');
						els[i].origProp = els[i].style[prop];
						els[i].style[prop] = 'hidden';

					} else if (hiddenBy.indexOf('['+ this.key +']') == -1) {
						els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']');
					}
				} else if ((hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey)
						&& wrapperKey != this.key) { // on move
					els[i].setAttribute('hidden-by', '');
					els[i].style[prop] = els[i].origProp || '';
				} else if (hiddenBy && hiddenBy.indexOf('['+ this.key +']') > -1) {
					els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', ''));
				}

			}
		}
	}
},

focus : function() {
	this.wrapper.style.zIndex = hs.zIndexCounter++;
	// blur others
	for (var 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';
				blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer';
				blurExp.content.title = hs.lang.focusTitle;
		}
	}

	// focus this
	if (this.outline) this.outline.table.style.zIndex
		= this.wrapper.style.zIndex;
	this.content.className = 'highslide-'+ this.contentType;
		this.content.title = hs.lang.restoreTitle;

		if (hs.restoreCursor) {
			hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
			if (hs.ie && hs.uaVersion < 6) hs.styleRestoreCursor = 'hand';
			this.content.style.cursor = hs.styleRestoreCursor;
		}

	hs.focusKey = this.key;
	hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
},
moveTo: function(x, y) {
	this.x.setPos(x);
	this.y.setPos(y);
},
resize : function (e) {
	var w, h, r = e.width / e.height;
	w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
	if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
	h = w / r;
	if (h < Math.min(this.minHeight, this.y.full)) {
		h = Math.min(this.minHeight, this.y.full);
		if (this.isImage) w = h * r;
	}
	this.resizeTo(w, h);
},
resizeTo: function(w, h) {
	this.y.setSize(h);
	this.x.setSize(w);
},

close : function() {
	if (this.isClosing || !this.isExpanded) return;
	this.isClosing = true;

	hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);

	try {
		this.content.style.cursor = 'default';
		this.changeSize(
			0, {
				wrapper: {
					width : this.x.t,
					height : this.y.t,
					left: this.x.tpos - this.x.cb + this.x.tb,
					top: this.y.tpos - this.y.cb + this.y.tb
				},
				content: {
					left: 0,
					top: 0,
					width: this.x.t,
					height: this.y.t
				}
			}, hs.restoreDuration
		);
	} catch (e) { this.afterClose(); }
},

createOverlay : function (o) {
	var el = o.overlayId;
	if (typeof el == 'string') el = hs.getNode(el);
	if (o.html) el = hs.createElement('div', { innerHTML: o.html });
	if (!el || typeof el == 'string') return;
	el.style.display = 'block';
	this.genOverlayBox();
	var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
	if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
	var overlay = hs.createElement(
		'div', {
			id: 'hsId'+ hs.idCounter++,
			hsId: o.hsId
		}, {
			position: 'absolute',
			visibility: 'hidden',
			width: width,
			direction: hs.lang.cssDirection || '',
			opacity: 0
		},this.overlayBox,
		true
	);

	overlay.appendChild(el);
	hs.extend(overlay, {
		opacity: 1,
		offsetX: 0,
		offsetY: 0,
		dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
	});
	hs.extend(overlay, o);

	if (this.gotOverlays) {
		this.positionOverlay(overlay);
		if (!overlay.hideOnMouseOut || this.mouseIsOver)
			hs.animate(overlay, { opacity: overlay.opacity }, overlay.dur);
	}
	hs.push(this.overlays, hs.idCounter - 1);
},
positionOverlay : function(overlay) {
	var p = overlay.position || 'middle center',
		offX = overlay.offsetX,
		offY = overlay.offsetY;
	if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
	if (/left$/.test(p)) overlay.style.left = offX +'px';

	if (/center$/.test(p))	hs.setStyles (overlay, {
		left: '50%',
		marginLeft: (offX - Math.round(overlay.offsetWidth / 2)) +'px'
	});

	if (/right$/.test(p)) overlay.style.right = - offX +'px';

	if (/^leftpanel$/.test(p)) {
		hs.setStyles(overlay, {
			right: '100%',
			marginRight: this.x.cb +'px',
			top: - this.y.cb +'px',
			bottom: - this.y.cb +'px',
			overflow: 'auto'
		});
		this.x.p1 = overlay.offsetWidth;

	} else if (/^rightpanel$/.test(p)) {
		hs.setStyles(overlay, {
			left: '100%',
			marginLeft: this.x.cb +'px',
			top: - this.y.cb +'px',
			bottom: - this.y.cb +'px',
			overflow: 'auto'
		});
		this.x.p2 = overlay.offsetWidth;
	}

	if (/^top/.test(p)) overlay.style.top = offY +'px';
	if (/^middle/.test(p))	hs.setStyles (overlay, {
		top: '50%',
		marginTop: (offY - Math.round(overlay.offsetHeight / 2)) +'px'
	});
	if (/^bottom/.test(p)) overlay.style.bottom = - offY +'px';
	if (/^above$/.test(p)) {
		hs.setStyles(overlay, {
			left: (- this.x.p1 - this.x.cb) +'px',
			right: (- this.x.p2 - this.x.cb) +'px',
			bottom: '100%',
			marginBottom: this.y.cb +'px',
			width: 'auto'
		});
		this.y.p1 = overlay.offsetHeight;

	} else if (/^below$/.test(p)) {
		hs.setStyles(overlay, {
			position: 'relative',
			left: (- this.x.p1 - this.x.cb) +'px',
			right: (- this.x.p2 - this.x.cb) +'px',
			top: '100%',
			marginTop: this.y.cb +'px',
			width: 'auto'
		});
		this.y.p2 = overlay.offsetHeight;
		overlay.style.position = 'absolute';
	}
},

getOverlays : function() {
	this.getInline(['heading', 'caption'], true);
	if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
	if (hs.showCredits) this.writeCredits();
	for (var i = 0; i < hs.overlays.length; i++) {
		var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
		if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
				|| (sg && sg === this.slideshowGroup)) {
			this.createOverlay(o);
		}
	}
	var os = [];
	for (var i = 0; i < this.overlays.length; i++) {
		var o = hs.$('hsId'+ this.overlays[i]);
		if (/panel$/.test(o.position)) this.positionOverlay(o);
		else hs.push(os, o);
	}
	for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
	this.gotOverlays = true;
},
genOverlayBox : function() {
	if (!this.overlayBox) this.overlayBox = hs.createElement (
		'div', {
			className: this.wrapperClassName
		}, {
			position : 'absolute',
			width: (this.x.size || (this.useBox ? this.width : null)
				|| this.x.full) +'px',
			height: (this.y.size || this.y.full) +'px',
			visibility : 'hidden',
			overflow : 'hidden',
			zIndex : hs.ie ? 4 : null
		},
		hs.container,
		true
	);
},
sizeOverlayBox : function(doWrapper, doPanels) {
	var overlayBox = this.overlayBox,
		x = this.x,
		y = this.y;
	hs.setStyles( overlayBox, {
		width: x.size +'px',
		height: y.size +'px'
	});
	if (doWrapper || doPanels) {
		for (var i = 0; i < this.overlays.length; i++) {
			var o = hs.$('hsId'+ this.overlays[i]);
			var ie6 = (hs.ieLt7 || document.compatMode == 'BackCompat');
			if (o && /^(above|below)$/.test(o.position)) {
				if (ie6) {
					o.style.width = (overlayBox.offsetWidth + 2 * x.cb
						+ x.p1 + x.p2) +'px';
				}
				y[o.position == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
			}
			if (o && ie6 && /^(left|right)panel$/.test(o.position)) {
				o.style.height = (overlayBox.offsetHeight + 2* y.cb) +'px';
			}
		}
	}
	if (doWrapper) {
		hs.setStyles(this.content, {
			top: y.p1 +'px'
		});
		hs.setStyles(overlayBox, {
			top: (y.p1 + y.cb) +'px'
		});
	}
},

showOverlays : function() {
	var b = this.overlayBox;
	b.className = '';
	hs.setStyles(b, {
		top: (this.y.p1 + this.y.cb) +'px',
		left: (this.x.p1 + this.x.cb) +'px',
		overflow : 'visible'
	});
	if (hs.safari) b.style.visibility = 'visible';
	this.wrapper.appendChild (b);
	for (var i = 0; i < this.overlays.length; i++) {
		var o = hs.$('hsId'+ this.overlays[i]);
		o.style.zIndex = 4;
		if (!o.hideOnMouseOut || this.mouseIsOver) {
			o.style.visibility = 'visible';
			hs.setStyles(o, { visibility: 'visible', display: '' });
			hs.animate(o, { opacity: o.opacity }, o.dur);
		}
	}
},

destroyOverlays : function() {
	if (!this.overlays.length) return;
	hs.discardElement(this.overlayBox);
},



createFullExpand : function () {
	this.fullExpandLabel = hs.createElement(
		'a', {
			href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();',
			title: hs.lang.fullExpandTitle,
			className: 'highslide-full-expand'
		}
	);

	this.createOverlay({
		overlayId: this.fullExpandLabel,
		position: hs.fullExpandPosition,
		hideOnMouseOut: true,
		opacity: hs.fullExpandOpacity
	});
},

doFullExpand : function () {
	try {
		if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);

		this.focus();
		var xSize = this.x.size;
		this.resizeTo(this.x.full, this.y.full);

		var xpos = this.x.pos - (this.x.size - xSize) / 2;
		if (xpos < hs.marginLeft) xpos = hs.marginLeft;

		this.moveTo(xpos, this.y.pos);
		this.doShowHide('hidden');

	} catch (e) {
		this.error(e);
	}
},


afterClose : function () {
	this.a.className = this.a.className.replace('highslide-active-anchor', '');

	this.doShowHide('visible');
		if (this.outline && this.outlineWhileAnimating) this.outline.destroy();

		hs.discardElement(this.wrapper);

	hs.expanders[this.key] = null;
	hs.reOrder();
}

};
if (hs.ie) {
	(function () {
		try {
			document.documentElement.doScroll('left');
		} catch (e) {
			setTimeout(arguments.callee, 50);
			return;
		}
		hs.ready();
	})();
}
hs.addEventListener(document, 'DOMContentLoaded', hs.ready);
hs.addEventListener(window, 'load', hs.ready);
hs.langDefaults = hs.lang;
// history
var HsExpander = hs.Expander;

// set handlers
hs.addEventListener(window, 'load', function() {
	if (hs.expandCursor) {
		var sel = '.highslide img',
			dec = 'cursor: url('+ hs.graphicsDir + hs.expandCursor +'), pointer !important;';

		var style = hs.createElement('style', { type: 'text/css' }, null,
			document.getElementsByTagName('HEAD')[0]);

		if (!hs.ie) {
			style.appendChild(document.createTextNode(sel + " {" + dec + "}"));
		} else {
			var last = document.styleSheets[document.styleSheets.length - 1];
			if (typeof(last.addRule) == "object") last.addRule(sel, dec);
		}
	}
});
hs.addEventListener(window, 'resize', function() {
	hs.page = hs.getPageSize();
});
hs.addEventListener(document, 'mousemove', function(e) {
	hs.mouse = { x: e.clientX, y: e.clientY	};
});
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);

hs.addEventListener(document, 'ready', hs.getAnchors);
hs.addEventListener(window, 'load', hs.preloadImages);



/*
	AJAX Suggestions is developed by Robert Nyman, http://www.robertnyman.com, and it is released according to the
	Creative Commons Deed license (http://creativecommons.org/licenses/GPL/2.0/)
	For more information, please see http://www.robertnyman.com/ajax-suggestions
*/
// ---
function trim(str, chars) {
	return ltrim(rtrim(str, chars), chars);
}

function ltrim(str, chars) {
	chars = chars || "\\s";
	return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
}

function rtrim(str, chars) {
	chars = chars || "\\s";
	return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
}

var ajaxSuggestions = {
	// Settings
	elmIdToPresentResultsIn : "city_text-suggestions-box",
	elmIdResultsContainer : "city_text-suggestions-box",
	charactersBeforeSearch : 2,
	timeBeforeSuggest : 200, // In milliseconds
	sameWidthAsInputElm : false,
	offsetLeft: 0,
	offsetTop : 0,
	urlExt : "search=",
	addSearchTermToQueryString : true,
	addKeyNavigationEvents : true,
	hideResultsOnDocumentClick : true,
	itemClassName : "item",
	itemSelectedClassName : "selected",
	itemInsertValueIntoInputClassName : "choose-value",
	itemInsertValueSetFocusToInput : true,
	hideResultsWhenInsertValueIsSelected : true,
	itemSeparator : "",
	turnAutoCompleteOff : true,
	// Object properties
	xmlHttp : null,
	elements : [],
	timer : null,
	currentElm : null,
	currentKeyEvent : null,
	suggestionsForElm : null,
	elmToPresentResultsIn : null,
	elmResultsContainer : null,
	suggestions : [],
	resultIndex : 0,
	selectedItem : -1,
	resultsAreVisible : false,
	valueAddedFromResultsListToInput : false,

	init : function (){
		this.xmlHttp = this.createXmlHttp();
		if(this.xmlHttp){
			if(typeof document.getElementsByClassName != "function"){
				document.getElementsByClassName = this.elmByClass;
			}
			this.elements = document.getElementsByClassName("ajax-city_id-suggestion", "input");
			this.applyEvents();
			this.elmToPresentResultsIn = document.getElementById(this.elmIdToPresentResultsIn);
			this.elmResultsContainer = document.getElementById(this.elmIdResultsContainer);
			if(this.addKeyNavigationEvents){
				this.addEvent(document, "keydown", this.preventDefaultForArrowKeys);
				this.addEvent(document, "keypress", this.preventDefaultForArrowKeys);
				this.addEvent(document, "keyup", this.navigateResults);
			}
			if(this.hideResultsOnDocumentClick){
				this.addEvent(document, "click", this.clearResultsElement);
			}
		}
	},

	createXmlHttp : function (){
		this.xmlHttp = null;
		if(typeof XMLHttpRequest != "undefined"){
			this.xmlHttp = new XMLHttpRequest();
		}
		else if(typeof window.ActiveXObject != "undefined"){
			try {
				this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
			}
			catch(e){
				try {
					this.xmlHttp = new ActiveXObject("MSXML2.XMLHTTP");
				}
				catch(e){
					try {
						this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e){
						this.xmlHttp = null;
					}
				}
			}
		}
		return this.xmlHttp;
	},

	applyEvents : function (){
		var element;
		for(var i=0; i<this.elements.length; i++){
			element = this.elements[i];
			if(this.turnAutoCompleteOff){
				element.setAttribute("autocomplete", "off");
			}
			this.addEvent(element, "keyup", this.startSuggestionsTimer);
			if(this.hideResultsOnDocumentClick){
				this.addEvent(element, "click", this.preventInputClickBubbling);
			}
		}
	},

	startSuggestionsTimer : function (evt){
		clearTimeout(ajaxSuggestions.timer);
		ajaxSuggestions.currentElm = (/input/i.test(this.nodeName))? this : evt.srcElement;
		ajaxSuggestions.currentKeyEvent = evt.keyCode;
		ajaxSuggestions.timer = setTimeout("ajaxSuggestions.getSuggestions()", ajaxSuggestions.timeBeforeSuggest);
	},

	getSuggestions : function (){
		var value = this.currentElm.value;
		if(!/13|27|37|39/.test(this.currentKeyEvent)){
			var url = this.currentElm.className.replace(/.*url-([\:\w\/\?\.-]+).*/, "$1");
			if(!this.valueAddedFromResultsListToInput){
				ajaxSuggestions.clearResults(true);
			}
			if(value.length > this.charactersBeforeSearch && url.length > 0){
				this.makeSuggestionCall(value, url);
			}
			else if(value.length == 0 || !this.valueAddedFromResultsListToInput){
				ajaxSuggestions.clearResults();
			}
		}
	},

	makeSuggestionCall : function (value, url){
		var regExpValue = new RegExp(("^" + value + "$"), "i");
		var exists = false;
		var suggestionItem;
		var url = url + ((/\?/.test(url))? "&" : "?") + this.urlExt + ((this.addSearchTermToQueryString)? value : "");
		for(var i=0; i<this.suggestions.length; i++){
			suggestionItem = this.suggestions[i];
			if(regExpValue.test(suggestionItem[0]) && url == suggestionItem[2]){
				exists = true;
				this.resultIndex = i;
				this.presentResult(this.suggestions[i][1]);
				break;
			}
		};
		if(!exists){
			this.xmlHttp.onreadystatechange = function (){};
			this.xmlHttp.abort();
			this.currentValue = value;
			this.currentURL = url;
			this.xmlHttp.open("GET", url, true);
			this.xmlHttp.onreadystatechange = this.getResults;
			this.xmlHttp.send(null);
		}
	},

	getResults : function (){
		if(ajaxSuggestions.xmlHttp.readyState == 4 && ajaxSuggestions.xmlHttp.responseText.length > 0){
			ajaxSuggestions.loadResults();
		}
	},

	loadResults : function (){
		this.resultIndex = this.suggestions.length;
		this.suggestions.push([this.currentValue, this.xmlHttp.responseText, this.currentURL]);
		this.presentResult();
	},

	presentResult : function (){
		this.elmToPresentResultsIn.innerHTML = this.suggestions[this.resultIndex][1];
		var coordinates = this.getCoordinates();
		var elm = this.elmResultsContainer.style;
//		elm.left = coordinates[0] + this.offsetLeft + "px";
//		elm.top = coordinates[1] + this.currentElm.offsetHeight + this.offsetTop + "px";
		if(this.sameWidthAsInputElm){
			elm.width = this.currentElm.offsetWidth + "px";
		}
		this.applyResultEvents();

		if(ajaxSuggestions.elmToPresentResultsIn.getElementsByClassName(ajaxSuggestions.itemClassName).length == 0) {
			elm.display = "none";
			this.resultsAreVisible = false;
		} else {
			elm.display = "block";
			this.resultsAreVisible = true;
		}

		if(this.addKeyNavigationEvents && /38|40/.test(this.currentKeyEvent)){
			if(!this.valueAddedFromResultsListToInput){
				this.selectedItem = -1;
			}
			this.navigateResults(null, this.currentKeyEvent);
		}
	},

	clearResults : function (justClear){
		if(this.elmResultsContainer && this.elmToPresentResultsIn){
			if(!justClear){
				this.elmResultsContainer.style.display = "none";
				this.resultsAreVisible = false;
			}
			this.elmToPresentResultsIn.innerHTML = "";
			this.selectedItem = -1;
		}
	},

	clearResultsElement : function (){
		ajaxSuggestions.clearResults();
	},

	navigateResults : function (evt, keyCode){
		if(ajaxSuggestions.currentElm && ajaxSuggestions.elmToPresentResultsIn){
			var event = (typeof evt != "undefined")? evt : event;
			if(typeof ajaxSuggestions.elmToPresentResultsIn.getElementsByClassName != "function"){
				ajaxSuggestions.elmToPresentResultsIn.getElementsByClassName = ajaxSuggestions.elmByClass;
			}
			var results = ajaxSuggestions.elmToPresentResultsIn.getElementsByClassName(ajaxSuggestions.itemClassName);
			var selectedItem = (!evt && keyCode == 38)? results.length : ajaxSuggestions.selectedItem;
			var keyCode = keyCode || event.keyCode;
			var navigateUp = keyCode == 37 || keyCode == 38;
			var navigateDown = keyCode == 39 || keyCode == 40;
			if(results.length > 0 && (navigateUp || navigateDown)){
				if(navigateUp){
					if((selectedItem - 1) >= 0){
						selectedItem--;
					}
					else{
						selectedItem = -1;
					}
				}
				else if(navigateDown){
					if((selectedItem + 1) < results.length){
						selectedItem++;
					}
					else{
						selectedItem = -1;
					}
				}
				var item;
				var classToRemove;
				for(var i=0; i<results.length; i++){
					item = results[i];
					classToRemove = new RegExp((ajaxSuggestions.itemSelectedClassName + "\s?"), "i");
					item.className = item.className.replace(classToRemove, "").replace(/^\s?|\s?$/g, "");
				};
				ajaxSuggestions.selectedItem = selectedItem;
				var elmToFocus = ajaxSuggestions.currentElm;
				if(selectedItem > -1){
					var currentItem = results[selectedItem];
					var currentClass = item.className;
					if(!new RegExp(ajaxSuggestions.itemSelectedClassName, "i").test(currentClass)){
						currentItem.className = currentClass + ((currentClass.length > 0)? " " : "") + ajaxSuggestions.itemSelectedClassName;
					}
					elmToFocus = results[selectedItem];
				}
				try{
					elmToFocus.focus();
				}
				catch(e){
					// Just in case... :-)
				}
				if(event){
					if(event.preventDefault){
						event.preventDefault();
					}
					else{
						event.returnValue = false;
					}
					if(event.stopPropagation){
						event.stopPropagation();
					}
					else{
						event.cancelBubble = true;
					}
				}
				return false;
			}
			else if(keyCode == 27){
				ajaxSuggestions.clearResults();
				try{
					ajaxSuggestions.currentElm.focus();
				}
				catch(e){
					// Just in case... :-)
				}
			}
		}
	},

	applyResultEvents : function (){
		if(typeof this.elmToPresentResultsIn.getElementsByClassName != "function"){
			this.elmToPresentResultsIn.getElementsByClassName = this.elmByClass;
		}
		var insertValueItems = this.elmToPresentResultsIn.getElementsByClassName(this.itemInsertValueIntoInputClassName, "a");
		var item;
		for(var i=0; i<insertValueItems.length; i++){
			item = insertValueItems[i];
			item.inputRef = this.currentElm;
			this.addEvent(item, "click", this.insertValueIntoField);
		};
	},

	insertValueIntoField : function (evt){
		var elm = (/a/i.test(this.nodeName))? this : evt.srcElement;
		var input = elm.inputRef;
		var value = elm.getAttribute("href");
		var new_value = value.replace("http://www.realitynamape.sk/", " ");
		var new_value = new_value.replace(/%20/g, " ");
		value = trim(new_value);
		if(!new RegExp(value).test(input.value)){
			input.value = ((input.value.length > 0 && /;/i.test(input.value))? (input.value + value) : value) + ajaxSuggestions.itemSeparator;
		}
		if(evt.preventDefault){
			evt.preventDefault();
		}
		else{
			evt.returnValue = false;
		}
		if(evt.stopPropagation){
			evt.stopPropagation();
		}
		else{
			evt.cancelBubble = true;
		}
		if(ajaxSuggestions.itemInsertValueSetFocusToInput){
			try{
				input.focus();
			}
			catch(e){
				// Just in case... :-)
			}
		}
		if(ajaxSuggestions.hideResultsWhenInsertValueIsSelected){
			ajaxSuggestions.clearResults();
			//alert("change");

		}
		ajaxSuggestions.valueAddedFromResultsListToInput = true;
		process_city_text();
	},

	preventInputClickBubbling : function (evt){
		if(evt.preventDefault){
			evt.preventDefault();
		}
		else{
			evt.returnValue = false;
		}
		if(evt.stopPropagation){
			evt.stopPropagation();
		}
		else{
			evt.cancelBubble = true;
		}
		return false;
	},

	preventDefaultForArrowKeys : function (evt){
		var keyCode = evt.keyCode;
		var navigateUp = keyCode == 37 || keyCode == 38;
		var navigateDown = keyCode == 39 || keyCode == 40;
		if((!evt.ctrlKey && !evt.metaKey) && ajaxSuggestions.resultsAreVisible && (navigateUp || navigateDown)){
			if(evt.preventDefault){
				evt.preventDefault();
			}
			else{
				evt.returnValue = false;
			}
			if(evt.stopPropagation){
				evt.stopPropagation();
			}
			else{
				evt.cancelBubble = true;
			}
			return false;
		}
	},

	getCoordinates : function (){
		var elm = this.currentElm;
		var offsetLeft = 0;
		var offsetTop = 0;
		while(elm.offsetParent){
			offsetLeft += elm.offsetLeft;
			offsetTop += elm.offsetTop;
			if(elm.scrollTop > 0){
				offsetTop -= elm.scrollTop;
			}
			elm = elm.offsetParent;
		}
		return [offsetLeft, offsetTop];
	},

	closeSession : function (){
		delete ajaxSuggestions;
		ajaxSuggestions = null;
	},

	elmByClass : function (className, tag){
		return ajaxSuggestions.getElementsByClassName.call(this, className, tag);
	},

	getElementsByClassName : function (className, tag){
		var elms = ((!tag || tag == "*") && this.all)? this.all : this.getElementsByTagName(tag || "*");
		var returnElms = [];
		var className = className.replace(/\-/g, "\\-");
		var regExp = new RegExp("(^|\\s)" + className + "(\\s|$)");
		var elm;
		for(var i=0; i<elms.length; i++){
			elm = elms[i];
			if(regExp.test(elm.className)){
				returnElms.push(elm);
			}
		}
		return (returnElms);
	},

	addEvent : function (elm, evt, func){
		if(elm){
			if(elm.addEventListener){
				elm.addEventListener(evt, func, false);
			}
			else if(window.attachEvent){
				elm.attachEvent(("on" + evt), func)
			}
		}
	}
};
// ---
ajaxSuggestions.addEvent(window, "load", function(){ajaxSuggestions.init();});
ajaxSuggestions.addEvent(window, "unload", function(){ajaxSuggestions.closeSession();});
// ---


