dom-min.js revision 14dc4f889a7b6c39f10aa490ea3c4c69de5e99bb
YUI.add("dom-base",function(d){(function(h){var n="nodeType",r="ownerDocument",s="documentElement",g="defaultView",l="parentWindow",p="tagName",j="parentNode",e="firstChild",q="previousSibling",t="nextSibling",k="contains",o="compareDocumentPosition",f="",v=h.config.doc.documentElement,m=/<([a-z]+)/i,i=function(y,w){var z=h.config.doc.createElement("div"),x=true;z.innerHTML=y;if(!z.firstChild||z.firstChild.tagName!==w){x=false;}return x;},u={byId:function(x,w){return u.allById(x,w)[0]||null;},getText:(v.textContent!==undefined)?function(x){var w="";if(x){w=x.textContent;}return w||"";}:function(x){var w="";if(x){w=x.innerText||x.nodeValue;}return w||"";},setText:(v.textContent!==undefined)?function(w,x){if(w){w.textContent=x;}}:function(w,x){if("innerText" in w){w.innerText=x;}else{if("nodeValue" in w){w.nodeValue=x;}}},ancestor:function(x,y,z){var w=null;if(z){w=(!y||y(x))?x:null;}return w||u.elementByAxis(x,j,y,null);},ancestors:function(y,z,A){var x=u.ancestor.apply(u,arguments),w=(x)?[x]:[];while((x=u.ancestor(x,z))){if(x){w.unshift(x);}}return w;},elementByAxis:function(w,z,y,x){while(w&&(w=w[z])){if((x||w[p])&&(!y||y(w))){return w;}}return null;},contains:function(x,y){var w=false;if(!y||!x||!y[n]||!x[n]){w=false;}else{if(x[k]){if(h.UA.opera||y[n]===1){w=x[k](y);}else{w=u._bruteContains(x,y);}}else{if(x[o]){if(x===y||!!(x[o](y)&16)){w=true;}}}}return w;},inDoc:function(y,z){var x=false,w;if(y&&y.nodeType){(z)||(z=y[r]);w=z[s];if(w&&w.contains&&y.tagName){x=w.contains(y);}else{x=u.contains(w,y);}}return x;},allById:function(B,w){w=w||h.config.doc;var x=[],y=[],z,A;if(w.querySelectorAll){y=w.querySelectorAll('[id="'+B+'"]');}else{if(w.all){x=w.all(B);if(x&&x.nodeType){x=[x];}if(x&&x.length){for(z=0;A=x[z++];){if(A.attributes&&A.attributes.id&&A.attributes.id.value===B){y.push(A);}}}}else{y=[u._getDoc(w).getElementById(B)];}}return y;},create:function(B,D){if(typeof B==="string"){B=h.Lang.trim(B);}D=D||h.config.doc;var x=m.exec(B),A=u._create,C=u.creators,z=null,w,y;if(B!=undefined){if(x&&C[x[1]]){if(typeof C[x[1]]==="function"){A=C[x[1]];}else{w=C[x[1]];}}y=A(B,D,w).childNodes;if(y.length===1){z=y[0].parentNode.removeChild(y[0]);}else{if(y[0]&&y[0].className==="yui3-big-dummy"){if(y.length===2){z=y[0].nextSibling;}else{y[0].parentNode.removeChild(y[0]);z=u._nl2frag(y,D);}}else{z=u._nl2frag(y,D);}}}return z;},_nl2frag:function(x,A){var y=null,z,w;if(x&&(x.push||x.item)&&x[0]){A=A||x[0].ownerDocument;y=A.createDocumentFragment();if(x.item){x=h.Array(x,0,true);}for(z=0,w=x.length;z<w;z++){y.appendChild(x[z]);}}return y;},CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":"className"}:{"htmlFor":"for","className":"class"},setAttribute:function(y,w,z,x){if(y&&w&&y.setAttribute){w=u.CUSTOM_ATTRIBUTES[w]||w;y.setAttribute(w,z,x);}},getAttribute:function(z,w,y){y=(y!==undefined)?y:2;var x="";if(z&&w&&z.getAttribute){w=u.CUSTOM_ATTRIBUTES[w]||w;x=z.getAttribute(w,y);if(x===null){x="";}}return x;},isWindow:function(w){return !!(w&&w.alert&&w.document);},_fragClones:{},_create:function(x,y,w){w=w||"div";var z=u._fragClones[w];if(z){z=z.cloneNode(false);}else{z=u._fragClones[w]=y.createElement(w);}z.innerHTML=x;return z;},_removeChildNodes:function(w){while(w.firstChild){w.removeChild(w.firstChild);}},addHTML:function(D,C,y){var w=D.parentNode,A=0,B,x=C,z;if(C!=undefined){if(C.nodeType){z=C;}else{if(typeof C=="string"||typeof C=="number"){x=z=u.create(C);}else{if(C[0]&&C[0].nodeType){z=h.config.doc.createDocumentFragment();while((B=C[A++])){z.appendChild(B);}}}}}if(y){if(y.nodeType){y.parentNode.insertBefore(z,y);}else{switch(y){case"replace":while(D.firstChild){D.removeChild(D.firstChild);}if(z){D.appendChild(z);}break;case"before":w.insertBefore(z,D);break;case"after":if(D.nextSibling){w.insertBefore(z,D.nextSibling);}else{w.appendChild(z);}break;default:D.appendChild(z);}}}else{if(z){D.appendChild(z);}}return x;},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(y){var x="",w;if(y&&y[p]){w=u.VALUE_GETTERS[y[p].toLowerCase()];if(w){x=w(y);}else{x=y.value;}}if(x===f){x=f;}return(typeof x==="string")?x:"";},setValue:function(w,x){var y;if(w&&w[p]){y=u.VALUE_SETTERS[w[p].toLowerCase()];if(y){y(w,x);}else{w.value=x;}}},siblings:function(z,y){var w=[],x=z;while((x=x[q])){if(x[p]&&(!y||y(x))){w.unshift(x);}}x=z;while((x=x[t])){if(x[p]&&(!y||y(x))){w.push(x);}}return w;},_bruteContains:function(w,x){while(x){if(w===x){return true;}x=x.parentNode;}return false;},_getRegExp:function(x,w){w=w||"";u._regexCache=u._regexCache||{};if(!u._regexCache[x+w]){u._regexCache[x+w]=new RegExp(x,w);}return u._regexCache[x+w];},_getDoc:function(w){var x=h.config.doc;if(w){x=(w[n]===9)?w:w[r]||w.document||h.config.doc;}return x;},_getWin:function(w){var x=u._getDoc(w);return x[g]||x[l]||h.config.win;},_batch:function(w,F,C,B,A,y){F=(typeof F==="string")?u[F]:F;var G,E=Array.prototype.slice.call(arguments,2),z=0,x,D;if(F&&w){while((x=w[z++])){G=G=F.call(u,x,C,B,A,y);if(typeof G!=="undefined"){(D)||(D=[]);D.push(G);}}}return(typeof D!=="undefined")?D:w;},wrap:function(z,x){var y=h.DOM.create(x),w=y.getElementsByTagName("*");if(w.length){y=w[w.length-1];}if(z.parentNode){z.parentNode.replaceChild(y,z);}y.appendChild(z);},unwrap:function(z){var x=z.parentNode,y=x.lastChild,z=x.firstChild,w=z,A;if(x){A=x.parentNode;if(A){while(z!==y){w=z.nextSibling;A.insertBefore(z,x);z=w;}A.replaceChild(y,x);}else{x.removeChild(z);}}},creators:{}};(function(A){var B=u.creators,w=u.create,z=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*<tbody/,y="<table>",x="</table>";if(A.UA.ie){A.mix(B,{tbody:function(D,E){var F=w(y+D+x,E),C=F.children.tags("tbody")[0];if(F.children.length>1&&C&&!z.test(D)){C[j].removeChild(C);}return F;},script:function(C,D){var E=D.createElement("div");E.innerHTML="-"+C;E.removeChild(E[e]);return E;}},true);A.mix(u.VALUE_GETTERS,{button:function(C){return(C.attributes&&C.attributes.value)?C.attributes.value.value:"";}});A.mix(u.VALUE_SETTERS,{button:function(D,E){var C=D.attributes.value;if(!C){C=D[r].createAttribute("value");
D.setAttributeNode(C);}C.value=E;},select:function(F,G){for(var D=0,C=F.getElementsByTagName("option"),E;E=C[D++];){if(u.getValue(E)===G){u.setAttribute(E,"selected",true);break;}}}});u.creators.col=u.creators.link=u.creators.style=u.creators.script;}if(!i("<tr/>","TR")){A.mix(B,{option:function(C,D){return w('<select><option class="yui3-big-dummy" selected></option>'+C+"</select>",D);},tr:function(C,D){return w("<tbody>"+C+"</tbody>",D);},td:function(C,D){return w("<tr>"+C+"</tr>",D);},col:function(C,D){return w("<colgroup>"+C+"</colgroup>",D);},tbody:"table"});A.mix(B,{legend:"fieldset",th:B.td,thead:B.tbody,tfoot:B.tbody,caption:B.tbody,colgroup:B.tbody,optgroup:B.option});}A.mix(u.VALUE_GETTERS,{option:function(D){var C=D.attributes;return(C.value&&C.value.specified)?D.value:D.text;},select:function(D){var E=D.value,C=D.options;if(C&&C.length&&E===""){if(D.multiple){}else{E=u.getValue(C[D.selectedIndex]);}}return E;}});})(h);h.DOM=u;})(d);var b,a,c;d.mix(d.DOM,{hasClass:function(g,f){var e=d.DOM._getRegExp("(?:^|\\s+)"+f+"(?:\\s+|$)");return e.test(g.className);},addClass:function(f,e){if(!d.DOM.hasClass(f,e)){f.className=d.Lang.trim([f.className,e].join(" "));}},removeClass:function(f,e){if(e&&a(f,e)){f.className=d.Lang.trim(f.className.replace(d.DOM._getRegExp("(?:^|\\s+)"+e+"(?:\\s+|$)")," "));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;d.mix(d.DOM,{setWidth:function(f,e){d.DOM._setSize(f,"width",e);},setHeight:function(f,e){d.DOM._setSize(f,"height",e);},_setSize:function(f,h,g){g=(g>0)?g:0;var e=0;f.style[h]=g+"px";e=(h==="height")?f.offsetHeight:f.offsetWidth;if(e>g){g=g-(e-g);if(g<0){g=0;}f.style[h]=g+"px";}}});},"@VERSION@",{requires:["oop"]});YUI.add("dom-style",function(a){(function(e){var o="documentElement",b="defaultView",n="ownerDocument",h="style",i="float",q="cssFloat",r="styleFloat",k="transparent",d="getComputedStyle",c="getBoundingClientRect",g=e.config.doc,s=undefined,p=e.DOM,f="transform",l=["WebkitTransform","MozTransform","OTransform"],m=/color$/i,j=/width|height|top|left|right|bottom|margin|padding/i;e.Array.each(l,function(t){if(t in g[o].style){f=t;}});e.mix(p,{DEFAULT_UNIT:"px",CUSTOM_STYLES:{},setStyle:function(w,t,y,v){v=v||w.style;var u=p.CUSTOM_STYLES,x;if(v){if(y===null||y===""){y="";}else{if(!isNaN(new Number(y))&&j.test(t)){y+=p.DEFAULT_UNIT;}}if(t in u){if(u[t].set){u[t].set(w,y,v);return;}else{if(typeof u[t]==="string"){t=u[t];}}}v[t]=y;}},getStyle:function(w,t,v){v=v||w.style;var u=p.CUSTOM_STYLES,x="";if(v){if(t in u){if(u[t].get){return u[t].get(w,t,v);}else{if(typeof u[t]==="string"){t=u[t];}}}x=v[t];if(x===""){x=p[d](w,t);}}return x;},setStyles:function(u,v){var t=u.style;e.each(v,function(w,x){p.setStyle(u,x,w,t);},p);},getComputedStyle:function(u,t){var w="",v=u[n];if(u[h]&&v[b]&&v[b][d]){w=v[b][d](u,null)[t];}return w;}});if(g[o][h][q]!==s){p.CUSTOM_STYLES[i]=q;}else{if(g[o][h][r]!==s){p.CUSTOM_STYLES[i]=r;}}if(e.UA.opera){p[d]=function(v,u){var t=v[n][b],w=t[d](v,"")[u];if(m.test(u)){w=e.Color.toRGB(w);}return w;};}if(e.UA.webkit){p[d]=function(v,u){var t=v[n][b],w=t[d](v,"")[u];if(w==="rgba(0, 0, 0, 0)"){w=k;}return w;};}e.DOM._getAttrOffset=function(x,u){var z=e.DOM[d](x,u),w=x.offsetParent,t,v,y;if(z==="auto"){t=e.DOM.getStyle(x,"position");if(t==="static"||t==="relative"){z=0;}else{if(w&&w[c]){v=w[c]()[u];y=x[c]()[u];if(u==="left"||u==="top"){z=y-v;}else{z=v-x[c]()[u];}}}}return z;};e.DOM._getOffset=function(t){var v,u=null;if(t){v=p.getStyle(t,"position");u=[parseInt(p[d](t,"left"),10),parseInt(p[d](t,"top"),10)];if(isNaN(u[0])){u[0]=parseInt(p.getStyle(t,"left"),10);if(isNaN(u[0])){u[0]=(v==="relative")?0:t.offsetLeft||0;}}if(isNaN(u[1])){u[1]=parseInt(p.getStyle(t,"top"),10);if(isNaN(u[1])){u[1]=(v==="relative")?0:t.offsetTop||0;}}}return u;};p.CUSTOM_STYLES.transform={set:function(u,v,t){t[f]=v;},get:function(u,t){return p[d](u,f);}};})(a);(function(d){var b=parseInt,c=RegExp;d.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},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="rgb("+[b(c.$1,16),b(c.$2,16),b(c.$3,16)].join(", ")+")";}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<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};})(a);},"@VERSION@",{requires:["dom-base"]});YUI.add("dom-screen",function(a){(function(f){var d="documentElement",q="compatMode",o="position",c="fixed",m="relative",g="left",h="top",i="BackCompat",p="medium",e="borderLeftWidth",b="borderTopWidth",r="getBoundingClientRect",k="getComputedStyle",l=f.DOM,n=/^t(?:able|d|h)$/i,j;if(f.UA.ie){if(f.config.doc[q]!=="quirks"){j=d;}else{j="body";}}f.mix(l,{winHeight:function(t){var s=l._getWinSize(t).height;return s;},winWidth:function(t){var s=l._getWinSize(t).width;return s;},docHeight:function(t){var s=l._getDocSize(t).height;return Math.max(s,l._getWinSize(t).height);},docWidth:function(t){var s=l._getDocSize(t).width;return Math.max(s,l._getWinSize(t).width);},docScrollX:function(u,v){v=v||(u)?l._getDoc(u):f.config.doc;var t=v.defaultView,s=(t)?t.pageXOffset:0;return Math.max(v[d].scrollLeft,v.body.scrollLeft,s);},docScrollY:function(u,v){v=v||(u)?l._getDoc(u):f.config.doc;var t=v.defaultView,s=(t)?t.pageYOffset:0;return Math.max(v[d].scrollTop,v.body.scrollTop,s);},getXY:function(){if(f.config.doc[d][r]){return function(x){var E=null,y,u,z,C,B,t,w,A,D,s,v;
if(x&&x.tagName){D=x.ownerDocument;v=D[d];if(v.contains){s=v.contains(x);}else{s=f.DOM.contains(v,x);}if(s){y=(j)?D[j].scrollLeft:l.docScrollX(x,D);u=(j)?D[j].scrollTop:l.docScrollY(x,D);z=x[r]();E=[z.left,z.top];if(f.UA.ie){C=2;B=2;A=D[q];t=l[k](D[d],e);w=l[k](D[d],b);if(f.UA.ie===6){if(A!==i){C=0;B=0;}}if((A==i)){if(t!==p){C=parseInt(t,10);}if(w!==p){B=parseInt(w,10);}}E[0]-=C;E[1]-=B;}if((u||y)){if(!f.UA.ios){E[0]+=y;E[1]+=u;}}}else{E=l._getOffset(x);}}return E;};}else{return function(t){var w=null,v,s,y,u,x;if(t){if(l.inDoc(t)){w=[t.offsetLeft,t.offsetTop];v=t.ownerDocument;s=t;y=((f.UA.gecko||f.UA.webkit>519)?true:false);while((s=s.offsetParent)){w[0]+=s.offsetLeft;w[1]+=s.offsetTop;if(y){w=l._calcBorders(s,w);}}if(l.getStyle(t,o)!=c){s=t;while((s=s.parentNode)){u=s.scrollTop;x=s.scrollLeft;if(f.UA.gecko&&(l.getStyle(s,"overflow")!=="visible")){w=l._calcBorders(s,w);}if(u||x){w[0]-=x;w[1]-=u;}}w[0]+=l.docScrollX(t,v);w[1]+=l.docScrollY(t,v);}else{w[0]+=l.docScrollX(t,v);w[1]+=l.docScrollY(t,v);}}else{w=l._getOffset(t);}}return w;};}}(),getX:function(s){return l.getXY(s)[0];},getY:function(s){return l.getXY(s)[1];},setXY:function(t,w,z){var u=l.setStyle,y,x,s,v;if(t&&w){y=l.getStyle(t,o);x=l._getOffset(t);if(y=="static"){y=m;u(t,o,y);}v=l.getXY(t);if(w[0]!==null){u(t,g,w[0]-v[0]+x[0]+"px");}if(w[1]!==null){u(t,h,w[1]-v[1]+x[1]+"px");}if(!z){s=l.getXY(t);if(s[0]!==w[0]||s[1]!==w[1]){l.setXY(t,w,true);}}}else{}},setX:function(t,s){return l.setXY(t,[s,null]);},setY:function(s,t){return l.setXY(s,[null,t]);},swapXY:function(t,s){var u=l.getXY(t);l.setXY(t,l.getXY(s));l.setXY(s,u);},_calcBorders:function(v,w){var u=parseInt(l[k](v,b),10)||0,s=parseInt(l[k](v,e),10)||0;if(f.UA.gecko){if(n.test(v.tagName)){u=0;s=0;}}w[0]+=s;w[1]+=u;return w;},_getWinSize:function(v,y){y=y||(v)?l._getDoc(v):f.config.doc;var x=y.defaultView||y.parentWindow,z=y[q],u=x.innerHeight,t=x.innerWidth,s=y[d];if(z&&!f.UA.opera){if(z!="CSS1Compat"){s=y.body;}u=s.clientHeight;t=s.clientWidth;}return{height:u,width:t};},_getDocSize:function(t){var u=(t)?l._getDoc(t):f.config.doc,s=u[d];if(u[q]!="CSS1Compat"){s=u.body;}return{height:s.scrollHeight,width:s.scrollWidth};}});})(a);(function(g){var d="top",c="right",h="bottom",b="left",f=function(m,k){var o=Math.max(m[d],k[d]),p=Math.min(m[c],k[c]),i=Math.min(m[h],k[h]),j=Math.max(m[b],k[b]),n={};n[d]=o;n[c]=p;n[h]=i;n[b]=j;return n;},e=g.DOM;g.mix(e,{region:function(j){var k=e.getXY(j),i=false;if(j&&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={},p=i,o;if(p.tagName){l=e.region(p);}else{if(g.Lang.isObject(i)){l=i;}else{return false;}}o=f(l,j);return{top:o[d],right:o[c],bottom:o[h],left:o[b],area:((o[h]-o[d])*(o[c]-o[b])),yoff:((o[h]-o[d])),xoff:(o[c]-o[b]),inRegion:e.inRegion(k,i,false,m)};},inRegion:function(l,i,j,o){var m={},k=o||e.region(l),q=i,p;if(q.tagName){m=e.region(q);}else{if(g.Lang.isObject(i)){m=i;}else{return false;}}if(j){return(k[b]>=m[b]&&k[c]<=m[c]&&k[d]>=m[d]&&k[h]<=m[h]);}else{p=f(m,k);if(p[h]>=p[d]&&p[c]>=p[b]){return true;}else{return false;}}},inViewportRegion:function(j,i,k){return e.inRegion(j,e.viewportRegion(j),i,k);},_getRegion:function(k,m,i,j){var n={};n[d]=n[1]=k;n[b]=n[0]=j;n[h]=i;n[c]=m;n.width=n[c]-n[b];n.height=n[h]-n[d];return n;},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);},"@VERSION@",{requires:["dom-base","dom-style","event-base"]});YUI.add("selector-native",function(a){(function(e){e.namespace("Selector");var c="compareDocumentPosition",d="ownerDocument";var b={_foundCache:[],useNative:true,_compare:("sourceIndex" in e.config.doc.documentElement)?function(i,h){var g=i.sourceIndex,f=h.sourceIndex;if(g===f){return 0;}else{if(g>f){return 1;}}return -1;}:(e.config.doc.documentElement[c]?function(g,f){if(g[c](f)&4){return -1;}else{return 1;}}:function(j,i){var h,f,g;if(j&&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,j;for(h=0;(j=f[h++]);){if(!j._found){g[g.length]=j;j._found=true;}}for(h=0;(j=g[h++]);){j._found=null;j.removeAttribute("_found");}return g;},query:function(g,o,p,f){o=o||e.config.doc;var l=[],h=(e.Selector.useNative&&e.config.doc.querySelector&&!f),k=[[g,o]],m,q,j,n=(h)?e.Selector._nativeQuery:e.Selector._bruteQuery;if(g&&n){if(!f&&(!h||o.tagName)){k=b._splitQueries(g,o);}for(j=0;(m=k[j++]);){q=n(m[0],m[1],p);if(!p){q=e.Array(q,0,true);}if(q){l=l.concat(q);}}if(k.length>1){l=b._sort(b._deDupe(l));}}return(p)?(l[0]||null):l;},_splitQueries:function(h,l){var g=h.split(","),j=[],m="",k,f;if(l){if(l.tagName){l.id=l.id||e.guid();m='[id="'+l.id+'"] ';}for(k=0,f=g.length;k<f;++k){h=m+g[k];j.push([h,l]);}}return j;},_nativeQuery:function(f,g,h){if(e.UA.webkit&&f.indexOf(":checked")>-1&&(e.Selector.pseudos&&e.Selector.pseudos.checked)){return e.Selector.query(f,g,h,true);}try{return g["querySelector"+(h?"":"All")](f);}catch(i){return e.Selector.query(f,g,h,true);}},filter:function(g,f){var h=[],j,k;if(g&&f){for(j=0;(k=g[j++]);){if(e.Selector.test(k,f)){h[h.length]=k;}}}else{}return h;},test:function(h,k,p){var n=false,g=k.split(","),f=false,q,t,o,s,m,l,r;if(h&&h.tagName){if(!p&&!e.DOM.inDoc(h)){q=h.parentNode;if(q){p=q;}else{s=h[d].createDocumentFragment();s.appendChild(h);p=s;f=true;}}p=p||h[d];if(!h.id){h.id=e.guid();}for(m=0;(r=g[m++]);){r+='[id="'+h.id+'"]';o=e.Selector.query(r,p);for(l=0;t=o[l++];){if(t===h){n=true;break;}}if(n){break;}}if(f){s.removeChild(h);}}return n;},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);},"@VERSION@",{requires:["dom-base"]});YUI.add("selector-css2",function(g){var h="parentNode",d="tagName",e="attributes",a="combinator",f="pseudos",c=g.Selector,b={_reRegExpTokens:/([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,SORT_RESULTS:true,_children:function(n,j){var k=n.children,m,l=[],o,p;
if(n.children&&j&&n.children.tags){l=n.children.tags(j);}else{if((!k&&n[d])||(k&&j)){o=k||n.childNodes;k=[];for(m=0;(p=o[m++]);){if(p.tagName){if(!j||j===p.tagName){k.push(p);}}}}}return k||[];},_re:{attr:/(\[[^\]]*\])/g,pseudos:/:([\-\w]+(?:\(?:['"]?(.+)['"]?\)))*/i},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[className~=$1]"},operators:{"":function(j,i){return g.DOM.getAttribute(j,i)!=="";},"~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(i){return g.Selector._children(i[h])[0]===i;}},_bruteQuery:function(n,r,t){var o=[],i=[],q=c._tokenize(n),m=q[q.length-1],s=g.DOM._getDoc(r),k,j,p,l;if(m){j=m.id;p=m.className;l=m.tagName||"*";if(r.getElementsByTagName){if(j&&(r.all||(r.nodeType===9||g.DOM.inDoc(r)))){i=g.DOM.allById(j,r);}else{if(p){i=r.getElementsByClassName(p);}else{i=r.getElementsByTagName(l);}}}else{k=r.firstChild;while(k){if(k.tagName){i.push(k);}k=k.nextSilbing||k.firstChild;}}if(i.length){o=c._filterNodes(i,q,t);}}return o;},_filterNodes:function(u,q,s){var z=0,y,A=q.length,t=A-1,p=[],w=u[0],D=w,B=g.Selector.getters,o,x,m,r,k,v,l,C;for(z=0;(D=w=u[z++]);){t=A-1;r=null;testLoop:while(D&&D.tagName){m=q[t];l=m.tests;y=l.length;if(y&&!k){while((C=l[--y])){o=C[1];if(B[C[0]]){v=B[C[0]](D,C[0]);}else{v=D[C[0]];if(v===undefined&&D.getAttribute){v=D.getAttribute(C[0]);}}if((o==="="&&v!==C[2])||(typeof o!=="string"&&o.test&&!o.test(v))||(!o.test&&typeof o==="function"&&!o(D,C[0]))){if((D=D[r])){while(D&&(!D.tagName||(m.tagName&&m.tagName!==D.tagName))){D=D[r];}}continue testLoop;}}}t--;if(!k&&(x=m.combinator)){r=x.axis;D=D[r];while(D&&!D.tagName){D=D[r];}if(x.direct){r=null;}}else{p.push(w);if(s){return p;}break;}}}w=D=null;return p;},combinators:{" ":{axis:"parentNode"},">":{axis:"parentNode",direct:true},"+":{axis:"previousSibling",direct:true}},_parsers:[{name:e,re:/^\[(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,fn:function(k,l){var j=k[2]||"",i=g.Selector.operators,m;if((k[1]==="id"&&j==="=")||(k[1]==="className"&&g.config.doc.documentElement.getElementsByClassName&&(j==="~="||j==="="))){l.prefilter=k[1];l[k[1]]=k[3];}if(j in i){m=i[j];if(typeof m==="string"){k[3]=k[3].replace(g.Selector._reRegExpTokens,"\\$1");m=g.DOM._getRegExp(m.replace("{val}",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!=="*"&&(!k.last||k.prefilter)){return[d,"=",i];}if(!k.prefilter){k.prefilter="tagName";}}},{name:a,re:/^\s*([>+~]|\s)\s*/,fn:function(i,j){}},{name:f,re:/^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/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(l){l=l||"";l=c._replaceShorthand(g.Lang.trim(l));var k=c._getToken(),q=l,p=[],r=false,n,o,m,j;outer:do{r=false;for(m=0;(j=c._parsers[m++]);){if((n=j.re.exec(l))){if(j.name!==a){k.selector=l;}l=l.replace(n[0],"");if(!l.length){k.last=true;}if(c._attrFilters[n[1]]){n[1]=c._attrFilters[n[1]];}o=j.fn(n,k);if(o===false){r=false;break outer;}else{if(o){k.tests.push(o);}}if(!l.length||j.name===a){p.push(k);k=c._getToken(k);if(j.name===a){k.combinator=g.Selector.combinators[n[1]];}}r=true;}}}while(r&&l.length);if(!r||l.length){p=[];}return p;},_replaceShorthand:function(k){var l=c.shorthand,m=k.match(c._re.attr),p=k.match(c._re.pseudos),o,n,j;if(p){k=k.replace(c._re.pseudos,"!!REPLACED_PSEUDO!!");}if(m){k=k.replace(c._re.attr,"!!REPLACED_ATTRIBUTE!!");}for(o in l){if(l.hasOwnProperty(o)){k=k.replace(g.DOM._getRegExp(o,"gi"),l[o]);}}if(m){for(n=0,j=m.length;n<j;++n){k=k.replace("!!REPLACED_ATTRIBUTE!!",m[n]);}}if(p){for(n=0,j=p.length;n<j;++n){k=k.replace("!!REPLACED_PSEUDO!!",p[n]);}}return k;},_attrFilters:{"class":"className","for":"htmlFor"},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&&g.config.doc.querySelector){g.Selector.shorthand["\\.(-?[_a-z]+[-\\w]*)"]="[class~=$1]";}},"@VERSION@",{requires:["selector-native"]});YUI.add("selector",function(a){},"@VERSION@",{use:["selector-native","selector-css2"]});YUI.add("dom",function(a){},"@VERSION@",{use:["dom-base","dom-style","dom-screen","selector"]});