
function getHTTPObject(myFunction)	{
	myFunction = eval(myFunction);
	var xmlhttp = false;
  /*@cc_on
  @if (@_jscript_version >= 5)
     try	{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
     }
     catch (e)	{
        try	{
           xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (E)	{
           xmlhttp = false;
        }
     }
  @else
     xmlhttp = false;
  @end @*/
  
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined')	{
     try	{
        xmlhttp = new XMLHttpRequest();
     }
     catch (e)	{
        xmlhttp = false;
     }
  }

  if (xmlhttp)	{
     xmlhttp.onreadystatechange=function()	{
        if (xmlhttp.readyState == 4)	{
           if (xmlhttp.status == 200)	{
              myFunction(xmlhttp.responseText);
           }
        }
     }
  }
  return xmlhttp;
}

function photosAddBasket(id,album)	{
	stamp = new Date();
	typesvar = '?id=' + id + '&album=' + album + '&time=' + stamp;
		
	var xmlhttp = new getHTTPObject('returnAddBasket');
	xmlhttp.open("GET", "scripts/photosAddBasket.php"+typesvar, true); 
	xmlhttp.send(null);
	}
	
function photosDelBasket(id,album)	{
	stamp = new Date();
	typesvar = '?id=' + id + '&album=' + album + '&time=' + stamp;
		
	var xmlhttp = new getHTTPObject('returnDelBasket');
	xmlhttp.open("GET", "scripts/photosDelBasket.php"+typesvar, true); 
	xmlhttp.send(null);
	}

function returnAddBasket(text)	{
	document.getElementById('basketNumItems').innerHTML = text;
	}

