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="IFRAME",H="INPUT",B="OPTION",j="radio",F="selected",I="*",q="url(",R=q+d,U="<$1$2",z="<$1font",W=e.html5shiv,X=function(e){return e&&e+L!==undefined},V=function(e,t,n){var r=t[n];r?e.setAttribute(n,r):e.removeAttribute(n)};W(s);var $=function(){var e=function(){f()?n():$.onAfterPrint()},t=function(){f()?n():$.onBeforePrint()},n=function(){o.detachEvent("onafterprint",e),o.detachEvent("onbeforeprint",t)},r=function(){o.attachEvent("onafterprint",e),o.attachEvent("onbeforeprint",t)};r(),$.destroy=n,$.init=r};e.mix($,{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(),r=t.getElementsByTagName(P),i=n.getElementsByTagName(P),s=i.length;if(s===r.length)while(s--){var o=r[s],u=i[s];u.swapNode(o)}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(I),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(q)>-1&&x.indexOf(D)==-1&&(S.backgroundImage=x.replace(q,R));E.display=L}var N=r.cloneNode(!0),C=N.getElementsByTagName(I);if(w==C.length)while(w--){var A=C[w],O=A.nodeName;if(O==H||O==B||O===P){var W=y[w],X=W.nodeName;if(X==O){var $=null;O==B?$=F:O!=H||A.type!=M&&A.type!=j?O===P&&(A.src=L):$=_,$!==null&&V(A,W,$)}}}var J=N.innerHTML;J=J.replace(b,U).replace(T,z),d.innerHTML=J,C=d.getElementsByTagName(P),y=r.getElementsByTagName(P),w=y.length;if(w===C.length)while(w--){var K=C[w],Q=y[w];Q.swapNode(K)}},_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(X(e)){var o=e.imports;t=e.mediaType||t;if(S.test(t)){var u;if(n<=3&&X(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(),W(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=$,$()},"2.0.0",{requires:["collection","aui-node-base"]});
