<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,2 @@
 /* Sly v1.0rc2 &lt;http://sly.digitarald.com&gt; - (C) 2009 Harald Kirschner &lt;http://digitarald.de&gt; - Open source under MIT License */
-var Sly=(function(){var p={};var b=function(C,B,i){C=(typeof(C)==&quot;string&quot;)?C.replace(/^\s+|\s+$/,&quot;&quot;):&quot;&quot;;var e=p[C]||(p[C]=new b.initialize(C));return(B==null)?e:e.search(B,i)};b.initialize=function(e){this.text=e};var s=b.initialize.prototype=b.prototype;b.implement=function(i,e){for(var B in e){b[i][B]=e[B]}};var k=b.support={};(function(){var i=document.createElement(&quot;div&quot;),B=(new Date()).getTime();i.innerHTML='&lt;a name=&quot;'+B+'&quot; class=&quot;&#194; b&quot;&gt;&lt;/a&gt;';i.appendChild(document.createComment(&quot;&quot;));k.byTagAddsComments=(i.getElementsByTagName(&quot;*&quot;).length&gt;1);k.hasQsa=!!(i.querySelectorAll&amp;&amp;i.querySelectorAll(&quot;.&#194;&quot;).length);k.hasByClass=(function(){if(!i.getElementsByClassName||!i.getElementsByClassName(&quot;b&quot;).length){return false}i.firstChild.className=&quot;c&quot;;return(i.getElementsByClassName(&quot;c&quot;).length==1)})();var e=document.documentElement;e.insertBefore(i,e.firstChild);k.byIdAddsName=!!(document.getElementById(B));e.removeChild(i)})();var q=function(){return true};s.search=function(D,B){var F;if(!D){D=document}else{if(typeof(D)==&quot;string&quot;){D=b.search(D);F=true}else{if(D instanceof Array||(typeof(D.length)==&quot;number&quot;&amp;&amp;D.item)){if(D.length==1){D=D[0]}else{F=true}}}}var L;if(k.hasQsa&amp;&amp;!F&amp;&amp;D.nodeType==9){try{L=D.querySelectorAll(this.text)}catch(S){}if(L){return b.toArray(L)}}var H=this.parse();if(!H.length){return[]}var J,K={},G,M,C={},E={};var R=b.getUid;var T=function(i){var e=R(i);return(K[e])?null:(K[e]=true)};for(var Q=0,P;(P=H[Q]);Q++){var I=T;if(P.first){if(!L){I=q}else{J=true}if(F){M=D}else{if(P.combinator){M=[D]}}}if(P.last&amp;&amp;L){K=C;G=L}else{K={};G=[]}if(!P.combinator&amp;&amp;!F){G=P.combine(G,D,P,E,I,!(G.length))}else{for(var O=0,N=M.length;O&lt;N;O++){G=P.combine(G,M[O],P,E,I)}}if(P.last){if(G.length){L=G}}else{M=G}}if(!B&amp;&amp;J&amp;&amp;L){L.sort(b.compare)}return L||[]};s.find=function(e){return this.search(e)[0]};s.match=function(D,C){var e=this.parse();if(e.length==1){return !!(this.parse()[0].match(D,{}))}if(!C){C=D;while(C.parentNode){C=C.parentNode}}var E=this.search(C),B=E.length;if(!B--){return false}while(B--){if(E[B]==D){return true}}return false};s.filter=function(e){var D=[],B=this.parse()[0].match;for(var C=0,E;(E=e[C]);C++){if(B(E)){D.push(E)}}return D};var y;b.recompile=function(){var i,e=[&quot;,&quot;],B=[&quot;!&quot;];for(i in n){if(i!=&quot; &quot;){e[(i.length&gt;1)?&quot;unshift&quot;:&quot;push&quot;](b.escapeRegExp(i))}}for(i in u){B.push(i)}y=new RegExp(&quot;[\\w\\u00a1-\\uFFFF][\\w\\u00a1-\\uFFFF-]*|[#.](?:[\\w\\u00a1-\\uFFFF-]|\\\\:|\\\\.)+|[ \\t\\r\\n\\f](?=[\\w\\u00a1-\\uFFFF*#.[:])|[ \\t\\r\\n\\f]*(&quot;+e.join(&quot;|&quot;)+&quot;)[ \\t\\r\\n\\f]*|\\[([\\w\\u00a1-\\uFFFF-]+)[ \\t\\r\\n\\f]*(?:([&quot;+B.join(&quot;&quot;)+&quot;]?=)[ \\t\\r\\n\\f]*(?:\&quot;([^\&quot;]*)\&quot;|'([^']*)'|([^\\]]*)))?]|:([-\\w\\u00a1-\\uFFFF]+)(?:\\((?:\&quot;([^\&quot;]*)\&quot;|'([^']*)'|([^)]*))\\))?|\\*|(.+)&quot;,&quot;g&quot;)};var l=function(e){return{ident:[],classes:[],attributes:[],pseudos:[],combinator:e}};var g=function(e){return e};s.parse=function(H){var D=(H)?&quot;plain&quot;:&quot;parsed&quot;;if(this[D]){return this[D]}var I=this.text;var G=(H)?g:this.compute;var F=[],C=l(null);C.first=true;var E=function(J){F.push(G(C));C=l(J)};y.lastIndex=0;var B,i;while((B=y.exec(I))){if(B[11]){if(b.verbose){throw SyntaxError('Syntax error, &quot;'+i+'&quot; unexpected at #'+y.lastIndex+' in &quot;'+I+'&quot;')}return(this[D]=[])}i=B[0];switch(i.charAt(0)){case&quot;.&quot;:C.classes.push(i.slice(1).replace(/\\/g,&quot;&quot;));break;case&quot;#&quot;:C.id=i.slice(1).replace(/\\/g,&quot;&quot;);break;case&quot;[&quot;:C.attributes.push({name:B[2],operator:B[3]||null,value:B[4]||B[5]||B[6]||null});break;case&quot;:&quot;:C.pseudos.push({name:B[7],value:B[8]||B[9]||B[10]||null});break;case&quot; &quot;:case&quot;\t&quot;:case&quot;\r&quot;:case&quot;\n&quot;:case&quot;\f&quot;:B[1]=B[1]||&quot; &quot;;default:var e=B[1];if(e){if(e==&quot;,&quot;){C.last=true;E(null);C.first=true;continue}if(C.first&amp;&amp;!C.ident.length){C.combinator=e}else{E(e)}}else{if(i!=&quot;*&quot;){C.tag=i}}}C.ident.push(i)}C.last=true;F.push(G(C));return(this[D]=F)};function t(B,i,e,C){return(B)?((C)?function(D,E){return i(D,e,E)&amp;&amp;B(D,E)}:function(D,E){return B(D,E)&amp;&amp;i(D,e,E)}):function(D,E){return i(D,e,E)}}var j=function(){return true};var A=function(e,i){return(e.id==i)};var c=function(i,e){return(i.nodeName.toUpperCase()==e)};var h=function(e){return(new RegExp(&quot;(?:^|[ \\t\\r\\n\\f])&quot;+e+&quot;(?:$|[ \\t\\r\\n\\f])&quot;))};var f=function(e,i){return e.className&amp;&amp;i.test(e.className)};var o=function(e){if(!e.operator||!e.value){return e}var i=u[e.operator];if(i){e.escaped=b.escapeRegExp(e.value);e.pattern=new RegExp(i(e.value,e.escaped,e))}return e};var r=function(i,e){var B=b.getAttribute(i,e.name);switch(e.operator){case null:return B;case&quot;=&quot;:return(B==e.value);case&quot;!=&quot;:return(B!=e.value)}if(!B&amp;&amp;e.value){return false}return e.pattern.test(B)};s.compute=function(G){var H,M,I,N,E,C,O=G.tag,B=G.id,F=G.classes;var J=(O)?O.toUpperCase():null;if(B){C=true;E=t(null,A,B);N=function(P){if(P.getElementById){var Q=P.getElementById(B);return(Q&amp;&amp;(!J||Q.nodeName.toUpperCase()==J)&amp;&amp;(!k.getIdAdds||Q.id==B))?[Q]:[]}var S=P.getElementsByTagName(O||&quot;*&quot;);for(var i=0,R;(R=S[i]);i++){if(R.id==B){return[R]}}return[]}}if(F.length&gt;0){if(!N&amp;&amp;k.hasByClass){for(H=0;(M=F[H]);H++){E=t(E,f,h(M))}var L=F.join(&quot; &quot;);N=function(i){return i.getElementsByClassName(L)}}else{if(!N&amp;&amp;F.length==1){C=true;var K=h(F[0]);E=t(E,f,K);N=function(Q){var T=Q.getElementsByTagName(O||&quot;*&quot;);var S=[];for(var P=0,R;(R=T[P]);P++){if(R.className&amp;&amp;K.test(R.className)){S.push(R)}}return S}}else{for(H=0;(M=F[H]);H++){I=t(I,f,h(M))}}}}if(O){if(!N){E=t(E,c,J);N=function(i){return i.getElementsByTagName(O)}}else{if(!C){I=t(I,c,J)}}}else{if(!N){N=function(Q){var T=Q.getElementsByTagName(&quot;*&quot;);if(!k.byTagAddsComments){return T}var S=[];for(var P=0,R;(R=T[P]);P++){if(R.nodeType===1){S.push(R)}}return S}}}for(H=0;(M=G.pseudos[H]);H++){if(M.name==&quot;not&quot;){var D=b(M.value);I=t(I,function(P,i){return !i.match(P)},(D.parse().length==1)?D.parsed[0]:D)}else{var e=d[M.name];if(e){I=t(I,e,M.value)}}}for(H=0;(M=G.attributes[H]);H++){I=t(I,r,o(M))}if((G.simple=!(I))){G.matchAux=j}else{G.matchAux=I;E=t(E,I)}G.match=E||j;G.combine=b.combinators[G.combinator||&quot; &quot;];G.search=N;return G};var n=b.combinators={&quot; &quot;:function(G,C,F,e,J,I){var B=F.search(C);if(I&amp;&amp;F.simple){return b.toArray(B)}for(var H=0,E,D=F.matchAux;(E=B[H]);H++){if(J(E)&amp;&amp;D(E,e)){G.push(E)}}return G},&quot;&gt;&quot;:function(E,D,e,H,F){var B=e.search(D);for(var C=0,G;(G=B[C]);C++){if(G.parentNode==D&amp;&amp;F(G)&amp;&amp;e.matchAux(G,H)){E.push(G)}}return E},&quot;+&quot;:function(B,i,e,D,C){while((i=i.nextSibling)){if(i.nodeType==1){if(C(i)&amp;&amp;e.match(i,D)){B.push(i)}break}}return B},&quot;~&quot;:function(B,i,e,D,C){while((i=i.nextSibling)){if(i.nodeType==1){if(!C(i)){break}if(e.match(i,D)){B.push(i)}}}return B}};var d=b.pseudos={&quot;first-child&quot;:function(e){return d.index(e,0)},&quot;last-child&quot;:function(e){while((e=e.nextSibling)){if(e.nodeType===1){return false}}return true},&quot;only-child&quot;:function(B){var i=B;while((i=i.previousSibling)){if(i.nodeType===1){return false}}var e=B;while((e=e.nextSibling)){if(e.nodeType===1){return false}}return true},&quot;nth-child&quot;:function(D,F,E){var i=b.parseNth(F||&quot;n&quot;);if(i.special!=&quot;n&quot;){return d[i.special](D,i.a,E)}E=E||{};E.positions=E.positions||{};var B=b.getUid(D);if(!E.positions[B]){var C=0;while((D=D.previousSibling)){if(D.nodeType!=1){continue}C++;var e=E.positions[b.getUid(D)];if(e!=undefined){C=e+C;break}}E.positions[B]=C}return(E.positions[B]%i.a==i.b)},empty:function(e){return !(e.innerText||e.textContent||&quot;&quot;).length},contains:function(e,i){return(e.innerText||e.textContent||&quot;&quot;).indexOf(i)!=-1},index:function(B,e){var i=1;while((B=B.previousSibling)){if(B.nodeType==1&amp;&amp;++i&gt;e){return false}}return(i==e)},even:function(e,B,i){return d[&quot;nth-child&quot;](e,&quot;2n+1&quot;,i)},odd:function(e,B,i){return d[&quot;nth-child&quot;](e,&quot;2n&quot;,i)}};d.first=d[&quot;first-child&quot;];d.last=d[&quot;last-child&quot;];d.nth=d[&quot;nth-child&quot;];d.eq=d.index;var u=b.operators={&quot;*=&quot;:function(e,i){return i},&quot;^=&quot;:function(e,i){return&quot;^&quot;+i},&quot;$=&quot;:function(e,i){return e+&quot;$&quot;},&quot;~=&quot;:function(e,i){return&quot;(?:^|[ \\t\\r\\n\\f])&quot;+i+&quot;(?:$|[ \\t\\r\\n\\f])&quot;},&quot;|=&quot;:function(e,i){return&quot;(?:^|\\|)&quot;+i+&quot;(?:$|\\|)&quot;}};b.getAttribute=function(i,e){if(e==&quot;class&quot;){return i.className}return i.getAttribute(e,2)};var w=function(e){return Array.prototype.slice.call(e)};try{w(document.documentElement.childNodes)}catch(z){w=function(e){if(e instanceof Array){return e}var C=e.length,B=new Array(C);while(C--){B[C]=e[C]}return B}}b.toArray=w;b.compare=(document.compareDocumentPosition)?function(i,e){return(3-(i.compareDocumentPosition(e)&amp;6))}:function(i,e){return(i.sourceIndex-e.sourceIndex)};var v=1;b.getUid=(window.ActiveXObject)?function(e){return(e.$slyUid||(e.$slyUid={id:v++})).id}:function(e){return e.$slyUid||(e.$slyUid=v++)};var m={};b.parseNth=function(C){if(m[C]){return m[C]}var B=C.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!B){return false}var i=parseInt(B[1],10),e=(parseInt(B[3],10)||0)-1;if((i=(isNaN(i))?1:i)){while(e&lt;1){e+=i}while(e&gt;=i){e-=i}}switch(B[2]){case&quot;n&quot;:B={a:i,b:e,special:&quot;n&quot;};break;case&quot;odd&quot;:B={a:2,b:0,special:&quot;n&quot;};break;case&quot;even&quot;:B={a:2,b:1,special:&quot;n&quot;};break;case&quot;first&quot;:B={a:0,special:&quot;index&quot;};break;case&quot;last&quot;:B={special:&quot;last-child&quot;};break;case&quot;only&quot;:B={special:&quot;only-child&quot;};break;default:B={a:(i)?(i-1):e,special:&quot;index&quot;}}return(m[C]=B)};b.escapeRegExp=function(e){return e.replace(/[-.*+?^${}()|[\]\/\\]/g,&quot;\\$&amp;&quot;)};b.generise=function(e){b[e]=function(B){var i=b(B);return i[e].apply(i,Array.prototype.slice.call(arguments,1))}};var a=[&quot;parse&quot;,&quot;search&quot;,&quot;find&quot;,&quot;match&quot;,&quot;filter&quot;];for(var x=0;a[x];x++){b.generise(a[x])}b.recompile();return b})();
\ No newline at end of file
+var Sly=(function(){var q={};var b=function(E,D,C,i){E=(typeof(E)==&quot;string&quot;)?E.replace(/^\s+|\s+$/,&quot;&quot;):&quot;&quot;;var e=q[E]||(q[E]=new b.initialize(E));return(D==null)?e:e.search(D,C,i)};b.initialize=function(e){this.text=e};var t=b.initialize.prototype=b.prototype;b.implement=function(i,e){for(var C in e){b[i][C]=e[C]}};var k=b.support={};(function(){var i=document.createElement(&quot;div&quot;),C=(new Date()).getTime();i.innerHTML='&lt;a name=&quot;'+C+'&quot; class=&quot;&#8364; b&quot;&gt;&lt;/a&gt;';i.appendChild(document.createComment(&quot;&quot;));k.byTagAddsComments=(i.getElementsByTagName(&quot;*&quot;).length&gt;1);k.hasQsa=!!(i.querySelectorAll&amp;&amp;i.querySelectorAll(&quot;.&#8364;&quot;).length);k.hasByClass=(function(){if(!i.getElementsByClassName||!i.getElementsByClassName(&quot;b&quot;).length){return false}i.firstChild.className=&quot;c&quot;;return(i.getElementsByClassName(&quot;c&quot;).length==1)})();var e=document.documentElement;e.insertBefore(i,e.firstChild);k.byIdAddsName=!!(document.getElementById(C));e.removeChild(i)})();var r=function(){return true};t.search=function(D,O,E){E=E||{};var H,T,W;if(!D){D=document}else{if(D.nodeType!=1&amp;&amp;D.nodeType!=9){if(typeof(D)==&quot;string&quot;){D=b.search(D);H=true}else{if(D instanceof Array||(typeof(D.length)==&quot;number&quot;&amp;&amp;D.item)){var I=[];for(T=0;(W=D[T]);T++){if(W.nodeType==1||W.nodeType==9){I.push(W)}}H=(I.length&gt;1);D=(H)?I:(I[0]||document)}}}}var M,J,P,C={},F={};var N=C;var U=b.getUid;var X=function(i){var e=U(i);return(N[e])?null:(N[e]=true)};if(O&amp;&amp;O.length){for(T=0;(W=O[T]);T++){X(W)}}if(k.hasQsa&amp;&amp;!H&amp;&amp;D.nodeType==9){try{var G=D.querySelectorAll(this.text)}catch(V){}if(G){if(!O){return b.toArray(G)}for(T=0;(W=G[T]);T++){if(X(W)){O.push(W)}}if(!E.unordered){O.sort(b.compare)}return O}}var K=this.parse();if(!K.length){return[]}for(var T=0,S;(S=K[T]);T++){var L=X;if(S.first){if(!O){L=r}else{M=true}if(H){P=D}else{if(S.combinator){P=[D]}}}if(S.last&amp;&amp;O){N=C;J=O}else{N={};J=[]}if(!S.combinator&amp;&amp;!H){J=S.combine(J,D,S,F,L,!(J.length))}else{for(var R=0,Q=P.length;R&lt;Q;R++){J=S.combine(J,P[R],S,F,L)}}if(S.last){if(J.length){O=J}}else{P=J}}if(!E.unordered&amp;&amp;M&amp;&amp;O){O.sort(b.compare)}return O||[]};t.find=function(C,i,e){return this.search(C,i,e)[0]};t.match=function(E,D){var e=this.parse();if(e.length==1){return !!(this.parse()[0].match(E,{}))}if(!D){D=E;while(D.parentNode){D=D.parentNode}}var F=this.search(D),C=F.length;if(!C--){return false}while(C--){if(F[C]==E){return true}}return false};t.filter=function(e){var E=[],C=this.parse()[0].match;for(var D=0,F;(F=e[D]);D++){if(C(F)){E.push(F)}}return E};var z;b.recompile=function(){var i,e=[&quot;,&quot;],C=[&quot;!&quot;];for(i in o){if(i!=&quot; &quot;){e[(i.length&gt;1)?&quot;unshift&quot;:&quot;push&quot;](b.escapeRegExp(i))}}for(i in v){C.push(i)}z=new RegExp(&quot;[\\w\\u00a1-\\uFFFF][\\w\\u00a1-\\uFFFF-]*|[#.](?:[\\w\\u00a1-\\uFFFF-]|\\\\:|\\\\.)+|[ \\t\\r\\n\\f](?=[\\w\\u00a1-\\uFFFF*#.[:])|[ \\t\\r\\n\\f]*(&quot;+e.join(&quot;|&quot;)+&quot;)[ \\t\\r\\n\\f]*|\\[([\\w\\u00a1-\\uFFFF-]+)[ \\t\\r\\n\\f]*(?:([&quot;+C.join(&quot;&quot;)+&quot;]?=)[ \\t\\r\\n\\f]*(?:\&quot;([^\&quot;]*)\&quot;|'([^']*)'|([^\\]]*)))?]|:([-\\w\\u00a1-\\uFFFF]+)(?:\\((?:\&quot;([^\&quot;]*)\&quot;|'([^']*)'|([^)]*))\\))?|\\*|(.+)&quot;,&quot;g&quot;)};var l=function(e){return{ident:[],classes:[],attributes:[],pseudos:[],combinator:e}};var g=function(e){return e};t.parse=function(I){var E=(I)?&quot;plain&quot;:&quot;parsed&quot;;if(this[E]){return this[E]}var J=this.text;var H=(I)?g:this.compute;var G=[],D=l(null);D.first=true;var F=function(K){G.push(H(D));D=l(K)};z.lastIndex=0;var C,i;while((C=z.exec(J))){if(C[11]){if(b.verbose){throw SyntaxError('Syntax error, &quot;'+i+'&quot; unexpected at #'+z.lastIndex+' in &quot;'+J+'&quot;')}return(this[E]=[])}i=C[0];switch(i.charAt(0)){case&quot;.&quot;:D.classes.push(i.slice(1).replace(/\\/g,&quot;&quot;));break;case&quot;#&quot;:D.id=i.slice(1).replace(/\\/g,&quot;&quot;);break;case&quot;[&quot;:D.attributes.push({name:C[2],operator:C[3]||null,value:C[4]||C[5]||C[6]||null});break;case&quot;:&quot;:D.pseudos.push({name:C[7],value:C[8]||C[9]||C[10]||null});break;case&quot; &quot;:case&quot;\t&quot;:case&quot;\r&quot;:case&quot;\n&quot;:case&quot;\f&quot;:C[1]=C[1]||&quot; &quot;;default:var e=C[1];if(e){if(e==&quot;,&quot;){D.last=true;F(null);D.first=true;continue}if(D.first&amp;&amp;!D.ident.length){D.combinator=e}else{F(e)}}else{if(i!=&quot;*&quot;){D.tag=i}}}D.ident.push(i)}D.last=true;G.push(H(D));return(this[E]=G)};function u(C,i,e,D){return(C)?((D)?function(E,F){return i(E,e,F)&amp;&amp;C(E,F)}:function(E,F){return C(E,F)&amp;&amp;i(E,e,F)}):function(E,F){return i(E,e,F)}}var j=function(){return true};var B=function(e,i){return(e.id==i)};var c=function(i,e){return(i.nodeName.toUpperCase()==e)};var h=function(e){return(new RegExp(&quot;(?:^|[ \\t\\r\\n\\f])&quot;+e+&quot;(?:$|[ \\t\\r\\n\\f])&quot;))};var f=function(e,i){return e.className&amp;&amp;i.test(e.className)};var p=function(e){e.getter=b.lookupAttribute(e.name)||b.getAttribute;if(!e.operator||!e.value){return e}var i=v[e.operator];if(i){e.escaped=b.escapeRegExp(e.value);e.pattern=new RegExp(i(e.value,e.escaped,e))}return e};var s=function(i,e){var C=e.getter(i,e.name);switch(e.operator){case null:return C;case&quot;=&quot;:return(C==e.value);case&quot;!=&quot;:return(C!=e.value)}if(!C&amp;&amp;e.value){return false}return e.pattern.test(C)};t.compute=function(H){var I,N,J,O,F,D,P=H.tag,C=H.id,G=H.classes;var K=(P)?P.toUpperCase():null;if(C){D=true;F=u(null,B,C);O=function(Q){if(Q.getElementById){var R=Q.getElementById(C);return(R&amp;&amp;(!K||R.nodeName.toUpperCase()==K)&amp;&amp;(!k.getIdAdds||R.id==C))?[R]:[]}var T=Q.getElementsByTagName(P||&quot;*&quot;);for(var i=0,S;(S=T[i]);i++){if(S.id==C){return[S]}}return[]}}if(G.length&gt;0){if(!O&amp;&amp;k.hasByClass){for(I=0;(N=G[I]);I++){F=u(F,f,h(N))}var M=G.join(&quot; &quot;);O=function(i){return i.getElementsByClassName(M)}}else{if(!O&amp;&amp;G.length==1){D=true;var L=h(G[0]);F=u(F,f,L);O=function(R){var U=R.getElementsByTagName(P||&quot;*&quot;);var T=[];for(var Q=0,S;(S=U[Q]);Q++){if(S.className&amp;&amp;L.test(S.className)){T.push(S)}}return T}}else{for(I=0;(N=G[I]);I++){J=u(J,f,h(N))}}}}if(P){if(!O){F=u(F,c,K);O=function(i){return i.getElementsByTagName(P)}}else{if(!D){J=u(J,c,K)}}}else{if(!O){O=function(R){var U=R.getElementsByTagName(&quot;*&quot;);if(!k.byTagAddsComments){return U}var T=[];for(var Q=0,S;(S=U[Q]);Q++){if(S.nodeType===1){T.push(S)}}return T}}}for(I=0;(N=H.pseudos[I]);I++){if(N.name==&quot;not&quot;){var E=b(N.value);J=u(J,function(Q,i){return !i.match(Q)},(E.parse().length==1)?E.parsed[0]:E)}else{var e=d[N.name];if(e){J=u(J,e,N.value)}}}for(I=0;(N=H.attributes[I]);I++){J=u(J,s,p(N))}if((H.simple=!(J))){H.matchAux=j}else{H.matchAux=J;F=u(F,J)}H.match=F||j;H.combine=b.combinators[H.combinator||&quot; &quot;];H.search=O;return H};var o=b.combinators={&quot; &quot;:function(H,D,G,e,K,J){var C=G.search(D);if(J&amp;&amp;G.simple){return b.toArray(C)}for(var I=0,F,E=G.matchAux;(F=C[I]);I++){if(K(F)&amp;&amp;E(F,e)){H.push(F)}}return H},&quot;&gt;&quot;:function(F,E,e,I,G){var C=e.search(E);for(var D=0,H;(H=C[D]);D++){if(H.parentNode==E&amp;&amp;G(H)&amp;&amp;e.matchAux(H,I)){F.push(H)}}return F},&quot;+&quot;:function(C,i,e,E,D){while((i=i.nextSibling)){if(i.nodeType==1){if(D(i)&amp;&amp;e.match(i,E)){C.push(i)}break}}return C},&quot;~&quot;:function(C,i,e,E,D){while((i=i.nextSibling)){if(i.nodeType==1){if(!D(i)){break}if(e.match(i,E)){C.push(i)}}}return C}};var d=b.pseudos={&quot;first-child&quot;:function(e){return d.index(e,0)},&quot;last-child&quot;:function(e){while((e=e.nextSibling)){if(e.nodeType===1){return false}}return true},&quot;only-child&quot;:function(C){var i=C;while((i=i.previousSibling)){if(i.nodeType===1){return false}}var e=C;while((e=e.nextSibling)){if(e.nodeType===1){return false}}return true},&quot;nth-child&quot;:function(E,G,F){var i=b.parseNth(G||&quot;n&quot;);if(i.special!=&quot;n&quot;){return d[i.special](E,i.a,F)}F=F||{};F.positions=F.positions||{};var C=b.getUid(E);if(!F.positions[C]){var D=0;while((E=E.previousSibling)){if(E.nodeType!=1){continue}D++;var e=F.positions[b.getUid(E)];if(e!=undefined){D=e+D;break}}F.positions[C]=D}return(F.positions[C]%i.a==i.b)},empty:function(e){return !(e.innerText||e.textContent||&quot;&quot;).length},contains:function(e,i){return(e.innerText||e.textContent||&quot;&quot;).indexOf(i)!=-1},index:function(C,e){var i=1;while((C=C.previousSibling)){if(C.nodeType==1&amp;&amp;++i&gt;e){return false}}return(i==e)},even:function(e,C,i){return d[&quot;nth-child&quot;](e,&quot;2n+1&quot;,i)},odd:function(e,C,i){return d[&quot;nth-child&quot;](e,&quot;2n&quot;,i)}};d.first=d[&quot;first-child&quot;];d.last=d[&quot;last-child&quot;];d.nth=d[&quot;nth-child&quot;];d.eq=d.index;var v=b.operators={&quot;*=&quot;:function(e,i){return i},&quot;^=&quot;:function(e,i){return&quot;^&quot;+i},&quot;$=&quot;:function(e,i){return e+&quot;$&quot;},&quot;~=&quot;:function(e,i){return&quot;(?:^|[ \\t\\r\\n\\f])&quot;+i+&quot;(?:$|[ \\t\\r\\n\\f])&quot;},&quot;|=&quot;:function(e,i){return&quot;(?:^|\\|)&quot;+i+&quot;(?:$|\\|)&quot;}};var n={&quot;class&quot;:&quot;className&quot;};b.lookupAttribute=function(i){var C=n[i];if(C){return function(D){return D[C]}}var e=/^(?:src|href|action)$/.test(i)?2:0;return function(D){return D.getAttribute(i,e)}};b.getAttribute=function(i,e){return i.getAttribute(e)};var x=Array.slice||function(e){return Array.prototype.slice.call(e)};try{x(document.documentElement.childNodes)}catch(A){x=function(e){if(e instanceof Array){return e}var D=e.length,C=new Array(D);while(D--){C[D]=e[D]}return C}}b.toArray=x;b.compare=(document.compareDocumentPosition)?function(i,e){return(3-(i.compareDocumentPosition(e)&amp;6))}:function(i,e){return(i.sourceIndex-e.sourceIndex)};var w=1;b.getUid=(window.ActiveXObject)?function(e){return(e.$slyUid||(e.$slyUid={id:w++})).id}:function(e){return e.$slyUid||(e.$slyUid=w++)};var m={};b.parseNth=function(D){if(m[D]){return m[D]}var C=D.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!C){return false}var i=parseInt(C[1],10),e=(parseInt(C[3],10)||0)-1;if((i=(isNaN(i))?1:i)){while(e&lt;1){e+=i}while(e&gt;=i){e-=i}}switch(C[2]){case&quot;n&quot;:C={a:i,b:e,special:&quot;n&quot;};break;case&quot;odd&quot;:C={a:2,b:0,special:&quot;n&quot;};break;case&quot;even&quot;:C={a:2,b:1,special:&quot;n&quot;};break;case&quot;first&quot;:C={a:0,special:&quot;index&quot;};break;case&quot;last&quot;:C={special:&quot;last-child&quot;};break;case&quot;only&quot;:C={special:&quot;only-child&quot;};break;default:C={a:(i)?(i-1):e,special:&quot;index&quot;}}return(m[D]=C)};b.escapeRegExp=function(e){return e.replace(/[-.*+?^${}()|[\]\/\\]/g,&quot;\\$&amp;&quot;)};b.generise=function(e){b[e]=function(C){var i=b(C);return i[e].apply(i,Array.prototype.slice.call(arguments,1))}};var a=[&quot;parse&quot;,&quot;search&quot;,&quot;find&quot;,&quot;match&quot;,&quot;filter&quot;];for(var y=0;a[y];y++){b.generise(a[y])}b.recompile();return b})();
\ No newline at end of file</diff>
      <filename>Sly-min.js</filename>
    </modified>
    <modified>
      <diff>@@ -9,12 +9,12 @@ var cache = {};
  * 
  * Acts also as shortcut for Sly::search if context argument is given.
  */
-var Sly = function(text, context, unordered) {
+var Sly = function(text, context, results, options) {
 	// normalise
 	text = (typeof(text) == 'string') ? text.replace(/^\s+|\s+$/, '') : '';
 	
 	var cls = cache[text] || (cache[text] = new Sly.initialize(text));
-	return (context == null) ? cls : cls.search(context, unordered);
+	return (context == null) ? cls : cls.search(context, results, options);
 };
 
 Sly.initialize = function(text) {
@@ -44,14 +44,14 @@ var support = Sly.support = {};
 	
 	// Our guinea pig
 	var testee = document.createElement('div'), id = (new Date()).getTime();
-	testee.innerHTML = '&lt;a name=&quot;' + id + '&quot; class=&quot;&#194; b&quot;&gt;&lt;/a&gt;';
+	testee.innerHTML = '&lt;a name=&quot;' + id + '&quot; class=&quot;&#8364; b&quot;&gt;&lt;/a&gt;';
 	testee.appendChild(document.createComment(''));
 	
 	// IE returns comment nodes for getElementsByTagName('*')
 	support.byTagAddsComments = (testee.getElementsByTagName('*').length &gt; 1);
 	
 	// Safari can't handle uppercase or unicode characters when in quirks mode.
-	support.hasQsa = !!(testee.querySelectorAll &amp;&amp; testee.querySelectorAll('.&#194;').length);
+	support.hasQsa = !!(testee.querySelectorAll &amp;&amp; testee.querySelectorAll('.&#8364;').length);
 	
 	support.hasByClass = (function() {
 		if (!testee.getElementsByClassName || !testee.getElementsByClassName('b').length) return false;
@@ -77,39 +77,33 @@ var locateFast = function() {
 /**
  * Sly::search
  */
-proto.search = function(context, unordered) {
-	var iterate;
+proto.search = function(context, results, options) {
+	options = options || {};
+	
+	var iterate, i, item;
 
 	if (!context) {
 		context = document;
-	} else {
+	} else if (context.nodeType != 1 &amp;&amp; context.nodeType != 9) {
 		if (typeof(context) == 'string') {
 			context = Sly.search(context);
 			iterate = true;
 		} else if (context instanceof Array || (typeof(context.length) == 'number' &amp;&amp; context.item)) { // simple isArray
-			if (context.length == 1) context = context[0];
-			else iterate = true;
-		}
-	}
-
-	var results; // overall result
-
-	if (support.hasQsa &amp;&amp; !iterate &amp;&amp; context.nodeType == 9) {
-		try {
-			results = context.querySelectorAll(this.text);
-		} catch(e) {}
-		if (results) return Sly.toArray(results);
+			var filtered = [];
+			for (i = 0; (item = context[i]); i++) {
+				if (item.nodeType == 1 || item.nodeType == 9) filtered.push(item);
+			}
+			iterate = (filtered.length &gt; 1);
+			context = (iterate) ? filtered : (filtered[0] || document);
+		}	
 	}
-
-	var parsed = this.parse();
-	if (!parsed.length) return [];
-
+	
 	var mixed, // results need to be sorted, comma
-		current = {}, // unique ids for one iteration process
 		combined, // found nodes from one iteration process
 		nodes, // context nodes from one iteration process
 		all = {}, // unique ids for overall result
 		state = {}; // matchers temporary state
+	var current = all; // unique ids for one iteration process
 
 	// unifiers
 	var getUid = Sly.getUid;
@@ -117,6 +111,27 @@ proto.search = function(context, unordered) {
 		var uid = getUid(node);
 		return (current[uid]) ? null : (current[uid] = true);
 	};
+	
+	if (results &amp;&amp; results.length) { // fills unique ids, does not alter the given results
+		for (i = 0; (item = results[i]); i++) locateCurrent(item);
+	}
+
+	if (support.hasQsa &amp;&amp; !iterate &amp;&amp; context.nodeType == 9) {
+		try {
+			var query = context.querySelectorAll(this.text);
+		} catch(e) {}
+		if (query) {
+			if (!results) return Sly.toArray(query);
+			for (i = 0; (item = query[i]); i++) {
+				if (locateCurrent(item)) results.push(item);
+			}
+			if (!options.unordered) results.sort(Sly.compare);
+			return results;
+		}
+	}
+
+	var parsed = this.parse();
+	if (!parsed.length) return [];
 
 	for (var i = 0, selector; (selector = parsed[i]); i++) {
 
@@ -155,7 +170,7 @@ proto.search = function(context, unordered) {
 		}
 	}
 
-	if (!unordered &amp;&amp; mixed &amp;&amp; results) results.sort(Sly.compare);
+	if (!options.unordered &amp;&amp; mixed &amp;&amp; results) results.sort(Sly.compare);
 
 	return results || [];
 };
@@ -163,8 +178,8 @@ proto.search = function(context, unordered) {
 /**
  * Sly::find
  */
-proto.find = function(context) {
-	return this.search(context)[0];
+proto.find = function(context, results, options) {
+	return this.search(context, results, options)[0];
 };
 
 
@@ -395,6 +410,7 @@ var matchClass = function(node, expr) {
 };
 
 var prepareAttribute = function(attr) {
+	attr.getter = Sly.lookupAttribute(attr.name) || Sly.getAttribute;
 	if (!attr.operator || !attr.value) return attr;
 	var parser = operators[attr.operator];
 	if (parser) { // @todo: Allow functions, not only regex
@@ -405,7 +421,7 @@ var prepareAttribute = function(attr) {
 };
 
 var matchAttribute = function(node, attr) {
-	var read = Sly.getAttribute(node, attr.name);
+	var read = attr.getter(node, attr.name);
 	switch (attr.operator) {
 		case null: return read;
 		case '=': return (read == attr.value);
@@ -534,7 +550,6 @@ proto.compute = function(selector) {
 			}, (not.parse().length == 1) ? not.parsed[0] : not);
 		} else {
 			var parser = pseudos[item.name];
-			// chain(match, matchAttribute, prepareAttribute(item))
 			if (parser) match = chain(match, parser, item.value);
 		}
 
@@ -721,13 +736,36 @@ var operators = Sly.operators = {
 
 // public, overridable
 
-Sly.getAttribute = function(node, name) {
-	if (name == 'class') return node.className;
-	return node.getAttribute(name, 2); // 2 for IE, others ignore it
+/**
+ * Sly.getAttribute &amp; Sly.lookupAttribute
+ * 
+ * @todo add more translations
+ */
+var translate = {
+	'class': 'className'
+}
+
+Sly.lookupAttribute = function(name) {
+	var prop = translate[name];
+	if (prop) {
+		return function(node) {
+			return node[prop];
+		}
+	}
+	var flag = /^(?:src|href|action)$/.test(name) ? 2 : 0;
+	return function(node) {
+		return node.getAttribute(name, flag);
+	}
 };
 
+Sly.getAttribute = function(node, name) {
+	return node.getAttribute(name);
+};
 
-var toArray = function(nodes) {
+/**
+ * Sly.toArray
+ */
+var toArray = Array.slice || function(nodes) {
 	return Array.prototype.slice.call(nodes);
 };
 
@@ -750,6 +788,9 @@ Sly.compare = (document.compareDocumentPosition) ? function (a, b) {
 	return (a.sourceIndex - b.sourceIndex);
 };
 
+/**
+ * Sly.getUid
+ */
 var nextUid = 1;
 
 Sly.getUid = (window.ActiveXObject) ? function(node) {</diff>
      <filename>Sly.js</filename>
    </modified>
    <modified>
      <diff>@@ -263,7 +263,7 @@ return {
 	},
 
 	'Should optional return an unordered Array': function() {
-		var items = Sly.search('dd, dt', tree, true);
+		var items = Sly.search('dd, dt', tree, null, {unordered: true});
 		value_of(items).should_have(6, 'items');
 		value_of(items[0].id).should_be('dd-1');
 		value_of(items[3].id).should_be('dt-1');</diff>
      <filename>Specs/Utilities/Sly.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d45e82219b3282e89410848b6b23fd17f26629df</id>
    </parent>
  </parents>
  <author>
    <name>Harald Kirschner</name>
    <email>mail@digitarald.de</email>
  </author>
  <url>http://github.com/digitarald/sly/commit/94294e58bc62b5dcc8e806ff19ccc3c14976234e</url>
  <id>94294e58bc62b5dcc8e806ff19ccc3c14976234e</id>
  <committed-date>2009-04-20T02:54:11-07:00</committed-date>
  <authored-date>2009-04-20T02:54:11-07:00</authored-date>
  <message> - API changes: search/find is now (Element|Elements|String context = null, Array results = null, Object options = null)
 - &quot;results&quot; is an Array or your frameworks Elements implementation, queried elements are added via .push.
 - Only option is currently &quot;unordered: false&quot;, which disables sorted (by position in document) results
 - New Sly.lookupAttribute and Sly.getAttribute are ***% faster, more accurate and allow fast custom getters.</message>
  <tree>d2b6fe59d016fca3573a16273ffd804908a7710a</tree>
  <committer>
    <name>Harald Kirschner</name>
    <email>mail@digitarald.de</email>
  </committer>
</commit>