function returnDelBasket(text)	{
	document.getElementById('basketNumItems').innerHTML = text;
	window.location.reload();
	}

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}('E 18={63:\'1.6.0.2\',1C:{2y:!!(1l.7a&&!1l.3z),4L:!!1l.3z,3A:4M.4N.3g(\'e8/\')>-1,7b:4M.4N.3g(\'7b\')>-1&&4M.4N.3g(\'aQ\')==-1,aR:!!4M.4N.1q(/e9.*ea.*aS/)},3B:{7c:!!Y.2v,64:!!1l.65,7d:Y.3h(\'2i\').4O&&Y.3h(\'2i\').4O!==Y.3h(\'8B\').4O},7e:\'<3P[^>]*>([\\\\S\\\\s]*?)<\\/3P>\',aT:/^\\/\\*-eb-([\\s\\S]*)\\*\\/\\s*$/,2M:q(){},K:q(x){C x}};if(18.1C.aR)18.3B.7d=1e;E 1A={1D:q(){E a=1c,66=$A(17);if(I.1T(66[0]))a=66.4P();q 2z(){o.1H.3i(o,17)}I.O(2z,1A.1a);2z.8C=a;2z.aU=[];if(a){E b=q(){};b.1h=a.1h;2z.1h=W b;a.aU.1f(2z)}14(E i=0;i<66.U;i++)2z.5q(66[i]);if(!2z.1h.1H)2z.1h.1H=18.2M;2z.1h.ec=2z;C 2z}};1A.1a={5q:q(a){E b=o.8C&&o.8C.1h;E c=I.4Q(a);if(!I.4Q({2s:1b}).U)c.1f("2s","aV");14(E i=0,U=c.U;i<U;i++){E d=c[i],1i=a[d];if(b&&I.1T(1i)&&1i.aW().2N()=="$3Q"){E e=1i,1i=I.O((q(m){C q(){C b[m].3i(o,17)}})(d).4R(e),{aV:q(){C e},2s:q(){C e.2s()}})}o.1h[d]=1i}C o}};E 4S={};I.O=q(a,b){14(E c in b)a[c]=b[c];C a};I.O(I,{1W:q(a){21{if(I.2j(a))C\'3j\';if(a===1c)C\'1c\';C a.1W?a.1W():1F(a)}28(e){if(e aX ed)C\'...\';2A e;}},2S:q(a){E b=2B a;3R(b){1B\'3j\':1B\'q\':1B\'ee\':C;1B\'ef\':C a.2s()}if(a===1c)C\'1c\';if(a.2S)C a.2S();if(I.3S(a))C;E c=[];14(E d in a){E e=I.2S(a[d]);if(!I.2j(e))c.1f(d.2S()+\': \'+e)}C\'{\'+c.1X(\', \')+\'}\'},4c:q(a){C $H(a).4c()},3T:q(a){C a&&a.3T?a.3T():1F.5r(a)},4Q:q(a){E b=[];14(E c in a)b.1f(c);C b},2k:q(a){E b=[];14(E c in a)b.1f(a[c]);C b},2l:q(a){C I.O({},a)},3S:q(a){C a&&a.2w==1},4d:q(a){C a!=1c&&2B a=="2T"&&\'eg\'in a&&\'1X\'in a},8D:q(a){C a aX 3C},1T:q(a){C 2B a=="q"},22:q(a){C 2B a=="7f"},4T:q(a){C 2B a=="eh"},2j:q(a){C 2B a=="3j"}});I.O(8E.1h,{aW:q(){E a=o.2s().1q(/^[\\s\\(]*q[^(]*\\((.*?)\\)/)[1].2U(",").67("3D");C a.U==1&&!a[0]?[]:a},1m:q(){if(17.U<2&&I.2j(17[0]))C o;E a=o,2x=$A(17),2T=2x.4P();C q(){C a.3i(2T,2x.1Q($A(17)))}},ei:q(){E b=o,2x=$A(17),2T=2x.4P();C q(a){C b.3i(2T,[a||1l.4U].1Q(2x))}},7g:q(){if(!17.U)C o;E a=o,2x=$A(17);C q(){C a.3i(o,2x.1Q($A(17)))}},4e:q(){E a=o,2x=$A(17),aY=2x.4P()*68;C 1l.ej(q(){C a.3i(a,2x)},aY)},4R:q(a){E b=o;C q(){C a.3i(o,[b.1m(o)].1Q($A(17)))}},4f:q(){if(o.8F)C o.8F;E a=o;C o.8F=q(){C a.3i(1c,[o].1Q($A(17)))}}});8E.1h.4g=8E.1h.4e.7g(0.aZ);8G.1h.2S=q(){C\'"\'+o.ek()+\'-\'+(o.el()+1).4h(2)+\'-\'+o.eo().4h(2)+\'T\'+o.ep().4h(2)+\':\'+o.eq().4h(2)+\':\'+o.er().4h(2)+\'Z"\'};E b0={b1:q(){E a;14(E i=0,U=17.U;i<U;i++){E b=17[i];21{a=b();1u}28(e){}}C a}};3U.1h.1q=3U.1h.2m;3U.b2=q(a){C 1F(a).1K(/([.*+?^=!:${}()|[\\]\\/\\\\])/g,\'\\\\$1\')};E b3=1A.1D({1H:q(a,b){o.69=a;o.6a=b;o.7h=1e;o.6b()},6b:q(){o.5s=8H(o.6c.1m(o),o.6a*68)},8I:q(){o.69(o)},8J:q(){if(!o.5s)C;8K(o.5s);o.5s=1c},6c:q(){if(!o.7h){21{o.7h=1b;o.8I()}es{o.7h=1e}}}});I.O(1F,{5r:q(a){C a==1c?\'\':1F(a)},b4:{\'\\b\':\'\\\\b\',\'\\t\':\'\\\\t\',\'\\n\':\'\\\\n\',\'\\f\':\'\\\\f\',\'\\r\':\'\\\\r\',\'\\\\\':\'\\\\\\\\\'}});I.O(1F.1h,{2O:q(a,b){E c=\'\',4i=o,1q;b=17.5t.8L(b);1E(4i.U>0){if(1q=4i.1q(a)){c+=4i.2C(0,1q.6d);c+=1F.5r(b(1q));4i=4i.2C(1q.6d+1q[0].U)}1d{c+=4i,4i=\'\'}}C c},b5:q(b,c,d){c=o.2O.8L(c);d=I.2j(d)?1:d;C o.2O(b,q(a){if(--d<0)C a[0];C c(a)})},b6:q(a,b){o.2O(a,b);C 1F(o)},et:q(a,b){a=a||30;b=I.2j(b)?\'...\':b;C o.U>a?o.2C(0,a-b.U)+b:1F(o)},3D:q(){C o.1K(/^\\s+/,\'\').1K(/\\s+$/,\'\')},b7:q(){C o.1K(/<\\/?[^>]+>/gi,\'\')},3V:q(){C o.1K(W 3U(18.7e,\'b8\'),\'\')},b9:q(){E b=W 3U(18.7e,\'b8\');E c=W 3U(18.7e,\'im\');C(o.1q(b)||[]).1V(q(a){C(a.1q(c)||[\'\',\'\'])[1]})},4V:q(){C o.b9().1V(q(a){C 6e(a)})},7i:q(){E a=17.5t;a.3k.eu=o;C a.2i.3W},ba:q(){E c=W G(\'2i\');c.3W=o.b7();C c.29[0]?(c.29.U>1?$A(c.29).2D(\'\',q(a,b){C a+b.5u}):c.29[0].5u):\'\'},7j:q(e){E f=o.3D().1q(/([^?#]*)(#.*)?$/);if(!f)C{};C f[1].2U(e||\'&\').2D({},q(a,b){if((b=b.2U(\'=\'))[0]){E c=8M(b.4P());E d=b.U>1?b.1X(\'=\'):b[0];if(d!=3j)d=8M(d);if(c in a){if(!I.4d(a[c]))a[c]=[a[c]];a[c].1f(d)}1d a[c]=d}C a})},2P:q(){C o.2U(\'\')},8N:q(){C o.2C(0,o.U-1)+1F.bb(o.bc(o.U-1)+1)},7k:q(a){C a<1?\'\':W 24(a+1).1X(o)},6f:q(){E a=o.2U(\'-\'),6g=a.U;if(6g==1)C a[0];E b=o.4j(0)==\'-\'?a[0].4j(0).2o()+a[0].4k(1):a[0];14(E i=1;i<6g;i++)b+=a[i].4j(0).2o()+a[i].4k(1);C b},6h:q(){C o.4j(0).2o()+o.4k(1).1R()},ev:q(){C o.2O(/::/,\'/\').2O(/([A-Z]+)([A-Z][a-z])/,\'#{1}5v#{2}\').2O(/([a-z\\d])([A-Z])/,\'#{1}5v#{2}\').2O(/-/,\'5v\').1R()},bd:q(){C o.2O(/5v/,\'-\')},1W:q(c){E d=o.2O(/[\\ew-\\ey\\\\]/,q(a){E b=1F.b4[a[0]];C b?b:\'\\\\ez\'+a[0].bc().4h(2,16)});if(c)C\'"\'+d.1K(/"/g,\'\\\\"\')+\'"\';C"\'"+d.1K(/\'/g,\'\\\\\\\'\')+"\'"},2S:q(){C o.1W(1b)},8O:q(a){C o.b5(a||18.aT,\'#{1}\')},be:q(){E a=o;if(a.4W())C 1e;a=o.1K(/\\\\./g,\'@\').1K(/"[^"\\\\\\n\\r]*"/g,\'\');C(/^[,:{}\\[\\]0-9.\\-+eA-u \\n\\r\\t]*$/).2m(a)},5w:q(a){E b=o.8O();21{if(!a||b.be())C 6e(\'(\'+b+\')\')}28(e){}2A W eB(\'eC eD bf 7f: \'+o.1W());},1y:q(a){C o.3g(a)>-1},8P:q(a){C o.3g(a)===0},bg:q(a){E d=o.U-a.U;C d>=0&&o.8Q(a)===d},5x:q(){C o==\'\'},4W:q(){C/^\\s*$/.2m(o)},bh:q(a,b){C W 2E(o,b).2v(a)}});if(18.1C.3A||18.1C.2y)I.O(1F.1h,{7i:q(){C o.1K(/&/g,\'&bi;\').1K(/</g,\'&bj;\').1K(/>/g,\'&gt;\')},ba:q(){C o.1K(/&bi;/g,\'&\').1K(/&bj;/g,\'<\').1K(/&gt;/g,\'>\')}});1F.1h.2O.8L=q(b){if(I.1T(b))C b;E c=W 2E(b);C q(a){C c.2v(a)}};1F.1h.eE=1F.1h.7j;I.O(1F.1h.7i,{2i:Y.3h(\'2i\'),3k:Y.8R(\'\')});8S(1F.1h.7i)2i.4X(3k);E 2E=1A.1D({1H:q(a,b){o.bk=a.2s();o.bl=b||2E.bm},2v:q(f){if(I.1T(f.8T))f=f.8T();C o.bk.2O(o.bl,q(a){if(f==1c)C\'\';E b=a[1]||\'\';if(b==\'\\\\\')C a[2];E c=f,6i=a[3];E d=/^([^.[]+|\\[((?:.*?[^\\\\])?)\\])(\\.|\\[|$)/;a=d.bn(6i);if(a==1c)C b;1E(a!=1c){E e=a[1].8P(\'[\')?a[2].2O(\'\\\\\\\\]\',\']\'):a[1];c=c[e];if(1c==c||\'\'==a[3])1u;6i=6i.4k(\'[\'==a[3]?a[1].U:a[0].U);a=d.bn(6i)}C b+1F.5r(c)})}});2E.bm=/(^|.|\\r|\\n)(#\\{(.*?)\\})/;E $1u={};E 2p={1j:q(b,c){E d=0;b=b.1m(c);21{o.3l(q(a){b(a,d++)})}28(e){if(e!=$1u)2A e;}C o},bo:q(a,b,c){b=b?b.1m(c):18.K;E d=-a,8U=[],8V=o.2P();1E((d+=a)<8V.U)8U.1f(8V.2C(d,d+a));C 8U.6j(b,c)},8W:q(c,d){c=c?c.1m(d):18.K;E e=1b;o.1j(q(a,b){e=e&&!!c(a,b);if(!e)2A $1u;});C e},bp:q(c,d){c=c?c.1m(d):18.K;E e=1e;o.1j(q(a,b){if(e=!!c(a,b))2A $1u;});C e},6j:q(c,d){c=c?c.1m(d):18.K;E e=[];o.1j(q(a,b){e.1f(c(a,b))});C e},7l:q(c,d){c=c.1m(d);E e;o.1j(q(a,b){if(c(a,b)){e=a;2A $1u;}});C e},4l:q(c,d){c=c.1m(d);E e=[];o.1j(q(a,b){if(c(a,b))e.1f(a)});C e},eF:q(c,d,e){d=d?d.1m(e):18.K;E f=[];if(I.22(c))c=W 3U(c);o.1j(q(a,b){if(c.1q(a))f.1f(d(a,b))});C f},1y:q(b){if(I.1T(o.3g))if(o.3g(b)!=-1)C 1b;E c=1e;o.1j(q(a){if(a==b){c=1b;2A $1u;}});C c},eG:q(b,c){c=I.2j(c)?1c:c;C o.bo(b,q(a){1E(a.U<b)a.1f(c);C a})},2D:q(c,d,e){d=d.1m(e);o.1j(q(a,b){c=d(c,a,b)});C c},67:q(b){E c=$A(17).2C(1);C o.1V(q(a){C a[b].3i(a,c)})},5y:q(c,d){c=c?c.1m(d):18.K;E e;o.1j(q(a,b){a=c(a,b);if(e==1c||a>=e)e=a});C e},eH:q(c,d){c=c?c.1m(d):18.K;E e;o.1j(q(a,b){a=c(a,b);if(e==1c||a<e)e=a});C e},eI:q(c,d){c=c?c.1m(d):18.K;E e=[],8X=[];o.1j(q(a,b){(c(a,b)?e:8X).1f(a)});C[e,8X]},4m:q(b){E c=[];o.1j(q(a){c.1f(a[b])});C c},7m:q(c,d){c=c.1m(d);E e=[];o.1j(q(a,b){if(!c(a,b))e.1f(a)});C e},bq:q(e,f){e=e.1m(f);C o.1V(q(a,b){C{1i:a,6k:e(a,b)}}).eJ(q(c,d){E a=c.6k,b=d.6k;C a<b?-1:a>b?1:0}).4m(\'1i\')},2P:q(){C o.1V()},eK:q(){E c=18.K,2x=$A(17);if(I.1T(2x.1Y()))c=2x.eL();E d=[o].1Q(2x).1V($A);C o.1V(q(a,b){C c(d.4m(b))})},8Y:q(){C o.2P().U},1W:q(){C\'#<2p:\'+o.2P().1W()+\'>\'}};I.O(2p,{1V:2p.6j,8Z:2p.7l,2q:2p.4l,5z:2p.4l,eM:2p.1y,eN:2p.2P,eO:2p.8W,eP:2p.bp});q $A(a){if(!a)C[];if(a.2P)C a.2P();E b=a.U||0,1g=W 24(b);1E(b--)1g[b]=a[b];C 1g}if(18.1C.3A){$A=q(a){if(!a)C[];if(!(I.1T(a)&&a==\'[2T eQ]\')&&a.2P)C a.2P();E b=a.U||0,1g=W 24(b);1E(b--)1g[b]=a[b];C 1g}}24.2F=$A;I.O(24.1h,2p);if(!24.1h.90)24.1h.90=24.1h.5A;I.O(24.1h,{3l:q(a){14(E i=0,U=o.U;i<U;i++)a(o[i])},br:q(){o.U=0;C o},2N:q(){C o[0]},1Y:q(){C o[o.U-1]},eR:q(){C o.2q(q(a){C a!=1c})},5B:q(){C o.2D([],q(a,b){C a.1Q(I.4d(b)?b.5B():[b])})},5C:q(){E b=$A(17);C o.2q(q(a){C!b.1y(a)})},5A:q(a){C(a!==1e?o:o.2P()).90()},eS:q(){C o.U>1?o:o[0]},bs:q(d){C o.2D([],q(a,b,c){if(0==c||(d?a.1Y()!=b:!a.1y(b)))a.1f(b);C a})},eT:q(c){C o.bs().4l(q(b){C c.7l(q(a){C b===a})})},2l:q(){C[].1Q(o)},8Y:q(){C o.U},1W:q(){C\'[\'+o.1V(I.1W).1X(\', \')+\']\'},2S:q(){E c=[];o.1j(q(a){E b=I.2S(a);if(!I.2j(b))c.1f(b)});C\'[\'+c.1X(\', \')+\']\'}});if(I.1T(24.1h.bt))24.1h.3l=24.1h.bt;if(!24.1h.3g)24.1h.3g=q(a,i){i||(i=0);E b=o.U;if(i<0)i=b+i;14(;i<b;i++)if(o[i]===a)C i;C-1};if(!24.1h.8Q)24.1h.8Q=q(a,i){i=91(i)?o.U:(i<0?o.U+i:i)+1;E n=o.2C(0,i).5A().3g(a);C(n<0)?n:i-n-1};24.1h.2P=24.1h.2l;q $w(a){if(!I.22(a))C[];a=a.3D();C a?a.2U(/\\s+/):[]}if(18.1C.4L){24.1h.1Q=q(){E a=[];14(E i=0,U=o.U;i<U;i++)a.1f(o[i]);14(E i=0,U=17.U;i<U;i++){if(I.4d(17[i])){14(E j=0,bu=17[i].U;j<bu;j++)a.1f(17[i][j])}1d{a.1f(17[i])}}C a}}I.O(4Y.1h,{5D:q(){C o.4h(2,16)},8N:q(){C o+1},7k:q(a){$R(0,o,1b).1j(a);C o},4h:q(a,b){E c=o.2s(b||10);C\'0\'.7k(a-c.U)+c},2S:q(){C eU(o)?o.2s():\'1c\'}});$w(\'eV 2V eW 92\').1j(q(a){4Y.1h[a]=2G[a].4f()});q $H(a){C W 3C(a)};E 3C=1A.1D(2p,(q(){q 93(a,b){if(I.2j(b))C a;C a+\'=\'+bv(1F.5r(b))}C{1H:q(a){o.4n=I.8D(a)?a.6l():I.2l(a)},3l:q(a){14(E b in o.4n){E c=o.4n[b],7n=[b,c];7n.4Z=b;7n.1i=c;a(7n)}},3X:q(a,b){C o.4n[a]=b},3m:q(a){C o.4n[a]},eX:q(a){E b=o.4n[a];94 o.4n[a];C b},6l:q(){C I.2l(o.4n)},4Q:q(){C o.4m(\'4Z\')},2k:q(){C o.4m(\'1i\')},6d:q(b){E c=o.7l(q(a){C a.1i===b});C c&&c.4Z},eY:q(a){C o.2l().2a(a)},2a:q(c){C W 3C(c).2D(o,q(a,b){a.3X(b.4Z,b.1i);C a})},4c:q(){C o.1V(q(a){E b=bv(a.4Z),2k=a.1i;if(2k&&2B 2k==\'2T\'){if(I.4d(2k))C 2k.1V(93.7g(b)).1X(\'&\')}C 93(b,2k)}).1X(\'&\')},1W:q(){C\'#<3C:{\'+o.1V(q(a){C a.1V(I.1W).1X(\': \')}).1X(\', \')+\'}>\'},2S:q(){C I.2S(o.6l())},2l:q(){C W 3C(o)}}})());3C.1h.8T=3C.1h.6l;3C.2F=$H;E bw=1A.1D(2p,{1H:q(a,b,c){o.2H=a;o.6m=b;o.bx=c},3l:q(a){E b=o.2H;1E(o.1y(b)){a(b);b=b.8N()}},1y:q(a){if(a<o.2H)C 1e;if(o.bx)C a<o.6m;C a<=o.6m}});E $R=q(a,b,c){C W bw(a,b,c)};E 1I={by:q(){C b0.b1(q(){C W bz()},q(){C W bA(\'eZ.bB\')},q(){C W bA(\'f0.bB\')})||1e},95:0};1I.5E={6n:[],3l:q(a){o.6n.3l(a)},bC:q(a){if(!o.1y(a))o.6n.1f(a)},f1:q(a){o.6n=o.6n.5C(a)},7o:q(b,c,d,f){o.1j(q(a){if(I.1T(a[b])){21{a[b].3i(a,[c,d,f])}28(e){}}})}};I.O(1I.5E,2p);1I.5E.bC({7p:q(){1I.95++},4o:q(){1I.95--}});1I.2W=1A.1D({1H:q(a){o.J={1M:\'6o\',7q:1b,bD:\'7r/x-f2-8B-f3\',96:\'f4-8\',2X:\'\',5w:1b,97:1b};I.O(o.J,a||{});o.J.1M=o.J.1M.1R();if(I.22(o.J.2X))o.J.2X=o.J.2X.7j();1d if(I.8D(o.J.2X))o.J.2X=o.J.2X.6l()}});1I.50=1A.1D(1I.2W,{98:1e,1H:q($3Q,b,c){$3Q(c);o.2b=1I.by();o.3E(b)},3E:q(a){o.51=a;o.1M=o.J.1M;E b=I.2l(o.J.2X);if(![\'3m\',\'6o\'].1y(o.1M)){b[\'f5\']=o.1M;o.1M=\'6o\'}o.2X=b;if(b=I.4c(b)){if(o.1M==\'3m\')o.51+=(o.51.1y(\'?\')?\'&\':\'?\')+b;1d if(/f6|aS|aQ/.2m(4M.4N))b+=\'&5v=\'}21{E c=W 1I.99(o);if(o.J.7p)o.J.7p(c);1I.5E.7o(\'7p\',o,c);o.2b.f7(o.1M.2o(),o.51,o.J.7q);if(o.J.7q)o.9a.1m(o).4g(1);o.2b.7s=o.9b.1m(o);o.bE();o.2c=o.1M==\'6o\'?(o.J.f8||b):1c;o.2b.f9(o.2c);if(!o.J.7q&&o.2b.bF)o.9b()}28(e){o.52(e)}},9b:q(){E a=o.2b.3F;if(a>1&&!((a==4)&&o.98))o.9a(o.2b.3F)},bE:q(){E b={\'X-fa-fb\':\'bz\',\'X-18-63\':18.63,\'fc\':\'3k/bG, 3k/fd, 7r/bH, 3k/bH, */*\'};if(o.1M==\'6o\'){b[\'9c-1z\']=o.J.bD+(o.J.96?\'; fe=\'+o.J.96:\'\');if(o.2b.bF&&(4M.4N.1q(/7b\\/(\\d{4})/)||[0,bI])[1]<bI)b[\'ff\']=\'fg\'}if(2B o.J.bJ==\'2T\'){E c=o.J.bJ;if(I.1T(c.1f))14(E i=0,U=c.U;i<U;i+=2)b[c[i]]=c[i+1];1d $H(c).1j(q(a){b[a.4Z]=a.1i})}14(E d in b)o.2b.fh(d,b[d])},53:q(){E a=o.6p();C!a||(a>=bK&&a<fi)},6p:q(){21{C o.2b.7t||0}28(e){C 0}},9a:q(a){E b=1I.50.bL[a],3Y=W 1I.99(o);if(b==\'9d\'){21{o.98=1b;(o.J[\'5F\'+3Y.7t]||o.J[\'5F\'+(o.53()?\'fj\':\'fk\')]||18.2M)(3Y,3Y.7u)}28(e){o.52(e)}E c=3Y.5G(\'9c-1z\');if(o.J.97==\'bM\'||(o.J.97&&o.7v()&&c&&c.1q(/^\\s*(3k|7r)\\/(x-)?(fl|fm)3P(;.*)?\\s*$/i)))o.bN()}21{(o.J[\'5F\'+b]||18.2M)(3Y,3Y.7u);1I.5E.7o(\'5F\'+b,o,3Y,3Y.7u)}28(e){o.52(e)}if(b==\'9d\'){o.2b.7s=18.2M}},7v:q(){E m=o.51.1q(/^\\s*fn?:\\/\\/[^\\/]*/);C!m||(m[0]==\'#{9e}//#{9f}#{7w}\'.bh({9e:7x.9e,9f:Y.9f,7w:7x.7w?\':\'+7x.7w:\'\'}))},5G:q(a){21{C o.2b.9g(a)||1c}28(e){C 1c}},bN:q(){21{C 6e((o.2b.4p||\'\').8O())}28(e){o.52(e)}},52:q(a){(o.J.bO||18.2M)(o,a);1I.5E.7o(\'bO\',o,a)}});1I.50.bL=[\'fo\',\'fp\',\'fq\',\'fr\',\'9d\'];1I.99=1A.1D({1H:q(a){o.3E=a;E b=o.2b=a.2b,3F=o.3F=b.3F;if((3F>2&&!18.1C.2y)||3F==4){o.7t=o.6p();o.9h=o.bP();o.4p=1F.5r(b.4p);o.7u=o.bQ()}if(3F==4){E c=b.bR;o.bR=I.2j(c)?1c:c;o.fs=o.bS()}},7t:0,9h:\'\',6p:1I.50.1h.6p,bP:q(){21{C o.2b.9h||\'\'}28(e){C\'\'}},5G:1I.50.1h.5G,ft:q(){21{C o.9i()}28(e){C 1c}},9g:q(a){C o.2b.9g(a)},9i:q(){C o.2b.9i()},bQ:q(){E a=o.5G(\'X-bf\');if(!a)C 1c;a=8M(b2(a));21{C a.5w(o.3E.J.bT||!o.3E.7v())}28(e){o.3E.52(e)}},bS:q(){E a=o.3E.J;if(!a.5w||(a.5w!=\'bM\'&&!(o.5G(\'9c-1z\')||\'\').1y(\'7r/fu\'))||o.4p.4W())C 1c;21{C o.4p.5w(a.bT||!o.3E.7v())}28(e){o.3E.52(e)}}});1I.bU=1A.1D(1I.50,{1H:q($3Q,d,e,f){o.7y={53:(d.53||d),9j:(d.9j||(d.53?1c:d))};f=I.2l(f);E g=f.4o;f.4o=(q(a,b){o.bV(a.4p);if(I.1T(g))g(a,b)}).1m(o);$3Q(e,f)},bV:q(a){E b=o.7y[o.53()?\'53\':\'9j\'],J=o.J;if(!J.4V)a=a.3V();if(b=$(b)){if(J.7z){if(I.22(J.7z)){E c={};c[J.7z]=a;b.2Y(c)}1d J.7z(b,a)}1d b.2a(a)}}});1I.fv=1A.1D(1I.2W,{1H:q($3Q,b,c,d){$3Q(d);o.4o=o.J.4o;o.6a=(o.J.6a||2);o.54=(o.J.54||1);o.9k={};o.7y=b;o.51=c;o.2H()},2H:q(){o.J.4o=o.bW.1m(o);o.6c()},8J:q(){o.9k.J.4o=3j;fw(o.5s);(o.4o||18.2M).3i(o,17)},bW:q(a){if(o.J.54){o.54=(a.4p==o.bX?o.54*o.J.54:1);o.bX=a.4p}o.5s=o.6c.1m(o).4e(o.54*o.6a)},6c:q(){o.9k=W 1I.bU(o.7y,o.51,o.J)}});q $(a){if(17.U>1){14(E i=0,9l=[],U=17.U;i<U;i++)9l.1f($(17[i]));C 9l}if(I.22(a))a=Y.fx(a);C G.O(a)}if(18.3B.7c){Y.9m=q(a,b){E c=[];E d=Y.2v(a,$(b)||Y,1c,fy.fz,1c);14(E i=0,U=d.fA;i<U;i++)c.1f(G.O(d.fB(i)));C c}}if(!1l.6q)E 6q={};if(!6q.bY){I.O(6q,{bY:1,fC:2,bZ:3,fD:4,fE:5,fF:6,fG:7,fH:8,fI:9,fJ:10,fK:11,fL:12})}(q(){E d=o.G;o.G=q(a,b){b=b||{};a=a.1R();E c=G.6r;if(18.1C.2y&&b.2d){a=\'<\'+a+\' 2d="\'+b.2d+\'">\';94 b.2d;C G.6s(Y.3h(a),b)}if(!c[a])c[a]=G.O(Y.3h(a));C G.6s(c[a].fM(1e),b)};I.O(o.G,d||{})}).9n(1l);G.6r={};G.1a={7A:q(a){C $(a).V.3n!=\'3Z\'},9o:q(a){a=$(a);G[G.7A(a)?\'2Z\':\'55\'](a);C a},2Z:q(a){$(a).V.3n=\'3Z\';C a},55:q(a){$(a).V.3n=\'\';C a},6t:q(a){a=$(a);a.1S.5H(a);C a},2a:q(a,b){a=$(a);if(b&&b.31)b=b.31();if(I.3S(b))C a.2a().2Y(b);b=I.3T(b);a.3W=b.3V();b.4V.1m(b).4g();C a},1K:q(a,b){a=$(a);if(b&&b.31)b=b.31();1d if(!I.3S(b)){b=I.3T(b);E c=a.fN.fO();c.fP(a);b.4V.1m(b).4g();b=c.fQ(b.3V())}a.1S.9p(b,a);C a},2Y:q(a,b){a=$(a);if(I.22(b)||I.4T(b)||I.3S(b)||(b&&(b.31||b.3T)))b={2e:b};E c,2Y,1s,29;14(E d in b){c=b[d];d=d.1R();2Y=G.5I[d];if(c&&c.31)c=c.31();if(I.3S(c)){2Y(a,c);3o}c=I.3T(c);1s=((d==\'9q\'||d==\'7B\')?a.1S:a).1s.2o();29=G.7C(1s,c.3V());if(d==\'1n\'||d==\'7B\')29.5A();29.1j(2Y.7g(a));c.4V.1m(c).4g()}C a},4R:q(a,b,c){a=$(a);if(I.3S(b))$(b).6s(c||{});1d if(I.22(b))b=W G(b,c);1d b=W G(\'2i\',b);if(a.1S)a.1S.9p(b,a);b.4X(a);C b},1W:q(d){d=$(d);E e=\'<\'+d.1s.1R();$H({\'id\':\'id\',\'25\':\'6u\'}).1j(q(a){E b=a.2N(),c0=a.1Y();E c=(d[b]||\'\').2s();if(c)e+=\' \'+c0+\'=\'+c.1W(1b)});C e+\'>\'},7D:q(a,b){a=$(a);E c=[];1E(a=a[b])if(a.2w==1)c.1f(G.O(a));C c},9r:q(a){C $(a).7D(\'1S\')},c1:q(a){C $(a).2q("*")},c2:q(a){a=$(a).5J;1E(a&&a.2w!=1)a=a.4q;C $(a)},c3:q(a){if(!(a=$(a).5J))C[];1E(a&&a.2w!=1)a=a.4q;if(a)C[a].1Q($(a).6v());C[]},9s:q(a){C $(a).7D(\'c4\')},6v:q(a){C $(a).7D(\'4q\')},fR:q(a){a=$(a);C a.9s().5A().1Q(a.6v())},1q:q(a,b){if(I.22(b))b=W 19(b);C b.1q($(a))},fS:q(a,b,c){a=$(a);if(17.U==1)C $(a.1S);E d=a.9r();C I.4T(b)?d[b]:19.5K(d,b,c)},41:q(a,b,c){a=$(a);if(17.U==1)C a.c2();C I.4T(b)?a.c1()[b]:a.2q(b)[c||0]},fT:q(a,b,c){a=$(a);if(17.U==1)C $(19.1U.6w(a));E d=a.9s();C I.4T(b)?d[b]:19.5K(d,b,c)},c5:q(a,b,c){a=$(a);if(17.U==1)C $(19.1U.6x(a));E d=a.6v();C I.4T(b)?d[b]:19.5K(d,b,c)},2q:q(){E a=$A(17),L=$(a.4P());C 19.7E(L,a)},56:q(){E a=$A(17),L=$(a.4P());C 19.7E(L.1S,a).5C(L)},c6:q(a){a=$(a);E b=a.57(\'id\'),9t=17.5t;if(b)C b;do{b=\'fU\'+9t.c7++}1E($(b));a.6s(\'id\',b);C b},57:q(a,b){a=$(a);if(18.1C.2y){E t=G.3p.7F;if(t.2k[b])C t.2k[b](a,b);if(t.4r[b])b=t.4r[b];if(b.1y(\':\')){C(!a.9u||!a.9u[b])?1c:a.9u[b].1i}}C a.9v(b)},6s:q(a,b,c){a=$(a);E d={},t=G.3p.5L;if(2B b==\'2T\')d=b;1d d[b]=I.2j(c)?1b:c;14(E e in d){b=t.4r[e]||e;c=d[e];if(t.2k[e])b=t.2k[e](a,c);if(c===1e||c===1c)a.9w(b);1d if(c===1b)a.c8(b,b);1d a.c8(b,c)}C a},9x:q(a){C $(a).3q().1o},c9:q(a){C $(a).3q().1k},6y:q(a){C W G.7G(a)},6z:q(a,b){if(!(a=$(a)))C;E c=a.25;C(c.U>0&&(c==b||W 3U("(^|\\\\s)"+b+"(\\\\s|$)").2m(c)))},7H:q(a,b){if(!(a=$(a)))C;if(!a.6z(b))a.25+=(a.25?\' \':\'\')+b;C a},9y:q(a,b){if(!(a=$(a)))C;a.25=a.25.1K(W 3U("(^|\\\\s+)"+b+"(\\\\s+|$)"),\' \').3D();C a},fV:q(a,b){if(!(a=$(a)))C;C a[a.6z(b)?\'9y\':\'7H\'](b)},9z:q(a){a=$(a);E b=a.5J;1E(b){E c=b.4q;if(b.2w==3&&!/\\S/.2m(b.5u))a.5H(b);b=c}C a},5x:q(a){C $(a).3W.4W()},7I:q(b,c){b=$(b),c=$(c);E d=c;if(b.ca)C(b.ca(c)&8)===8;if(b.6A&&!18.1C.4L){E e=b.6A,a=c.6A,5M=c.4q;if(!5M){do{c=c.1S}1E(!(5M=c.4q)&&c.1S)}if(5M&&5M.6A)C(e>a&&e<5M.6A)}1E(b=b.1S)if(b==d)C 1b;C 1e},9A:q(a){a=$(a);E b=a.4s();1l.9A(b[0],b[1]);C a},1p:q(a,b){a=$(a);b=b==\'9B\'?\'7J\':b.6f();E c=a.V[b];if(!c){E d=Y.7K.9C(a,1c);c=d?d[b]:1c}if(b==\'1J\')C c?2I(c):1.0;C c==\'7L\'?1c:c},6B:q(a){C $(a).1p(\'1J\')},1r:q(a,b){a=$(a);E c=a.V,1q;if(I.22(b)){a.V.9D+=\';\'+b;C b.1y(\'1J\')?a.4t(b.1q(/1J:\\s*(\\d?\\.?\\d*)/)[1]):a}14(E d in b)if(d==\'1J\')a.4t(b[d]);1d c[(d==\'9B\'||d==\'7J\')?(I.2j(c.9E)?\'7J\':\'9E\'):d]=b[d];C a},4t:q(a,b){a=$(a);a.V.1J=(b==1||b===\'\')?\'\':(b<0.7M)?0:b;C a},3q:q(a){a=$(a);E b=$(a).1p(\'3n\');if(b!=\'3Z\'&&b!=1c)C{1k:a.58,1o:a.59};E c=a.V;E d=c.9F;E e=c.1v;E f=c.3n;c.9F=\'7N\';c.1v=\'4u\';c.3n=\'fW\';E g=a.cb;E h=a.7O;c.3n=f;c.1v=e;c.9F=d;C{1k:g,1o:h}},3G:q(a){a=$(a);E b=G.1p(a,\'1v\');if(b==\'5N\'||!b){a.9G=1b;a.V.1v=\'5a\';if(1l.3z){a.V.1n=0;a.V.1t=0}}C a},3H:q(a){a=$(a);if(a.9G){a.9G=3j;a.V.1v=a.V.1n=a.V.1t=a.V.2e=a.V.42=\'\'}C a},3I:q(a){a=$(a);if(a.5b)C a;a.5b=G.1p(a,\'9H\')||\'7L\';if(a.5b!==\'7N\')a.V.9H=\'7N\';C a},3J:q(a){a=$(a);if(!a.5b)C a;a.V.9H=a.5b==\'7L\'?\'\':a.5b;a.5b=1c;C a},4s:q(a){E b=0,2t=0;do{b+=a.4v||0;2t+=a.4w||0;a=a.43}1E(a);C G.5c(2t,b)},6C:q(a){E b=0,2t=0;do{b+=a.4v||0;2t+=a.4w||0;a=a.43;if(a){if(a.1s==\'cc\')1u;E p=G.1p(a,\'1v\');if(p!==\'5N\')1u}}1E(a);C G.5c(2t,b)},7P:q(a){a=$(a);if(a.1p(\'1v\')==\'4u\')C;E b=a.6C();E c=b[1];E d=b[0];E e=a.cb;E f=a.7O;a.cd=d-2I(a.V.1t||0);a.ce=c-2I(a.V.1n||0);a.cf=a.V.1k;a.cg=a.V.1o;a.V.1v=\'4u\';a.V.1n=c+\'1L\';a.V.1t=d+\'1L\';a.V.1k=e+\'1L\';a.V.1o=f+\'1L\';C a},9I:q(a){a=$(a);if(a.1p(\'1v\')==\'5a\')C;a.V.1v=\'5a\';E b=2I(a.V.1n||0)-(a.ce||0);E c=2I(a.V.1t||0)-(a.cd||0);a.V.1n=b+\'1L\';a.V.1t=c+\'1L\';a.V.1o=a.cg;a.V.1k=a.cf;C a},9J:q(a){E b=0,2t=0;do{b+=a.4x||0;2t+=a.4y||0;a=a.1S}1E(a);C G.5c(2t,b)},5O:q(a){if(a.43)C $(a.43);if(a==Y.2c)C $(a);1E((a=a.1S)&&a!=Y.2c)if(G.1p(a,\'1v\')!=\'5N\')C $(a);C $(Y.2c)},6D:q(a){E b=0,2t=0;E c=a;do{b+=c.4v||0;2t+=c.4w||0;if(c.43==Y.2c&&G.1p(c,\'1v\')==\'4u\')1u}1E(c=c.43);c=a;do{if(!18.1C.4L||c.1s==\'cc\'){b-=c.4x||0;2t-=c.4y||0}}1E(c=c.1S);C G.5c(2t,b)},ch:q(a,b){E c=I.O({ci:1b,cj:1b,ck:1b,cl:1b,4v:0,4w:0},17[2]||{});b=$(b);E p=b.6D();a=$(a);E d=[0,0];E e=1c;if(G.1p(a,\'1v\')==\'4u\'){e=a.5O();d=e.6D()}if(e==Y.2c){d[0]-=Y.2c.4w;d[1]-=Y.2c.4v}if(c.ci)a.V.1t=(p[0]-d[0]+c.4w)+\'1L\';if(c.cj)a.V.1n=(p[1]-d[1]+c.4v)+\'1L\';if(c.ck)a.V.1k=b.58+\'1L\';if(c.cl)a.V.1o=b.59+\'1L\';C a}};G.1a.c6.c7=1;I.O(G.1a,{fX:G.1a.2q,fY:G.1a.c3});G.3p={5L:{4r:{25:\'6u\',co:\'14\'},2k:{}}};if(18.1C.4L){G.1a.1p=G.1a.1p.4R(q(d,e,f){3R(f){1B\'1t\':1B\'1n\':1B\'42\':1B\'2e\':if(d(e,\'1v\')===\'5N\')C 1c;1B\'1o\':1B\'1k\':if(!G.7A(e))C 1c;E g=44(d(e,f),10);if(g!==e[\'2u\'+f.6h()])C g+\'1L\';E h;if(f===\'1o\'){h=[\'7Q-1n-1k\',\'7R-1n\',\'7R-2e\',\'7Q-2e-1k\']}1d{h=[\'7Q-1t-1k\',\'7R-1t\',\'7R-42\',\'7Q-42-1k\']}C h.2D(g,q(a,b){E c=d(e,b);C c===1c?a:a-44(c,10)})+\'1L\';6E:C d(e,f)}});G.1a.57=G.1a.57.4R(q(a,b,c){if(c===\'7S\')C b.7S;C a(b,c)})}1d if(18.1C.2y){G.1a.5O=G.1a.5O.4R(q(a,b){b=$(b);E c=b.1p(\'1v\');if(c!==\'5N\')C a(b);b.1r({1v:\'5a\'});E d=a(b);b.1r({1v:c});C d});$w(\'6C 6D\').1j(q(f){G.1a[f]=G.1a[f].4R(q(a,b){b=$(b);E c=b.1p(\'1v\');if(c!==\'5N\')C a(b);E d=b.5O();if(d&&d.1p(\'1v\')===\'fZ\')d.1r({5P:1});b.1r({1v:\'5a\'});E e=a(b);b.1r({1v:c});C e})});G.1a.1p=q(a,b){a=$(a);b=(b==\'9B\'||b==\'7J\')?\'9E\':b.6f();E c=a.V[b];if(!c&&a.5Q)c=a.5Q[b];if(b==\'1J\'){if(c=(a.1p(\'5z\')||\'\').1q(/9K\\(1J=(.*)\\)/))if(c[1])C 2I(c[1])/2Q;C 1.0}if(c==\'7L\'){if((b==\'1k\'||b==\'1o\')&&(a.1p(\'3n\')!=\'3Z\'))C a[\'2u\'+b.6h()]+\'1L\';C 1c}C c};G.1a.4t=q(b,c){q 9L(a){C a.1K(/9K\\([^\\)]*\\)/gi,\'\')}b=$(b);E d=b.5Q;if((d&&!d.9M)||(!d&&b.V.5P==\'g0\'))b.V.5P=1;E e=b.1p(\'5z\'),V=b.V;if(c==1||c===\'\'){(e=9L(e))?V.5z=e:V.9w(\'5z\');C b}1d if(c<0.7M)c=0;V.5z=9L(e)+\'9K(1J=\'+(c*2Q)+\')\';C b};G.3p={7F:{4r:{\'6u\':\'25\',\'14\':\'co\'},2k:{7T:q(a,b){C a.9v(b,2)},cp:q(a,b){E c=a.cq(b);C c?c.1i:""},26:q(a,b){b=a.9v(b);C b?b.2s().2C(23,-2):1c},6F:q(a,b){C $(a).3r(b)?b:1c},V:q(a){C a.V.9D.1R()},7S:q(a){C a.7S}}}};G.3p.5L={4r:I.O({g1:\'g2\',g3:\'g4\'},G.3p.7F.4r),2k:{3s:q(a,b){a.3s=!!b},V:q(a,b){a.V.9D=b?b:\'\'}}};G.3p.9N={};$w(\'g5 g6 g7 g8 g9 7U \'+\'ga gb gc gd\').1j(q(a){G.3p.5L.4r[a.1R()]=a;G.3p.9N[a.1R()]=a});(q(v){I.O(v,{cr:v.7T,5d:v.7T,1z:v.7T,5R:v.cp,32:v.6F,3s:v.6F,ge:v.6F,cs:v.6F,gf:v.26,ct:v.26,gg:v.26,gh:v.26,gj:v.26,gk:v.26,gl:v.26,gm:v.26,gn:v.26,go:v.26,gp:v.26,gq:v.26,gr:v.26,gs:v.26,gu:v.26,gv:v.26,gw:v.26,gx:v.26})})(G.3p.7F.2k)}1d if(18.1C.7b&&/gy:1\\.8\\.0/.2m(4M.4N)){G.1a.4t=q(a,b){a=$(a);a.V.1J=(b==1)?0.gz:(b===\'\')?\'\':(b<0.7M)?0:b;C a}}1d if(18.1C.3A){G.1a.4t=q(a,b){a=$(a);a.V.1J=(b==1||b===\'\')?\'\':(b<0.7M)?0:b;if(b==1)if(a.1s==\'cu\'&&a.1k){a.1k++;a.1k--}1d 21{E n=Y.8R(\' \');a.4X(n);a.5H(n)}28(e){}C a};G.1a.4s=q(a){E b=0,2t=0;do{b+=a.4v||0;2t+=a.4w||0;if(a.43==Y.2c)if(G.1p(a,\'1v\')==\'4u\')1u;a=a.43}1E(a);C G.5c(2t,b)}}if(18.1C.2y||18.1C.4L){G.1a.2a=q(b,c){b=$(b);if(c&&c.31)c=c.31();if(I.3S(c))C b.2a().2Y(c);c=I.3T(c);E d=b.1s.2o();if(d in G.5I.4z){$A(b.29).1j(q(a){b.5H(a)});G.7C(d,c.3V()).1j(q(a){b.4X(a)})}1d b.3W=c.3V();c.4V.1m(c).4g();C b}}if(\'cv\'in Y.3h(\'2i\')){G.1a.1K=q(b,c){b=$(b);if(c&&c.31)c=c.31();if(I.3S(c)){b.1S.9p(c,b);C b}c=I.3T(c);E d=b.1S,1s=d.1s.2o();if(G.5I.4z[1s]){E e=b.c5();E f=G.7C(1s,c.3V());d.5H(b);if(e)f.1j(q(a){d.6G(a,e)});1d f.1j(q(a){d.4X(a)})}1d b.cv=c.3V();c.4V.1m(c).4g();C b}}G.5c=q(l,t){E a=[l,t];a.1t=l;a.1n=t;C a};G.7C=q(a,b){E c=W G(\'2i\'),t=G.5I.4z[a];if(t){c.3W=t[0]+b+t[1];t[2].7k(q(){c=c.5J})}1d c.3W=b;C $A(c.29)};G.5I={9q:q(a,b){a.1S.6G(b,a)},1n:q(a,b){a.6G(b,a.5J)},2e:q(a,b){a.4X(b)},7B:q(a,b){a.1S.6G(b,a.4q)},4z:{gA:[\'<4A>\',\'</4A>\',1],7V:[\'<4A><5S>\',\'</5S></4A>\',2],cw:[\'<4A><5S><7W>\',\'</7W></5S></4A>\',3],9O:[\'<4A><5S><7W><cx>\',\'</cx></7W></5S></4A>\',4],cy:[\'<2q>\',\'</2q>\',1]}};(q(){I.O(o.4z,{cz:o.4z.7V,cA:o.4z.7V,cB:o.4z.9O})}).9n(G.5I);G.1a.7X={3r:q(a,b){b=G.3p.9N[b]||b;E c=$(a).cq(b);C c&&c.cC}};G.1a.3a={};I.O(G,G.1a);if(!18.3B.64&&Y.3h(\'2i\').4O){1l.65={};1l.65.1h=Y.3h(\'2i\').4O;18.3B.64=1b}G.O=(q(){if(18.3B.7d)C 18.K;E c={},3a=G.1a.3a;E d=I.O(q(a){if(!a||a.7Y||a.2w!=1||a==1l)C a;E b=I.2l(c),1s=a.1s,47,1i;if(3a[1s])I.O(b,3a[1s]);14(47 in b){1i=b[47];if(I.1T(1i)&&!(47 in a))a[47]=1i.4f()}a.7Y=18.2M;C a},{7Z:q(){if(!18.3B.64){I.O(c,G.1a);I.O(c,G.1a.7X)}}});d.7Z();C d})();G.3r=q(a,b){if(a.3r)C a.3r(b);C G.1a.7X.3r(a,b)};G.5q=q(f){E F=18.3B,T=G.1a.3a;if(!f){I.O(1w,1w.1a);I.O(1w.G,1w.G.1a);I.O(G.1a.3a,{"gB":I.2l(1w.1a),"gC":I.2l(1w.G.1a),"cy":I.2l(1w.G.1a),"cD":I.2l(1w.G.1a)})}if(17.U==2){E g=f;f=17[1]}if(!g)I.O(G.1a,f||{});1d{if(I.4d(g))g.1j(O);1d O(g)}q O(a){a=a.2o();if(!G.1a.3a[a])G.1a.3a[a]={};I.O(G.1a.3a[a],f)}q 80(a,b,c){c=c||1e;14(E d in a){E e=a[d];if(!I.1T(e))3o;if(!c||!(d in b))b[d]=e.4f()}}q cE(a){E b;E c={"gD":"gE","cD":"gF","P":"gG","gH":"gI","gJ":"gK","gL":"gM","gN":"gO","gP":"gQ","gR":"5T","gS":"5T","gT":"5T","gU":"5T","gV":"5T","gW":"5T","Q":"gX","gY":"cF","gZ":"cF","A":"h0","cu":"h1","h2":"h3","h4":"cG","h5":"cG","cz":"9P","cA":"9P","7V":"9P","cw":"h6","cB":"cH","9O":"cH","h7":"h8","h9":"ha"};if(c[a])b=\'9Q\'+c[a]+\'G\';if(1l[b])C 1l[b];b=\'9Q\'+a+\'G\';if(1l[b])C 1l[b];b=\'9Q\'+a.6h()+\'G\';if(1l[b])C 1l[b];1l[b]={};1l[b].1h=Y.3h(a).4O;C 1l[b]}if(F.64){80(G.1a,65.1h);80(G.1a.7X,65.1h,1b)}if(F.7d){14(E h in G.1a.3a){E i=cE(h);if(I.2j(i))3o;80(T[h],i.1h)}}I.O(G,G.1a);94 G.3a;if(G.O.7Z)G.O.7Z();G.6r={}};Y.81={3q:q(){E a={};E B=18.1C;$w(\'1k 1o\').1j(q(d){E D=d.6h();a[d]=(B.3A&&!Y.2v)?9t[\'hb\'+D]:(B.4L)?Y.2c[\'cI\'+D]:Y.4B[\'cI\'+D]});C a},c9:q(){C o.3q().1k},9x:q(){C o.3q().1o},9R:q(){C G.5c(1l.cJ||Y.4B.4y||Y.2c.4y,1l.cK||Y.4B.4x||Y.2c.4x)}};E 19=1A.1D({1H:q(a){o.3K=a.3D();o.cL()},cM:q(){if(!18.3B.7c)C 1e;E e=o.3K;if(18.1C.3A&&(e.1y("-2f-1z")||e.1y(":5x")))C 1e;if((/(\\[[\\w-]*?:|:3s)/).2m(o.3K))C 1e;C 1b},cL:q(){if(o.cM())C o.cN();E e=o.3K,48=19.6H,h=19.1U,c=19.6k,49,p,m;if(19.5e[e]){o.3t=19.5e[e];C}o.3t=["o.3t = q(cO) {","E r = cO, h = 19.1U, c = 1e, n;"];1E(e&&49!=e&&(/\\S/).2m(e)){49=e;14(E i in 48){p=48[i];if(m=e.1q(p)){o.3t.1f(I.1T(c[i])?c[i](m):W 2E(c[i]).2v(m));e=e.1K(m[0],\'\');1u}}}o.3t.1f("C h.9S(n);\\n}");6e(o.3t.1X(\'\\n\'));19.5e[o.3K]=o.3t},cN:q(){E e=o.3K,48=19.6H,x=19.2g,49,m;if(19.5e[e]){o.2g=19.5e[e];C}o.3t=[\'.//*\'];1E(e&&49!=e&&(/\\S/).2m(e)){49=e;14(E i in 48){if(m=e.1q(48[i])){o.3t.1f(I.1T(x[i])?x[i](m):W 2E(x[i]).2v(m));e=e.1K(m[0],\'\');1u}}}o.2g=o.3t.1X(\'\');19.5e[o.3K]=o.2g},82:q(a){a=a||Y;if(o.2g)C Y.9m(o.2g,a);C o.3t(a)},1q:q(a){o.9T=[];E e=o.3K,48=19.6H,as=19.9U;E b,p,m;1E(e&&b!==e&&(/\\S/).2m(e)){b=e;14(E i in 48){p=48[i];if(m=e.1q(p)){if(as[i]){o.9T.1f([i,I.2l(m)]);e=e.1K(m[0],\'\')}1d{C o.82(Y).1y(a)}}}}E c=1b,2d,9V;14(E i=0,83;83=o.9T[i];i++){2d=83[0],9V=83[1];if(!19.9U[2d](a,9V)){c=1e;1u}}C c},2s:q(){C o.3K},1W:q(){C"#<19:"+o.3K.1W()+">"}});I.O(19,{5e:{},2g:{4C:"//*",1G:"/*",56:"/6I-4D::*[1]",6J:\'/6I-4D::*\',1s:q(m){if(m[1]==\'*\')C\'\';C"[cP-2d()=\'"+m[1].1R()+"\' 9W cP-2d()=\'"+m[1].2o()+"\']"},25:"[6K(1Q(\' \', @6u, \' \'), \' #{1} \')]",id:"[@id=\'#{1}\']",5U:q(m){m[1]=m[1].1R();C W 2E("[@#{1}]").2v(m)},5V:q(m){m[1]=m[1].1R();m[3]=m[5]||m[6];C W 2E(19.2g.6L[m[2]]).2v(m)},6M:q(m){E h=19.2g.1Z[m[1]];if(!h)C\'\';if(I.1T(h))C h(m);C W 2E(19.2g.1Z[m[1]]).2v(m)},6L:{\'=\':"[@#{1}=\'#{3}\']",\'!=\':"[@#{1}!=\'#{3}\']",\'^=\':"[hc-8S(@#{1}, \'#{3}\')]",\'$=\':"[4k(@#{1}, (7f-U(@#{1}) - 7f-U(\'#{3}\') + 1))=\'#{3}\']",\'*=\':"[6K(@#{1}, \'#{3}\')]",\'~=\':"[6K(1Q(\' \', @#{1}, \' \'), \' #{3} \')]",\'|=\':"[6K(1Q(\'-\', @#{1}, \'-\'), \'-#{3}-\')]"},1Z:{\'2N-1G\':\'[4a(9X-4D::*)]\',\'1Y-1G\':\'[4a(6I-4D::*)]\',\'6N-1G\':\'[4a(9X-4D::* 9W 6I-4D::*)]\',\'5x\':"[84(*) = 0 9Y (84(3k()) = 0 9W hd(3k(), \' \\t\\r\\n\', \'\') = \'\')]",\'3s\':"[@3s]",\'32\':"[@32]",\'cQ\':"[4a(@32)]",\'4a\':q(m){E e=m[6],p=19.6H,x=19.2g,49,v;E a=[];1E(e&&49!=e&&(/\\S/).2m(e)){49=e;14(E i in p){if(m=e.1q(p[i])){v=I.1T(x[i])?x[i](m):W 2E(x[i]).2v(m);a.1f("("+v.4k(1,v.U-1)+")");e=e.1K(m[0],\'\');1u}}}C"[4a("+a.1X(" 9Y ")+")]"},\'1N-1G\':q(m){C 19.2g.1Z.1N("(84(./9X-4D::*) + 1) ",m)},\'1N-1Y-1G\':q(m){C 19.2g.1Z.1N("(84(./6I-4D::*) + 1) ",m)},\'1N-2f-1z\':q(m){C 19.2g.1Z.1N("1v() ",m)},\'1N-1Y-2f-1z\':q(m){C 19.2g.1Z.1N("(1Y() + 1 - 1v()) ",m)},\'2N-2f-1z\':q(m){m[6]="1";C 19.2g.1Z[\'1N-2f-1z\'](m)},\'1Y-2f-1z\':q(m){m[6]="1";C 19.2g.1Z[\'1N-1Y-2f-1z\'](m)},\'6N-2f-1z\':q(m){E p=19.2g.1Z;C p[\'2N-2f-1z\'](m)+p[\'1Y-2f-1z\'](m)},1N:q(c,m){E d,5f=m[6],9Z;if(5f==\'cR\')5f=\'2n+0\';if(5f==\'cS\')5f=\'2n+1\';if(d=5f.1q(/^(\\d+)$/))C\'[\'+c+"= "+d[1]+\']\';if(d=5f.1q(/^(-?\\d*)?n(([+-])(\\d+))?/)){if(d[1]=="-")d[1]=-1;E a=d[1]?4Y(d[1]):1;E b=d[2]?4Y(d[2]):0;9Z="[((#{a0} - #{b}) he #{a} = 0) 9Y "+"((#{a0} - #{b}) 2i #{a} >= 0)]";C W 2E(9Z).2v({a0:c,a:a,b:b})}}}},6k:{1s:\'n = h.1s(n, r, "#{1}", c);      c = 1e;\',25:\'n = h.25(n, r, "#{1}", c);    c = 1e;\',id:\'n = h.id(n, r, "#{1}", c);           c = 1e;\',5U:\'n = h.5U(n, r, "#{1}", c); c = 1e;\',5V:q(m){m[3]=(m[5]||m[6]);C W 2E(\'n = h.5V(n, r, "#{1}", "#{3}", "#{2}", c); c = 1e;\').2v(m)},6M:q(m){if(m[6])m[6]=m[6].1K(/"/g,\'\\\\"\');C W 2E(\'n = h.6M(n, "#{1}", "#{6}", r, c); c = 1e;\').2v(m)},4C:\'c = "4C";\',1G:\'c = "1G";\',56:\'c = "56";\',6J:\'c = "6J";\'},6H:{6J:/^\\s*~\\s*/,1G:/^\\s*>\\s*/,56:/^\\s*\\+\\s*/,4C:/^\\s/,1s:/^\\s*(\\*|[\\w\\-]+)(\\b|$)?/,id:/^#([\\w\\-\\*]+)(\\b|$)/,25:/^\\.([\\w\\-\\*]+)(\\b|$)/,6M:/^:((2N|1Y|1N|1N-1Y|6N)(-1G|-2f-1z)|5x|3s|(en|hf)hg|4a)(\\((.*?)\\))?(\\b|$|(?=\\s|[:+~>]))/,5U:/^\\[([\\w]+)\\]/,5V:/\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*(([\'"])([^\\4]*?)\\4|([^\'"][^\\]]*?)))?\\]/},9U:{1s:q(a,b){C b[1].2o()==a.1s.2o()},25:q(a,b){C G.6z(a,b[1])},id:q(a,b){C a.id===b[1]},5U:q(a,b){C G.3r(a,b[1])},5V:q(a,b){E c=G.57(a,b[1]);C c&&19.6L[b[2]](c,b[5]||b[6])}},1U:{1Q:q(a,b){14(E i=0,N;N=b[i];i++)a.1f(N);C a},85:q(a){E b=18.2M;14(E i=0,N;N=a[i];i++)N.3u=b;C a},5g:q(a){14(E i=0,N;N=a[i];i++)N.3u=3j;C a},6d:q(a,b,c){a.3u=18.2M;if(b){14(E d=a.29,i=d.U-1,j=1;i>=0;i--){E e=d[i];if(e.2w==1&&(!c||e.3u))e.86=j++}}1d{14(E i=0,j=1,d=a.29;e=d[i];i++)if(e.2w==1&&(!c||e.3u))e.86=j++}},9S:q(a){if(a.U==0)C a;E b=[],n;14(E i=0,l=a.U;i<l;i++)if(!(n=a[i]).3u){n.3u=18.2M;b.1f(G.O(n))}C 19.1U.5g(b)},4C:q(a){E h=19.1U;14(E i=0,1g=[],N;N=a[i];i++)h.1Q(1g,N.3L(\'*\'));C 1g},1G:q(a){E h=19.1U;14(E i=0,1g=[],N;N=a[i];i++){14(E j=0,1G;1G=N.29[j];j++)if(1G.2w==1&&1G.1s!=\'!\')1g.1f(1G)}C 1g},56:q(a){14(E i=0,1g=[],N;N=a[i];i++){E b=o.6x(N);if(b)1g.1f(b)}C 1g},6J:q(a){E h=19.1U;14(E i=0,1g=[],N;N=a[i];i++)h.1Q(1g,G.6v(N));C 1g},6x:q(a){1E(a=a.4q)if(a.2w==1)C a;C 1c},6w:q(a){1E(a=a.c4)if(a.2w==1)C a;C 1c},1s:q(a,b,c,d){E e=c.2o();E f=[],h=19.1U;if(a){if(d){if(d=="4C"){14(E i=0,N;N=a[i];i++)h.1Q(f,N.3L(c));C f}1d a=o[d](a);if(c=="*")C a}14(E i=0,N;N=a[i];i++)if(N.1s.2o()===e)f.1f(N);C f}1d C b.3L(c)},id:q(a,b,c,d){E e=$(c),h=19.1U;if(!e)C[];if(!a&&b==Y)C[e];if(a){if(d){if(d==\'1G\'){14(E i=0,N;N=a[i];i++)if(e.1S==N)C[e]}1d if(d==\'4C\'){14(E i=0,N;N=a[i];i++)if(G.7I(e,N))C[e]}1d if(d==\'56\'){14(E i=0,N;N=a[i];i++)if(19.1U.6w(e)==N)C[e]}1d a=h[d](a)}14(E i=0,N;N=a[i];i++)if(N==e)C[e];C[]}C(e&&G.7I(e,b))?[e]:[]},25:q(a,b,c,d){if(a&&d)a=o[d](a);C 19.1U.cT(a,b,c)},cT:q(a,b,c){if(!a)a=19.1U.4C([b]);E d=\' \'+c+\' \';14(E i=0,1g=[],N,6O;N=a[i];i++){6O=N.25;if(6O.U==0)3o;if(6O==c||(\' \'+6O+\' \').1y(d))1g.1f(N)}C 1g},5U:q(a,b,c,d){if(!a)a=b.3L("*");if(a&&d)a=o[d](a);E e=[];14(E i=0,N;N=a[i];i++)if(G.3r(N,c))e.1f(N);C e},5V:q(a,b,c,d,e,f){if(!a)a=b.3L("*");if(a&&f)a=o[f](a);E g=19.6L[e],1g=[];14(E i=0,N;N=a[i];i++){E h=G.57(N,c);if(h===1c)3o;if(g(h,d))1g.1f(N)}C 1g},6M:q(a,b,c,d,e){if(a&&e)a=o[e](a);if(!a)a=d.3L("*");C 19.1Z[b](a,c,d)}},1Z:{\'2N-1G\':q(a,b,c){14(E i=0,1g=[],N;N=a[i];i++){if(19.1U.6w(N))3o;1g.1f(N)}C 1g},\'1Y-1G\':q(a,b,c){14(E i=0,1g=[],N;N=a[i];i++){if(19.1U.6x(N))3o;1g.1f(N)}C 1g},\'6N-1G\':q(a,b,c){E h=19.1U;14(E i=0,1g=[],N;N=a[i];i++)if(!h.6w(N)&&!h.6x(N))1g.1f(N);C 1g},\'1N-1G\':q(a,b,c){C 19.1Z.1N(a,b,c)},\'1N-1Y-1G\':q(a,b,c){C 19.1Z.1N(a,b,c,1b)},\'1N-2f-1z\':q(a,b,c){C 19.1Z.1N(a,b,c,1e,1b)},\'1N-1Y-2f-1z\':q(a,b,c){C 19.1Z.1N(a,b,c,1b,1b)},\'2N-2f-1z\':q(a,b,c){C 19.1Z.1N(a,"1",c,1e,1b)},\'1Y-2f-1z\':q(a,b,c){C 19.1Z.1N(a,"1",c,1b,1b)},\'6N-2f-1z\':q(a,b,c){E p=19.1Z;C p[\'1Y-2f-1z\'](p[\'2N-2f-1z\'](a,b,c),b,c)},cU:q(a,b,d){if(a==0)C b>0?[b]:[];C $R(1,d).2D([],q(c,i){if(0==(i-b)%a&&(i-b)/a>=0)c.1f(i);C c})},1N:q(c,d,e,f,g){if(c.U==0)C[];if(d==\'cR\')d=\'2n+0\';if(d==\'cS\')d=\'2n+1\';E h=19.1U,1g=[],a1=[],m;h.85(c);14(E i=0,N;N=c[i];i++){if(!N.1S.3u){h.6d(N.1S,f,g);a1.1f(N.1S)}}if(d.1q(/^\\d+$/)){d=4Y(d);14(E i=0,N;N=c[i];i++)if(N.86==d)1g.1f(N)}1d if(m=d.1q(/^(-?\\d*)?n(([+-])(\\d+))?/)){if(m[1]=="-")m[1]=-1;E a=m[1]?4Y(m[1]):1;E b=m[2]?4Y(m[2]):0;E k=19.1Z.cU(a,b,c.U);14(E i=0,N,l=k.U;N=c[i];i++){14(E j=0;j<l;j++)if(N.86==k[j])1g.1f(N)}}h.5g(c);h.5g(a1);C 1g},\'5x\':q(a,b,c){14(E i=0,1g=[],N;N=a[i];i++){if(N.1s==\'!\'||(N.5J&&!N.3W.1q(/^\\s*$/)))3o;1g.1f(N)}C 1g},\'4a\':q(a,b,c){E h=19.1U,hh,m;E d=W 19(b).82(c);h.85(d);14(E i=0,1g=[],N;N=a[i];i++)if(!N.3u)1g.1f(N);h.5g(d);C 1g},\'cQ\':q(a,b,c){14(E i=0,1g=[],N;N=a[i];i++)if(!N.32)1g.1f(N);C 1g},\'32\':q(a,b,c){14(E i=0,1g=[],N;N=a[i];i++)if(N.32)1g.1f(N);C 1g},\'3s\':q(a,b,c){14(E i=0,1g=[],N;N=a[i];i++)if(N.3s)1g.1f(N);C 1g}},6L:{\'=\':q(a,v){C a==v},\'!=\':q(a,v){C a!=v},\'^=\':q(a,v){C a.8P(v)},\'$=\':q(a,v){C a.bg(v)},\'*=\':q(a,v){C a.1y(v)},\'~=\':q(a,v){C(\' \'+a+\' \').1y(\' \'+v+\' \')},\'|=\':q(a,v){C(\'-\'+a.2o()+\'-\').1y(\'-\'+v.2o()+\'-\')}},2U:q(a){E b=[];a.b6(/(([\\w#:.~>+()\\s-]+|\\*|\\[.*?\\])+)\\s*(,|$)/,q(m){b.1f(m[1].3D())});C b},cV:q(a,b){E c=$$(b),h=19.1U;h.85(c);14(E i=0,1g=[],L;L=a[i];i++)if(L.3u)1g.1f(L);h.5g(c);C 1g},5K:q(a,b,c){if(I.4T(b)){c=b;b=1e}C 19.cV(a,b||\'*\')[c||0]},7E:q(a,b){b=19.2U(b.1X(\',\'));E c=[],h=19.1U;14(E i=0,l=b.U,a2;i<l;i++){a2=W 19(b[i].3D());h.1Q(c,a2.82(a))}C(l>1)?h.9S(c):c}});if(18.1C.2y){I.O(19.1U,{1Q:q(a,b){14(E i=0,N;N=b[i];i++)if(N.1s!=="!")a.1f(N);C a},5g:q(a){14(E i=0,N;N=a[i];i++)N.9w(\'3u\');C a}})}q $$(){C 19.7E(Y,$A(17))}E 1w={a3:q(a){$(a).a3();C a},cW:q(c,d){if(2B d!=\'2T\')d={87:!!d};1d if(I.2j(d.87))d.87=1b;E e,1i,a4=1e,5h=d.5h;E f=c.2D({},q(a,b){if(!b.32&&b.2d){e=b.2d;1i=$(b).2J();if(1i!=1c&&(b.1z!=\'5h\'||(!a4&&5h!==1e&&(!5h||e==5h)&&(a4=1b)))){if(e in a){if(!I.4d(a[e]))a[e]=[a[e]];a[e].1f(1i)}1d a[e]=1i}}C a});C d.87?f:I.4c(f)}};1w.1a={6P:q(a,b){C 1w.cW(1w.5W(a),b)},5W:q(c){C $A($(c).3L(\'*\')).2D([],q(a,b){if(1w.G.5X[b.1s.1R()])a.1f(G.O(b));C a})},hi:q(a,b,c){a=$(a);E d=a.3L(\'88\');if(!b&&!c)C $A(d).1V(G.O);14(E i=0,a5=[],U=d.U;i<U;i++){E e=d[i];if((b&&e.1z!=b)||(c&&e.2d!=c))3o;a5.1f(G.O(e))}C a5},a6:q(a){a=$(a);1w.5W(a).67(\'a6\');C a},a7:q(a){a=$(a);1w.5W(a).67(\'a7\');C a},cX:q(b){E c=$(b).5W().4l(q(a){C\'7N\'!=a.1z&&!a.32});E d=c.4l(q(a){C a.3r(\'7U\')&&a.7U>=0}).bq(q(a){C a.7U}).2N();C d?d:c.8Z(q(a){C[\'88\',\'2q\',\'a8\'].1y(a.1s.1R())})},hj:q(a){a=$(a);a.cX().cY();C a},3E:q(a,b){a=$(a),b=I.2l(b||{});E c=b.2X,5R=a.57(\'5R\')||\'\';if(5R.4W())5R=1l.7x.cr;b.2X=a.6P(1b);if(c){if(I.22(c))c=c.7j();I.O(b.2X,c)}if(a.3r(\'1M\')&&!b.1M)b.1M=a.1M;C W 1I.50(5R,b)}};1w.G={a9:q(a){$(a).a9();C a},2q:q(a){$(a).2q();C a}};1w.G.1a={6P:q(a){a=$(a);if(!a.32&&a.2d){E b=a.2J();if(b!=3j){E c={};c[a.2d]=b;C I.4c(c)}}C\'\'},2J:q(a){a=$(a);E b=a.1s.1R();C 1w.G.5X[b](a)},hk:q(a,b){a=$(a);E c=a.1s.1R();1w.G.5X[c](a,b);C a},br:q(a){$(a).1i=\'\';C a},hl:q(a){C $(a).1i!=\'\'},cY:q(a){a=$(a);21{a.a9();if(a.2q&&(a.1s.1R()!=\'88\'||![\'aa\',\'a3\',\'5h\'].1y(a.1z)))a.2q()}28(e){}C a},a6:q(a){a=$(a);a.hm();a.32=1b;C a},a7:q(a){a=$(a);a.32=1e;C a}};E hn=1w.G;E $F=1w.G.1a.2J;1w.G.5X={88:q(a,b){3R(a.1z.1R()){1B\'cZ\':1B\'d0\':C 1w.G.5X.d1(a,b);6E:C 1w.G.5X.a8(a,b)}},d1:q(a,b){if(I.2j(b))C a.3s?a.1i:1c;1d a.3s=!!b},a8:q(a,b){if(I.2j(b))C a.1i;1d a.1i=b},2q:q(a,b){if(I.2j(b))C o[a.1z==\'2q-ho\'?\'d2\':\'d3\'](a);1d{E c,1i,d4=!I.4d(b);14(E i=0,U=a.U;i<U;i++){c=a.J[i];1i=o.89(c);if(d4){if(1i==b){c.ab=1b;C}}1d c.ab=b.1y(1i)}}},d2:q(a){E b=a.hp;C b>=0?o.89(a.J[b]):1c},d3:q(a){E b,U=a.U;if(!U)C 1c;14(E i=0,b=[];i<U;i++){E c=a.J[i];if(c.ab)b.1f(o.89(c))}C b},89:q(a){C G.O(a).3r(\'1i\')?a.1i:a.3k}};4S.ac=1A.1D(b3,{1H:q($3Q,b,c,d){$3Q(d,c);o.L=$(b);o.4E=o.2J()},8I:q(){E a=o.2J();if(I.22(o.4E)&&I.22(a)?o.4E!=a:1F(o.4E)!=1F(a)){o.69(o.L,a);o.4E=a}}});1w.G.d5=1A.1D(4S.ac,{2J:q(){C 1w.G.2J(o.L)}});1w.d5=1A.1D(4S.ac,{2J:q(){C 1w.6P(o.L)}});4S.6Q=1A.1D({1H:q(a,b){o.L=$(a);o.69=b;o.4E=o.2J();if(o.L.1s.1R()==\'8B\')o.d6();1d o.6b(o.L)},ad:q(){E a=o.2J();if(o.4E!=a){o.69(o.L,a);o.4E=a}},d6:q(){1w.5W(o.L).1j(o.6b,o)},6b:q(a){if(a.1z){3R(a.1z.1R()){1B\'cZ\':1B\'d0\':1x.4F(a,\'hq\',o.ad.1m(o));1u;6E:1x.4F(a,\'hr\',o.ad.1m(o));1u}}}});1w.G.6Q=1A.1D(4S.6Q,{2J:q(){C 1w.G.2J(o.L)}});1w.6Q=1A.1D(4S.6Q,{2J:q(){C 1w.6P(o.L)}});if(!1l.1x)E 1x={};I.O(1x,{hs:8,ht:9,hu:13,hv:27,hw:37,hx:38,hy:39,hz:40,hA:46,hB:36,hC:35,hD:33,hE:34,hF:45,6r:{},ae:q(a){E b;3R(a.1z){1B\'hG\':b=a.hH;1u;1B\'hI\':b=a.31;1u;6E:C 1c}C G.O(b)}});1x.1a=(q(){E e;if(18.1C.2y){E f={0:1,1:4,2:2};e=q(a,b){C a.aa==f[b]}}1d if(18.1C.3A){e=q(a,b){3R(b){1B 0:C a.8a==1&&!a.d7;1B 1:C a.8a==1&&a.d7;6E:C 1e}}}1d{e=q(a,b){C a.8a?(a.8a===b+1):(a.aa===b)}}C{hJ:q(a){C e(a,0)},hK:q(a){C e(a,1)},hL:q(a){C e(a,2)},L:q(a){E b=1x.O(a).d8;C G.O(b.2w==6q.bZ?b.1S:b)},5K:q(a,b){E c=1x.L(a);if(!b)C c;E d=[c].1Q(c.9r());C 19.5K(d,b,0)},8b:q(a){C{x:a.d9||(a.hM+(Y.4B.4y||Y.2c.4y)),y:a.da||(a.hN+(Y.4B.4x||Y.2c.4x))}},hO:q(a){C 1x.8b(a).x},hP:q(a){C 1x.8b(a).y},8J:q(a){1x.O(a);a.db();a.dc();a.hQ=1b}}})();1x.O=(q(){E c=I.4Q(1x.1a).2D({},q(m,a){m[a]=1x.1a[a].4f();C m});if(18.1C.2y){I.O(c,{dc:q(){o.hR=1b},db:q(){o.hS=1e},1W:q(){C"[2T 1x]"}});C q(a){if(!a)C 1e;if(a.7Y)C a;a.7Y=18.2M;E b=1x.8b(a);I.O(a,{d8:a.hT,ae:1x.ae(a),d9:b.x,da:b.y});C I.O(a,c)}}1d{1x.1h=1x.1h||Y.6R("dd").4O;I.O(1x.1h,c);C 18.K}})();I.O(1x,(q(){E h=1x.6r;q af(a){if(a.ag)C a.ag[0];17.5t.id=17.5t.id||1;C a.ag=[++17.5t.id]}q ah(a){if(a&&a.1y(\':\'))C"de";C a}q 8c(a){C h[a]=h[a]||{}}q 8d(a,b){E c=8c(a);C c[b]=c[b]||[]}q df(b,d,e){E f=af(b);E c=8d(f,d);if(c.4m("8e").1y(e))C 1e;E g=q(a){if(!1x||!1x.O||(a.ai&&a.ai!=d))C 1e;1x.O(a);e.9n(b,a)};g.8e=e;c.1f(g);C g}q aj(b,d,e){E c=8d(b,d);C c.8Z(q(a){C a.8e==e})}q dg(a,b,d){E c=8c(a);if(!c[b])C 1e;c[b]=c[b].5C(aj(a,b,d))}q dh(){14(E a in h)14(E b in h[a])h[a][b]=1c}if(1l.7a){1l.7a("ct",dh)}C{4F:q(a,b,c){a=$(a);E d=ah(b);E e=df(a,b,c);if(!e)C a;if(a.8f){a.8f(d,e,1e)}1d{a.7a("5F"+d,e)}C a},5i:q(b,c,d){b=$(b);E e=af(b),2d=ah(c);if(!d&&c){8d(e,c).1j(q(a){b.5i(c,a.8e)});C b}1d if(!c){I.4Q(8c(e)).1j(q(a){b.5i(a)});C b}E f=aj(e,c,d);if(!f)C b;if(b.di){b.di(2d,f,1e)}1d{b.hU("5F"+2d,f)}dg(e,c,d);C b},5Y:q(a,b,c){a=$(a);if(a==Y&&Y.6R&&!a.dj)a=Y.4B;E d;if(Y.6R){d=Y.6R("dd");d.hV("de",1b,1b)}1d{d=Y.hW();d.dk="hX"}d.ai=b;d.hY=c||{};if(Y.6R){a.dj(d)}1d{a.hZ(d.dk,d)}C 1x.O(d)}}})());I.O(1x,1x.1a);G.5q({5Y:1x.5Y,4F:1x.4F,5i:1x.5i});I.O(Y,{5Y:G.1a.5Y.4f(),4F:G.1a.4F.4f(),5i:G.1a.5i.4f(),6S:1e});(q(){E a;q 6T(){if(Y.6S)C;if(a)1l.8K(a);Y.5Y("i0:6S");Y.6S=1b}if(Y.8f){if(18.1C.3A){a=1l.8H(q(){if(/6S|dl/.2m(Y.3F))6T()},0);1x.4F(1l,"8g",6T)}1d{Y.8f("i1",6T,1e)}}1d{Y.5L("<3P id=dm 4g 5d=//:><\\/3P>");$("dm").7s=q(){if(o.3F=="dl"){o.7s=1c;6T()}}}})();3C.4c=I.4c;E i2={3n:G.9o};G.1a.i3=G.1a.7I;E i4={i5:q(a,b){C G.2Y(a,{9q:b})},i6:q(a,b){C G.2Y(a,{1n:b})},i7:q(a,b){C G.2Y(a,{2e:b})},i8:q(a,b){C G.2Y(a,{7B:b})}};E $3o=W i9(\'"2A $3o" is ia, ib "C" ic\');E 8h={dn:1e,ak:q(){o.dp=1l.cJ||Y.4B.4y||Y.2c.4y||0;o.dq=1l.cK||Y.4B.4x||Y.2c.4x||0},ie:q(a,x,y){if(o.dn)C o.dr(a,x,y);o.6U=x;o.6V=y;o.2u=G.4s(a);C(y>=o.2u[1]&&y<o.2u[1]+a.59&&x>=o.2u[0]&&x<o.2u[0]+a.58)},dr:q(a,x,y){E b=G.9J(a);o.6U=x+b[0]-o.dp;o.6V=y+b[1]-o.dq;o.2u=G.4s(a);C(o.6V>=o.2u[1]&&o.6V<o.2u[1]+a.59&&o.6U>=o.2u[0]&&o.6U<o.2u[0]+a.58)},ig:q(a,b){if(!a)C 0;if(a==\'ih\')C((o.2u[1]+b.59)-o.6V)/b.59;if(a==\'ii\')C((o.2u[0]+b.58)-o.6U)/b.58},4s:G.1a.4s,6C:G.1a.6C,7P:q(a){8h.ak();C G.7P(a)},9I:q(a){8h.ak();C G.9I(a)},ij:G.1a.9J,43:G.1a.5O,ik:G.1a.6D,2l:q(a,b,c){c=c||{};C G.ch(b,a,c)}};if(!Y.8i)Y.8i=q(f){q al(a){C a.4W()?1c:"[6K(1Q(\' \', @6u, \' \'), \' "+a+" \')]"}f.8i=18.3B.7c?q(a,b){b=b.2s().3D();E c=/\\s/.2m(b)?$w(b).1V(al).1X(\'\'):al(b);C c?Y.9m(\'.//*\'+c,a):[]}:q(b,c){c=c.2s().3D();E d=[],6y=(/\\s/.2m(c)?$w(c):1c);if(!6y&&!c)C d;E e=$(b).3L(\'*\');c=\' \'+c+\' \';14(E i=0,1G,cn;1G=e[i];i++){if(1G.25&&(cn=\' \'+1G.25+\' \')&&(cn.1y(c)||(6y&&6y.8W(q(a){C!a.2s().4W()&&cn.1y(\' \'+a+\' \')}))))d.1f(G.O(1G))}C d};C q(a,b){C $(b||Y.2c).8i(a)}}(G.1a);G.7G=1A.1D();G.7G.1h={1H:q(a){o.L=$(a)},3l:q(b){o.L.25.2U(/\\s+/).2q(q(a){C a.U>0}).3l(b)},3X:q(a){o.L.25=a},am:q(a){if(o.1y(a))C;o.3X($A(o).1Q(a).1X(\' \'))},6t:q(a){if(!o.1y(a))C;o.3X($A(o).5C(a).1X(\' \'))},2s:q(){C $A(o).1X(\' \')}};I.O(G.7G.1h,2p);G.5q();E 6W={63:\'1.8.1\',ds:q(a){Y.5L(\'<3P 1z="3k/bG" 5d="\'+a+\'"><\\/3P>\')},an:\'1.6.0\',8g:q(){q ao(a){E r=a.2U(\'.\');C 44(r[0])*il+44(r[1])*68+44(r[2])}if((2B 18==\'3j\')||(2B G==\'3j\')||(2B G.1a==\'3j\')||(ao(18.63)<ao(6W.an)))2A("3P.io.ip iq ir 18 it iu >= "+6W.an);E d=/(iv|iw)ix[a-iy-9.5v-]*\\.js(\\?.*)?$/;$A(Y.3L("3P")).4l(q(s){C(s.5d&&s.5d.1q(d))}).1j(q(s){E b=s.5d.1K(d,\'\');E c=(s.5d.1q(/\\?.*8g=([a-z,]*)/)||[,\'\'])[1];c.2U(\',\').5C(\'\').1j(q(a){6W.ds(b+a+\'.js\')})})}};1F.1h.4G=q(){E a=\'#\';if(o.2C(0,4)==\'iz(\'){E b=o.2C(4,o.U-1).2U(\',\');E i=0;do{a+=44(b[i]).5D()}1E(++i<3)}1d{if(o.2C(0,1)==\'#\'){if(o.U==4)14(E i=1;i<4;i++)a+=(o.4j(i)+o.4j(i)).1R();if(o.U==7)a=o.1R()}}C(a.U==7?a:(17[0]||o))};G.ap=q(b){C $A($(b).29).6j(q(a){C(a.2w==3?a.5u:(a.dt()?G.ap(a):\'\'))}).5B().1X(\'\')};G.aq=q(b,c){C $A($(b).29).6j(q(a){C(a.2w==3?a.5u:((a.dt()&&!G.6z(a,c))?G.aq(a,c):\'\'))}).5B().1X(\'\')};G.du=q(a,b){a=$(a);a.1r({5j:(b/2Q)+\'em\'});if(18.1C.3A)1l.iA(0,0);C a};G.4b=q(a){C $(a).V.1J||\'\'};G.ar=q(a){21{a=$(a);E n=Y.8R(\' \');a.4X(n);a.5H(n)}28(e){}};E M={5Z:{2d:\'iB\',iC:\'iD cC iE L iF 4a iG, iH is iI 14 o 6X 3b iJ\'},3c:{dv:18.K,5k:q(a){C(-2G.8j(a*2G.8k)/2)+0.5},5A:q(a){C 1-a},dw:q(a){E a=((-2G.8j(a*2G.8k)/4)+0.75)+2G.iK()/4;C a>1?1:a},iL:q(a){C(-2G.8j(a*2G.8k*(9*a))/2)+0.5},dx:q(a,b){b=b||5;C(((a%(1/b))*b).2V()==0?((a*b*2)-(a*b*2).92()):1-((a*b*2)-(a*b*2).92()))},iM:q(a){C 1-(2G.8j(a*4.5*2G.8k)*2G.iN(-a*6))},3Z:q(a){C 0},dy:q(a){C 1}},at:{2h:1.0,dz:2Q,2K:1e,2F:0.0,3b:1.0,4e:0.0,3v:\'iO\'},iP:q(c){E d=\'1v:5a\';if(18.1C.2y)d+=\';5P:1\';c=$(c);$A(c.29).1j(q(b){if(b.2w==3){b.5u.2P().1j(q(a){c.6G(W G(\'iQ\',{V:d}).2a(a==\' \'?1F.bb(iR):a),b)});G.6t(b)}})},cs:q(c,d){E e;if(((2B c==\'2T\')||I.1T(c))&&(c.U))e=c;1d e=$(c).29;E f=I.O({dA:0.1,4e:0.0},17[2]||{});E g=f.4e;$A(e).1j(q(a,b){W d(a,I.O(f,{4e:b*f.dA+g}))})},au:{\'iS\':[\'dB\',\'dC\'],\'iT\':[\'dD\',\'dE\'],\'av\':[\'aw\',\'dF\']},9o:q(a,b){a=$(a);b=(b||\'av\').1R();E c=I.O({3v:{1v:\'6m\',ax:(a.id||\'8l\'),ay:1}},17[2]||{});M[a.7A()?M.au[b][1]:M.au[b][0]](a,c)}};M.at.2R=M.3c.5k;M.dG=1A.1D(2p,{1H:q(){o.1O=[];o.6Y=1c},3l:q(a){o.1O.3l(a)},am:q(a){E b=W 8G().dH();E c=I.22(a.J.3v)?a.J.3v:a.J.3v.1v;3R(c){1B\'iU\':o.1O.4l(q(e){C e.60==\'az\'}).1j(q(e){e.4H+=a.4I;e.4I+=a.4I});1u;1B\'8S-1Y\':b=o.1O.4m(\'4H\').5y()||b;1u;1B\'6m\':b=o.1O.4m(\'4I\').5y()||b;1u}a.4H+=b;a.4I+=b;if(!a.J.3v.ay||(o.1O.U<a.J.3v.ay))o.1O.1f(a);if(!o.6Y)o.6Y=8H(o.8m.1m(o),15)},6t:q(a){o.1O=o.1O.7m(q(e){C e==a});if(o.1O.U==0){8K(o.6Y);o.6Y=1c}},8m:q(){E a=W 8G().dH();14(E i=0,6g=o.1O.U;i<6g;i++)o.1O[i]&&o.1O[i].8m(a)}});M.8n={aA:$H(),3m:q(a){if(!I.22(a))C a;C o.aA.3m(a)||o.aA.3X(a,W M.dG())}};M.iV=M.8n.3m(\'8l\');M.2W=1A.1D({1v:1c,2H:q(c){q 6Z(a,b){C((a[b+\'8o\']?\'o.J.\'+b+\'8o(o);\':\'\')+(a[b]?\'o.J.\'+b+\'(o);\':\'\'))}if(c&&c.2R===1e)c.2R=M.3c.dv;o.J=I.O(I.O({},M.at),c||{});o.aB=0;o.60=\'az\';o.4H=o.J.4e*68;o.4I=o.4H+(o.J.2h*68);o.dI=o.J.3b-o.J.2F;o.dJ=o.4I-o.4H;o.dK=o.J.dz*o.J.2h;6e(\'o.70 = q(71){ \'+\'if (o.60=="az"){o.60="dL";\'+6Z(o.J,\'5l\')+(o.61?\'o.61();\':\'\')+6Z(o.J,\'8p\')+\'};if (o.60=="dL"){\'+\'71=o.J.2R(71)*\'+o.dI+\'+\'+o.J.2F+\';\'+\'o.1v=71;\'+6Z(o.J,\'iW\')+(o.2a?\'o.2a(71);\':\'\')+6Z(o.J,\'iX\')+\'}}\');o.4U(\'iY\');if(!o.J.2K)M.8n.3m(I.22(o.J.3v)?\'8l\':o.J.3v.ax).am(o)},8m:q(a){if(a>=o.4H){if(a>=o.4I){o.70(1.0);o.8q();o.4U(\'dM\');if(o.5m)o.5m();o.4U(\'dN\');C}E b=(a-o.4H)/o.dJ,aC=(b*o.dK).2V();if(aC>o.aB){o.70(b);o.aB=aC}}},8q:q(){if(!o.J.2K)M.8n.3m(I.22(o.J.3v)?\'8l\':o.J.3v.ax).6t(o);o.60=\'iZ\'},4U:q(a){if(o.J[a+\'8o\'])o.J[a+\'8o\'](o);if(o.J[a])o.J[a](o)},1W:q(){E a=$H();14(47 in o)if(!I.1T(o[47]))a.3X(47,o[47]);C\'#<M:\'+a.1W()+\',J:\'+$H(o.J).1W()+\'>\'}});M.62=1A.1D(M.2W,{1H:q(a){o.1O=a||[];o.2H(17[1])},2a:q(a){o.1O.67(\'70\',a)},5m:q(b){o.1O.1j(q(a){a.70(1.0);a.8q();a.4U(\'dM\');if(a.5m)a.5m(b);a.4U(\'dN\')})}});M.dO=1A.1D(M.2W,{1H:q(b,c,d){b=I.22(b)?$(b):b;E e=$A(17),1M=e.1Y(),J=e.U==5?e[3]:1c;o.1M=I.1T(1M)?1M.1m(b):I.1T(b[1M])?b[1M].1m(b):q(a){b[1M]=a};o.2H(I.O({2F:c,3b:d},J||{}))},2a:q(a){o.1M(a)}});M.1x=1A.1D(M.2W,{1H:q(){o.2H(I.O({2h:0},17[0]||{}))},2a:18.2M});M.4J=1A.1D(M.2W,{1H:q(a){o.L=$(a);if(!o.L)2A(M.5Z);if(18.1C.2y&&(!o.L.5Q.9M))o.L.1r({5P:1});E b=I.O({2F:o.L.6B()||0.0,3b:1.0},17[1]||{});o.2H(b)},2a:q(a){o.L.4t(a)}});M.3d=1A.1D(M.2W,{1H:q(a){o.L=$(a);if(!o.L)2A(M.5Z);E b=I.O({x:0,y:0,dP:\'5a\'},17[1]||{});o.2H(b)},61:q(){o.L.3G();o.72=2I(o.L.1p(\'1t\')||\'0\');o.73=2I(o.L.1p(\'1n\')||\'0\');if(o.J.dP==\'4u\'){o.J.x=o.J.x-o.72;o.J.y=o.J.y-o.73}},2a:q(a){o.L.1r({1t:(o.J.x*a+o.72).2V()+\'1L\',1n:(o.J.y*a+o.73).2V()+\'1L\'})}});M.j0=q(a,b,c){C W M.3d(a,I.O({x:c,y:b},17[3]||{}))};M.3e=1A.1D(M.2W,{1H:q(a,b){o.L=$(a);if(!o.L)2A(M.5Z);E c=I.O({3M:1b,74:1b,3N:1b,8r:1e,3O:\'aD\',5n:2Q.0,dQ:b},17[2]||{});o.2H(c)},61:q(){o.3f=o.J.3f||1e;o.dR=o.L.1p(\'1v\');o.aE={};[\'1n\',\'1t\',\'1k\',\'1o\',\'5j\'].1j(q(k){o.aE[k]=o.L.V[k]}.1m(o));o.73=o.L.4v;o.72=o.L.4w;E b=o.L.1p(\'j1-8Y\')||\'2Q%\';[\'em\',\'1L\',\'%\',\'dS\'].1j(q(a){if(b.3g(a)>0){o.5j=2I(b);o.dT=a}}.1m(o));o.dU=(o.J.dQ-o.J.5n)/2Q;o.3w=1c;if(o.J.3O==\'aD\')o.3w=[o.L.59,o.L.58];if(/^j2/.2m(o.J.3O))o.3w=[o.L.j3,o.L.j4];if(!o.3w)o.3w=[o.J.3O.76,o.J.3O.77]},2a:q(a){E b=(o.J.5n/2Q.0)+(o.dU*a);if(o.J.3N&&o.5j)o.L.1r({5j:o.5j*b+o.dT});o.dV(o.3w[0]*b,o.3w[1]*b)},5m:q(a){if(o.3f)o.L.1r(o.aE)},dV:q(a,b){E d={};if(o.J.3M)d.1k=b.2V()+\'1L\';if(o.J.74)d.1o=a.2V()+\'1L\';if(o.J.8r){E c=(a-o.3w[0])/2;E e=(b-o.3w[1])/2;if(o.dR==\'4u\'){if(o.J.74)d.1n=o.73-c+\'1L\';if(o.J.3M)d.1t=o.72-e+\'1L\'}1d{if(o.J.74)d.1n=-c+\'1L\';if(o.J.3M)d.1t=-e+\'1L\'}}o.L.1r(d)}});M.dW=1A.1D(M.2W,{1H:q(a){o.L=$(a);if(!o.L)2A(M.5Z);E b=I.O({dX:\'#j5\'},17[1]||{});o.2H(b)},61:q(){if(o.L.1p(\'3n\')==\'3Z\'){o.8q();C}o.aF={};if(!o.J.j6){o.aF.dY=o.L.1p(\'aG-j7\');o.L.1r({dY:\'3Z\'})}if(!o.J.aH)o.J.aH=o.L.1p(\'aG-4K\').4G(\'#dZ\');if(!o.J.aI)o.J.aI=o.L.1p(\'aG-4K\');o.aJ=$R(0,2).1V(q(i){C 44(o.J.dX.2C(i*2+1,i*2+3),16)}.1m(o));o.e0=$R(0,2).1V(q(i){C 44(o.J.aH.2C(i*2+1,i*2+3),16)-o.aJ[i]}.1m(o))},2a:q(a){o.L.1r({aK:$R(0,2).2D(\'#\',q(m,v,i){C m+((o.aJ[i]+(o.e0[i]*a)).2V().5D())}.1m(o))})},5m:q(){o.L.1r(I.O(o.aF,{aK:o.J.aI}))}});M.j8=q(a){E b=17[1]||{},aL=Y.81.9R(),8s=$(a).4s(),5y=Y.81.9R[0]-Y.81.9x();if(b.2u)8s[1]+=b.2u;C W M.dO(1c,aL.1n,8s[1]>5y?5y:8s[1],b,q(p){9A(aL.1t,p.2V())})};M.dF=q(b){b=$(b);E c=b.4b();E d=I.O({2F:b.6B()||1.0,3b:0.0,1P:q(a){if(a.J.3b!=0)C;a.L.2Z().1r({1J:c})}},17[1]||{});C W M.4J(b,d)};M.aw=q(b){b=$(b);E c=I.O({2F:(b.1p(\'3n\')==\'3Z\'?0.0:b.6B()||0.0),3b:1.0,1P:q(a){a.L.ar()},5l:q(a){a.L.4t(a.J.2F).55()}},17[1]||{});C W M.4J(b,c)};M.j9=q(b){b=$(b);E c={1J:b.4b(),1v:b.1p(\'1v\'),1n:b.V.1n,1t:b.V.1t,1k:b.V.1k,1o:b.V.1o};C W M.62([W M.3e(b,bK,{2K:1b,8r:1b,3N:1b,3f:1b}),W M.4J(b,{2K:1b,3b:0.0})],I.O({2h:1.0,ja:q(a){8h.7P(a.1O[0].L)},1P:q(a){a.1O[0].L.2Z().1r(c)}},17[1]||{}))};M.dE=q(b){b=$(b);b.3I();C W M.3e(b,0,I.O({3N:1e,3M:1e,3f:1b,1P:q(a){a.L.2Z().3J()}},17[1]||{}))};M.dD=q(b){b=$(b);E c=b.3q();C W M.3e(b,2Q,I.O({3N:1e,3M:1e,5n:0,3O:{76:c.1o,77:c.1k},3f:1b,8p:q(a){a.L.3I().1r({1o:\'aM\'}).55()},1P:q(a){a.L.3J()}},17[1]||{}))};M.jb=q(c){c=$(c);E d=c.4b();C W M.aw(c,I.O({2h:0.4,2F:0,2R:M.3c.dw,1P:q(b){W M.3e(b.L,1,{2h:0.3,8r:1b,3M:1e,3N:1e,3f:1b,5l:q(a){a.L.3G().3I()},1P:q(a){a.L.2Z().3J().3H().1r({1J:d})}})}},17[1]||{}))};M.jc=q(b){b=$(b);E c={1n:b.1p(\'1n\'),1t:b.1p(\'1t\'),1J:b.4b()};C W M.62([W M.3d(b,{x:0,y:2Q,2K:1b}),W M.4J(b,{2K:1b,3b:0.0})],I.O({2h:0.5,5l:q(a){a.1O[0].L.3G()},1P:q(a){a.1O[0].L.2Z().3H().1r(c)}},17[1]||{}))};M.jd=q(g){g=$(g);E h=I.O({e1:20,2h:0.5},17[1]||{});E i=2I(h.e1);E j=2I(h.2h)/10.0;E k={1n:g.1p(\'1n\'),1t:g.1p(\'1t\')};C W M.3d(g,{x:i,y:0,2h:j,1P:q(f){W M.3d(f.L,{x:-i*2,y:0,2h:j*2,1P:q(e){W M.3d(e.L,{x:i*2,y:0,2h:j*2,1P:q(d){W M.3d(d.L,{x:-i*2,y:0,2h:j*2,1P:q(c){W M.3d(c.L,{x:i*2,y:0,2h:j*2,1P:q(b){W M.3d(b.L,{x:-i,y:0,2h:j,1P:q(a){a.L.3H().1r(k)}})}})}})}})}})}})};M.dB=q(b){b=$(b).9z();E c=b.41().1p(\'2e\');E d=b.3q();C W M.3e(b,2Q,I.O({3N:1e,3M:1e,5n:1l.3z?0:1,3O:{76:d.1o,77:d.1k},3f:1b,8p:q(a){a.L.3G();a.L.41().3G();if(1l.3z)a.L.1r({1n:\'\'});a.L.3I().1r({1o:\'aM\'}).55()},e2:q(a){a.L.41().1r({2e:(a.3w[0]-a.L.7O)+\'1L\'})},1P:q(a){a.L.3J().3H();a.L.41().3H().1r({2e:c})}},17[1]||{}))};M.dC=q(b){b=$(b).9z();E c=b.41().1p(\'2e\');E d=b.3q();C W M.3e(b,1l.3z?0:1,I.O({3N:1e,3M:1e,3O:\'aD\',5n:2Q,3O:{76:d.1o,77:d.1k},3f:1b,8p:q(a){a.L.3G();a.L.41().3G();if(1l.3z)a.L.1r({1n:\'\'});a.L.3I().55()},e2:q(a){a.L.41().1r({2e:(a.3w[0]-a.L.7O)+\'1L\'})},1P:q(a){a.L.2Z().3J().3H();a.L.41().3H().1r({2e:c})}},17[1]||{}))};M.je=q(b){C W M.3e(b,1l.3z?1:0,{3f:1b,5l:q(a){a.L.3I()},1P:q(a){a.L.2Z().3J()}})};M.jf=q(c){c=$(c);E d=I.O({8t:\'8u\',8v:M.3c.5k,8w:M.3c.5k,8x:M.3c.dy},17[1]||{});E e={1n:c.V.1n,1t:c.V.1t,1o:c.V.1o,1k:c.V.1k,1J:c.4b()};E f=c.3q();E g,5o;E h,2L;3R(d.8t){1B\'1n-1t\':g=5o=h=2L=0;1u;1B\'1n-42\':g=f.1k;5o=2L=0;h=-f.1k;1u;1B\'2e-1t\':g=h=0;5o=f.1o;2L=-f.1o;1u;1B\'2e-42\':g=f.1k;5o=f.1o;h=-f.1k;2L=-f.1o;1u;1B\'8u\':g=f.1k/2;5o=f.1o/2;h=-f.1k/2;2L=-f.1o/2;1u}C W M.3d(c,{x:g,y:5o,2h:0.aZ,5l:q(a){a.L.2Z().3I().3G()},1P:q(b){W M.62([W M.4J(b.L,{2K:1b,3b:1.0,2F:0.0,2R:d.8x}),W M.3d(b.L,{x:h,y:2L,2K:1b,2R:d.8v}),W M.3e(b.L,2Q,{3O:{76:f.1o,77:f.1k},2K:1b,5n:1l.3z?1:0,2R:d.8w,3f:1b})],I.O({5l:q(a){a.1O[0].L.1r({1o:\'aM\'}).55()},1P:q(a){a.1O[0].L.3J().3H().1r(e)}},d))}})};M.jg=q(b){b=$(b);E c=I.O({8t:\'8u\',8v:M.3c.5k,8w:M.3c.5k,8x:M.3c.3Z},17[1]||{});E d={1n:b.V.1n,1t:b.V.1t,1o:b.V.1o,1k:b.V.1k,1J:b.4b()};E e=b.3q();E f,2L;3R(c.8t){1B\'1n-1t\':f=2L=0;1u;1B\'1n-42\':f=e.1k;2L=0;1u;1B\'2e-1t\':f=0;2L=e.1o;1u;1B\'2e-42\':f=e.1k;2L=e.1o;1u;1B\'8u\':f=e.1k/2;2L=e.1o/2;1u}C W M.62([W M.4J(b,{2K:1b,3b:0.0,2F:1.0,2R:c.8x}),W M.3e(b,1l.3z?1:0,{2K:1b,2R:c.8w,3f:1b}),W M.3d(b,{x:f,y:2L,2K:1b,2R:c.8v})],I.O({jh:q(a){a.1O[0].L.3G().3I()},1P:q(a){a.1O[0].L.2Z().3J().3H().1r(d)}},c))};M.ji=q(b){b=$(b);E c=17[1]||{};E d=b.4b();E e=c.2R||M.3c.5k;E f=q(a){C e(1-M.3c.dx(a,c.jj))};f.1m(e);C W M.4J(b,I.O(I.O({2h:2.0,2F:0,1P:q(a){a.L.1r({1J:d})}},c),{2R:f}))};M.jk=q(c){c=$(c);E d={1n:c.V.1n,1t:c.V.1t,1k:c.V.1k,1o:c.V.1o};c.3I();C W M.3e(c,5,I.O({3N:1e,3M:1e,1P:q(b){W M.3e(c,1,{3N:1e,74:1e,1P:q(a){a.L.2Z().3J().1r(d)}})}},17[1]||{}))};M.aN=1A.1D(M.2W,{1H:q(c){o.L=$(c);if(!o.L)2A(M.5Z);E d=I.O({V:{}},17[1]||{});if(!I.22(d.V))o.V=$H(d.V);1d{if(d.V.1y(\':\'))o.V=d.V.e3();1d{o.L.7H(d.V);o.V=$H(o.L.78());o.L.9y(d.V);E e=o.L.78();o.V=o.V.7m(q(a){C a.1i==e[a.4Z]});d.1P=q(b){b.L.7H(b.J.V);b.8y.1j(q(a){b.L.V[a.V]=\'\'})}}}o.2H(d)},61:q(){q 4G(a){if(!a||[\'jl(0, 0, 0, 0)\',\'jm\'].1y(a))a=\'#dZ\';a=a.4G();C $R(0,2).1V(q(i){C 44(a.2C(i*2+1,i*2+3),16)})}o.8y=o.V.1V(q(a){E b=a[0],1i=a[1],3x=1c;if(1i.4G(\'#e4\')!=\'#e4\'){1i=1i.4G();3x=\'4K\'}1d if(b==\'1J\'){1i=2I(1i);if(18.1C.2y&&(!o.L.5Q.9M))o.L.1r({5P:1})}1d if(G.e5.2m(1i)){E c=1i.1q(/^([\\+\\-]?[0-9\\.]+)(.*)$/);1i=2I(c[1]);3x=(c.U==3)?c[2]:1c}E d=o.L.1p(b);C{V:b.6f(),3y:3x==\'4K\'?4G(d):2I(d||0),5p:3x==\'4K\'?4G(1i):1i,3x:3x}}.1m(o)).7m(q(a){C((a.3y==a.5p)||(a.3x!=\'4K\'&&(91(a.3y)||91(a.5p))))})},2a:q(a){E b={},2r,i=o.8y.U;1E(i--)b[(2r=o.8y[i]).V]=2r.3x==\'4K\'?\'#\'+(2G.2V(2r.3y[0]+(2r.5p[0]-2r.3y[0])*a)).5D()+(2G.2V(2r.3y[1]+(2r.5p[1]-2r.3y[1])*a)).5D()+(2G.2V(2r.3y[2]+(2r.5p[2]-2r.3y[2])*a)).5D():(2r.3y+(2r.5p-2r.3y)*a).jn(3)+(2r.3x===1c?\'\':2r.3x);o.L.1r(b,1b)}});M.jo=1A.1D({1H:q(a){o.aO=[];o.J=17[1]||{};o.e6(a)},e6:q(c){c.1j(q(a){a=$H(a);E b=a.2k().2N();o.aO.1f($H({e7:a.4Q().2N(),6X:M.aN,J:{V:b}}))}.1m(o));C o},jp:q(){C W M.62(o.aO.1V(q(a){E b=a.3m(\'e7\'),6X=a.3m(\'6X\'),J=a.3m(\'J\');E c=[$(b)||$$(b)].5B();C c.1V(q(e){C W 6X(e,I.O({2K:1b},J))})}).5B(),o.J)}});G.8z=$w(\'aK jq jr jt \'+\'ju jv jw jx \'+\'jy jz jA jB \'+\'jC jD jE 2e jF 4K \'+\'5j jG 1o 1t jH jI \'+\'jJ jK jL jM jN jO \'+\'jP jQ jR 1J jS jT \'+\'jU jV jW jX jY \'+\'42 jZ 1n 1k k0 k1\');G.e5=/^(([\\+\\-]?[0-9\\.]+)(em|ex|1L|in|cm|k2|dS|k3|\\%))|0$/;1F.aP=Y.3h(\'2i\');1F.1h.e3=q(){E b,8A=$H();if(18.1C.3A)b=W G(\'2i\',{V:o}).V;1d{1F.aP.3W=\'<2i V="\'+o+\'"></2i>\';b=1F.aP.29[0].V}G.8z.1j(q(a){if(b[a])8A.3X(a,b[a])});if(18.1C.2y&&o.1y(\'1J\'))8A.3X(\'1J\',o.1q(/1J:\\s*((?:0|1)?(?:\\.\\d*)?)/)[1]);C 8A};if(Y.7K&&Y.7K.9C){G.78=q(c){E d=Y.7K.9C($(c),1c);C G.8z.2D({},q(a,b){a[b]=d[b];C a})}}1d{G.78=q(c){c=$(c);E d=c.5Q,79;79=G.8z.2D({},q(a,b){a[b]=d[b];C a});if(!79.1J)79.1J=c.6B();C 79}}M.1a={k4:q(a,b){a=$(a);W M.aN(a,I.O({V:b},17[2]||{}));C a},k5:q(a,b,c){a=$(a);E s=b.bd().6f(),2z=s.4j(0).2o()+s.4k(1);W M[2z](a,c);C a},k6:q(a,b){a=$(a);W M.dW(a,b);C a}};$w(\'k7 av k8 k9 ka kb kc kd ke \'+\'kf kg kh ki kj kk\').1j(q(c){M.1a[c]=q(a,b){a=$(a);M[c.4j(0).2o()+c.4k(1)](a,b);C a}});$w(\'4b ar du ap aq 78\').1j(q(f){M.1a[f]=G[f]});G.5q(M.1a);6W.8g();',62,1261,'||||||||||||||||||||||||this||function||||||||||||return||var||Element||Object|options||element|Effect|node|extend||||||length|style|new||document||||||for|||arguments|Prototype|Selector|Methods|true|null|else|false|push|results|prototype|value|each|width|window|bind|top|height|getStyle|match|setStyle|tagName|left|break|position|Form|Event|include|type|Class|case|Browser|create|while|String|child|initialize|Ajax|opacity|replace|px|method|nth|effects|afterFinishInternal|concat|toLowerCase|parentNode|isFunction|handlers|map|inspect|join|last|pseudos||try|isString||Array|className|_getEv||catch|childNodes|update|transport|body|name|bottom|of|xpath|duration|div|isUndefined|values|clone|test||toUpperCase|Enumerable|select|transform|toString|valueL|offset|evaluate|nodeType|args|IE|klass|throw|typeof|slice|inject|Template|from|Math|start|parseFloat|getValue|sync|moveY|emptyFunction|first|gsub|toArray|100|transition|toJSON|object|split|round|Base|parameters|insert|hide||toElement|disabled||||||||ByTag|to|Transitions|Move|Scale|restoreAfterFinish|indexOf|createElement|apply|undefined|text|_each|get|display|continue|_attributeTranslations|getDimensions|hasAttribute|checked|matcher|_countedByPrototype|queue|dims|unit|originalValue|opera|WebKit|BrowserFeatures|Hash|strip|request|readyState|makePositioned|undoPositioned|makeClipping|undoClipping|expression|getElementsByTagName|scaleX|scaleContent|scaleMode|script|super|switch|isElement|toHTML|RegExp|stripScripts|innerHTML|set|response|none||down|right|offsetParent|parseInt|||property|ps|le|not|getInlineOpacity|toQueryString|isArray|delay|methodize|defer|toPaddedString|source|charAt|substring|findAll|pluck|_object|onComplete|responseText|nextSibling|names|cumulativeOffset|setOpacity|absolute|offsetTop|offsetLeft|scrollTop|scrollLeft|tags|table|documentElement|descendant|sibling|lastValue|observe|parseColor|startOn|finishOn|Opacity|color|Opera|navigator|userAgent|__proto__|shift|keys|wrap|Abstract|isNumber|event|evalScripts|blank|appendChild|Number|key|Request|url|dispatchException|success|decay|show|adjacent|readAttribute|offsetWidth|offsetHeight|relative|_overflow|_returnOffset|src|_cache|formula|unmark|submit|stopObserving|fontSize|sinoidal|beforeSetup|finish|scaleFrom|initialMoveY|targetValue|addMethods|interpret|timer|callee|nodeValue|_|evalJSON|empty|max|filter|reverse|flatten|without|toColorPart|Responders|on|getHeader|removeChild|_insertionTranslations|firstChild|findElement|write|nextAncestor|static|getOffsetParent|zoom|currentStyle|action|tbody|Heading|attrPresence|attr|getElements|Serializers|fire|_elementDoesNotExistError|state|setup|Parallel|Version|ElementExtensions|HTMLElement|properties|invoke|1000|callback|frequency|registerCallback|onTimerEvent|index|eval|camelize|len|capitalize|expr|collect|criteria|toObject|end|responders|post|getStatus|Node|cache|writeAttribute|remove|class|nextSiblings|previousElementSibling|nextElementSibling|classNames|hasClassName|sourceIndex|getOpacity|positionedOffset|viewportOffset|default|_flag|insertBefore|patterns|following|laterSibling|contains|operators|pseudo|only|nodeClassName|serialize|EventObserver|createEvent|loaded|fireContentLoadedEvent|xcomp|ycomp|Scriptaculous|effect|interval|codeForEvent|render|pos|originalLeft|originalTop|scaleY||originalHeight|originalWidth|getStyles|styles|attachEvent|Gecko|XPath|SpecificElementExtensions|ScriptFragment|string|curry|currentlyExecuting|escapeHTML|toQueryParams|times|detect|reject|pair|dispatch|onCreate|asynchronous|application|onreadystatechange|status|headerJSON|isSameOrigin|port|location|container|insertion|visible|after|_getContentFromAnonymousElement|recursivelyCollect|findChildElements|read|ClassNames|addClassName|descendantOf|cssFloat|defaultView|auto|00001|hidden|clientHeight|absolutize|border|padding|title|_getAttr|tabIndex|TBODY|tr|Simulated|_extendedByPrototype|refresh|copy|viewport|findElements|token|count|mark|nodeIndex|hash|input|optionValue|which|pointer|getCacheForID|getWrappersForEventName|handler|addEventListener|load|Position|getElementsByClassName|cos|PI|global|loop|Queues|Internal|afterSetup|cancel|scaleFromCenter|elementOffsets|direction|center|moveTransition|scaleTransition|opacityTransition|transforms|CSS_PROPERTIES|styleRules|form|superclass|isHash|Function|_methodized|Date|setInterval|execute|stop|clearInterval|prepareReplacement|decodeURIComponent|succ|unfilterJSON|startsWith|lastIndexOf|createTextNode|with|toTemplateReplacements|slices|array|all|falses|size|find|_reverse|isNaN|floor|toQueryPair|delete|activeRequestCount|encoding|evalJS|_complete|Response|respondToReadyState|onStateChange|Content|Complete|protocol|domain|getResponseHeader|statusText|getAllResponseHeaders|failure|updater|elements|_getElementsByXPath|call|toggle|replaceChild|before|ancestors|previousSiblings|self|attributes|getAttribute|removeAttribute|getHeight|removeClassName|cleanWhitespace|scrollTo|float|getComputedStyle|cssText|styleFloat|visibility|_madePositioned|overflow|relativize|cumulativeScrollOffset|alpha|stripAlpha|hasLayout|has|TD|TableSection|HTML|getScrollOffsets|unique|tokens|assertions|matches|or|preceding|and|predicate|fragment|indexed|selector|reset|submitted|matchingInputs|disable|enable|textarea|focus|button|selected|TimedObserver|onElementEvent|relatedTarget|getEventID|_prototypeEventID|getDOMEventName|eventName|findWrapper|prepare|iter|add|REQUIRED_PROTOTYPE|convertVersionString|collectTextNodes|collectTextNodesIgnoreClass|forceRerendering||DefaultOptions|PAIRS|appear|Appear|scope|limit|idle|instances|currentFrame|frame|box|originalStyle|oldStyle|background|endcolor|restorecolor|_base|backgroundColor|scrollOffsets|0px|Morph|tracks|__parseStyleElement|KHTML|MobileSafari|Safari|JSONFilter|subclasses|valueOf|argumentNames|instanceof|timeout|01|Try|these|escape|PeriodicalExecuter|specialChar|sub|scan|stripTags|img|extractScripts|unescapeHTML|fromCharCode|charCodeAt|dasherize|isJSON|JSON|endsWith|interpolate|amp|lt|template|pattern|Pattern|exec|eachSlice|any|sortBy|clear|uniq|forEach|arrayLength|encodeURIComponent|ObjectRange|exclusive|getTransport|XMLHttpRequest|ActiveXObject|XMLHTTP|register|contentType|setRequestHeaders|overrideMimeType|javascript|xml|2005|requestHeaders|200|Events|force|evalResponse|onException|getStatusText|_getHeaderJSON|responseXML|_getResponseJSON|sanitizeJSON|Updater|updateContent|updateComplete|lastText|ELEMENT_NODE|TEXT_NODE|attribute|descendants|firstDescendant|immediateDescendants|previousSibling|next|identify|counter|setAttribute|getWidth|compareDocumentPosition|clientWidth|BODY|_originalLeft|_originalTop|_originalWidth|_originalHeight|clonePosition|setLeft|setTop|setWidth|setHeight|||htmlFor|_getAttrNode|getAttributeNode|href|multiple|onunload|IMG|outerHTML|TR|td|SELECT|THEAD|TFOOT|TH|specified|TEXTAREA|findDOMClass|Mod|TableCol|TableCell|client|pageXOffset|pageYOffset|compileMatcher|shouldUseXPath|compileXPathMatcher|root|local|enabled|even|odd|byClassName|getIndices|matchElements|serializeElements|findFirstElement|activate|checkbox|radio|inputSelector|selectOne|selectMany|single|Observer|registerFormCallbacks|metaKey|target|pageX|pageY|preventDefault|stopPropagation|HTMLEvents|dataavailable|createWrapper|destroyWrapper|destroyCache|removeEventListener|dispatchEvent|eventType|complete|__onDOMContentLoaded|includeScrollOffsets||deltaX|deltaY|withinIncludingScrolloffsets|require|hasChildNodes|setContentZoom|linear|flicker|pulse|full|fps|speed|SlideDown|SlideUp|BlindDown|BlindUp|Fade|ScopedQueue|getTime|fromToDelta|totalTime|totalFrames|running|beforeFinish|afterFinish|Tween|mode|scaleTo|elementPositioning|pt|fontSizeType|factor|setDimensions|Highlight|startcolor|backgroundImage|ffffff|_delta|distance|afterUpdateInternal|parseStyle|zzzzzz|CSS_LENGTH|addTracks|ids|AppleWebKit|Apple|Mobile|secure|constructor|RangeError|unknown|boolean|splice|number|bindAsEventListener|setTimeout|getUTCFullYear|getUTCMonth|||getUTCDate|getUTCHours|getUTCMinutes|getUTCSeconds|finally|truncate|data|underscore|x00||x1f|u00|Eaeflnr|SyntaxError|Badly|formed|parseQuery|grep|inGroupsOf|min|partition|sort|zip|pop|member|entries|every|some|NodeList|compact|reduce|intersect|isFinite|abs|ceil|unset|merge|Msxml2|Microsoft|unregister|www|urlencoded|UTF|_method|Konqueror|open|postBody|send|Requested|With|Accept|html|charset|Connection|close|setRequestHeader|300|Success|Failure|java|ecma|https|Uninitialized|Loading|Loaded|Interactive|responseJSON|getAllHeaders|json|PeriodicalUpdater|clearTimeout|getElementById|XPathResult|ORDERED_NODE_SNAPSHOT_TYPE|snapshotLength|snapshotItem|ATTRIBUTE_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|cloneNode|ownerDocument|createRange|selectNode|createContextualFragment|siblings|up|previous|anonymous_element_|toggleClassName|block|getElementsBySelector|childElements|fixed|normal|cellpadding|cellPadding|cellspacing|cellSpacing|colSpan|rowSpan|vAlign|dateTime|accessKey|encType|maxLength|readOnly|longDesc|readonly|onload|onclick|ondblclick||onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onfocus|onblur|onkeypress|onkeydown|onkeyup||onsubmit|onreset|onselect|onchange|rv|999999|TABLE|FORM|INPUT|OPTGROUP|OptGroup|TextArea|Paragraph|FIELDSET|FieldSet|UL|UList|OL|OList|DL|DList|DIR|Directory|H1|H2|H3|H4|H5|H6|Quote|INS|DEL|Anchor|Image|CAPTION|TableCaption|COL|COLGROUP|TableRow|FRAMESET|FrameSet|IFRAME|IFrame|inner|starts|translate|mod|dis|abled|selectorType|getInputs|focusFirstElement|setValue|present|blur|Field|one|selectedIndex|click|change|KEY_BACKSPACE|KEY_TAB|KEY_RETURN|KEY_ESC|KEY_LEFT|KEY_UP|KEY_RIGHT|KEY_DOWN|KEY_DELETE|KEY_HOME|KEY_END|KEY_PAGEUP|KEY_PAGEDOWN|KEY_INSERT|mouseover|fromElement|mouseout|isLeftClick|isMiddleClick|isRightClick|clientX|clientY|pointerX|pointerY|stopped|cancelBubble|returnValue|srcElement|detachEvent|initEvent|createEventObject|ondataavailable|memo|fireEvent|dom|DOMContentLoaded|Toggle|childOf|Insertion|Before|Top|Bottom|After|Error|deprecated|use|instead||within||overlap|vertical|horizontal|realOffset|page|100000|||aculo|us|requires|the||JavaScript|framework|proto|scripta|culous|z0|rgb|scrollBy|ElementDoesNotExistError|message|The|DOM|does|exist|but|required|operate|random|wobble|spring|exp|parallel|tagifyText|span|160|slide|blind|front|Queue|beforeUpdate|afterUpdate|beforeStart|finished|MoveBy|font|content|scrollHeight|scrollWidth|ffff99|keepBackgroundImage|image|ScrollTo|Puff|beforeSetupInternal|SwitchOff|DropOut|Shake|Squish|Grow|Shrink|beforeStartInternal|Pulsate|pulses|Fold|rgba|transparent|toFixed|Transform|play|backgroundPosition|borderBottomColor||borderBottomStyle|borderBottomWidth|borderLeftColor|borderLeftStyle|borderLeftWidth|borderRightColor|borderRightStyle|borderRightWidth|borderSpacing|borderTopColor|borderTopStyle|borderTopWidth|clip|fontWeight|letterSpacing|lineHeight|marginBottom|marginLeft|marginRight|marginTop|markerOffset|maxHeight|maxWidth|minHeight|minWidth|outlineColor|outlineOffset|outlineWidth|paddingBottom|paddingLeft|paddingRight|paddingTop|textIndent|wordSpacing|zIndex|mm|pc|morph|visualEffect|highlight|fade|grow|shrink|fold|blindUp|blindDown|slideUp|slideDown|pulsate|shake|puff|squish|switchOff|dropOut'.split('|'),0,{}))// lightwindow.js v2.0
//
// Copyright (c) 2007 stickmanlabs
// Author: Kevin P Miller | http://www.stickmanlabs.com
// 
// LightWindow is freely distributable under the terms of an MIT-style license.
//
// I don't care what you think about the file size...
//   Be a pro: 
//	    http://www.thinkvitamin.com/features/webapps/serving-javascript-fast
//      http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files
//

