// http://jdbartlett.github.com/innershiv | WTFPL License
window.innerShiv=function(){function i(c,e,b){return g.test(b)?c:e+"></"+b+">"}function f(d,f){if(!c){c=document.createElement("div");var b=c.cloneNode(!1);b.innerHTML="<nav></nav>";if(e=b.childNodes.length!==1)c.style.display="none"}d=d.replace(/^\s\s*/,"").replace(/\s\s*$/,"").replace(j,"").replace(k,i);(b=d.match(l))&&(d="<table>"+d+"</table>");e&&document.body.appendChild(c);c.innerHTML=d;e&&document.body.removeChild(c);b=b?c.getElementsByTagName(b[1])[0].parentNode:c;if(f===!1)return b.childNodes;for(var h=
document.createDocumentFragment(),g=b.childNodes.length;g--;)h.appendChild(b.firstChild);return h}var c,e,l=/^<(tbody|tr|td|col|colgroup|thead|tfoot)/i,k=/(<([\w:]+)[^>]*?)\/>/g,g=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,j=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;f.b=!0;return f}();
