microformat-shiv.js
function( document ){
			var newNode,
				newDocument = null;

			if( this.canCloneDocument( document )){
				newDocument = document.implementation.createHTMLDocument('');
				newNode = newDocument.importNode( document.documentElement, true );
				newDocument.replaceChild(newNode, newDocument.querySelector('html'));
			}
			return (newNode && newNode.nodeType && newNode.nodeType === 1)? newDocument : document;
		}
function( document ){
			var newNode,
				newDocument = null;

			if( this.canCloneDocument( document )){
				newDocument = document.implementation.createHTMLDocument('');
				newNode = newDocument.importNode( document.documentElement, true );
				newDocument.replaceChild(newNode, newDocument.querySelector('html'));
			}
			return (newNode && newNode.nodeType && newNode.nodeType === 1)? newDocument : document;
		}
function ( document ) { var newNode , newDocument = null ; if ( this . canCloneDocument ( document ) ) { newDocument = document . implementation . createHTMLDocument ( '' ) ; newNode = newDocument . importNode ( document . documentElement , true ) ; newDocument . replaceChild ( newNode , newDocument . querySelector ( 'html' ) ) ; } return ( newNode && newNode . nodeType && newNode . nodeType === 1 ) ? newDocument : document ; }
clones a DOM document

@param  {DOM Document} document
@return {DOM Document}
clones a DOM document