[Jifty-commit] r861 - in jifty/trunk: share/web/static/js/ie7

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Apr 14 10:39:01 EDT 2006


Author: trs
Date: Fri Apr 14 10:38:57 2006
New Revision: 861

Removed:
   jifty/trunk/share/web/static/js/ie7/README.txt
   jifty/trunk/share/web/static/js/ie7/blank.gif
   jifty/trunk/share/web/static/js/ie7/ie7-server.css
   jifty/trunk/share/web/static/js/ie7/ie7.gif
   jifty/trunk/share/web/static/js/ie7/test-trans.png
   jifty/trunk/share/web/static/js/ie7/test.html
Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/share/web/static/js/ie7/ie7-content.htc
   jifty/trunk/share/web/static/js/ie7/ie7-core.js
   jifty/trunk/share/web/static/js/ie7/ie7-css-strict.js
   jifty/trunk/share/web/static/js/ie7/ie7-css2-selectors.js
   jifty/trunk/share/web/static/js/ie7/ie7-css3-selectors.js
   jifty/trunk/share/web/static/js/ie7/ie7-dhtml.js
   jifty/trunk/share/web/static/js/ie7/ie7-dynamic-attributes.js
   jifty/trunk/share/web/static/js/ie7/ie7-fixed.js
   jifty/trunk/share/web/static/js/ie7/ie7-graphics.js
   jifty/trunk/share/web/static/js/ie7/ie7-html4.js
   jifty/trunk/share/web/static/js/ie7/ie7-ie5.js
   jifty/trunk/share/web/static/js/ie7/ie7-layout.js
   jifty/trunk/share/web/static/js/ie7/ie7-load.htc
   jifty/trunk/share/web/static/js/ie7/ie7-object.htc
   jifty/trunk/share/web/static/js/ie7/ie7-overflow.js
   jifty/trunk/share/web/static/js/ie7/ie7-quirks.js
   jifty/trunk/share/web/static/js/ie7/ie7-recalc.js
   jifty/trunk/share/web/static/js/ie7/ie7-standard-p.js
   jifty/trunk/share/web/static/js/ie7/ie7-xml-extras.js

Log:
 r9473 at wintermute:  tom | 2006-04-08 12:58:24 -0400
 * Use source of IE7 instead of the compacted version (which generates errors)
 * Remove two code blocks from ie7-standard-p.js which also cause errors.  See the comment marked "XXX TODO".


Modified: jifty/trunk/share/web/static/js/ie7/ie7-content.htc
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-content.htc	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-content.htc	Fri Apr 14 10:38:57 2006
@@ -8,7 +8,60 @@
 <object id="dummy" width="0" height="0"></object>
 <base id="base">
 <style type="text/css">html,body,img{margin:0;}img{vertical-align:top}#dummy{display:inline}</style>
-<script type="text/javascript">public_description=new function(){var l=false;this.ie7_anon=true;this.load=function(o,c,u){if(l)return;l=true;base.href=o.document.URL;dummy.style.cssText=c;var _0=o.parentElement;var _1=Boolean(dummy.currentStyle.display=="inline");function r(){o.runtimeStyle.width=(_1)?image.offsetWidth:"100%";o.runtimeStyle.height=body.offsetHeight};image.onreadystatechange=function(){if(this.readyState=="complete")_2()};image.src=u;function _2(){function copy(p){try{body.style[p]=_0.currentStyle[p]}catch(i){}};for(var j in body.currentStyle)copy(j);body.style.width="";body.style.height="";body.style.border="none";body.style.padding="0";body.style.margin="0";body.style.textIndent="";body.style.position="static";while(_0&&_0.currentStyle.backgroundColor=="transparent"){_0=_0.parentElement}if(_0)document.body.style.backgroundColor=_0.currentStyle.backgroundColor;body.runtimeStyle.cssText=c;body.runtimeStyle.margin="0";if(_1)body.runtimeStyle.width="";r()}}};</script>
+<script type="text/javascript">
+public_description = new function() {
+var $loaded = false;
+this.ie7_anon = true;
+this.load = function($object, $cssText, $url) {
+	// stop this method being called more than once
+	if ($loaded) return;
+	$loaded = true;
+
+	// paths are realtive to the containing page
+	base.href = $object.document.URL;
+	// use IE's style object to format the cssText
+	dummy.style.cssText = $cssText;
+
+	var _parent = $object.parentElement;
+	var _inline = Boolean(dummy.currentStyle.display == "inline");
+
+	// resize the parent <object> according to the size of content
+	function $resize() {
+		$object.runtimeStyle.width = (_inline) ? image.offsetWidth : "100%";
+		$object.runtimeStyle.height = body.offsetHeight;
+	};
+
+	image.onreadystatechange = function(){
+		if (this.readyState == "complete") _applyStyle();
+	};
+	image.src = $url;
+
+	function _applyStyle() {
+		// copy css settings of the parent of <object>
+		function copy($propertyName) {
+		try {
+			body.style[$propertyName] = _parent.currentStyle[$propertyName];
+		} catch ($ignore) {}};
+		for (var j in body.currentStyle) copy(j);
+		body.style.width = "";
+		body.style.height = "";
+		body.style.border = "none";
+		body.style.padding = "0";
+		body.style.margin = "0";
+		body.style.textIndent = "";
+		body.style.position = "static";
+		// determine underlying background colour
+		while (_parent && _parent.currentStyle.backgroundColor == "transparent") {
+			_parent = _parent.parentElement;
+		}
+		if (_parent) document.body.style.backgroundColor = _parent.currentStyle.backgroundColor;
+		body.runtimeStyle.cssText = $cssText;
+		body.runtimeStyle.margin = "0";
+		if (_inline) body.runtimeStyle.width = "";
+		$resize();
+	};
+}};
+</script>
 </head>
 <body><span id="body"><img id="image"></span></body>
 </html>

Modified: jifty/trunk/share/web/static/js/ie7/ie7-core.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-core.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-core.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,1203 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('x(!1M.1j)z 6(){1l{1M.1j=8;4 1W=8.2m=z 26;8.O=6(){7"1j 2q 0.9 (5G)"};4 36=/36/.B(42.41.40);4 1G=(36)?6(m){1M.1G(1j+"\\n\\n"+m)}:1W;4 2t=5F.2t.1g(/5E (\\d\\.\\d)/)[1];4 2z=K.5D!="5C";x(/5B/.B(42.41.40)||2t<5||!/^5A/.B(K.1J.2A))7;4 1H=K.39=="1H";4 1t,5z;4 1J=K.1J,2s,3X,17=K.17;4 5y="!";4 22={};4 1u=1C;1j.2m=6(n,s){x(!22[n]){x(1u)1k("s="+2o(s));22[n]=z s()}};4 R=/^[\\w\\.]+[^:]*$/;6 1I(h,p){x(R.B(h))h=(p||"")+h;7 h};6 2e(h,p){h=1I(h,p);7 h.1d(0,h.3n("/")+1)};4 s=K.3Z[K.3Z.y-1];1l{1k(s.3z)}1i(i){}4 1R=2e(s.5x);4 1F;1l{4 l=(5w()>=5)?"5v":"5u";1F=z 5t(l+".5s")}1i(i){}4 2w={};6 2y(h,p){1l{h=1I(h,p);x(!2w[h]){1F.5r("5q",h,1C);1F.5p();x(1F.3Y==0||1F.3Y==5o){2w[h]=1F.5n}}}1i(i){1G("2x [1]: 30 5m 5l "+h)}37{7 2w[h]||""}};4 5k=1I("5j.5i",1R);6 1E(V){x(V!=1L){V.2v=13.16.2v;V.12=13.16.12}7 V};1E.12=6(p,c){x(!p)p={};x(!c)c=p.J;x(c=={}.J)c=z 26("8.2v()");c.Y=z 26("7 8");c.Y.16=z 8.Y;c.Y.16.12(p);c.16=z c.Y;c.Y.16.J=c.16.J=c;c.1r=8;c.12=F.32;c.2u=8.2u;7 c};1E.Y=z 26("7 8");1E.Y.16={J:1E,2v:6(){7 F.32.5h.1r.2k(8,F)},12:6(V){x(8==8.J.16&&8.J.12){7 8.J.Y.16.12(V)}D(4 i 5g V){2K(i){1o"J":1o"O":1o"Y":2X}x(2V V[i]=="6"&&V[i]!=8[i]){V[i].1r=8[i]}8[i]=V[i]}x(V.O!=8.O&&V.O!={}.O){V.O.1r=8.O;8.O=V.O}7 8}};6 13(){};8.13=1E.12({J:13,O:6(){7"[5f "+(8.J.2Z||"5e")+"]"},5d:6(1h){7 8.J==1h||1h.2u(8.J)}});13.2Z="13";13.1r=1L;13.2u=6(1h){1f(1h&&1h.1r!=8)1h=1h.1r;7 3J(1h)};13.Y.1r=1E;2a 8.13;4 3A=13.12({J:6(){8.5c=[];8.1p=[]},1s:1W});x(2t<5.5)1k(2y("Z-5b.3a",1R));4 35=1C;1j.1s=6(){1l{x(35)7;35=1H=1c;2s=K.2s;3X=(2z)?2s:1J;x(1K&&1t)1t.2k();15.2k();1n();1G("1u 5a")}1i(e){1G("2x [2]: "+e.38)}};4 1p=[];6 2C(r){1p.11(r)};6 1n(){H.3P();x(1K&&1t)1t.1n();15.1n();D(4 i=0;i<1p.y;i++)1p[i]()};6 23(){4 E=0,R=1,L=2;4 G=/\\(/g,S=/\\$\\d/,I=/^\\$\\d+$/,T=/([\'"])\\1\\+(.*)\\+\\1\\1$/,3Q=/\\\\./g,Q=/\'/,3W=/\\25[^\\25]*\\25/g;4 1X=8;8.18=6(e,r){x(!r)r="";4 l=(34(2o(e)).1g(G)||"").y+1;x(S.B(r)){x(I.B(r)){r=3e(r.1d(1))-1}1b{4 i=l;4 q=Q.B(34(r))?\'"\':"\'";1f(i)r=r.2S("$"+i--).2p(q+"+a[o+"+i+"]+"+q);r=z 26("a,o","7"+q+r.19(T,"$1")+q)}}3V(e||"/^$/",r,l)};8.1U=6(s){24.y=0;7 3R(3S(s,8.2r).19(z 1Z(1D,8.33?"2I":"g"),3T),8.2r).19(3W,"")};8.59=6(){1D.y=0};4 24=[];4 1D=[];4 3U=6(){7"("+2o(8[E]).1d(1,-1)+")"};1D.O=6(){7 8.2p("|")};6 3V(){F.O=3U;1D[1D.y]=F}6 3T(){x(!F[0])7"";4 i=1,j=0,p;1f(p=1D[j++]){x(F[i]){4 r=p[R];2K(2V r){1o"6":7 r(F,i);1o"58":7 F[r+i]}4 d=(F[i].57(1X.2r)==-1)?"":"\\25"+F[i]+"\\25";7 d+r}1b i+=p[L]}};6 3S(s,e){7 e?s.19(z 1Z("\\\\"+e+"(.)","g"),6(m,c){24[24.y]=c;7 e}):s};6 3R(s,e){4 i=0;7 e?s.19(z 1Z("\\\\"+e,"g"),6(){7 e+(24[i++]||"")}):s};6 34(s){7 s.19(3Q,"")}};23.16={J:23,33:1C,2r:""};13.12(23.16);4 1V=23.12({33:1c});4 H=6(){4 2q="2.0.2";4 C=/\\s*,\\s*/;4 H=6(s,14){1l{4 m=[];4 u=F.32.2Q&&!14;4 b=(14)?(14.J==3G)?14:[14]:[K];4 31=3D(s).2S(C),i;D(i=0;i<31.y;i++){s=2R(31[i]);x(3K&&s.1d(0,3).2p("")==" *#"){s=s.1d(2);14=3H([],b,s[1])}1b 14=b;4 j=0,t,f,a,c="";1f(j<s.y){t=s[j++];f=s[j++];c+=t+f;a="";x(s[j]=="("){1f(s[j++]!=")"&&j<s.y){a+=s[j]}a=a.1d(0,-1);c+="("+a+")"}14=(u&&1P[c])?1P[c]:3F(14,t,f,a);x(u)1P[c]=14}m=m.3t(14)}2a H.30;7 m}1i(e){H.30=e;7[]}};H.O=6(){7"6 H() {\\n  [2q "+2q+"]\\n}"};4 1P={};H.2Q=1C;H.3P=6(s){x(s){s=2R(s).2p("");2a 1P[s]}1b 1P={}};4 22={};4 1u=1C;H.2m=6(n,s){x(1u)1k("s="+2o(s));22[n]=z s()};H.Y=6(c){7 c?1k(c):8};4 1B={};4 2n={};4 56={1g:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};4 55=[];1B[" "]=6(r,f,t,n){4 e,i,j;D(i=0;i<f.y;i++){4 s=2l(f[i],t,n);D(j=0;(e=s[j]);j++){x(1q(e)&&2T(e,n))r.11(e)}}};1B["#"]=6(r,f,i){4 e,j;D(j=0;(e=f[j]);j++)x(e.1a==i)r.11(e)};1B["."]=6(r,f,c){c=z 1Z("(^|\\\\s)"+c+"(\\\\s|$)");4 e,i;D(i=0;(e=f[i]);i++)x(c.B(e.2Z))r.11(e)};1B[":"]=6(r,f,p,a){4 t=2n[p],e,i;x(t)D(i=0;(e=f[i]);i++)x(t(e,a))r.11(e)};2n["21"]=6(e){4 d=2U(e);x(d.2Y)D(4 i=0;i<d.2Y.y;i++){x(d.2Y[i]==e)7 1c}};2n["2N"]=6(e){};4 1q=6(e){7(e&&e.3B==1&&e.2P!="!")?e:1L};4 3N=6(e){1f(e&&(e=e.54)&&!1q(e))2X;7 e};4 2W=6(e){1f(e&&(e=e.53)&&!1q(e))2X;7 e};4 3L=6(e){7 1q(e.3O)||2W(e.3O)};4 52=6(e){7 1q(e.3M)||3N(e.3M)};4 51=6(e){4 c=[];e=3L(e);1f(e){c.11(e);e=2W(e)}7 c};4 3K=1c;4 2O=6(e){4 d=2U(e);7(2V d.3I=="50")?/\\.4Z$/i.B(d.4Y):3J(d.3I=="4X 4W")};4 2U=6(e){7 e.4V||e.K};4 2l=6(e,t){7(t=="*"&&e.1A)?e.1A:e.2l(t)};4 4U=6(e,t,n){x(t=="*")7 1q(e);x(!2T(e,n))7 1C;x(!2O(e))t=t.4T();7 e.2P==t};4 2T=6(e,n){7!n||(n=="*")||(e.4S==n)};4 4R=6(e){7 e.4Q};6 3H(r,f,1a){4 m,i,j;D(i=0;i<f.y;i++){x(m=f[i].1A.4P(1a)){x(m.1a==1a)r.11(m);1b x(m.y!=1L){D(j=0;j<m.y;j++){x(m[j].1a==1a)r.11(m[j])}}}}7 r};x(![].11)3G.16.11=6(){D(4 i=0;i<F.y;i++){8[8.y]=F[i]}7 8.y};4 N=/\\|/;6 3F(14,t,f,a){x(N.B(f)){f=f.2S(N);a=f[0];f=f[1]}4 r=[];x(1B[t]){1B[t](r,14,f,a)}7 r};4 S=/^[^\\s>+~]/;4 3E=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;6 2R(s){x(S.B(s))s=" "+s;7 s.1g(3E)||[]};4 W=/\\s*([\\s>+~(),]|^|$)\\s*/g;4 I=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;4 3D=6(s){7 s.19(W,"$1").19(I,"$1*$2")};4 1y={O:6(){7"\'"},1g:/^(\'[^\']*\')|("[^"]*")$/,B:6(s){7 8.1g.B(s)},18:6(s){7 8.B(s)?s:8+s+8},3C:6(s){7 8.B(s)?s.1d(1,-1):s}};4 1N=6(t){7 1y.3C(t)};4 E=/([\\/()[\\]?{}|*+-])/g;6 4O(s){7 s.19(E,"\\\\$1")};1u=1c;7 H}();H.2Q=1c;H.2m("Z",6(){1q=6(e){7(e&&e.3B==1&&e.2P!="!"&&!e.3d)?e:1L}});H.Y("1N=F[1]",3k);4 1K=!H.Y("2O(F[1])",1J);4 2h=":21{Z-21:21}:2N{Z-21:2N}"+(1K?"":"*{4N:0}");4 15=z(3A.12({2F:z 1V,1O:"",1w:"",2L:[],1s:6(){8.2M();8.2g()},2g:6(){15.1Y.X=2h+8.1O+8.1w},3y:6(){4 20=K.2l("1e"),s;D(4 i=20.y-1;(s=20[i]);i--){x(!s.2H&&!s.Z){8.2L.11(s.3z)}}},2k:6(){8.3y();8.2g();z 28("1O");8.3u()},3w:6(e,r){8.2F.18(e,r)},1n:6(){4 R=/3v\\d+/g;4 s=2h.1g(/[{,]/g).y;4 20=s+(8.1O.X.1g(/\\{/g)||"").y;4 3x=8.1Y.4M,r;4 2j,c,2i,e,i,j,k,1a;D(i=s;i<20;i++){r=3x[i];x(r&&(2j=r.1e.X.1g(R))){2i=H(r.4L);x(2i.y)D(j=0;j<2j.y;j++){1a=2j[j];c=15.1p[1a.1d(10)][2];D(k=0;(e=2i[k]);k++){x(e.1v[1a])c(e)}}}}},2C:6(p,t,h,r){t=z 1Z("([{;\\\\s])"+p+"\\\\s*:\\\\s*"+t+"[^;}]*");4 i=8.1p.y;x(r)r=p+":"+r;8.3w(t,6(m,o){7(r?m[o+1]+r:m[o])+";Z-"+m[o].1d(1)+";3v"+i+":1"});8.1p.11(F);7 i},1N:6(s){7 s.X||""},2M:6(){x(1H||!1K)K.2M();1b K.4K("<1e Z=1c></1e>");8.1Y=17[17.y-1];8.1Y.Z=1c;8.1Y.X=2h},3u:6(){D(4 i=0;i<17.y;i++){x(!17[i].Z&&17[i].X){17[i].X=""}}}}));6 28(m){8.1z=m;8.1S();15[m]=8;15.2g()};13.12({J:28,O:6(){7"@1z "+8.1z+"{"+8.X+"}"},1n:1W,1S:6(){8.X="";8.1N();8.3m();8.X=3j(8.X);f={}},1N:6(){4 3r=[].3t(15.2L);4 M=/@1z\\s+([^{]*)\\{([^@]+\\})\\s*\\}/2I;4 A=/\\4J\\b|^$/i,S=/\\4I\\b/i,P=/\\4H\\b/i;6 3q(c,m){2f.v=m;7 c.19(M,2f)};6 2f(4G,m,c){m=2J(m);2K(m){1o"1O":1o"1w":x(m!=2f.v)7"";1o"1A":7 c}7""};6 2J(m){x(A.B(m))7"1A";1b x(S.B(m))7(P.B(m))?"1A":"1O";1b x(P.B(m))7"1w"};4 1X=8;6 2G(s,p,m,l){4 c="";x(!l){m=2J(s.1z);l=0}x(m=="1A"||m==1X.1z){x(l<3){D(4 i=0;i<s.3s.y;i++){c+=2G(s.3s[i],2e(s.2d,p),m,l+1)}}c+=3l(s.2d?3p(s,p):3r.3h()||"");c=3q(c,1X.1z)}7 c};4 f={};6 3p(s,p){4 u=1I(s.2d,p);x(f[u])7"";f[u]=(s.2H)?"":3o(15.1N(s,p),2e(s.2d,p));7 f[u]};4 U=/(4F\\s*\\(\\s*[\'"]?)([\\w\\.]+[^:\\)]*[\'"]?\\))/2I;6 3o(c,p){7 c.19(U,"$1"+p.1d(0,p.3n("/")+1)+"$2")};D(4 i=0;i<17.y;i++){x(!17[i].2H&&!17[i].Z){8.X+=2G(17[i])}}},3m:6(){8.X=15.2F.1U(8.X)},1n:1W});4 1y=H.Y("1y");4 2b=[];6 3l(c){7 1x.1U(2c.1U(c))};6 2E(m,o){7 1y+(2b.11(m[o])-1)+1y};6 3k(v){7 1y.B(v)?1k(2b[1k(v)]):v};4 1x=z 1V;1x.18(/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//);1x.18(/\'[^\']*\'/,2E);1x.18(/"[^"]*"/,2E);1x.18(/\\s+/," ");1x.18(/@(4E|4D)[^;\\n]+[;\\n]|<!\\-\\-|\\-\\->/);4 2c=z 1V;2c.18(/\\\\\'/,"\\\\4C");2c.18(/\\\\"/,"\\\\4B");4 2D=z 1V;2D.18(/\'(\\d+)\'/,3i);6 3j(c){7 2D.1U(c)};6 3i(m,o){7 2b[m[o+1]]};4 2B=[];6 4A(h){2C(h);1Q(1M,"4z",h)};6 1Q(e,t,h){e.4y(t,h);2B.11(F)};6 3g(e,t,h){1l{e.4x(t,h)}1i(i){}};1Q(1M,"4w",6(){4 h;1f(h=2B.3h()){3g(h[0],h[1],h[2])}});6 4v(h,e,c){x(!h.29)h.29={};x(c)h.29[e.2A]=e;1b 2a h.29[e.2A];7 c};1Q(1M,"4u",6(){x(!15.1w)z 28("1w");15.1w.1n()});4 3f=/^\\d+(4t)?$/i;4 4s=/^\\d+%$/;4 4r=6(e,v){x(3f.B(v))7 3e(v);4 s=e.1e.1m;4 r=e.1T.1m;e.1T.1m=e.1v.1m;e.1e.1m=v||0;v=e.1e.4q;e.1e.1m=s;e.1T.1m=r;7 v};6 4p(t){4 e=K.4o(t||"4n");e.1e.X="3c:4m;4l:0;4k:4j;4i:4h;4g:4f(0 0 0 0);1m:-4e";e.3d=1c;7 e};4 27="Z-";6 4d(e){7 e.1v["Z-3c"]=="4c"};6 4b(e,p){7 e.1v[27+p]||e.1v[p]};6 4a(e,p,v){x(e.1v[27+p]==1L){e.1T[27+p]=e.1v[p]}e.1T[p]=v};6 49(o,c,u){4 t=48(6(){1l{x(!o.1S)7;o.1S(o,c,u);3b(t)}1i(i){3b(t)}},10)};1u=1c;x(2z)1k(2y("Z-47.3a",1R));15.1s();x(1K&&1t)1t.1s();x(1H)1j.1s();1b{1J.46(1I("Z-1S.45",1R));1Q(K,"44",6(){x(K.39=="1H")43(1j.1s,0)})}}1i(e){1G("2x [0]: "+e.38)}37{}};',62,353,'||||var||function|return|this|||||||||||||||||||||||||if|length|new||test||for||arguments||cssQuery||constructor|document||||toString|||||||that||cssText|valueOf|ie7||push|specialize|Common|fr|ie7CSS|prototype|styleSheets|add|replace|id|else|true|slice|style|while|match|klass|catch|IE7|eval|try|left|recalc|case|recalcs|thisElement|ancestor|init|ie7HTML|loaded|currentStyle|print|encoder|Quote|media|all|selectors|false|_0|ICommon|httpRequest|alert|complete|makePath|documentElement|isHTML|null|window|getText|screen|cache|addEventHandler|path|load|runtimeStyle|exec|Parser|DUMMY|self|styleSheet|RegExp|st|link|modules|ParseMaster|_1|x01|Function|_2|StyleSheet|elements|delete|_3|safeString|href|getPath|_4|refresh|HEADER|el|ca|apply|getElementsByTagName|addModule|pseudoClasses|String|join|version|escapeChar|body|appVersion|ancestorOf|inherit|_5|Error|loadFile|quirksMode|uniqueID|_6|addRecalc|decoder|_7|parser|_8|disabled|gi|_9|switch|styles|createStyleSheet|visited|isXML|tagName|caching|_10|split|compareNamespace|getDocument|typeof|nextElementSibling|continue|links|className|error|se|callee|ignoreCase|_11|_12|ie7_debug|finally|description|readyState|js|clearInterval|position|ie7_anon|parseInt|PIXEL|removeEventHandler|pop|_13|decode|getString|_14|parse|lastIndexOf|_15|_16|_17|_18|imports|concat|trash|ie7_recalc|addFix|ru|getInlineStyles|innerHTML|Fix|nodeType|remove|parseSelector|ST|select|Array|_19|mimeType|Boolean|isMSIE|firstElementChild|lastChild|previousElementSibling|firstChild|clearCache|ES|_20|_21|_22|_23|_24|DE|viewport|status|scripts|search|location|top|setTimeout|onreadystatechange|htc|addBehavior|quirks|setInterval|addTimer|setOverrideStyle|getDefinedStyle|fixed|isFixed|9999|rect|clip|none|border|block|display|padding|absolute|object|createElement|createTempElement|pixelLeft|getPixelValue|PERCENT|px|onbeforeprint|register|onunload|detachEvent|attachEvent|onresize|addResize|x22|x27|import|namespace|url|ma|bprint|bscreen|ball|write|selectorText|rules|margin|regEscape|item|innerText|getTextContent|scopeName|toUpperCase|compareTagName|ownerDocument|Document|XML|URL|xml|unknown|childElements|lastElementChild|nextSibling|previousSibling|attributeSelectors|AttributeSelector|indexOf|number|reset|successfully|ie5|fixes|instanceOf|Object|common|in|caller|gif|blank|BLANK_GIF|file|loading|responseText|200|send|GET|open|XMLHTTP|ActiveXObject|Microsoft|Msxml2|ScriptEngineMajorVersion|src|ANON|ie7Layout|ms_|ie7_off|CSS1Compat|compatMode|MSIE|navigator|alpha'.split('|'),0,{}))
+
+/* W3C compliance for Microsoft Internet Explorer */
+
+/* credits/thanks:
+	Shaggy, Martijn Wargers, Jimmy Cerra, Mark D Anderson,
+	Lars Dieckow, Erik Arvidsson, Gellért Gyuris, James Denny,
+	Unknown W Brackets, Benjamin Westfarer, Rob Eberhardt,
+	Bill Edney, Kevin Newman, James Crompton, Matthew Mastracci,
+	Doug Wright, Richard York, Kenneth Kolano, MegaZone,
+	Thomas Verelst
+*/
+
+if (!window.IE7) new function() {
+try {
+// -----------------------------------------------------------------------
+// globals
+// -----------------------------------------------------------------------
+window.IE7 = this;
+// in case of error...
+var DUMMY = this.addModule = new Function;
+// IE7 version info
+this.toString = function(){return "IE7 version 0.9 (alpha)"};
+// error reporting
+var ie7_debug = /ie7_debug/.test(top.location.search);
+var alert = (ie7_debug) ? function($message){window.alert(IE7+"\n\n"+$message)} : DUMMY;
+// IE version info
+var appVersion = navigator.appVersion.match(/MSIE (\d\.\d)/)[1];
+var quirksMode = document.compatMode != "CSS1Compat";
+// IE7 can be turned "off"
+if (/ie7_off/.test(top.location.search) || appVersion < 5 ||
+	!/^ms_/.test(document.documentElement.uniqueID)) return;
+// if using the favelet then the document has already loaded
+var complete = document.readyState == "complete";
+// another global
+var ie7HTML, ie7Layout; // loaded separately
+// handy
+var documentElement = document.documentElement, body, viewport, styleSheets = document.styleSheets;
+var ANON = "!";
+// -----------------------------------------------------------------------
+// external
+// -----------------------------------------------------------------------
+
+// cache for the various modules that make up IE7.
+//  modules are stored as functions. these are executed
+//  after the style sheet text has been loaded.
+// storing the modules as functions means that we avoid
+//  name clashes with other modules.
+var modules = {};
+var loaded = false;
+IE7.addModule = function($name, $script) {
+	if (!modules[$name]) {
+		if (loaded) eval("$script=" + String($script));
+		modules[$name] = new $script();
+	}
+};
+
+var $RELATIVE = /^[\w\.]+[^:]*$/;
+function makePath($href, $path) {
+	if ($RELATIVE.test($href)) $href = ($path || "") + $href;
+	return $href;
+};
+
+function getPath($href, $path) {
+	$href = makePath($href, $path);
+	return $href.slice(0, $href.lastIndexOf("/") + 1);
+};
+
+// get the path to this script
+var $script = document.scripts[document.scripts.length - 1];
+// create global variables from the inner text of the IE7 script
+try {
+	eval($script.innerHTML);
+} catch ($ignore) {
+	// ignore errors
+}
+var path = getPath($script.src);
+// we'll use microsoft's http request object to load external files
+var httpRequest;
+try {
+	var $lib = (ScriptEngineMajorVersion() >= 5) ? "Msxml2" : "Microsoft";
+	httpRequest = new ActiveXObject($lib + ".XMLHTTP");
+} catch ($ignore) {
+	// ActiveX disabled
+}
+var _fileCache = {};
+function loadFile($href, $path) {
+try {
+	$href = makePath($href, $path);
+	if (!_fileCache[$href]) {
+		// easy to load a file huh?
+		httpRequest.open("GET", $href, false);
+		httpRequest.send();
+		if (httpRequest.status == 0 || httpRequest.status == 200) {
+			_fileCache[$href] = httpRequest.responseText;
+		}
+	}
+} catch ($ignore) {
+	alert("Error [1]: error loading file " + $href);
+} finally {
+	return _fileCache[$href] || "";
+}};
+
+// a small transparent image used as a placeholder
+var BLANK_GIF = makePath("blank.gif", path);
+
+// -----------------------------------------------------------------------
+// OO support
+// -----------------------------------------------------------------------
+
+/*    ---   (require) /common/src?common.js       ---    */
+/*
+	common, version 1.0.4 (2005/06/05)
+	Copyright 2005, Dean Edwards
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+// this function may be used to cast any javascript object
+//  to a common object
+function ICommon(that) {
+	if (that != null) {
+		that.inherit = Common.prototype.inherit;
+		that.specialize = Common.prototype.specialize;
+	}
+	return that;
+};
+
+// sub-classing
+ICommon.specialize = function($prototype, $constructor) {
+	// initialise class properties
+	if (!$prototype) $prototype = {};
+	if (!$constructor) $constructor = $prototype.constructor;
+	if ($constructor == {}.constructor) $constructor = new Function("this.inherit()");
+	// build the inheritance chain
+	//  insert a dummy constructor between the ancestor
+	//  and the new constructor. this allows standard
+	//  prototype inheritance plus chained constructor
+	//  functions.
+	$constructor.valueOf = new Function("return this");
+	$constructor.valueOf.prototype = new this.valueOf;
+	$constructor.valueOf.prototype.specialize($prototype);
+	$constructor.prototype = new $constructor.valueOf;
+	$constructor.valueOf.prototype.constructor =
+	$constructor.prototype.constructor = $constructor;
+	$constructor.ancestor = this;
+	$constructor.specialize = arguments.callee;
+	$constructor.ancestorOf = this.ancestorOf;
+	return $constructor;
+};
+
+// root of the inheritance chain
+ICommon.valueOf = new Function("return this");
+
+// common interface
+ICommon.valueOf.prototype = {
+constructor: ICommon,
+inherit: function() {
+//-
+//   Call this method from any other method to call that method's ancestor.
+//   If there is no ancestor function then this function will throw an error.
+//-
+	return arguments.callee.caller.ancestor.apply(this, arguments);
+},
+specialize: function(that) {
+//-
+//   Add the interface of another object to this object
+//-
+	// if this object is the prototype then specialize the /real/ prototype
+	if (this == this.constructor.prototype && this.constructor.specialize) {
+		return this.constructor.valueOf.prototype.specialize(that);
+	}
+	// add each of one of the source object's properties to this object
+	for (var i in that) {
+		switch (i) {
+			case "constructor": // don't do this one!
+			case "toString":    // do this one maually
+			case "valueOf":     // ignore this one...
+				continue;
+		}
+		// implement inheritance
+		if (typeof that[i] == "function" && that[i] != this[i]) {
+			that[i].ancestor = this[i];
+		}
+		// add the property
+		this[i] = that[i];
+	}
+	// do the "toString" function manually
+	if (that.toString != this.toString && that.toString != {}.toString) {
+		that.toString.ancestor = this.toString;
+		this.toString = that.toString;
+	}
+	return this;
+}};
+
+// create the root
+function Common() {
+//--
+//   empty constructor function
+//--
+};
+this.Common = ICommon.specialize({
+constructor: Common,
+toString: function() {
+    return "[common " + (this.constructor.className || "Object") + "]";
+},
+instanceOf: function(klass) {
+    return this.constructor == klass || klass.ancestorOf(this.constructor);
+}
+});
+Common.className = "Common";
+Common.ancestor = null;
+Common.ancestorOf = function(klass) {
+	// Is this class an ancestor of the supplied class?
+	while (klass && klass.ancestor != this) klass = klass.ancestor;
+	return Boolean(klass);
+};
+
+// preserve the common prototype so that we can tell when a
+//  property of the root class has changed
+Common.valueOf.ancestor = ICommon;
+
+// c'est fini!
+delete this.Common;
+
+var Fix = Common.specialize({
+	constructor: function() {
+		this.fixes = [];
+		this.recalcs = [];
+	},
+	init: DUMMY
+});
+
+// -----------------------------------------------------------------------
+// IE5.0 compatibility
+// -----------------------------------------------------------------------
+
+/* FAVELET */
+
+// load an external module to patch IE5.0 and override the functions above
+if (appVersion < 5.5) eval(loadFile("ie7-ie5.js", path));
+
+// -----------------------------------------------------------------------
+// initialisation
+// -----------------------------------------------------------------------
+
+var _initialised = false;
+IE7.init = function() {
+try {
+	// prevent further loading
+	if (_initialised) return;
+	_initialised = complete = true;
+
+	// frequently used references
+	body = document.body;
+	viewport = (quirksMode) ? body : documentElement;
+
+	// apply CSS/DOM fixes
+	if (isHTML && ie7HTML) ie7HTML.apply();
+	ie7CSS.apply();
+	recalc();
+	alert("loaded successfully");
+} catch ($error) {
+	alert("Error [2]: " + $error.description);
+}};
+
+// a store for functions that will be called when refreshing IE7
+var recalcs = [];
+function addRecalc($recalc) {
+	recalcs.push($recalc);
+};
+function recalc() {
+	cssQuery.clearCache();
+	if (isHTML && ie7HTML) ie7HTML.recalc();
+	// re-apply style sheet rules (re-calculate ie7 classes)
+	ie7CSS.recalc();
+	// apply global fixes to the document
+	for (var i = 0; i < recalcs.length; i++) recalcs[i]();
+};
+
+// -----------------------------------------------------------------------
+//  Parser
+// -----------------------------------------------------------------------
+
+/*    ---   (include) /my/src?ParseMaster.js   ---    */
+/*
+	ParseMaster, version 1.0.2 (2005-08-19)
+	Copyright 2005, Dean Edwards
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+/* a multi-pattern parser */
+
+// KNOWN BUG: erroneous behavior when using escapeChar with a replacement value that is a function
+
+function ParseMaster() {
+	// constants
+	var $EXPRESSION = 0, $REPLACEMENT = 1, $LENGTH = 2;
+	// used to determine nesting levels
+	var $GROUPS = /\(/g, $SUB_REPLACE = /\$\d/, $INDEXED = /^\$\d+$/,
+	    $TRIM = /(['"])\1\+(.*)\+\1\1$/, $$ESCAPE = /\\./g, $QUOTE = /'/,
+	    $$DELETED = /\x01[^\x01]*\x01/g;
+	var self = this;
+	// public
+	this.add = function($expression, $replacement) {
+		if (!$replacement) $replacement = "";
+		// count the number of sub-expressions
+		//  - add one because each pattern is itself a sub-expression
+		var $length = (_internalEscape(String($expression)).match($GROUPS) || "").length + 1;
+		// does the pattern deal with sub-expressions?
+		if ($SUB_REPLACE.test($replacement)) {
+			// a simple lookup? (e.g. "$2")
+			if ($INDEXED.test($replacement)) {
+				// store the index (used for fast retrieval of matched strings)
+				$replacement = parseInt($replacement.slice(1)) - 1;
+			} else { // a complicated lookup (e.g. "Hello $2 $1")
+				// build a function to do the lookup
+				var i = $length;
+				var $quote = $QUOTE.test(_internalEscape($replacement)) ? '"' : "'";
+				while (i) $replacement = $replacement.split("$" + i--).join($quote + "+a[o+" + i + "]+" + $quote);
+				$replacement = new Function("a,o", "return" + $quote + $replacement.replace($TRIM, "$1") + $quote);
+			}
+		}
+		// pass the modified arguments
+		_add($expression || "/^$/", $replacement, $length);
+	};
+	// execute the global replacement
+	this.exec = function($string) {
+		_escaped.length = 0;
+		return _unescape(_escape($string, this.escapeChar).replace(
+			new RegExp(_patterns, this.ignoreCase ? "gi" : "g"), _replacement), this.escapeChar).replace($$DELETED, "");
+	};
+	// clear the patterns collection so that this object may be re-used
+	this.reset = function() {
+		_patterns.length = 0;
+	};
+
+	// private
+	var _escaped = [];  // escaped characters
+	var _patterns = []; // patterns stored by index
+	var _toString = function(){return "(" + String(this[$EXPRESSION]).slice(1, -1) + ")"};
+	_patterns.toString = function(){return this.join("|")};
+	// create and add a new pattern to the patterns collection
+	function _add() {
+		arguments.toString = _toString;
+		// store the pattern - as an arguments object (i think this is quicker..?)
+		_patterns[_patterns.length] = arguments;
+	}
+	// this is the global replace function (it's quite complicated)
+	function _replacement() {
+		if (!arguments[0]) return "";
+		var i = 1, j = 0, $pattern;
+		// loop through the patterns
+		while ($pattern = _patterns[j++]) {
+			// do we have a result?
+			if (arguments[i]) {
+				var $replacement = $pattern[$REPLACEMENT];
+				switch (typeof $replacement) {
+					case "function": return $replacement(arguments, i);
+					case "number": return arguments[$replacement + i];
+				}
+				var $delete = (arguments[i].indexOf(self.escapeChar) == -1) ? "" :
+					"\x01" + arguments[i] + "\x01";
+				return $delete + $replacement;
+			// skip over references to sub-expressions
+			} else i += $pattern[$LENGTH];
+		}
+	};
+	// encode escaped characters
+	function _escape($string, $escapeChar) {
+		return $escapeChar ? $string.replace(new RegExp("\\" + $escapeChar + "(.)", "g"), function($match, $char) {
+			_escaped[_escaped.length] = $char;
+			return $escapeChar;
+		}) : $string;
+	};
+	// decode escaped characters
+	function _unescape($string, $escapeChar) {
+		var i = 0;
+		return $escapeChar ? $string.replace(new RegExp("\\" + $escapeChar, "g"), function() {
+			return $escapeChar + (_escaped[i++] || "");
+		}) : $string;
+	};
+	function _internalEscape($string) {
+		return $string.replace($$ESCAPE, "");
+	};
+};
+ParseMaster.prototype = {
+	constructor: ParseMaster,
+	ignoreCase: false,
+	escapeChar: ""
+};
+Common.specialize(ParseMaster.prototype);
+var Parser = ParseMaster.specialize({ignoreCase: true});
+
+// -----------------------------------------------------------------------
+//  cssQuery
+// -----------------------------------------------------------------------
+
+/*    ---   (include) /my/cssQuery/src?cssQuery.js   ---    */
+/*
+	cssQuery, version 2.0.2 (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+// the following functions allow querying of the DOM using CSS selectors
+var cssQuery = function() {
+var version = "2.0.2";
+
+// -----------------------------------------------------------------------
+// main query function
+// -----------------------------------------------------------------------
+
+var $COMMA = /\s*,\s*/;
+var cssQuery = function($selector, $$from) {
+try {
+	var $match = [];
+	var $useCache = arguments.callee.caching && !$$from;
+	var $base = ($$from) ? ($$from.constructor == Array) ? $$from : [$$from] : [document];
+	// process comma separated selectors
+	var $$selectors = parseSelector($selector).split($COMMA), i;
+	for (i = 0; i < $$selectors.length; i++) {
+		// convert the selector to a stream
+		$selector = _toStream($$selectors[i]);
+		// faster chop if it starts with id (MSIE only)
+		if (isMSIE && $selector.slice(0, 3).join("") == " *#") {
+			$selector = $selector.slice(2);
+			$$from = _msie_selectById([], $base, $selector[1]);
+		} else $$from = $base;
+		// process the stream
+		var j = 0, $token, $filter, $arguments, $cacheSelector = "";
+		while (j < $selector.length) {
+			$token = $selector[j++];
+			$filter = $selector[j++];
+			$cacheSelector += $token + $filter;
+			// some pseudo-classes allow arguments to be passed
+			//  e.g. nth-child(even)
+			$arguments = "";
+			if ($selector[j] == "(") {
+				while ($selector[j++] != ")" && j < $selector.length) {
+					$arguments += $selector[j];
+				}
+				$arguments = $arguments.slice(0, -1);
+				$cacheSelector += "(" + $arguments + ")";
+			}
+			// process a token/filter pair use cached results if possible
+			$$from = ($useCache && cache[$cacheSelector]) ?
+				cache[$cacheSelector] : select($$from, $token, $filter, $arguments);
+			if ($useCache) cache[$cacheSelector] = $$from;
+		}
+		$match = $match.concat($$from);
+	}
+	delete cssQuery.error;
+	return $match;
+} catch ($error) {
+	cssQuery.error = $error;
+	return [];
+}};
+
+// -----------------------------------------------------------------------
+// public interface
+// -----------------------------------------------------------------------
+
+cssQuery.toString = function() {
+	return "function cssQuery() {\n  [version " + version + "]\n}";
+};
+
+// caching
+var cache = {};
+cssQuery.caching = false;
+cssQuery.clearCache = function($selector) {
+	if ($selector) {
+		$selector = _toStream($selector).join("");
+		delete cache[$selector];
+	} else cache = {};
+};
+
+// allow extensions
+var modules = {};
+var loaded = false;
+cssQuery.addModule = function($name, $script) {
+	if (loaded) eval("$script=" + String($script));
+	modules[$name] = new $script();;
+};
+
+// hackery
+cssQuery.valueOf = function($code) {
+	return $code ? eval($code) : this;
+};
+
+// -----------------------------------------------------------------------
+// declarations
+// -----------------------------------------------------------------------
+
+var selectors = {};
+var pseudoClasses = {};
+// a safari bug means that these have to be declared here
+var AttributeSelector = {match: /\[([\w-]+(\|[\w-]+)?)\s*(\W?=)?\s*([^\]]*)\]/};
+var attributeSelectors = [];
+
+// -----------------------------------------------------------------------
+// selectors
+// -----------------------------------------------------------------------
+
+// descendant selector
+selectors[" "] = function($results, $from, $tagName, $namespace) {
+	// loop through current selection
+	var $element, i, j;
+	for (i = 0; i < $from.length; i++) {
+		// get descendants
+		var $subset = getElementsByTagName($from[i], $tagName, $namespace);
+		// loop through descendants and add to results selection
+		for (j = 0; ($element = $subset[j]); j++) {
+			if (thisElement($element) && compareNamespace($element, $namespace))
+				$results.push($element);
+		}
+	}
+};
+
+// ID selector
+selectors["#"] = function($results, $from, $id) {
+	// loop through current selection and check ID
+	var $element, j;
+	for (j = 0; ($element = $from[j]); j++) if ($element.id == $id) $results.push($element);
+};
+
+// class selector
+selectors["."] = function($results, $from, $className) {
+	// create a RegExp version of the class
+	$className = new RegExp("(^|\\s)" + $className + "(\\s|$)");
+	// loop through current selection and check class
+	var $element, i;
+	for (i = 0; ($element = $from[i]); i++)
+		if ($className.test($element.className)) $results.push($element);
+};
+
+// pseudo-class selector
+selectors[":"] = function($results, $from, $pseudoClass, $arguments) {
+	// retrieve the cssQuery pseudo-class function
+	var $test = pseudoClasses[$pseudoClass], $element, i;
+	// loop through current selection and apply pseudo-class filter
+	if ($test) for (i = 0; ($element = $from[i]); i++)
+		// if the cssQuery pseudo-class function returns "true" add the element
+		if ($test($element, $arguments)) $results.push($element);
+};
+
+// -----------------------------------------------------------------------
+// pseudo-classes
+// -----------------------------------------------------------------------
+
+pseudoClasses["link"] = function($element) {
+	var $document = getDocument($element);
+	if ($document.links) for (var i = 0; i < $document.links.length; i++) {
+		if ($document.links[i] == $element) return true;
+	}
+};
+
+pseudoClasses["visited"] = function($element) {
+	// can't do this without jiggery-pokery
+};
+
+// -----------------------------------------------------------------------
+// DOM traversal
+// -----------------------------------------------------------------------
+
+// IE5/6 includes comments (LOL) in it's elements collections.
+// so we have to check for this. the test is tagName != "!". LOL (again).
+var thisElement = function($element) {
+	return ($element && $element.nodeType == 1 && $element.tagName != "!") ? $element : null;
+};
+
+// return the previous element to the supplied element
+//  previousSibling is not good enough as it might return a text or comment node
+var previousElementSibling = function($element) {
+	while ($element && ($element = $element.previousSibling) && !thisElement($element)) continue;
+	return $element;
+};
+
+// return the next element to the supplied element
+var nextElementSibling = function($element) {
+	while ($element && ($element = $element.nextSibling) && !thisElement($element)) continue;
+	return $element;
+};
+
+// return the first child ELEMENT of an element
+//  NOT the first child node (though they may be the same thing)
+var firstElementChild = function($element) {
+	return thisElement($element.firstChild) || nextElementSibling($element.firstChild);
+};
+
+var lastElementChild = function($element) {
+	return thisElement($element.lastChild) || previousElementSibling($element.lastChild);
+};
+
+// return child elements of an element (not child nodes)
+var childElements = function($element) {
+	var $childElements = [];
+	$element = firstElementChild($element);
+	while ($element) {
+		$childElements.push($element);
+		$element = nextElementSibling($element);
+	}
+	return $childElements;
+};
+
+// -----------------------------------------------------------------------
+// browser compatibility
+// -----------------------------------------------------------------------
+
+// all of the functions in this section can be overwritten. the default
+//  configuration is for IE. The functions below reflect this. standard
+//  methods are included in a separate module. It would probably be better
+//  the other way round of course but this makes it easier to keep IE7 trim.
+
+var isMSIE = true;
+
+var isXML = function($element) {
+	var $document = getDocument($element);
+	return (typeof $document.mimeType == "unknown") ?
+		/\.xml$/i.test($document.URL) :
+		Boolean($document.mimeType == "XML Document");
+};
+
+// return the element's containing document
+var getDocument = function($element) {
+	return $element.ownerDocument || $element.document;
+};
+
+var getElementsByTagName = function($element, $tagName) {
+	return ($tagName == "*" && $element.all) ? $element.all : $element.getElementsByTagName($tagName);
+};
+
+var compareTagName = function($element, $tagName, $namespace) {
+	if ($tagName == "*") return thisElement($element);
+	if (!compareNamespace($element, $namespace)) return false;
+	if (!isXML($element)) $tagName = $tagName.toUpperCase();
+	return $element.tagName == $tagName;
+};
+
+var compareNamespace = function($element, $namespace) {
+	return !$namespace || ($namespace == "*") || ($element.scopeName == $namespace);
+};
+
+var getTextContent = function($element) {
+	return $element.innerText;
+};
+
+function _msie_selectById($results, $from, id) {
+	var $match, i, j;
+	for (i = 0; i < $from.length; i++) {
+		if ($match = $from[i].all.item(id)) {
+			if ($match.id == id) $results.push($match);
+			else if ($match.length != null) {
+				for (j = 0; j < $match.length; j++) {
+					if ($match[j].id == id) $results.push($match[j]);
+				}
+			}
+		}
+	}
+	return $results;
+};
+
+// for IE5.0
+if (![].push) Array.prototype.push = function() {
+	for (var i = 0; i < arguments.length; i++) {
+		this[this.length] = arguments[i];
+	}
+	return this.length;
+};
+
+// -----------------------------------------------------------------------
+// query support
+// -----------------------------------------------------------------------
+
+// select a set of matching elements.
+// "from" is an array of elements.
+// "token" is a character representing the type of filter
+//  e.g. ">" means child selector
+// "filter" represents the tag name, id or class name that is being selected
+// the function returns an array of matching elements
+var $NAMESPACE = /\|/;
+function select($$from, $token, $filter, $arguments) {
+	if ($NAMESPACE.test($filter)) {
+		$filter = $filter.split($NAMESPACE);
+		$arguments = $filter[0];
+		$filter = $filter[1];
+	}
+	var $results = [];
+	if (selectors[$token]) {
+		selectors[$token]($results, $$from, $filter, $arguments);
+	}
+	return $results;
+};
+
+// -----------------------------------------------------------------------
+// parsing
+// -----------------------------------------------------------------------
+
+// convert css selectors to a stream of tokens and filters
+//  it's not a real stream. it's just an array of strings.
+var $STANDARD_SELECT = /^[^\s>+~]/;
+var $$STREAM = /[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;
+function _toStream($selector) {
+	if ($STANDARD_SELECT.test($selector)) $selector = " " + $selector;
+	return $selector.match($$STREAM) || [];
+};
+
+var $WHITESPACE = /\s*([\s>+~(),]|^|$)\s*/g;
+var $IMPLIED_ALL = /([\s>+~,]|[^(]\+|^)([#.:@])/g;
+var parseSelector = function($selector) {
+	return $selector
+	// trim whitespace
+	.replace($WHITESPACE, "$1")
+	// e.g. ".class1" --> "*.class1"
+	.replace($IMPLIED_ALL, "$1*$2");
+};
+
+var Quote = {
+	toString: function() {return "'"},
+	match: /^('[^']*')|("[^"]*")$/,
+	test: function($string) {
+		return this.match.test($string);
+	},
+	add: function($string) {
+		return this.test($string) ? $string : this + $string + this;
+	},
+	remove: function($string) {
+		return this.test($string) ? $string.slice(1, -1) : $string;
+	}
+};
+
+var getText = function($text) {
+	return Quote.remove($text);
+};
+
+var $ESCAPE = /([\/()[\]?{}|*+-])/g;
+function regEscape($string) {
+	return $string.replace($ESCAPE, "\\$1");
+};
+
+// -----------------------------------------------------------------------
+// modules
+// -----------------------------------------------------------------------
+
+// -------- >>      insert modules here for packaging       << -------- \\
+
+loaded = true;
+
+// -----------------------------------------------------------------------
+// return the query function
+// -----------------------------------------------------------------------
+
+return cssQuery;
+
+}(); // cssQuery
+cssQuery.caching = true;
+cssQuery.addModule("ie7", function() {
+	thisElement = function($element) {
+		return ($element && $element.nodeType == 1 && $element.tagName != "!" && !$element.ie7_anon) ? $element : null;
+	};
+});
+cssQuery.valueOf("getText=arguments[1]", getString);
+
+// -----------------------------------------------------------------------
+//  IE7 CSS
+// -----------------------------------------------------------------------
+
+// assume html unless explicitly defined
+var isHTML = !cssQuery.valueOf("isXML(arguments[1])", documentElement);
+var HEADER = ":link{ie7-link:link}:visited{ie7-link:visited}" + (isHTML ? "" : "*{margin:0}");
+
+var ie7CSS = new (Fix.specialize({ // single instance
+	parser: new Parser,
+	screen: "",
+	print: "",
+	styles: [],
+	init: function() {
+		this.createStyleSheet();
+		this.refresh();
+	},
+	refresh: function() {
+		ie7CSS.styleSheet.cssText = HEADER + this.screen + this.print;
+	},
+	getInlineStyles: function() {
+		// load inline styles
+		var $$styleSheets = document.getElementsByTagName("style"), $styleSheet;
+		for (var i = $$styleSheets.length - 1; ($styleSheet = $$styleSheets[i]); i--) {
+			if (!$styleSheet.disabled && !$styleSheet.ie7) {
+				this.styles.push($styleSheet.innerHTML);
+			}
+		}
+	},
+	apply: function() {
+		this.getInlineStyles();
+		this.refresh();
+		new StyleSheet("screen");
+		this.trash();
+	},
+	addFix: function($expression, $replacement) {
+		this.parser.add($expression, $replacement);
+	},
+	recalc: function() {
+		// we're going to read through all style rules.
+		//  certain rules have had ie7 properties added to them.
+		//   e.g. p{top:0; ie7_recalc2:1; left:0}
+		//  this flags a property in the rule as needing a fix.
+		//  the selector text is then used to query the document.
+		//  we can then loop through the results of the query
+		//  and fix the elements.
+		// we ignore the IE7 rules - so count them in the header
+		var $RECALCS = /ie7_recalc\d+/g;
+		var $start = HEADER.match(/[{,]/g).length;
+		// only calculate screen fixes. print fixes don't show up anyway
+		var $$stop = $start + (this.screen.cssText.match(/\{/g)||"").length;
+		var $$rules = this.styleSheet.rules, $rule;
+		var $$calcs, $calc, $$elements, $element, i, j, k, id;
+		// loop through all rules
+		for (i = $start; i < $$stop; i++) {
+			$rule = $$rules[i];
+			// search for the "ie7_recalc" flag (there may be more than one)
+			if ($rule && ($$calcs = $rule.style.cssText.match($RECALCS))) {
+				// use the selector text to query the document
+				$$elements = cssQuery($rule.selectorText);
+				// if there are matching elements then loop
+				//  through the recalc functions and apply them
+				//  to each element
+				if ($$elements.length) for (j = 0; j < $$calcs.length; j++) {
+					// get the matching flag (e.g. ie7_recalc3)
+					id = $$calcs[j];
+					// extract the numeric id from the end of the flag
+					//  and use it to index the collection of recalc
+					//  functions
+					$calc = ie7CSS.recalcs[id.slice(10)][2];
+					for (k = 0; ($element = $$elements[k]); k++) {
+						// apply the fix
+						if ($element.currentStyle[id]) $calc($element);
+					}
+				}
+			}
+		}
+	},
+	// recalcs occur whenever the document is refreshed using document.recalc()
+	addRecalc: function($propertyName, $test, $handler, $replacement) {
+		$test = new RegExp("([{;\\s])" + $propertyName + "\\s*:\\s*" + $test + "[^;}]*");
+		var $id = this.recalcs.length;
+        if ($replacement) $replacement = $propertyName + ":" + $replacement;
+		this.addFix($test, function($match, $offset) {
+			return ($replacement ?  $match[$offset + 1] + $replacement : $match[$offset]) +
+				";ie7-" + $match[$offset].slice(1) + ";ie7_recalc" + $id + ":1";
+		});
+		this.recalcs.push(arguments);
+		return $id;
+	},
+	// retrieve the text of a style sheet
+	getText: function($styleSheet) {
+		// without the CSS2 module we assume CSS1, so it is safe to get Microsoft's stored text
+		return $styleSheet.cssText || "";
+	},
+	createStyleSheet: function() {
+		// create the IE7 style sheet
+		if (complete || !isHTML) document.createStyleSheet();
+		// this fixes a bug to do with the <base> tag
+		else document.write("<style ie7=true></style>");
+		// get the new style sheet
+		this.styleSheet = styleSheets[styleSheets.length - 1];
+		// flag it so we can ignore it during parsing
+		this.styleSheet.ie7 = true;
+		this.styleSheet.cssText = HEADER;
+	},
+	trash: function() {
+		// trash the old style sheets
+		for (var i = 0; i < styleSheets.length; i++) {
+			if (!styleSheets[i].ie7 && styleSheets[i].cssText) {
+				styleSheets[i].cssText = "";
+			}
+		}
+	}
+}));
+
+// -----------------------------------------------------------------------
+//  IE7 StyleSheet class
+// -----------------------------------------------------------------------
+
+function StyleSheet($media) {
+	this.media = $media;
+	this.load();
+	ie7CSS[$media] = this;
+	ie7CSS.refresh();
+};
+Common.specialize({
+	constructor: StyleSheet,
+	toString: function() {
+		return "@media " + this.media + "{" + this.cssText + "}";
+	},
+	recalc: DUMMY,
+	load: function() {
+		this.cssText = "";
+		this.getText();
+		this.parse();
+		this.cssText = decode(this.cssText);
+		$fileCache = {};
+	},
+	getText: function() {
+		// store for style sheet text
+		var _inlineStyles = [].concat(ie7CSS.styles);
+		// parse media decalarations
+		var $MEDIA = /@media\s+([^{]*)\{([^@]+\})\s*\}/gi;
+		var $ALL = /\ball\b|^$/i, $SCREEN = /\bscreen\b/i, $PRINT = /\bprint\b/i;
+		function _parseMedia($cssText, $media) {
+			_filterMedia.$value = $media;
+			return $cssText.replace($MEDIA, _filterMedia);
+		};
+		function _filterMedia($$match, $media, $cssText) {
+			$media = _simpleMedia($media);
+			switch ($media) {
+				case "screen":
+				case "print":
+					if ($media != _filterMedia.$value) return "";
+				case "all":
+					return $cssText;
+			}
+			return "";
+		};
+		function _simpleMedia($media) {
+			if ($ALL.test($media)) return "all";
+			else if ($SCREEN.test($media)) return ($PRINT.test($media)) ? "all" : "screen";
+			else if ($PRINT.test($media)) return "print";
+		};
+		var self = this;
+		function _getCSSText($styleSheet, $path, $media, $level) {
+			var $cssText = "";
+			if (!$level) {
+				$media = _simpleMedia($styleSheet.media);
+				$level = 0;
+			}
+			if ($media == "all" || $media == self.media) {
+				// IE only allows importing style sheets three levels deep.
+				// it will crash if you try to access a level below this
+				if ($level < 3) {
+					// loop through imported style sheets
+					for (var i = 0; i < $styleSheet.imports.length; i++) {
+						// call this function recursively to get all imported style sheets
+						$cssText += _getCSSText($styleSheet.imports[i], getPath($styleSheet.href, $path), $media, $level + 1);
+					}
+				}
+				// retrieve inline style or load an external style sheet
+				$cssText += _encode($styleSheet.href ? _loadStyleSheet($styleSheet, $path) : _inlineStyles.pop() || "");
+				$cssText = _parseMedia($cssText, self.media);
+			}
+			return $cssText;
+		};
+		// store loaded cssText URLs
+		var $fileCache = {};
+		// load an external style sheet
+		function _loadStyleSheet($styleSheet, $path) {
+			var $url = makePath($styleSheet.href, $path);
+			// if the style sheet has already loaded then don't duplicate it
+			if ($fileCache[$url]) return "";
+			// load from source
+			$fileCache[$url] = ($styleSheet.disabled) ? "" :
+				_fixUrls(ie7CSS.getText($styleSheet, $path), getPath($styleSheet.href, $path));
+			return $fileCache[$url];
+		};
+		// fix css paths
+		// we're lumping all css text into one big style sheet so relative
+		//  paths have to be fixed. this is necessary anyway because of other
+		//  explorer bugs.
+		var $URL = /(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;
+		function _fixUrls($cssText, $pathname) {
+			// hack & slash
+			return $cssText.replace($URL, "$1" + $pathname.slice(0, $pathname.lastIndexOf("/") + 1) + "$2");
+		};
+
+		// load all style sheets in the document
+		for (var i = 0; i < styleSheets.length; i++) {
+			if (!styleSheets[i].disabled && !styleSheets[i].ie7) {
+				this.cssText += _getCSSText(styleSheets[i]);
+			}
+		}
+	}, // end: load
+	parse: function() {
+		this.cssText = ie7CSS.parser.exec(this.cssText);
+	},
+	recalc: DUMMY
+});
+
+// -----------------------------------------------------------------------
+// encoding
+// -----------------------------------------------------------------------
+
+var Quote = cssQuery.valueOf("Quote");
+var _strings = [];
+
+function _encode($cssText) {
+	return encoder.exec(safeString.exec($cssText));
+};
+
+function _encodeString($match, $offset) {
+	return Quote + (_strings.push($match[$offset]) - 1) + Quote;
+};
+
+function getString($value) {
+	return Quote.test($value) ? eval(_strings[eval($value)]) : $value;
+};
+
+var encoder = new Parser;
+// comments
+encoder.add(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//);
+// strings
+encoder.add(/'[^']*'/, _encodeString);
+encoder.add(/"[^"]*"/, _encodeString);
+// white space
+encoder.add(/\s+/, " ");
+// get rid
+encoder.add(/@(namespace|import)[^;\n]+[;\n]|<!\-\-|\-\->/);
+
+var safeString = new Parser;
+safeString.add(/\\'/, "\\x27");
+safeString.add(/\\"/, "\\x22");
+
+// -----------------------------------------------------------------------
+// decoding
+// -----------------------------------------------------------------------
+
+var decoder = new Parser;
+// comments
+decoder.add(/'(\d+)'/, _decodeString);
+
+function decode($cssText) {
+	return decoder.exec($cssText);
+};
+
+function _decodeString($match, $offset) {
+	return _strings[$match[$offset + 1]];
+};
+
+// -----------------------------------------------------------------------
+// event handling
+// -----------------------------------------------------------------------
+
+var _handlers = [];
+
+function addResize($handler) {
+	addRecalc($handler);
+	addEventHandler(window, "onresize", $handler);
+};
+
+// add an event handler (function) to an element
+function addEventHandler($element, $type, $handler) {
+	$element.attachEvent($type, $handler);
+	// store the handler so it can be detached later
+	_handlers.push(arguments);
+};
+
+// remove an event handler assigned to an element by IE7
+function removeEventHandler($element, $type, $handler) {
+try {
+	$element.detachEvent($type, $handler);
+} catch ($ignore) {
+	// write a letter of complaint to microsoft..
+}};
+
+// remove event handlers (they eat memory)
+addEventHandler(window, "onunload", function() {
+	var $handler;
+ 	while ($handler = _handlers.pop()) {
+ 		removeEventHandler($handler[0], $handler[1], $handler[2]);
+ 	}
+});
+
+function register($handler, $element, $condition) { // - at DRE
+	//var $set = $handler[$element.uniqueID];
+	if (!$handler.elements) $handler.elements = {};
+	if ($condition) $handler.elements[$element.uniqueID] = $element;
+	else delete $handler.elements[$element.uniqueID];
+	//return !$set && $condition;
+	return $condition;
+};
+
+// -----------------------------------------------------------------------
+// events
+// -----------------------------------------------------------------------
+
+addEventHandler(window, "onbeforeprint", function() {
+	if (!ie7CSS.print) new StyleSheet("print");
+	ie7CSS.print.recalc();
+});
+
+// -----------------------------------------------------------------------
+// pixel conversion
+// -----------------------------------------------------------------------
+
+// this is handy because it means that web developers can mix and match
+//  measurement units in their style sheets. it is not uncommon to
+//  express something like padding in "em" units whilst border thickness
+//  is most often expressed in pixels.
+
+var PIXEL = /^\d+(px)?$/i;
+var PERCENT = /^\d+%$/;
+var getPixelValue = function($element, $value) {
+	if (PIXEL.test($value)) return parseInt($value);
+	var $style = $element.style.left;
+	var $runtimeStyle = $element.runtimeStyle.left;
+	$element.runtimeStyle.left = $element.currentStyle.left;
+	$element.style.left = $value || 0;
+	$value = $element.style.pixelLeft;
+	$element.style.left = $style;
+	$element.runtimeStyle.left = $runtimeStyle;
+	return $value;
+};
+
+// create a temporary element which is used to inherit styles
+//  from the target element. the temporary element can be resized
+//  to determine pixel widths/heights
+function createTempElement($tagName) {
+	var $element = document.createElement($tagName || "object");
+	$element.style.cssText = "position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";
+	$element.ie7_anon = true;
+	return $element;
+};
+
+// -----------------------------------------------------------------------
+// generic
+// -----------------------------------------------------------------------
+
+var _IE7_ = "ie7-";
+
+function isFixed($element) {
+	return $element.currentStyle["ie7-position"] == "fixed";
+};
+
+// original style
+function getDefinedStyle($element, $propertyName) {
+	return $element.currentStyle[_IE7_ + $propertyName] || $element.currentStyle[$propertyName];
+};
+
+function setOverrideStyle($element, $propertyName, $value) {
+	if ($element.currentStyle[_IE7_ + $propertyName] == null) {
+		$element.runtimeStyle[_IE7_ + $propertyName] = $element.currentStyle[$propertyName];
+	}
+	$element.runtimeStyle[$propertyName] = $value;
+};
+
+function addTimer($object, $cssText, $url) {
+	var $timer = setInterval(function() {
+	try {
+		// wait until the object has loaded
+		if (!$object.load) return;
+		$object.load($object, $cssText, $url);
+		clearInterval($timer);
+	} catch ($ignore) {
+		// remote scripting
+		clearInterval($timer);
+	}}, 10);
+};
+
+// -----------------------------------------------------------------------
+//  modules
+// -----------------------------------------------------------------------
+
+// -------- >>      insert modules here for packaging       << -------- \\
+
+loaded = true;
+
+// -----------------------------------------------------------------------
+//  quirks mode patches
+// -----------------------------------------------------------------------
+
+/* FAVELET */
+
+// load an external module to patch IE in quirks mode and override the functions above
+if (quirksMode) eval(loadFile("ie7-quirks.js", path));
+
+// -----------------------------------------------------------------------
+//  initialise
+// -----------------------------------------------------------------------
+
+ie7CSS.init();
+if (isHTML && ie7HTML) ie7HTML.init();
+
+// this script may be inserted via a favelet so the page may already be loaded
+if (complete) IE7.init();
+else {
+	// if we can load behaviors then use ondocumentready
+	documentElement.addBehavior(makePath("ie7-load.htc", path));
+	// otherwise this will kick in
+	addEventHandler(document, "onreadystatechange", function() {
+		// if we are going to wait this long then wem may as well let
+		//  window.onload execute first
+		if (document.readyState == "complete") setTimeout(IE7.init, 0);
+	});
+}
+
+// -----------------------------------------------------------------------
+//  error handling
+// -----------------------------------------------------------------------
+
+} catch ($error) {
+	alert("Error [0]: " + $error.description);
+} finally {
+	// have a beer...
+}};

Modified: jifty/trunk/share/web/static/js/ie7/ie7-css-strict.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-css-strict.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-css-strict.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,69 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-css-strict",function(){if(!modules["ie7-css2-selectors"])return;StyleSheet.prototype.specialize({parse:function(){this.inherit();var r=[].concat(this.rules);r.sort(ie7CSS.Rule.compare);this.cssText=r.join("\n")},createRule:function(s,c){var m;if(m=s.match(ie7CSS.PseudoElement.MATCH))return new ie7CSS.PseudoElement(m[1],m[2],c);else if(m=s.match(ie7CSS.DynamicRule.MATCH))return new ie7CSS.DynamicRule(s,m[1],m[2],m[3],c);else return new ie7CSS.Rule(s,c)}});ie7CSS.specialize({apply:function(){this.inherit();this.Rule.MATCH=/([^{}]+)(\{[^{}]*\})/g}});ie7CSS.Rule.compare=function(r1,r2){return r1.specificity-r2.specificity};var N=[],I=/#/g,C=/[.:\[]/g,T=/^\w|[\s>+~]\w/g;ie7CSS.Rule.score=function(s){return(s.match(I)||N).length*10000+(s.match(C)||N).length*100+(s.match(T)||N).length};ie7CSS.Rule.simple=function(){return""};ie7CSS.Rule.prototype.specialize({specificity:0,init:function(){this.specificity=ie7CSS.Rule.score(this.selector)}})});
+
+IE7.addModule("ie7-css-strict", function() {
+
+// requires another module
+if (!modules["ie7-css2-selectors"]) return;
+
+// -----------------------------------------------------------------------
+//  IE7 StyleSheet class
+// -----------------------------------------------------------------------
+StyleSheet.prototype.specialize({
+	// override the createRule method - ALL rules are now IE7 rules
+	parse: function() {
+		this.inherit();
+		// there is no decoding as such any more as all rules are IE7 rules.
+		//  we'll sort the rules and build a new style sheet
+		var $rules = [].concat(this.rules);
+		$rules.sort(ie7CSS.Rule.compare);
+		this.cssText = $rules.join("\n");
+	},
+	// override the createRule method - ALL rules are now IE7 rules
+	createRule: function($selector, $cssText) {
+		var $match;
+		if ($match = $selector.match(ie7CSS.PseudoElement.MATCH))
+			return new ie7CSS.PseudoElement($match[1], $match[2], $cssText);
+		else if ($match = $selector.match(ie7CSS.DynamicRule.MATCH))
+			return new ie7CSS.DynamicRule($selector, $match[1], $match[2], $match[3], $cssText);
+		else
+			return new ie7CSS.Rule($selector, $cssText);
+	}
+});
+
+// -----------------------------------------------------------------------
+//  IE7 CSS
+// -----------------------------------------------------------------------
+
+ie7CSS.specialize({
+	apply: function() {
+		this.inherit();
+		this.Rule.MATCH = /([^{}]+)(\{[^{}]*\})/g;
+	}
+});
+
+// sort function
+ie7CSS.Rule.compare = function($rule1, $rule2) {
+	return $rule1.specificity - $rule2.specificity;
+};
+
+// calculate specificity for a given selector
+var $NONE = [], $ID = /#/g, $CLASS = /[.:\[]/g, $TAG = /^\w|[\s>+~]\w/g;
+ie7CSS.Rule.score = function($selector) {
+	return ($selector.match($ID)||$NONE).length * 10000 +
+		($selector.match($CLASS)||$NONE).length * 100 +
+		($selector.match($TAG)||$NONE).length;
+};
+
+ie7CSS.Rule.simple = function() {return ""};
+
+ie7CSS.Rule.prototype.specialize({
+	specificity: 0,
+	init: function() {
+		// calculate specificity (rules are sorted on this value)
+		this.specificity = ie7CSS.Rule.score(this.selector);
+	}
+});
+
+});

Modified: jifty/trunk/share/web/static/js/ie7/ie7-css2-selectors.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-css2-selectors.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-css2-selectors.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,576 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-css2-selectors",function(){cssQuery.addModule("css-level2",function(){selectors[">"]=function(r,f,t,n){var e,i,j;for(i=0;i<f.length;i++){var s=childElements(f[i]);for(j=0;(e=s[j]);j++)if(compareTagName(e,t,n))r.push(e)}};selectors["+"]=function(r,f,t,n){for(var i=0;i<f.length;i++){var e=nextElementSibling(f[i]);if(e&&compareTagName(e,t,n))r.push(e)}};selectors["@"]=function(r,f,a){var t=attributeSelectors[a].test;var e,i;for(i=0;(e=f[i]);i++)if(t(e))r.push(e)};pseudoClasses["first-child"]=function(e){return!previousElementSibling(e)};pseudoClasses["lang"]=function(e,c){c=new RegExp("^"+c,"i");while(e&&!e.getAttribute("lang"))e=e.parentNode;return e&&c.test(e.getAttribute("lang"))};AttributeSelector.NS_IE=/\\:/g;AttributeSelector.PREFIX="@";AttributeSelector.tests={};AttributeSelector.replace=function(m,a,n,c,v){var k=this.PREFIX+m;if(!attributeSelectors[k]){a=this.create(a,c||"",v||"");attributeSelectors[k]=a;attributeSelectors.push(a)}return attributeSelectors[k].id};AttributeSelector.parse=function(s){s=s.replace(this.NS_IE,"|");var m;while(m=s.match(this.match)){var r=this.replace(m[0],m[1],m[2],m[3],m[4]);s=s.replace(this.match,r)}return s};AttributeSelector.create=function(p,t,v){var a={};a.id=this.PREFIX+attributeSelectors.length;a.name=p;t=this.tests[t];t=t?t(this.getAttribute(p),getText(v)):false;a.test=new Function("e","return "+t);return a};AttributeSelector.getAttribute=function(n){switch(n.toLowerCase()){case"id":return"e.id";case"class":return"e.className";case"for":return"e.htmlFor";case"href":if(isMSIE){return"String((e.outerHTML.match(/href=\\x22?([^\\s\\x22]*)\\x22?/)||[])[1]||'')"}}return"e.getAttribute('"+n.replace(N,":")+"')"};AttributeSelector.tests[""]=function(a){return a};AttributeSelector.tests["="]=function(a,v){return a+"=="+Quote.add(v)};AttributeSelector.tests["~="]=function(a,v){return"/(^| )"+regEscape(v)+"( |$)/.test("+a+")"};AttributeSelector.tests["|="]=function(a,v){return"/^"+regEscape(v)+"(-|$)/.test("+a+")"};var _6=parseSelector;parseSelector=function(s){return _6(AttributeSelector.parse(s))}});var AttributeSelector=cssQuery.valueOf("AttributeSelector");var H=/a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;var B1=/\s*\{\s*/,B2=/\s*\}\s*/,C=/\s*\,\s*/;var F=/(.*)(:first-(line|letter))/;StyleSheet.prototype.specialize({parse:function(){this.inherit();var o=ie7CSS.rules.length;var ru=this.cssText.split(B2),r;var se,c,i,j;for(i=0;i<ru.length;i++){r=ru[i].split(B1);se=r[0].split(C);c=r[1];for(j=0;j<se.length;j++){se[j]=c?this.createRule(se[j],c):""}ru[i]=se.join("\n")}this.cssText=ru.join("\n");this.rules=ie7CSS.rules.slice(o)},recalc:function(){var r,i;for(i=0;(r=this.rules[i]);i++)r.recalc()},createRule:function(s,c){if(ie7CSS.UNKNOWN.test(s)){var m;if(m=s.match(PseudoElement.MATCH)){return new PseudoElement(m[1],m[2],c)}else if(m=s.match(DynamicRule.MATCH)){if(!isHTML||!H.test(m)||DynamicRule.COMPLEX.test(m)){return new DynamicRule(s,m[1],m[2],m[3],c)}}else return new Rule(s,c)}return s+" {"+c+"}"}});ie7CSS.specialize({rules:[],pseudoClasses:cssQuery.valueOf("pseudoClasses"),dynamicPseudoClasses:{},cache:cssQuery.valueOf("cache"),Rule:Rule,DynamicRule:DynamicRule,PseudoElement:PseudoElement,DynamicPseudoClass:DynamicPseudoClass,apply:function(){var p=this.pseudoClasses+"|before|after|"+this.dynamicPseudoClasses;p=p.replace(/(link|visited)\|/g,"");this.UNKNOWN=new RegExp("[>+~\[]|([:.])[\\w-()]+\\1|:("+p+")");var c="[^\\s(]+\\s*[+~]|@\\d+|:(";Rule.COMPLEX=new RegExp(c+p+")","g");DynamicRule.COMPLEX=new RegExp(c+this.pseudoClasses+")","g");DynamicRule.MATCH=new RegExp("(.*):("+this.dynamicPseudoClasses+")(.*)");PseudoElement.MATCH=/(.*):(before|after).*/;this.inherit()},recalc:function(){this.screen.recalc();this.inherit()},getText:function(s,p){return httpRequest?(loadFile(s.href,p)||s.cssText):this.inherit(s)},addEventHandler:function(e,t,h){addEventHandler(e,t,h)}});function Rule(s,c){this.id=ie7CSS.rules.length;this.className=Rule.PREFIX+this.id;s=(s).match(F)||s||"*";this.selector=s[1]||s;this.selectorText=Rule.simple(this.selector)+"."+this.className+(s[2]||"");this.cssText=c;this.MATCH=new RegExp("\\s"+this.className+"(\\s|$)","g");ie7CSS.rules.push(this);this.init()};Common.specialize({constructor:Rule,toString:function(){return this.selectorText+" {"+this.cssText+"}"},init:DUMMY,add:function(e){e.className+=" "+this.className},remove:function(e){e.className=e.className.replace(this.MATCH,"$1")},recalc:function(){var m=ie7CSS.cache[" *."+this.className]=cssQuery(this.selector);for(i=0;i<m.length;i++)this.add(m[i])}});Rule.PREFIX="ie7_class";Rule.CHILD=/>/g;Rule.simple=function(s){s=AttributeSelector.parse(s);return s.replace(this.COMPLEX,"").replace(this.CHILD," ")};function DynamicRule(s,a,d,t,c){this.attach=a||"*";this.dynamicPseudoClass=ie7CSS.dynamicPseudoClasses[d];this.target=t;this.inherit(s,c)};Rule.specialize({constructor:DynamicRule,recalc:function(){var m=cssQuery(this.attach);for(var i=0;i<m.length;i++){var t=(this.target)?cssQuery(this.target,m[i]):[m[i]];if(t.length)this.dynamicPseudoClass.apply(m[i],t,this)}}});var A=/^attr/;var U=/^url\s*\(\s*([^)]*)\)$/;var M={before0:"beforeBegin",before1:"afterBegin",after0:"afterEnd",after1:"beforeEnd"};var _5=makePath("ie7-content.htc",path)+"?";HEADER+=".ie7_anon{display:none}";function PseudoElement(s,p,c){this.position=p;var co=c.match(PseudoElement.CONTENT),m,e;if(co){co=co[1];m=co.split(/\s+/);for(var i=0;(e=m[i]);i++){m[i]=A.test(e)?{attr:e.slice(5,-1)}:(e.charAt(0)=="'")?getString(e):decode(e)}co=m}this.content=co;this.inherit(s,decode(c))};Rule.specialize({constructor:PseudoElement,toString:function(){return"."+this.className+"{display:inline}"},init:function(){this.match=cssQuery(this.selector);for(var i=0;i<this.match.length;i++){var r=this.match[i].runtimeStyle;if(!r[this.position])r[this.position]={cssText:""};r[this.position].cssText+=";"+this.cssText;if(this.content!=null)r[this.position].content=this.content}},recalc:function(){if(this.content==null)return;for(var i=0;i<this.match.length;i++){this.create(this.match[i])}},create:function(t){var g=t.runtimeStyle[this.position];if(g){var c=[].concat(g.content||"");for(var j=0;j<c.length;j++){if(typeof c[j]=="object"){c[j]=t.getAttribute(c[j].attr)}}c=c.join("");var u=c.match(U);var h=PseudoElement[u?"OBJECT":"ANON"].replace(/%1/,this.className);var cs=g.cssText.replace(/'/g,'"');var po=M[this.position+Number(t.canHaveChildren)];if(u){var p=document.createElement(h);t.insertAdjacentElement(po,p);p.data=_5;addTimer(p,cs,Quote.remove(u[1]))}else{h=h.replace(/%2/,cs).replace(/%3/,c);t.insertAdjacentHTML(po,h)}t.runtimeStyle[this.position]=null}}});PseudoElement.CONTENT=/content\s*:\s*([^;]*)(;|$)/;PseudoElement.OBJECT="<object class='ie7_anon %1' ie7_anon width=100% height=0 type=text/x-scriptlet>";PseudoElement.ANON="<ie7:! class='ie7_anon %1' ie7_anon style='%2'>%3</ie7:!>";function DynamicPseudoClass(n,a){this.name=n;this.apply=a;this.instances={};ie7CSS.dynamicPseudoClasses[n]=this};Common.specialize({constructor:DynamicPseudoClass,register:function(i){var c=i[2];i.id=c.id+i[0].uniqueID;if(!this.instances[i.id]){var t=i[1],j;for(j=0;j<t.length;j++)c.add(t[j]);this.instances[i.id]=i}},unregister:function(i){if(this.instances[i.id]){var c=i[2];var t=i[1],j;for(j=0;j<t.length;j++)c.remove(t[j]);delete this.instances[i.id]}}});ie7CSS.pseudoClasses.toString=function(){var t=[],p;for(p in this){if(this[p].length>1)p+="\\([^)]*\\)";t.push(p)}return t.join("|")};ie7CSS.pseudoClasses["link"]=function(e){return e.currentStyle["ie7-link"]=="link"};ie7CSS.pseudoClasses["visited"]=function(e){return e.currentStyle["ie7-link"]=="visited"};var _4=(appVersion<5.5)?"onmouseover":"onmouseenter";var _3=(appVersion<5.5)?"onmouseout":"onmouseleave";ie7CSS.dynamicPseudoClasses.toString=ie7CSS.pseudoClasses.toString;var _0=new DynamicPseudoClass("hover",function(e){var i=arguments;ie7CSS.addEventHandler(e,_4,function(){_0.register(i)});ie7CSS.addEventHandler(e,_3,function(){_0.unregister(i)})});var _1=new DynamicPseudoClass("focus",function(e){var i=arguments;ie7CSS.addEventHandler(e,"onfocus",function(){_1.unregister(i);_1.register(i)});ie7CSS.addEventHandler(e,"onblur",function(){_1.unregister(i)});if(e==document.activeElement){_1.register(i)}});var _2=new DynamicPseudoClass("active",function(e){var i=arguments;ie7CSS.addEventHandler(e,"onmousedown",function(){_2.register(i)})});addEventHandler(document,"onmouseup",function(){var i=_2.instances,j;for(j in i)_2.unregister(i[j]);i=_0.instances;for(j in i)if(!i[j][0].contains(event.srcElement))_0.unregister(i[j])});ICommon(AttributeSelector);AttributeSelector.specialize({getAttribute:function(n){switch(n.toLowerCase()){case"class":return"e.className.replace(/\\b\\s*ie7_class\\d+/g,'')";case"src":return"(e.pngSrc||e.src)"}return this.inherit(n)}});encoder.add(/::/,":");safeString.add(/\\([\da-fA-F]{1,4})/,function(m,o){m=m[o+1];return"\\u"+"0000".slice(m.length)+m})});
+
+IE7.addModule("ie7-css2-selectors", function() {
+
+/*
+	cssQuery, version 2.0.2 (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+cssQuery.addModule("css-level2", function() {
+
+// -----------------------------------------------------------------------
+// selectors
+// -----------------------------------------------------------------------
+
+// child selector
+selectors[">"] = function($results, $from, $tagName, $namespace) {
+	var $element, i, j;
+	for (i = 0; i < $from.length; i++) {
+		var $subset = childElements($from[i]);
+		for (j = 0; ($element = $subset[j]); j++)
+			if (compareTagName($element, $tagName, $namespace))
+				$results.push($element);
+	}
+};
+
+// sibling selector
+selectors["+"] = function($results, $from, $tagName, $namespace) {
+	for (var i = 0; i < $from.length; i++) {
+		var $element = nextElementSibling($from[i]);
+		if ($element && compareTagName($element, $tagName, $namespace))
+			$results.push($element);
+	}
+};
+
+// attribute selector
+selectors["@"] = function($results, $from, $attributeSelectorID) {
+	var $test = attributeSelectors[$attributeSelectorID].test;
+	var $element, i;
+	for (i = 0; ($element = $from[i]); i++)
+		if ($test($element)) $results.push($element);
+};
+
+// -----------------------------------------------------------------------
+// pseudo-classes
+// -----------------------------------------------------------------------
+
+pseudoClasses["first-child"] = function($element) {
+	return !previousElementSibling($element);
+};
+
+pseudoClasses["lang"] = function($element, $code) {
+	$code = new RegExp("^" + $code, "i");
+	while ($element && !$element.getAttribute("lang")) $element = $element.parentNode;
+	return $element && $code.test($element.getAttribute("lang"));
+};
+
+// -----------------------------------------------------------------------
+//  attribute selectors
+// -----------------------------------------------------------------------
+
+// constants
+AttributeSelector.NS_IE = /\\:/g;
+AttributeSelector.PREFIX = "@";
+// properties
+AttributeSelector.tests = {};
+// methods
+AttributeSelector.replace = function($match, $attribute, $namespace, $compare, $value) {
+	var $key = this.PREFIX + $match;
+	if (!attributeSelectors[$key]) {
+		$attribute = this.create($attribute, $compare || "", $value || "");
+		// store the selector
+		attributeSelectors[$key] = $attribute;
+		attributeSelectors.push($attribute);
+	}
+	return attributeSelectors[$key].id;
+};
+AttributeSelector.parse = function($selector) {
+	$selector = $selector.replace(this.NS_IE, "|");
+	var $match;
+	while ($match = $selector.match(this.match)) {
+		var $replace = this.replace($match[0], $match[1], $match[2], $match[3], $match[4]);
+		$selector = $selector.replace(this.match, $replace);
+	}
+	return $selector;
+};
+AttributeSelector.create = function($propertyName, $test, $value) {
+	var $attributeSelector = {};
+	$attributeSelector.id = this.PREFIX + attributeSelectors.length;
+	$attributeSelector.name = $propertyName;
+	$test = this.tests[$test];
+	$test = $test ? $test(this.getAttribute($propertyName), getText($value)) : false;
+	$attributeSelector.test = new Function("e", "return " + $test);
+	return $attributeSelector;
+};
+AttributeSelector.getAttribute = function($name) {
+	switch ($name.toLowerCase()) {
+		case "id":
+			return "e.id";
+		case "class":
+			return "e.className";
+		case "for":
+			return "e.htmlFor";
+		case "href":
+			if (isMSIE) {
+				// IE always returns the full path not the fragment in the href attribute
+				//  so we RegExp it out of outerHTML. Opera does the same thing but there
+				//  is no way to get the original attribute.
+				return "String((e.outerHTML.match(/href=\\x22?([^\\s\\x22]*)\\x22?/)||[])[1]||'')";
+			}
+	}
+	return "e.getAttribute('" + $name.replace($NAMESPACE, ":") + "')";
+};
+
+// -----------------------------------------------------------------------
+//  attribute selector tests
+// -----------------------------------------------------------------------
+
+AttributeSelector.tests[""] = function($attribute) {
+	return $attribute;
+};
+
+AttributeSelector.tests["="] = function($attribute, $value) {
+	return $attribute + "==" + Quote.add($value);
+};
+
+AttributeSelector.tests["~="] = function($attribute, $value) {
+	return "/(^| )" + regEscape($value) + "( |$)/.test(" + $attribute + ")";
+};
+
+AttributeSelector.tests["|="] = function($attribute, $value) {
+	return "/^" + regEscape($value) + "(-|$)/.test(" + $attribute + ")";
+};
+
+// -----------------------------------------------------------------------
+//  parsing
+// -----------------------------------------------------------------------
+
+// override parseSelector to parse out attribute selectors
+var _parseSelector = parseSelector;
+parseSelector = function($selector) {
+	return _parseSelector(AttributeSelector.parse($selector));
+};
+
+}); // addModule
+var AttributeSelector = cssQuery.valueOf("AttributeSelector");
+
+// -----------------------------------------------------------------------
+//  IE7 StyleSheet class
+// -----------------------------------------------------------------------
+
+// constants
+var $HYPERLINK = /a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;
+var $BRACE1 = /\s*\{\s*/, $BRACE2 = /\s*\}\s*/, $COMMA = /\s*\,\s*/;
+var $FIRST_LINE_LETTER = /(.*)(:first-(line|letter))/;
+
+StyleSheet.prototype.specialize({
+	parse: function() {
+		this.inherit();
+		// parse the style sheet
+		var $offset = ie7CSS.rules.length;
+		var $$rules = this.cssText.split($BRACE2), $rule;
+		var $$selectors, $cssText, i, j;
+		for (i = 0; i < $$rules.length; i++) {
+			$rule = $$rules[i].split($BRACE1);
+			$$selectors = $rule[0].split($COMMA);
+			$cssText = $rule[1];
+			for (j = 0; j < $$selectors.length; j++) {
+				$$selectors[j] = $cssText ? this.createRule($$selectors[j], $cssText) : "";
+			}
+			$$rules[i] = $$selectors.join("\n");
+		}
+		this.cssText = $$rules.join("\n");
+		this.rules = ie7CSS.rules.slice($offset);
+	},
+	recalc: function() {
+		var $rule, i;
+		for (i = 0; ($rule = this.rules[i]); i++) $rule.recalc();
+	},
+	createRule: function($selector, $cssText) {
+		if (ie7CSS.UNKNOWN.test($selector)) {
+			var $match;
+			if ($match = $selector.match(PseudoElement.MATCH)) {
+				return new PseudoElement($match[1], $match[2], $cssText);
+			} else if ($match = $selector.match(DynamicRule.MATCH)) {
+				if (!isHTML || !$HYPERLINK.test($match) || DynamicRule.COMPLEX.test($match)) {
+					return new DynamicRule($selector, $match[1], $match[2], $match[3], $cssText);
+				}
+			} else return new Rule($selector, $cssText);
+		}
+		return $selector + " {" + $cssText + "}";
+	}
+});
+
+// -----------------------------------------------------------------------
+//  IE7 CSS
+// -----------------------------------------------------------------------
+
+ie7CSS.specialize({
+	// collections
+	rules: [],
+	pseudoClasses: cssQuery.valueOf("pseudoClasses"),
+	dynamicPseudoClasses: {},
+	// cssQuery cache
+	cache: cssQuery.valueOf("cache"),
+	// classes
+	Rule: Rule,
+	DynamicRule: DynamicRule,
+	PseudoElement: PseudoElement,
+	DynamicPseudoClass: DynamicPseudoClass,
+	// create regular expressions
+	apply: function() {
+		var $pseudoClasses = this.pseudoClasses + "|before|after|" + this.dynamicPseudoClasses;
+		$pseudoClasses = $pseudoClasses.replace(/(link|visited)\|/g, "");
+		this.UNKNOWN = new RegExp("[>+~\[]|([:.])[\\w-()]+\\1|:(" + $pseudoClasses + ")");
+		var $complex = "[^\\s(]+\\s*[+~]|@\\d+|:(";
+		Rule.COMPLEX = new RegExp($complex + $pseudoClasses + ")", "g");
+		DynamicRule.COMPLEX = new RegExp($complex + this.pseudoClasses + ")", "g");
+		DynamicRule.MATCH = new RegExp("(.*):(" + this.dynamicPseudoClasses + ")(.*)");
+		PseudoElement.MATCH = /(.*):(before|after).*/;
+		this.inherit();
+	},
+	recalc: function() {
+		this.screen.recalc();
+		this.inherit();
+	},
+	getText: function($styleSheet, $path) {
+		// override getCSSText function defined in ie7-core.js.
+		// explorer will trash unknown selectors (it converts them to "UNKNOWN").
+		// so we must reload external style sheets (internal style sheets can have their text
+		//  extracted through the innerHTML property).
+			// load the style sheet text from an external file
+		return httpRequest ? (loadFile($styleSheet.href, $path) || $styleSheet.cssText)
+			:  this.inherit($styleSheet);
+	},
+	addEventHandler: function($element, $type, $handler) {
+		addEventHandler($element, $type, $handler);
+	}
+}); // ie7CSS;
+
+// -----------------------------------------------------------------------
+// IE7 style rules
+// -----------------------------------------------------------------------
+
+// constructor
+function Rule($selector, $cssText) {
+	this.id = ie7CSS.rules.length;
+	this.className = Rule.PREFIX + this.id;
+	$selector = ($selector).match($FIRST_LINE_LETTER) || $selector || "*";
+	this.selector = $selector[1] || $selector;
+	this.selectorText = Rule.simple(this.selector) + "." + this.className + ($selector[2] || "");
+	this.cssText = $cssText;
+	this.MATCH = new RegExp("\\s" + this.className + "(\\s|$)", "g");
+	ie7CSS.rules.push(this);
+	this.init();
+};
+// protoytype
+Common.specialize({
+	// properties
+	constructor: Rule,
+	toString: function() {
+		return this.selectorText + " {" + this.cssText + "}";
+	},
+//- id: 0,
+//- className: "",
+//- selector: "",
+//- cssText: "",
+//- MATCH: null,
+	// methods
+	init: DUMMY,
+	add: function($element) {
+		// allocate this class
+		$element.className += " " + this.className;
+	},
+	remove: function($element) {
+		// deallocate this class
+		$element.className = $element.className.replace(this.MATCH, "$1");
+	},
+	recalc: function() {
+		// execute the underlying css query for this class
+		var $match = ie7CSS.cache[" *." + this.className] = cssQuery(this.selector);
+		// add the class name for all matching elements
+		for (i = 0; i < $match.length; i++) this.add($match[i]);
+	}
+});
+// constants
+Rule.PREFIX = "ie7_class";
+Rule.CHILD = />/g;
+// class methods
+Rule.simple = function($selector) {
+	// attempt to preserve specificity for "loose" parsing by
+	//  removing unknown tokens from a css selector but keep as
+	//  much as we can..
+	$selector = AttributeSelector.parse($selector);
+	return $selector.replace(this.COMPLEX, "").replace(this.CHILD, " ");
+};
+
+// -----------------------------------------------------------------------
+// IE7 dynamic style
+// -----------------------------------------------------------------------
+
+// class properties:
+// attach: the element that an event handler will be attached to
+// target: the element that will have the IE7 class applied
+
+// constructor
+function DynamicRule($selector, $attach, $dynamicPseudoClass, $target, $cssText) {
+	// initialise object properties
+	this.attach = $attach || "*";
+	this.dynamicPseudoClass = ie7CSS.dynamicPseudoClasses[$dynamicPseudoClass];
+	this.target = $target;
+	this.inherit($selector, $cssText);
+};
+// protoytype
+Rule.specialize({
+	// properties
+	constructor: DynamicRule,
+//- attach: "",
+//- dynamicPseudoClass: null,
+//- target: "",
+	// methods
+	recalc: function() {
+		// execute the underlying css query for this class
+		var $match = cssQuery(this.attach);
+		// process results
+		for (var i = 0; i < $match.length; i++) {
+			// retrieve the event handler's target $element(s)
+			var $target = (this.target) ? cssQuery(this.target, $match[i]) : [$match[i]];
+			// attach event handlers for dynamic pseudo-classes
+			if ($target.length) this.dynamicPseudoClass.apply($match[i], $target, this);
+		}
+	}
+});
+
+// -----------------------------------------------------------------------
+// IE7 pseudo elements
+// -----------------------------------------------------------------------
+
+// constants
+var $ATTR = /^attr/;
+var $URL = /^url\s*\(\s*([^)]*)\)$/;
+var $MAP = {
+	before0: "beforeBegin",
+	before1: "afterBegin",
+	after0: "afterEnd",
+	after1: "beforeEnd"
+};
+
+var _contentPath = makePath("ie7-content.htc", path) + "?";
+
+// CSS text required by the "content" property
+HEADER += ".ie7_anon{display:none}";
+
+// constructor
+function PseudoElement($selector, $position, $cssText) {
+	// initialise object properties
+	this.position = $position;
+	var $$content = $cssText.match(PseudoElement.CONTENT), $match, $entity;
+	if ($$content) {
+		$$content = $$content[1];
+		$match = $$content.split(/\s+/);
+		for (var i = 0; ($entity = $match[i]); i++) {
+			$match[i] = $ATTR.test($entity) ? {attr: $entity.slice(5, -1)} :
+				($entity.charAt(0) == "'") ? getString($entity) : decode($entity);
+		}
+		$$content = $match;
+	}
+	this.content = $$content;
+	// CSS text needs to be decoded immediately
+	this.inherit($selector, decode($cssText));
+};
+// prototype
+Rule.specialize({
+	constructor: PseudoElement,
+	toString: function() {
+		return "." + this.className + "{display:inline}";
+	},
+	init: function() {
+		// execute the underlying css query for this class
+		this.match = cssQuery(this.selector);
+		for (var i = 0; i < this.match.length; i++) {
+			var $runtimeStyle = this.match[i].runtimeStyle;
+			if (!$runtimeStyle[this.position]) $runtimeStyle[this.position] = {cssText:""};
+			$runtimeStyle[this.position].cssText += ";" + this.cssText;
+			if (this.content != null) $runtimeStyle[this.position].content = this.content;
+		}
+	},
+	recalc: function() {
+		if (this.content == null) return;
+		for (var i = 0; i < this.match.length; i++) {
+			this.create(this.match[i]);
+		}
+	},
+	create: function($target) {
+		var $generated = $target.runtimeStyle[this.position];
+		if ($generated) {
+		//#	// insert the pseudo element
+		//#	this.create($target, $generated.content, $generated.cssText.replace(/'/g, '"'));
+			// copy the array of values
+			var $content = [].concat($generated.content || "");
+			for (var j = 0; j < $content.length; j++) {
+				if (typeof $content[j] == "object") {
+					$content[j] = $target.getAttribute($content[j].attr);
+				}
+			}
+			$content = $content.join("");
+			var $url = $content.match($URL);
+			var $html = PseudoElement[$url?"OBJECT":"ANON"].replace(/%1/, this.className);
+			var $$cssText = $generated.cssText.replace(/'/g, '"');
+			var $$position = $MAP[this.position + Number($target.canHaveChildren)];
+			if ($url) {
+				var $pseudoElement = document.createElement($html);
+				$target.insertAdjacentElement($$position, $pseudoElement);
+				$pseudoElement.data = _contentPath;
+				addTimer($pseudoElement, $$cssText, Quote.remove($url[1]));
+			} else {
+				$html = $html.replace(/%2/, $$cssText).replace(/%3/, $content);
+				$target.insertAdjacentHTML($$position, $html);
+			}
+			$target.runtimeStyle[this.position] = null;
+		}
+	}
+});
+// constants
+PseudoElement.CONTENT = /content\s*:\s*([^;]*)(;|$)/;
+PseudoElement.OBJECT = "<object class='ie7_anon %1' ie7_anon width=100% height=0 type=text/x-scriptlet>";
+PseudoElement.ANON = "<ie7:! class='ie7_anon %1' ie7_anon style='%2'>%3</ie7:!>";
+
+// -----------------------------------------------------------------------
+//  IE7 dynamic pseudo-classes
+// -----------------------------------------------------------------------
+
+// constructor
+function DynamicPseudoClass($name, $apply) {
+	this.name = $name;
+	this.apply = $apply;
+	this.instances = {};
+	ie7CSS.dynamicPseudoClasses[$name] = this;
+};
+// prototype
+Common.specialize({
+	// properties
+	constructor: DynamicPseudoClass,
+//- name: "",
+//- apply: null,
+//- instances: null,
+	// methods
+	register: function($instance) {
+		// an "instance" is actually an Arguments object
+		var $class = $instance[2];
+	//-	var $element = $instance[0];
+		$instance.id = $class.id + $instance[0].uniqueID;
+		if (!this.instances[$instance.id]) {
+			var $target = $instance[1], j;
+			for (j = 0; j < $target.length; j++) $class.add($target[j]);
+			this.instances[$instance.id] = $instance;
+		}
+	},
+	unregister: function($instance) {
+		if (this.instances[$instance.id]) {
+			var $class = $instance[2];
+			var $target = $instance[1], j;
+			for (j = 0; j < $target.length; j++) $class.remove($target[j]);
+			delete this.instances[$instance.id];
+		}
+	}
+});
+
+// -----------------------------------------------------------------------
+// pseudo-classes
+// -----------------------------------------------------------------------
+
+ie7CSS.pseudoClasses.toString = function() {
+	var $toString = [], $pseudoClass;
+	for ($pseudoClass in this) {
+		if (this[$pseudoClass].length > 1) $pseudoClass += "\\([^)]*\\)";
+		$toString.push($pseudoClass);
+	}
+	return $toString.join("|");
+};
+
+// the "ie7-link" property is set by text contained in the IE7 generated
+//  style sheet (the text is stored in the "HEADER")
+ie7CSS.pseudoClasses["link"] = function($element) {
+	return $element.currentStyle["ie7-link"] == "link";
+};
+
+ie7CSS.pseudoClasses["visited"] = function($element) {
+	return $element.currentStyle["ie7-link"] == "visited";
+};
+
+// -----------------------------------------------------------------------
+// dynamic pseudo-classes
+// -----------------------------------------------------------------------
+
+var _MOUSEOVER = (appVersion < 5.5) ? "onmouseover" : "onmouseenter";
+var _MOUSEOUT = (appVersion < 5.5) ? "onmouseout" : "onmouseleave";
+
+ie7CSS.dynamicPseudoClasses.toString = ie7CSS.pseudoClasses.toString;
+
+var _hover = new DynamicPseudoClass("hover", function($element) {
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, _MOUSEOVER, function() {
+		_hover.register($instance);
+	});
+	ie7CSS.addEventHandler($element, _MOUSEOUT, function() {
+		_hover.unregister($instance);
+	});
+});
+
+var _focus = new DynamicPseudoClass("focus", function($element) {
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, "onfocus", function() {
+		_focus.unregister($instance); // in case it starts with focus
+		_focus.register($instance);
+	});
+	ie7CSS.addEventHandler($element, "onblur", function() {
+		_focus.unregister($instance);
+	});
+	// check the active element for initial state
+	if ($element == document.activeElement) {
+		_focus.register($instance)
+	}
+});
+
+var _active = new DynamicPseudoClass("active", function($element) {
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, "onmousedown", function() {
+		_active.register($instance);
+	});
+});
+
+// globally trap the mouseup event (thanks Martijn!)
+addEventHandler(document, "onmouseup", function() {
+	var $instances = _active.instances, j;
+	for (j in $instances) _active.unregister($instances[j]);
+	$instances = _hover.instances;
+	for (j in $instances)
+		if (!$instances[j][0].contains(event.srcElement))
+			_hover.unregister($instances[j]);
+});
+
+// -----------------------------------------------------------------------
+// attribute selectors
+// -----------------------------------------------------------------------
+
+ICommon(AttributeSelector);
+
+AttributeSelector.specialize({
+	getAttribute: function($name) {
+		switch ($name.toLowerCase()) {
+			case "class":
+				return "e.className.replace(/\\b\\s*ie7_class\\d+/g,'')";
+			case "src":
+				return "(e.pngSrc||e.src)";
+		}
+		return this.inherit($name);
+	}
+});
+
+// -----------------------------------------------------------------------
+// encoding
+// -----------------------------------------------------------------------
+
+// pseudo-elements can be declared with a double colon
+encoder.add(/::/, ":");
+// generated content may be unicode encoded
+safeString.add(/\\([\da-fA-F]{1,4})/, function($match, $offset) {
+	$match = $match[$offset + 1];
+	return "\\u" + "0000".slice($match.length) + $match;
+});
+
+}); // IE7.addModule

Modified: jifty/trunk/share/web/static/js/ie7/ie7-css3-selectors.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-css3-selectors.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-css3-selectors.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,253 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-css3-selectors",function(){cssQuery.addModule("css-level3",function(){selectors["~"]=function(r,f,t,n){var e,i;for(i=0;(e=f[i]);i++){while(e=nextElementSibling(e)){if(compareTagName(e,t,n))r.push(e)}}};pseudoClasses["contains"]=function(e,t){t=new RegExp(regEscape(getText(t)));return t.test(getTextContent(e))};pseudoClasses["root"]=function(e){return e==getDocument(e).documentElement};pseudoClasses["empty"]=function(e){var n,i;for(i=0;(n=e.childNodes[i]);i++){if(thisElement(n)||n.nodeType==3)return false}return true};pseudoClasses["last-child"]=function(e){return!nextElementSibling(e)};pseudoClasses["only-child"]=function(e){e=e.parentNode;return firstElementChild(e)==lastElementChild(e)};pseudoClasses["not"]=function(e,s){var n=cssQuery(s,getDocument(e));for(var i=0;i<n.length;i++){if(n[i]==e)return false}return true};pseudoClasses["nth-child"]=function(e,a){return nthChild(e,a,previousElementSibling)};pseudoClasses["nth-last-child"]=function(e,a){return nthChild(e,a,nextElementSibling)};pseudoClasses["target"]=function(e){return e.id==location.hash.slice(1)};pseudoClasses["checked"]=function(e){return e.checked};pseudoClasses["enabled"]=function(e){return e.disabled===false};pseudoClasses["disabled"]=function(e){return e.disabled};pseudoClasses["indeterminate"]=function(e){return e.indeterminate};AttributeSelector.tests["^="]=function(a,v){return"/^"+regEscape(v)+"/.test("+a+")"};AttributeSelector.tests["$="]=function(a,v){return"/"+regEscape(v)+"$/.test("+a+")"};AttributeSelector.tests["*="]=function(a,v){return"/"+regEscape(v)+"/.test("+a+")"};function nthChild(e,a,t){switch(a){case"n":return true;case"even":a="2n";break;case"odd":a="2n+1"}var ch=childElements(e.parentNode);function _5(i){var i=(t==nextElementSibling)?ch.length-i:i-1;return ch[i]==e};if(!isNaN(a))return _5(a);a=a.split("n");var m=parseInt(a[0]);var s=parseInt(a[1]);if((isNaN(m)||m==1)&&s==0)return true;if(m==0&&!isNaN(s))return _5(s);if(isNaN(s))s=0;var c=1;while(e=t(e))c++;if(isNaN(m)||m==1)return(t==nextElementSibling)?(c<=s):(s>=c);return(c%m)==s}});var firstElementChild=cssQuery.valueOf("firstElementChild");ie7CSS.pseudoClasses["root"]=function(e){return(e==viewport)||(!isHTML&&e==firstElementChild(body))};var _4=new ie7CSS.DynamicPseudoClass("checked",function(e){if(typeof e.checked!="boolean")return;var i=arguments;ie7CSS.addEventHandler(e,"onpropertychange",function(){if(event.propertyName=="checked"){if(e.checked)_4.register(i);else _4.unregister(i)}});if(e.checked)_4.register(i)});var _3=new ie7CSS.DynamicPseudoClass("enabled",function(e){if(typeof e.disabled!="boolean")return;var i=arguments;ie7CSS.addEventHandler(e,"onpropertychange",function(){if(event.propertyName=="disabled"){if(!e.isDisabled)_3.register(i);else _3.unregister(i)}});if(!e.isDisabled)_3.register(i)});var _2=new ie7CSS.DynamicPseudoClass("disabled",function(e){if(typeof e.disabled!="boolean")return;var i=arguments;ie7CSS.addEventHandler(e,"onpropertychange",function(){if(event.propertyName=="disabled"){if(e.isDisabled)_2.register(i);else _2.unregister(i)}});if(e.isDisabled)_2.register(i)});var _1=new ie7CSS.DynamicPseudoClass("indeterminate",function(e){if(typeof e.indeterminate!="boolean")return;var i=arguments;ie7CSS.addEventHandler(e,"onpropertychange",function(){if(event.propertyName=="indeterminate"){if(e.indeterminate)_1.register(i);else _1.unregister(i)}});ie7CSS.addEventHandler(e,"onclick",function(){_1.unregister(i)})});var _0=new ie7CSS.DynamicPseudoClass("target",function(e){var i=arguments;if(!e.tabIndex)e.tabIndex=0;ie7CSS.addEventHandler(document,"onpropertychange",function(){if(event.propertyName=="activeElement"){if(e.id==location.hash.slice(1))_0.register(i);else _0.unregister(i)}});if(e.id==location.hash.slice(1))_0.register(i)});decoder.add(/\|/,"\\:")});
+
+IE7.addModule("ie7-css3-selectors", function() {
+
+/*
+	cssQuery, version 2.0.2 (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+/* Thanks to Bill Edney */
+
+cssQuery.addModule("css-level3", function() {
+
+// -----------------------------------------------------------------------
+// selectors
+// -----------------------------------------------------------------------
+
+// indirect sibling selector
+selectors["~"] = function($results, $from, $tagName, $namespace) {
+	var $element, i;
+	for (i = 0; ($element = $from[i]); i++) {
+		while ($element = nextElementSibling($element)) {
+			if (compareTagName($element, $tagName, $namespace))
+				$results.push($element);
+		}
+	}
+};
+
+// -----------------------------------------------------------------------
+// pseudo-classes
+// -----------------------------------------------------------------------
+
+// I'm hoping these pseudo-classes are pretty readable. Let me know if
+//  any need explanation.
+
+pseudoClasses["contains"] = function($element, $text) {
+	$text = new RegExp(regEscape(getText($text)));
+	return $text.test(getTextContent($element));
+};
+
+pseudoClasses["root"] = function($element) {
+	return $element == getDocument($element).documentElement;
+};
+
+pseudoClasses["empty"] = function($element) {
+	var $node, i;
+	for (i = 0; ($node = $element.childNodes[i]); i++) {
+		if (thisElement($node) || $node.nodeType == 3) return false;
+	}
+	return true;
+};
+
+pseudoClasses["last-child"] = function($element) {
+	return !nextElementSibling($element);
+};
+
+pseudoClasses["only-child"] = function($element) {
+	$element = $element.parentNode;
+	return firstElementChild($element) == lastElementChild($element);
+};
+
+pseudoClasses["not"] = function($element, $selector) {
+	var $negated = cssQuery($selector, getDocument($element));
+	for (var i = 0; i < $negated.length; i++) {
+		if ($negated[i] == $element) return false;
+	}
+	return true;
+};
+
+pseudoClasses["nth-child"] = function($element, $arguments) {
+	return nthChild($element, $arguments, previousElementSibling);
+};
+
+pseudoClasses["nth-last-child"] = function($element, $arguments) {
+	return nthChild($element, $arguments, nextElementSibling);
+};
+
+pseudoClasses["target"] = function($element) {
+	return $element.id == location.hash.slice(1);
+};
+
+// UI element states
+
+pseudoClasses["checked"] = function($element) {
+	return $element.checked;
+};
+
+pseudoClasses["enabled"] = function($element) {
+	return $element.disabled === false;
+};
+
+pseudoClasses["disabled"] = function($element) {
+	return $element.disabled;
+};
+
+pseudoClasses["indeterminate"] = function($element) {
+	return $element.indeterminate;
+};
+
+// -----------------------------------------------------------------------
+//  attribute selector tests
+// -----------------------------------------------------------------------
+
+AttributeSelector.tests["^="] = function($attribute, $value) {
+	return "/^" + regEscape($value) + "/.test(" + $attribute + ")";
+};
+
+AttributeSelector.tests["$="] = function($attribute, $value) {
+	return "/" + regEscape($value) + "$/.test(" + $attribute + ")";
+};
+
+AttributeSelector.tests["*="] = function($attribute, $value) {
+	return "/" + regEscape($value) + "/.test(" + $attribute + ")";
+};
+
+// -----------------------------------------------------------------------
+//  nth child support (Bill Edney)
+// -----------------------------------------------------------------------
+
+function nthChild($element, $arguments, $traverse) {
+	switch ($arguments) {
+		case "n": return true;
+		case "even": $arguments = "2n"; break;
+		case "odd": $arguments = "2n+1";
+	}
+
+	var $$children = childElements($element.parentNode);
+	function _checkIndex($index) {
+		var $index = ($traverse == nextElementSibling) ? $$children.length - $index : $index - 1;
+		return $$children[$index] == $element;
+	};
+
+	//	it was just a number (no "n")
+	if (!isNaN($arguments)) return _checkIndex($arguments);
+
+	$arguments = $arguments.split("n");
+	var $multiplier = parseInt($arguments[0]);
+	var $step = parseInt($arguments[1]);
+
+	if ((isNaN($multiplier) || $multiplier == 1) && $step == 0) return true;
+	if ($multiplier == 0 && !isNaN($step)) return _checkIndex($step);
+	if (isNaN($step)) $step = 0;
+
+	var $count = 1;
+	while ($element = $traverse($element)) $count++;
+
+	if (isNaN($multiplier) || $multiplier == 1)
+		return ($traverse == nextElementSibling) ? ($count <= $step) : ($step >= $count);
+
+	return ($count % $multiplier) == $step;
+};
+
+}); // addModule
+var firstElementChild = cssQuery.valueOf("firstElementChild");
+
+// -----------------------------------------------------------------------
+// pseudo-classes
+// -----------------------------------------------------------------------
+
+ie7CSS.pseudoClasses["root"] = function($element) {
+	return ($element == viewport) || (!isHTML && $element == firstElementChild(body));
+};
+
+// -----------------------------------------------------------------------
+// dynamic pseudo-classes
+// -----------------------------------------------------------------------
+
+// :checked
+var _checked = new ie7CSS.DynamicPseudoClass("checked", function($element) {
+	if (typeof $element.checked != "boolean") return;
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, "onpropertychange", function() {
+		if (event.propertyName == "checked") {
+			if ($element.checked) _checked.register($instance);
+			else _checked.unregister($instance);
+		}
+	});
+	// check current checked state
+	if ($element.checked) _checked.register($instance);
+});
+
+// :enabled
+var _enabled = new ie7CSS.DynamicPseudoClass("enabled", function($element) {
+	if (typeof $element.disabled != "boolean") return;
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, "onpropertychange", function() {
+		if (event.propertyName == "disabled") {
+			if (!$element.isDisabled) _enabled.register($instance);
+			else _enabled.unregister($instance);
+		}
+	});
+	// check current disabled state
+	if (!$element.isDisabled) _enabled.register($instance);
+});
+
+// :disabled
+var _disabled = new ie7CSS.DynamicPseudoClass("disabled", function($element) {
+	if (typeof $element.disabled != "boolean") return;
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, "onpropertychange", function() {
+		if (event.propertyName == "disabled") {
+			if ($element.isDisabled) _disabled.register($instance);
+			else _disabled.unregister($instance);
+		}
+	});
+	// check current disabled state
+	if ($element.isDisabled) _disabled.register($instance);
+});
+
+// :indeterminate (Kevin Newman)
+var _indeterminate = new ie7CSS.DynamicPseudoClass("indeterminate", function($element) {
+	if (typeof $element.indeterminate != "boolean") return;
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, "onpropertychange", function() {
+		if (event.propertyName == "indeterminate") {
+			if ($element.indeterminate) _indeterminate.register($instance);
+			else _indeterminate.unregister($instance);
+		}
+	});
+	ie7CSS.addEventHandler($element, "onclick", function() {
+		_indeterminate.unregister($instance);
+	});
+	// clever Kev says no need to check this up front
+});
+
+// :target
+var _target = new ie7CSS.DynamicPseudoClass("target", function($element) {
+	var $instance = arguments;
+	// if an element has a tabIndex then it can become "active".
+	//  The default is zero anyway but it works...
+	if (!$element.tabIndex) $element.tabIndex = 0;
+	// this doesn't detect the back button. I don't know how to do that :-(
+	ie7CSS.addEventHandler(document, "onpropertychange", function() {
+		if (event.propertyName == "activeElement") {
+			if ($element.id == location.hash.slice(1)) _target.register($instance);
+			else _target.unregister($instance);
+		}
+	});
+	// check the current location
+	if ($element.id == location.hash.slice(1)) _target.register($instance);
+});
+
+// -----------------------------------------------------------------------
+// encoding
+// -----------------------------------------------------------------------
+
+// CSS namespaces
+decoder.add(/\|/, "\\:");
+
+}); // IE7.addModule

Modified: jifty/trunk/share/web/static/js/ie7/ie7-dhtml.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-dhtml.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-dhtml.js	Fri Apr 14 10:38:57 2006
@@ -9,6 +9,7 @@
   This module is still in development and should not be used.
 --------------------------------------------------------------------- */
 
+
 ie7CSS.specialize("recalc", function() {
 	this.inherit();
 	for (var i = 0; i < this.recalcs.length; i++) {

Modified: jifty/trunk/share/web/static/js/ie7/ie7-dynamic-attributes.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-dynamic-attributes.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-dynamic-attributes.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,88 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-dynamic-attributes",function(){if(!modules["ie7-css2-selectors"])return;var attributeSelectors=cssQuery.valueOf("attributeSelectors");var parseSelector=cssQuery.valueOf("parseSelector");function DynamicAttribute(s,a,d,t,c){this.attach=a||"*";parseSelector(d);this.dynamicAttribute=attributeSelectors["@"+d];this.target=t;this.inherit(s,c)};ie7CSS.Rule.specialize({constructor:DynamicAttribute,recalc:function(){var m=cssQuery(this.attach);for(var i=0;i<m.length;i++){var t=(this.target)?cssQuery(this.target,m[i]):[m[i]];if(t.length)this.apply(m[i],t)}},apply:function(e,t){var self=this;addEventHandler(e,"onpropertychange",function(){if(event.propertyName==self.dynamicAttribute.name)self.test(e,t)});this.test(e,t)},test:function(e,t){var a=this.dynamicAttribute.test(e)?"add":"remove";for(var i=0;(e=t[i]);i++)this[a](e)}});DynamicAttribute.MATCH=/(.*)(\[[^\]]*\])(.*)/;StyleSheet.prototype.specialize({createRule:function(s,c){var m;if(m=s.match(DynamicAttribute.MATCH)){return new DynamicAttribute(s,m[1],m[2],m[3],c)}else return this.inherit(s,c)}})});
+
+IE7.addModule("ie7-dynamic-attributes", function() {
+
+// -----------------------------------------------------------------------
+// IE7 Dynamic Attribute Class
+// -----------------------------------------------------------------------
+
+// requires another module
+if (!modules["ie7-css2-selectors"]) return;
+
+/* ---
+
+// Class properties:
+// attach: the element(s) that a dynamic attribute selector will be attached to
+// target: the element(s) that will have the IE7 class applied
+
+For example:
+  fieldset p.required > input[value=""] + sup {color: red;}
+In this example attach="fieldset p.required > input" and target="+ sup".
+
+--- */
+
+// cssQuery internals
+var attributeSelectors = cssQuery.valueOf("attributeSelectors");
+var parseSelector = cssQuery.valueOf("parseSelector");
+
+// constructor
+function DynamicAttribute($selector, $attach, $dynamicAttribute, $target, $cssText) {
+	// initialise object properties
+	this.attach = $attach || "*";
+	parseSelector($dynamicAttribute);
+	this.dynamicAttribute = attributeSelectors["@" + $dynamicAttribute];
+	this.target = $target;
+	this.inherit($selector, $cssText);
+};
+// protoytype
+ie7CSS.Rule.specialize({
+	// properties
+	constructor: DynamicAttribute,
+//- attach: "",
+//- dynamicAttribute: null,
+//- target: "",
+	// methods
+	recalc: function() {
+		// execute the underlying css query for this class
+		var $match = cssQuery(this.attach);
+		// process results
+		for (var i = 0; i < $match.length; i++) {
+			// retrieve the event handler's target element(s)
+			var $target = (this.target) ? cssQuery(this.target, $match[i]) : [$match[i]];
+			// attach event handlers for dynamic attributes
+			if ($target.length) this.apply($match[i], $target);
+		}
+	},
+	apply: function($element, $target) {
+		var self = this;
+		// watch property changes
+		addEventHandler($element, "onpropertychange", function() {
+			// check the attribute name
+			if (event.propertyName == self.dynamicAttribute.name)
+				// turn the selector on/off
+				self.test($element, $target);
+		});
+		this.test($element, $target);
+	},
+	test: function($element, $target) {
+		var $action = this.dynamicAttribute.test($element) ? "add" : "remove";
+		for (var i = 0; ($element = $target[i]); i++) this[$action]($element);
+
+	}
+});
+// constants
+DynamicAttribute.MATCH = /(.*)(\[[^\]]*\])(.*)/;
+
+// intercept creation of IE7 rules
+StyleSheet.prototype.specialize({
+	createRule: function($selector, $cssText) {
+		var $match;
+		if ($match = $selector.match(DynamicAttribute.MATCH)) {
+			return new DynamicAttribute($selector, $match[1], $match[2], $match[3], $cssText);
+		} else return this.inherit($selector, $cssText);
+	}
+});
+
+}); // addModule

Modified: jifty/trunk/share/web/static/js/ie7/ie7-fixed.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-fixed.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-fixed.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,245 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-fixed",function(){ie7CSS.addRecalc("position","fixed",_6,"absolute");ie7CSS.addRecalc("background(-attachment)?","[^};]*fixed",_7);var _10=(quirksMode)?"body":"documentElement";var _8=function(){if(body.currentStyle.backgroundAttachment!="fixed"){if(body.currentStyle.backgroundImage=="none"){body.runtimeStyle.backgroundRepeat="no-repeat";body.runtimeStyle.backgroundImage="url("+BLANK_GIF+")"}body.runtimeStyle.backgroundAttachment="fixed"}_8=DUMMY};var _0=createTempElement("img");function _1(f){return _2.exec(String(f))};var _2=new ParseMaster;_2.add(/Left/,"Top");_2.add(/left/,"top");_2.add(/Width/,"Height");_2.add(/width/,"height");_2.add(/right/,"bottom");_2.add(/X/,"Y");function _3(e){return(e)?isFixed(e)||_3(e.parentElement):false};function setExpression(e,p,ex){setTimeout("document.all."+e.uniqueID+".runtimeStyle.setExpression('"+p+"','"+ex+"')",0)};function _7(e){if(register(_7,e,e.currentStyle.backgroundAttachment=="fixed"&&!e.contains(body))){_8();backgroundLeft(e);backgroundTop(e);_9(e)}};function _9(e){_0.src=e.currentStyle.backgroundImage.slice(5,-2);var p=(e.canHaveChildren)?e:e.parentElement;p.appendChild(_0);setOffsetLeft(e);setOffsetTop(e);p.removeChild(_0)};function backgroundLeft(e){e.style.backgroundPositionX=e.currentStyle.backgroundPositionX;if(!_3(e)){var ex="(parseInt(runtimeStyle.offsetLeft)+document."+_10+".scrollLeft)||0";setExpression(e,"backgroundPositionX",ex)}};eval(_1(backgroundLeft));function setOffsetLeft(e){var p=_3(e)?"backgroundPositionX":"offsetLeft";e.runtimeStyle[p]=getOffsetLeft(e,e.style.backgroundPositionX)-e.getBoundingClientRect().left-e.clientLeft+2};eval(_1(setOffsetLeft));function getOffsetLeft(e,p){switch(p){case"left":case"top":return 0;case"right":case"bottom":return viewport.clientWidth-_0.offsetWidth;case"center":return(viewport.clientWidth-_0.offsetWidth)/2;default:if(PERCENT.test(p)){return parseInt((viewport.clientWidth-_0.offsetWidth)*parseFloat(p)/100)}_0.style.left=p;return _0.offsetLeft}};eval(_1(getOffsetLeft));function _6(e){if(register(_6,e,isFixed(e))){setOverrideStyle(e,"position","absolute");setOverrideStyle(e,"left",e.currentStyle.left);setOverrideStyle(e,"top",e.currentStyle.top);_8();if(ie7Layout)ie7Layout.fixRight(e);_5(e)}};function _5(e,r){positionTop(e,r);positionLeft(e,r,true);if(!e.runtimeStyle.autoLeft&&e.currentStyle.marginLeft=="auto"&&e.currentStyle.right!="auto"){var l=viewport.clientWidth-getPixelWidth(e,e.currentStyle.right)-getPixelWidth(e,e.runtimeStyle._12)-e.clientWidth;if(e.currentStyle.marginRight=="auto")l=parseInt(l/2);if(_3(e.offsetParent))e.runtimeStyle.pixelLeft+=l;else e.runtimeStyle.shiftLeft=l}clipWidth(e);clipHeight(e)};function clipWidth(e){if(e.currentStyle.width!="auto"){var r=e.getBoundingClientRect();var w=e.offsetWidth-viewport.clientWidth+r.left-2;if(w>=0){w=Math.max(getPixelValue(e,e.currentStyle.width)-w,0);setOverrideStyle(e,"width",w)}}};eval(_1(clipWidth));function positionLeft(e,r){if(!r&&PERCENT.test(e.currentStyle.width)){e.runtimeStyle.fixWidth=e.currentStyle.width}if(e.runtimeStyle.fixWidth){e.runtimeStyle.width=getPixelWidth(e,e.runtimeStyle.fixWidth)}if(r){if(!e.runtimeStyle.autoLeft)return}else{e.runtimeStyle.shiftLeft=0;e.runtimeStyle._12=e.currentStyle.left;e.runtimeStyle.autoLeft=e.currentStyle.right!="auto"&&e.currentStyle.left=="auto"}e.runtimeStyle.left="";e.runtimeStyle.screenLeft=getScreenLeft(e);e.runtimeStyle.pixelLeft=e.runtimeStyle.screenLeft;if(!r&&!_3(e.offsetParent)){var ex="runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document."+_10+".scrollLeft";setExpression(e,"pixelLeft",ex)}};eval(_1(positionLeft));function getScreenLeft(e){var s=e.offsetLeft,n=1;if(e.runtimeStyle.autoLeft){s=viewport.clientWidth-e.offsetWidth-getPixelWidth(e,e.currentStyle.right)}if(e.currentStyle.marginLeft!="auto"){s-=getPixelWidth(e,e.currentStyle.marginLeft)}while(e=e.offsetParent){if(e.currentStyle.position!="static")n=-1;s+=e.offsetLeft*n}return s};eval(_1(getScreenLeft));function getPixelWidth(e,v){if(PERCENT.test(v))return parseInt(parseFloat(v)/100*viewport.clientWidth);return getPixelValue(e,v)};eval(_1(getPixelWidth));function _11(){var e=_7.elements;for(var i in e)_9(e[i]);e=_6.elements;for(i in e){_5(e[i],true);_5(e[i],true)}_4=0};var _4;addResize(function(){if(!_4)_4=setTimeout(_11,0)})});
\ No newline at end of file
+IE7.addModule("ie7-fixed", function() {
+	// some things to consider for this hack.
+	// the document body requires a fixed background. even if
+	//  it is just a blank image.
+	// you have to use setExpression instead of onscroll, this
+	//  together with a fixed body background helps avoid the
+	//  annoying screen flicker of other solutions.
+
+	ie7CSS.addRecalc("position", "fixed", _positionFixed, "absolute");
+	ie7CSS.addRecalc("background(-attachment)?", "[^};]*fixed", _backgroundFixed);
+
+	// scrolling is relative to the documentElement (HTML tag) when in
+	//  standards mode, otherwise it's relative to the document body
+	var _viewport = (quirksMode) ? "body" : "documentElement";
+
+	var _fixBackground = function() {
+		// this is required by both position:fixed and background-attachment:fixed.
+		// it is necessary for the document to also have a fixed background image.
+		// we can fake this with a blank image if necessary
+		if (body.currentStyle.backgroundAttachment != "fixed") {
+			if (body.currentStyle.backgroundImage == "none") {
+				body.runtimeStyle.backgroundRepeat = "no-repeat";
+				body.runtimeStyle.backgroundImage = "url(" + BLANK_GIF + ")"; // dummy
+			}
+			body.runtimeStyle.backgroundAttachment = "fixed";
+		}
+		_fixBackground = DUMMY;
+	};
+
+	var _tmp = createTempElement("img");
+
+	// clone a "left" function to create a "top" function
+	function _rotate($function) {
+		return _rotater.exec(String($function));
+	};
+	var _rotater = new ParseMaster;
+	_rotater.add(/Left/, "Top");
+	_rotater.add(/left/, "top");
+	_rotater.add(/Width/, "Height");
+	_rotater.add(/width/, "height");
+	_rotater.add(/right/, "bottom");
+	_rotater.add(/X/, "Y");
+
+	function _isFixed($element) {
+		return ($element) ? isFixed($element) || _isFixed($element.parentElement) : false;
+	};
+
+	function setExpression($element, $propertyName, $$expression) {
+		setTimeout("document.all." + $element.uniqueID + ".runtimeStyle.setExpression('" +
+			$propertyName + "','" + $$expression + "')", 0);
+	};
+
+// -----------------------------------------------------------------------
+//  backgroundAttachment: fixed
+// -----------------------------------------------------------------------
+
+	function _backgroundFixed($element) {
+		if (register(_backgroundFixed, $element,
+			$element.currentStyle.backgroundAttachment == "fixed" && !$element.contains(body))) {
+				_fixBackground();
+				backgroundLeft($element);
+				backgroundTop($element);
+				_backgroundPosition($element);
+		}
+	};
+
+	function _backgroundPosition($element) {
+		_tmp.src = $element.currentStyle.backgroundImage.slice(5, -2);
+		var $parentElement = ($element.canHaveChildren) ? $element : $element.parentElement;
+		$parentElement.appendChild(_tmp);
+		setOffsetLeft($element);
+		setOffsetTop($element);
+		$parentElement.removeChild(_tmp);
+	};
+
+	function backgroundLeft($element) {
+		$element.style.backgroundPositionX = $element.currentStyle.backgroundPositionX;
+		if (!_isFixed($element)) {
+			var $$expression = "(parseInt(runtimeStyle.offsetLeft)+document." +
+				 _viewport + ".scrollLeft)||0";
+			setExpression($element, "backgroundPositionX", $$expression);
+		}
+	};
+	eval(_rotate(backgroundLeft));
+
+	function setOffsetLeft($element) {
+		var $propertyName = _isFixed($element) ? "backgroundPositionX" : "offsetLeft";
+		$element.runtimeStyle[$propertyName] =
+			getOffsetLeft($element, $element.style.backgroundPositionX) -
+			$element.getBoundingClientRect().left - $element.clientLeft + 2;
+	};
+	eval(_rotate(setOffsetLeft));
+
+	function getOffsetLeft($element, $position) {
+		switch ($position) {
+			case "left":
+			case "top":
+				return 0;
+			case "right":
+			case "bottom":
+				return viewport.clientWidth - _tmp.offsetWidth;
+			case "center":
+				return (viewport.clientWidth - _tmp.offsetWidth) / 2;
+			default:
+				if (PERCENT.test($position)) {
+					return parseInt((viewport.clientWidth - _tmp.offsetWidth) *
+						parseFloat($position) / 100);
+				}
+				_tmp.style.left = $position;
+				return _tmp.offsetLeft;
+		}
+	};
+	eval(_rotate(getOffsetLeft));
+
+// -----------------------------------------------------------------------
+//  position: fixed
+// -----------------------------------------------------------------------
+
+	function _positionFixed($element) {
+		if (register(_positionFixed, $element, isFixed($element))) {
+			setOverrideStyle($element, "position",  "absolute");
+			setOverrideStyle($element, "left",  $element.currentStyle.left);
+			setOverrideStyle($element, "top",  $element.currentStyle.top);
+			_fixBackground();
+			if (ie7Layout) ie7Layout.fixRight($element);
+			_foregroundPosition($element);
+		}
+	};
+
+	function _foregroundPosition($element, $recalc) {
+		positionTop($element, $recalc);
+		positionLeft($element, $recalc, true);
+		if (!$element.runtimeStyle.autoLeft && $element.currentStyle.marginLeft == "auto" &&
+			$element.currentStyle.right != "auto") {
+			var $left = viewport.clientWidth - getPixelWidth($element, $element.currentStyle.right) -
+				getPixelWidth($element, $element.runtimeStyle._left) - $element.clientWidth;
+			if ($element.currentStyle.marginRight == "auto") $left = parseInt($left / 2);
+			if (_isFixed($element.offsetParent)) $element.runtimeStyle.pixelLeft += $left;
+			else $element.runtimeStyle.shiftLeft = $left;
+		}
+		clipWidth($element);
+		clipHeight($element);
+	};
+
+	function clipWidth($element) {
+		if ($element.currentStyle.width != "auto") {
+			var $rect = $element.getBoundingClientRect();
+			var $width = $element.offsetWidth - viewport.clientWidth + $rect.left - 2;
+			if ($width >= 0) {
+				$width = Math.max(getPixelValue($element, $element.currentStyle.width) - $width, 0);
+				setOverrideStyle($element, "width",	$width);
+			}
+		}
+	};
+	eval(_rotate(clipWidth));
+
+	function positionLeft($element, $recalc) {
+		// if the element's width is in % units then it must be recalculated
+		//  with respect to the viewport
+		if (!$recalc && PERCENT.test($element.currentStyle.width)) {
+			$element.runtimeStyle.fixWidth = $element.currentStyle.width;
+		}
+		if ($element.runtimeStyle.fixWidth) {
+			$element.runtimeStyle.width = getPixelWidth($element, $element.runtimeStyle.fixWidth);
+		}
+		if ($recalc) {
+			// if the element is fixed on the right then no need to recalculate
+			if (!$element.runtimeStyle.autoLeft) return;
+		} else {
+			$element.runtimeStyle.shiftLeft = 0;
+			$element.runtimeStyle._left = $element.currentStyle.left;
+			// is the element fixed on the right?
+			$element.runtimeStyle.autoLeft = $element.currentStyle.right != "auto" &&
+				$element.currentStyle.left == "auto";
+		}
+		// reset the element's "left" value and get it's natural position
+		$element.runtimeStyle.left = "";
+		$element.runtimeStyle.screenLeft = getScreenLeft($element);
+		$element.runtimeStyle.pixelLeft = $element.runtimeStyle.screenLeft;
+		// if the element is contained by another fixed element then there is no need to
+		//  continually recalculate it's left position
+		if (!$recalc && !_isFixed($element.offsetParent)) {
+			// onsrcoll produces jerky movement, so we use an expression
+			var $$expression = "runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document." +
+				_viewport + ".scrollLeft";
+			setExpression($element, "pixelLeft", $$expression);
+		}
+	};
+	// clone this function so we can do "top"
+	eval(_rotate(positionLeft));
+
+	// i've forgotten how this works...
+	function getScreenLeft($element) { // thanks to kevin newman (captainn)
+		var $screenLeft = $element.offsetLeft, $nested = 1;
+		if ($element.runtimeStyle.autoLeft) {
+			$screenLeft = viewport.clientWidth - $element.offsetWidth -
+				getPixelWidth($element, $element.currentStyle.right);
+		}
+		// accommodate margins
+		if ($element.currentStyle.marginLeft != "auto") {
+			$screenLeft -= getPixelWidth($element, $element.currentStyle.marginLeft);
+		}
+		while ($element = $element.offsetParent) {
+			if ($element.currentStyle.position != "static") $nested = -1;
+			$screenLeft += $element.offsetLeft * $nested;
+		}
+		return $screenLeft;
+	};
+	eval(_rotate(getScreenLeft));
+
+	function getPixelWidth($element, $value) {
+		if (PERCENT.test($value)) return parseInt(parseFloat($value) / 100 * viewport.clientWidth);
+		return getPixelValue($element, $value);
+	};
+	eval(_rotate(getPixelWidth));
+
+// -----------------------------------------------------------------------
+//  capture window resize
+// -----------------------------------------------------------------------
+
+	function _resize() {
+		// if the window has been resized then some positions need to be
+		//  recalculated (especially those aligned to "right" or "top"
+		var $elements = _backgroundFixed.elements;
+		for (var i in $elements) _backgroundPosition($elements[i]);
+		$elements = _positionFixed.elements;
+		for (i in $elements) {
+			_foregroundPosition($elements[i], true);
+			// do this twice to be sure - hackish, I know :-)
+			_foregroundPosition($elements[i], true);
+		}
+		_timer = 0;
+	};
+
+	// use a timer for some reason.
+	//  (sometimes this is a good way to prevent resize loops)
+	var _timer;
+	addResize(function() {
+		if (!_timer) _timer = setTimeout(_resize, 0);
+	});
+
+});
\ No newline at end of file

Modified: jifty/trunk/share/web/static/js/ie7/ie7-graphics.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-graphics.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-graphics.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,134 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-graphics",function(){if(appVersion<5.5)return;var A="DXImageTransform.Microsoft.AlphaImageLoader";var F="progid:"+A+"(src='%1',sizingMethod='scale')";var _3=new RegExp((window.IE7_PNG_SUFFIX||"-trans.png")+"$","i");var _0=[];function _2(e){var f=e.filters[A];if(f){f.src=e.src;f.enabled=true}else{e.runtimeStyle.filter=F.replace(/%1/,e.src);_0.push(e)}e.src=BLANK_GIF};function _5(e){e.src=e.pngSrc;e.filters[A].enabled=false};ie7CSS.addFix(/opacity\s*:\s*([\d.]+)/,function(m,o){return"zoom:1;filter:progid:DXImageTransform.Microsoft.Alpha(opacity="+((parseFloat(m[o+1])*100)||1)+")"});var B=/background(-image)?\s*:\s*([^\(};]*)url\(([^\)]+)\)([^;}]*)/;ie7CSS.addFix(B,function(m,o){var u=getString(m[o+3]);return _3.test(u)?"filter:"+F.replace(/scale/,"crop").replace(/%1/,u)+";zoom:1;background"+(m[o+1]||"")+":"+(m[o+2]||"")+"none"+(m[o+4]||""):m[o]});if(ie7HTML){ie7HTML.addRecalc("img,input",function(e){if(e.tagName=="INPUT"&&e.type!="image")return;_4(e);addEventHandler(e,"onpropertychange",function(){if(!_1&&event.propertyName=="src"&&e.src.indexOf(BLANK_GIF)==-1)_4(e)})});var B64=/^data:.*;base64/i;var _7=makePath("ie7-base64.php",path);function _4(e){if(_3.test(e.src)){var i=new Image(e.width,e.height);i.onload=function(){e.width=i.width;e.height=i.height;i=null};i.src=e.src;e.pngSrc=e.src;_2(e)}else if(B64.test(e.src)){e.src=_7+"?"+e.src.slice(5)}};var I=/^image/i;var _6=makePath("ie7-object.htc",path);ie7HTML.addRecalc("object",function(e){if(I.test(e.type)){var o=document.createElement("<object type=text/x-scriptlet>");o.style.width=e.currentStyle.width;o.style.height=e.currentStyle.height;o.data=_6;var u=makePath(e.data,getPath(location.href));e.parentNode.replaceChild(o,e);cssQuery.clearCache("object");addTimer(o,"",u);return o}})}var _1=false;addEventHandler(window,"onbeforeprint",function(){_1=true;for(var i=0;i<_0.length;i++)_5(_0[i])});addEventHandler(window,"onafterprint",function(){for(var i=0;i<_0.length;i++)_2(_0[i]);_1=false})});
+
+IE7.addModule("ie7-graphics", function() {
+if (appVersion < 5.5) return; // IE5.0 not supported
+
+// constants
+// this filter is used to replace a PNG image
+var $ALPHA_IMAGE_LOADER = "DXImageTransform.Microsoft.AlphaImageLoader";
+var $FILTER = "progid:" + $ALPHA_IMAGE_LOADER + "(src='%1',sizingMethod='scale')";
+
+// ** IE7 VARIABLE
+// e.g. only apply the hack to files ending in ".png"
+// IE7_PNG_SUFFIX = ".png";
+
+// regular expression version of the above
+var _pngTest = new RegExp((window.IE7_PNG_SUFFIX || "-trans.png") + "$", "i");
+var _filtered = [];
+
+// apply a filter
+function _addFilter($element) {
+	var $filter = $element.filters[$ALPHA_IMAGE_LOADER];
+	if ($filter) {
+		$filter.src = $element.src;
+		$filter.enabled = true;
+	} else {
+		$element.runtimeStyle.filter = $FILTER.replace(/%1/, $element.src);
+		_filtered.push($element);
+	}
+	// remove the real image
+	$element.src = BLANK_GIF;
+};
+function _removeFilter($element) {
+	$element.src = $element.pngSrc;
+	$element.filters[$ALPHA_IMAGE_LOADER].enabled = false;
+};
+
+// -----------------------------------------------------------------------
+//  support opacity (CSS3)
+// -----------------------------------------------------------------------
+
+ie7CSS.addFix(/opacity\s*:\s*([\d.]+)/, function($match, $offset) {
+	return "zoom:1;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=" +
+		((parseFloat($match[$offset + 1]) * 100) || 1) + ")";
+});
+
+// -----------------------------------------------------------------------
+//  fix PNG transparency (CSS background images)
+// -----------------------------------------------------------------------
+
+
+// replace background(-image): url(..) ..  with background(-image): .. ;filter: ..;
+var $BACKGROUND = /background(-image)?\s*:\s*([^\(};]*)url\(([^\)]+)\)([^;}]*)/;
+ie7CSS.addFix($BACKGROUND, function($match, $offset) {
+	var $url = getString($match[$offset + 3]);
+	return _pngTest.test($url) ? "filter:" +
+		$FILTER.replace(/scale/, "crop").replace(/%1/, $url) + ";zoom:1;background" +
+		  ($match[$offset + 1]||"") + ":" + ($match[$offset + 2]||"") + "none" +
+		  ($match[$offset + 4]||"") : $match[$offset];
+});
+
+if (ie7HTML) {
+// -----------------------------------------------------------------------
+//  fix PNG transparency (HTML images)
+// -----------------------------------------------------------------------
+
+	ie7HTML.addRecalc("img,input", function($element) {
+		if ($element.tagName == "INPUT" && $element.type != "image") return;
+		_fixImg($element);
+		addEventHandler($element, "onpropertychange", function() {
+			if (!_printing && event.propertyName == "src" &&
+				$element.src.indexOf(BLANK_GIF) == -1) _fixImg($element);
+		});
+	});
+	var $BASE64 = /^data:.*;base64/i;
+	var _base64Path = makePath("ie7-base64.php", path);
+	function _fixImg($element) {
+		if (_pngTest.test($element.src)) {
+			// we have to preserve width and height
+			var $image = new Image($element.width, $element.height);
+			$image.onload = function() {
+				$element.width = $image.width;
+				$element.height = $image.height;
+				$image = null;
+			};
+			$image.src = $element.src;
+			// store the original url (we'll put it back when it's printed)
+			$element.pngSrc = $element.src;
+			// add the AlphaImageLoader thingy
+			_addFilter($element);
+		} else if ($BASE64.test($element.src)) {
+			$element.src = _base64Path + "?" + $element.src.slice(5);
+		}
+	};
+
+
+// -----------------------------------------------------------------------
+// <object>
+// -----------------------------------------------------------------------
+
+	// fix [type=image/*]
+	var $IMAGE = /^image/i;
+	var _objectPath = makePath("ie7-object.htc", path);
+	ie7HTML.addRecalc("object", function($element) {
+		if ($IMAGE.test($element.type)) {
+		 	var $object = document.createElement("<object type=text/x-scriptlet>");
+		 	$object.style.width = $element.currentStyle.width;
+		 	$object.style.height = $element.currentStyle.height;
+		//-	$object.title = $element.title;
+		 	$object.data = _objectPath;
+			var $url = makePath($element.data, getPath(location.href));
+			$element.parentNode.replaceChild($object, $element);
+			cssQuery.clearCache("object");
+			addTimer($object, "", $url);
+			return $object;
+		}
+	});
+}
+
+// assume that background images should not be printed
+//  (if they are not transparent then they'll just obscure content)
+// but we'll put foreground images back...
+var _printing = false;
+addEventHandler(window, "onbeforeprint", function() {
+	_printing = true;
+	for (var i = 0; i < _filtered.length; i++) _removeFilter(_filtered[i]);
+});
+addEventHandler(window, "onafterprint", function() {
+	for (var i = 0; i < _filtered.length; i++) _addFilter(_filtered[i]);
+	_printing = false;
+});
+
+});
\ No newline at end of file

Modified: jifty/trunk/share/web/static/js/ie7/ie7-html4.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-html4.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-html4.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,157 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-html4",function(){if(!isHTML)return;HEADER+="h1{font-size:2em}h2{font-size:1.5em;}h3{font-size:1.17em;}"+"h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}";var _0={};ie7HTML=new(Fix.specialize({init:DUMMY,addFix:function(){this.fixes.push(arguments)},apply:function(){for(var i=0;i<this.fixes.length;i++){var m=cssQuery(this.fixes[i][0]);var f=this.fixes[i][1]||_1;for(var j=0;j<m.length;j++)f(m[j])}},addRecalc:function(){this.recalcs.push(arguments)},recalc:function(){for(var i=0;i<this.recalcs.length;i++){var m=cssQuery(this.recalcs[i][0]);var r=this.recalcs[i][1],e;var k=Math.pow(2,i);for(var j=0;(e=m[j]);j++){var u=e.uniqueID;if((_0[u]&k)==0){e=r(e)||e;_0[u]|=k}}}}}));ie7HTML.addFix("abbr");ie7HTML.addRecalc("label",function(e){if(!e.htmlFor){var f=cssQuery("input,textarea",e)[0];if(f){addEventHandler(e,"onclick",function(){f.click()})}}});ie7HTML.addRecalc("button,input",function(e){if(e.tagName=="BUTTON"){var m=e.outerHTML.match(/ value="([^"]*)"/i);e.runtimeStyle.value=(m)?m[1]:""}if(e.type=="submit"){addEventHandler(e,"onclick",function(){e.runtimeStyle.clicked=true;setTimeout("document.all."+e.uniqueID+".runtimeStyle.clicked=false",1)})}});var U=/^(submit|reset|button)$/;ie7HTML.addRecalc("form",function(e){addEventHandler(e,"onsubmit",function(){for(var i=0;i<e.length;i++){if(_2(e[i])){e[i].disabled=true;setTimeout("document.all."+e[i].uniqueID+".disabled=false",1)}else if(e[i].tagName=="BUTTON"&&e[i].type=="submit"){setTimeout("document.all."+e[i].uniqueID+".value='"+e[i].value+"'",1);e[i].value=e[i].runtimeStyle.value}}})});function _2(e){return U.test(e.type)&&!e.disabled&&!e.runtimeStyle.clicked};ie7HTML.addRecalc("img",function(e){if(e.alt&&!e.title)e.title=""});var P=(appVersion<5.5)?"HTML:":"";function _1(e){var f=document.createElement("<"+P+e.outerHTML.slice(1));if(e.outerHTML.slice(-2)!="/>"){var en="</"+e.tagName+">",n;while((n=e.nextSibling)&&n.outerHTML!=en){f.appendChild(n)}if(n)n.removeNode()}e.parentNode.replaceChild(f,e)}});
+
+IE7.addModule("ie7-html4", function() {
+
+// don't bother with this for XML documents
+if (!isHTML) return;
+
+// -----------------------------------------------------------------------
+// HTML Header
+// -----------------------------------------------------------------------
+
+// create default font-sizes
+HEADER += "h1{font-size:2em}h2{font-size:1.5em;}h3{font-size:1.17em;}" +
+	"h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}";
+
+// -----------------------------------------------------------------------
+// IE7 HTML Factory
+// -----------------------------------------------------------------------
+
+var _fixed = {};
+
+ie7HTML = new (Fix.specialize({ // single instance
+	init: DUMMY,
+	// fixes are a one-off, they are applied when the document is loaded
+	addFix: function() {
+		this.fixes.push(arguments);
+	},
+	apply: function() {
+		for (var i = 0; i < this.fixes.length; i++) {
+			var $match = cssQuery(this.fixes[i][0]);
+			var $fix = this.fixes[i][1] || _fixElement;
+			for (var j = 0; j < $match.length; j++) $fix($match[j]);
+		}
+	},
+	// recalcs occur whenever the document is refreshed using document.recalc()
+	addRecalc: function() {
+		this.recalcs.push(arguments);
+	},
+	recalc: function() {
+		// loop through the fixes
+		for (var i = 0; i < this.recalcs.length; i++) {
+			var $match = cssQuery(this.recalcs[i][0]);
+			var $recalc = this.recalcs[i][1], $element;
+			var $key = Math.pow(2, i);
+			for (var j = 0; ($element = $match[j]); j++) {
+				var $uniqueID = $element.uniqueID;
+				if ((_fixed[$uniqueID] & $key) == 0) {
+					$element = $recalc($element) || $element;
+					_fixed[$uniqueID] |= $key;
+				}
+			}
+		}
+	}
+})); // ie7HTML
+
+// -----------------------------------------------------------------------
+// <abbr>
+// -----------------------------------------------------------------------
+
+// provide support for the <abbr> tag.
+//  this is a proper fix, it preserves the DOM structure and
+//  <abbr> elements report the correct tagName & namespace prefix
+ie7HTML.addFix("abbr");
+
+// -----------------------------------------------------------------------
+// <label>
+// -----------------------------------------------------------------------
+
+// bind to the first child control
+ie7HTML.addRecalc("label", function($element) {
+	if (!$element.htmlFor) {
+		var $firstChildControl = cssQuery("input,textarea", $element)[0];
+		if ($firstChildControl) {
+			addEventHandler($element, "onclick", function() {
+				$firstChildControl.click();
+			});
+		}
+	}
+});
+
+// -----------------------------------------------------------------------
+// <button>
+// -----------------------------------------------------------------------
+
+// IE bug means that innerText is submitted instead of "value"
+ie7HTML.addRecalc("button,input", function($element) {
+	if ($element.tagName == "BUTTON") {
+		var $match = $element.outerHTML.match(/ value="([^"]*)"/i);
+		$element.runtimeStyle.value = ($match) ? $match[1] : "";
+	}
+	// flag the button/input that was used to submit the form
+	if ($element.type == "submit") {
+		addEventHandler($element, "onclick", function() {
+			$element.runtimeStyle.clicked = true;
+			setTimeout("document.all." + $element.uniqueID + ".runtimeStyle.clicked=false", 1);
+		});
+	}
+});
+
+// -----------------------------------------------------------------------
+// <form>
+// -----------------------------------------------------------------------
+
+// only submit "successful controls
+var $UNSUCCESSFUL = /^(submit|reset|button)$/;
+ie7HTML.addRecalc("form", function($element) {
+	addEventHandler($element, "onsubmit", function() {
+		for (var i = 0; i < $element.length; i++) {
+			if (_unsuccessful($element[i])) {
+				$element[i].disabled = true;
+				setTimeout("document.all." + $element[i].uniqueID + ".disabled=false", 1);
+			} else if ($element[i].tagName == "BUTTON" && $element[i].type == "submit") {
+				setTimeout("document.all." + $element[i].uniqueID + ".value='" +
+					$element[i].value + "'", 1);
+				$element[i].value = $element[i].runtimeStyle.value;
+			}
+		}
+	});
+});
+function _unsuccessful($element) {
+	return $UNSUCCESSFUL.test($element.type) && !$element.disabled &&
+		!$element.runtimeStyle.clicked;
+};
+
+// -----------------------------------------------------------------------
+// <img>
+// -----------------------------------------------------------------------
+
+// get rid of the spurious tooltip produced by the alt attribute on images
+ie7HTML.addRecalc("img", function($element) {
+	if ($element.alt && !$element.title) $element.title = "";
+});
+
+// -----------------------------------------------------------------------
+// Fix broken elements
+// -----------------------------------------------------------------------
+
+var $PREFIX = (appVersion < 5.5) ? "HTML:" : "";
+function _fixElement($element) {
+	var $fixedElement = document.createElement("<" + $PREFIX +
+		$element.outerHTML.slice(1));
+	if ($element.outerHTML.slice(-2) != "/>") {
+		// remove child nodes and copy them to the new $element
+		var $$endTag = "</"+ $element.tagName + ">", $nextSibling;
+		while (($nextSibling = $element.nextSibling) && $nextSibling.outerHTML != $$endTag) {
+			$fixedElement.appendChild($nextSibling);
+		}
+		// remove the closing tag
+		if ($nextSibling) $nextSibling.removeNode();
+	}
+	// replace the broken tag with the namespaced version
+	$element.parentNode.replaceChild($fixedElement, $element);
+};
+
+}); // addModule

Modified: jifty/trunk/share/web/static/js/ie7/ie7-ie5.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-ie5.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-ie5.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,82 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-if(appVersion<5.5){ANON="HTML:!";var ap=function(f,o,a){f.apply(o,a)};if(''.replace(/^/,String)){var _0=String.prototype.replace;var _1=function(e,r){var m,n="",s=this;while(s&&(m=e.exec(s))){n+=s.slice(0,m.index)+ap(r,this,m);s=s.slice(m.lastIndex)}return n+s};String.prototype.replace=function(e,r){this.replace=(typeof r=="function")?_1:_0;return this.replace(e,r)}}if(!Function.apply){var APPLY="apply-"+Number(new Date);ap=function(f,o,a){var r;o[APPLY]=f;switch(a.length){case 0:r=o[APPLY]();break;case 1:r=o[APPLY](a[0]);break;case 2:r=o[APPLY](a[0],a[1]);break;case 3:r=o[APPLY](a[0],a[1],a[2]);break;case 4:r=o[APPLY](a[0],a[1],a[2],a[3]);break;default:var aa=[],i=a.length-1;do aa[i]="a["+i+"]";while(i--);eval("r=o[APPLY]("+aa+")")}delete o[APPLY];return r};ICommon.valueOf.prototype.inherit=function(){return ap(arguments.callee.caller.ancestor,this,arguments)}}if(![].push)Array.prototype.push=function(){for(var i=0;i<arguments.length;i++){this[this.length]=arguments[i]}return this.length};if(![].pop)Array.prototype.pop=function(){var i=this[this.length-1];this.length--;return i};if(isHTML){HEADER+="address,blockquote,body,dd,div,dt,fieldset,form,"+"frame,frameset,h1,h2,h3,h4,h5,h6,iframe,noframes,object,p,"+"hr,applet,center,dir,menu,pre,dl,li,ol,ul{display:block}"}}
+
+if (appVersion < 5.5) {
+
+/* ---------------------------------------------------------------------
+  This module is loaded automatically by IE7.
+--------------------------------------------------------------------- */
+
+	ANON = "HTML:!"; // for anonymous content
+
+	var $$apply = function($function, $object, $arguments) {
+		$function.apply($object, $arguments);
+	};
+
+	// fix String.replace
+	if (''.replace(/^/, String)) {
+		// preserve String.replace
+		var _stringReplace = String.prototype.replace;
+		// create String.replace for handling functions
+		var _functionReplace = function($expression, $replacement) {
+			var $match, $newString = "", $string = this;
+			while ($string && ($match = $expression.exec($string))) {
+				$newString += $string.slice(0, $match.index) + $$apply($replacement, this, $match);
+				$string = $string.slice($match.lastIndex);
+			}
+			return $newString + $string;
+		};
+		// replace String.replace
+		String.prototype.replace = function ($expression, $replacement) {
+			this.replace = (typeof $replacement == "function") ? _functionReplace : _stringReplace;
+			return this.replace($expression, $replacement);
+		};
+	}
+
+	// fix Function.apply
+	if (!Function.apply) {
+		var APPLY = "apply-" + Number(new Date);
+		$$apply = function(f, o, a) {
+			var r;
+			o[APPLY] = f;
+			switch (a.length) { // deconstruct for speed
+				case 0: r = o[APPLY](); break;
+				case 1: r = o[APPLY](a[0]); break;
+				case 2: r = o[APPLY](a[0], a[1]); break;
+				case 3: r = o[APPLY](a[0], a[1], a[2]); break;
+				case 4: r = o[APPLY](a[0], a[1], a[2], a[3]); break;
+				default:
+					var aa = [], i = a.length - 1;
+					do aa[i] = "a[" + i + "]"; while (i--);
+					eval("r=o[APPLY](" + aa + ")");
+			}
+			delete o[APPLY];
+			return r;
+		};
+		// fix ICommon
+		ICommon.valueOf.prototype.inherit = function() {
+			return $$apply(arguments.callee.caller.ancestor, this, arguments);
+		};
+	}
+
+	// array fixes
+	if (![].push) Array.prototype.push = function() {
+		for (var i = 0; i < arguments.length; i++) {
+			this[this.length] = arguments[i];
+		}
+		return this.length;
+	};
+	if (![].pop) Array.prototype.pop = function() {
+		var $item = this[this.length - 1];
+		this.length--;
+		return $item;
+	};
+
+	// block elements are "inline" according to IE5.0 so we'll fix it
+	if (isHTML) {
+		HEADER += "address,blockquote,body,dd,div,dt,fieldset,form,"+
+		"frame,frameset,h1,h2,h3,h4,h5,h6,iframe,noframes,object,p,"+
+		"hr,applet,center,dir,menu,pre,dl,li,ol,ul{display:block}";
+	}
+}

Modified: jifty/trunk/share/web/static/js/ie7/ie7-layout.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-layout.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-layout.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,267 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-layout",function(){ie7Layout=this;HEADER+="*{boxSizing:content-box}";this.hasLayout=(appVersion<5.5)?function(e){return e.clientWidth}:function(e){return e.currentStyle.hasLayout};this.boxSizing=function(e){if(!ie7Layout.hasLayout(e)){e.style.height="0cm";if(e.currentStyle.verticalAlign=="auto")e.runtimeStyle.verticalAlign="top";_1(e)}};function _1(e){if(e!=viewport&&e.currentStyle.position!="absolute"){collapseMarginTop(e);collapseMarginBottom(e)}};var firstElementChild=cssQuery.valueOf("firstElementChild");var lastElementChild=cssQuery.valueOf("lastElementChild");function collapseMarginTop(e){if(!e.runtimeStyle.marginTop){var p=e.parentElement;if(p&&ie7Layout.hasLayout(p)&&e==firstElementChild(p))return;var f=firstElementChild(e);if(f&&f.currentStyle.styleFloat=="none"&&ie7Layout.hasLayout(f)){collapseMarginTop(f);m=_3(e,e.currentStyle.marginTop);c=_3(f,f.currentStyle.marginTop);if(m<0||c<0){e.runtimeStyle.marginTop=m+c}else{e.runtimeStyle.marginTop=Math.max(c,m)}f.runtimeStyle.marginTop="0px"}}};eval(String(collapseMarginTop).replace(/Top/g,"Bottom").replace(/first/g,"last"));function _3(e,v){return(v=="auto")?0:getPixelValue(e,v)};var U=/^[.\d][\w%]*$/,A=/^(auto|0cm)$/,N="[.\\d]";var applyWidth,applyHeight;function borderBox(e){applyWidth(e);applyHeight(e)};function fixWidth(H){applyWidth=function(e){if(!PERCENT.test(e.currentStyle.width))fixWidth(e);_1(e)};function fixWidth(e,v){if(!e.runtimeStyle.fixedWidth){if(!v)v=e.currentStyle.width;e.runtimeStyle.fixedWidth=(U.test(v))?Math.max(0,getFixedWidth(e,v)):v;setOverrideStyle(e,"width",e.runtimeStyle.fixedWidth)}};function layoutWidth(e){if(!isFixed(e)){var l=e.offsetParent;while(l&&!ie7Layout.hasLayout(l))l=l.offsetParent}return(l||viewport).clientWidth};function getPixelWidth(e,v){if(PERCENT.test(v))return parseInt(parseFloat(v)/100*layoutWidth(e));return getPixelValue(e,v)};var getFixedWidth=function(e,v){var b=e.currentStyle["box-sizing"]=="border-box";var a=0;if(quirksMode&&!b)a+=getBorderWidth(e)+getPaddingWidth(e);else if(!quirksMode&&b)a-=getBorderWidth(e)+getPaddingWidth(e);return getPixelWidth(e,v)+a};function getBorderWidth(e){return e.offsetWidth-e.clientWidth};function getPaddingWidth(e){return getPixelWidth(e,e.currentStyle.paddingLeft)+getPixelWidth(e,e.currentStyle.paddingRight)};eval(String(getPaddingWidth).replace(/padding/g,"margin").replace(/Padding/g,"Margin"));HEADER+="*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";function minWidth(e){if(e.currentStyle["min-width"]!=null){e.style.minWidth=e.currentStyle["min-width"]}if(register(minWidth,e,e.currentStyle.minWidth!="none")){ie7Layout.boxSizing(e);fixWidth(e);resizeWidth(e)}};eval(String(minWidth).replace(/min/g,"max"));ie7Layout.minWidth=minWidth;ie7Layout.maxWidth=maxWidth;function resizeWidth(e){var r=e.getBoundingClientRect();var w=r.right-r.left;if(e.currentStyle.minWidth!="none"&&w<=getFixedWidth(e,e.currentStyle.minWidth)){e.runtimeStyle.width=getFixedWidth(e,e.currentStyle.minWidth)}else if(e.currentStyle.maxWidth!="none"&&w>=getFixedWidth(e,e.currentStyle.maxWidth)){e.runtimeStyle.width=getFixedWidth(e,e.currentStyle.maxWidth)}else{e.runtimeStyle.width=e.runtimeStyle.fixedWidth}};function fixRight(e){if(register(fixRight,e,/^(fixed|absolute)$/.test(e.currentStyle.position)&&getDefinedStyle(e,"left")!="auto"&&getDefinedStyle(e,"right")!="auto"&&A.test(getDefinedStyle(e,"width")))){resizeRight(e);ie7Layout.boxSizing(e)}};ie7Layout.fixRight=fixRight;function resizeRight(e){var l=getPixelWidth(e,e.runtimeStyle._4||e.currentStyle.left);var w=layoutWidth(e)-getPixelWidth(e,e.currentStyle.right)-l-getMarginWidth(e);if(parseInt(e.runtimeStyle.width)==w)return;e.runtimeStyle.width="";if(isFixed(e)||H||e.offsetWidth<w){if(!quirksMode)w-=getBorderWidth(e)+getPaddingWidth(e);if(w<0)w=0;e.runtimeStyle.fixedWidth=w;setOverrideStyle(e,"width",w)}};var _2=0;addResize(function(){var i,w=(_2<viewport.clientWidth);_2=viewport.clientWidth;for(i in minWidth.elements){var e=minWidth.elements[i];var f=(parseInt(e.runtimeStyle.width)==getFixedWidth(e,e.currentStyle.minWidth));if(w&&f)e.runtimeStyle.width="";if(w==f)resizeWidth(e)}for(i in maxWidth.elements){var e=maxWidth.elements[i];var f=(parseInt(e.runtimeStyle.width)==getFixedWidth(e,e.currentStyle.maxWidth));if(!w&&f)e.runtimeStyle.width="";if(w!=f)resizeWidth(e)}for(i in fixRight.elements)resizeRight(fixRight.elements[i])});if(window.IE7_BOX_MODEL!==false){ie7CSS.addRecalc("width",N,quirksMode?applyWidth:_1)}ie7CSS.addRecalc("min-width",N,minWidth);ie7CSS.addRecalc("max-width",N,maxWidth);ie7CSS.addRecalc("right",N,fixRight)};ie7CSS.addRecalc("border-spacing",N,function(e){if(e.currentStyle.borderCollapse!="collapse"){e.cellSpacing=getPixelValue(e,e.currentStyle["border-spacing"])}});ie7CSS.addRecalc("box-sizing","content-box",this.boxSizing);ie7CSS.addRecalc("box-sizing","border-box",borderBox);var _0=new ParseMaster;_0.add(/Width/,"Height");_0.add(/width/,"height");_0.add(/Left/,"Top");_0.add(/left/,"top");_0.add(/Right/,"Bottom");_0.add(/right/,"bottom");eval(_0.exec(String(fixWidth)));fixWidth();fixHeight(true)});
+IE7.addModule("ie7-layout", function() {
+// big, ugly box-model hack + min/max stuff
+
+// #tantek > #erik > #dean { voice-family: hacker; }
+
+// this module is useful to other modules so it is global
+//  (all modules are anyway through the modules collection)
+ie7Layout = this;
+
+// -----------------------------------------------------------------------
+// "layout"
+// -----------------------------------------------------------------------
+
+HEADER += "*{boxSizing:content-box}";
+
+// does an element have "layout" ?
+this.hasLayout = (appVersion < 5.5) ? function($element) {
+	// element.currentStyle.hasLayout doesn't work for IE5.0
+	return $element.clientWidth;
+} : function($element) {
+	return $element.currentStyle.hasLayout;
+};
+
+// give an element "layout"
+this.boxSizing = function($element) {
+	if (!ie7Layout.hasLayout($element)) {
+	//#	$element.runtimeStyle.fixedHeight =
+		$element.style.height = "0cm";
+		if ($element.currentStyle.verticalAlign == "auto")
+			$element.runtimeStyle.verticalAlign = "top";
+		// when an element acquires "layout", margins no longer collapse correctly
+		_collapseMargins($element);
+	}
+};
+
+// -----------------------------------------------------------------------
+// Margin Collapse
+// -----------------------------------------------------------------------
+
+function _collapseMargins($element) {
+	if ($element != viewport && $element.currentStyle.position != "absolute") {
+		collapseMarginTop($element);
+		collapseMarginBottom($element);
+	}
+};
+
+var firstElementChild = cssQuery.valueOf("firstElementChild");
+var lastElementChild = cssQuery.valueOf("lastElementChild");
+
+function collapseMarginTop($element) {
+	if (!$element.runtimeStyle.marginTop) {
+		var $parentElement = $element.parentElement;
+		if ($parentElement && ie7Layout.hasLayout($parentElement) && $element == firstElementChild($parentElement)) return;
+		var $firstChild = firstElementChild($element);
+		if ($firstChild && $firstChild.currentStyle.styleFloat == "none" && ie7Layout.hasLayout($firstChild)) {
+			collapseMarginTop($firstChild);
+			$marginTop = _getMargin($element, $element.currentStyle.marginTop);
+			$childMarginTop = _getMargin($firstChild, $firstChild.currentStyle.marginTop);
+			if ($marginTop < 0 || $childMarginTop < 0) {
+				$element.runtimeStyle.marginTop = $marginTop + $childMarginTop;
+			} else {
+				$element.runtimeStyle.marginTop = Math.max($childMarginTop, $marginTop);
+			}
+			$firstChild.runtimeStyle.marginTop = "0px";
+		}
+	}
+};
+eval(String(collapseMarginTop).replace(/Top/g, "Bottom").replace(/first/g, "last"));
+
+function _getMargin($element, $value) {
+	return ($value == "auto") ? 0 : getPixelValue($element, $value);
+};
+
+// -----------------------------------------------------------------------
+// box-model
+// -----------------------------------------------------------------------
+
+// constants
+var $UNIT = /^[.\d][\w%]*$/, $AUTO = /^(auto|0cm)$/, $NUMERIC = "[.\\d]";
+
+var applyWidth, applyHeight;
+function borderBox($element){
+	applyWidth($element);
+	applyHeight($element);
+};
+
+function fixWidth($HEIGHT) {
+	applyWidth = function($element) {
+		if (!PERCENT.test($element.currentStyle.width)) fixWidth($element);
+		_collapseMargins($element);
+	};
+
+	function fixWidth($element, $value) {
+		if (!$element.runtimeStyle.fixedWidth) {
+			if (!$value) $value = $element.currentStyle.width;
+			$element.runtimeStyle.fixedWidth = ($UNIT.test($value)) ? Math.max(0, getFixedWidth($element, $value)) : $value;
+			setOverrideStyle($element, "width", $element.runtimeStyle.fixedWidth);
+		}
+	};
+
+	function layoutWidth($element) {
+		if (!isFixed($element)) {
+			var $layoutParent = $element.offsetParent;
+			while ($layoutParent && !ie7Layout.hasLayout($layoutParent)) $layoutParent = $layoutParent.offsetParent;
+		}
+		return ($layoutParent || viewport).clientWidth;
+	};
+
+	function getPixelWidth($element, $value) {
+		if (PERCENT.test($value)) return parseInt(parseFloat($value) / 100 * layoutWidth($element));
+		return getPixelValue($element, $value);
+	};
+
+	var getFixedWidth = function($element, $value) {
+		var $borderBox = $element.currentStyle["box-sizing"] == "border-box";
+		var $adjustment = 0;
+		if (quirksMode && !$borderBox)
+			$adjustment += getBorderWidth($element) + getPaddingWidth($element);
+		else if (!quirksMode && $borderBox)
+			$adjustment -= getBorderWidth($element) + getPaddingWidth($element);
+		return getPixelWidth($element, $value) + $adjustment;
+	};
+
+	// easy way to get border thickness for elements with "layout"
+	function getBorderWidth($element) {
+		return $element.offsetWidth - $element.clientWidth;
+	};
+
+	// have to do some pixel conversion to get padding thickness :-(
+	function getPaddingWidth($element) {
+		return getPixelWidth($element, $element.currentStyle.paddingLeft) +
+			getPixelWidth($element, $element.currentStyle.paddingRight);
+	};
+	// clone the getPaddingWidth function to make a getMarginWidth function
+	eval(String(getPaddingWidth).replace(/padding/g, "margin").replace(/Padding/g, "Margin"));
+
+// -----------------------------------------------------------------------
+// min/max
+// -----------------------------------------------------------------------
+
+	HEADER += "*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";
+
+	// handle min-width property
+	function minWidth($element) {
+		// IE6 supports min-height so we frig it here
+		//#if ($element.currentStyle.minHeight == "auto") $element.runtimeStyle.minHeight = 0;
+		if ($element.currentStyle["min-width"] != null) {
+			$element.style.minWidth = $element.currentStyle["min-width"];
+		}
+		if (register(minWidth, $element, $element.currentStyle.minWidth != "none")) {
+			ie7Layout.boxSizing($element);
+			fixWidth($element);
+			resizeWidth($element);
+		}
+	};
+	// clone the minWidth function to make a maxWidth function
+	eval(String(minWidth).replace(/min/g, "max"));
+	// expose these methods
+	ie7Layout.minWidth = minWidth;
+	ie7Layout.maxWidth = maxWidth;
+
+	// apply min/max restrictions
+	function resizeWidth($element) {
+		// check boundaries
+		var $rect = $element.getBoundingClientRect();
+		var $width = $rect.right - $rect.left;
+
+		if ($element.currentStyle.minWidth != "none" && $width <= getFixedWidth($element, $element.currentStyle.minWidth)) {
+			$element.runtimeStyle.width = getFixedWidth($element, $element.currentStyle.minWidth);
+		} else if ($element.currentStyle.maxWidth != "none" && $width >= getFixedWidth($element, $element.currentStyle.maxWidth)) {
+			$element.runtimeStyle.width = getFixedWidth($element, $element.currentStyle.maxWidth);
+		} else {
+			$element.runtimeStyle.width = $element.runtimeStyle.fixedWidth; // || "auto";
+		}
+	};
+
+// -----------------------------------------------------------------------
+// right/bottom
+// -----------------------------------------------------------------------
+
+	function fixRight($element) {
+		if (register(fixRight, $element, /^(fixed|absolute)$/.test($element.currentStyle.position) &&
+		    getDefinedStyle($element, "left") != "auto" &&
+		    getDefinedStyle($element, "right") != "auto" &&
+		    $AUTO.test(getDefinedStyle($element, "width")))) {
+		    	resizeRight($element);
+		    	ie7Layout.boxSizing($element);
+		}
+	};
+	ie7Layout.fixRight = fixRight;
+
+	function resizeRight($element) {
+		var $left = getPixelWidth($element, $element.runtimeStyle._left || $element.currentStyle.left);
+		var $width = layoutWidth($element) - getPixelWidth($element, $element.currentStyle.right) -	$left - getMarginWidth($element);
+		if (parseInt($element.runtimeStyle.width) == $width) return;
+		$element.runtimeStyle.width = "";
+		if (isFixed($element) || $HEIGHT || $element.offsetWidth < $width) {
+	    	if (!quirksMode) $width -= getBorderWidth($element) + getPaddingWidth($element);
+			if ($width < 0) $width = 0;
+			$element.runtimeStyle.fixedWidth = $width;
+			setOverrideStyle($element, "width", $width);
+		}
+	};
+
+// -----------------------------------------------------------------------
+// window.onresize
+// -----------------------------------------------------------------------
+
+	// handle window resize
+	var _clientWidth = 0;
+	addResize(function() {
+		var i, $wider = (_clientWidth < viewport.clientWidth);
+		_clientWidth = viewport.clientWidth;
+		// resize elements with "min-width" set
+		for (i in minWidth.elements) {
+			var $element = minWidth.elements[i];
+			var $fixedWidth = (parseInt($element.runtimeStyle.width) == getFixedWidth($element, $element.currentStyle.minWidth));
+			if ($wider && $fixedWidth) $element.runtimeStyle.width = "";
+			if ($wider == $fixedWidth) resizeWidth($element);
+		}
+		// resize elements with "max-width" set
+		for (i in maxWidth.elements) {
+			var $element = maxWidth.elements[i];
+			var $fixedWidth = (parseInt($element.runtimeStyle.width) == getFixedWidth($element, $element.currentStyle.maxWidth));
+			if (!$wider && $fixedWidth) $element.runtimeStyle.width = "";
+			if ($wider != $fixedWidth) resizeWidth($element);
+		}
+		// resize elements with "right" set
+		for (i in fixRight.elements) resizeRight(fixRight.elements[i]);
+	});
+
+// -----------------------------------------------------------------------
+// fix CSS
+// -----------------------------------------------------------------------
+	if (window.IE7_BOX_MODEL !== false) {
+		ie7CSS.addRecalc("width", $NUMERIC, quirksMode ? applyWidth : _collapseMargins);
+	}
+	ie7CSS.addRecalc("min-width", $NUMERIC, minWidth);
+	ie7CSS.addRecalc("max-width", $NUMERIC, maxWidth);
+	ie7CSS.addRecalc("right", $NUMERIC, fixRight);
+};
+ie7CSS.addRecalc("border-spacing", $NUMERIC, function($element) {
+	if ($element.currentStyle.borderCollapse != "collapse") {
+		$element.cellSpacing = getPixelValue($element, $element.currentStyle["border-spacing"]);
+	}
+});
+ie7CSS.addRecalc("box-sizing", "content-box", this.boxSizing);
+ie7CSS.addRecalc("box-sizing", "border-box", borderBox);
+
+// clone the fixWidth function to create a fixHeight function
+var _rotate = new ParseMaster;
+_rotate.add(/Width/, "Height");
+_rotate.add(/width/, "height");
+_rotate.add(/Left/, "Top");
+_rotate.add(/left/, "top");
+_rotate.add(/Right/, "Bottom");
+_rotate.add(/right/, "bottom");
+eval(_rotate.exec(String(fixWidth)));
+
+// apply box-model + min/max fixes
+fixWidth();
+fixHeight(true);
+
+});
\ No newline at end of file

Modified: jifty/trunk/share/web/static/js/ie7/ie7-load.htc
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-load.htc	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-load.htc	Fri Apr 14 10:38:57 2006
@@ -1 +1,3 @@
-<component lightweight="true"><attach event="ondocumentready" onevent="IE7.init()"/></component>
+<component lightweight="true">
+ <attach event="ondocumentready" onevent="IE7.init()"/>
+</component>
\ No newline at end of file

Modified: jifty/trunk/share/web/static/js/ie7/ie7-object.htc
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-object.htc	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-object.htc	Fri Apr 14 10:38:57 2006
@@ -6,7 +6,62 @@
 -->
 <head>
 <style type="text/css">body{margin:0}</style>
-<script type="text/javascript">public_description=new function(){var l=false;this.ie7_anon=true;this.load=function(o,c,u){if(l)return;l=true;function _0(t,p){t.style[p]=o.currentStyle[p]};var p=o;while(p&&p.currentStyle.backgroundColor=="transparent"){p=p.parentElement}if(p)body.style.backgroundColor=p.currentStyle.backgroundColor;_0(body,"backgroundImage");_0(body,"backgroundRepeat");_0(body,"backgroundPositionX");_0(body,"backgroundPositionY");_0(body,"fontFamily");_0(body,"fontSize");_0(wrapper,"paddingTop");_0(wrapper,"paddingRight");_0(wrapper,"paddingBottom");_0(wrapper,"paddingLeft");image.width=o.clientWidth;image.height=o.clientHeight;var B64=/^data:.*;base64/i,P=/.png$/i;if(B64.test(u))u="ie7-base64.php"+"?"+u.slice(5);if(P.test(u)&&!/MSIE 5.0/.test(navigator.userAgent)){image.src="blank.gif";image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+u+"',sizingMethod='scale')"}else{image.src=u}o.style.width=body.scrollWidth;o.style.height=body.scrollHeight}};</script>
+<script type="text/javascript">
+public_description = new function() {
+var $loaded = false;
+this.ie7_anon = true;
+this.load = function($object, $cssText, $url) {
+	// stop this method being called more than once
+	if ($loaded) return;
+	$loaded = true;
+
+	function _copyObjectStyle($target, $propertyName) {
+		$target.style[$propertyName] = $object.currentStyle[$propertyName];
+	};
+
+	// determine underlying background colour
+	var $parent = $object;
+	while ($parent && $parent.currentStyle.backgroundColor == "transparent") {
+		$parent = $parent.parentElement;
+	}
+	if ($parent) body.style.backgroundColor = $parent.currentStyle.backgroundColor;
+
+	// inherit other background properties
+	_copyObjectStyle(body, "backgroundImage");
+	_copyObjectStyle(body, "backgroundRepeat");
+	_copyObjectStyle(body, "backgroundPositionX");
+	_copyObjectStyle(body, "backgroundPositionY");
+
+	// keep fonts because of EMs
+	_copyObjectStyle(body, "fontFamily");
+	_copyObjectStyle(body, "fontSize");
+
+	// the wrapper <div> is for padding
+	_copyObjectStyle(wrapper, "paddingTop");
+	_copyObjectStyle(wrapper, "paddingRight");
+	_copyObjectStyle(wrapper, "paddingBottom");
+	_copyObjectStyle(wrapper, "paddingLeft");
+
+	// set image dimensions according to the containing <object>
+	image.width = $object.clientWidth;
+	image.height = $object.clientHeight;
+
+	var $BASE64 = /^data:.*;base64/i, $PNG = /.png$/i;
+	if ($BASE64.test($url)) $url = "ie7-base64.php" + "?" + $url.slice(5);
+
+	if ($PNG.test($url) && !/MSIE 5.0/.test(navigator.userAgent)) {
+		// use the AlphaImageLoader in case of PNGs
+		image.src = "blank.gif";
+		image.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + $url + "',sizingMethod='scale')";
+	} else {
+		image.src = $url;
+	}
+
+	// pass width & height back up
+	$object.style.width = body.scrollWidth;
+	$object.style.height = body.scrollHeight;
+}};
+</script>
 </head>
 <body id="body"><div id="wrapper"><img id="image"></div></body>
 </html>

Modified: jifty/trunk/share/web/static/js/ie7/ie7-overflow.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-overflow.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-overflow.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,112 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-overflow",function(){var S={backgroundColor:"transparent",backgroundImage:"none",backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderTopStyle:"none",borderRightStyle:"none",borderBottomStyle:"none",borderLeftWidth:0,height:null,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,width:"100%"};function _3(p,s,t){t.style[p]=s.currentStyle[p];if(S[p]!=null){s.runtimeStyle[p]=S[p]}};ie7CSS.addRecalc("overflow","visible",function(e){if(e.parentNode.ie7_wrapper)return;if(ie7Layout&&e.currentStyle["max-height"]!="auto"){ie7Layout.maxHeight(e)}if(e.currentStyle.marginLeft=="auto")e.style.marginLeft=0;if(e.currentStyle.marginRight=="auto")e.style.marginRight=0;var w=document.createElement(ANON);w.ie7_wrapper=true;for(var p in S)_3(p,e,w);w.style.display="block";w.style.position="relative";e.runtimeStyle.position="absolute";e.parentNode.insertBefore(w,e);w.appendChild(e)});cssQuery.addModule("ie7-overflow",function(){function _0(e){return(e&&e.ie7_wrapper)?e.firstChild:e};var _2=previousElementSibling;previousElementSibling=function(e){return _0(_2(e))};var _1=nextElementSibling;nextElementSibling=function(e){return _0(_1(e))};selectors[" "]=function(r,f,t,n){var e,i,j;for(i=0;i<f.length;i++){var s=getElementsByTagName(f[i],t,n);for(j=0;(e=_0(s[j]));j++){if(thisElement(e)&&(!n||compareNamespace(e,n)))r.push(e)}}};selectors[">"]=function(r,f,t,n){var e,i,j;for(i=0;i<f.length;i++){var s=childElements(f[i]);for(j=0;(e=_0(s[j]));j++){if(compareTagName(e,t,n))r.push(e)}}}})});
+IE7.addModule("ie7-overflow", function() {
+
+/* ---------------------------------------------------------------------
+
+  This module alters the structure of the document.
+  It may adversely affect other CSS rules. Be warned.
+
+--------------------------------------------------------------------- */
+
+// Thanks to Mark 'Tarquin' Wilton-Jones and Rainer Åhlfors
+
+var $STYLE = {
+	backgroundColor: "transparent",
+	backgroundImage: "none",
+	backgroundPositionX: null,
+	backgroundPositionY: null,
+	backgroundRepeat: null,
+	borderTopWidth: 0,
+	borderRightWidth: 0,
+	borderBottomWidth: 0,
+	borderLeftStyle: "none",
+	borderTopStyle: "none",
+	borderRightStyle: "none",
+	borderBottomStyle: "none",
+	borderLeftWidth: 0,
+	height: null,
+	marginTop: 0,
+	marginBottom: 0,
+	marginRight: 0,
+	marginLeft: 0,
+	width: "100%"
+};
+
+function _copyStyle($propertyName, $source, $target) {
+	$target.style[$propertyName] = $source.currentStyle[$propertyName];
+	if ($STYLE[$propertyName] != null) {
+		$source.runtimeStyle[$propertyName] = $STYLE[$propertyName];
+	}
+};
+
+ie7CSS.addRecalc("overflow", "visible", function($element) {
+	// don't do this again
+	if ($element.parentNode.ie7_wrapper) return;
+
+	// if max-height is applied, makes sure it gets applied first
+	if (ie7Layout && $element.currentStyle["max-height"] != "auto") {
+		ie7Layout.maxHeight($element);
+	}
+
+	if ($element.currentStyle.marginLeft == "auto") $element.style.marginLeft = 0;
+	if ($element.currentStyle.marginRight == "auto") $element.style.marginRight = 0;
+
+	var $wrapper = document.createElement(ANON);
+	$wrapper.ie7_wrapper = true;
+	for (var $propertyName in $STYLE) _copyStyle($propertyName, $element, $wrapper);
+	$wrapper.style.display = "block";
+	$wrapper.style.position = "relative";
+	$element.runtimeStyle.position = "absolute";
+	$element.parentNode.insertBefore($wrapper, $element);
+	$wrapper.appendChild($element);
+});
+
+// -----------------------------------------------------------------------
+// fix cssQuery
+// -----------------------------------------------------------------------
+
+cssQuery.addModule("ie7-overflow", function() {
+
+function _wrappedElement($element) {
+	return ($element && $element.ie7_wrapper) ? $element.firstChild : $element;
+};
+
+var _previousElementSibling = previousElementSibling;
+previousElementSibling = function($element) {
+	return _wrappedElement(_previousElementSibling($element));
+};
+
+var _nextElementSibling = nextElementSibling;
+nextElementSibling = function($element) {
+	return _wrappedElement(_nextElementSibling($element));
+};
+
+selectors[" "] = function($results, $from, $tagName, $namespace) {
+	// loop through current selection
+	var $element, i, j;
+	for (i = 0; i < $from.length; i++) {
+		// get descendants
+		var $subset = getElementsByTagName($from[i], $tagName, $namespace);
+		// loop through descendants and add to results selection
+		for (j = 0; ($element = _wrappedElement($subset[j])); j++) {
+			if (thisElement($element) && (!$namespace || compareNamespace($element, $namespace)))
+				$results.push($element);
+		}
+	}
+};
+
+selectors[">"] = function($results, $from, $tagName, $namespace) {
+	var $element, i, j;
+	for (i = 0; i < $from.length; i++) {
+		var $subset = childElements($from[i]);
+		for (j = 0; ($element = _wrappedElement($subset[j])); j++) {
+			if (compareTagName($element, $tagName, $namespace)) $results.push($element);
+		}
+	}
+};
+
+}); // cssQuery
+
+}); // ie7-overflow

Modified: jifty/trunk/share/web/static/js/ie7/ie7-quirks.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-quirks.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-quirks.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,127 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-quirks",function(){if(quirksMode){var F="xx-small,x-small,small,medium,large,x-large,xx-large".split(",");for(var i=0;i<F.length;i++){F[F[i]]=F[i-1]||"0.67em"}ie7CSS.addFix(new RegExp("(font(-size)?\\s*:\\s*)([\\w\\-\\.]+)"),function(m,o){return m[o+1]+(F[m[o+3]]||m[o+3])});if(appVersion<6){var N=/^\-/,L=/(em|ex)$/i;var EM=/em$/i,EX=/ex$/i;function _2(e){var s=1;_0.style.fontFamily=e.currentStyle.fontFamily;_0.style.lineHeight=e.currentStyle.lineHeight;while(e!=body){var f=e.currentStyle["ie7-font-size"];if(f){if(EM.test(f))s*=parseFloat(f);else if(PERCENT.test(f))s*=(parseFloat(f)/100);else if(EX.test(f))s*=(parseFloat(f)/2);else{_0.style.fontSize=f;return 1}}e=e.parentElement}return s};var _0=createTempElement();getPixelValue=function(e,v){if(PIXEL.test(v||0))return parseInt(v||0);var scale=N.test(v)?-1:1;if(L.test(v))scale*=_2(e);_0.style.width=(scale<0)?v.slice(1):v;body.appendChild(_0);v=scale*_0.offsetWidth;_0.removeNode();return parseInt(v)};HEADER=HEADER.replace(/(font(-size)?\s*:\s*([^\s;}\/]*))/gi,"ie7-font-size:$3;$1");ie7CSS.addFix(/cursor\s*:\s*pointer/,"cursor:hand");ie7CSS.addFix(/display\s*:\s*list-item/,"display:block")}function getPaddingWidth(e){return getPixelValue(e,e.currentStyle.paddingLeft)+getPixelValue(e,e.currentStyle.paddingRight)};function _1(e){if(appVersion<5.5&&ie7Layout)ie7Layout.boxSizing(e.parentElement);var p=e.parentElement;var m=p.offsetWidth-e.offsetWidth-getPaddingWidth(p);var a=(e.currentStyle["ie7-margin"]&&e.currentStyle.marginRight=="auto")||e.currentStyle["ie7-margin-right"]=="auto";switch(p.currentStyle.textAlign){case"right":m=(a)?parseInt(m/2):0;e.runtimeStyle.marginRight=parseInt(m)+"px";break;case"center":if(a)m=0;default:if(a)m=parseInt(m/2);e.runtimeStyle.marginLeft=parseInt(m)+"px"}};ie7CSS.addRecalc("margin(-left|-right)?","[^};]*auto",function(e){if(register(_1,e,e.parentElement&&e.currentStyle.display=="block"&&e.currentStyle.marginLeft=="auto"&&e.currentStyle.position!="absolute")){_1(e)}});addResize(function(){for(var i in _1.elements){e=_1.elements[i];e.runtimeStyle.marginLeft=e.runtimeStyle.marginRight="";_1(e)}})}});
+
+IE7.addModule("ie7-quirks", function() {
+
+/* ---------------------------------------------------------------------
+  This module is loaded automatically by IE7.
+--------------------------------------------------------------------- */
+
+if (quirksMode) {
+
+// -----------------------------------------------------------------------
+//  Named font sizes
+// -----------------------------------------------------------------------
+
+var $FONT_SIZES = "xx-small,x-small,small,medium,large,x-large,xx-large".split(",");
+for (var i = 0; i < $FONT_SIZES.length; i++) {
+	$FONT_SIZES[$FONT_SIZES[i]] = $FONT_SIZES[i - 1] || "0.67em";
+}
+ie7CSS.addFix(new RegExp("(font(-size)?\\s*:\\s*)([\\w\\-\\.]+)"), function($match, $offset) {
+	return $match[$offset + 1] + ($FONT_SIZES[$match[$offset + 3]] || $match[$offset + 3]);
+});
+
+// -----------------------------------------------------------------------
+//  IE5.x (getPixelValue mostly)
+// -----------------------------------------------------------------------
+
+// IE5.x specific
+if (appVersion < 6) {
+
+	var $NEGATIVE = /^\-/, $LENGTH = /(em|ex)$/i;
+	var EM = /em$/i, EX = /ex$/i;
+
+	function _getFontScale($element) {
+		var $scale = 1;
+		_tmp.style.fontFamily = $element.currentStyle.fontFamily;
+		_tmp.style.lineHeight = $element.currentStyle.lineHeight;
+		//_tmp.style.fontSize = "";
+		while ($element != body) {
+			var $fontSize = $element.currentStyle["ie7-font-size"];
+			if ($fontSize) {
+				if (EM.test($fontSize)) $scale *= parseFloat($fontSize);
+				else if (PERCENT.test($fontSize)) $scale *= (parseFloat($fontSize) / 100);
+				else if (EX.test($fontSize)) $scale *= (parseFloat($fontSize) / 2);
+				else {
+					_tmp.style.fontSize = $fontSize;
+					return 1;
+				}
+			}
+			$element = $element.parentElement;
+		}
+		return $scale;
+	};
+
+	var _tmp = createTempElement();
+
+	getPixelValue = function($element, $value) {
+		if (PIXEL.test($value||0)) return parseInt($value||0);
+		var scale = $NEGATIVE.test($value)? -1 : 1;
+		if ($LENGTH.test($value)) scale *= _getFontScale($element);
+		_tmp.style.width = (scale < 0) ? $value.slice(1) : $value;
+		body.appendChild(_tmp);
+		// retrieve pixel width
+		$value = scale * _tmp.offsetWidth;
+		// remove the temporary $element
+		_tmp.removeNode();
+		return parseInt($value);
+	};
+
+	// we need to preserve font-sizes as IE makes a bad job of it
+	HEADER = HEADER.replace(/(font(-size)?\s*:\s*([^\s;}\/]*))/gi, "ie7-font-size:$3;$1");
+
+	// cursor:pointer (IE5.x)
+	ie7CSS.addFix(/cursor\s*:\s*pointer/, "cursor:hand");
+	// display:list-item (IE5.x)
+	ie7CSS.addFix(/display\s*:\s*list-item/, "display:block");
+}
+
+// -----------------------------------------------------------------------
+//  margin:auto
+// -----------------------------------------------------------------------
+
+function getPaddingWidth($element) {
+	return getPixelValue($element, $element.currentStyle.paddingLeft) +
+		getPixelValue($element, $element.currentStyle.paddingRight);
+};
+
+function _fixMargin($element) {
+	if (appVersion < 5.5 && ie7Layout) ie7Layout.boxSizing($element.parentElement);
+	var $parent = $element.parentElement;
+	var $margin = $parent.offsetWidth - $element.offsetWidth - getPaddingWidth($parent);
+	var $autoRight = ($element.currentStyle["ie7-margin"] && $element.currentStyle.marginRight == "auto") ||
+		$element.currentStyle["ie7-margin-right"] == "auto";
+	switch ($parent.currentStyle.textAlign) {
+		case "right":
+			$margin = ($autoRight) ? parseInt($margin / 2) : 0;
+			$element.runtimeStyle.marginRight = parseInt($margin) + "px";
+			break;
+		case "center":
+			if ($autoRight) $margin = 0;
+		default:
+			if ($autoRight) $margin = parseInt($margin / 2);
+			$element.runtimeStyle.marginLeft = parseInt($margin) + "px";
+	}
+};
+
+ie7CSS.addRecalc("margin(-left|-right)?", "[^};]*auto", function($element) {
+	if (register(_fixMargin, $element,
+		$element.parentElement &&
+		$element.currentStyle.display == "block" &&
+		$element.currentStyle.marginLeft == "auto" &&
+	    $element.currentStyle.position != "absolute")) {
+			_fixMargin($element);
+	}
+});
+
+addResize(function() {
+	for (var i in _fixMargin.elements) {
+		$element = _fixMargin.elements[i];
+    	$element.runtimeStyle.marginLeft =
+    	$element.runtimeStyle.marginRight = "";
+		_fixMargin($element);
+	}
+});
+
+}}); // addModule

Modified: jifty/trunk/share/web/static/js/ie7/ie7-recalc.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-recalc.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-recalc.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,163 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-IE7.addModule("ie7-recalc",function(){C=/\sie7_class\d+/g;function _0(e){e.className=e.className.replace(C,"")};function _1(e){e.runtimeStyle.cssText=""};ie7CSS.specialize({elements:{},handlers:[],reset:function(){this.removeEventHandlers();var e=this.elements;for(var i in e)_1(e[i]);this.elements={};if(this.Rule){var e=this.Rule.elements;for(var i in e)_0(e[i]);this.Rule.elements={}}},reload:function(){ie7CSS.rules=[];this.getInlineStyles();this.screen.load();if(this.print)this.print.load();this.refresh();this.trash()},addRecalc:function(p,t,h,r){this.inherit(p,t,function(e){h(e);ie7CSS.elements[e.uniqueID]=e},r)},recalc:function(){this.reset();this.inherit()},addEventHandler:function(e,t,h){e.attachEvent(t,h);this.handlers.push(arguments)},removeEventHandlers:function(){var h;while(h=this.handlers.pop()){removeEventHandler(h[0],h[1],h[2])}},getInlineStyles:function(){var st=document.getElementsByTagName("style"),s;for(var i=st.length-1;(s=st[i]);i--){if(!s.disabled&&!s.ie7){var c=s.c||s.innerHTML;this.styles.push(c);s.c=c}}},trash:function(){var s,i;for(i=0;i<styleSheets.length;i++){s=styleSheets[i];if(!s.ie7&&!s.c){s.c=s.cssText}}this.inherit()},getText:function(s){return s.c||this.inherit(s)}});addEventHandler(window,"onunload",function(){ie7CSS.removeEventHandlers()});if(ie7CSS.Rule){ie7CSS.Rule.elements={};ie7CSS.Rule.prototype.specialize({add:function(e){this.inherit(e);ie7CSS.Rule.elements[e.uniqueID]=e}});ie7CSS.PseudoElement.hash={};ie7CSS.PseudoElement.prototype.specialize({create:function(t){var k=this.selector+":"+t.uniqueID;if(!ie7CSS.PseudoElement.hash[k]){ie7CSS.PseudoElement.hash[k]=true;this.inherit(t)}}})}if(isHTML&&ie7HTML){ie7HTML.specialize({elements:{},addRecalc:function(s,h){this.inherit(s,function(e){if(!ie7HTML.elements[e.uniqueID]){h(e);ie7HTML.elements[e.uniqueID]=e}})}})}document.recalc=function(reload){if(ie7CSS.screen){if(reload)ie7CSS.reload();recalc()}}});
+IE7.addModule("ie7-recalc", function() {
+
+/* ---------------------------------------------------------------------
+
+  This allows refreshing of IE7 style rules. If you modify the DOM
+  you can update IE7 by calling document.recalc().
+
+  This should be the LAST module included.
+
+--------------------------------------------------------------------- */
+
+// remove all IE7 classes from an element
+$CLASSES = /\sie7_class\d+/g;
+function _removeClasses($element) {
+	$element.className = $element.className.replace($CLASSES, "");
+};
+
+// clear IE7 assigned styles
+function _removeStyle($element) {
+	$element.runtimeStyle.cssText = "";
+};
+
+ie7CSS.specialize({
+	// store for elements that have style properties calculated
+	elements: {},
+	handlers: [],
+	// clear IE7 classes and styles
+	reset: function() {
+		this.removeEventHandlers();
+		// reset IE7 classes here
+		var $elements = this.elements;
+		for (var i in $elements) _removeStyle($elements[i]);
+		this.elements = {};
+		// reset runtimeStyle here
+		if (this.Rule) {
+			var $elements = this.Rule.elements;
+			for (var i in $elements) _removeClasses($elements[i]);
+			this.Rule.elements = {};
+		}
+	},
+	reload: function() {
+		ie7CSS.rules = [];
+		this.getInlineStyles();
+		this.screen.load();
+		if (this.print) this.print.load();
+		this.refresh();
+		this.trash();
+	},
+	addRecalc: function($propertyName, $test, $handler, $replacement) {
+		// call the ancestor method to add a wrapped recalc method
+		this.inherit($propertyName, $test, function($element) {
+			// execute the original recalc method
+			$handler($element);
+			// store a reference to this element so we can clear its style later
+			ie7CSS.elements[$element.uniqueID] = $element;
+		}, $replacement);
+	},
+	recalc: function() {
+		// clear IE7 styles and classes
+		this.reset();
+		// execute the ancestor method to perform recalculations
+		this.inherit();
+	},
+	addEventHandler: function($element, $type, $handler) {
+		$element.attachEvent($type, $handler);
+		// store the handler so it can be detached later
+		this.handlers.push(arguments);
+	},
+	removeEventHandlers: function() {
+		var $handler;
+	 	while ($handler = this.handlers.pop()) {
+	 		removeEventHandler($handler[0], $handler[1], $handler[2]);
+	 	}
+	},
+	getInlineStyles: function() {
+		// load inline styles
+		var $$styleSheets = document.getElementsByTagName("style"), $styleSheet;
+		for (var i = $$styleSheets.length - 1; ($styleSheet = $$styleSheets[i]); i--) {
+			if (!$styleSheet.disabled && !$styleSheet.ie7) {
+				var $cssText = $styleSheet.$cssText || $styleSheet.innerHTML;
+				this.styles.push($cssText);
+				$styleSheet.$cssText = $cssText;
+			}
+		}
+	},
+	trash: function() {
+		// trash the old style sheets
+		var $styleSheet, i;
+		for (i = 0; i < styleSheets.length; i++) {
+			$styleSheet = styleSheets[i];
+			if (!$styleSheet.ie7 && !$styleSheet.$cssText) {
+				$styleSheet.$cssText = $styleSheet.cssText;
+			}
+		}
+		this.inherit();
+	},
+	getText: function($styleSheet) {
+		return $styleSheet.$cssText || this.inherit($styleSheet);
+	}
+});
+
+// remove event handlers (they eat memory)
+addEventHandler(window, "onunload", function() {
+ 	ie7CSS.removeEventHandlers();
+});
+
+if (ie7CSS.Rule) {
+	// store all elements with an IE7 class assigned
+	ie7CSS.Rule.elements = {};
+
+	ie7CSS.Rule.prototype.specialize({
+		add: function($element) {
+			// execute the ancestor "add" method
+			this.inherit($element);
+			// store a reference to this element so we can clear its classes later
+			ie7CSS.Rule.elements[$element.uniqueID] = $element;
+		}
+	});
+
+	// store created pseudo elements
+	ie7CSS.PseudoElement.hash = {};
+
+	ie7CSS.PseudoElement.prototype.specialize({
+		create: function($target) {
+			var $key = this.selector + ":" + $target.uniqueID;
+			if (!ie7CSS.PseudoElement.hash[$key]) {
+				ie7CSS.PseudoElement.hash[$key] = true;
+				this.inherit($target);
+			}
+		}
+	});
+}
+
+if (isHTML && ie7HTML) {
+	ie7HTML.specialize({
+		elements: {},
+		addRecalc: function($selector, $handler) {
+			// call the ancestor method to add a wrapped recalc method
+			this.inherit($selector, function($element) {
+				if (!ie7HTML.elements[$element.uniqueID]) {
+					// execute the original recalc method
+					$handler($element);
+					// store a reference to this element so that
+					//  it is not "fixed" again
+					ie7HTML.elements[$element.uniqueID] = $element;
+				}
+			});
+		}
+	});
+}
+
+// allow refreshing of IE7 fixes
+document.recalc = function(reload) {
+	if (ie7CSS.screen) {
+		if (reload) ie7CSS.reload();
+		recalc();
+	}
+};
+
+});

Modified: jifty/trunk/share/web/static/js/ie7/ie7-standard-p.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-standard-p.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-standard-p.js	Fri Apr 14 10:38:57 2006
@@ -1,6 +1,2639 @@
+/**
+  * THIS VERSION OF IE7 HAS BEEN SLIGHTLY MODIFIED.  See "XXX TODO" below.
+  */
+
 /*
 	IE7, version 0.9 (alpha) (2005-08-19)
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('y(!26.1F)11 7(){2C{26.1F=8;6 2s=8.24=11 3b;8.1g=7(){z"1F 4x 0.9 (ad)"};6 5T=/5T/.Z(2y.5h.7C);6 31=(5T)?7(m){26.31(1F+"\\n\\n"+m)}:2s;6 29=ac.29.19(/ab (\\d\\.\\d)/)[1];6 2m=16.aa!="a9";y(/a8/.Z(2y.5h.7C)||29<5||!/^a7/.Z(16.2F.2a))z;6 33=16.5W=="33";6 1s,1K;6 2F=16.2F,1X,1J,1R=16.1R;6 4E="!";6 3Q={};6 2G=1z;1F.24=7(n,s){y(!3Q[n]){y(2G)1k("s="+23(s));3Q[n]=11 s()}};6 R=/^[\\w\\.]+[^:]*$/;7 1Z(h,p){y(R.Z(h))h=(p||"")+h;z h};7 3F(h,p){h=1Z(h,p);z h.1q(0,h.7a("/")+1)};6 s=16.7B[16.7B.K-1];2C{1k(s.7j)}2j(i){}6 2k=3F(s.1l);6 2v;2C{6 l=(a6()>=5)?"a5":"5n";2v=11 a4(l+".a3")}2j(i){}6 4A={};7 3T(h,p){2C{h=1Z(h,p);y(!4A[h]){2v.a2("a1",h,1z);2v.a0();y(2v.7A==0||2v.7A==9Z){4A[h]=2v.9Y}}}2j(i){31("4B [1]: 5O 9X 9W "+h)}5U{z 4A[h]||""}};6 4i=1Z("9V.9U",2k);7 2o(1w){y(1w!=1U){1w.1T=1t.1C.1T;1w.1e=1t.1C.1e}z 1w};2o.1e=7(p,c){y(!p)p={};y(!c)c=p.1h;y(c=={}.1h)c=11 3b("8.1T()");c.1i=11 3b("z 8");c.1i.1C=11 8.1i;c.1i.1C.1e(p);c.1C=11 c.1i;c.1i.1C.1h=c.1C.1h=c;c.2E=8;c.1e=1a.5P;c.4z=8.4z;z c};2o.1i=11 3b("z 8");2o.1i.1C={1h:2o,1T:7(){z 1a.5P.9T.2E.2q(8,1a)},1e:7(1w){y(8==8.1h.1C&&8.1h.1e){z 8.1h.1i.1C.1e(1w)}O(6 i 28 1w){34(i){1m"1h":1m"1g":1m"1i":5M}y(3Y 1w[i]=="7"&&1w[i]!=8[i]){1w[i].2E=8[i]}8[i]=1w[i]}y(1w.1g!=8.1g&&1w.1g!={}.1g){1w.1g.2E=8.1g;8.1g=1w.1g}z 8}};7 1t(){};8.1t=2o.1e({1h:1t,1g:7(){z"[9S "+(8.1h.1x||"9R")+"]"},9Q:7(2i){z 8.1h==2i||2i.4z(8.1h)}});1t.1x="1t";1t.2E=1U;1t.4z=7(2i){1D(2i&&2i.2E!=8)2i=2i.2E;z 7q(2i)};1t.1i.2E=2o;3u 8.1t;6 5x=1t.1e({1h:7(){8.3L=[];8.1Q=[]},1S:2s});y(29<5.5)1k(3T("17-9P.5X",2k));6 5S=1z;1F.1S=7(){2C{y(5S)z;5S=33=1o;1X=16.1X;1J=(2m)?1X:2F;y(2l&&1s)1s.2q();V.2q();1u();31("2G 9O")}2j(e){31("4B [2]: "+e.5V)}};6 1Q=[];7 1n(r){1Q.1b(r)};7 1u(){14.5g();y(2l&&1s)1s.1u();V.1u();O(6 i=0;i<1Q.K;i++)1Q[i]()};7 2U(){6 E=0,R=1,L=2;6 G=/\\(/g,S=/\\$\\d/,I=/^\\$\\d+$/,T=/([\'"])\\1\\+(.*)\\+\\1\\1$/,7t=/\\\\./g,Q=/\'/,7z=/\\3S[^\\3S]*\\3S/g;6 3N=8;8.15=7(e,r){y(!r)r="";6 l=(5R(23(e)).19(G)||"").K+1;y(S.Z(r)){y(I.Z(r)){r=25(r.1q(1))-1}1d{6 i=l;6 q=Q.Z(5R(r))?\'"\':"\'";1D(i)r=r.2O("$"+i--).2p(q+"+a[o+"+i+"]+"+q);r=11 3b("a,o","z"+q+r.13(T,"$1")+q)}}7y(e||"/^$/",r,l)};8.2V=7(s){3R.K=0;z 7u(7v(s,8.4y).13(11 1N(30,8.5Q?"5D":"g"),7w),8.4y).13(7z,"")};8.72=7(){30.K=0};6 3R=[];6 30=[];6 7x=7(){z"("+23(8[E]).1q(1,-1)+")"};30.1g=7(){z 8.2p("|")};7 7y(){1a.1g=7x;30[30.K]=1a}7 7w(){y(!1a[0])z"";6 i=1,j=0,p;1D(p=30[j++]){y(1a[i]){6 r=p[R];34(3Y r){1m"7":z r(1a,i);1m"9N":z 1a[r+i]}6 d=(1a[i].6F(3N.4y)==-1)?"":"\\3S"+1a[i]+"\\3S";z d+r}1d i+=p[L]}};7 7v(s,e){z e?s.13(11 1N("\\\\"+e+"(.)","g"),7(m,c){3R[3R.K]=c;z e}):s};7 7u(s,e){6 i=0;z e?s.13(11 1N("\\\\"+e,"g"),7(){z e+(3R[i++]||"")}):s};7 5R(s){z s.13(7t,"")}};2U.1C={1h:2U,5Q:1z,4y:""};1t.1e(2U.1C);6 3M=2U.1e({5Q:1o});6 14=7(){6 4x="2.0.2";6 C=/\\s*,\\s*/;6 14=7(s,1E){2C{6 m=[];6 u=1a.5P.5I&&!1E;6 b=(1E)?(1E.1h==7n)?1E:[1E]:[16];6 2f=45(s).2O(C),i;O(i=0;i<2f.K;i++){s=5J(2f[i]);y(4P&&s.1q(0,3).2p("")==" *#"){s=s.1q(2);1E=7o([],b,s[1])}1d 1E=b;6 j=0,t,f,a,c="";1D(j<s.K){t=s[j++];f=s[j++];c+=t+f;a="";y(s[j]=="("){1D(s[j++]!=")"&&j<s.K){a+=s[j]}a=a.1q(0,-1);c+="("+a+")"}1E=(u&&2e[c])?2e[c]:7m(1E,t,f,a);y(u)2e[c]=1E}m=m.4J(1E)}3u 14.5O;z m}2j(e){14.5O=e;z[]}};14.1g=7(){z"7 14() {\\n  [4x "+4x+"]\\n}"};6 2e={};14.5I=1z;14.5g=7(s){y(s){s=5J(s).2p("");3u 2e[s]}1d 2e={}};6 3Q={};6 2G=1z;14.24=7(n,s){y(2G)1k("s="+23(s));3Q[n]=11 s()};14.1i=7(c){z c?1k(c):8};6 1V={};6 1B={};6 1p={19:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};6 2R=[];1V[" "]=7(r,f,t,n){6 e,i,j;O(i=0;i<f.K;i++){6 s=4w(f[i],t,n);O(j=0;(e=s[j]);j++){y(2D(e)&&5K(e,n))r.1b(e)}}};1V["#"]=7(r,f,i){6 e,j;O(j=0;(e=f[j]);j++)y(e.1c==i)r.1b(e)};1V["."]=7(r,f,c){c=11 1N("(^|\\\\s)"+c+"(\\\\s|$)");6 e,i;O(i=0;(e=f[i]);i++)y(c.Z(e.1x))r.1b(e)};1V[":"]=7(r,f,p,a){6 t=1B[p],e,i;y(t)O(i=0;(e=f[i]);i++)y(t(e,a))r.1b(e)};1B["21"]=7(e){6 d=5L(e);y(d.5N)O(6 i=0;i<d.5N.K;i++){y(d.5N[i]==e)z 1o}};1B["37"]=7(e){};6 2D=7(e){z(e&&e.7k==1&&e.2W!="!")?e:1U};6 4S=7(e){1D(e&&(e=e.9M)&&!2D(e))5M;z e};6 47=7(e){1D(e&&(e=e.6W)&&!2D(e))5M;z e};6 3l=7(e){z 2D(e.7s)||47(e.7s)};6 5t=7(e){z 2D(e.7r)||4S(e.7r)};6 6q=7(e){6 c=[];e=3l(e);1D(e){c.1b(e);e=47(e)}z c};6 4P=1o;6 5H=7(e){6 d=5L(e);z(3Y d.7p=="9L")?/\\.9K$/i.Z(d.9J):7q(d.7p=="9I 9H")};6 5L=7(e){z e.9G||e.16};6 4w=7(e,t){z(t=="*"&&e.1Y)?e.1Y:e.4w(t)};6 4T=7(e,t,n){y(t=="*")z 2D(e);y(!5K(e,n))z 1z;y(!5H(e))t=t.9F();z e.2W==t};6 5K=7(e,n){z!n||(n=="*")||(e.9E==n)};6 9D=7(e){z e.9C};7 7o(r,f,1c){6 m,i,j;O(i=0;i<f.K;i++){y(m=f[i].1Y.9B(1c)){y(m.1c==1c)r.1b(m);1d y(m.K!=1U){O(j=0;j<m.K;j++){y(m[j].1c==1c)r.1b(m[j])}}}}z r};y(![].1b)7n.1C.1b=7(){O(6 i=0;i<1a.K;i++){8[8.K]=1a[i]}z 8.K};6 N=/\\|/;7 7m(1E,t,f,a){y(N.Z(f)){f=f.2O(N);a=f[0];f=f[1]}6 r=[];y(1V[t]){1V[t](r,1E,f,a)}z r};6 S=/^[^\\s>+~]/;6 7l=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;7 5J(s){y(S.Z(s))s=" "+s;z s.19(7l)||[]};6 W=/\\s*([\\s>+~(),]|^|$)\\s*/g;6 I=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;6 45=7(s){z s.13(W,"$1").13(I,"$1*$2")};6 2c={1g:7(){z"\'"},19:/^(\'[^\']*\')|("[^"]*")$/,Z:7(s){z 8.19.Z(s)},15:7(s){z 8.Z(s)?s:8+s+8},3v:7(s){z 8.Z(s)?s.1q(1,-1):s}};6 2w=7(t){z 2c.3v(t)};6 E=/([\\/()[\\]?{}|*+-])/g;7 4O(s){z s.13(E,"\\\\$1")};2G=1o;z 14}();14.5I=1o;14.24("17",7(){2D=7(e){z(e&&e.7k==1&&e.2W!="!"&&!e.2K)?e:1U}});14.1i("2w=1a[1]",42);6 2l=!14.1i("5H(1a[1])",2F);6 2r=":21{17-21:21}:37{17-21:37}"+(2l?"":"*{6Q:0}");6 V=11(5x.1e({5B:11 3M,2P:"",2Y:"",5F:[],1S:7(){8.5G();8.4t()},4t:7(){V.3O.18=2r+8.2P+8.2Y},7i:7(){6 3P=16.4w("1r"),s;O(6 i=3P.K-1;(s=3P[i]);i--){y(!s.3m&&!s.17){8.5F.1b(s.7j)}}},2q:7(){8.7i();8.4t();11 3y("2P");8.7g()},3i:7(e,r){8.5B.15(e,r)},1u:7(){6 R=/7h\\d+/g;6 s=2r.19(/[{,]/g).K;6 3P=s+(8.2P.18.19(/\\{/g)||"").K;6 2Q=8.3O.2t,r;6 4v,c,4u,e,i,j,k,1c;O(i=s;i<3P;i++){r=2Q[i];y(r&&(4v=r.1r.18.19(R))){4u=14(r.4M);y(4u.K)O(j=0;j<4v.K;j++){1c=4v[j];c=V.1Q[1c.1q(10)][2];O(k=0;(e=4u[k]);k++){y(e.D[1c])c(e)}}}}},1n:7(p,t,h,r){t=11 1N("([{;\\\\s])"+p+"\\\\s*:\\\\s*"+t+"[^;}]*");6 i=8.1Q.K;y(r)r=p+":"+r;8.3i(t,7(m,o){z(r?m[o+1]+r:m[o])+";17-"+m[o].1q(1)+";7h"+i+":1"});8.1Q.1b(1a);z i},2w:7(s){z s.18||""},5G:7(){y(33||!2l)16.5G();1d 16.9A("<1r 17=1o></1r>");8.3O=1R[1R.K-1];8.3O.17=1o;8.3O.18=2r},7g:7(){O(6 i=0;i<1R.K;i++){y(!1R[i].17&&1R[i].18){1R[i].18=""}}}}));7 3y(m){8.2Z=m;8.3q();V[m]=8;V.4t()};1t.1e({1h:3y,1g:7(){z"@2Z "+8.2Z+"{"+8.18+"}"},1u:2s,3q:7(){8.18="";8.2w();8.38();8.18=41(8.18);f={}},2w:7(){6 7e=[].4J(V.5F);6 M=/@2Z\\s+([^{]*)\\{([^@]+\\})\\s*\\}/5D;6 A=/\\9z\\b|^$/i,S=/\\9y\\b/i,P=/\\9x\\b/i;7 7d(c,m){4s.v=m;z c.13(M,4s)};7 4s(9w,m,c){m=5E(m);34(m){1m"2P":1m"2Y":y(m!=4s.v)z"";1m"1Y":z c}z""};7 5E(m){y(A.Z(m))z"1Y";1d y(S.Z(m))z(P.Z(m))?"1Y":"2P";1d y(P.Z(m))z"2Y"};6 3N=8;7 5C(s,p,m,l){6 c="";y(!l){m=5E(s.2Z);l=0}y(m=="1Y"||m==3N.2Z){y(l<3){O(6 i=0;i<s.7f.K;i++){c+=5C(s.7f[i],3F(s.2u,p),m,l+1)}}c+=79(s.2u?7c(s,p):7e.77()||"");c=7d(c,3N.2Z)}z c};6 f={};7 7c(s,p){6 u=1Z(s.2u,p);y(f[u])z"";f[u]=(s.3m)?"":7b(V.2w(s,p),3F(s.2u,p));z f[u]};6 U=/(43\\s*\\(\\s*[\'"]?)([\\w\\.]+[^:\\)]*[\'"]?\\))/5D;7 7b(c,p){z c.13(U,"$1"+p.1q(0,p.7a("/")+1)+"$2")};O(6 i=0;i<1R.K;i++){y(!1R[i].3m&&!1R[i].17){8.18+=5C(1R[i])}}},38:7(){8.18=V.5B.2V(8.18)},1u:2s});6 2c=14.1i("2c");6 4r=[];7 79(c){z 2n.2V(3r.2V(c))};7 5A(m,o){z 2c+(4r.1b(m[o])-1)+2c};7 42(v){z 2c.Z(v)?1k(4r[1k(v)]):v};6 2n=11 3M;2n.15(/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//);2n.15(/\'[^\']*\'/,5A);2n.15(/"[^"]*"/,5A);2n.15(/\\s+/," ");2n.15(/@(9v|9u)[^;\\n]+[;\\n]|<!\\-\\-|\\-\\->/);6 3r=11 3M;3r.15(/\\\\\'/,"\\\\9t");3r.15(/\\\\"/,"\\\\46");6 5z=11 3M;5z.15(/\'(\\d+)\'/,78);7 41(c){z 5z.2V(c)};7 78(m,o){z 4r[m[o+1]]};6 5y=[];7 4U(h){1n(h);1j(26,"9s",h)};7 1j(e,t,h){e.9r(t,h);5y.1b(1a)};7 76(e,t,h){2C{e.9q(t,h)}2j(i){}};1j(26,"9p",7(){6 h;1D(h=5y.77()){76(h[0],h[1],h[2])}});7 20(h,e,c){y(!h.1O)h.1O={};y(c)h.1O[e.2a]=e;1d 3u h.1O[e.2a];z c};1j(26,"6z",7(){y(!V.2Y)11 3y("2Y");V.2Y.1u()});6 75=/^\\d+(9o)?$/i;6 3d=/^\\d+%$/;6 3c=7(e,v){y(75.Z(v))z 25(v);6 s=e.1r.1f;6 r=e.J.1f;e.J.1f=e.D.1f;e.1r.1f=v||0;v=e.1r.4e;e.1r.1f=s;e.J.1f=r;z v};7 6x(t){6 e=16.3X(t||"2M");e.1r.18="1y:3C;6R:0;4K:9n;3G:1M;9m:9l(0 0 0 0);1f:-9k";e.2K=1o;z e};6 4q="17-";7 3D(e){z e.D["17-1y"]=="2z"};7 4o(e,p){z e.D[4q+p]||e.D[p]};7 2T(e,p,v){y(e.D[4q+p]==1U){e.J[4q+p]=e.D[p]}e.J[p]=v};7 4H(o,c,u){6 t=9j(7(){2C{y(!o.3q)z;o.3q(o,c,u);74(t)}2j(i){74(t)}},10)};1F.24("17-9i",7(){y(!2l)z;2r+="9h{3p-3o:9g}9f{3p-3o:1.9e;}9d{3p-3o:1.9c;}"+"9b{3p-3o:9a}99{3p-3o:.98}97{3p-3o:.96}";6 5w={};1s=11(5x.1e({1S:2s,3i:7(){8.3L.1b(1a)},2q:7(){O(6 i=0;i<8.3L.K;i++){6 m=14(8.3L[i][0]);6 f=8.3L[i][1]||6X;O(6 j=0;j<m.K;j++)f(m[j])}},1n:7(){8.1Q.1b(1a)},1u:7(){O(6 i=0;i<8.1Q.K;i++){6 m=14(8.1Q[i][0]);6 r=8.1Q[i][1],e;6 k=4g.95(2,i);O(6 j=0;(e=m[j]);j++){6 u=e.2a;y((5w[u]&k)==0){e=r(e)||e;5w[u]|=k}}}}}));1s.3i("94");1s.1n("93",7(e){y(!e.6o){6 f=14("5l,92",e)[0];y(f){1j(e,"73",7(){f.91()})}}});1s.1n("71,5l",7(e){y(e.2W=="70"){6 m=e.3z.19(/ 3n="([^"]*)"/i);e.J.3n=(m)?m[1]:""}y(e.2L=="5v"){1j(e,"73",7(){e.J.5u=1o;32("16.1Y."+e.2a+".J.5u=1z",1)})}});6 U=/^(5v|72|71)$/;1s.1n("90",7(e){1j(e,"8Z",7(){O(6 i=0;i<e.K;i++){y(6Z(e[i])){e[i].3m=1o;32("16.1Y."+e[i].2a+".3m=1z",1)}1d y(e[i].2W=="70"&&e[i].2L=="5v"){32("16.1Y."+e[i].2a+".3n=\'"+e[i].3n+"\'",1);e[i].3n=e[i].J.3n}}})});7 6Z(e){z U.Z(e.2L)&&!e.3m&&!e.J.5u};1s.1n("5d",7(e){y(e.8Y&&!e.6Y)e.6Y=""});6 P=(29<5.5)?"8X:":"";7 6X(e){6 f=16.3X("<"+P+e.3z.1q(1));y(e.3z.1q(-2)!="/>"){6 6V="</"+e.2W+">",n;1D((n=e.6W)&&n.3z!=6V){f.6t(n)}y(n)n.8W()}e.4R.6A(f,e)}});1F.24("17-8V",7(){1K=8;2r+="*{3H:22-2X}";8.3j=(29<5.5)?7(e){z e.1I}:7(e){z e.D.3j};8.3H=7(e){y(!1K.3j(e)){e.1r.2b="6T";y(e.D.6U=="1P")e.J.6U="2y";4k(e)}};7 4k(e){y(e!=1J&&e.D.1y!="3C"){4p(e);8U(e)}};6 3l=14.1i("3l");6 5t=14.1i("5t");7 4p(e){y(!e.J.3k){6 p=e.59;y(p&&1K.3j(p)&&e==3l(p))z;6 f=3l(e);y(f&&f.D.8T=="1M"&&1K.3j(f)){4p(f);m=5s(e,e.D.3k);c=5s(f,f.D.3k);y(m<0||c<0){e.J.3k=m+c}1d{e.J.3k=4g.3g(c,m)}f.J.3k="8S"}}};1k(23(4p).13(/5c/g,"6N").13(/4N/g,"8R"));7 5s(e,v){z(v=="1P")?0:3c(e,v)};6 U=/^[.\\d][\\w%]*$/,A=/^(1P|6T)$/,N="[.\\\\d]";6 4l,6S;7 6O(e){4l(e);6S(e)};7 2g(H){4l=7(e){y(!3d.Z(e.D.12))2g(e);4k(e)};7 2g(e,v){y(!e.J.3J){y(!v)v=e.D.12;e.J.3J=(U.Z(v))?4g.3g(0,2B(e,v)):v;2T(e,"12",e.J.3J)}};7 5r(e){y(!3D(e)){6 l=e.3B;1D(l&&!1K.3j(l))l=l.3B}z(l||1J).1I};7 1H(e,v){y(3d.Z(v))z 25(4c(v)/3w*5r(e));z 3c(e,v)};6 2B=7(e,v){6 b=e.D["2X-5o"]=="3G-2X";6 a=0;y(2m&&!b)a+=4n(e)+3K(e);1d y(!2m&&b)a-=4n(e)+3K(e);z 1H(e,v)+a};7 4n(e){z e.2S-e.1I};7 3K(e){z 1H(e,e.D.8Q)+1H(e,e.D.8P)};1k(23(3K).13(/6R/g,"6Q").13(/8O/g,"8N"));2r+="*{1A:1M;27:1M;3I-12:1M;3g-12:1M}";7 1A(e){y(e.D["3I-12"]!=1U){e.1r.1A=e.D["3I-12"]}y(20(1A,e,e.D.1A!="1M")){1K.3H(e);2g(e);4m(e)}};1k(23(1A).13(/3I/g,"3g"));1K.1A=1A;1K.27=27;7 4m(e){6 r=e.54();6 w=r.1W-r.1f;y(e.D.1A!="1M"&&w<=2B(e,e.D.1A)){e.J.12=2B(e,e.D.1A)}1d y(e.D.27!="1M"&&w>=2B(e,e.D.27)){e.J.12=2B(e,e.D.27)}1d{e.J.12=e.J.3J}};7 2x(e){y(20(2x,e,/^(2z|3C)$/.Z(e.D.1y)&&4o(e,"1f")!="1P"&&4o(e,"1W")!="1P"&&A.Z(4o(e,"12")))){5p(e);1K.3H(e)}};1K.2x=2x;7 5p(e){6 l=1H(e,e.J.52||e.D.1f);6 w=5r(e)-1H(e,e.D.1W)-l-8M(e);y(25(e.J.12)==w)z;e.J.12="";y(3D(e)||H||e.2S<w){y(!2m)w-=4n(e)+3K(e);y(w<0)w=0;e.J.3J=w;2T(e,"12",w)}};6 5q=0;4U(7(){6 i,w=(5q<1J.1I);5q=1J.1I;O(i 28 1A.1O){6 e=1A.1O[i];6 f=(25(e.J.12)==2B(e,e.D.1A));y(w&&f)e.J.12="";y(w==f)4m(e)}O(i 28 27.1O){6 e=27.1O[i];6 f=(25(e.J.12)==2B(e,e.D.27));y(!w&&f)e.J.12="";y(w!=f)4m(e)}O(i 28 2x.1O)5p(2x.1O[i])});y(26.8L!==1z){V.1n("12",N,2m?4l:4k)}V.1n("3I-12",N,1A);V.1n("3g-12",N,27);V.1n("1W",N,2x)};V.1n("3G-6P",N,7(e){y(e.D.8K!="8J"){e.8I=3c(e,e.D["3G-6P"])}});V.1n("2X-5o","22-2X",8.3H);V.1n("2X-5o","3G-2X",6O);6 1v=11 2U;1v.15(/6v/,"6u");1v.15(/12/,"2b");1v.15(/6w/,"5c");1v.15(/1f/,"2y");1v.15(/8H/,"6N");1v.15(/1W/,"56");1k(1v.2V(23(2g)));2g();8G(1o)});1F.24("17-8F",7(){y(29<5.5)z;6 A="6J.5n.8E";6 F="6K:"+A+"(1l=\'%1\',8D=\'6H\')";6 5j=11 1N((26.8C||"-8B.8A")+"$","i");6 3h=[];7 5f(e){6 f=e.6M[A];y(f){f.1l=e.1l;f.6L=1o}1d{e.J.5m=F.13(/%1/,e.1l);3h.1b(e)}e.1l=4i};7 6y(e){e.1l=e.4D;e.6M[A].6L=1z};V.3i(/6I\\s*:\\s*([\\d.]+)/,7(m,o){z"6G:1;5m:6K:6J.5n.8z(6I="+((4c(m[o+1])*3w)||1)+")"});6 B=/5e(-5i)?\\s*:\\s*([^\\(};]*)43\\(([^\\)]+)\\)([^;}]*)/;V.3i(B,7(m,o){6 u=42(m[o+3]);z 5j.Z(u)?"5m:"+F.13(/6H/,"8y").13(/%1/,u)+";6G:1;5e"+(m[o+1]||"")+":"+(m[o+2]||"")+"1M"+(m[o+4]||""):m[o]});y(1s){1s.1n("5d,5l",7(e){y(e.2W=="8x"&&e.2L!="5i")z;5k(e);1j(e,"8w",7(){y(!4j&&60.8v=="1l"&&e.1l.6F(4i)==-1)5k(e)})});6 6D=/^3W:.*;6E/i;6 6C=1Z("17-6E.8u",2k);7 5k(e){y(5j.Z(e.1l)){6 i=11 8t(e.12,e.2b);i.8s=7(){e.12=i.12;e.2b=i.2b;i=1U};i.1l=e.1l;e.4D=e.1l;5f(e)}1d y(6D.Z(e.1l)){e.1l=6C+"?"+e.1l.1q(5)}};6 I=/^5i/i;6 6B=1Z("17-2M.4C",2k);1s.1n("2M",7(e){y(I.Z(e.2L)){6 o=16.3X("<2M 2L=68/x-67>");o.1r.12=e.D.12;o.1r.2b=e.D.2b;o.3W=6B;6 u=1Z(e.3W,3F(5h.2u));e.4R.6A(o,e);14.5g("2M");4H(o,"",u);z o}})}6 4j=1z;1j(26,"6z",7(){4j=1o;O(6 i=0;i<3h.K;i++)6y(3h[i])});1j(26,"8r",7(){O(6 i=0;i<3h.K;i++)5f(3h[i]);4j=1z})});1F.24("17-2z",7(){V.1n("1y","2z",4a,"3C");V.1n("5e(-8q)?","[^};]*2z",4b);6 4Z=(2m)?"1X":"2F";6 4h=7(){y(1X.D.5b!="2z"){y(1X.D.5a=="1M"){1X.J.8p="8o-8n";1X.J.5a="43("+4i+")"}1X.J.5b="2z"}4h=2s};6 2h=6x("5d");7 1v(f){z 2A.2V(23(f))};6 2A=11 2U;2A.15(/6w/,"5c");2A.15(/1f/,"2y");2A.15(/6v/,"6u");2A.15(/12/,"2b");2A.15(/1W/,"56");2A.15(/X/,"Y");7 3f(e){z(e)?3D(e)||3f(e.59):1z};7 4f(e,p,3e){32("16.1Y."+e.2a+".J.4f(\'"+p+"\',\'"+3e+"\')",0)};7 4b(e){y(20(4b,e,e.D.5b=="2z"&&!e.61(1X))){4h();58(e);8m(e);4V(e)}};7 4V(e){2h.1l=e.D.5a.1q(5,-2);6 p=(e.6c)?e:e.59;p.6t(2h);57(e);8l(e);p.8k(2h)};7 58(e){e.1r.3E=e.D.3E;y(!3f(e)){6 3e="(25(J.3A)+16."+4Z+".6s)||0";4f(e,"3E",3e)}};1k(1v(58));7 57(e){6 p=3f(e)?"3E":"3A";e.J[p]=55(e,e.1r.3E)-e.54().1f-e.8j+2};1k(1v(57));7 55(e,p){34(p){1m"1f":1m"2y":z 0;1m"1W":1m"56":z 1J.1I-2h.2S;1m"8i":z(1J.1I-2h.2S)/2;8h:y(3d.Z(p)){z 25((1J.1I-2h.2S)*4c(p)/3w)}2h.1r.1f=p;z 2h.3A}};1k(1v(55));7 4a(e){y(20(4a,e,3D(e))){2T(e,"1y","3C");2T(e,"1f",e.D.1f);2T(e,"2y",e.D.2y);4h();y(1K)1K.2x(e);49(e)}};7 49(e,r){8g(e,r);4Y(e,r,1o);y(!e.J.4d&&e.D.4X=="1P"&&e.D.1W!="1P"){6 l=1J.1I-1H(e,e.D.1W)-1H(e,e.J.52)-e.1I;y(e.D.8f=="1P")l=25(l/2);y(3f(e.3B))e.J.4e+=l;1d e.J.50=l}53(e);8e(e)};7 53(e){y(e.D.12!="1P"){6 r=e.54();6 w=e.2S-1J.1I+r.1f-2;y(w>=0){w=4g.3g(3c(e,e.D.12)-w,0);2T(e,"12",w)}}};1k(1v(53));7 4Y(e,r){y(!r&&3d.Z(e.D.12)){e.J.2g=e.D.12}y(e.J.2g){e.J.12=1H(e,e.J.2g)}y(r){y(!e.J.4d)z}1d{e.J.50=0;e.J.52=e.D.1f;e.J.4d=e.D.1W!="1P"&&e.D.1f=="1P"}e.J.1f="";e.J.51=4W(e);e.J.4e=e.J.51;y(!r&&!3f(e.3B)){6 3e="J.51+J.50+16."+4Z+".6s";4f(e,"4e",3e)}};1k(1v(4Y));7 4W(e){6 s=e.3A,n=1;y(e.J.4d){s=1J.1I-e.2S-1H(e,e.D.1W)}y(e.D.4X!="1P"){s-=1H(e,e.D.4X)}1D(e=e.3B){y(e.D.1y!="8d")n=-1;s+=e.3A*n}z s};1k(1v(4W));7 1H(e,v){y(3d.Z(v))z 25(4c(v)/3w*1J.1I);z 3c(e,v)};1k(1v(1H));7 6r(){6 e=4b.1O;O(6 i 28 e)4V(e[i]);e=4a.1O;O(i 28 e){49(e[i],1o);49(e[i],1o)}48=0};6 48;4U(7(){y(!48)48=32(6r,0)})});1F.24("17-8c-1V",7(){14.24("8b-8a",7(){1V[">"]=7(r,f,t,n){6 e,i,j;O(i=0;i<f.K;i++){6 s=6q(f[i]);O(j=0;(e=s[j]);j++)y(4T(e,t,n))r.1b(e)}};1V["+"]=7(r,f,t,n){O(6 i=0;i<f.K;i++){6 e=47(f[i]);y(e&&4T(e,t,n))r.1b(e)}};1V["@"]=7(r,f,a){6 t=2R[a].Z;6 e,i;O(i=0;(e=f[i]);i++)y(t(e))r.1b(e)};1B["4N-89"]=7(e){z!4S(e)};1B["4Q"]=7(e,c){c=11 1N("^"+c,"i");1D(e&&!e.2H("4Q"))e=e.4R;z e&&c.Z(e.2H("4Q"))};1p.6p=/\\\\:/g;1p.3x="@";1p.3a={};1p.13=7(m,a,n,c,v){6 k=8.3x+m;y(!2R[k]){a=8.3Z(a,c||"",v||"");2R[k]=a;2R.1b(a)}z 2R[k].1c};1p.38=7(s){s=s.13(8.6p,"|");6 m;1D(m=s.19(8.19)){6 r=8.13(m[0],m[1],m[2],m[3],m[4]);s=s.13(8.19,r)}z s};1p.3Z=7(p,t,v){6 a={};a.1c=8.3x+2R.K;a.66=p;t=8.3a[t];t=t?t(8.2H(p),2w(v)):1z;a.Z=11 3b("e","z "+t);z a};1p.2H=7(n){34(n.5Z()){1m"1c":z"e.1c";1m"3U":z"e.1x";1m"O":z"e.6o";1m"2u":y(4P){z"23((e.3z.19(/2u=\\\\46?([^\\\\s\\\\46]*)\\\\46?/)||[])[1]||\'\')"}}z"e.2H(\'"+n.13(N,":")+"\')"};1p.3a[""]=7(a){z a};1p.3a["="]=7(a,v){z a+"=="+2c.15(v)};1p.3a["~="]=7(a,v){z"/(^| )"+4O(v)+"( |$)/.Z("+a+")"};1p.3a["|="]=7(a,v){z"/^"+4O(v)+"(-|$)/.Z("+a+")"};6 6n=45;45=7(s){z 6n(1p.38(s))}});6 1p=14.1i("1p");6 H=/a(#[\\w-]+)?(\\.[\\w-]+)?:(65|62)/i;6 6l=/\\s*\\{\\s*/,6m=/\\s*\\}\\s*/,C=/\\s*\\,\\s*/;6 F=/(.*)(:4N-(88|87))/;3y.1C.1e({38:7(){8.1T();6 o=V.2t.K;6 2Q=8.18.2O(6m),r;6 2f,c,i,j;O(i=0;i<2Q.K;i++){r=2Q[i].2O(6l);2f=r[0].2O(C);c=r[1];O(j=0;j<2f.K;j++){2f[j]=c?8.6k(2f[j],c):""}2Q[i]=2f.2p("\\n")}8.18=2Q.2p("\\n");8.2t=V.2t.1q(o)},1u:7(){6 r,i;O(i=0;(r=8.2t[i]);i++)r.1u()},6k:7(s,c){y(V.6j.Z(s)){6 m;y(m=s.19(1L.39)){z 11 1L(m[1],m[2],c)}1d y(m=s.19(2d.39)){y(!2l||!H.Z(m)||2d.44.Z(m)){z 11 2d(s,m[1],m[2],m[3],c)}}1d z 11 1G(s,c)}z s+" {"+c+"}"}});V.1e({2t:[],1B:14.1i("1B"),36:{},2e:14.1i("2e"),1G:1G,2d:2d,1L:1L,2J:2J,2q:7(){6 p=8.1B+"|6i|6h|"+8.36;p=p.13(/(21|37)\\|/g,"");8.6j=11 1N("[>+~\\[]|([:.])[\\\\w-()]+\\\\1|:("+p+")");6 c="[^\\\\s(]+\\\\s*[+~]|@\\\\d+|:(";1G.44=11 1N(c+p+")","g");2d.44=11 1N(c+8.1B+")","g");2d.39=11 1N("(.*):("+8.36+")(.*)");1L.39=/(.*):(6i|6h).*/;8.1T()},1u:7(){8.2P.1u();8.1T()},2w:7(s,p){z 2v?(3T(s.2u,p)||s.18):8.1T(s)},1j:7(e,t,h){1j(e,t,h)}});7 1G(s,c){8.1c=V.2t.K;8.1x=1G.3x+8.1c;s=(s).19(F)||s||"*";8.40=s[1]||s;8.4M=1G.6g(8.40)+"."+8.1x+(s[2]||"");8.18=c;8.39=11 1N("\\\\s"+8.1x+"(\\\\s|$)","g");V.2t.1b(8);8.1S()};1t.1e({1h:1G,1g:7(){z 8.4M+" {"+8.18+"}"},1S:2s,15:7(e){e.1x+=" "+8.1x},3v:7(e){e.1x=e.1x.13(8.39,"$1")},1u:7(){6 m=V.2e[" *."+8.1x]=14(8.40);O(i=0;i<m.K;i++)8.15(m[i])}});1G.3x="5Y";1G.6f=/>/g;1G.6g=7(s){s=1p.38(s);z s.13(8.44,"").13(8.6f," ")};7 2d(s,a,d,t,c){8.6e=a||"*";8.6d=V.36[d];8.4L=t;8.1T(s,c)};1G.1e({1h:2d,1u:7(){6 m=14(8.6e);O(6 i=0;i<m.K;i++){6 t=(8.4L)?14(8.4L,m[i]):[m[i]];y(t.K)8.6d.2q(m[i],t,8)}}});6 A=/^4I/;6 U=/^43\\s*\\(\\s*([^)]*)\\)$/;6 M={86:"85",84:"83",82:"81",80:"7Z"};6 6b=1Z("17-22.4C",2k)+"?";2r+=".2K{4K:1M}";7 1L(s,p,c){8.1y=p;6 2N=c.19(1L.6a),m,e;y(2N){2N=2N[1];m=2N.2O(/\\s+/);O(6 i=0;(e=m[i]);i++){m[i]=A.Z(e)?{4I:e.1q(5,-1)}:(e.7Y(0)=="\'")?42(e):41(e)}2N=m}8.22=2N;8.1T(s,41(c))};1G.1e({1h:1L,1g:7(){z"."+8.1x+"{4K:7X}"},1S:7(){8.19=14(8.40);O(6 i=0;i<8.19.K;i++){6 r=8.19[i].J;y(!r[8.1y])r[8.1y]={18:""};r[8.1y].18+=";"+8.18;y(8.22!=1U)r[8.1y].22=8.22}},1u:7(){y(8.22==1U)z;O(6 i=0;i<8.19.K;i++){8.3Z(8.19[i])}},3Z:7(t){6 g=t.J[8.1y];y(g){6 c=[].4J(g.22||"");O(6 j=0;j<c.K;j++){y(3Y c[j]=="2M"){c[j]=t.2H(c[j].4I)}}c=c.2p("");6 u=c.19(U);6 h=1L[u?"69":"4E"].13(/%1/,8.1x);6 4G=g.18.13(/\'/g,\'"\');6 4F=M[8.1y+7W(t.6c)];y(u){6 p=16.3X(h);t.7V(4F,p);p.3W=6b;4H(p,4G,2c.3v(u[1]))}1d{h=h.13(/%2/,4G).13(/%3/,c);t.7U(4F,h)}t.J[8.1y]=1U}}});1L.6a=/22\\s*:\\s*([^;]*)(;|$)/;1L.69="<2M 3U=\'2K %1\' 2K 12=3w% 2b=0 2L=68/x-67>";1L.4E="<17:! 3U=\'2K %1\' 2K 1r=\'%2\'>%3</17:!>";7 2J(n,a){8.66=n;8.2q=a;8.2I={};V.36[n]=8};1t.1e({1h:2J,20:7(i){6 c=i[2];i.1c=c.1c+i[0].2a;y(!8.2I[i.1c]){6 t=i[1],j;O(j=0;j<t.K;j++)c.15(t[j]);8.2I[i.1c]=i}},35:7(i){y(8.2I[i.1c]){6 c=i[2];6 t=i[1],j;O(j=0;j<t.K;j++)c.3v(t[j]);3u 8.2I[i.1c]}}});V.1B.1g=7(){6 t=[],p;O(p 28 8){y(8[p].K>1)p+="\\\\([^)]*\\\\)";t.1b(p)}z t.2p("|")};V.1B["21"]=7(e){z e.D["17-21"]=="21"};V.1B["37"]=7(e){z e.D["17-21"]=="37"};6 64=(29<5.5)?"7T":"7S";6 63=(29<5.5)?"7R":"7Q";V.36.1g=V.1B.1g;6 3s=11 2J("65",7(e){6 i=1a;V.1j(e,64,7(){3s.20(i)});V.1j(e,63,7(){3s.35(i)})});6 3t=11 2J("7P",7(e){6 i=1a;V.1j(e,"7O",7(){3t.35(i);3t.20(i)});V.1j(e,"7N",7(){3t.35(i)});y(e==16.7M){3t.20(i)}});6 3V=11 2J("62",7(e){6 i=1a;V.1j(e,"7L",7(){3V.20(i)})});1j(16,"7K",7(){6 i=3V.2I,j;O(j 28 i)3V.35(i[j]);i=3s.2I;O(j 28 i)y(!i[j][0].61(60.7J))3s.35(i[j])});2o(1p);1p.1e({2H:7(n){34(n.5Z()){1m"3U":z"e.1x.13(/\\\\b\\\\s*5Y\\\\d+/g,\'\')";1m"1l":z"(e.4D||e.1l)"}z 8.1T(n)}});2n.15(/::/,":");3r.15(/\\\\([\\7I-7H-F]{1,4})/,7(m,o){m=m[o+1];z"\\\\u"+"7G".1q(m.K)+m})});2G=1o;y(2m)1k(3T("17-7F.5X",2k));V.1S();y(2l&&1s)1s.1S();y(33)1F.1S();1d{2F.7E(1Z("17-3q.4C",2k));1j(16,"7D",7(){y(16.5W=="33")32(1F.1S,0)})}}2j(e){31("4B [0]: "+e.5V)}5U{}};',62,634,'||||||var|function|this||||||||||||||||||||||||||if|return||||currentStyle||||||runtimeStyle|length||||for|||||||ie7CSS||||test||new|width|replace|cssQuery|add|document|ie7|cssText|match|arguments|push|id|else|specialize|left|toString|constructor|valueOf|addEventHandler|eval|src|case|addRecalc|true|AttributeSelector|slice|style|ie7HTML|Common|recalc|_0|that|className|position|false|minWidth|pseudoClasses|prototype|while|fr|IE7|Rule|getPixelWidth|clientWidth|viewport|ie7Layout|PseudoElement|none|RegExp|elements|auto|recalcs|styleSheets|init|inherit|null|selectors|right|body|all|makePath|register|link|content|String|addModule|parseInt|window|maxWidth|in|appVersion|uniqueID|height|Quote|DynamicRule|cache|se|fixWidth|_1|klass|catch|path|isHTML|quirksMode|encoder|ICommon|join|apply|HEADER|DUMMY|rules|href|httpRequest|getText|fixRight|top|fixed|_2|getFixedWidth|try|thisElement|ancestor|documentElement|loaded|getAttribute|instances|DynamicPseudoClass|ie7_anon|type|object|co|split|screen|ru|attributeSelectors|offsetWidth|setOverrideStyle|ParseMaster|exec|tagName|box|print|media|_3|alert|setTimeout|complete|switch|unregister|dynamicPseudoClasses|visited|parse|MATCH|tests|Function|getPixelValue|PERCENT|ex|_4|max|_5|addFix|hasLayout|marginTop|firstElementChild|disabled|value|size|font|load|safeString|_6|_7|delete|remove|100|PREFIX|StyleSheet|outerHTML|offsetLeft|offsetParent|absolute|isFixed|backgroundPositionX|getPath|border|boxSizing|min|fixedWidth|getPaddingWidth|fixes|Parser|self|styleSheet|st|modules|_8|x01|loadFile|class|_9|data|createElement|typeof|create|selector|decode|getString|url|COMPLEX|parseSelector|x22|nextElementSibling|_10|_11|_12|_13|parseFloat|autoLeft|pixelLeft|setExpression|Math|_14|BLANK_GIF|_15|_16|applyWidth|resizeWidth|getBorderWidth|getDefinedStyle|collapseMarginTop|_17|_18|_19|refresh|el|ca|getElementsByTagName|version|escapeChar|ancestorOf|_20|Error|htc|pngSrc|ANON|po|cs|addTimer|attr|concat|display|target|selectorText|first|regEscape|isMSIE|lang|parentNode|previousElementSibling|compareTagName|addResize|_21|getScreenLeft|marginLeft|positionLeft|_22|shiftLeft|screenLeft|_23|clipWidth|getBoundingClientRect|getOffsetLeft|bottom|setOffsetLeft|backgroundLeft|parentElement|backgroundImage|backgroundAttachment|Top|img|background|_24|clearCache|location|image|_25|_26|input|filter|Microsoft|sizing|resizeRight|_27|layoutWidth|_28|lastElementChild|clicked|submit|_29|Fix|_30|decoder|_31|parser|_32|gi|_33|styles|createStyleSheet|isXML|caching|_34|compareNamespace|getDocument|continue|links|error|callee|ignoreCase|_35|_36|ie7_debug|finally|description|readyState|js|ie7_class|toLowerCase|event|contains|active|_37|_38|hover|name|scriptlet|text|OBJECT|CONTENT|_39|canHaveChildren|dynamicPseudoClass|attach|CHILD|simple|after|before|UNKNOWN|createRule|B1|B2|_40|htmlFor|NS_IE|childElements|_41|scrollLeft|appendChild|Height|Width|Left|createTempElement|_42|onbeforeprint|replaceChild|_43|_44|B64|base64|indexOf|zoom|scale|opacity|DXImageTransform|progid|enabled|filters|Bottom|borderBox|spacing|margin|padding|applyHeight|0cm|verticalAlign|en|nextSibling|_45|title|_46|BUTTON|button|reset|onclick|clearInterval|PIXEL|removeEventHandler|pop|_47|_48|lastIndexOf|_49|_50|_51|_52|imports|trash|ie7_recalc|getInlineStyles|innerHTML|nodeType|ST|select|Array|_53|mimeType|Boolean|lastChild|firstChild|ES|_54|_55|_56|_57|_58|DE|status|scripts|search|onreadystatechange|addBehavior|quirks|0000|fA|da|srcElement|onmouseup|onmousedown|activeElement|onblur|onfocus|focus|onmouseleave|onmouseout|onmouseenter|onmouseover|insertAdjacentHTML|insertAdjacentElement|Number|inline|charAt|beforeEnd|after1|afterEnd|after0|afterBegin|before1|beforeBegin|before0|letter|line|child|level2|css|css2|static|clipHeight|marginRight|positionTop|default|center|clientLeft|removeChild|setOffsetTop|backgroundTop|repeat|no|backgroundRepeat|attachment|onafterprint|onload|Image|php|propertyName|onpropertychange|INPUT|crop|Alpha|png|trans|IE7_PNG_SUFFIX|sizingMethod|AlphaImageLoader|graphics|fixHeight|Right|cellSpacing|collapse|borderCollapse|IE7_BOX_MODEL|getMarginWidth|Margin|Padding|paddingRight|paddingLeft|last|0px|styleFloat|collapseMarginBottom|layout|removeNode|HTML|alt|onsubmit|form|click|textarea|label|abbr|pow|67em|h6|83em|h5|1em|h4|17em|h3|5em|h2|2em|h1|html4|setInterval|9999|rect|clip|block|px|onunload|detachEvent|attachEvent|onresize|x27|import|namespace|ma|bprint|bscreen|ball|write|item|innerText|getTextContent|scopeName|toUpperCase|ownerDocument|Document|XML|URL|xml|unknown|previousSibling|number|successfully|ie5|instanceOf|Object|common|caller|gif|blank|file|loading|responseText|200|send|GET|open|XMLHTTP|ActiveXObject|Msxml2|ScriptEngineMajorVersion|ms_|ie7_off|CSS1Compat|compatMode|MSIE|navigator|alpha'.split('|'),0,{}))
+
+/* W3C compliance for Microsoft Internet Explorer */
+
+/* credits/thanks:
+	Shaggy, Martijn Wargers, Jimmy Cerra, Mark D Anderson,
+	Lars Dieckow, Erik Arvidsson, Gellért Gyuris, James Denny,
+	Unknown W Brackets, Benjamin Westfarer, Rob Eberhardt,
+	Bill Edney, Kevin Newman, James Crompton, Matthew Mastracci,
+	Doug Wright, Richard York, Kenneth Kolano, MegaZone,
+	Thomas Verelst
+*/
+
+// =======================================================================
+// TO DO
+// =======================================================================
+
+// PNG stretch?
+// PNG - unclickable content
+// load without ActiveX
+// allow "IE7_OFF" in any given style sheet
+
+// =======================================================================
+// TEST/BUGGY
+// =======================================================================
+
+// hr{margin:1em auto} (doesn't look right in IE5)
+
+// =======================================================================
+// DONE
+// =======================================================================
+
+// box-sizing:border-box
+// namespaced attribute selectors
+// base64 encoded images
+// support style switching
+// simplified the XMLHttpRequest wrapper in ie7-xml-extras.js
+// event handlers now refreshed on document.recalc
+// document.recalc(true) reloads style sheets
+// bug fix: min/max-width in quirks mode
+// bug fix: empty selectors
+// bug fix: quoted URLs in generated content
+// bug fix: memory leak for PNG solution
+// bug fix: "none" is now default for min/max-width/height
+// bug fix: min/max-width/height preserved by document.recalc
+
+if (!window.IE7) new function() {
+try {
+// -----------------------------------------------------------------------
+// globals
+// -----------------------------------------------------------------------
+window.IE7 = this;
+// in case of error...
+var DUMMY = this.addModule = new Function;
+// IE7 version info
+this.toString = function(){return "IE7 version 0.9 (alpha)"};
+// error reporting
+var ie7_debug = /ie7_debug/.test(top.location.search);
+var alert = (ie7_debug) ? function($message){window.alert(IE7+"\n\n"+$message)} : DUMMY;
+// IE version info
+var appVersion = navigator.appVersion.match(/MSIE (\d\.\d)/)[1];
+var quirksMode = document.compatMode != "CSS1Compat";
+// IE7 can be turned "off"
+if (/ie7_off/.test(top.location.search) || appVersion < 5 ||
+	!/^ms_/.test(document.documentElement.uniqueID)) return;
+// if using the favelet then the document has already loaded
+var complete = document.readyState == "complete";
+// another global
+var ie7HTML, ie7Layout; // loaded separately
+// handy
+var documentElement = document.documentElement, body, viewport, styleSheets = document.styleSheets;
+var ANON = "!";
+// -----------------------------------------------------------------------
+// external
+// -----------------------------------------------------------------------
+
+// cache for the various modules that make up IE7.
+//  modules are stored as functions. these are executed
+//  after the style sheet text has been loaded.
+// storing the modules as functions means that we avoid
+//  name clashes with other modules.
+var modules = {};
+var loaded = false;
+IE7.addModule = function($name, $script) {
+	if (!modules[$name]) {
+		if (loaded) eval("$script=" + String($script));
+		modules[$name] = new $script();
+	}
+};
+
+var $RELATIVE = /^[\w\.]+[^:]*$/;
+function makePath($href, $path) {
+	if ($RELATIVE.test($href)) $href = ($path || "") + $href;
+	return $href;
+};
+
+function getPath($href, $path) {
+	$href = makePath($href, $path);
+	return $href.slice(0, $href.lastIndexOf("/") + 1);
+};
+
+// get the path to this script
+var $script = document.scripts[document.scripts.length - 1];
+// create global variables from the inner text of the IE7 script
+try {
+	eval($script.innerHTML);
+} catch ($ignore) {
+	// ignore errors
+}
+var path = getPath($script.src);
+// we'll use microsoft's http request object to load external files
+var httpRequest;
+try {
+	var $lib = (ScriptEngineMajorVersion() >= 5) ? "Msxml2" : "Microsoft";
+	httpRequest = new ActiveXObject($lib + ".XMLHTTP");
+} catch ($ignore) {
+	// ActiveX disabled
+}
+var _fileCache = {};
+function loadFile($href, $path) {
+try {
+	$href = makePath($href, $path);
+	if (!_fileCache[$href]) {
+		// easy to load a file huh?
+		httpRequest.open("GET", $href, false);
+		httpRequest.send();
+		if (httpRequest.status == 0 || httpRequest.status == 200) {
+			_fileCache[$href] = httpRequest.responseText;
+		}
+	}
+} catch ($ignore) {
+	alert("Error [1]: error loading file " + $href);
+} finally {
+	return _fileCache[$href] || "";
+}};
+
+// a small transparent image used as a placeholder
+var BLANK_GIF = makePath("blank.gif", path);
+
+// -----------------------------------------------------------------------
+// OO support
+// -----------------------------------------------------------------------
+
+/*    ---   (require) /common/src?common.js       ---    */
+/*
+	common, version 1.0.4 (2005/06/05)
+	Copyright 2005, Dean Edwards
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+// this function may be used to cast any javascript object
+//  to a common object
+function ICommon(that) {
+	if (that != null) {
+		that.inherit = Common.prototype.inherit;
+		that.specialize = Common.prototype.specialize;
+	}
+	return that;
+};
+
+// sub-classing
+ICommon.specialize = function($prototype, $constructor) {
+	// initialise class properties
+	if (!$prototype) $prototype = {};
+	if (!$constructor) $constructor = $prototype.constructor;
+	if ($constructor == {}.constructor) $constructor = new Function("this.inherit()");
+	// build the inheritance chain
+	//  insert a dummy constructor between the ancestor
+	//  and the new constructor. this allows standard
+	//  prototype inheritance plus chained constructor
+	//  functions.
+	$constructor.valueOf = new Function("return this");
+	$constructor.valueOf.prototype = new this.valueOf;
+	$constructor.valueOf.prototype.specialize($prototype);
+	$constructor.prototype = new $constructor.valueOf;
+	$constructor.valueOf.prototype.constructor =
+	$constructor.prototype.constructor = $constructor;
+	$constructor.ancestor = this;
+	$constructor.specialize = arguments.callee;
+	$constructor.ancestorOf = this.ancestorOf;
+	return $constructor;
+};
+
+// root of the inheritance chain
+ICommon.valueOf = new Function("return this");
+
+// common interface
+ICommon.valueOf.prototype = {
+constructor: ICommon,
+inherit: function() {
+//-
+//   Call this method from any other method to call that method's ancestor.
+//   If there is no ancestor function then this function will throw an error.
+//-
+	return arguments.callee.caller.ancestor.apply(this, arguments);
+},
+specialize: function(that) {
+//-
+//   Add the interface of another object to this object
+//-
+	// if this object is the prototype then specialize the /real/ prototype
+	if (this == this.constructor.prototype && this.constructor.specialize) {
+		return this.constructor.valueOf.prototype.specialize(that);
+	}
+	// add each of one of the source object's properties to this object
+	for (var i in that) {
+		switch (i) {
+			case "constructor": // don't do this one!
+			case "toString":    // do this one maually
+			case "valueOf":     // ignore this one...
+				continue;
+		}
+		// implement inheritance
+		if (typeof that[i] == "function" && that[i] != this[i]) {
+			that[i].ancestor = this[i];
+		}
+		// add the property
+		this[i] = that[i];
+	}
+	// do the "toString" function manually
+	if (that.toString != this.toString && that.toString != {}.toString) {
+		that.toString.ancestor = this.toString;
+		this.toString = that.toString;
+	}
+	return this;
+}};
+
+// create the root
+function Common() {
+//--
+//   empty constructor function
+//--
+};
+this.Common = ICommon.specialize({
+constructor: Common,
+toString: function() {
+    return "[common " + (this.constructor.className || "Object") + "]";
+},
+instanceOf: function(klass) {
+    return this.constructor == klass || klass.ancestorOf(this.constructor);
+}
+});
+Common.className = "Common";
+Common.ancestor = null;
+Common.ancestorOf = function(klass) {
+	// Is this class an ancestor of the supplied class?
+	while (klass && klass.ancestor != this) klass = klass.ancestor;
+	return Boolean(klass);
+};
+
+// preserve the common prototype so that we can tell when a
+//  property of the root class has changed
+Common.valueOf.ancestor = ICommon;
+
+// c'est fini!
+delete this.Common;
+
+var Fix = Common.specialize({
+	constructor: function() {
+		this.fixes = [];
+		this.recalcs = [];
+	},
+	init: DUMMY
+});
+
+// -----------------------------------------------------------------------
+// IE5.0 compatibility
+// -----------------------------------------------------------------------
+
+/* FAVELET */
+
+// load an external module to patch IE5.0 and override the functions above
+if (appVersion < 5.5) eval(loadFile("ie7-ie5.js", path));
+
+// -----------------------------------------------------------------------
+// initialisation
+// -----------------------------------------------------------------------
+
+var _initialised = false;
+IE7.init = function() {
+try {
+	// prevent further loading
+	if (_initialised) return;
+	_initialised = complete = true;
+
+	// frequently used references
+	body = document.body;
+	viewport = (quirksMode) ? body : documentElement;
+
+	// apply CSS/DOM fixes
+	if (isHTML && ie7HTML) ie7HTML.apply();
+	ie7CSS.apply();
+	recalc();
+	alert("loaded successfully");
+} catch ($error) {
+	alert("Error [2]: " + $error.description);
+}};
+
+// a store for functions that will be called when refreshing IE7
+var recalcs = [];
+function addRecalc($recalc) {
+	recalcs.push($recalc);
+};
+function recalc() {
+	cssQuery.clearCache();
+	if (isHTML && ie7HTML) ie7HTML.recalc();
+	// re-apply style sheet rules (re-calculate ie7 classes)
+	ie7CSS.recalc();
+	// apply global fixes to the document
+	for (var i = 0; i < recalcs.length; i++) recalcs[i]();
+};
+
+// -----------------------------------------------------------------------
+//  Parser
+// -----------------------------------------------------------------------
+
+/*    ---   (include) /my/src?ParseMaster.js   ---    */
+/*
+	ParseMaster, version 1.0.2 (2005-08-19)
+	Copyright 2005, Dean Edwards
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+/* a multi-pattern parser */
+
+// KNOWN BUG: erroneous behavior when using escapeChar with a replacement value that is a function
+
+function ParseMaster() {
+	// constants
+	var $EXPRESSION = 0, $REPLACEMENT = 1, $LENGTH = 2;
+	// used to determine nesting levels
+	var $GROUPS = /\(/g, $SUB_REPLACE = /\$\d/, $INDEXED = /^\$\d+$/,
+	    $TRIM = /(['"])\1\+(.*)\+\1\1$/, $$ESCAPE = /\\./g, $QUOTE = /'/,
+	    $$DELETED = /\x01[^\x01]*\x01/g;
+	var self = this;
+	// public
+	this.add = function($expression, $replacement) {
+		if (!$replacement) $replacement = "";
+		// count the number of sub-expressions
+		//  - add one because each pattern is itself a sub-expression
+		var $length = (_internalEscape(String($expression)).match($GROUPS) || "").length + 1;
+		// does the pattern deal with sub-expressions?
+		if ($SUB_REPLACE.test($replacement)) {
+			// a simple lookup? (e.g. "$2")
+			if ($INDEXED.test($replacement)) {
+				// store the index (used for fast retrieval of matched strings)
+				$replacement = parseInt($replacement.slice(1)) - 1;
+			} else { // a complicated lookup (e.g. "Hello $2 $1")
+				// build a function to do the lookup
+				var i = $length;
+				var $quote = $QUOTE.test(_internalEscape($replacement)) ? '"' : "'";
+				while (i) $replacement = $replacement.split("$" + i--).join($quote + "+a[o+" + i + "]+" + $quote);
+				$replacement = new Function("a,o", "return" + $quote + $replacement.replace($TRIM, "$1") + $quote);
+			}
+		}
+		// pass the modified arguments
+		_add($expression || "/^$/", $replacement, $length);
+	};
+	// execute the global replacement
+	this.exec = function($string) {
+		_escaped.length = 0;
+		return _unescape(_escape($string, this.escapeChar).replace(
+			new RegExp(_patterns, this.ignoreCase ? "gi" : "g"), _replacement), this.escapeChar).replace($$DELETED, "");
+	};
+	// clear the patterns collection so that this object may be re-used
+	this.reset = function() {
+		_patterns.length = 0;
+	};
+
+	// private
+	var _escaped = [];  // escaped characters
+	var _patterns = []; // patterns stored by index
+	var _toString = function(){return "(" + String(this[$EXPRESSION]).slice(1, -1) + ")"};
+	_patterns.toString = function(){return this.join("|")};
+	// create and add a new pattern to the patterns collection
+	function _add() {
+		arguments.toString = _toString;
+		// store the pattern - as an arguments object (i think this is quicker..?)
+		_patterns[_patterns.length] = arguments;
+	}
+	// this is the global replace function (it's quite complicated)
+	function _replacement() {
+		if (!arguments[0]) return "";
+		var i = 1, j = 0, $pattern;
+		// loop through the patterns
+		while ($pattern = _patterns[j++]) {
+			// do we have a result?
+			if (arguments[i]) {
+				var $replacement = $pattern[$REPLACEMENT];
+				switch (typeof $replacement) {
+					case "function": return $replacement(arguments, i);
+					case "number": return arguments[$replacement + i];
+				}
+				var $delete = (arguments[i].indexOf(self.escapeChar) == -1) ? "" :
+					"\x01" + arguments[i] + "\x01";
+				return $delete + $replacement;
+			// skip over references to sub-expressions
+			} else i += $pattern[$LENGTH];
+		}
+	};
+	// encode escaped characters
+	function _escape($string, $escapeChar) {
+		return $escapeChar ? $string.replace(new RegExp("\\" + $escapeChar + "(.)", "g"), function($match, $char) {
+			_escaped[_escaped.length] = $char;
+			return $escapeChar;
+		}) : $string;
+	};
+	// decode escaped characters
+	function _unescape($string, $escapeChar) {
+		var i = 0;
+		return $escapeChar ? $string.replace(new RegExp("\\" + $escapeChar, "g"), function() {
+			return $escapeChar + (_escaped[i++] || "");
+		}) : $string;
+	};
+	function _internalEscape($string) {
+		return $string.replace($$ESCAPE, "");
+	};
+};
+ParseMaster.prototype = {
+	constructor: ParseMaster,
+	ignoreCase: false,
+	escapeChar: ""
+};
+Common.specialize(ParseMaster.prototype);
+var Parser = ParseMaster.specialize({ignoreCase: true});
+
+// -----------------------------------------------------------------------
+//  cssQuery
+// -----------------------------------------------------------------------
+
+/*    ---   (include) /my/cssQuery/src?cssQuery.js   ---    */
+/*
+	cssQuery, version 2.0.2 (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+// the following functions allow querying of the DOM using CSS selectors
+var cssQuery = function() {
+var version = "2.0.2";
+
+// -----------------------------------------------------------------------
+// main query function
+// -----------------------------------------------------------------------
+
+var $COMMA = /\s*,\s*/;
+var cssQuery = function($selector, $$from) {
+try {
+	var $match = [];
+	var $useCache = arguments.callee.caching && !$$from;
+	var $base = ($$from) ? ($$from.constructor == Array) ? $$from : [$$from] : [document];
+	// process comma separated selectors
+	var $$selectors = parseSelector($selector).split($COMMA), i;
+	for (i = 0; i < $$selectors.length; i++) {
+		// convert the selector to a stream
+		$selector = _toStream($$selectors[i]);
+		// faster chop if it starts with id (MSIE only)
+		if (isMSIE && $selector.slice(0, 3).join("") == " *#") {
+			$selector = $selector.slice(2);
+			$$from = _msie_selectById([], $base, $selector[1]);
+		} else $$from = $base;
+		// process the stream
+		var j = 0, $token, $filter, $arguments, $cacheSelector = "";
+		while (j < $selector.length) {
+			$token = $selector[j++];
+			$filter = $selector[j++];
+			$cacheSelector += $token + $filter;
+			// some pseudo-classes allow arguments to be passed
+			//  e.g. nth-child(even)
+			$arguments = "";
+			if ($selector[j] == "(") {
+				while ($selector[j++] != ")" && j < $selector.length) {
+					$arguments += $selector[j];
+				}
+				$arguments = $arguments.slice(0, -1);
+				$cacheSelector += "(" + $arguments + ")";
+			}
+			// process a token/filter pair use cached results if possible
+			$$from = ($useCache && cache[$cacheSelector]) ?
+				cache[$cacheSelector] : select($$from, $token, $filter, $arguments);
+			if ($useCache) cache[$cacheSelector] = $$from;
+		}
+		$match = $match.concat($$from);
+	}
+	delete cssQuery.error;
+	return $match;
+} catch ($error) {
+	cssQuery.error = $error;
+	return [];
+}};
+
+// -----------------------------------------------------------------------
+// public interface
+// -----------------------------------------------------------------------
+
+cssQuery.toString = function() {
+	return "function cssQuery() {\n  [version " + version + "]\n}";
+};
+
+// caching
+var cache = {};
+cssQuery.caching = false;
+cssQuery.clearCache = function($selector) {
+	if ($selector) {
+		$selector = _toStream($selector).join("");
+		delete cache[$selector];
+	} else cache = {};
+};
+
+// allow extensions
+var modules = {};
+var loaded = false;
+cssQuery.addModule = function($name, $script) {
+	if (loaded) eval("$script=" + String($script));
+	modules[$name] = new $script();;
+};
+
+// hackery
+cssQuery.valueOf = function($code) {
+	return $code ? eval($code) : this;
+};
+
+// -----------------------------------------------------------------------
+// declarations
+// -----------------------------------------------------------------------
+
+var selectors = {};
+var pseudoClasses = {};
+// a safari bug means that these have to be declared here
+var AttributeSelector = {match: /\[([\w-]+(\|[\w-]+)?)\s*(\W?=)?\s*([^\]]*)\]/};
+var attributeSelectors = [];
+
+// -----------------------------------------------------------------------
+// selectors
+// -----------------------------------------------------------------------
+
+// descendant selector
+selectors[" "] = function($results, $from, $tagName, $namespace) {
+	// loop through current selection
+	var $element, i, j;
+	for (i = 0; i < $from.length; i++) {
+		// get descendants
+		var $subset = getElementsByTagName($from[i], $tagName, $namespace);
+		// loop through descendants and add to results selection
+		for (j = 0; ($element = $subset[j]); j++) {
+			if (thisElement($element) && compareNamespace($element, $namespace))
+				$results.push($element);
+		}
+	}
+};
+
+// ID selector
+selectors["#"] = function($results, $from, $id) {
+	// loop through current selection and check ID
+	var $element, j;
+	for (j = 0; ($element = $from[j]); j++) if ($element.id == $id) $results.push($element);
+};
+
+// class selector
+selectors["."] = function($results, $from, $className) {
+	// create a RegExp version of the class
+	$className = new RegExp("(^|\\s)" + $className + "(\\s|$)");
+	// loop through current selection and check class
+	var $element, i;
+	for (i = 0; ($element = $from[i]); i++)
+		if ($className.test($element.className)) $results.push($element);
+};
+
+// pseudo-class selector
+selectors[":"] = function($results, $from, $pseudoClass, $arguments) {
+	// retrieve the cssQuery pseudo-class function
+	var $test = pseudoClasses[$pseudoClass], $element, i;
+	// loop through current selection and apply pseudo-class filter
+	if ($test) for (i = 0; ($element = $from[i]); i++)
+		// if the cssQuery pseudo-class function returns "true" add the element
+		if ($test($element, $arguments)) $results.push($element);
+};
+
+// -----------------------------------------------------------------------
+// pseudo-classes
+// -----------------------------------------------------------------------
+
+pseudoClasses["link"] = function($element) {
+	var $document = getDocument($element);
+	if ($document.links) for (var i = 0; i < $document.links.length; i++) {
+		if ($document.links[i] == $element) return true;
+	}
+};
+
+pseudoClasses["visited"] = function($element) {
+	// can't do this without jiggery-pokery
+};
+
+// -----------------------------------------------------------------------
+// DOM traversal
+// -----------------------------------------------------------------------
+
+// IE5/6 includes comments (LOL) in it's elements collections.
+// so we have to check for this. the test is tagName != "!". LOL (again).
+var thisElement = function($element) {
+	return ($element && $element.nodeType == 1 && $element.tagName != "!") ? $element : null;
+};
+
+// return the previous element to the supplied element
+//  previousSibling is not good enough as it might return a text or comment node
+var previousElementSibling = function($element) {
+	while ($element && ($element = $element.previousSibling) && !thisElement($element)) continue;
+	return $element;
+};
+
+// return the next element to the supplied element
+var nextElementSibling = function($element) {
+	while ($element && ($element = $element.nextSibling) && !thisElement($element)) continue;
+	return $element;
+};
+
+// return the first child ELEMENT of an element
+//  NOT the first child node (though they may be the same thing)
+var firstElementChild = function($element) {
+	return thisElement($element.firstChild) || nextElementSibling($element.firstChild);
+};
+
+var lastElementChild = function($element) {
+	return thisElement($element.lastChild) || previousElementSibling($element.lastChild);
+};
+
+// return child elements of an element (not child nodes)
+var childElements = function($element) {
+	var $childElements = [];
+	$element = firstElementChild($element);
+	while ($element) {
+		$childElements.push($element);
+		$element = nextElementSibling($element);
+	}
+	return $childElements;
+};
+
+// -----------------------------------------------------------------------
+// browser compatibility
+// -----------------------------------------------------------------------
+
+// all of the functions in this section can be overwritten. the default
+//  configuration is for IE. The functions below reflect this. standard
+//  methods are included in a separate module. It would probably be better
+//  the other way round of course but this makes it easier to keep IE7 trim.
+
+var isMSIE = true;
+
+var isXML = function($element) {
+	var $document = getDocument($element);
+	return (typeof $document.mimeType == "unknown") ?
+		/\.xml$/i.test($document.URL) :
+		Boolean($document.mimeType == "XML Document");
+};
+
+// return the element's containing document
+var getDocument = function($element) {
+	return $element.ownerDocument || $element.document;
+};
+
+var getElementsByTagName = function($element, $tagName) {
+	return ($tagName == "*" && $element.all) ? $element.all : $element.getElementsByTagName($tagName);
+};
+
+var compareTagName = function($element, $tagName, $namespace) {
+	if ($tagName == "*") return thisElement($element);
+	if (!compareNamespace($element, $namespace)) return false;
+	if (!isXML($element)) $tagName = $tagName.toUpperCase();
+	return $element.tagName == $tagName;
+};
+
+var compareNamespace = function($element, $namespace) {
+	return !$namespace || ($namespace == "*") || ($element.scopeName == $namespace);
+};
+
+var getTextContent = function($element) {
+	return $element.innerText;
+};
+
+function _msie_selectById($results, $from, id) {
+	var $match, i, j;
+	for (i = 0; i < $from.length; i++) {
+		if ($match = $from[i].all.item(id)) {
+			if ($match.id == id) $results.push($match);
+			else if ($match.length != null) {
+				for (j = 0; j < $match.length; j++) {
+					if ($match[j].id == id) $results.push($match[j]);
+				}
+			}
+		}
+	}
+	return $results;
+};
+
+// for IE5.0
+if (![].push) Array.prototype.push = function() {
+	for (var i = 0; i < arguments.length; i++) {
+		this[this.length] = arguments[i];
+	}
+	return this.length;
+};
+
+// -----------------------------------------------------------------------
+// query support
+// -----------------------------------------------------------------------
+
+// select a set of matching elements.
+// "from" is an array of elements.
+// "token" is a character representing the type of filter
+//  e.g. ">" means child selector
+// "filter" represents the tag name, id or class name that is being selected
+// the function returns an array of matching elements
+var $NAMESPACE = /\|/;
+function select($$from, $token, $filter, $arguments) {
+	if ($NAMESPACE.test($filter)) {
+		$filter = $filter.split($NAMESPACE);
+		$arguments = $filter[0];
+		$filter = $filter[1];
+	}
+	var $results = [];
+	if (selectors[$token]) {
+		selectors[$token]($results, $$from, $filter, $arguments);
+	}
+	return $results;
+};
+
+// -----------------------------------------------------------------------
+// parsing
+// -----------------------------------------------------------------------
+
+// convert css selectors to a stream of tokens and filters
+//  it's not a real stream. it's just an array of strings.
+var $STANDARD_SELECT = /^[^\s>+~]/;
+var $$STREAM = /[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;
+function _toStream($selector) {
+	if ($STANDARD_SELECT.test($selector)) $selector = " " + $selector;
+	return $selector.match($$STREAM) || [];
+};
+
+var $WHITESPACE = /\s*([\s>+~(),]|^|$)\s*/g;
+var $IMPLIED_ALL = /([\s>+~,]|[^(]\+|^)([#.:@])/g;
+var parseSelector = function($selector) {
+	return $selector
+	// trim whitespace
+	.replace($WHITESPACE, "$1")
+	// e.g. ".class1" --> "*.class1"
+	.replace($IMPLIED_ALL, "$1*$2");
+};
+
+var Quote = {
+	toString: function() {return "'"},
+	match: /^('[^']*')|("[^"]*")$/,
+	test: function($string) {
+		return this.match.test($string);
+	},
+	add: function($string) {
+		return this.test($string) ? $string : this + $string + this;
+	},
+	remove: function($string) {
+		return this.test($string) ? $string.slice(1, -1) : $string;
+	}
+};
+
+var getText = function($text) {
+	return Quote.remove($text);
+};
+
+var $ESCAPE = /([\/()[\]?{}|*+-])/g;
+function regEscape($string) {
+	return $string.replace($ESCAPE, "\\$1");
+};
+
+// -----------------------------------------------------------------------
+// modules
+// -----------------------------------------------------------------------
+
+// -------- >>      insert modules here for packaging       << -------- \\
+
+loaded = true;
+
+// -----------------------------------------------------------------------
+// return the query function
+// -----------------------------------------------------------------------
+
+return cssQuery;
+
+}(); // cssQuery
+cssQuery.caching = true;
+cssQuery.addModule("ie7", function() {
+	thisElement = function($element) {
+		return ($element && $element.nodeType == 1 && $element.tagName != "!" && !$element.ie7_anon) ? $element : null;
+	};
+});
+cssQuery.valueOf("getText=arguments[1]", getString);
+
+// -----------------------------------------------------------------------
+//  IE7 CSS
+// -----------------------------------------------------------------------
+
+// assume html unless explicitly defined
+var isHTML = !cssQuery.valueOf("isXML(arguments[1])", documentElement);
+var HEADER = ":link{ie7-link:link}:visited{ie7-link:visited}" + (isHTML ? "" : "*{margin:0}");
+
+var ie7CSS = new (Fix.specialize({ // single instance
+	parser: new Parser,
+	screen: "",
+	print: "",
+	styles: [],
+	init: function() {
+		this.createStyleSheet();
+		this.refresh();
+	},
+	refresh: function() {
+		ie7CSS.styleSheet.cssText = HEADER + this.screen + this.print;
+	},
+	getInlineStyles: function() {
+		// load inline styles
+		var $$styleSheets = document.getElementsByTagName("style"), $styleSheet;
+		for (var i = $$styleSheets.length - 1; ($styleSheet = $$styleSheets[i]); i--) {
+			if (!$styleSheet.disabled && !$styleSheet.ie7) {
+				this.styles.push($styleSheet.innerHTML);
+			}
+		}
+	},
+	apply: function() {
+		this.getInlineStyles();
+		this.refresh();
+		new StyleSheet("screen");
+		this.trash();
+	},
+	addFix: function($expression, $replacement) {
+		this.parser.add($expression, $replacement);
+	},
+	recalc: function() {
+		// we're going to read through all style rules.
+		//  certain rules have had ie7 properties added to them.
+		//   e.g. p{top:0; ie7_recalc2:1; left:0}
+		//  this flags a property in the rule as needing a fix.
+		//  the selector text is then used to query the document.
+		//  we can then loop through the results of the query
+		//  and fix the elements.
+		// we ignore the IE7 rules - so count them in the header
+		var $RECALCS = /ie7_recalc\d+/g;
+		var $start = HEADER.match(/[{,]/g).length;
+		// only calculate screen fixes. print fixes don't show up anyway
+		var $$stop = $start + (this.screen.cssText.match(/\{/g)||"").length;
+		var $$rules = this.styleSheet.rules, $rule;
+		var $$calcs, $calc, $$elements, $element, i, j, k, id;
+		// loop through all rules
+		for (i = $start; i < $$stop; i++) {
+			$rule = $$rules[i];
+			// search for the "ie7_recalc" flag (there may be more than one)
+			if ($rule && ($$calcs = $rule.style.cssText.match($RECALCS))) {
+				// use the selector text to query the document
+				$$elements = cssQuery($rule.selectorText);
+				// if there are matching elements then loop
+				//  through the recalc functions and apply them
+				//  to each element
+				if ($$elements.length) for (j = 0; j < $$calcs.length; j++) {
+					// get the matching flag (e.g. ie7_recalc3)
+					id = $$calcs[j];
+					// extract the numeric id from the end of the flag
+					//  and use it to index the collection of recalc
+					//  functions
+					$calc = ie7CSS.recalcs[id.slice(10)][2];
+					for (k = 0; ($element = $$elements[k]); k++) {
+						// apply the fix
+						if ($element.currentStyle[id]) $calc($element);
+					}
+				}
+			}
+		}
+	},
+	// recalcs occur whenever the document is refreshed using document.recalc()
+	addRecalc: function($propertyName, $test, $handler, $replacement) {
+		$test = new RegExp("([{;\\s])" + $propertyName + "\\s*:\\s*" + $test + "[^;}]*");
+		var $id = this.recalcs.length;
+        if ($replacement) $replacement = $propertyName + ":" + $replacement;
+		this.addFix($test, function($match, $offset) {
+			return ($replacement ?  $match[$offset + 1] + $replacement : $match[$offset]) +
+				";ie7-" + $match[$offset].slice(1) + ";ie7_recalc" + $id + ":1";
+		});
+		this.recalcs.push(arguments);
+		return $id;
+	},
+	// retrieve the text of a style sheet
+	getText: function($styleSheet) {
+		// without the CSS2 module we assume CSS1, so it is safe to get Microsoft's stored text
+		return $styleSheet.cssText || "";
+	},
+	createStyleSheet: function() {
+		// create the IE7 style sheet
+		if (complete || !isHTML) document.createStyleSheet();
+		// this fixes a bug to do with the <base> tag
+		else document.write("<style ie7=true></style>");
+		// get the new style sheet
+		this.styleSheet = styleSheets[styleSheets.length - 1];
+		// flag it so we can ignore it during parsing
+		this.styleSheet.ie7 = true;
+		this.styleSheet.cssText = HEADER;
+	},
+	trash: function() {
+		// trash the old style sheets
+		for (var i = 0; i < styleSheets.length; i++) {
+			if (!styleSheets[i].ie7 && styleSheets[i].cssText) {
+				styleSheets[i].cssText = "";
+			}
+		}
+	}
+}));
+
+// -----------------------------------------------------------------------
+//  IE7 StyleSheet class
+// -----------------------------------------------------------------------
+
+function StyleSheet($media) {
+	this.media = $media;
+	this.load();
+	ie7CSS[$media] = this;
+	ie7CSS.refresh();
+};
+Common.specialize({
+	constructor: StyleSheet,
+	toString: function() {
+		return "@media " + this.media + "{" + this.cssText + "}";
+	},
+	recalc: DUMMY,
+	load: function() {
+		this.cssText = "";
+		this.getText();
+		this.parse();
+		this.cssText = decode(this.cssText);
+		$fileCache = {};
+	},
+	getText: function() {
+		// store for style sheet text
+		var _inlineStyles = [].concat(ie7CSS.styles);
+		// parse media decalarations
+		var $MEDIA = /@media\s+([^{]*)\{([^@]+\})\s*\}/gi;
+		var $ALL = /\ball\b|^$/i, $SCREEN = /\bscreen\b/i, $PRINT = /\bprint\b/i;
+		function _parseMedia($cssText, $media) {
+			_filterMedia.$value = $media;
+			return $cssText.replace($MEDIA, _filterMedia);
+		};
+		function _filterMedia($$match, $media, $cssText) {
+			$media = _simpleMedia($media);
+			switch ($media) {
+				case "screen":
+				case "print":
+					if ($media != _filterMedia.$value) return "";
+				case "all":
+					return $cssText;
+			}
+			return "";
+		};
+		function _simpleMedia($media) {
+			if ($ALL.test($media)) return "all";
+			else if ($SCREEN.test($media)) return ($PRINT.test($media)) ? "all" : "screen";
+			else if ($PRINT.test($media)) return "print";
+		};
+		var self = this;
+		function _getCSSText($styleSheet, $path, $media, $level) {
+			var $cssText = "";
+			if (!$level) {
+				$media = _simpleMedia($styleSheet.media);
+				$level = 0;
+			}
+			if ($media == "all" || $media == self.media) {
+				// IE only allows importing style sheets three levels deep.
+				// it will crash if you try to access a level below this
+				if ($level < 3) {
+					// loop through imported style sheets
+					for (var i = 0; i < $styleSheet.imports.length; i++) {
+						// call this function recursively to get all imported style sheets
+						$cssText += _getCSSText($styleSheet.imports[i], getPath($styleSheet.href, $path), $media, $level + 1);
+					}
+				}
+				// retrieve inline style or load an external style sheet
+				$cssText += _encode($styleSheet.href ? _loadStyleSheet($styleSheet, $path) : _inlineStyles.pop() || "");
+				$cssText = _parseMedia($cssText, self.media);
+			}
+			return $cssText;
+		};
+		// store loaded cssText URLs
+		var $fileCache = {};
+		// load an external style sheet
+		function _loadStyleSheet($styleSheet, $path) {
+			var $url = makePath($styleSheet.href, $path);
+			// if the style sheet has already loaded then don't duplicate it
+			if ($fileCache[$url]) return "";
+			// load from source
+			$fileCache[$url] = ($styleSheet.disabled) ? "" :
+				_fixUrls(ie7CSS.getText($styleSheet, $path), getPath($styleSheet.href, $path));
+			return $fileCache[$url];
+		};
+		// fix css paths
+		// we're lumping all css text into one big style sheet so relative
+		//  paths have to be fixed. this is necessary anyway because of other
+		//  explorer bugs.
+		var $URL = /(url\s*\(\s*['"]?)([\w\.]+[^:\)]*['"]?\))/gi;
+		function _fixUrls($cssText, $pathname) {
+			// hack & slash
+			return $cssText.replace($URL, "$1" + $pathname.slice(0, $pathname.lastIndexOf("/") + 1) + "$2");
+		};
+
+		// load all style sheets in the document
+		for (var i = 0; i < styleSheets.length; i++) {
+			if (!styleSheets[i].disabled && !styleSheets[i].ie7) {
+				this.cssText += _getCSSText(styleSheets[i]);
+			}
+		}
+	}, // end: load
+	parse: function() {
+		this.cssText = ie7CSS.parser.exec(this.cssText);
+	},
+	recalc: DUMMY
+});
+
+// -----------------------------------------------------------------------
+// encoding
+// -----------------------------------------------------------------------
+
+var Quote = cssQuery.valueOf("Quote");
+var _strings = [];
+
+function _encode($cssText) {
+	return encoder.exec(safeString.exec($cssText));
+};
+
+function _encodeString($match, $offset) {
+	return Quote + (_strings.push($match[$offset]) - 1) + Quote;
+};
+
+function getString($value) {
+	return Quote.test($value) ? eval(_strings[eval($value)]) : $value;
+};
+
+var encoder = new Parser;
+// comments
+encoder.add(/\/\*[^*]*\*+([^\/][^*]*\*+)*\//);
+// strings
+encoder.add(/'[^']*'/, _encodeString);
+encoder.add(/"[^"]*"/, _encodeString);
+// white space
+encoder.add(/\s+/, " ");
+// get rid
+encoder.add(/@(namespace|import)[^;\n]+[;\n]|<!\-\-|\-\->/);
+
+var safeString = new Parser;
+safeString.add(/\\'/, "\\x27");
+safeString.add(/\\"/, "\\x22");
+
+// -----------------------------------------------------------------------
+// decoding
+// -----------------------------------------------------------------------
+
+var decoder = new Parser;
+// comments
+decoder.add(/'(\d+)'/, _decodeString);
+
+function decode($cssText) {
+	return decoder.exec($cssText);
+};
+
+function _decodeString($match, $offset) {
+	return _strings[$match[$offset + 1]];
+};
+
+// -----------------------------------------------------------------------
+// event handling
+// -----------------------------------------------------------------------
+
+var _handlers = [];
+
+function addResize($handler) {
+	addRecalc($handler);
+	addEventHandler(window, "onresize", $handler);
+};
+
+// add an event handler (function) to an element
+function addEventHandler($element, $type, $handler) {
+	$element.attachEvent($type, $handler);
+	// store the handler so it can be detached later
+	_handlers.push(arguments);
+};
+
+// remove an event handler assigned to an element by IE7
+function removeEventHandler($element, $type, $handler) {
+try {
+	$element.detachEvent($type, $handler);
+} catch ($ignore) {
+	// write a letter of complaint to microsoft..
+}};
+
+// remove event handlers (they eat memory)
+addEventHandler(window, "onunload", function() {
+	var $handler;
+ 	while ($handler = _handlers.pop()) {
+ 		removeEventHandler($handler[0], $handler[1], $handler[2]);
+ 	}
+});
+
+function register($handler, $element, $condition) { // - at DRE
+	//var $set = $handler[$element.uniqueID];
+	if (!$handler.elements) $handler.elements = {};
+	if ($condition) $handler.elements[$element.uniqueID] = $element;
+	else delete $handler.elements[$element.uniqueID];
+	//return !$set && $condition;
+	return $condition;
+};
+
+// -----------------------------------------------------------------------
+// events
+// -----------------------------------------------------------------------
+
+addEventHandler(window, "onbeforeprint", function() {
+	if (!ie7CSS.print) new StyleSheet("print");
+	ie7CSS.print.recalc();
+});
+
+// -----------------------------------------------------------------------
+// pixel conversion
+// -----------------------------------------------------------------------
+
+// this is handy because it means that web developers can mix and match
+//  measurement units in their style sheets. it is not uncommon to
+//  express something like padding in "em" units whilst border thickness
+//  is most often expressed in pixels.
+
+var PIXEL = /^\d+(px)?$/i;
+var PERCENT = /^\d+%$/;
+var getPixelValue = function($element, $value) {
+	if (PIXEL.test($value)) return parseInt($value);
+	var $style = $element.style.left;
+	var $runtimeStyle = $element.runtimeStyle.left;
+	$element.runtimeStyle.left = $element.currentStyle.left;
+	$element.style.left = $value || 0;
+	$value = $element.style.pixelLeft;
+	$element.style.left = $style;
+	$element.runtimeStyle.left = $runtimeStyle;
+	return $value;
+};
+
+// create a temporary element which is used to inherit styles
+//  from the target element. the temporary element can be resized
+//  to determine pixel widths/heights
+function createTempElement($tagName) {
+	var $element = document.createElement($tagName || "object");
+	$element.style.cssText = "position:absolute;padding:0;display:block;border:none;clip:rect(0 0 0 0);left:-9999";
+	$element.ie7_anon = true;
+	return $element;
+};
+
+// -----------------------------------------------------------------------
+// generic
+// -----------------------------------------------------------------------
+
+var _IE7_ = "ie7-";
+
+function isFixed($element) {
+	return $element.currentStyle["ie7-position"] == "fixed";
+};
+
+// original style
+function getDefinedStyle($element, $propertyName) {
+	return $element.currentStyle[_IE7_ + $propertyName] || $element.currentStyle[$propertyName];
+};
+
+function setOverrideStyle($element, $propertyName, $value) {
+	if ($element.currentStyle[_IE7_ + $propertyName] == null) {
+		$element.runtimeStyle[_IE7_ + $propertyName] = $element.currentStyle[$propertyName];
+	}
+	$element.runtimeStyle[$propertyName] = $value;
+};
+
+function addTimer($object, $cssText, $url) {
+	var $timer = setInterval(function() {
+	try {
+		// wait until the object has loaded
+		if (!$object.load) return;
+		$object.load($object, $cssText, $url);
+		clearInterval($timer);
+	} catch ($ignore) {
+		// remote scripting
+		clearInterval($timer);
+	}}, 10);
+};
+
+// -----------------------------------------------------------------------
+//  modules
+// -----------------------------------------------------------------------
+
+// -------- >>      insert modules here for packaging       << -------- \\
+
+/*
+	IE7, version 0.9 (alpha) (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+IE7.addModule("ie7-html4", function() {
+
+// don't bother with this for XML documents
+if (!isHTML) return;
+
+// -----------------------------------------------------------------------
+// HTML Header
+// -----------------------------------------------------------------------
+
+// create default font-sizes
+HEADER += "h1{font-size:2em}h2{font-size:1.5em;}h3{font-size:1.17em;}" +
+	"h4{font-size:1em}h5{font-size:.83em}h6{font-size:.67em}";
+
+// -----------------------------------------------------------------------
+// IE7 HTML Factory
+// -----------------------------------------------------------------------
+
+var _fixed = {};
+
+ie7HTML = new (Fix.specialize({ // single instance
+	init: DUMMY,
+	// fixes are a one-off, they are applied when the document is loaded
+	addFix: function() {
+		this.fixes.push(arguments);
+	},
+	apply: function() {
+		for (var i = 0; i < this.fixes.length; i++) {
+			var $match = cssQuery(this.fixes[i][0]);
+			var $fix = this.fixes[i][1] || _fixElement;
+			for (var j = 0; j < $match.length; j++) $fix($match[j]);
+		}
+	},
+	// recalcs occur whenever the document is refreshed using document.recalc()
+	addRecalc: function() {
+		this.recalcs.push(arguments);
+	},
+	recalc: function() {
+		// loop through the fixes
+		for (var i = 0; i < this.recalcs.length; i++) {
+			var $match = cssQuery(this.recalcs[i][0]);
+			var $recalc = this.recalcs[i][1], $element;
+			var $key = Math.pow(2, i);
+			for (var j = 0; ($element = $match[j]); j++) {
+				var $uniqueID = $element.uniqueID;
+				if ((_fixed[$uniqueID] & $key) == 0) {
+					$element = $recalc($element) || $element;
+					_fixed[$uniqueID] |= $key;
+				}
+			}
+		}
+	}
+})); // ie7HTML
+
+// -----------------------------------------------------------------------
+// <abbr>
+// -----------------------------------------------------------------------
+
+// provide support for the <abbr> tag.
+//  this is a proper fix, it preserves the DOM structure and
+//  <abbr> elements report the correct tagName & namespace prefix
+ie7HTML.addFix("abbr");
+
+// -----------------------------------------------------------------------
+// <label>
+// -----------------------------------------------------------------------
+
+// bind to the first child control
+ie7HTML.addRecalc("label", function($element) {
+	if (!$element.htmlFor) {
+		var $firstChildControl = cssQuery("input,textarea", $element)[0];
+		if ($firstChildControl) {
+			addEventHandler($element, "onclick", function() {
+				$firstChildControl.click();
+			});
+		}
+	}
+});
+
+// -----------------------------------------------------------------------
+// <button>
+// -----------------------------------------------------------------------
+
+// IE bug means that innerText is submitted instead of "value"
+ie7HTML.addRecalc("button,input", function($element) {
+	if ($element.tagName == "BUTTON") {
+		var $match = $element.outerHTML.match(/ value="([^"]*)"/i);
+		$element.runtimeStyle.value = ($match) ? $match[1] : "";
+	}
+	// flag the button/input that was used to submit the form
+	if ($element.type == "submit") {
+		addEventHandler($element, "onclick", function() {
+			$element.runtimeStyle.clicked = true;
+			setTimeout("document.all." + $element.uniqueID + ".runtimeStyle.clicked=false", 1);
+		});
+	}
+});
+
+// -----------------------------------------------------------------------
+// <form>
+// -----------------------------------------------------------------------
+
+// only submit "successful controls
+var $UNSUCCESSFUL = /^(submit|reset|button)$/;
+ie7HTML.addRecalc("form", function($element) {
+	addEventHandler($element, "onsubmit", function() {
+		for (var i = 0; i < $element.length; i++) {
+			if (_unsuccessful($element[i])) {
+				$element[i].disabled = true;
+				setTimeout("document.all." + $element[i].uniqueID + ".disabled=false", 1);
+			} else if ($element[i].tagName == "BUTTON" && $element[i].type == "submit") {
+				setTimeout("document.all." + $element[i].uniqueID + ".value='" +
+					$element[i].value + "'", 1);
+				$element[i].value = $element[i].runtimeStyle.value;
+			}
+		}
+	});
+});
+function _unsuccessful($element) {
+	return $UNSUCCESSFUL.test($element.type) && !$element.disabled &&
+		!$element.runtimeStyle.clicked;
+};
+
+// -----------------------------------------------------------------------
+// <img>
+// -----------------------------------------------------------------------
+
+// get rid of the spurious tooltip produced by the alt attribute on images
+ie7HTML.addRecalc("img", function($element) {
+	if ($element.alt && !$element.title) $element.title = "";
+});
+
+// -----------------------------------------------------------------------
+// Fix broken elements
+// -----------------------------------------------------------------------
+
+var $PREFIX = (appVersion < 5.5) ? "HTML:" : "";
+function _fixElement($element) {
+	var $fixedElement = document.createElement("<" + $PREFIX +
+		$element.outerHTML.slice(1));
+	if ($element.outerHTML.slice(-2) != "/>") {
+		// remove child nodes and copy them to the new $element
+		var $$endTag = "</"+ $element.tagName + ">", $nextSibling;
+		while (($nextSibling = $element.nextSibling) && $nextSibling.outerHTML != $$endTag) {
+			$fixedElement.appendChild($nextSibling);
+		}
+		// remove the closing tag
+		if ($nextSibling) $nextSibling.removeNode();
+	}
+	// replace the broken tag with the namespaced version
+	$element.parentNode.replaceChild($fixedElement, $element);
+};
+
+}); // addModule
+/*
+	IE7, version 0.9 (alpha) (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+IE7.addModule("ie7-layout", function() {
+// big, ugly box-model hack + min/max stuff
+
+// #tantek > #erik > #dean { voice-family: hacker; }
+
+// this module is useful to other modules so it is global
+//  (all modules are anyway through the modules collection)
+ie7Layout = this;
+
+// -----------------------------------------------------------------------
+// "layout"
+// -----------------------------------------------------------------------
+
+HEADER += "*{boxSizing:content-box}";
+
+// does an element have "layout" ?
+this.hasLayout = (appVersion < 5.5) ? function($element) {
+	// element.currentStyle.hasLayout doesn't work for IE5.0
+	return $element.clientWidth;
+} : function($element) {
+	return $element.currentStyle.hasLayout;
+};
+
+// give an element "layout"
+this.boxSizing = function($element) {
+	if (!ie7Layout.hasLayout($element)) {
+	//#	$element.runtimeStyle.fixedHeight =
+		$element.style.height = "0cm";
+		if ($element.currentStyle.verticalAlign == "auto")
+			$element.runtimeStyle.verticalAlign = "top";
+		// when an element acquires "layout", margins no longer collapse correctly
+		_collapseMargins($element);
+	}
+};
+
+// -----------------------------------------------------------------------
+// Margin Collapse
+// -----------------------------------------------------------------------
+
+function _collapseMargins($element) {
+	if ($element != viewport && $element.currentStyle.position != "absolute") {
+		collapseMarginTop($element);
+		collapseMarginBottom($element);
+	}
+};
+
+var firstElementChild = cssQuery.valueOf("firstElementChild");
+var lastElementChild = cssQuery.valueOf("lastElementChild");
+
+function collapseMarginTop($element) {
+	if (!$element.runtimeStyle.marginTop) {
+		var $parentElement = $element.parentElement;
+		if ($parentElement && ie7Layout.hasLayout($parentElement) && $element == firstElementChild($parentElement)) return;
+		var $firstChild = firstElementChild($element);
+		if ($firstChild && $firstChild.currentStyle.styleFloat == "none" && ie7Layout.hasLayout($firstChild)) {
+			collapseMarginTop($firstChild);
+			$marginTop = _getMargin($element, $element.currentStyle.marginTop);
+			$childMarginTop = _getMargin($firstChild, $firstChild.currentStyle.marginTop);
+			if ($marginTop < 0 || $childMarginTop < 0) {
+				$element.runtimeStyle.marginTop = $marginTop + $childMarginTop;
+			} else {
+				$element.runtimeStyle.marginTop = Math.max($childMarginTop, $marginTop);
+			}
+			$firstChild.runtimeStyle.marginTop = "0px";
+		}
+	}
+};
+eval(String(collapseMarginTop).replace(/Top/g, "Bottom").replace(/first/g, "last"));
+
+function _getMargin($element, $value) {
+	return ($value == "auto") ? 0 : getPixelValue($element, $value);
+};
+
+// -----------------------------------------------------------------------
+// box-model
+// -----------------------------------------------------------------------
+
+// constants
+var $UNIT = /^[.\d][\w%]*$/, $AUTO = /^(auto|0cm)$/, $NUMERIC = "[.\\d]";
+
+var applyWidth, applyHeight;
+function borderBox($element){
+	applyWidth($element);
+	applyHeight($element);
+};
+
+function fixWidth($HEIGHT) {
+	applyWidth = function($element) {
+		if (!PERCENT.test($element.currentStyle.width)) fixWidth($element);
+		_collapseMargins($element);
+	};
+
+	function fixWidth($element, $value) {
+		if (!$element.runtimeStyle.fixedWidth) {
+			if (!$value) $value = $element.currentStyle.width;
+			$element.runtimeStyle.fixedWidth = ($UNIT.test($value)) ? Math.max(0, getFixedWidth($element, $value)) : $value;
+			setOverrideStyle($element, "width", $element.runtimeStyle.fixedWidth);
+		}
+	};
+
+	function layoutWidth($element) {
+		if (!isFixed($element)) {
+			var $layoutParent = $element.offsetParent;
+			while ($layoutParent && !ie7Layout.hasLayout($layoutParent)) $layoutParent = $layoutParent.offsetParent;
+		}
+		return ($layoutParent || viewport).clientWidth;
+	};
+
+	function getPixelWidth($element, $value) {
+		if (PERCENT.test($value)) return parseInt(parseFloat($value) / 100 * layoutWidth($element));
+		return getPixelValue($element, $value);
+	};
+
+	var getFixedWidth = function($element, $value) {
+		var $borderBox = $element.currentStyle["box-sizing"] == "border-box";
+		var $adjustment = 0;
+		if (quirksMode && !$borderBox)
+			$adjustment += getBorderWidth($element) + getPaddingWidth($element);
+		else if (!quirksMode && $borderBox)
+			$adjustment -= getBorderWidth($element) + getPaddingWidth($element);
+		return getPixelWidth($element, $value) + $adjustment;
+	};
+
+	// easy way to get border thickness for elements with "layout"
+	function getBorderWidth($element) {
+		return $element.offsetWidth - $element.clientWidth;
+	};
+
+	// have to do some pixel conversion to get padding thickness :-(
+	function getPaddingWidth($element) {
+		return getPixelWidth($element, $element.currentStyle.paddingLeft) +
+			getPixelWidth($element, $element.currentStyle.paddingRight);
+	};
+	// clone the getPaddingWidth function to make a getMarginWidth function
+	eval(String(getPaddingWidth).replace(/padding/g, "margin").replace(/Padding/g, "Margin"));
+
+// -----------------------------------------------------------------------
+// min/max
+// -----------------------------------------------------------------------
+
+	HEADER += "*{minWidth:none;maxWidth:none;min-width:none;max-width:none}";
+
+	// handle min-width property
+	function minWidth($element) {
+		// IE6 supports min-height so we frig it here
+		//#if ($element.currentStyle.minHeight == "auto") $element.runtimeStyle.minHeight = 0;
+		if ($element.currentStyle["min-width"] != null) {
+			$element.style.minWidth = $element.currentStyle["min-width"];
+		}
+		if (register(minWidth, $element, $element.currentStyle.minWidth != "none")) {
+			ie7Layout.boxSizing($element);
+			fixWidth($element);
+			resizeWidth($element);
+		}
+	};
+	// clone the minWidth function to make a maxWidth function
+	eval(String(minWidth).replace(/min/g, "max"));
+	// expose these methods
+	ie7Layout.minWidth = minWidth;
+	ie7Layout.maxWidth = maxWidth;
+
+	// apply min/max restrictions
+	function resizeWidth($element) {
+		// check boundaries
+		var $rect = $element.getBoundingClientRect();
+		var $width = $rect.right - $rect.left;
+
+		if ($element.currentStyle.minWidth != "none" && $width <= getFixedWidth($element, $element.currentStyle.minWidth)) {
+			$element.runtimeStyle.width = getFixedWidth($element, $element.currentStyle.minWidth);
+		} else if ($element.currentStyle.maxWidth != "none" && $width >= getFixedWidth($element, $element.currentStyle.maxWidth)) {
+			$element.runtimeStyle.width = getFixedWidth($element, $element.currentStyle.maxWidth);
+		} else {
+			$element.runtimeStyle.width = $element.runtimeStyle.fixedWidth; // || "auto";
+		}
+	};
+
+// -----------------------------------------------------------------------
+// right/bottom
+// -----------------------------------------------------------------------
+
+	function fixRight($element) {
+		if (register(fixRight, $element, /^(fixed|absolute)$/.test($element.currentStyle.position) &&
+		    getDefinedStyle($element, "left") != "auto" &&
+		    getDefinedStyle($element, "right") != "auto" &&
+		    $AUTO.test(getDefinedStyle($element, "width")))) {
+		    	resizeRight($element);
+		    	ie7Layout.boxSizing($element);
+		}
+	};
+	ie7Layout.fixRight = fixRight;
+
+	function resizeRight($element) {
+		var $left = getPixelWidth($element, $element.runtimeStyle._left || $element.currentStyle.left);
+		var $width = layoutWidth($element) - getPixelWidth($element, $element.currentStyle.right) -	$left - getMarginWidth($element);
+		if (parseInt($element.runtimeStyle.width) == $width) return;
+		$element.runtimeStyle.width = "";
+		if (isFixed($element) || $HEIGHT || $element.offsetWidth < $width) {
+	    	if (!quirksMode) $width -= getBorderWidth($element) + getPaddingWidth($element);
+			if ($width < 0) $width = 0;
+			$element.runtimeStyle.fixedWidth = $width;
+			setOverrideStyle($element, "width", $width);
+		}
+	};
+
+// -----------------------------------------------------------------------
+// window.onresize
+// -----------------------------------------------------------------------
+
+	// handle window resize
+	var _clientWidth = 0;
+	addResize(function() {
+		var i, $wider = (_clientWidth < viewport.clientWidth);
+		_clientWidth = viewport.clientWidth;
+		// resize elements with "min-width" set
+		for (i in minWidth.elements) {
+			var $element = minWidth.elements[i];
+			var $fixedWidth = (parseInt($element.runtimeStyle.width) == getFixedWidth($element, $element.currentStyle.minWidth));
+			if ($wider && $fixedWidth) $element.runtimeStyle.width = "";
+			if ($wider == $fixedWidth) resizeWidth($element);
+		}
+		// resize elements with "max-width" set
+		for (i in maxWidth.elements) {
+			var $element = maxWidth.elements[i];
+			var $fixedWidth = (parseInt($element.runtimeStyle.width) == getFixedWidth($element, $element.currentStyle.maxWidth));
+			if (!$wider && $fixedWidth) $element.runtimeStyle.width = "";
+			if ($wider != $fixedWidth) resizeWidth($element);
+		}
+		// resize elements with "right" set
+		for (i in fixRight.elements) resizeRight(fixRight.elements[i]);
+	});
+
+// -----------------------------------------------------------------------
+// fix CSS
+// -----------------------------------------------------------------------
+	if (window.IE7_BOX_MODEL !== false) {
+		ie7CSS.addRecalc("width", $NUMERIC, quirksMode ? applyWidth : _collapseMargins);
+	}
+	ie7CSS.addRecalc("min-width", $NUMERIC, minWidth);
+	ie7CSS.addRecalc("max-width", $NUMERIC, maxWidth);
+	ie7CSS.addRecalc("right", $NUMERIC, fixRight);
+};
+ie7CSS.addRecalc("border-spacing", $NUMERIC, function($element) {
+	if ($element.currentStyle.borderCollapse != "collapse") {
+		$element.cellSpacing = getPixelValue($element, $element.currentStyle["border-spacing"]);
+	}
+});
+ie7CSS.addRecalc("box-sizing", "content-box", this.boxSizing);
+ie7CSS.addRecalc("box-sizing", "border-box", borderBox);
+
+// clone the fixWidth function to create a fixHeight function
+var _rotate = new ParseMaster;
+_rotate.add(/Width/, "Height");
+_rotate.add(/width/, "height");
+_rotate.add(/Left/, "Top");
+_rotate.add(/left/, "top");
+_rotate.add(/Right/, "Bottom");
+_rotate.add(/right/, "bottom");
+eval(_rotate.exec(String(fixWidth)));
+
+// apply box-model + min/max fixes
+fixWidth();
+fixHeight(true);
+
+});/*
+	IE7, version 0.9 (alpha) (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+IE7.addModule("ie7-graphics", function() {
+if (appVersion < 5.5) return; // IE5.0 not supported
+
+// constants
+// this filter is used to replace a PNG image
+var $ALPHA_IMAGE_LOADER = "DXImageTransform.Microsoft.AlphaImageLoader";
+var $FILTER = "progid:" + $ALPHA_IMAGE_LOADER + "(src='%1',sizingMethod='scale')";
+
+// ** IE7 VARIABLE
+// e.g. only apply the hack to files ending in ".png"
+// IE7_PNG_SUFFIX = ".png";
+
+// regular expression version of the above
+var _pngTest = new RegExp((window.IE7_PNG_SUFFIX || "-trans.png") + "$", "i");
+var _filtered = [];
+
+// apply a filter
+function _addFilter($element) {
+	var $filter = $element.filters[$ALPHA_IMAGE_LOADER];
+	if ($filter) {
+		$filter.src = $element.src;
+		$filter.enabled = true;
+	} else {
+		$element.runtimeStyle.filter = $FILTER.replace(/%1/, $element.src);
+		_filtered.push($element);
+	}
+	// remove the real image
+	$element.src = BLANK_GIF;
+};
+function _removeFilter($element) {
+	$element.src = $element.pngSrc;
+	$element.filters[$ALPHA_IMAGE_LOADER].enabled = false;
+};
+
+// -----------------------------------------------------------------------
+//  support opacity (CSS3)
+// -----------------------------------------------------------------------
+
+ie7CSS.addFix(/opacity\s*:\s*([\d.]+)/, function($match, $offset) {
+	return "zoom:1;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=" +
+		((parseFloat($match[$offset + 1]) * 100) || 1) + ")";
+});
+
+// -----------------------------------------------------------------------
+//  fix PNG transparency (CSS background images)
+// -----------------------------------------------------------------------
+
+
+// replace background(-image): url(..) ..  with background(-image): .. ;filter: ..;
+var $BACKGROUND = /background(-image)?\s*:\s*([^\(};]*)url\(([^\)]+)\)([^;}]*)/;
+ie7CSS.addFix($BACKGROUND, function($match, $offset) {
+	var $url = getString($match[$offset + 3]);
+	return _pngTest.test($url) ? "filter:" +
+		$FILTER.replace(/scale/, "crop").replace(/%1/, $url) + ";zoom:1;background" +
+		  ($match[$offset + 1]||"") + ":" + ($match[$offset + 2]||"") + "none" +
+		  ($match[$offset + 4]||"") : $match[$offset];
+});
+
+if (ie7HTML) {
+// -----------------------------------------------------------------------
+//  fix PNG transparency (HTML images)
+// -----------------------------------------------------------------------
+
+	ie7HTML.addRecalc("img,input", function($element) {
+		if ($element.tagName == "INPUT" && $element.type != "image") return;
+		_fixImg($element);
+		addEventHandler($element, "onpropertychange", function() {
+			if (!_printing && event.propertyName == "src" &&
+				$element.src.indexOf(BLANK_GIF) == -1) _fixImg($element);
+		});
+	});
+	var $BASE64 = /^data:.*;base64/i;
+	var _base64Path = makePath("ie7-base64.php", path);
+	function _fixImg($element) {
+		if (_pngTest.test($element.src)) {
+			// we have to preserve width and height
+			var $image = new Image($element.width, $element.height);
+			$image.onload = function() {
+				$element.width = $image.width;
+				$element.height = $image.height;
+				$image = null;
+			};
+			$image.src = $element.src;
+			// store the original url (we'll put it back when it's printed)
+			$element.pngSrc = $element.src;
+			// add the AlphaImageLoader thingy
+			_addFilter($element);
+		} else if ($BASE64.test($element.src)) {
+			$element.src = _base64Path + "?" + $element.src.slice(5);
+		}
+	};
+
+
+// -----------------------------------------------------------------------
+// <object>
+// -----------------------------------------------------------------------
+
+	// fix [type=image/*]
+	var $IMAGE = /^image/i;
+	var _objectPath = makePath("ie7-object.htc", path);
+	ie7HTML.addRecalc("object", function($element) {
+		if ($IMAGE.test($element.type)) {
+		 	var $object = document.createElement("<object type=text/x-scriptlet>");
+		 	$object.style.width = $element.currentStyle.width;
+		 	$object.style.height = $element.currentStyle.height;
+		//-	$object.title = $element.title;
+		 	$object.data = _objectPath;
+			var $url = makePath($element.data, getPath(location.href));
+			$element.parentNode.replaceChild($object, $element);
+			cssQuery.clearCache("object");
+			addTimer($object, "", $url);
+			return $object;
+		}
+	});
+}
+
+// assume that background images should not be printed
+//  (if they are not transparent then they'll just obscure content)
+// but we'll put foreground images back...
+var _printing = false;
+addEventHandler(window, "onbeforeprint", function() {
+	_printing = true;
+	for (var i = 0; i < _filtered.length; i++) _removeFilter(_filtered[i]);
+});
+addEventHandler(window, "onafterprint", function() {
+	for (var i = 0; i < _filtered.length; i++) _addFilter(_filtered[i]);
+	_printing = false;
+});
+
+});/*
+	IE7, version 0.9 (alpha) (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+IE7.addModule("ie7-fixed", function() {
+	// some things to consider for this hack.
+	// the document body requires a fixed background. even if
+	//  it is just a blank image.
+	// you have to use setExpression instead of onscroll, this
+	//  together with a fixed body background helps avoid the
+	//  annoying screen flicker of other solutions.
+
+	ie7CSS.addRecalc("position", "fixed", _positionFixed, "absolute");
+	ie7CSS.addRecalc("background(-attachment)?", "[^};]*fixed", _backgroundFixed);
+
+	// scrolling is relative to the documentElement (HTML tag) when in
+	//  standards mode, otherwise it's relative to the document body
+	var _viewport = (quirksMode) ? "body" : "documentElement";
+
+	var _fixBackground = function() {
+		// this is required by both position:fixed and background-attachment:fixed.
+		// it is necessary for the document to also have a fixed background image.
+		// we can fake this with a blank image if necessary
+		if (body.currentStyle.backgroundAttachment != "fixed") {
+			if (body.currentStyle.backgroundImage == "none") {
+				body.runtimeStyle.backgroundRepeat = "no-repeat";
+				body.runtimeStyle.backgroundImage = "url(" + BLANK_GIF + ")"; // dummy
+			}
+			body.runtimeStyle.backgroundAttachment = "fixed";
+		}
+		_fixBackground = DUMMY;
+	};
+
+	var _tmp = createTempElement("img");
+
+	// clone a "left" function to create a "top" function
+	function _rotate($function) {
+		return _rotater.exec(String($function));
+	};
+	var _rotater = new ParseMaster;
+	_rotater.add(/Left/, "Top");
+	_rotater.add(/left/, "top");
+	_rotater.add(/Width/, "Height");
+	_rotater.add(/width/, "height");
+	_rotater.add(/right/, "bottom");
+	_rotater.add(/X/, "Y");
+
+	function _isFixed($element) {
+		return ($element) ? isFixed($element) || _isFixed($element.parentElement) : false;
+	};
+
+	function setExpression($element, $propertyName, $$expression) {
+		setTimeout("document.all." + $element.uniqueID + ".runtimeStyle.setExpression('" +
+			$propertyName + "','" + $$expression + "')", 0);
+	};
+
+// -----------------------------------------------------------------------
+//  backgroundAttachment: fixed
+// -----------------------------------------------------------------------
+
+	function _backgroundFixed($element) {
+		if (register(_backgroundFixed, $element,
+			$element.currentStyle.backgroundAttachment == "fixed" && !$element.contains(body))) {
+				_fixBackground();
+				backgroundLeft($element);
+				backgroundTop($element);
+				_backgroundPosition($element);
+		}
+	};
+
+	function _backgroundPosition($element) {
+		_tmp.src = $element.currentStyle.backgroundImage.slice(5, -2);
+		var $parentElement = ($element.canHaveChildren) ? $element : $element.parentElement;
+		$parentElement.appendChild(_tmp);
+		setOffsetLeft($element);
+		setOffsetTop($element);
+		$parentElement.removeChild(_tmp);
+	};
+
+	function backgroundLeft($element) {
+		$element.style.backgroundPositionX = $element.currentStyle.backgroundPositionX;
+		if (!_isFixed($element)) {
+			var $$expression = "(parseInt(runtimeStyle.offsetLeft)+document." +
+				 _viewport + ".scrollLeft)||0";
+			setExpression($element, "backgroundPositionX", $$expression);
+		}
+	};
+	eval(_rotate(backgroundLeft));
+
+	function setOffsetLeft($element) {
+		var $propertyName = _isFixed($element) ? "backgroundPositionX" : "offsetLeft";
+		$element.runtimeStyle[$propertyName] =
+			getOffsetLeft($element, $element.style.backgroundPositionX) -
+			$element.getBoundingClientRect().left - $element.clientLeft + 2;
+	};
+	eval(_rotate(setOffsetLeft));
+
+	function getOffsetLeft($element, $position) {
+		switch ($position) {
+			case "left":
+			case "top":
+				return 0;
+			case "right":
+			case "bottom":
+				return viewport.clientWidth - _tmp.offsetWidth;
+			case "center":
+				return (viewport.clientWidth - _tmp.offsetWidth) / 2;
+			default:
+				if (PERCENT.test($position)) {
+					return parseInt((viewport.clientWidth - _tmp.offsetWidth) *
+						parseFloat($position) / 100);
+				}
+				_tmp.style.left = $position;
+				return _tmp.offsetLeft;
+		}
+	};
+	eval(_rotate(getOffsetLeft));
+
+// -----------------------------------------------------------------------
+//  position: fixed
+// -----------------------------------------------------------------------
+
+	function _positionFixed($element) {
+		if (register(_positionFixed, $element, isFixed($element))) {
+			setOverrideStyle($element, "position",  "absolute");
+			setOverrideStyle($element, "left",  $element.currentStyle.left);
+			setOverrideStyle($element, "top",  $element.currentStyle.top);
+			_fixBackground();
+			if (ie7Layout) ie7Layout.fixRight($element);
+			_foregroundPosition($element);
+		}
+	};
+
+	function _foregroundPosition($element, $recalc) {
+		positionTop($element, $recalc);
+		positionLeft($element, $recalc, true);
+		if (!$element.runtimeStyle.autoLeft && $element.currentStyle.marginLeft == "auto" &&
+			$element.currentStyle.right != "auto") {
+			var $left = viewport.clientWidth - getPixelWidth($element, $element.currentStyle.right) -
+				getPixelWidth($element, $element.runtimeStyle._left) - $element.clientWidth;
+			if ($element.currentStyle.marginRight == "auto") $left = parseInt($left / 2);
+			if (_isFixed($element.offsetParent)) $element.runtimeStyle.pixelLeft += $left;
+			else $element.runtimeStyle.shiftLeft = $left;
+		}
+		clipWidth($element);
+		clipHeight($element);
+	};
+
+	function clipWidth($element) {
+		if ($element.currentStyle.width != "auto") {
+			var $rect = $element.getBoundingClientRect();
+			var $width = $element.offsetWidth - viewport.clientWidth + $rect.left - 2;
+			if ($width >= 0) {
+				$width = Math.max(getPixelValue($element, $element.currentStyle.width) - $width, 0);
+				setOverrideStyle($element, "width",	$width);
+			}
+		}
+	};
+	eval(_rotate(clipWidth));
+
+	function positionLeft($element, $recalc) {
+		// if the element's width is in % units then it must be recalculated
+		//  with respect to the viewport
+		if (!$recalc && PERCENT.test($element.currentStyle.width)) {
+			$element.runtimeStyle.fixWidth = $element.currentStyle.width;
+		}
+		if ($element.runtimeStyle.fixWidth) {
+			$element.runtimeStyle.width = getPixelWidth($element, $element.runtimeStyle.fixWidth);
+		}
+		if ($recalc) {
+			// if the element is fixed on the right then no need to recalculate
+			if (!$element.runtimeStyle.autoLeft) return;
+		} else {
+			$element.runtimeStyle.shiftLeft = 0;
+			$element.runtimeStyle._left = $element.currentStyle.left;
+			// is the element fixed on the right?
+			$element.runtimeStyle.autoLeft = $element.currentStyle.right != "auto" &&
+				$element.currentStyle.left == "auto";
+		}
+		// reset the element's "left" value and get it's natural position
+		$element.runtimeStyle.left = "";
+		$element.runtimeStyle.screenLeft = getScreenLeft($element);
+		$element.runtimeStyle.pixelLeft = $element.runtimeStyle.screenLeft;
+		// if the element is contained by another fixed element then there is no need to
+		//  continually recalculate it's left position
+		if (!$recalc && !_isFixed($element.offsetParent)) {
+			// onsrcoll produces jerky movement, so we use an expression
+			var $$expression = "runtimeStyle.screenLeft+runtimeStyle.shiftLeft+document." +
+				_viewport + ".scrollLeft";
+			setExpression($element, "pixelLeft", $$expression);
+		}
+	};
+	// clone this function so we can do "top"
+	eval(_rotate(positionLeft));
+
+	// i've forgotten how this works...
+	function getScreenLeft($element) { // thanks to kevin newman (captainn)
+		var $screenLeft = $element.offsetLeft, $nested = 1;
+		if ($element.runtimeStyle.autoLeft) {
+			$screenLeft = viewport.clientWidth - $element.offsetWidth -
+				getPixelWidth($element, $element.currentStyle.right);
+		}
+		// accommodate margins
+		if ($element.currentStyle.marginLeft != "auto") {
+			$screenLeft -= getPixelWidth($element, $element.currentStyle.marginLeft);
+		}
+		while ($element = $element.offsetParent) {
+			if ($element.currentStyle.position != "static") $nested = -1;
+			$screenLeft += $element.offsetLeft * $nested;
+		}
+		return $screenLeft;
+	};
+	eval(_rotate(getScreenLeft));
+
+	function getPixelWidth($element, $value) {
+		if (PERCENT.test($value)) return parseInt(parseFloat($value) / 100 * viewport.clientWidth);
+		return getPixelValue($element, $value);
+	};
+	eval(_rotate(getPixelWidth));
+
+// -----------------------------------------------------------------------
+//  capture window resize
+// -----------------------------------------------------------------------
+
+	function _resize() {
+		// if the window has been resized then some positions need to be
+		//  recalculated (especially those aligned to "right" or "top"
+		var $elements = _backgroundFixed.elements;
+		for (var i in $elements) _backgroundPosition($elements[i]);
+		$elements = _positionFixed.elements;
+		for (i in $elements) {
+			_foregroundPosition($elements[i], true);
+			// do this twice to be sure - hackish, I know :-)
+			_foregroundPosition($elements[i], true);
+		}
+		_timer = 0;
+	};
+
+	// use a timer for some reason.
+	//  (sometimes this is a good way to prevent resize loops)
+	var _timer;
+	addResize(function() {
+		if (!_timer) _timer = setTimeout(_resize, 0);
+	});
+
+});/*
+	IE7, version 0.9 (alpha) (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+IE7.addModule("ie7-css2-selectors", function() {
+
+/*
+	cssQuery, version 2.0.2 (2005-08-19)
+	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
+	License: http://creativecommons.org/licenses/LGPL/2.1/
+*/
+
+cssQuery.addModule("css-level2", function() {
+
+// -----------------------------------------------------------------------
+// selectors
+// -----------------------------------------------------------------------
+
+// child selector
+selectors[">"] = function($results, $from, $tagName, $namespace) {
+	var $element, i, j;
+	for (i = 0; i < $from.length; i++) {
+		var $subset = childElements($from[i]);
+		for (j = 0; ($element = $subset[j]); j++)
+			if (compareTagName($element, $tagName, $namespace))
+				$results.push($element);
+	}
+};
+
+// sibling selector
+selectors["+"] = function($results, $from, $tagName, $namespace) {
+	for (var i = 0; i < $from.length; i++) {
+		var $element = nextElementSibling($from[i]);
+		if ($element && compareTagName($element, $tagName, $namespace))
+			$results.push($element);
+	}
+};
+
+// attribute selector
+selectors["@"] = function($results, $from, $attributeSelectorID) {
+	var $test = attributeSelectors[$attributeSelectorID].test;
+	var $element, i;
+	for (i = 0; ($element = $from[i]); i++)
+		if ($test($element)) $results.push($element);
+};
+
+// -----------------------------------------------------------------------
+// pseudo-classes
+// -----------------------------------------------------------------------
+
+pseudoClasses["first-child"] = function($element) {
+	return !previousElementSibling($element);
+};
+
+pseudoClasses["lang"] = function($element, $code) {
+	$code = new RegExp("^" + $code, "i");
+	while ($element && !$element.getAttribute("lang")) $element = $element.parentNode;
+	return $element && $code.test($element.getAttribute("lang"));
+};
+
+// -----------------------------------------------------------------------
+//  attribute selectors
+// -----------------------------------------------------------------------
+
+// constants
+AttributeSelector.NS_IE = /\\:/g;
+AttributeSelector.PREFIX = "@";
+// properties
+AttributeSelector.tests = {};
+// methods
+AttributeSelector.replace = function($match, $attribute, $namespace, $compare, $value) {
+	var $key = this.PREFIX + $match;
+	if (!attributeSelectors[$key]) {
+		$attribute = this.create($attribute, $compare || "", $value || "");
+		// store the selector
+		attributeSelectors[$key] = $attribute;
+		attributeSelectors.push($attribute);
+	}
+	return attributeSelectors[$key].id;
+};
+AttributeSelector.parse = function($selector) {
+	$selector = $selector.replace(this.NS_IE, "|");
+	var $match;
+	while ($match = $selector.match(this.match)) {
+		var $replace = this.replace($match[0], $match[1], $match[2], $match[3], $match[4]);
+		$selector = $selector.replace(this.match, $replace);
+	}
+	return $selector;
+};
+AttributeSelector.create = function($propertyName, $test, $value) {
+	var $attributeSelector = {};
+	$attributeSelector.id = this.PREFIX + attributeSelectors.length;
+	$attributeSelector.name = $propertyName;
+	$test = this.tests[$test];
+	$test = $test ? $test(this.getAttribute($propertyName), getText($value)) : false;
+	$attributeSelector.test = new Function("e", "return " + $test);
+	return $attributeSelector;
+};
+AttributeSelector.getAttribute = function($name) {
+	switch ($name.toLowerCase()) {
+		case "id":
+			return "e.id";
+		case "class":
+			return "e.className";
+		case "for":
+			return "e.htmlFor";
+		case "href":
+			if (isMSIE) {
+				// IE always returns the full path not the fragment in the href attribute
+				//  so we RegExp it out of outerHTML. Opera does the same thing but there
+				//  is no way to get the original attribute.
+				return "String((e.outerHTML.match(/href=\\x22?([^\\s\\x22]*)\\x22?/)||[])[1]||'')";
+			}
+	}
+	return "e.getAttribute('" + $name.replace($NAMESPACE, ":") + "')";
+};
+
+// -----------------------------------------------------------------------
+//  attribute selector tests
+// -----------------------------------------------------------------------
+
+AttributeSelector.tests[""] = function($attribute) {
+	return $attribute;
+};
+
+AttributeSelector.tests["="] = function($attribute, $value) {
+	return $attribute + "==" + Quote.add($value);
+};
+
+AttributeSelector.tests["~="] = function($attribute, $value) {
+	return "/(^| )" + regEscape($value) + "( |$)/.test(" + $attribute + ")";
+};
+
+AttributeSelector.tests["|="] = function($attribute, $value) {
+	return "/^" + regEscape($value) + "(-|$)/.test(" + $attribute + ")";
+};
+
+// -----------------------------------------------------------------------
+//  parsing
+// -----------------------------------------------------------------------
+
+// override parseSelector to parse out attribute selectors
+var _parseSelector = parseSelector;
+parseSelector = function($selector) {
+	return _parseSelector(AttributeSelector.parse($selector));
+};
+
+}); // addModule
+var AttributeSelector = cssQuery.valueOf("AttributeSelector");
+
+// -----------------------------------------------------------------------
+//  IE7 StyleSheet class
+// -----------------------------------------------------------------------
+
+// constants
+var $HYPERLINK = /a(#[\w-]+)?(\.[\w-]+)?:(hover|active)/i;
+var $BRACE1 = /\s*\{\s*/, $BRACE2 = /\s*\}\s*/, $COMMA = /\s*\,\s*/;
+var $FIRST_LINE_LETTER = /(.*)(:first-(line|letter))/;
+
+StyleSheet.prototype.specialize({
+	parse: function() {
+		this.inherit();
+		// parse the style sheet
+		var $offset = ie7CSS.rules.length;
+		var $$rules = this.cssText.split($BRACE2), $rule;
+		var $$selectors, $cssText, i, j;
+		for (i = 0; i < $$rules.length; i++) {
+			$rule = $$rules[i].split($BRACE1);
+			$$selectors = $rule[0].split($COMMA);
+			$cssText = $rule[1];
+			for (j = 0; j < $$selectors.length; j++) {
+				$$selectors[j] = $cssText ? this.createRule($$selectors[j], $cssText) : "";
+			}
+			$$rules[i] = $$selectors.join("\n");
+		}
+		this.cssText = $$rules.join("\n");
+		this.rules = ie7CSS.rules.slice($offset);
+	},
+	recalc: function() {
+		var $rule, i;
+		for (i = 0; ($rule = this.rules[i]); i++) $rule.recalc();
+	},
+	createRule: function($selector, $cssText) {
+		if (ie7CSS.UNKNOWN.test($selector)) {
+			var $match;
+			if ($match = $selector.match(PseudoElement.MATCH)) {
+				return new PseudoElement($match[1], $match[2], $cssText);
+			} else if ($match = $selector.match(DynamicRule.MATCH)) {
+				if (!isHTML || !$HYPERLINK.test($match) || DynamicRule.COMPLEX.test($match)) {
+					return new DynamicRule($selector, $match[1], $match[2], $match[3], $cssText);
+				}
+			} else return new Rule($selector, $cssText);
+		}
+		return $selector + " {" + $cssText + "}";
+	}
+});
+
+// -----------------------------------------------------------------------
+//  IE7 CSS
+// -----------------------------------------------------------------------
+
+ie7CSS.specialize({
+	// collections
+	rules: [],
+	pseudoClasses: cssQuery.valueOf("pseudoClasses"),
+	dynamicPseudoClasses: {},
+	// cssQuery cache
+	cache: cssQuery.valueOf("cache"),
+	// classes
+	Rule: Rule,
+	DynamicRule: DynamicRule,
+	PseudoElement: PseudoElement,
+	DynamicPseudoClass: DynamicPseudoClass,
+	// create regular expressions
+	apply: function() {
+		var $pseudoClasses = this.pseudoClasses + "|before|after|" + this.dynamicPseudoClasses;
+		$pseudoClasses = $pseudoClasses.replace(/(link|visited)\|/g, "");
+		this.UNKNOWN = new RegExp("[>+~\[]|([:.])[\\w-()]+\\1|:(" + $pseudoClasses + ")");
+		var $complex = "[^\\s(]+\\s*[+~]|@\\d+|:(";
+		Rule.COMPLEX = new RegExp($complex + $pseudoClasses + ")", "g");
+		DynamicRule.COMPLEX = new RegExp($complex + this.pseudoClasses + ")", "g");
+		DynamicRule.MATCH = new RegExp("(.*):(" + this.dynamicPseudoClasses + ")(.*)");
+		PseudoElement.MATCH = /(.*):(before|after).*/;
+		this.inherit();
+	},
+	recalc: function() {
+		this.screen.recalc();
+		this.inherit();
+	},
+	getText: function($styleSheet, $path) {
+		// override getCSSText function defined in ie7-core.js.
+		// explorer will trash unknown selectors (it converts them to "UNKNOWN").
+		// so we must reload external style sheets (internal style sheets can have their text
+		//  extracted through the innerHTML property).
+			// load the style sheet text from an external file
+		return httpRequest ? (loadFile($styleSheet.href, $path) || $styleSheet.cssText)
+			:  this.inherit($styleSheet);
+	},
+	addEventHandler: function($element, $type, $handler) {
+		addEventHandler($element, $type, $handler);
+	}
+}); // ie7CSS;
+
+// -----------------------------------------------------------------------
+// IE7 style rules
+// -----------------------------------------------------------------------
+
+// constructor
+function Rule($selector, $cssText) {
+	this.id = ie7CSS.rules.length;
+	this.className = Rule.PREFIX + this.id;
+	$selector = ($selector).match($FIRST_LINE_LETTER) || $selector || "*";
+	this.selector = $selector[1] || $selector;
+	this.selectorText = Rule.simple(this.selector) + "." + this.className + ($selector[2] || "");
+	this.cssText = $cssText;
+	this.MATCH = new RegExp("\\s" + this.className + "(\\s|$)", "g");
+	ie7CSS.rules.push(this);
+	this.init();
+};
+// protoytype
+Common.specialize({
+	// properties
+	constructor: Rule,
+	toString: function() {
+		return this.selectorText + " {" + this.cssText + "}";
+	},
+//- id: 0,
+//- className: "",
+//- selector: "",
+//- cssText: "",
+//- MATCH: null,
+	// methods
+	init: DUMMY,
+	add: function($element) {
+		// allocate this class
+		$element.className += " " + this.className;
+	},
+	remove: function($element) {
+		// deallocate this class
+		$element.className = $element.className.replace(this.MATCH, "$1");
+	},
+	recalc: function() {
+		// execute the underlying css query for this class
+		var $match = ie7CSS.cache[" *." + this.className] = cssQuery(this.selector);
+		// add the class name for all matching elements
+		for (i = 0; i < $match.length; i++) this.add($match[i]);
+	}
+});
+// constants
+Rule.PREFIX = "ie7_class";
+Rule.CHILD = />/g;
+// class methods
+Rule.simple = function($selector) {
+	// attempt to preserve specificity for "loose" parsing by
+	//  removing unknown tokens from a css selector but keep as
+	//  much as we can..
+	$selector = AttributeSelector.parse($selector);
+	return $selector.replace(this.COMPLEX, "").replace(this.CHILD, " ");
+};
+
+// -----------------------------------------------------------------------
+// IE7 dynamic style
+// -----------------------------------------------------------------------
+
+// class properties:
+// attach: the element that an event handler will be attached to
+// target: the element that will have the IE7 class applied
+
+// constructor
+function DynamicRule($selector, $attach, $dynamicPseudoClass, $target, $cssText) {
+	// initialise object properties
+	this.attach = $attach || "*";
+	this.dynamicPseudoClass = ie7CSS.dynamicPseudoClasses[$dynamicPseudoClass];
+	this.target = $target;
+	this.inherit($selector, $cssText);
+};
+// protoytype
+Rule.specialize({
+	// properties
+	constructor: DynamicRule,
+//- attach: "",
+//- dynamicPseudoClass: null,
+//- target: "",
+	// methods
+	recalc: function() {
+		// execute the underlying css query for this class
+		var $match = cssQuery(this.attach);
+		// process results
+		for (var i = 0; i < $match.length; i++) {
+			// retrieve the event handler's target $element(s)
+			var $target = (this.target) ? cssQuery(this.target, $match[i]) : [$match[i]];
+			// attach event handlers for dynamic pseudo-classes
+			if ($target.length) this.dynamicPseudoClass.apply($match[i], $target, this);
+		}
+	}
+});
+
+// -----------------------------------------------------------------------
+// IE7 pseudo elements
+// -----------------------------------------------------------------------
+
+// constants
+var $ATTR = /^attr/;
+var $URL = /^url\s*\(\s*([^)]*)\)$/;
+var $MAP = {
+	before0: "beforeBegin",
+	before1: "afterBegin",
+	after0: "afterEnd",
+	after1: "beforeEnd"
+};
+
+var _contentPath = makePath("ie7-content.htc", path) + "?";
+
+// CSS text required by the "content" property
+HEADER += ".ie7_anon{display:none}";
+
+// constructor
+function PseudoElement($selector, $position, $cssText) {
+	// initialise object properties
+	this.position = $position;
+	var $$content = $cssText.match(PseudoElement.CONTENT), $match, $entity;
+	if ($$content) {
+		$$content = $$content[1];
+		$match = $$content.split(/\s+/);
+		for (var i = 0; ($entity = $match[i]); i++) {
+			$match[i] = $ATTR.test($entity) ? {attr: $entity.slice(5, -1)} :
+				($entity.charAt(0) == "'") ? getString($entity) : decode($entity);
+		}
+		$$content = $match;
+	}
+	this.content = $$content;
+	// CSS text needs to be decoded immediately
+	this.inherit($selector, decode($cssText));
+};
+// prototype
+Rule.specialize({
+	constructor: PseudoElement,
+	toString: function() {
+		return "." + this.className + "{display:inline}";
+	},
+	init: function() {
+		// execute the underlying css query for this class
+		this.match = cssQuery(this.selector);
+		for (var i = 0; i < this.match.length; i++) {
+			var $runtimeStyle = this.match[i].runtimeStyle;
+			if (!$runtimeStyle[this.position]) $runtimeStyle[this.position] = {cssText:""};
+			$runtimeStyle[this.position].cssText += ";" + this.cssText;
+			if (this.content != null) $runtimeStyle[this.position].content = this.content;
+		}
+	},
+	recalc: function() {
+		if (this.content == null) return;
+		for (var i = 0; i < this.match.length; i++) {
+			this.create(this.match[i]);
+		}
+	},
+	create: function($target) {
+		var $generated = $target.runtimeStyle[this.position];
+		if ($generated) {
+		//#	// insert the pseudo element
+		//#	this.create($target, $generated.content, $generated.cssText.replace(/'/g, '"'));
+			// copy the array of values
+			var $content = [].concat($generated.content || "");
+			for (var j = 0; j < $content.length; j++) {
+				if (typeof $content[j] == "object") {
+					$content[j] = $target.getAttribute($content[j].attr);
+				}
+			}
+			$content = $content.join("");
+			var $url = $content.match($URL);
+			var $html = PseudoElement[$url?"OBJECT":"ANON"].replace(/%1/, this.className);
+			var $$cssText = $generated.cssText.replace(/'/g, '"');
+			var $$position = $MAP[this.position + Number($target.canHaveChildren)];
+			if ($url) {
+				var $pseudoElement = document.createElement($html);
+				$target.insertAdjacentElement($$position, $pseudoElement);
+				$pseudoElement.data = _contentPath;
+				addTimer($pseudoElement, $$cssText, Quote.remove($url[1]));
+			} else {
+				$html = $html.replace(/%2/, $$cssText).replace(/%3/, $content);
+				$target.insertAdjacentHTML($$position, $html);
+			}
+			$target.runtimeStyle[this.position] = null;
+		}
+	}
+});
+// constants
+PseudoElement.CONTENT = /content\s*:\s*([^;]*)(;|$)/;
+PseudoElement.OBJECT = "<object class='ie7_anon %1' ie7_anon width=100% height=0 type=text/x-scriptlet>";
+PseudoElement.ANON = "<ie7:! class='ie7_anon %1' ie7_anon style='%2'>%3</ie7:!>";
+
+// -----------------------------------------------------------------------
+//  IE7 dynamic pseudo-classes
+// -----------------------------------------------------------------------
+
+// constructor
+function DynamicPseudoClass($name, $apply) {
+	this.name = $name;
+	this.apply = $apply;
+	this.instances = {};
+	ie7CSS.dynamicPseudoClasses[$name] = this;
+};
+// prototype
+Common.specialize({
+	// properties
+	constructor: DynamicPseudoClass,
+//- name: "",
+//- apply: null,
+//- instances: null,
+	// methods
+	register: function($instance) {
+		// an "instance" is actually an Arguments object
+		var $class = $instance[2];
+	//-	var $element = $instance[0];
+		$instance.id = $class.id + $instance[0].uniqueID;
+		if (!this.instances[$instance.id]) {
+			var $target = $instance[1], j;
+			for (j = 0; j < $target.length; j++) $class.add($target[j]);
+			this.instances[$instance.id] = $instance;
+		}
+	},
+	unregister: function($instance) {
+		if (this.instances[$instance.id]) {
+			var $class = $instance[2];
+			var $target = $instance[1], j;
+			for (j = 0; j < $target.length; j++) $class.remove($target[j]);
+			delete this.instances[$instance.id];
+		}
+	}
+});
+
+// -----------------------------------------------------------------------
+// pseudo-classes
+// -----------------------------------------------------------------------
+
+ie7CSS.pseudoClasses.toString = function() {
+	var $toString = [], $pseudoClass;
+	for ($pseudoClass in this) {
+		if (this[$pseudoClass].length > 1) $pseudoClass += "\\([^)]*\\)";
+		$toString.push($pseudoClass);
+	}
+	return $toString.join("|");
+};
+
+// the "ie7-link" property is set by text contained in the IE7 generated
+//  style sheet (the text is stored in the "HEADER")
+ie7CSS.pseudoClasses["link"] = function($element) {
+	return $element.currentStyle["ie7-link"] == "link";
+};
+
+ie7CSS.pseudoClasses["visited"] = function($element) {
+	return $element.currentStyle["ie7-link"] == "visited";
+};
+
+// -----------------------------------------------------------------------
+// dynamic pseudo-classes
+// -----------------------------------------------------------------------
+
+var _MOUSEOVER = (appVersion < 5.5) ? "onmouseover" : "onmouseenter";
+var _MOUSEOUT = (appVersion < 5.5) ? "onmouseout" : "onmouseleave";
+
+ie7CSS.dynamicPseudoClasses.toString = ie7CSS.pseudoClasses.toString;
+
+var _hover = new DynamicPseudoClass("hover", function($element) {
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, _MOUSEOVER, function() {
+		_hover.register($instance);
+	});
+	ie7CSS.addEventHandler($element, _MOUSEOUT, function() {
+		_hover.unregister($instance);
+	});
+});
+
+var _focus = new DynamicPseudoClass("focus", function($element) {
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, "onfocus", function() {
+		_focus.unregister($instance); // in case it starts with focus
+		_focus.register($instance);
+	});
+	ie7CSS.addEventHandler($element, "onblur", function() {
+		_focus.unregister($instance);
+	});
+	// check the active element for initial state
+	if ($element == document.activeElement) {
+		_focus.register($instance)
+	}
+});
+
+/**
+  * XXX TODO: find a better way to fix this
+  *
+  * The two code blocks below have been commented out because they cause
+  * JS errors in IE 6.  All they seemingly do is provide support for
+  * the :active CSS psuedo-class.
+  */
+
+/*
+var _active = new DynamicPseudoClass("active", function($element) {
+	var $instance = arguments;
+	ie7CSS.addEventHandler($element, "onmousedown", function() {
+		_active.register($instance);
+	});
+});
+
+// globally trap the mouseup event (thanks Martijn!)
+addEventHandler(document, "onmouseup", function() {
+	var $instances = _active.instances, j;
+	for (j in $instances) _active.unregister($instances[j]);
+	$instances = _hover.instances;
+	for (j in $instances)
+		if (!$instances[j][0].contains(event.srcElement))
+			_hover.unregister($instances[j]);
+});
+*/
+
+// -----------------------------------------------------------------------
+// attribute selectors
+// -----------------------------------------------------------------------
+
+ICommon(AttributeSelector);
+
+AttributeSelector.specialize({
+	getAttribute: function($name) {
+		switch ($name.toLowerCase()) {
+			case "class":
+				return "e.className.replace(/\\b\\s*ie7_class\\d+/g,'')";
+			case "src":
+				return "(e.pngSrc||e.src)";
+		}
+		return this.inherit($name);
+	}
+});
+
+// -----------------------------------------------------------------------
+// encoding
+// -----------------------------------------------------------------------
+
+// pseudo-elements can be declared with a double colon
+encoder.add(/::/, ":");
+// generated content may be unicode encoded
+safeString.add(/\\([\da-fA-F]{1,4})/, function($match, $offset) {
+	$match = $match[$offset + 1];
+	return "\\u" + "0000".slice($match.length) + $match;
+});
+
+}); // IE7.addModule
+
+loaded = true;
+
+// -----------------------------------------------------------------------
+//  quirks mode patches
+// -----------------------------------------------------------------------
+
+/* FAVELET */
+
+// load an external module to patch IE in quirks mode and override the functions above
+if (quirksMode) eval(loadFile("ie7-quirks.js", path));
+
+// -----------------------------------------------------------------------
+//  initialise
+// -----------------------------------------------------------------------
+
+ie7CSS.init();
+if (isHTML && ie7HTML) ie7HTML.init();
+
+// this script may be inserted via a favelet so the page may already be loaded
+if (complete) IE7.init();
+else {
+	// if we can load behaviors then use ondocumentready
+	documentElement.addBehavior(makePath("ie7-load.htc", path));
+	// otherwise this will kick in
+	addEventHandler(document, "onreadystatechange", function() {
+		// if we are going to wait this long then wem may as well let
+		//  window.onload execute first
+		if (document.readyState == "complete") setTimeout(IE7.init, 0);
+	});
+}
+
+// -----------------------------------------------------------------------
+//  error handling
+// -----------------------------------------------------------------------
+
+} catch ($error) {
+	alert("Error [0]: " + $error.description);
+} finally {
+	// have a beer...
+}};

Modified: jifty/trunk/share/web/static/js/ie7/ie7-xml-extras.js
==============================================================================
--- jifty/trunk/share/web/static/js/ie7/ie7-xml-extras.js	(original)
+++ jifty/trunk/share/web/static/js/ie7/ie7-xml-extras.js	Fri Apr 14 10:38:57 2006
@@ -3,4 +3,34 @@
 	Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
 	License: http://creativecommons.org/licenses/LGPL/2.1/
 */
-function XMLHttpRequest(){var l=(ScriptEngineMajorVersion()>=5)?"Msxml2":"Microsoft";return new ActiveXObject(l+".XMLHTTP")};function DOMParser(){};DOMParser.prototype={toString:function(){return"[object DOMParser]"},parseFromString:function(s,c){var x=new ActiveXObject("Microsoft.XMLDOM");x.loadXML(s);return x},parseFromStream:new Function,baseURI:""};function XMLSerializer(){};XMLSerializer.prototype={toString:function(){return"[object XMLSerializer]"},serializeToString:function(r){return r.xml||r.outerHTML},serializeToStream:new Function};
+
+// modelled after: http://www.mozilla.org/xmlextras/
+
+function XMLHttpRequest() {
+	// IE6 has a better version
+	var $LIB = /MSIE 5/.test(navigator.userAgent) ? "Microsoft" : "Msxml2";
+	return new ActiveXObject($LIB + ".XMLHTTP");
+};
+
+function DOMParser() {/* empty constructor */};
+DOMParser.prototype = {
+	toString: function() {return "[object DOMParser]"},
+	parseFromString: function($str, $contentType) {
+		var $xmlDocument = new ActiveXObject("Microsoft.XMLDOM");
+		$xmlDocument.loadXML($str);
+		return $xmlDocument;
+	},
+	// not supported
+	parseFromStream: new Function,
+	baseURI: ""
+};
+
+function XMLSerializer() {/* empty constructor */};
+XMLSerializer.prototype = {
+	toString: function() {return "[object XMLSerializer]"},
+	serializeToString: function($root) {
+		return $root.xml || $root.outerHTML;
+	},
+	// not supported
+	serializeToStream: new Function
+};


More information about the Jifty-commit mailing list