/*-----------------------------------------------------------------------------------------------*/

if(typeof Effect == 'undefined')
  throw("lightwindow.js requires including script.aculo.us' effects.js library!");

// This will stop image flickering in IE6 when elements with images are moved
try {
	document.execCommand("BackgroundImageCache", false, true);
} catch(e) {}

var lightwindow = Class.create();	
lightwindow.prototype = {
	//
	//	Setup Variables
	//
	element : null,
	contentToFetch : null,
	windowActive : false,
	dataEffects : [],
	dimensions : {
		cruft : null,
		container : null,
		viewport : {
			height : null,
			width : null,
			offsetTop : null,
			offsetLeft : null
		}
	},
	pagePosition : {
		x : 0,
		y : 0
	},
	pageDimensions : {
		width : null,
		height : null
	},
	preloadImage : [],
	preloadedImage : [],
	galleries : [],
	resizeTo : {
		height : null,
		heightPercent : null,
		width : null,
		widthPercent : null,
		fixedTop : null,
		fixedLeft : null
	},
	scrollbarOffset : 18,
	navigationObservers : {
		previous : null,
		next : null
	},
	containerChange : {
		height : 0,
		width : 0
	},
	activeGallery : false,
	galleryLocation : {
		current : 0,
		total : 0
	},
	//
	//	Initialize the lightwindow.
	//
	initialize : function(options) {
		this.options = Object.extend({
			resizeSpeed : 10,
			contentOffset : {
				height : 20,
				width : 20
			},
			dimensions : {
				image : {height : 250, width : 250},
				page : {height : 400, width : 400},
				inline : {height : 250, width : 250},
				media : {height : 250, width : 250},
				external : {height : 250, width : 250},
				titleHeight : 25
			},
			classNames : {	
				standard : 'lightwindow',
				action : 'lightwindow_action'
			},
			fileTypes : {
				page : ['asp', 'aspx', 'cgi', 'cfm', 'htm', 'html', 'pl', 'php4', 'php3', 'php', 'php5', 'phtml', 'rhtml', 'shtml', 'txt', 'vbs', 'rb'],
				media : ['aif', 'aiff', 'asf', 'avi', 'divx', 'm1v', 'm2a', 'm2v', 'm3u', 'mid', 'midi', 'mov', 'moov', 'movie', 'mp2', 'mp3', 'mpa', 'mpa', 'mpe', 'mpeg', 'mpg', 'mpg', 'mpga', 'pps', 'qt', 'rm', 'ram', 'swf', 'viv', 'vivo', 'wav'],
				image : ['bmp', 'gif', 'jpg', 'png', 'tiff']
			},
			mimeTypes : {
				avi : 'video/avi',
				aif : 'audio/aiff',
				aiff : 'audio/aiff',
				gif : 'image/gif',
				bmp : 'image/bmp',
				jpeg : 'image/jpeg',
				m1v : 'video/mpeg',
				m2a : 'audio/mpeg',
				m2v : 'video/mpeg',
				m3u : 'audio/x-mpequrl',
				mid : 'audio/x-midi',
				midi : 'audio/x-midi',
				mjpg : 'video/x-motion-jpeg',
				moov : 'video/quicktime',
				mov : 'video/quicktime',
				movie : 'video/x-sgi-movie',
				mp2 : 'audio/mpeg',
				mp3 : 'audio/mpeg3',
				mpa : 'audio/mpeg',
				mpa : 'video/mpeg',
				mpe : 'video/mpeg',
				mpeg : 'video/mpeg',
				mpg : 'audio/mpeg',
				mpg : 'video/mpeg',
				mpga : 'audio/mpeg',
				pdf : 'application/pdf',
				png : 'image/png',
				pps : 'application/mspowerpoint',
				qt : 'video/quicktime',
				ram : 'audio/x-pn-realaudio-plugin',
				rm : 'application/vnd.rn-realmedia',
				swf	: 'application/x-shockwave-flash',
				tiff : 'image/tiff',
				viv : 'video/vivo',
				vivo : 'video/vivo',
				wav : 'audio/wav',
				wmv : 'application/x-mplayer2'			
			},	
			classids : {
				mov : 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
				swf : 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
				wmv : 'clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6'
			},
			codebases : {
				mov : 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
				swf : 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0',
				wmv : 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715'
			},	
			viewportPadding : 10,
			EOLASFix : 'swf,wmv,fla,flv',
			overlay : {
				opacity : 0.7,
				image : '/images/lightwindow/black.png',
				presetImage : '/images/lightwindow/black-70.png'
			},
			skin : 	{
				main : 	'<div id="lightwindow_container" >'+
							'<div id="lightwindow_title_bar" >'+
								'<div id="lightwindow_title_bar_inner" >'+
									'<span id="lightwindow_title_bar_title"></span>'+
									'<a id="lightwindow_title_bar_close_link" >close</a>'+
								'</div>'+
							'</div>'+
							'<div id="lightwindow_stage" >'+
								'<div id="lightwindow_contents" >'+
								'</div>'+
								'<div id="lightwindow_navigation" >'+
									'<a href="#" id="lightwindow_previous" >'+
										'<span id="lightwindow_previous_title"></span>'+
									'</a>'+
									'<a href="#" id="lightwindow_next" >'+
										'<span id="lightwindow_next_title"></span>'+
									'</a>'+
									'<iframe name="lightwindow_navigation_shim" id="lightwindow_navigation_shim" src="javascript:false;" frameBorder="0" scrolling="no"></iframe>'+
								'</div>'+								
								'<div id="lightwindow_galleries">'+
									'<div id="lightwindow_galleries_tab_container" >'+
										'<a href="#" id="lightwindow_galleries_tab" >'+
											'<span id="lightwindow_galleries_tab_span" class="up" >Galleries</span>'+
										'</a>'+
									'</div>'+
									'<div id="lightwindow_galleries_list" >'+
									'</div>'+
								'</div>'+
							'</div>'+
							'<div id="lightwindow_data_slide" >'+
								'<div id="lightwindow_data_slide_inner" >'+
									'<div id="lightwindow_data_details" >'+
										'<div id="lightwindow_data_gallery_container" >'+
											'<span id="lightwindow_data_gallery_current"></span>'+
											' of '+
											'<span id="lightwindow_data_gallery_total"></span>'+
										'</div>'+
										'<div id="lightwindow_data_author_container" >'+
											'by <span id="lightwindow_data_author"></span>'+
										'</div>'+
									'</div>'+
									'<div id="lightwindow_data_caption" >'+
									'</div>'+
								'</div>'+
							'</div>'+
						'</div>',	
				loading : 	'<div id="lightwindow_loading" >'+
								'<img src="/images/lightwindow/ajax-loading.gif" alt="loading" />'+
								'<span>Loading or <a href="javascript: myLightWindow.deactivate();">Cancel</a></span>'+
								'<iframe name="lightwindow_loading_shim" id="lightwindow_loading_shim" src="javascript:false;" frameBorder="0" scrolling="no"></iframe>'+
							'</div>',
				iframe : 	'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'+
							'<html xmlns="http://www.w3.org/1999/xhtml">'+
								'<body>'+
									'{body_replace}'+
								'</body>'+
							'</html>',
				gallery : {
					top :		'<div class="lightwindow_galleries_list">'+
									'<h1>{gallery_title_replace}</h1>'+
									'<ul>',
					middle : 			'<li>'+
											'{gallery_link_replace}'+
										'</li>',
					bottom : 		'</ul>'+
								'</div>'
				}
			},
			formMethod : 'get',
			hideFlash : false,
			hideGalleryTab : false,
			showTitleBar : true,
			animationHandler : false,
			navigationHandler : false,
			transitionHandler : false,
			finalAnimationHandler : false,
			formHandler : false,
			galleryAnimationHandler : false,
			showGalleryCount : true
		}, options || {});
		this.duration = ((11-this.options.resizeSpeed)*0.15);
		this._setupLinks();
		this._getScroll();
		this._getPageDimensions();
		this._browserDimensions();
		this._addLightWindowMarkup(false);
		this._setupDimensions(); 
		this.buildGalleryList();
	},
	//
	//	Activate the lightwindow.
	//
	activate : function(e, link){		
		// Clear out the window Contents
		this._clearWindowContents(true);
			
		// Add back in out loading panel
		this._addLoadingWindowMarkup();

		// Setup the element properties
		this._setupWindowElements(link);
		
		// Setup everything
		this._getScroll();
		this._browserDimensions();
		this._setupDimensions();
		this._toggleTroubleElements('hidden', false);
		this._displayLightWindow('block', 'hidden');
		this._setStatus(true);
		this._monitorKeyboard(true);
		this._prepareIE(true);
		this._loadWindow();
	},
	//
	//	Turn off the window
	//
	deactivate : function(){
		// The window is not active
		this.windowActive = false;
		
		// There is no longer a gallery active
		this.activeGallery = false;
		if (!this.options.hideGalleryTab) {
			this._handleGalleryAnimation(false);
		}
		
		// Kill the animation
		this.animating = false;
		
		// Clear our element
		this.element = null;
		
		// hide the window.
		this._displayLightWindow('none', 'visible');
		
		// Clear out the window Contents
		this._clearWindowContents(false);
		
		// Stop all animation
		var queue = Effect.Queues.get('lightwindowAnimation').each(function(e){e.cancel();});
		
		// Undo the setup
		this._prepareIE(false);
		this._setupDimensions();
		this._toggleTroubleElements('visible', false);	
		this._monitorKeyboard(false);	
	},
	//
	//  Initialize specific window
	//
	createWindow : function(element, attributes) {
		this._processLink($(element));
	},
	//
	//  Open a Window from a hash of attributes
	//
	activateWindow : function(options) {
		this.element = Object.extend({
			href : null,
			title : null,
			author : null,
			caption : null,
			rel : null,
			top : null,
			left : null,
			type : null,
			showImages : null,
			height : null,
			width : null,
			loadingAnimation : null,
			iframeEmbed : null,
			form : null
		}, options || {});
		
		// Set the window type
		this.contentToFetch = this.element.href;
		this.windowType = this.element.type ? this.element.type : this._fileType(this.element.href);	
		
		// Clear out the window Contents
		this._clearWindowContents(true);
			
		// Add back in out loading panel
		this._addLoadingWindowMarkup();
		
		// Setup everything
		this._getScroll();
		this._browserDimensions();
		this._setupDimensions();
		this._toggleTroubleElements('hidden', false);
		this._displayLightWindow('block', 'hidden');
		this._setStatus(true);
		this._monitorKeyboard(true);
		this._prepareIE(true);
		this._loadWindow();
	},
	//
	//  Fire off our Form handler
	//
	submitForm : function(e) {
		if (this.options.formHandler) {
			this.options.formHandler(e);
		} else {
			this._defaultFormHandler(e);
		}
	},
	//
	//	Reload the window with another location
	//
	openWindow : function(element) {
		var element = $(element);

		// The window is active
		this.windowActive = true;
		
		// Clear out the window Contents
		this._clearWindowContents(true);
		
		// Add back in out loading panel
		this._addLoadingWindowMarkup();
		
		// Setup the element properties
		this._setupWindowElements(element);

		this._setStatus(true);
		this._handleTransition();
	},
	//
	//  Navigate the window
	//
	navigateWindow : function(direction) {
		this._handleNavigation(false);
		if (direction == 'previous') {
			this.openWindow(this.navigationObservers.previous);
		} else if (direction == 'next'){ 
			this.openWindow(this.navigationObservers.next);
		}
	},
	//
	//  Build the Gallery List and Load it
	//
	buildGalleryList : function() {
		var output = '';
		var galleryLink;
		for (i in this.galleries) {
			if (typeof this.galleries[i] == 'object') {
				output += (this.options.skin.gallery.top).replace('{gallery_title_replace}', unescape(i));
				for (j in this.galleries[i]) {
					if (typeof this.galleries[i][j] == 'object') {						
						galleryLink = '<a href="#" id="lightwindow_gallery_'+i+'_'+j+'" >'+unescape(j)+'</a>';
						output += (this.options.skin.gallery.middle).replace('{gallery_link_replace}', galleryLink);
					}
				}
				output += this.options.skin.gallery.bottom;
			}
		}
		new Insertion.Top('lightwindow_galleries_list', output);
		
		// Attach Events
		for (i in this.galleries) {
			if (typeof this.galleries[i] == 'object') {
				for (j in this.galleries[i]) {
					if (typeof this.galleries[i][j] == 'object') {
						Event.observe($('lightwindow_gallery_'+i+'_'+j), 'click', this.openWindow.bind(this, this.galleries[i][j][0]), false);
						$('lightwindow_gallery_'+i+'_'+j).onclick = function() {return false;};	
					}
				}
			}
		}
	},
	// 
	//  Set Links Up
	//
	_setupLinks : function() {
		var links = $$('.'+this.options.classNames.standard);
		links.each(function(link) {
			this._processLink(link);
		}.bind(this));	
	},
	//
	//  Process a Link
	//
	_processLink : function(link) {
		if ((this._fileType(link.getAttribute('href')) == 'image' || this._fileType(link.getAttribute('href')) == 'media')) {
			if (gallery = this._getGalleryInfo(link.rel)) {
				if (!this.galleries[gallery[0]]) {
					this.galleries[gallery[0]] = new Array();
				}
				if (!this.galleries[gallery[0]][gallery[1]]) {
					this.galleries[gallery[0]][gallery[1]] = new Array();
				}
				this.galleries[gallery[0]][gallery[1]].push(link);
			}
		}
		
		// Take care of our inline content
		var url = link.getAttribute('href');
		if (url.indexOf('?') > -1) {
			url = url.substring(0, url.indexOf('?'));
		}
		
		var container = url.substring(url.indexOf('#')+1);
		if($(container)) {
			$(container).setStyle({
				display : 'none'
			});
		}
		
		Event.observe(link, 'click', this.activate.bindAsEventListener(this, link), false);
		link.onclick = function() {return false;};		
	},
	//
	//	Setup our actions
	//
	_setupActions : function() {
		var links = $$('#lightwindow_container .'+this.options.classNames.action);
		links.each(function(link) {
			Event.observe(link, 'click', this[link.getAttribute('rel')].bindAsEventListener(this, link), false);
			link.onclick = function() {return false;};
		}.bind(this));
	},
	//
	//	Add the markup to the page.
	//
	_addLightWindowMarkup : function(rebuild) {
		var overlay = Element.extend(document.createElement('div'));
		overlay.setAttribute('id', 'lightwindow_overlay');		
		// FF Mac has a problem with putting Flash above a layer without a 100% opacity background, so we need to use a pre-made
		if (Prototype.Browser.Gecko) {
			overlay.setStyle({
				backgroundImage: 'url('+this.options.overlay.presetImage+')',
				backgroundRepeat: 'repeat',
				height: this.pageDimensions.height+'px'
			});			
		} else {
			overlay.setStyle({
				opacity: this.options.overlay.opacity,
				backgroundImage: 'url('+this.options.overlay.image+')',
				backgroundRepeat: 'repeat',
				height: this.pageDimensions.height+'px'
			});
		}
		
		var lw = document.createElement('div');
		lw.setAttribute('id', 'lightwindow');
		lw.innerHTML = this.options.skin.main;
		
		var body = document.getElementsByTagName('body')[0];
		body.appendChild(overlay);
		body.appendChild(lw);	
				
		if ($('lightwindow_title_bar_close_link')) {
			Event.observe('lightwindow_title_bar_close_link', 'click', this.deactivate.bindAsEventListener(this));
			$('lightwindow_title_bar_close_link').onclick = function() {return false;};
		}
			
		Event.observe($('lightwindow_previous'), 'click', this.navigateWindow.bind(this, 'previous'), false);
		$('lightwindow_previous').onclick = function() {return false;};		
		Event.observe($('lightwindow_next'), 'click', this.navigateWindow.bind(this, 'next'), false);
		$('lightwindow_next').onclick = function() {return false;};

		if (!this.options.hideGalleryTab) {
			Event.observe($('lightwindow_galleries_tab'), 'click', this._handleGalleryAnimation.bind(this, true), false);
			$('lightwindow_galleries_tab').onclick = function() {return false;};
		}
		
		// Because we use position absolute, kill the scroll Wheel on animations
		if (Prototype.Browser.IE) {
			Event.observe(document, 'mousewheel', this._stopScrolling.bindAsEventListener(this), false);
		} else {
			Event.observe(window, 'DOMMouseScroll', this._stopScrolling.bindAsEventListener(this), false);
		}
				
		Event.observe(overlay, 'click', this.deactivate.bindAsEventListener(this), false);
		overlay.onclick = function() {return false;};
	},
	//
	//  Add loading window markup
	//
	_addLoadingWindowMarkup : function() {
		$('lightwindow_contents').innerHTML += this.options.skin.loading;
	},
	//
	//  Setup the window elements
	//
	_setupWindowElements : function(link) {
		this.element = link;
		this.element.title = null ? '' : link.getAttribute('title');
		this.element.author = null ? '' : link.getAttribute('author');
		this.element.caption = null ? '' : link.getAttribute('caption');
		this.element.rel = null ? '' : link.getAttribute('rel');
		this.element.params = null ? '' : link.getAttribute('params');

		// Set the window type
		this.contentToFetch = this.element.href;
		this.windowType = this._getParameter('lightwindow_type') ? this._getParameter('lightwindow_type') : this._fileType(this.contentToFetch);	
	},
	//
	//  Clear the window contents out
	//
	_clearWindowContents : function(contents) {
		// If there is an iframe, its got to go
		if ($('lightwindow_iframe')) {
			Element.remove($('lightwindow_iframe'));
		}

		// Stop playing an object if its still around
		if ($('lightwindow_media_primary')) {
			try {
				$('lightwindow_media_primary').Stop();
			} catch(e) {}
			Element.remove($('lightwindow_media_primary'));
		}

		// Stop playing an object if its still around		
		if ($('lightwindow_media_secondary')) {
			try {
				$('lightwindow_media_secondary').Stop();
			} catch(e) {}
			Element.remove($('lightwindow_media_secondary'));
		}
		
		this.activeGallery = false;
		this._handleNavigation(this.activeGallery);
		
		if (contents) {
			// Empty the contents
			$('lightwindow_contents').innerHTML = '';
			
			// Reset the scroll bars
			$('lightwindow_contents').setStyle({
				overflow: 'hidden'
			});		
			
			if (!this.windowActive) {
				$('lightwindow_data_slide_inner').setStyle({
					display: 'none'
				});

				$('lightwindow_title_bar_title').innerHTML = '';
			}

			// Because of browser differences and to maintain flexible captions we need to reset this height at close
			$('lightwindow_data_slide').setStyle({
				height: 'auto'
			});
		}
		
		this.resizeTo.height = null;
		this.resizeTo.width = null;
	},
	//
	//	Set the status of our animation to keep things from getting clunky
	//
	_setStatus : function(status) {
		this.animating = status;
		if (status) {
			Element.show('lightwindow_loading');
		}
		if (!(/MSIE 6./i.test(navigator.userAgent))) {
			this._fixedWindow(status);
		}
	},
	//
	//  Make this window Fixed
	//
	_fixedWindow : function(status) {
		if (status) {
			if (this.windowActive) {
				this._getScroll();
				$('lightwindow').setStyle({
					position: 'absolute',
					top: parseFloat($('lightwindow').getStyle('top'))+this.pagePosition.y+'px',
					left: parseFloat($('lightwindow').getStyle('left'))+this.pagePosition.x+'px'
				});		
			} else {
				$('lightwindow').setStyle({
					position: 'absolute'
				});						
			}
		} else {
			if (this.windowActive) {
				this._getScroll();
				$('lightwindow').setStyle({
					position: 'fixed',
					top: parseFloat($('lightwindow').getStyle('top'))-this.pagePosition.y+'px',
					left: parseFloat($('lightwindow').getStyle('left'))-this.pagePosition.x+'px'
				});		
			} else {
				if ($('lightwindow_iframe')) {
					// Ideally here we would set a 50% value for top and left, but Safari rears it ugly head again and we need to do it by pixels
					this._browserDimensions();
				}
				$('lightwindow').setStyle({
					position: 'fixed',
					top: (parseFloat(this._getParameter('lightwindow_top')) ? parseFloat(this._getParameter('lightwindow_top'))+'px' : this.dimensions.viewport.height/2+'px'),
					left: (parseFloat(this._getParameter('lightwindow_left')) ? parseFloat(this._getParameter('lightwindow_left'))+'px' : this.dimensions.viewport.width/2+'px')
				});
			}
		}
	},
	//
	//	Prepare the window for IE.
	//
	_prepareIE : function(setup) {
		if (Prototype.Browser.IE) {
			var height, overflowX, overflowY;
			if (setup) { 
				var height = '100%';
			} else {
				var height = 'auto';
			}
			var body = document.getElementsByTagName('body')[0];
			var html = document.getElementsByTagName('html')[0];
			html.style.height = body.style.height = height;
		}
	},
	_stopScrolling : function(e) {
		if (this.animating) {
			if (e.preventDefault) {
				e.preventDefault();
			}
			e.returnValue = false;		
		}
	},
	//
	//	Get the scroll for the page.
	//
	_getScroll : function(){
      	if(typeof(window.pageYOffset) == 'number') {
        	this.pagePosition.x = window.pageXOffset;
        	this.pagePosition.y = window.pageYOffset;
      	} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
	       	this.pagePosition.x = document.body.scrollLeft;
        	this.pagePosition.y = document.body.scrollTop;
		} else if(document.documentElement) {
        	this.pagePosition.x = document.documentElement.scrollLeft;
        	this.pagePosition.y = document.documentElement.scrollTop;
      	}
	},
	//
	//	Reset the scroll.
	//
	_setScroll : function(x, y) {
		document.documentElement.scrollLeft = x; 
		document.documentElement.scrollTop = y; 
	},
	//
	//	Hide Selects from the page because of IE.
	//     We could use iframe shims instead here but why add all the extra markup for one browser when this is much easier and cleaner
	//
	_toggleTroubleElements : function(visibility, content){
		
		if (content) {
			var selects = $('lightwindow_contents').getElementsByTagName('select');
		} else {
			var selects = document.getElementsByTagName('select');
		}
		
		for(var i = 0; i < selects.length; i++) {
			selects[i].style.visibility = visibility;
		}
		
		if (!content) {
			if (this.options.hideFlash){
				var objects = document.getElementsByTagName('object');
				for (i = 0; i != objects.length; i++) {
					objects[i].style.visibility = visibility;
				}
				var embeds = document.getElementsByTagName('embed');
				for (i = 0; i != embeds.length; i++) {
					embeds[i].style.visibility = visibility;
				}
			}
			var iframes = document.getElementsByTagName('iframe');
			for (i = 0; i != iframes.length; i++) {
				iframes[i].style.visibility = visibility;
			}
		}
	},
	// 
	//  Get the actual page size
	//
	_getPageDimensions : function() {
		var xScroll, yScroll;
		if (window.innerHeight && window.scrollMaxY) {	
			xScroll = document.body.scrollWidth;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ 
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { 
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}

		var windowWidth, windowHeight;
		if (self.innerHeight) {	
			windowWidth = self.innerWidth;
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { 
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { 
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}	

		if(yScroll < windowHeight){
			this.pageDimensions.height = windowHeight;
		} else { 
			this.pageDimensions.height = yScroll;
		}

		if(xScroll < windowWidth){	
			this.pageDimensions.width = windowWidth;
		} else {
			this.pageDimensions.width = xScroll;
		}
	},
	//
	//	Display the lightWindow.
	//
	_displayLightWindow : function(display, visibility) {
		$('lightwindow_overlay').style.display = $('lightwindow').style.display = $('lightwindow_container').style.display = display;	
		$('lightwindow_overlay').style.visibility = $('lightwindow').style.visibility = $('lightwindow_container').style.visibility = visibility;
	},
	//
	//	Setup Dimensions of lightwindow.

	//
	_setupDimensions : function() {

		var originalHeight, originalWidth;
		switch (this.windowType) {
			case 'page' :
				originalHeight = this.options.dimensions.page.height;
				originalWidth = this.options.dimensions.page.width;
				break;

			case 'image' :
				originalHeight = this.options.dimensions.image.height;
				originalWidth = this.options.dimensions.image.width;
				break;
				
			case 'media' :
				originalHeight = this.options.dimensions.media.height;
				originalWidth = this.options.dimensions.media.width;
				break;
			
			case 'external' : 
				originalHeight = this.options.dimensions.external.height;
				originalWidth = this.options.dimensions.external.width;
				break;
				
			case 'inline' :
				originalHeight = this.options.dimensions.inline.height;
				originalWidth = this.options.dimensions.inline.width;
				break;
				
			default :
				originalHeight = this.options.dimensions.page.height;
				originalWidth = this.options.dimensions.page.width;
				break;
				
		}

		var offsetHeight = this._getParameter('lightwindow_top') ? parseFloat(this._getParameter('lightwindow_top'))+this.pagePosition.y : this.dimensions.viewport.height/2+this.pagePosition.y;
		var offsetWidth = this._getParameter('lightwindow_left') ? parseFloat(this._getParameter('lightwindow_left'))+this.pagePosition.x : this.dimensions.viewport.width/2+this.pagePosition.x;
		
		// So if a theme has say shadowed edges, they should be consistant and take care of in the contentOffset
		$('lightwindow').setStyle({
			top: offsetHeight+'px',
			left: offsetWidth+'px'
		});
		
		$('lightwindow_container').setStyle({
			height: originalHeight+'px',
			width: originalWidth+'px',
			left: -(originalWidth/2)+'px',
			top: -(originalHeight/2)+'px'
		});

		$('lightwindow_contents').setStyle({
			height: originalHeight+'px',
			width: originalWidth+'px'
		});
	},
	//
	//	Get the type of file.
	//
	_fileType : function(url) {
		var image = new RegExp("[^\.]\.("+this.options.fileTypes.image.join('|')+")\s*$", "i");
		if (image.test(url)) return 'image';
		if (url.indexOf('#') > -1 && (document.domain == this._getDomain(url))) return 'inline';		
		if (url.indexOf('?') > -1) url = url.substring(0, url.indexOf('?'));
		var type = 'unknown';
		var page = new RegExp("[^\.]\.("+this.options.fileTypes.page.join('|')+")\s*$", "i");
		var media = new RegExp("[^\.]\.("+this.options.fileTypes.media.join('|')+")\s*$", "i");
		if (document.domain != this._getDomain(url)) type = 'external';
	  	if (media.test(url)) type = 'media';
		if (type == 'external' || type == 'media') return type;
	  	if (page.test(url) || url.substr((url.length-1), url.length) == '/') type = 'page';
		return type;
	},
	//
	//  Get file Extension
	//
	_fileExtension : function(url) {
		if (url.indexOf('?') > -1) {
			url = url.substring(0, url.indexOf('?'));
		}
		var extenstion = '';
		for (var x = (url.length-1); x > -1; x--) {
			if (url.charAt(x) == '.') {
				return extenstion;
			}
			extenstion = url.charAt(x)+extenstion;
		}
	},
	//
	//	Monitor the keyboard while this lightwindow is up
	//
	_monitorKeyboard : function(status) {
		if (status) document.onkeydown = this._eventKeypress.bind(this); 
		else document.onkeydown = '';
	},
	//
	//  Perform keyboard actions
	//
	_eventKeypress : function(e) {
		if (e == null) {
			var keycode = event.keyCode;
		} else {
			var keycode = e.which;
		}
		
		switch (keycode) { 
			case 27: 
				this.deactivate(); 
				break;
			
			case 13:
				return;
				
			default:
				break;
		}
	
		// Gotta stop those quick fingers
		if (this.animating) {
			return false;
		}
		
		switch (String.fromCharCode(keycode).toLowerCase()) {
			case 'p':
				if (this.navigationObservers.previous) {
					this.navigateWindow('previous');
				}
				break;
				
			case 'n':
				if (this.navigationObservers.next) {
					this.navigateWindow('next');
				}
				break;
				
			default:
				break;
		}
	},
	//
	//	Get Gallery Information
	//
	_getGalleryInfo : function(rel) {
		if (!rel) return false;
		if (rel.indexOf('[') > -1) {
			return new Array(escape(rel.substring(0, rel.indexOf('['))), escape(rel.substring(rel.indexOf('[')+1, rel.indexOf(']'))));
		} else {
			return false;
		}
	},
	//
	//	Get the domain from a string.
	//
	_getDomain : function(url) {    
        var leadSlashes = url.indexOf('//');
        var domainStart = leadSlashes+2;
        var withoutResource = url.substring(domainStart, url.length);
        var nextSlash = withoutResource.indexOf('/');
        var domain = withoutResource.substring(0, nextSlash);
		if (domain.indexOf(':') > -1){
			var portColon = domain.indexOf(':');
			domain = domain.substring(0, portColon);
       	}
		return domain;
    },
	//
	//	Get the value from the params attribute string.
	//
	_getParameter : function(parameter, parameters) {
		if (!this.element) return false;
		if (parameter == 'lightwindow_top' && this.element.top) {
			return unescape(this.element.top);
		} else if (parameter == 'lightwindow_left' && this.element.left) {
			return unescape(this.element.left);
		} else if (parameter == 'lightwindow_type' && this.element.type) {
			return unescape(this.element.type);
		} else if (parameter == 'lightwindow_show_images' && this.element.showImages) {
			return unescape(this.element.showImages);
		} else if (parameter == 'lightwindow_height' && this.element.height) {
			return unescape(this.element.height);
		} else if (parameter == 'lightwindow_width' && this.element.width) {
			return unescape(this.element.width);
		} else if (parameter == 'lightwindow_loading_animation' && this.element.loadingAnimation) {
			return unescape(this.element.loadingAnimation);
		} else if (parameter == 'lightwindow_iframe_embed' && this.element.iframeEmbed) {
			return unescape(this.element.iframeEmbed);
		} else if (parameter == 'lightwindow_form' && this.element.form) {
			return unescape(this.element.form);
		} else {
			if (!parameters) {
				if (this.element.params) parameters = this.element.params;
				else return;
			}
			var value;
			var parameterArray = parameters.split(',');
			var compareString = parameter+'=';
			var compareLength = compareString.length;
			for (var i = 0; i < parameterArray.length; i++) {
				if (parameterArray[i].substr(0, compareLength) == compareString) {
					var currentParameter = parameterArray[i].split('=');
					value = currentParameter[1];
					break;
				}
			}
			if (!value) return false;
			else return unescape(value);
		}
	},
	//
	//  Get the Browser Viewport Dimensions
	//
	_browserDimensions : function() {
		if (Prototype.Browser.IE) {
            this.dimensions.viewport.height = document.documentElement.clientHeight;
            this.dimensions.viewport.width = document.documentElement.clientWidth;   
        } else {
            this.dimensions.viewport.height = window.innerHeight;
            this.dimensions.viewport.width = document.width || document.body.offsetWidth;
        }
	},
	//
	//  Get the scrollbar offset, I don't like this method but there is really no other way I can find.
	//
	_getScrollerWidth : function() {
	    var scrollDiv = Element.extend(document.createElement('div'));
		scrollDiv.setAttribute('id', 'lightwindow_scroll_div');
		scrollDiv.setStyle({
			position: 'absolute',
			top: '-10000px',
			left: '-10000px',
			width: '100px',
			height: '100px',
			overflow: 'hidden'
		});



	    var contentDiv = Element.extend(document.createElement('div'));
		contentDiv.setAttribute('id', 'lightwindow_content_scroll_div');
		contentDiv.setStyle({
			width: '100%',
			height: '200px'
		});

	    scrollDiv.appendChild(contentDiv);

		var body = document.getElementsByTagName('body')[0];
		body.appendChild(scrollDiv);

	    var noScroll = $('lightwindow_content_scroll_div').offsetWidth;
	    scrollDiv.style.overflow = 'auto';
    	var withScroll = $('lightwindow_content_scroll_div').offsetWidth;

	   	Element.remove($('lightwindow_scroll_div'));

	    this.scrollbarOffset = noScroll-withScroll;
	},
	

	//
	//  Add a param to an object dynamically created
	//
	_addParamToObject : function(name, value, object, id) {
		var param = document.createElement('param');
		param.setAttribute('value', value);
		param.setAttribute('name', name);
		if (id) {
			param.setAttribute('id', id);
		}
		object.appendChild(param);
		return object;
	},
	//
	//  Get the outer HTML of an object CROSS BROWSER
	//
	_outerHTML : function(object) {
 		if (Prototype.Browser.IE) {
			return object.outerHTML;
		} else {
			var clone = object.cloneNode(true);
			var cloneDiv = document.createElement('div');
			cloneDiv.appendChild(clone);
			return cloneDiv.innerHTML;
		}
	},
	//
	//  Convert an object to markup
	//
	_convertToMarkup : function(object, closeTag) {
		var markup = this._outerHTML(object).replace('</'+closeTag+'>', '');
		if (Prototype.Browser.IE) {
			for (var i = 0; i < object.childNodes.length; i++){
				markup += this._outerHTML(object.childNodes[i]);
			}
			markup += '</'+closeTag+'>';
		}
		return markup;
	},
	//
	//  Depending what type of browser it is we have to append the object differently... DAMN YOU IE!!
	//
	_appendObject : function(object, closeTag, appendTo) {
		if (Prototype.Browser.IE) {
			appendTo.innerHTML += this._convertToMarkup(object, closeTag);
			
			// Fix the Eolas activate thing but only for specified media, for example doing this to a quicktime film breaks it.
			if (this.options.EOLASFix.indexOf(this._fileType(this.element.href)) > -1) {
				var objectElements = document.getElementsByTagName('object');
				for (var i = 0; i < objectElements.length; i++) {
					if (objectElements[i].getAttribute("data")) objectElements[i].removeAttribute('data');
					objectElements[i].outerHTML = objectElements[i].outerHTML;
					objectElements[i].style.visibility = "visible";
				}
			}
		} else {
			appendTo.appendChild(object);	
		}	
	},
	//
	//  Add in iframe
	//
	_appendIframe : function(scroll) {
		var iframe = document.createElement('iframe');
		iframe.setAttribute('id', 'lightwindow_iframe');
		iframe.setAttribute('name', 'lightwindow_iframe');
		iframe.setAttribute('src', 'about:blank');
		iframe.setAttribute('height', '100%');
		iframe.setAttribute('width', '100%');
		iframe.setAttribute('frameborder', '0');
		iframe.setAttribute('marginwidth', '0');
		iframe.setAttribute('marginheight', '0');
		iframe.setAttribute('scrolling', scroll);	
		
		this._appendObject(iframe, 'iframe', $('lightwindow_contents'));
	},
	//
	//  Write Content to the iframe using the skin
	//
	_writeToIframe : function(content) {
		var template = this.options.skin.iframe;
		template = template.replace('{body_replace}', content); 
		if ($('lightwindow_iframe').contentWindow){
			$('lightwindow_iframe').contentWindow.document.open();
			$('lightwindow_iframe').contentWindow.document.write(template);
			$('lightwindow_iframe').contentWindow.document.close();
		} else {
			$('lightwindow_iframe').contentDocument.open();
			$('lightwindow_iframe').contentDocument.write(template);
			$('lightwindow_iframe').contentDocument.close();
		}
	},
	//
	//  Load the window Information
	//  
	_loadWindow : function() {
		switch (this.windowType) {
			case 'image' :

				var current = 0;
				var images = [];
				this.checkImage = [];
				this.resizeTo.height = this.resizeTo.width = 0;
				this.imageCount = this._getParameter('lightwindow_show_images') ? parseInt(this._getParameter('lightwindow_show_images')) : 1;

				// If there is a gallery get it
				if (gallery = this._getGalleryInfo(this.element.rel)) {	
					for (current = 0; current < this.galleries[gallery[0]][gallery[1]].length; current++) {
						if (this.contentToFetch.indexOf(this.galleries[gallery[0]][gallery[1]][current].href) > -1) {
							break;
						}
					}
					if (this.galleries[gallery[0]][gallery[1]][current-this.imageCount]) {
						this.navigationObservers.previous = this.galleries[gallery[0]][gallery[1]][current-this.imageCount];
					} else {
						this.navigationObservers.previous = false;
					}
					if (this.galleries[gallery[0]][gallery[1]][current+this.imageCount]) {
						this.navigationObservers.next = this.galleries[gallery[0]][gallery[1]][current+this.imageCount];
					} else {
						this.navigationObservers.next = false;
					}
					
					this.activeGallery = true;
				} else {
					this.navigationObservers.previous = false;
					this.navigationObservers.next = false;					

					this.activeGallery = false;
				}
				
				for (var i = current; i < (current+this.imageCount); i++) {
		
					if (gallery && this.galleries[gallery[0]][gallery[1]][i]) {
						this.contentToFetch = this.galleries[gallery[0]][gallery[1]][i].href;
						
						this.galleryLocation = {current: (i+1)/this.imageCount, total: (this.galleries[gallery[0]][gallery[1]].length)/this.imageCount};
											
						if (!this.galleries[gallery[0]][gallery[1]][i+this.imageCount]) {
							$('lightwindow_next').setStyle({
								display: 'none'
							});
						} else {
							$('lightwindow_next').setStyle({
								display: 'block'
							});
							$('lightwindow_next_title').innerHTML = this.galleries[gallery[0]][gallery[1]][i+this.imageCount].title;
						}
						
						if (!this.galleries[gallery[0]][gallery[1]][i-this.imageCount]) {
							$('lightwindow_previous').setStyle({
								display: 'none'
							});
						} else {
							$('lightwindow_previous').setStyle({
								display: 'block'
							});
							$('lightwindow_previous_title').innerHTML = this.galleries[gallery[0]][gallery[1]][i-this.imageCount].title;
						}
					}

					images[i] = document.createElement('img');
					images[i].setAttribute('id', 'lightwindow_image_'+i);
					images[i].setAttribute('border', '0');
					images[i].setAttribute('src', this.contentToFetch);
					$('lightwindow_contents').appendChild(images[i]);

					// We have to do this instead of .onload 
					this.checkImage[i] = new PeriodicalExecuter(function(i) {
						if (!(typeof $('lightwindow_image_'+i).naturalWidth != "undefined" && $('lightwindow_image_'+i).naturalWidth == 0)) {
	
							this.checkImage[i].stop();
	
							var imageHeight = $('lightwindow_image_'+i).getHeight();
							if (imageHeight > this.resizeTo.height) {
								this.resizeTo.height = imageHeight;
							}
							this.resizeTo.width += $('lightwindow_image_'+i).getWidth();
							this.imageCount--;
	
							$('lightwindow_image_'+i).setStyle({
								height: '100%'
							});
	
						 	if (this.imageCount == 0) {
								this._processWindow();
						 	}
						}
					
					}.bind(this, i), 1);			
				}


			break;
		
		case 'media' :			
		
			var current = 0;
			this.resizeTo.height = this.resizeTo.width = 0;

			// If there is a gallery get it
			if (gallery = this._getGalleryInfo(this.element.rel)) {	
				for (current = 0; current < this.galleries[gallery[0]][gallery[1]].length; current++) {
					if (this.contentToFetch.indexOf(this.galleries[gallery[0]][gallery[1]][current].href) > -1) {
						break;
					}
				}
				
				if (this.galleries[gallery[0]][gallery[1]][current-1]) {
					this.navigationObservers.previous = this.galleries[gallery[0]][gallery[1]][current-1];
				} else {
					this.navigationObservers.previous = false;
				}
				if (this.galleries[gallery[0]][gallery[1]][current+1]) {
					this.navigationObservers.next = this.galleries[gallery[0]][gallery[1]][current+1];
				} else {
					this.navigationObservers.next = false;
				}
		
				this.activeGallery = true;
			} else {
				this.navigationObservers.previous = false;
				this.navigationObservers.next = false;
				
				this.activeGallery = false;
			}
		

			if (gallery && this.galleries[gallery[0]][gallery[1]][current]) {
				this.contentToFetch = this.galleries[gallery[0]][gallery[1]][current].href;

				this.galleryLocation = {current: current+1, total: this.galleries[gallery[0]][gallery[1]].length};
				
				if (!this.galleries[gallery[0]][gallery[1]][current+1]) {
					$('lightwindow_next').setStyle({
						display: 'none'
					});
				} else {
					$('lightwindow_next').setStyle({
						display: 'block'
					});
					$('lightwindow_next_title').innerHTML = this.galleries[gallery[0]][gallery[1]][current+1].title;
				}
				
				if (!this.galleries[gallery[0]][gallery[1]][current-1]) {
					$('lightwindow_previous').setStyle({
						display: 'none'
					});
				} else {
					$('lightwindow_previous').setStyle({
						display: 'block'
					});
					$('lightwindow_previous_title').innerHTML = this.galleries[gallery[0]][gallery[1]][current-1].title;
				}
			}
			
			if (this._getParameter('lightwindow_iframe_embed')) {
				this.resizeTo.height = this.dimensions.viewport.height;
				this.resizeTo.width = this.dimensions.viewport.width;	
			} else {
				this.resizeTo.height = this._getParameter('lightwindow_height');
				this.resizeTo.width = this._getParameter('lightwindow_width');				
			}
			
			this._processWindow();
			
			break;

		case 'external' :		

			this._appendIframe('auto');

			this.resizeTo.height = this.dimensions.viewport.height;
			this.resizeTo.width = this.dimensions.viewport.width;
						
			this._processWindow();

			break;
				
		case 'page' :	
			
			var newAJAX = new Ajax.Request(
				this.contentToFetch, {
					method: 'get', 
					parameters: '', 
					onComplete: function(response) {
						$('lightwindow_contents').innerHTML += response.responseText;
						this.resizeTo.height = $('lightwindow_contents').scrollHeight+(this.options.contentOffset.height);
						this.resizeTo.width = $('lightwindow_contents').scrollWidth+(this.options.contentOffset.width);
						this._processWindow();
					}.bind(this)
				}
			);
			
			break;
			
		case 'inline' : 
		
			var content = this.contentToFetch;
			if (content.indexOf('?') > -1) {
				content = content.substring(0, content.indexOf('?'));
			}
			content = content.substring(content.indexOf('#')+1);
			
			new Insertion.Top($('lightwindow_contents'), $(content).innerHTML);
			
			this.resizeTo.height = $('lightwindow_contents').scrollHeight+(this.options.contentOffset.height);
			this.resizeTo.width = $('lightwindow_contents').scrollWidth+(this.options.contentOffset.width);
			
			this._toggleTroubleElements('hidden', true); 			
			this._processWindow();
			
			break;
			
		default : 
			throw("Page Type could not be determined, please amend this lightwindow URL "+this.contentToFetch);
			break;
		}
	},
	//
	//  Resize the Window to fit the viewport if necessary
	//
	_resizeWindowToFit : function() {
		if (this.resizeTo.height+this.dimensions.cruft.height > this.dimensions.viewport.height) {
			var heightRatio = this.resizeTo.height/this.resizeTo.width;
			this.resizeTo.height = this.dimensions.viewport.height-this.dimensions.cruft.height-(2*this.options.viewportPadding);
			// We only care about ratio's with this window type			
			if (this.windowType == 'image' || (this.windowType == 'media' && !this._getParameter('lightwindow_iframe_embed'))) {
				this.resizeTo.width = this.resizeTo.height/heightRatio;
				$('lightwindow_data_slide_inner').setStyle({
					width: this.resizeTo.width+'px'
				});			
			}
		} 
		if (this.resizeTo.width+this.dimensions.cruft.width > this.dimensions.viewport.width) {
			var widthRatio = this.resizeTo.width/this.resizeTo.height;
			this.resizeTo.width = this.dimensions.viewport.width-2*this.dimensions.cruft.width-(2*this.options.viewportPadding);
			// We only care about ratio's with this window type
			if (this.windowType == 'image' || (this.windowType == 'media' && !this._getParameter('lightwindow_iframe_embed'))) {
				this.resizeTo.height = this.resizeTo.width/widthRatio;
				$('lightwindow_data_slide_inner').setStyle({
					height: this.resizeTo.height+'px'
				});
			}
		}
			
	},
	//
	//  Set the Window to a preset size
	//
	_presetWindowSize : function() {
		if (this._getParameter('lightwindow_height')) {
			this.resizeTo.height = parseFloat(this._getParameter('lightwindow_height'));
		}
		if (this._getParameter('lightwindow_width')) {
			this.resizeTo.width = parseFloat(this._getParameter('lightwindow_width'));
		}
	},
	//
	//  Process the Window
	//
	_processWindow : function() {
		// Clean out our effects
		this.dimensions.dataEffects = [];

		// Set up the data-slide if we have caption information
		if (this.element.caption || this.element.author || (this.activeGallery && this.options.showGalleryCount)) {
			if (this.element.caption) {
				$('lightwindow_data_caption').innerHTML = this.element.caption;
				$('lightwindow_data_caption').setStyle({
					display: 'block'
				});
			} else {
				$('lightwindow_data_caption').setStyle({
					display: 'none'
				});				
			}
			if (this.element.author) {
				$('lightwindow_data_author').innerHTML = this.element.author;
				$('lightwindow_data_author_container').setStyle({
					display: 'block'
				});
			} else {
				$('lightwindow_data_author_container').setStyle({
					display: 'none'
				});				
			}
			if (this.activeGallery && this.options.showGalleryCount) {
				$('lightwindow_data_gallery_current').innerHTML = this.galleryLocation.current;
				$('lightwindow_data_gallery_total').innerHTML = this.galleryLocation.total;
				$('lightwindow_data_gallery_container').setStyle({
					display: 'block'
				});
			} else {
				$('lightwindow_data_gallery_container').setStyle({
					display: 'none'
				});				
			}

			$('lightwindow_data_slide_inner').setStyle({
				width: this.resizeTo.width+'px',
				height: 'auto',
				visibility: 'visible',
				display: 'block'
			});
			$('lightwindow_data_slide').setStyle({
				height: $('lightwindow_data_slide').getHeight()+'px',
				width: '1px',
				overflow: 'hidden',
				display: 'block'
			});
		} else {
			$('lightwindow_data_slide').setStyle({
				display: 'none',
				width: 'auto'
			});
			$('lightwindow_data_slide_inner').setStyle({
				display: 'none',
				visibility: 'hidden',
				width: this.resizeTo.width+'px',
				height: '0px'
			});
		}
				
		if (this.element.title != 'null') {		
			$('lightwindow_title_bar_title').innerHTML = this.element.title;
		} else {
			$('lightwindow_title_bar_title').innerHTML = '';
		}
		
		var originalContainerDimensions = {height: $('lightwindow_container').getHeight(), width: $('lightwindow_container').getWidth()};
		// Position the window
    	$('lightwindow_container').setStyle({
			height: 'auto',
			// We need to set the width to a px not auto as opera has problems with it
			width: $('lightwindow_container').getWidth()+this.options.contentOffset.width-(this.windowActive ? this.options.contentOffset.width : 0)+'px'
		});
		var newContainerDimensions = {height: $('lightwindow_container').getHeight(), width: $('lightwindow_container').getWidth()};
 		
		// We need to record the container dimension changes
		this.containerChange = {height: originalContainerDimensions.height-newContainerDimensions.height, width: originalContainerDimensions.width-newContainerDimensions.width};

		// Get out general dimensions
		this.dimensions.container = {height: $('lightwindow_container').getHeight(), width: $('lightwindow_container').getWidth()};
		this.dimensions.cruft = {height: this.dimensions.container.height-$('lightwindow_contents').getHeight()+this.options.contentOffset.height, width: this.dimensions.container.width-$('lightwindow_contents').getWidth()+this.options.contentOffset.width};
		
		// Set Sizes if we need too
		this._presetWindowSize();
		this._resizeWindowToFit(); // Even if the window is preset we still don't want it to go outside of the viewport

		if (!this.windowActive) {
			// Position the window
		   	$('lightwindow_container').setStyle({
				left: -(this.dimensions.container.width/2)+'px',
				top: -(this.dimensions.container.height/2)+'px'
			});
		}
	   	$('lightwindow_container').setStyle({
			height: this.dimensions.container.height+'px',
			width: this.dimensions.container.width+'px'
		});
		
		// We are ready, lets show this puppy off!
		this._displayLightWindow('block', 'visible');
		this._animateLightWindow();
	},
	//
	//  Fire off our animation handler
	//
	_animateLightWindow : function() {
		if (this.options.animationHandler) {
			this.options.animationHandler().bind(this);
		} else {
			this._defaultAnimationHandler();
		}
	},
	//
	//  Fire off our transition handler
	//
	_handleNavigation : function(display) {
		if (this.options.navigationHandler) {
			this.options.navigationHandler().bind(this, display);
		} else {
			this._defaultDisplayNavigation(display);
		}
	},
	//
	//  Fire off our transition handler
	//
	_handleTransition : function() {
		if (this.options.transitionHandler) {
			this.options.transitionHandler().bind(this);
		} else {
			this._defaultTransitionHandler();
		}
	},
	//
	//  Handle the finish of the window animation
	// 
	_handleFinalWindowAnimation : function(delay) {
		if (this.options.finalAnimationHandler) {
			this.options.finalAnimationHandler().bind(this, delay);
		} else {
			this._defaultfinalWindowAnimationHandler(delay);
		}		
	},
	//
	//  Handle the gallery Animation
	// 
	_handleGalleryAnimation : function(list) {
		if (this.options.galleryAnimationHandler) {
			this.options.galleryAnimationHandler().bind(this, list);
		} else {
			this._defaultGalleryAnimationHandler(list);
		}		
	},
	//
	//  Display the navigation 
	//
	_defaultDisplayNavigation : function(display) {
		if (display) {
			$('lightwindow_navigation').setStyle({
				display: 'block',
				height: $('lightwindow_contents').getHeight()+'px',
				width: '100%',
				marginTop: this.options.dimensions.titleHeight+'px'
			});			
		} else {
			$('lightwindow_navigation').setStyle({
				display: 'none',
				height: 'auto',
				width: 'auto'
			});			
		}
	},
	//
	//  This is the default animation handler for LightWindow
	//
	_defaultAnimationHandler : function() {	
		// Now that we have figures out the cruft lets make the caption go away and add its effects
		if (this.element.caption || this.element.author || (this.activeGallery && this.options.showGalleryCount)) {
			$('lightwindow_data_slide').setStyle({
				display: 'none',
				width: 'auto'
			});
			this.dimensions.dataEffects.push(
				new Effect.SlideDown('lightwindow_data_slide', {sync: true}),
				new Effect.Appear('lightwindow_data_slide', {sync: true, from: 0.0, to: 1.0})
			);
		}

		// Set up the Title if we have one
		$('lightwindow_title_bar_inner').setStyle({
			height: '0px',
			marginTop: this.options.dimensions.titleHeight+'px'
		});
		
		// We always want the title bar as well
		this.dimensions.dataEffects.push(
			new Effect.Morph('lightwindow_title_bar_inner', {sync: true, style: {height: this.options.dimensions.titleHeight+'px', marginTop: '0px'}}),
		 	new Effect.Appear('lightwindow_title_bar_inner', {sync: true, from: 0.0, to: 1.0})
		);		
		
		if (!this.options.hideGalleryTab) {
			this._handleGalleryAnimation(false);
			if ($('lightwindow_galleries_tab_container').getHeight() == 0) {
				this.dimensions.dataEffects.push(
					new Effect.Morph('lightwindow_galleries_tab_container', {sync: true, style: {height: '20px', marginTop: '0px'}})
				);
				$('lightwindow_galleries').setStyle({
					width: '0px'
				});
			}
		}
		
		var resized = false;
		var ratio = this.dimensions.container.width-$('lightwindow_contents').getWidth()+this.resizeTo.width+this.options.contentOffset.width;
		if (ratio != $('lightwindow_container').getWidth()) {
			new Effect.Parallel([
					new Effect.Scale('lightwindow_contents', 100*(this.resizeTo.width/$('lightwindow_contents').getWidth()), {scaleFrom: 100*($('lightwindow_contents').getWidth()/($('lightwindow_contents').getWidth()+(this.options.contentOffset.width))), sync: true,  scaleY: false, scaleContent: false}),
					new Effect.Scale('lightwindow_container', 100*(ratio/(this.dimensions.container.width)), {sync: true, scaleY: false, scaleFromCenter: true, scaleContent: false})
				], {
					duration: this.duration, 
					delay: 0.25,
					queue: {position: 'end', scope: 'lightwindowAnimation'}
				}
			);		
		}
		
		ratio = this.dimensions.container.height-$('lightwindow_contents').getHeight()+this.resizeTo.height+this.options.contentOffset.height;
		if (ratio != $('lightwindow_container').getHeight()) {
			new Effect.Parallel([
					new Effect.Scale('lightwindow_contents', 100*(this.resizeTo.height/$('lightwindow_contents').getHeight()), {scaleFrom: 100*($('lightwindow_contents').getHeight()/($('lightwindow_contents').getHeight()+(this.options.contentOffset.height))), sync: true, scaleX: false, scaleContent: false}),
					new Effect.Scale('lightwindow_container', 100*(ratio/(this.dimensions.container.height)), {sync: true, scaleX: false, scaleFromCenter: true, scaleContent: false})
				], {
					duration: this.duration, 
					afterFinish: function() {				
						if (this.dimensions.dataEffects.length > 0) {
							if (!this.options.hideGalleryTab) {
								$('lightwindow_galleries').setStyle({
									width: this.resizeTo.width+'px'
								});
							}
							new Effect.Parallel(this.dimensions.dataEffects, {
									duration: this.duration,
									afterFinish: function() {
										this._finishWindow();
									}.bind(this),
									queue: {position: 'end', scope: 'lightwindowAnimation'} 
								}
							);
						}
					}.bind(this), 
					queue: {position: 'end', scope: 'lightwindowAnimation'} 
				}
			);
			resized = true;
		}
		
		// We need to do our data effect since there was no resizing
		if (!resized && this.dimensions.dataEffects.length > 0) {	
			new Effect.Parallel(this.dimensions.dataEffects, {
					duration: this.duration,
					beforeStart: function() {
						if (!this.options.hideGalleryTab) {
							$('lightwindow_galleries').setStyle({
								width: this.resizeTo.width+'px'
							});
						}
						if (this.containerChange.height != 0 || this.containerChange.width != 0) {
							new Effect.MoveBy('lightwindow_container', this.containerChange.height, this.containerChange.width, {transition: Effect.Transitions.sinoidal});
						}
					}.bind(this),			
					afterFinish: function() {
						this._finishWindow();
					}.bind(this),
					queue: {position: 'end', scope: 'lightwindowAnimation'} 
				}
			);
		}			
		
	},
	//
	//  Finish up Window Animation
	//
	_defaultfinalWindowAnimationHandler : function(delay) {
		if (this.windowType == 'media' || this._getParameter('lightwindow_loading_animation')) {	
			// Because of major flickering with the overlay we just hide it in this case
			Element.hide('lightwindow_loading');
			this._handleNavigation(this.activeGallery);
			this._setStatus(false);
		} else {
			Effect.Fade('lightwindow_loading', {
				duration: 0.75,
				delay: 1.0, 
				afterFinish: function() {
					// Just in case we need some scroll goodness (this also avoids the swiss cheese effect)
					if (this.windowType != 'image' && this.windowType != 'media' && this.windowType != 'external') {
						$('lightwindow_contents').setStyle({
							overflow: 'auto'
						});
					}
					this._handleNavigation(this.activeGallery);
					this._defaultGalleryAnimationHandler();
					this._setStatus(false);
				}.bind(this),
				queue: {position: 'end', scope: 'lightwindowAnimation'}
			});
		}
	},
	//
	//  Handle the gallery Animation
	//
	_defaultGalleryAnimationHandler : function(list) {
		if (this.activeGallery) {
			$('lightwindow_galleries').setStyle({
				display: 'block',
				marginBottom: $('lightwindow_data_slide').getHeight()+this.options.contentOffset.height/2+'px'
			});
			$('lightwindow_navigation').setStyle({
				height: $('lightwindow_contents').getHeight()-20+'px'
			});
		} else {
			$('lightwindow_galleries').setStyle({
				display: 'none'
			});	
			$('lightwindow_galleries_tab_container').setStyle({
				height: '0px',
				marginTop: '20px'
			});
			$('lightwindow_galleries_list').setStyle({
				height: '0px'
			});
			return false;
		}
		
		if (list) {
			if ($('lightwindow_galleries_list').getHeight() == 0) {
				var height = $('lightwindow_contents').getHeight()*0.80;
				$('lightwindow_galleries_tab_span').className = 'down';
			} else {
				var height = 0;
				$('lightwindow_galleries_tab_span').className = 'up';
			}

			new Effect.Morph('lightwindow_galleries_list', {
				duration: this.duration,
				transition: Effect.Transitions.sinoidal,
				style: {height: height+'px'},
				beforeStart: function() {
					$('lightwindow_galleries_list').setStyle({
						overflow: 'hidden'
					});					
				},
				afterFinish: function() {
					$('lightwindow_galleries_list').setStyle({
						overflow: 'auto'
					});
				},
				queue: {position: 'end', scope: 'lightwindowAnimation'}
			});	
		}
		
		
	},
	//
	//  Default Transition Handler
	//
	_defaultTransitionHandler : function() {
		// Clean out our effects
		this.dimensions.dataEffects = [];

		// Now that we have figures out the cruft lets make the caption go away and add its effects
		if ($('lightwindow_data_slide').getStyle('display') != 'none') {
			this.dimensions.dataEffects.push(
				new Effect.SlideUp('lightwindow_data_slide', {sync: true}),
				new Effect.Fade('lightwindow_data_slide', {sync: true, from: 1.0, to: 0.0})
			);
		}
		
		if (!this.options.hideGalleryTab) {
			if ($('lightwindow_galleries').getHeight() != 0 && !this.options.hideGalleryTab) {
				this.dimensions.dataEffects.push(
					new Effect.Morph('lightwindow_galleries_tab_container', {sync: true, style: {height: '0px', marginTop: '20px'}})
				);
			}
			
			if ($('lightwindow_galleries_list').getHeight() != 0) {
				$('lightwindow_galleries_tab_span').className = 'up';
				this.dimensions.dataEffects.push(
					new Effect.Morph('lightwindow_galleries_list', {
						sync: true, 
						style: {height: '0px'},
						transition: Effect.Transitions.sinoidal,
						beforeStart: function() {
							$('lightwindow_galleries_list').setStyle({
								overflow: 'hidden'
							});					
						},
						afterFinish: function() {
							$('lightwindow_galleries_list').setStyle({
								overflow: 'auto'
							});
						}
					})
				);
			}
		}
		
		// We always want the title bar as well
		this.dimensions.dataEffects.push(
			new Effect.Morph('lightwindow_title_bar_inner', {sync: true, style: {height: '0px', marginTop: this.options.dimensions.titleHeight+'px'}}),
		 	new Effect.Fade('lightwindow_title_bar_inner', {sync: true, from: 1.0, to: 0.0})
		);

		new Effect.Parallel(this.dimensions.dataEffects, {
				duration: this.duration,
				afterFinish: function() {
					this._loadWindow();
				}.bind(this),
				queue: {position: 'end', scope: 'lightwindowAnimation'} 
			}
		);	
	},
	//
	//	Default Form handler for LightWindow
	//
	_defaultFormHandler : function(e) {
		var element = Event.element(e).parentNode;
		var parameterString = Form.serialize(this._getParameter('lightwindow_form', element.getAttribute('params')));
		if (this.options.formMethod == 'post') {
			var newAJAX = new Ajax.Request(element.href, { 
				method: 'post', 
				postBody: parameterString, 
				onComplete: this.openWindow.bind(this, element)
			});
		} else if (this.options.formMethod == 'get') {
			var newAJAX = new Ajax.Request(element.href, { 
				method: 'get', 
				parameters: parameterString, 
				onComplete: this.openWindow.bind(this, element)
			});
		}
	},
	// 
	//  Wrap everything up
	//
	_finishWindow : function() {
		if (this.windowType == 'external') {
			// We set the externals source here because it allows for a much smoother animation
			$('lightwindow_iframe').setAttribute('src', this.element.href);
			this._handleFinalWindowAnimation(1);	
		} else if (this.windowType == 'media') {

			var outerObject = document.createElement('object');
			outerObject.setAttribute('classid', this.options.classids[this._fileExtension(this.contentToFetch)]);
			outerObject.setAttribute('codebase', this.options.codebases[this._fileExtension(this.contentToFetch)]);
			outerObject.setAttribute('id', 'lightwindow_media_primary');
			outerObject.setAttribute('name', 'lightwindow_media_primary');
			outerObject.setAttribute('width', this.resizeTo.width);
			outerObject.setAttribute('height', this.resizeTo.height);
			outerObject = this._addParamToObject('movie', this.contentToFetch, outerObject);
			outerObject = this._addParamToObject('src', this.contentToFetch, outerObject);
			outerObject = this._addParamToObject('controller', 'true', outerObject);
			outerObject = this._addParamToObject('wmode', 'transparent', outerObject);
			outerObject = this._addParamToObject('cache', 'false', outerObject);
			outerObject = this._addParamToObject('quality', 'high', outerObject);

			if (!Prototype.Browser.IE) {
				var innerObject = document.createElement('object');
				innerObject.setAttribute('type', this.options.mimeTypes[this._fileExtension(this.contentToFetch)]);
				innerObject.setAttribute('data', this.contentToFetch);
				innerObject.setAttribute('id', 'lightwindow_media_secondary');
				innerObject.setAttribute('name', 'lightwindow_media_secondary');
				innerObject.setAttribute('width', this.resizeTo.width);
				innerObject.setAttribute('height', this.resizeTo.height);
				innerObject = this._addParamToObject('controller', 'true', innerObject);
				innerObject = this._addParamToObject('wmode', 'transparent', innerObject);
				innerObject = this._addParamToObject('cache', 'false', innerObject);
				innerObject = this._addParamToObject('quality', 'high', innerObject);
			
				outerObject.appendChild(innerObject);
			}	
			
			if (this._getParameter('lightwindow_iframe_embed')) {
				this._appendIframe('no');
				this._writeToIframe(this._convertToMarkup(outerObject, 'object'));
			} else {
				this._appendObject(outerObject, 'object', $('lightwindow_contents'));
			}

			this._handleFinalWindowAnimation(0);
		} else {
			this._handleFinalWindowAnimation(0);
		}

		// Initialize any actions
		this._setupActions();
	}
}

/*-----------------------------------------------------------------------------------------------*/

Event.observe(window, 'load', lightwindowInit, false);

//
//	Set up all of our links
//
var myLightWindow = null;
function lightwindowInit() {
	myLightWindow = new lightwindow();
	}