<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -760,8 +760,8 @@ Y.mix(Y.DOM, {
      */
     replaceClass: function(node, oldC, newC) {
         //Y.log('replaceClass replacing ' + oldC + ' with ' + newC, 'info', 'Node');
+        removeClass(node, oldC); // remove first in case oldC === newC
         addClass(node, newC);
-        removeClass(node, oldC);
     },
 
     /**</diff>
      <filename>build/dom/dom-base-debug.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
 YUI.add(&quot;dom-base&quot;,function(D){(function(I){var S=&quot;nodeType&quot;,F=&quot;ownerDocument&quot;,E=&quot;defaultView&quot;,K=&quot;parentWindow&quot;,N=&quot;tagName&quot;,P=&quot;parentNode&quot;,R=&quot;firstChild&quot;,M=&quot;previousSibling&quot;,Q=&quot;nextSibling&quot;,L=&quot;contains&quot;,H=&quot;compareDocumentPosition&quot;,G=&quot;&quot;,O=document.documentElement,J=/&lt;([a-z]+)/i;I.DOM={byId:function(U,T){return I.DOM.allById(U,T)[0]||null;},children:function(V,T){var U=[];if(V){T=T||&quot;*&quot;;U=I.Selector.query(&quot;&gt; &quot;+T,V);}return U;},firstByTag:function(T,U){var V;U=U||I.config.doc;if(T&amp;&amp;U.getElementsByTagName){V=U.getElementsByTagName(T)[0];}return V||null;},getText:(O.textContent!==undefined)?function(U){var T=&quot;&quot;;if(U){T=U.textContent;}return T||&quot;&quot;;}:function(U){var T=&quot;&quot;;if(U){T=U.innerText;}return T||&quot;&quot;;},setText:(O.textContent!==undefined)?function(T,U){if(T){T.textContent=U;}}:function(T,U){if(T){T.innerText=U;}},previous:function(T,V,U){return I.DOM.elementByAxis(T,M,V,U);},next:function(T,V,U){return I.DOM.elementByAxis(T,Q,V,U);},ancestor:function(U,V,W){var T=null;if(W){T=(!V||V(U))?U:null;}return T||I.DOM.elementByAxis(U,P,V,null);},elementByAxis:function(T,W,V,U){while(T&amp;&amp;(T=T[W])){if((U||T[N])&amp;&amp;(!V||V(T))){return T;}}return null;},contains:function(U,V){var T=false;if(!V||!U||!V[S]||!U[S]){T=false;}else{if(U[L]){if(I.UA.opera||V[S]===1){T=U[L](V);}else{T=I.DOM._bruteContains(U,V);}}else{if(U[H]){if(U===V||!!(U[H](V)&amp;16)){T=true;}}}}return T;},inDoc:function(W,Z){Z=Z||W[F];var T=[],U=false,V,X,Y;W.id=W.id||I.guid();T=I.DOM.allById(W.id,Z);for(V=0;X=T[V++];){if(X===W){U=true;break;}}return U;},allById:function(Y,T){T=T||I.config.doc;var U=[],V=[],W,X;if(T.querySelectorAll){V=T.querySelectorAll('[id=&quot;'+Y+'&quot;]');}else{if(T.all){U=T.all(Y);if(U&amp;&amp;U.nodeType){U=[U];}if(U&amp;&amp;U.length){for(W=0;X=U[W++];){if(X.id===Y){V.push(X);}}}}else{V=[I.DOM._getDoc(T).getElementById(Y)];}}return V;},create:function(Y,a){if(typeof Y===&quot;string&quot;){Y=I.Lang.trim(Y);}a=a||I.config.doc;var U=J.exec(Y),X=I.DOM._create,Z=I.DOM.creators,W=null,T,V;if(U&amp;&amp;Z[U[1]]){if(typeof Z[U[1]]===&quot;function&quot;){X=Z[U[1]];}else{T=Z[U[1]];}}V=X(Y,a,T).childNodes;if(V.length===1){W=V[0].parentNode.removeChild(V[0]);}else{W=I.DOM._nl2frag(V,a);}return W;},_nl2frag:function(U,X){var V=null,W,T;if(U&amp;&amp;(U.push||U.item)&amp;&amp;U[0]){X=X||U[0].ownerDocument;V=X.createDocumentFragment();if(U.item){U=I.Array(U,0,true);}for(W=0,T=U.length;W&lt;T;W++){V.appendChild(U[W]);}}return V;},CUSTOM_ATTRIBUTES:(!O.hasAttribute)?{&quot;for&quot;:&quot;htmlFor&quot;,&quot;class&quot;:&quot;className&quot;}:{&quot;htmlFor&quot;:&quot;for&quot;,&quot;className&quot;:&quot;class&quot;},setAttribute:function(V,T,W,U){if(V&amp;&amp;V.setAttribute){T=I.DOM.CUSTOM_ATTRIBUTES[T]||T;V.setAttribute(T,W,U);}},getAttribute:function(W,T,V){V=(V!==undefined)?V:2;var U=&quot;&quot;;if(W&amp;&amp;W.getAttribute){T=I.DOM.CUSTOM_ATTRIBUTES[T]||T;U=W.getAttribute(T,V);if(U===null){U=&quot;&quot;;}}return U;},isWindow:function(T){return T.alert&amp;&amp;T.document;},_fragClones:{},_create:function(U,V,T){T=T||&quot;div&quot;;var W=I.DOM._fragClones[T];if(W){W=W.cloneNode(false);}else{W=I.DOM._fragClones[T]=V.createElement(T);}W.innerHTML=U;return W;},_removeChildNodes:function(T){while(T.firstChild){T.removeChild(T.firstChild);}},addHTML:function(X,W,U){if(typeof W===&quot;string&quot;){W=I.Lang.trim(W);}var T=X.parentNode,V;if(W){if(W.nodeType){V=W;}else{V=I.DOM.create(W);}}if(U){if(U.nodeType){U.parentNode.insertBefore(V,U);}else{switch(U){case&quot;replace&quot;:while(X.firstChild){X.removeChild(X.firstChild);}if(V){X.appendChild(V);}break;case&quot;before&quot;:T.insertBefore(V,X);break;case&quot;after&quot;:if(X.nextSibling){T.insertBefore(V,X.nextSibling);}else{T.appendChild(V);}break;default:X.appendChild(V);}}}else{X.appendChild(V);}return V;},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(V){var U=&quot;&quot;,T;if(V&amp;&amp;V[N]){T=I.DOM.VALUE_GETTERS[V[N].toLowerCase()];if(T){U=T(V);}else{U=V.value;}}if(U===G){U=G;}return(typeof U===&quot;string&quot;)?U:&quot;&quot;;},setValue:function(T,U){var V;if(T&amp;&amp;T[N]){V=I.DOM.VALUE_SETTERS[T[N].toLowerCase()];if(V){V(T,U);}else{T.value=U;}}},siblings:function(W,V){var T=[],U=W;while((U=U[M])){if(U[N]&amp;&amp;(!V||V(U))){T.unshift(U);}}U=W;while((U=U[Q])){if(U[N]&amp;&amp;(!V||V(U))){T.push(U);}}return T;},_bruteContains:function(T,U){while(U){if(T===U){return true;}U=U.parentNode;}return false;},_getRegExp:function(U,T){T=T||&quot;&quot;;I.DOM._regexCache=I.DOM._regexCache||{};if(!I.DOM._regexCache[U+T]){I.DOM._regexCache[U+T]=new RegExp(U,T);}return I.DOM._regexCache[U+T];},_getDoc:function(T){T=T||{};return(T[S]===9)?T:T[F]||T.document||I.config.doc;},_getWin:function(T){var U=I.DOM._getDoc(T);return U[E]||U[K]||I.config.win;},_batch:function(W,a,Z,V,U,Y){a=(typeof name===&quot;string&quot;)?I.DOM[a]:a;var T,X=[];if(a&amp;&amp;W){I.each(W,function(b){if((T=a.call(I.DOM,b,Z,V,U,Y))!==undefined){X[X.length]=T;}});}return X.length?X:W;},creators:{},_IESimpleCreate:function(T,U){U=U||I.config.doc;return U.createElement(T);}};(function(X){var Z=X.DOM.creators,T=X.DOM.create,W=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)&gt;)+\s*&lt;tbody/,V=&quot;&lt;table&gt;&quot;,U=&quot;&lt;/table&gt;&quot;;if(X.UA.ie){X.mix(Z,{tbody:function(a,b){var c=T(V+a+U,b),Y=c.children.tags(&quot;tbody&quot;)[0];if(c.children.length&gt;1&amp;&amp;Y&amp;&amp;!W.test(a)){Y[P].removeChild(Y);}return c;},script:function(Y,a){var b=a.createElement(&quot;div&quot;);b.innerHTML=&quot;-&quot;+Y;b.removeChild(b[R]);return b;}},true);X.mix(X.DOM.VALUE_GETTERS,{button:function(Y){return(Y.attributes&amp;&amp;Y.attributes.value)?Y.attributes.value.value:&quot;&quot;;}});X.mix(X.DOM.VALUE_SETTERS,{button:function(a,b){var Y=a.attributes.value;if(!Y){Y=a[F].createAttribute(&quot;value&quot;);a.setAttributeNode(Y);}Y.value=b;}});}if(X.UA.gecko||X.UA.ie){X.mix(Z,{option:function(Y,a){return T(&quot;&lt;select&gt;&quot;+Y+&quot;&lt;/select&gt;&quot;,a);},tr:function(Y,a){return T(&quot;&lt;tbody&gt;&quot;+Y+&quot;&lt;/tbody&gt;&quot;,a);},td:function(Y,a){return T(&quot;&lt;tr&gt;&quot;+Y+&quot;&lt;/tr&gt;&quot;,a);},tbody:function(Y,a){return T(V+Y+U,a);}});X.mix(Z,{legend:&quot;fieldset&quot;,th:Z.td,thead:Z.tbody,tfoot:Z.tbody,caption:Z.tbody,colgroup:Z.tbody,col:Z.tbody,optgroup:Z.option});}X.mix(X.DOM.VALUE_GETTERS,{option:function(a){var Y=a.attributes;return(Y.value&amp;&amp;Y.value.specified)?a.value:a.text;},select:function(a){var b=a.value,Y=a.options;if(Y&amp;&amp;b===&quot;&quot;){if(a.multiple){}else{b=X.DOM.getValue(Y[a.selectedIndex],&quot;value&quot;);}}return b;
-}});})(I);})(D);var B,A,C;D.mix(D.DOM,{hasClass:function(G,F){var E=D.DOM._getRegExp(&quot;(?:^|\\s+)&quot;+F+&quot;(?:\\s+|$)&quot;);return E.test(G.className);},addClass:function(F,E){if(!D.DOM.hasClass(F,E)){F.className=D.Lang.trim([F.className,E].join(&quot; &quot;));}},removeClass:function(F,E){if(E&amp;&amp;A(F,E)){F.className=D.Lang.trim(F.className.replace(D.DOM._getRegExp(&quot;(?:^|\\s+)&quot;+E+&quot;(?:\\s+|$)&quot;),&quot; &quot;));if(A(F,E)){C(F,E);}}},replaceClass:function(F,E,G){B(F,G);C(F,E);},toggleClass:function(F,E,G){var H=(G!==undefined)?G:!(A(F,E));if(H){B(F,E);}else{C(F,E);}}});A=D.DOM.hasClass;C=D.DOM.removeClass;B=D.DOM.addClass;},&quot;@VERSION@&quot;,{requires:[&quot;oop&quot;]});
\ No newline at end of file
+}});})(I);})(D);var B,A,C;D.mix(D.DOM,{hasClass:function(G,F){var E=D.DOM._getRegExp(&quot;(?:^|\\s+)&quot;+F+&quot;(?:\\s+|$)&quot;);return E.test(G.className);},addClass:function(F,E){if(!D.DOM.hasClass(F,E)){F.className=D.Lang.trim([F.className,E].join(&quot; &quot;));}},removeClass:function(F,E){if(E&amp;&amp;A(F,E)){F.className=D.Lang.trim(F.className.replace(D.DOM._getRegExp(&quot;(?:^|\\s+)&quot;+E+&quot;(?:\\s+|$)&quot;),&quot; &quot;));if(A(F,E)){C(F,E);}}},replaceClass:function(F,E,G){C(F,E);B(F,G);},toggleClass:function(F,E,G){var H=(G!==undefined)?G:!(A(F,E));if(H){B(F,E);}else{C(F,E);}}});A=D.DOM.hasClass;C=D.DOM.removeClass;B=D.DOM.addClass;},&quot;@VERSION@&quot;,{requires:[&quot;oop&quot;]});
\ No newline at end of file</diff>
      <filename>build/dom/dom-base-min.js</filename>
    </modified>
    <modified>
      <diff>@@ -757,8 +757,8 @@ Y.mix(Y.DOM, {
      * @param {String} newClassName the class name that will be replacing the old class name
      */
     replaceClass: function(node, oldC, newC) {
+        removeClass(node, oldC); // remove first in case oldC === newC
         addClass(node, newC);
-        removeClass(node, oldC);
     },
 
     /**</diff>
      <filename>build/dom/dom-base.js</filename>
    </modified>
    <modified>
      <diff>@@ -760,8 +760,8 @@ Y.mix(Y.DOM, {
      */
     replaceClass: function(node, oldC, newC) {
         //Y.log('replaceClass replacing ' + oldC + ' with ' + newC, 'info', 'Node');
+        removeClass(node, oldC); // remove first in case oldC === newC
         addClass(node, newC);
-        removeClass(node, oldC);
     },
 
     /**</diff>
      <filename>build/dom/dom-debug.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
 YUI.add(&quot;dom-base&quot;,function(D){(function(I){var S=&quot;nodeType&quot;,F=&quot;ownerDocument&quot;,E=&quot;defaultView&quot;,K=&quot;parentWindow&quot;,N=&quot;tagName&quot;,P=&quot;parentNode&quot;,R=&quot;firstChild&quot;,M=&quot;previousSibling&quot;,Q=&quot;nextSibling&quot;,L=&quot;contains&quot;,H=&quot;compareDocumentPosition&quot;,G=&quot;&quot;,O=document.documentElement,J=/&lt;([a-z]+)/i;I.DOM={byId:function(U,T){return I.DOM.allById(U,T)[0]||null;},children:function(V,T){var U=[];if(V){T=T||&quot;*&quot;;U=I.Selector.query(&quot;&gt; &quot;+T,V);}return U;},firstByTag:function(T,U){var V;U=U||I.config.doc;if(T&amp;&amp;U.getElementsByTagName){V=U.getElementsByTagName(T)[0];}return V||null;},getText:(O.textContent!==undefined)?function(U){var T=&quot;&quot;;if(U){T=U.textContent;}return T||&quot;&quot;;}:function(U){var T=&quot;&quot;;if(U){T=U.innerText;}return T||&quot;&quot;;},setText:(O.textContent!==undefined)?function(T,U){if(T){T.textContent=U;}}:function(T,U){if(T){T.innerText=U;}},previous:function(T,V,U){return I.DOM.elementByAxis(T,M,V,U);},next:function(T,V,U){return I.DOM.elementByAxis(T,Q,V,U);},ancestor:function(U,V,W){var T=null;if(W){T=(!V||V(U))?U:null;}return T||I.DOM.elementByAxis(U,P,V,null);},elementByAxis:function(T,W,V,U){while(T&amp;&amp;(T=T[W])){if((U||T[N])&amp;&amp;(!V||V(T))){return T;}}return null;},contains:function(U,V){var T=false;if(!V||!U||!V[S]||!U[S]){T=false;}else{if(U[L]){if(I.UA.opera||V[S]===1){T=U[L](V);}else{T=I.DOM._bruteContains(U,V);}}else{if(U[H]){if(U===V||!!(U[H](V)&amp;16)){T=true;}}}}return T;},inDoc:function(W,Z){Z=Z||W[F];var T=[],U=false,V,X,Y;W.id=W.id||I.guid();T=I.DOM.allById(W.id,Z);for(V=0;X=T[V++];){if(X===W){U=true;break;}}return U;},allById:function(Y,T){T=T||I.config.doc;var U=[],V=[],W,X;if(T.querySelectorAll){V=T.querySelectorAll('[id=&quot;'+Y+'&quot;]');}else{if(T.all){U=T.all(Y);if(U&amp;&amp;U.nodeType){U=[U];}if(U&amp;&amp;U.length){for(W=0;X=U[W++];){if(X.id===Y){V.push(X);}}}}else{V=[I.DOM._getDoc(T).getElementById(Y)];}}return V;},create:function(Y,a){if(typeof Y===&quot;string&quot;){Y=I.Lang.trim(Y);}a=a||I.config.doc;var U=J.exec(Y),X=I.DOM._create,Z=I.DOM.creators,W=null,T,V;if(U&amp;&amp;Z[U[1]]){if(typeof Z[U[1]]===&quot;function&quot;){X=Z[U[1]];}else{T=Z[U[1]];}}V=X(Y,a,T).childNodes;if(V.length===1){W=V[0].parentNode.removeChild(V[0]);}else{W=I.DOM._nl2frag(V,a);}return W;},_nl2frag:function(U,X){var V=null,W,T;if(U&amp;&amp;(U.push||U.item)&amp;&amp;U[0]){X=X||U[0].ownerDocument;V=X.createDocumentFragment();if(U.item){U=I.Array(U,0,true);}for(W=0,T=U.length;W&lt;T;W++){V.appendChild(U[W]);}}return V;},CUSTOM_ATTRIBUTES:(!O.hasAttribute)?{&quot;for&quot;:&quot;htmlFor&quot;,&quot;class&quot;:&quot;className&quot;}:{&quot;htmlFor&quot;:&quot;for&quot;,&quot;className&quot;:&quot;class&quot;},setAttribute:function(V,T,W,U){if(V&amp;&amp;V.setAttribute){T=I.DOM.CUSTOM_ATTRIBUTES[T]||T;V.setAttribute(T,W,U);}},getAttribute:function(W,T,V){V=(V!==undefined)?V:2;var U=&quot;&quot;;if(W&amp;&amp;W.getAttribute){T=I.DOM.CUSTOM_ATTRIBUTES[T]||T;U=W.getAttribute(T,V);if(U===null){U=&quot;&quot;;}}return U;},isWindow:function(T){return T.alert&amp;&amp;T.document;},_fragClones:{},_create:function(U,V,T){T=T||&quot;div&quot;;var W=I.DOM._fragClones[T];if(W){W=W.cloneNode(false);}else{W=I.DOM._fragClones[T]=V.createElement(T);}W.innerHTML=U;return W;},_removeChildNodes:function(T){while(T.firstChild){T.removeChild(T.firstChild);}},addHTML:function(X,W,U){if(typeof W===&quot;string&quot;){W=I.Lang.trim(W);}var T=X.parentNode,V;if(W){if(W.nodeType){V=W;}else{V=I.DOM.create(W);}}if(U){if(U.nodeType){U.parentNode.insertBefore(V,U);}else{switch(U){case&quot;replace&quot;:while(X.firstChild){X.removeChild(X.firstChild);}if(V){X.appendChild(V);}break;case&quot;before&quot;:T.insertBefore(V,X);break;case&quot;after&quot;:if(X.nextSibling){T.insertBefore(V,X.nextSibling);}else{T.appendChild(V);}break;default:X.appendChild(V);}}}else{X.appendChild(V);}return V;},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(V){var U=&quot;&quot;,T;if(V&amp;&amp;V[N]){T=I.DOM.VALUE_GETTERS[V[N].toLowerCase()];if(T){U=T(V);}else{U=V.value;}}if(U===G){U=G;}return(typeof U===&quot;string&quot;)?U:&quot;&quot;;},setValue:function(T,U){var V;if(T&amp;&amp;T[N]){V=I.DOM.VALUE_SETTERS[T[N].toLowerCase()];if(V){V(T,U);}else{T.value=U;}}},siblings:function(W,V){var T=[],U=W;while((U=U[M])){if(U[N]&amp;&amp;(!V||V(U))){T.unshift(U);}}U=W;while((U=U[Q])){if(U[N]&amp;&amp;(!V||V(U))){T.push(U);}}return T;},_bruteContains:function(T,U){while(U){if(T===U){return true;}U=U.parentNode;}return false;},_getRegExp:function(U,T){T=T||&quot;&quot;;I.DOM._regexCache=I.DOM._regexCache||{};if(!I.DOM._regexCache[U+T]){I.DOM._regexCache[U+T]=new RegExp(U,T);}return I.DOM._regexCache[U+T];},_getDoc:function(T){T=T||{};return(T[S]===9)?T:T[F]||T.document||I.config.doc;},_getWin:function(T){var U=I.DOM._getDoc(T);return U[E]||U[K]||I.config.win;},_batch:function(W,a,Z,V,U,Y){a=(typeof name===&quot;string&quot;)?I.DOM[a]:a;var T,X=[];if(a&amp;&amp;W){I.each(W,function(b){if((T=a.call(I.DOM,b,Z,V,U,Y))!==undefined){X[X.length]=T;}});}return X.length?X:W;},creators:{},_IESimpleCreate:function(T,U){U=U||I.config.doc;return U.createElement(T);}};(function(X){var Z=X.DOM.creators,T=X.DOM.create,W=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)&gt;)+\s*&lt;tbody/,V=&quot;&lt;table&gt;&quot;,U=&quot;&lt;/table&gt;&quot;;if(X.UA.ie){X.mix(Z,{tbody:function(a,b){var c=T(V+a+U,b),Y=c.children.tags(&quot;tbody&quot;)[0];if(c.children.length&gt;1&amp;&amp;Y&amp;&amp;!W.test(a)){Y[P].removeChild(Y);}return c;},script:function(Y,a){var b=a.createElement(&quot;div&quot;);b.innerHTML=&quot;-&quot;+Y;b.removeChild(b[R]);return b;}},true);X.mix(X.DOM.VALUE_GETTERS,{button:function(Y){return(Y.attributes&amp;&amp;Y.attributes.value)?Y.attributes.value.value:&quot;&quot;;}});X.mix(X.DOM.VALUE_SETTERS,{button:function(a,b){var Y=a.attributes.value;if(!Y){Y=a[F].createAttribute(&quot;value&quot;);a.setAttributeNode(Y);}Y.value=b;}});}if(X.UA.gecko||X.UA.ie){X.mix(Z,{option:function(Y,a){return T(&quot;&lt;select&gt;&quot;+Y+&quot;&lt;/select&gt;&quot;,a);},tr:function(Y,a){return T(&quot;&lt;tbody&gt;&quot;+Y+&quot;&lt;/tbody&gt;&quot;,a);},td:function(Y,a){return T(&quot;&lt;tr&gt;&quot;+Y+&quot;&lt;/tr&gt;&quot;,a);},tbody:function(Y,a){return T(V+Y+U,a);}});X.mix(Z,{legend:&quot;fieldset&quot;,th:Z.td,thead:Z.tbody,tfoot:Z.tbody,caption:Z.tbody,colgroup:Z.tbody,col:Z.tbody,optgroup:Z.option});}X.mix(X.DOM.VALUE_GETTERS,{option:function(a){var Y=a.attributes;return(Y.value&amp;&amp;Y.value.specified)?a.value:a.text;},select:function(a){var b=a.value,Y=a.options;if(Y&amp;&amp;b===&quot;&quot;){if(a.multiple){}else{b=X.DOM.getValue(Y[a.selectedIndex],&quot;value&quot;);}}return b;
-}});})(I);})(D);var B,A,C;D.mix(D.DOM,{hasClass:function(G,F){var E=D.DOM._getRegExp(&quot;(?:^|\\s+)&quot;+F+&quot;(?:\\s+|$)&quot;);return E.test(G.className);},addClass:function(F,E){if(!D.DOM.hasClass(F,E)){F.className=D.Lang.trim([F.className,E].join(&quot; &quot;));}},removeClass:function(F,E){if(E&amp;&amp;A(F,E)){F.className=D.Lang.trim(F.className.replace(D.DOM._getRegExp(&quot;(?:^|\\s+)&quot;+E+&quot;(?:\\s+|$)&quot;),&quot; &quot;));if(A(F,E)){C(F,E);}}},replaceClass:function(F,E,G){B(F,G);C(F,E);},toggleClass:function(F,E,G){var H=(G!==undefined)?G:!(A(F,E));if(H){B(F,E);}else{C(F,E);}}});A=D.DOM.hasClass;C=D.DOM.removeClass;B=D.DOM.addClass;},&quot;@VERSION@&quot;,{requires:[&quot;oop&quot;]});YUI.add(&quot;dom-style&quot;,function(A){(function(E){var C=&quot;documentElement&quot;,B=&quot;defaultView&quot;,D=&quot;ownerDocument&quot;,N=&quot;style&quot;,P=&quot;float&quot;,F=&quot;cssFloat&quot;,G=&quot;styleFloat&quot;,L=&quot;transparent&quot;,I=&quot;getComputedStyle&quot;,O=E.config.doc,K=undefined,J=E.DOM,M=/color$/i,H=/width|height|top|left|right|bottom|margin|padding/i;E.mix(J,{DEFAULT_UNIT:&quot;px&quot;,CUSTOM_STYLES:{},setStyle:function(T,Q,V,S){S=S||T.style;var R=J.CUSTOM_STYLES,U;if(S){if(V===null||V===&quot;&quot;){V=&quot;&quot;;}else{if(!isNaN(new Number(V))&amp;&amp;H.test(Q)){V+=J.DEFAULT_UNIT;}}if(Q in R){if(R[Q].set){R[Q].set(T,V,S);return;}else{if(typeof R[Q]===&quot;string&quot;){Q=R[Q];}}}S[Q]=V;}},getStyle:function(T,Q,S){S=S||T.style;var R=J.CUSTOM_STYLES,U=&quot;&quot;;if(S){if(Q in R){if(R[Q].get){return R[Q].get(T,Q,S);}else{if(typeof R[Q]===&quot;string&quot;){Q=R[Q];}}}U=S[Q];if(U===&quot;&quot;){U=J[I](T,Q);}}return U;},setStyles:function(R,S){var Q=R.style;E.each(S,function(T,U){J.setStyle(R,U,T,Q);},J);},getComputedStyle:function(R,Q){var T=&quot;&quot;,S=R[D];if(R[N]){T=S[B][I](R,null)[Q];}return T;}});if(O[C][N][F]!==K){J.CUSTOM_STYLES[P]=F;}else{if(O[C][N][G]!==K){J.CUSTOM_STYLES[P]=G;}}if(E.UA.opera){J[I]=function(S,R){var Q=S[D][B],T=Q[I](S,&quot;&quot;)[R];if(M.test(R)){T=E.Color.toRGB(T);}return T;};}if(E.UA.webkit){J[I]=function(S,R){var Q=S[D][B],T=Q[I](S,&quot;&quot;)[R];if(T===&quot;rgba(0, 0, 0, 0)&quot;){T=L;}return T;};}})(A);(function(D){var B=parseInt,C=RegExp;D.Color={KEYWORDS:{black:&quot;000&quot;,silver:&quot;c0c0c0&quot;,gray:&quot;808080&quot;,white:&quot;fff&quot;,maroon:&quot;800000&quot;,red:&quot;f00&quot;,purple:&quot;800080&quot;,fuchsia:&quot;f0f&quot;,green:&quot;008000&quot;,lime:&quot;0f0&quot;,olive:&quot;808000&quot;,yellow:&quot;ff0&quot;,navy:&quot;000080&quot;,blue:&quot;00f&quot;,teal:&quot;008080&quot;,aqua:&quot;0ff&quot;},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Color.re_RGB.test(E)){E=D.Color.toHex(E);}if(D.Color.re_hex.exec(E)){E=&quot;rgb(&quot;+[B(C.$1,16),B(C.$2,16),B(C.$3,16)].join(&quot;, &quot;)+&quot;)&quot;;}return E;},toHex:function(F){F=D.Color.KEYWORDS[F]||F;if(D.Color.re_RGB.exec(F)){F=[Number(C.$1).toString(16),Number(C.$2).toString(16),Number(C.$3).toString(16)];for(var E=0;E&lt;F.length;E++){if(F[E].length&lt;2){F[E]=&quot;0&quot;+F[E];}}F=F.join(&quot;&quot;);}if(F.length&lt;6){F=F.replace(D.Color.re_hex3,&quot;$1$1&quot;);}if(F!==&quot;transparent&quot;&amp;&amp;F.indexOf(&quot;#&quot;)&lt;0){F=&quot;#&quot;+F;}return F.toUpperCase();}};})(A);(function(D){var W=&quot;hasLayout&quot;,K=&quot;px&quot;,L=&quot;filter&quot;,B=&quot;filters&quot;,T=&quot;opacity&quot;,M=&quot;auto&quot;,G=&quot;borderWidth&quot;,J=&quot;borderTopWidth&quot;,Q=&quot;borderRightWidth&quot;,V=&quot;borderBottomWidth&quot;,H=&quot;borderLeftWidth&quot;,I=&quot;width&quot;,O=&quot;height&quot;,R=&quot;transparent&quot;,S=&quot;visible&quot;,C=&quot;getComputedStyle&quot;,Z=undefined,X=document.documentElement,P=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,E=function(Y){return Y.currentStyle||Y.style;},N={CUSTOM_STYLES:{},get:function(Y,b){var a=&quot;&quot;,c;if(Y){c=E(Y)[b];if(b===T&amp;&amp;D.DOM.CUSTOM_STYLES[T]){a=D.DOM.CUSTOM_STYLES[T].get(Y);}else{if(!c||(c.indexOf&amp;&amp;c.indexOf(K)&gt;-1)){a=c;}else{if(D.DOM.IE.COMPUTED[b]){a=D.DOM.IE.COMPUTED[b](Y,b);}else{if(P.test(c)){a=N.getPixel(Y,b)+K;}else{a=c;}}}}}return a;},sizeOffsets:{width:[&quot;Left&quot;,&quot;Right&quot;],height:[&quot;Top&quot;,&quot;Bottom&quot;],top:[&quot;Top&quot;],bottom:[&quot;Bottom&quot;]},getOffset:function(b,g){var d=E(b)[g],Y=g.charAt(0).toUpperCase()+g.substr(1),f=&quot;offset&quot;+Y,a=&quot;pixel&quot;+Y,e=N.sizeOffsets[g],c=&quot;&quot;;if(d===M||d.indexOf(&quot;%&quot;)&gt;-1){c=b[&quot;offset&quot;+Y];if(e[0]){c-=N.getPixel(b,&quot;padding&quot;+e[0]);c-=N.getBorderWidth(b,&quot;border&quot;+e[0]+&quot;Width&quot;,1);}if(e[1]){c-=N.getPixel(b,&quot;padding&quot;+e[1]);c-=N.getBorderWidth(b,&quot;border&quot;+e[1]+&quot;Width&quot;,1);}}else{if(!b.style[a]&amp;&amp;!b.style[g]){b.style[g]=d;}c=b.style[a];}return c+K;},borderMap:{thin:&quot;2px&quot;,medium:&quot;4px&quot;,thick:&quot;6px&quot;},getBorderWidth:function(a,c,Y){var b=Y?&quot;&quot;:K,d=a.currentStyle[c];if(d.indexOf(K)&lt;0){if(N.borderMap[d]){d=N.borderMap[d];}else{}}return(Y)?parseFloat(d):d;},getPixel:function(b,Y){var d=null,a=E(b),e=a.right,c=a[Y];b.style.right=c;d=b.style.pixelRight;b.style.right=e;return d;},getMargin:function(b,Y){var c,a=E(b);if(a[Y]==M){c=0;}else{c=N.getPixel(b,Y);}return c+K;},getVisibility:function(a,Y){var b;while((b=a.currentStyle)&amp;&amp;b[Y]==&quot;inherit&quot;){a=a.parentNode;}return(b)?b[Y]:S;},getColor:function(a,Y){var b=E(a)[Y];if(!b||b===R){D.DOM.elementByAxis(a,&quot;parentNode&quot;,null,function(c){b=E(c)[Y];if(b&amp;&amp;b!==R){a=c;return true;}});}return D.Color.toRGB(b);},getBorderColor:function(a,Y){var b=E(a),c=b[Y]||b.color;return D.Color.toRGB(D.Color.toHex(c));}},F={};try{if(X.style[T]===Z&amp;&amp;X[B]){D.DOM.CUSTOM_STYLES[T]={get:function(a){var c=100;try{c=a[B][&quot;DXImageTransform.Microsoft.Alpha&quot;][T];}catch(b){try{c=a[B](&quot;alpha&quot;)[T];}catch(Y){}}return c/100;},set:function(a,d,Y){var c,b;if(d===&quot;&quot;){b=E(a);c=(T in b)?b[T]:1;d=c;}if(typeof Y[L]==&quot;string&quot;){Y[L]=&quot;alpha(&quot;+T+&quot;=&quot;+d*100+&quot;)&quot;;if(!a.currentStyle||!a.currentStyle[W]){Y.zoom=1;}}}};}}catch(U){}try{document.createElement(&quot;div&quot;).style.height=&quot;-1px&quot;;}catch(U){D.DOM.CUSTOM_STYLES.height={set:function(b,c,a){var Y=parseFloat(c);if(isNaN(Y)||Y&gt;=0){a.height=c;}else{}}};D.DOM.CUSTOM_STYLES.width={set:function(b,c,a){var Y=parseFloat(c);if(isNaN(Y)||Y&gt;=0){a.width=c;}else{}}};}F[I]=F[O]=N.getOffset;F.color=F.backgroundColor=N.getColor;F[G]=F[J]=F[Q]=F[V]=F[H]=N.getBorderWidth;F.marginTop=F.marginRight=F.marginBottom=F.marginLeft=N.getMargin;F.visibility=N.getVisibility;F.borderColor=F.borderTopColor=F.borderRightColor=F.borderBottomColor=F.borderLeftColor=N.getBorderColor;if(!D.config.win[C]){D.DOM[C]=N.get;}D.namespace(&quot;DOM.IE&quot;);D.DOM.IE.COMPUTED=F;D.DOM.IE.ComputedStyle=N;})(A);A.mix(A.DOM,{setWidth:function(C,B){A.DOM._setSize(C,&quot;width&quot;,B);
+}});})(I);})(D);var B,A,C;D.mix(D.DOM,{hasClass:function(G,F){var E=D.DOM._getRegExp(&quot;(?:^|\\s+)&quot;+F+&quot;(?:\\s+|$)&quot;);return E.test(G.className);},addClass:function(F,E){if(!D.DOM.hasClass(F,E)){F.className=D.Lang.trim([F.className,E].join(&quot; &quot;));}},removeClass:function(F,E){if(E&amp;&amp;A(F,E)){F.className=D.Lang.trim(F.className.replace(D.DOM._getRegExp(&quot;(?:^|\\s+)&quot;+E+&quot;(?:\\s+|$)&quot;),&quot; &quot;));if(A(F,E)){C(F,E);}}},replaceClass:function(F,E,G){C(F,E);B(F,G);},toggleClass:function(F,E,G){var H=(G!==undefined)?G:!(A(F,E));if(H){B(F,E);}else{C(F,E);}}});A=D.DOM.hasClass;C=D.DOM.removeClass;B=D.DOM.addClass;},&quot;@VERSION@&quot;,{requires:[&quot;oop&quot;]});YUI.add(&quot;dom-style&quot;,function(A){(function(E){var C=&quot;documentElement&quot;,B=&quot;defaultView&quot;,D=&quot;ownerDocument&quot;,N=&quot;style&quot;,P=&quot;float&quot;,F=&quot;cssFloat&quot;,G=&quot;styleFloat&quot;,L=&quot;transparent&quot;,I=&quot;getComputedStyle&quot;,O=E.config.doc,K=undefined,J=E.DOM,M=/color$/i,H=/width|height|top|left|right|bottom|margin|padding/i;E.mix(J,{DEFAULT_UNIT:&quot;px&quot;,CUSTOM_STYLES:{},setStyle:function(T,Q,V,S){S=S||T.style;var R=J.CUSTOM_STYLES,U;if(S){if(V===null||V===&quot;&quot;){V=&quot;&quot;;}else{if(!isNaN(new Number(V))&amp;&amp;H.test(Q)){V+=J.DEFAULT_UNIT;}}if(Q in R){if(R[Q].set){R[Q].set(T,V,S);return;}else{if(typeof R[Q]===&quot;string&quot;){Q=R[Q];}}}S[Q]=V;}},getStyle:function(T,Q,S){S=S||T.style;var R=J.CUSTOM_STYLES,U=&quot;&quot;;if(S){if(Q in R){if(R[Q].get){return R[Q].get(T,Q,S);}else{if(typeof R[Q]===&quot;string&quot;){Q=R[Q];}}}U=S[Q];if(U===&quot;&quot;){U=J[I](T,Q);}}return U;},setStyles:function(R,S){var Q=R.style;E.each(S,function(T,U){J.setStyle(R,U,T,Q);},J);},getComputedStyle:function(R,Q){var T=&quot;&quot;,S=R[D];if(R[N]){T=S[B][I](R,null)[Q];}return T;}});if(O[C][N][F]!==K){J.CUSTOM_STYLES[P]=F;}else{if(O[C][N][G]!==K){J.CUSTOM_STYLES[P]=G;}}if(E.UA.opera){J[I]=function(S,R){var Q=S[D][B],T=Q[I](S,&quot;&quot;)[R];if(M.test(R)){T=E.Color.toRGB(T);}return T;};}if(E.UA.webkit){J[I]=function(S,R){var Q=S[D][B],T=Q[I](S,&quot;&quot;)[R];if(T===&quot;rgba(0, 0, 0, 0)&quot;){T=L;}return T;};}})(A);(function(D){var B=parseInt,C=RegExp;D.Color={KEYWORDS:{black:&quot;000&quot;,silver:&quot;c0c0c0&quot;,gray:&quot;808080&quot;,white:&quot;fff&quot;,maroon:&quot;800000&quot;,red:&quot;f00&quot;,purple:&quot;800080&quot;,fuchsia:&quot;f0f&quot;,green:&quot;008000&quot;,lime:&quot;0f0&quot;,olive:&quot;808000&quot;,yellow:&quot;ff0&quot;,navy:&quot;000080&quot;,blue:&quot;00f&quot;,teal:&quot;008080&quot;,aqua:&quot;0ff&quot;},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Color.re_RGB.test(E)){E=D.Color.toHex(E);}if(D.Color.re_hex.exec(E)){E=&quot;rgb(&quot;+[B(C.$1,16),B(C.$2,16),B(C.$3,16)].join(&quot;, &quot;)+&quot;)&quot;;}return E;},toHex:function(F){F=D.Color.KEYWORDS[F]||F;if(D.Color.re_RGB.exec(F)){F=[Number(C.$1).toString(16),Number(C.$2).toString(16),Number(C.$3).toString(16)];for(var E=0;E&lt;F.length;E++){if(F[E].length&lt;2){F[E]=&quot;0&quot;+F[E];}}F=F.join(&quot;&quot;);}if(F.length&lt;6){F=F.replace(D.Color.re_hex3,&quot;$1$1&quot;);}if(F!==&quot;transparent&quot;&amp;&amp;F.indexOf(&quot;#&quot;)&lt;0){F=&quot;#&quot;+F;}return F.toUpperCase();}};})(A);(function(D){var W=&quot;hasLayout&quot;,K=&quot;px&quot;,L=&quot;filter&quot;,B=&quot;filters&quot;,T=&quot;opacity&quot;,M=&quot;auto&quot;,G=&quot;borderWidth&quot;,J=&quot;borderTopWidth&quot;,Q=&quot;borderRightWidth&quot;,V=&quot;borderBottomWidth&quot;,H=&quot;borderLeftWidth&quot;,I=&quot;width&quot;,O=&quot;height&quot;,R=&quot;transparent&quot;,S=&quot;visible&quot;,C=&quot;getComputedStyle&quot;,Z=undefined,X=document.documentElement,P=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,E=function(Y){return Y.currentStyle||Y.style;},N={CUSTOM_STYLES:{},get:function(Y,b){var a=&quot;&quot;,c;if(Y){c=E(Y)[b];if(b===T&amp;&amp;D.DOM.CUSTOM_STYLES[T]){a=D.DOM.CUSTOM_STYLES[T].get(Y);}else{if(!c||(c.indexOf&amp;&amp;c.indexOf(K)&gt;-1)){a=c;}else{if(D.DOM.IE.COMPUTED[b]){a=D.DOM.IE.COMPUTED[b](Y,b);}else{if(P.test(c)){a=N.getPixel(Y,b)+K;}else{a=c;}}}}}return a;},sizeOffsets:{width:[&quot;Left&quot;,&quot;Right&quot;],height:[&quot;Top&quot;,&quot;Bottom&quot;],top:[&quot;Top&quot;],bottom:[&quot;Bottom&quot;]},getOffset:function(b,g){var d=E(b)[g],Y=g.charAt(0).toUpperCase()+g.substr(1),f=&quot;offset&quot;+Y,a=&quot;pixel&quot;+Y,e=N.sizeOffsets[g],c=&quot;&quot;;if(d===M||d.indexOf(&quot;%&quot;)&gt;-1){c=b[&quot;offset&quot;+Y];if(e[0]){c-=N.getPixel(b,&quot;padding&quot;+e[0]);c-=N.getBorderWidth(b,&quot;border&quot;+e[0]+&quot;Width&quot;,1);}if(e[1]){c-=N.getPixel(b,&quot;padding&quot;+e[1]);c-=N.getBorderWidth(b,&quot;border&quot;+e[1]+&quot;Width&quot;,1);}}else{if(!b.style[a]&amp;&amp;!b.style[g]){b.style[g]=d;}c=b.style[a];}return c+K;},borderMap:{thin:&quot;2px&quot;,medium:&quot;4px&quot;,thick:&quot;6px&quot;},getBorderWidth:function(a,c,Y){var b=Y?&quot;&quot;:K,d=a.currentStyle[c];if(d.indexOf(K)&lt;0){if(N.borderMap[d]){d=N.borderMap[d];}else{}}return(Y)?parseFloat(d):d;},getPixel:function(b,Y){var d=null,a=E(b),e=a.right,c=a[Y];b.style.right=c;d=b.style.pixelRight;b.style.right=e;return d;},getMargin:function(b,Y){var c,a=E(b);if(a[Y]==M){c=0;}else{c=N.getPixel(b,Y);}return c+K;},getVisibility:function(a,Y){var b;while((b=a.currentStyle)&amp;&amp;b[Y]==&quot;inherit&quot;){a=a.parentNode;}return(b)?b[Y]:S;},getColor:function(a,Y){var b=E(a)[Y];if(!b||b===R){D.DOM.elementByAxis(a,&quot;parentNode&quot;,null,function(c){b=E(c)[Y];if(b&amp;&amp;b!==R){a=c;return true;}});}return D.Color.toRGB(b);},getBorderColor:function(a,Y){var b=E(a),c=b[Y]||b.color;return D.Color.toRGB(D.Color.toHex(c));}},F={};try{if(X.style[T]===Z&amp;&amp;X[B]){D.DOM.CUSTOM_STYLES[T]={get:function(a){var c=100;try{c=a[B][&quot;DXImageTransform.Microsoft.Alpha&quot;][T];}catch(b){try{c=a[B](&quot;alpha&quot;)[T];}catch(Y){}}return c/100;},set:function(a,d,Y){var c,b;if(d===&quot;&quot;){b=E(a);c=(T in b)?b[T]:1;d=c;}if(typeof Y[L]==&quot;string&quot;){Y[L]=&quot;alpha(&quot;+T+&quot;=&quot;+d*100+&quot;)&quot;;if(!a.currentStyle||!a.currentStyle[W]){Y.zoom=1;}}}};}}catch(U){}try{document.createElement(&quot;div&quot;).style.height=&quot;-1px&quot;;}catch(U){D.DOM.CUSTOM_STYLES.height={set:function(b,c,a){var Y=parseFloat(c);if(isNaN(Y)||Y&gt;=0){a.height=c;}else{}}};D.DOM.CUSTOM_STYLES.width={set:function(b,c,a){var Y=parseFloat(c);if(isNaN(Y)||Y&gt;=0){a.width=c;}else{}}};}F[I]=F[O]=N.getOffset;F.color=F.backgroundColor=N.getColor;F[G]=F[J]=F[Q]=F[V]=F[H]=N.getBorderWidth;F.marginTop=F.marginRight=F.marginBottom=F.marginLeft=N.getMargin;F.visibility=N.getVisibility;F.borderColor=F.borderTopColor=F.borderRightColor=F.borderBottomColor=F.borderLeftColor=N.getBorderColor;if(!D.config.win[C]){D.DOM[C]=N.get;}D.namespace(&quot;DOM.IE&quot;);D.DOM.IE.COMPUTED=F;D.DOM.IE.ComputedStyle=N;})(A);A.mix(A.DOM,{setWidth:function(C,B){A.DOM._setSize(C,&quot;width&quot;,B);
 },setHeight:function(C,B){A.DOM._setSize(C,&quot;height&quot;,B);},_getOffsetProp:function(B,C){return&quot;offset&quot;+C.charAt(0).toUpperCase()+C.substr(1);},_setSize:function(B,E,D){var C;A.DOM.setStyle(B,E,D+&quot;px&quot;);C=B[A.DOM._getOffsetProp(B,E)];D=D-(C-D);if(D&lt;0){D=0;}A.DOM.setStyle(B,E,D+&quot;px&quot;);}});},&quot;@VERSION@&quot;,{requires:[&quot;dom-base&quot;]});YUI.add(&quot;dom-screen&quot;,function(A){(function(F){var D=&quot;documentElement&quot;,P=&quot;compatMode&quot;,N=&quot;position&quot;,C=&quot;fixed&quot;,L=&quot;relative&quot;,G=&quot;left&quot;,H=&quot;top&quot;,I=&quot;BackCompat&quot;,O=&quot;medium&quot;,E=&quot;borderLeftWidth&quot;,B=&quot;borderTopWidth&quot;,Q=&quot;getBoundingClientRect&quot;,J=&quot;getComputedStyle&quot;,K=F.DOM,M=/^t(?:able|d|h)$/i;F.mix(K,{winHeight:function(S){var R=K._getWinSize(S).height;return R;},winWidth:function(S){var R=K._getWinSize(S).width;return R;},docHeight:function(S){var R=K._getDocSize(S).height;return Math.max(R,K._getWinSize(S).height);},docWidth:function(S){var R=K._getDocSize(S).width;return Math.max(R,K._getWinSize(S).width);},docScrollX:function(R){var S=K._getDoc(R);return Math.max(S[D].scrollLeft,S.body.scrollLeft);},docScrollY:function(R){var S=K._getDoc(R);return Math.max(S[D].scrollTop,S.body.scrollTop);},getXY:function(){if(document[D][Q]){return function(U){var b=null,V,S,W,Z,Y,R,T,X,a;if(U){if(K.inDoc(U)){V=K.docScrollX(U);S=K.docScrollY(U);W=U[Q]();a=K._getDoc(U);b=[W.left,W.top];if(F.UA.ie){Z=2;Y=2;X=a[P];R=K[J](a[D],E);T=K[J](a[D],B);if(F.UA.ie===6){if(X!==I){Z=0;Y=0;}}if((X==I)){if(R!==O){Z=parseInt(R,10);}if(T!==O){Y=parseInt(T,10);}}b[0]-=Z;b[1]-=Y;}if((S||V)){b[0]+=V;b[1]+=S;}}else{b=K._getOffset(U);}}return b;};}else{return function(S){var U=null,R,W,T,V;if(S){if(K.inDoc(S)){U=[S.offsetLeft,S.offsetTop];R=S;W=((F.UA.gecko||F.UA.webkit&gt;519)?true:false);while((R=R.offsetParent)){U[0]+=R.offsetLeft;U[1]+=R.offsetTop;if(W){U=K._calcBorders(R,U);}}if(K.getStyle(S,N)!=C){R=S;while((R=R.parentNode)){T=R.scrollTop;V=R.scrollLeft;if(F.UA.gecko&amp;&amp;(K.getStyle(R,&quot;overflow&quot;)!==&quot;visible&quot;)){U=K._calcBorders(R,U);}if(T||V){U[0]-=V;U[1]-=T;}}U[0]+=K.docScrollX(S);U[1]+=K.docScrollY(S);}else{U[0]+=K.docScrollX(S);U[1]+=K.docScrollY(S);}}else{U=K._getOffset(S);}}return U;};}}(),_getOffset:function(R){var T,S=null;if(R){T=K.getStyle(R,N);S=[parseInt(K[J](R,G),10),parseInt(K[J](R,H),10)];if(isNaN(S[0])){S[0]=parseInt(K.getStyle(R,G),10);if(isNaN(S[0])){S[0]=(T===L)?0:R.offsetLeft||0;}}if(isNaN(S[1])){S[1]=parseInt(K.getStyle(R,H),10);if(isNaN(S[1])){S[1]=(T===L)?0:R.offsetTop||0;}}}return S;},getX:function(R){return K.getXY(R)[0];},getY:function(R){return K.getXY(R)[1];},setXY:function(S,V,Y){var T=K.setStyle,X,W,R,U;if(S&amp;&amp;V){X=K.getStyle(S,N);W=K._getOffset(S);if(X==&quot;static&quot;){X=L;T(S,N,X);}U=K.getXY(S);if(V[0]!==null){T(S,G,V[0]-U[0]+W[0]+&quot;px&quot;);}if(V[1]!==null){T(S,H,V[1]-U[1]+W[1]+&quot;px&quot;);}if(!Y){R=K.getXY(S);if(R[0]!==V[0]||R[1]!==V[1]){K.setXY(S,V,true);}}}else{}},setX:function(S,R){return K.setXY(S,[R,null]);},setY:function(R,S){return K.setXY(R,[null,S]);},swapXY:function(S,R){var T=K.getXY(S);K.setXY(S,K.getXY(R));K.setXY(R,T);},_calcBorders:function(T,U){var S=parseInt(K[J](T,B),10)||0,R=parseInt(K[J](T,E),10)||0;if(F.UA.gecko){if(M.test(T.tagName)){S=0;R=0;}}U[0]+=R;U[1]+=S;return U;},_getWinSize:function(U){var W=K._getDoc(),V=W.defaultView||W.parentWindow,X=W[P],T=V.innerHeight,S=V.innerWidth,R=W[D];if(X&amp;&amp;!F.UA.opera){if(X!=&quot;CSS1Compat&quot;){R=W.body;}T=R.clientHeight;S=R.clientWidth;}return{height:T,width:S};},_getDocSize:function(S){var T=K._getDoc(),R=T[D];if(T[P]!=&quot;CSS1Compat&quot;){R=T.body;}return{height:R.scrollHeight,width:R.scrollWidth};}});})(A);(function(G){var D=&quot;top&quot;,C=&quot;right&quot;,H=&quot;bottom&quot;,B=&quot;left&quot;,F=function(L,K){var N=Math.max(L[D],K[D]),O=Math.min(L[C],K[C]),I=Math.min(L[H],K[H]),J=Math.max(L[B],K[B]),M={};M[D]=N;M[C]=O;M[H]=I;M[B]=J;return M;},E=G.DOM;G.mix(E,{region:function(J){var K=E.getXY(J),I=false;if(J&amp;&amp;K){I=E._getRegion(K[1],K[0]+J.offsetWidth,K[1]+J.offsetHeight,K[0]);}return I;},intersect:function(K,I,M){var J=M||E.region(K),L={},O=I,N;if(O.tagName){L=E.region(O);}else{if(G.Lang.isObject(I)){L=I;}else{return false;}}N=F(L,J);return{top:N[D],right:N[C],bottom:N[H],left:N[B],area:((N[H]-N[D])*(N[C]-N[B])),yoff:((N[H]-N[D])),xoff:(N[C]-N[B]),inRegion:E.inRegion(K,I,false,M)};},inRegion:function(L,I,J,N){var M={},K=N||E.region(L),P=I,O;if(P.tagName){M=E.region(P);}else{if(G.Lang.isObject(I)){M=I;}else{return false;}}if(J){return(K[B]&gt;=M[B]&amp;&amp;K[C]&lt;=M[C]&amp;&amp;K[D]&gt;=M[D]&amp;&amp;K[H]&lt;=M[H]);}else{O=F(M,K);if(O[H]&gt;=O[D]&amp;&amp;O[C]&gt;=O[B]){return true;}else{return false;}}},inViewportRegion:function(J,I,K){return E.inRegion(J,E.viewportRegion(J),I,K);},_getRegion:function(K,L,I,J){var M={};M[D]=M[1]=K;M[B]=M[0]=J;M[H]=I;M[C]=L;M.width=M[C]-M[B];M.height=M[H]-M[D];return M;},viewportRegion:function(J){J=J||G.config.doc.documentElement;var I=false,L,K;if(J){L=E.docScrollX(J);K=E.docScrollY(J);I=E._getRegion(K,E.winWidth(J)+L,K+E.winHeight(J),L);}return I;}});})(A);},&quot;@VERSION@&quot;,{requires:[&quot;dom-base&quot;,&quot;dom-style&quot;]});YUI.add(&quot;selector-native&quot;,function(A){(function(E){E.namespace(&quot;Selector&quot;);var C=&quot;compareDocumentPosition&quot;,D=&quot;ownerDocument&quot;;var B={_foundCache:[],useNative:true,_compare:(&quot;sourceIndex&quot; in document.documentElement)?function(I,H){var G=I.sourceIndex,F=H.sourceIndex;if(G===F){return 0;}else{if(G&gt;F){return 1;}}return -1;}:(document.documentElement[C]?function(G,F){if(G[C](F)&amp;4){return -1;}else{return 1;}}:function(J,I){var H,F,G;if(J&amp;&amp;I){H=J[D].createRange();H.setStart(J,0);F=I[D].createRange();F.setStart(I,0);G=H.compareBoundaryPoints(1,F);}return G;}),_sort:function(F){if(F){F=E.Array(F,0,true);if(F.sort){F.sort(B._compare);}}return F;},_deDupe:function(F){var G=[],H,I;for(H=0;(I=F[H++]);){if(!I._found){G[G.length]=I;I._found=true;}}for(H=0;(I=G[H++]);){I._found=null;I.removeAttribute(&quot;_found&quot;);}return G;},query:function(G,N,O,F){N=N||E.config.doc;var K=[],H=(E.Selector.useNative&amp;&amp;document.querySelector&amp;&amp;!F),J=[[G,N]],L,P,I,M=(H)?E.Selector._nativeQuery:E.Selector._bruteQuery;if(G&amp;&amp;M){if(!F&amp;&amp;(!H||N.tagName)){J=B._splitQueries(G,N);}for(I=0;(L=J[I++]);){P=M(L[0],L[1],O);if(!O){P=E.Array(P,0,true);}if(P){K=K.concat(P);
 }}if(J.length&gt;1){K=B._sort(B._deDupe(K));}}return(O)?(K[0]||null):K;},_splitQueries:function(H,K){var G=H.split(&quot;,&quot;),I=[],L=&quot;&quot;,J,F;if(K){if(K.tagName){K.id=K.id||E.guid();L='[id=&quot;'+K.id+'&quot;] ';}for(J=0,F=G.length;J&lt;F;++J){H=L+G[J];I.push([H,K]);}}return I;},_nativeQuery:function(F,G,H){try{return G[&quot;querySelector&quot;+(H?&quot;&quot;:&quot;All&quot;)](F);}catch(I){return E.Selector.query(F,G,H,true);}},filter:function(G,F){var H=[],I,J;if(G&amp;&amp;F){for(I=0;(J=G[I++]);){if(E.Selector.test(J,F)){H[H.length]=J;}}}else{}return H;},test:function(H,I,N){var L=false,G=I.split(&quot;,&quot;),F=false,O,R,M,Q,K,J,P;if(H&amp;&amp;H.tagName){if(!N&amp;&amp;!E.DOM.inDoc(H)){O=H.parentNode;if(O){N=O;}else{Q=H[D].createDocumentFragment();Q.appendChild(H);N=Q;F=true;}}N=N||H[D];if(!H.id){H.id=E.guid();}for(K=0;(P=G[K++]);){P+='[id=&quot;'+H.id+'&quot;]';M=E.Selector.query(P,N);for(J=0;R=M[J++];){if(R===H){L=true;break;}}if(L){break;}}if(F){Q.removeChild(H);}}return L;},ancestor:function(G,F,H){return E.DOM.ancestor(G,function(I){return E.Selector.test(I,F);},H);}};E.mix(E.Selector,B,true);})(A);},&quot;@VERSION@&quot;,{requires:[&quot;dom-base&quot;]});YUI.add(&quot;selector-css2&quot;,function(G){var H=&quot;parentNode&quot;,D=&quot;tagName&quot;,E=&quot;attributes&quot;,A=&quot;combinator&quot;,F=&quot;pseudos&quot;,C=G.Selector,B={SORT_RESULTS:true,_children:function(M,I){var J=M.children,L,K=[],N,O;if(M.children&amp;&amp;I&amp;&amp;M.children.tags){K=M.children.tags(I);}else{if((!J&amp;&amp;M[D])||(J&amp;&amp;I)){N=J||M.childNodes;J=[];for(L=0;(O=N[L++]);){if(O.tagName){if(!I||I===O.tagName){J.push(O);}}}}}return J||[];},_re:{attr:/(\[[^\]]*\])/g,pseudos:/:([\-\w]+(?:\(?:['&quot;]?(.+)['&quot;]?\)))*/i},shorthand:{&quot;\\#(-?[_a-z]+[-\\w]*)&quot;:&quot;[id=$1]&quot;,&quot;\\.(-?[_a-z]+[-\\w]*)&quot;:&quot;[className~=$1]&quot;},operators:{&quot;&quot;:function(J,I){return G.DOM.getAttribute(J,I)!==&quot;&quot;;},&quot;~=&quot;:&quot;(?:^|\\s+){val}(?:\\s+|$)&quot;,&quot;|=&quot;:&quot;^{val}-?&quot;},pseudos:{&quot;first-child&quot;:function(I){return G.Selector._children(I[H])[0]===I;}},_bruteQuery:function(M,Q,S){var N=[],I=[],P=C._tokenize(M),L=P[P.length-1],R=G.DOM._getDoc(Q),J,O,K;if(L){J=L.id;O=L.className;K=L.tagName||&quot;*&quot;;if(J){I=G.DOM.allById(J,Q);}else{if(O){I=Q.getElementsByClassName(O);}else{I=Q.getElementsByTagName(K);}}if(I.length){N=C._filterNodes(I,P,S);}}return N;},_filterNodes:function(R,N,P){var W=0,V,X=N.length,Q=X-1,M=[],T=R[0],a=T,Y=G.Selector.getters,L,U,K,O,I,S,J,Z;for(W=0;(a=T=R[W++]);){Q=X-1;O=null;testLoop:while(a&amp;&amp;a.tagName){K=N[Q];J=K.tests;V=J.length;if(V&amp;&amp;!I){while((Z=J[--V])){L=Z[1];if(Y[Z[0]]){S=Y[Z[0]](a,Z[0]);}else{S=a[Z[0]];if(S===undefined&amp;&amp;a.getAttribute){S=a.getAttribute(Z[0]);}}if((L===&quot;=&quot;&amp;&amp;S!==Z[2])||(L.test&amp;&amp;!L.test(S))||(L.call&amp;&amp;!L(a,Z[0]))){if((a=a[O])){while(a&amp;&amp;(!a.tagName||(K.tagName&amp;&amp;K.tagName!==a.tagName))){a=a[O];}}continue testLoop;}}}Q--;if(!I&amp;&amp;(U=K.combinator)){O=U.axis;a=a[O];while(a&amp;&amp;!a.tagName){a=a[O];}if(U.direct){O=null;}}else{M.push(T);if(P){return M;}break;}}}T=a=null;return M;},combinators:{&quot; &quot;:{axis:&quot;parentNode&quot;},&quot;&gt;&quot;:{axis:&quot;parentNode&quot;,direct:true},&quot;+&quot;:{axis:&quot;previousSibling&quot;,direct:true}},_parsers:[{name:E,re:/^\[(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['&quot;]?([^\]]*?)['&quot;]?\]/i,fn:function(K,L){var J=K[2]||&quot;&quot;,I=G.Selector.operators,M;if((K[1]===&quot;id&quot;&amp;&amp;J===&quot;=&quot;)||(K[1]===&quot;className&quot;&amp;&amp;document.documentElement.getElementsByClassName&amp;&amp;(J===&quot;~=&quot;||J===&quot;=&quot;))){L.prefilter=K[1];L[K[1]]=K[3];}if(J in I){M=I[J];if(typeof M===&quot;string&quot;){M=G.DOM._getRegExp(M.replace(&quot;{val}&quot;,K[3]));}K[2]=M;}if(!L.last||L.prefilter!==K[1]){return K.slice(1);}}},{name:D,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(J,K){var I=J[1].toUpperCase();K.tagName=I;if(I!==&quot;*&quot;&amp;&amp;(!K.last||K.prefilter)){return[D,&quot;=&quot;,I];}if(!K.prefilter){K.prefilter=&quot;tagName&quot;;}}},{name:A,re:/^\s*([&gt;+~]|\s)\s*/,fn:function(I,J){}},{name:F,re:/^:([\-\w]+)(?:\(['&quot;]?(.+)['&quot;]?\))*/i,fn:function(I,J){var K=C[F][I[1]];if(K){return[I[2],K];}else{return false;}}}],_getToken:function(I){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]};},_tokenize:function(K){K=K||&quot;&quot;;K=C._replaceShorthand(G.Lang.trim(K));var J=C._getToken(),P=K,O=[],Q=false,M,N,L,I;outer:do{Q=false;for(L=0;(I=C._parsers[L++]);){if((M=I.re.exec(K))){if(I.name!==A){J.selector=K;}K=K.replace(M[0],&quot;&quot;);if(!K.length){J.last=true;}if(C._attrFilters[M[1]]){M[1]=C._attrFilters[M[1]];}N=I.fn(M,J);if(N===false){Q=false;break outer;}else{if(N){J.tests.push(N);}}if(!K.length||I.name===A){O.push(J);J=C._getToken(J);if(I.name===A){J.combinator=G.Selector.combinators[M[1]];}}Q=true;}}}while(Q&amp;&amp;K.length);if(!Q||K.length){O=[];}return O;},_replaceShorthand:function(J){var K=C.shorthand,L=J.match(C._re.attr),O=J.match(C._re.pseudos),N,M,I;if(O){J=J.replace(C._re.pseudos,&quot;!!REPLACED_PSEUDO!!&quot;);}if(L){J=J.replace(C._re.attr,&quot;!!REPLACED_ATTRIBUTE!!&quot;);}for(N in K){if(K.hasOwnProperty(N)){J=J.replace(G.DOM._getRegExp(N,&quot;gi&quot;),K[N]);}}if(L){for(M=0,I=L.length;M&lt;I;++M){J=J.replace(&quot;!!REPLACED_ATTRIBUTE!!&quot;,L[M]);}}if(O){for(M=0,I=O.length;M&lt;I;++M){J=J.replace(&quot;!!REPLACED_PSEUDO!!&quot;,O[M]);}}return J;},_attrFilters:{&quot;class&quot;:&quot;className&quot;,&quot;for&quot;:&quot;htmlFor&quot;},getters:{href:function(J,I){return G.DOM.getAttribute(J,I);}}};G.mix(G.Selector,B,true);G.Selector.getters.src=G.Selector.getters.rel=G.Selector.getters.href;if(G.Selector.useNative&amp;&amp;document.querySelector){G.Selector.shorthand[&quot;\\.(-?[_a-z]+[-\\w]*)&quot;]=&quot;[class~=$1]&quot;;}},&quot;@VERSION@&quot;,{requires:[&quot;selector-native&quot;]});YUI.add(&quot;selector&quot;,function(A){},&quot;@VERSION@&quot;,{use:[&quot;selector-native&quot;,&quot;selector-css2&quot;]});YUI.add(&quot;dom&quot;,function(A){},&quot;@VERSION@&quot;,{use:[&quot;dom-base&quot;,&quot;dom-style&quot;,&quot;dom-screen&quot;,&quot;selector&quot;]});
\ No newline at end of file</diff>
      <filename>build/dom/dom-min.js</filename>
    </modified>
    <modified>
      <diff>@@ -757,8 +757,8 @@ Y.mix(Y.DOM, {
      * @param {String} newClassName the class name that will be replacing the old class name
      */
     replaceClass: function(node, oldC, newC) {
+        removeClass(node, oldC); // remove first in case oldC === newC
         addClass(node, newC);
-        removeClass(node, oldC);
     },
 
     /**</diff>
      <filename>build/dom/dom.js</filename>
    </modified>
    <modified>
      <diff>@@ -52,8 +52,8 @@ Y.mix(Y.DOM, {
      */
     replaceClass: function(node, oldC, newC) {
         //Y.log('replaceClass replacing ' + oldC + ' with ' + newC, 'info', 'Node');
+        removeClass(node, oldC); // remove first in case oldC === newC
         addClass(node, newC);
-        removeClass(node, oldC);
     },
 
     /**</diff>
      <filename>src/dom/js/dom-class.js</filename>
    </modified>
    <modified>
      <diff>@@ -594,6 +594,10 @@ YUI({base: '../../../build/', filter: 'raw'}).use('anim', 'console', 'test', fun
                 Assert.isFalse(n.hasClass('bar'));
             });
 
+            node = Y.DOM.create('&lt;div&gt;&lt;/div&gt;');
+            Y.DOM.addClass(node, 'foo');
+            Y.DOM.replaceClass('foo', 'foo');
+            Assert.isTrue(Y.DOM.hasClass(node, 'foo'));
         },
 
         test_toggle: function() {</diff>
      <filename>src/node/tests/node.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>969abe672d9dea12b01d6173ceb8c54085bfd402</id>
    </parent>
  </parents>
  <author>
    <name>Matt Sweeney</name>
    <login></login>
    <email>msweeney@wifi-e-135-236.corp.yahoo.com</email>
  </author>
  <url>http://github.com/yui/yui3/commit/8741de7d604274139449b59e6e74ddc3788ac52a</url>
  <id>8741de7d604274139449b59e6e74ddc3788ac52a</id>
  <committed-date>2010-02-08T13:36:22-08:00</committed-date>
  <authored-date>2010-02-08T13:36:22-08:00</authored-date>
  <message>changed order of ops for replaceClass [fixes 2528513]</message>
  <tree>153dcf27ee64eb07985cdf2c015ff38e9b73af45</tree>
  <committer>
    <name>Matt Sweeney</name>
    <login></login>
    <email>msweeney@wifi-e-135-236.corp.yahoo.com</email>
  </committer>
</commit>
