YUI.add("aui-node-html5",function(e,t){if(e.UA.ie){var n=e.namespace("HTML5"),r=e.DOM._create;n._fragHTML5Shived||(n._fragHTML5Shived=e.html5shiv(e.config.doc.createDocumentFragment())),e.mix(n,{IECreateFix:function(e,t){var r=n._fragHTML5Shived;return r.appendChild(e),e.innerHTML=t,r.removeChild(e),e},_doBeforeCreate:function(t,i,s){var o=r.apply(this,arguments),u=n.IECreateFix(o,t);return new e.Do.Halt(null,u)}}),e.Do.before(n._doBeforeCreate,e.DOM,"_create",e.DOM)}var i=e.config,s=i.doc,o=i.win,u=e.UA,a=u.ie,f=function(){return o.AUI_HTML5_IE===!1};if(!a||a>=9||f())return;var l=[],c="printfix",h="printfix-",p=o.location,d=p.protocol+"//"+p.host,v=s.documentElement,m=e.HTML5_ELEMENTS,g=m.length,y=m.join("|"),b=new RegExp("<(/?):("+y+")","gi"),w=new RegExp("("+y+")","gi"),E=new RegExp("\\b("+y+")\\b","i"),S=/print|all/,x=new RegExp("(^|[^\\n{}]*?\\s)("+y+").*?{([^}]*)}","gim"),T=new RegExp("<(/*)("+y+")","gi"),N="."+h+"$1",C="all",k=" ",L="",A="{",O="}",M="checkbox",_="checked",D="https",P="INPUT",H="OPTION",B="radio",j="selected",F="*",I="url(",q=I+d,R="<$1$2",U="<$1font",z=e.html5shiv,W=function(e){return e&&e+L!==undefined},X=function(e,t,n){var r=t[n];r?e.setAttribute(n,r):e.removeAttribute(n)};z(s);var V=function(){var e=function(){f()?n():V.onAfterPrint()},t=function(){f()?n():V.onBeforePrint()},n=function(){o.detachEvent("onafterprint",e),o.detachEvent("onbeforeprint",t)},r=function(){o.attachEvent("onafterprint",e),o.attachEvent("onbeforeprint",t)};r(),V.destroy=n,V.init=r};e.mix(V,{onAfterPrint:function(){var e=this;e.restoreHTML();var t=e._getStyleSheet();t.styleSheet.cssText=L},onBeforePrint:function(){var e=this,t=e._getStyleSheet(),n=e._getAllCSSText();t.styleSheet.cssText=e.parseCSS(n),e.writeHTML()},parseCSS:function(e){var t=this,n=L,r=e.match(x);return r&&(n=r.join("\n").replace(w,N)),n},restoreHTML:function(){var e=this,t=e._getBodyClone(),n=e._getBodyEl();t.innerHTML=L,v.removeChild(t),v.appendChild(n)},writeHTML:function(){var e=this,t=-1,n,r=e._getBodyEl(),i,o,a,f,l,c=[];while(++t<g){i=m[t],a=s.getElementsByTagName(i),f=a.length,n=-1;while(++n<f)l=a[n],o=l.className,o.indexOf(h)==-1&&(c[0]=h+i,c[1]=o,l.className=c.join(k))}var p=e._getDocFrag(),d=e._getBodyClone();p.appendChild(r),v.appendChild(d),d.className=r.className,d.id=r.id;var y=r.getElementsByTagName(F),w=y.length;if(u.secure){var E=r.style,S,x;E.display="none";for(t=0;t<w;t++)S=y[t].style,x=S.backgroundImage,x&&x.indexOf(I)>-1&&x.indexOf(D)==-1&&(S.backgroundImage=x.replace(I,q));E.display=L}var N=r.cloneNode(!0),C=N.getElementsByTagName(F);if(w==C.length)while(w--){var A=C[w],O=A.nodeName;if(O==P||O==H){var z=y[w],W=z.nodeName;if(W==O){var V=null;O==H?V=j:O==P&&(A.type==M||A.type==B)&&(V=_),V!==null&&X(A,z,V)}}}var $=N.innerHTML;$=$.replace(b,R).replace(T,U),d.innerHTML=$},_getAllCSSText:function(){var e=this,t=[],n=e._getAllStyleSheets(s.styleSheets,C),r,i;for(var o=0;styleSheet=n[o];o++){var u=styleSheet.rules;if(u&&u.length)for(var a=0,f=u.length;a<f;a++)r=u[a],r.href||(i=e._getCSSTextFromRule(r),t.push(i))}return t.join(k)},_getCSSTextFromRule:function(e){var t=this,n=L,r=e.style,i,s;return r&&(i=r.cssText)&&(s=e.selectorText)&&E.test(s)&&(l.length=0,l.push(s,A,i,O),n=l.join(k)),n},_getAllStyleSheets:function(e,t,n,r){var i=this;n=n||1,r=r||[];var s;if(W(e)){var o=e.imports;t=e.mediaType||t;if(S.test(t)){var u;if(n<=3&&W(o)&&o.length)for(s=0,u=o.length;s<u;s++)i._getAllStyleSheets(o[s],t,n+1,r);else if(e.length)for(s=0,u=e.length;s<u;s++)i._getAllStyleSheets(e[s],t,n,r);else{var a=e.rules,f;if(a&&a.length)for(s=0,u=a.length;s<u;s++)f=a[s].styleSheet,f&&i._getAllStyleSheets(f,t,n,r)}!e.disabled&&e.rules&&r.push(e)}}return t=C,r},_getBodyEl:function(){var e=this,t=e._bodyEl;return t||(t=s.body,e._bodyEl=t),t},_getBodyClone:function(){var e=this,t=e._bodyClone;return t||(t=s.createElement("body"),e._bodyClone=t),t},_getDocFrag:function(){var e=this,t=e._docFrag;return t||(t=s.createDocumentFragment(),z(t),e._docFrag=t),t},_getStyleSheet:function(){var e=this,t=e._styleSheet;if(!t){t=s.createElement("style");var n=s.documentElement.firstChild;n.insertBefore(t,n.firstChild),t.media="print",t.className=c,e._styleSheet=t}return t}}),e.namespace("HTML5").PrintFix=V,V()},"2.0.0",{requires:["collection","aui-node-base"]});
