Difference between revisions of "Team:Penn"

Line 1: Line 1:
 
{{Penn}}
 
{{Penn}}
<html xmlns="http://www.w3.org/1999/xhtml">
+
/*! HTML5 Shiv vpre3.6 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */
<head>
+
;(function(window, document) {
<title>BusinessToday | Style Demo</title>
+
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+
  /** Preset options */
</head>
+
  var options = window.html5 || {};
<div id="wrap">
+
 
<body id="top">
+
  /** Used to skip problem elements */
<div class="wrapper col1">
+
  var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
   <div id="header">
+
 
    <div id="logo">
+
   /** Not all elements can be cloned in IE (this list can be shortend) **/
      <h1><a href="#">BusinessToday</a></h1>
+
  var saveClones = /^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i;
      <p><strong>Free Website Template</strong></p>
+
 
    </div>
+
  /** Detect whether the browser supports default html5 styles */
    <div id="newsletter">
+
  var supportsHtml5Styles;
      <p>Sign up to our newsletter for the latest news, updates and offers.</p>
+
 
      <form action="#" method="post">
+
  /** Name of the expando, to work with multiple documents or to re-shiv one document */
        <fieldset>
+
  var expando = '_html5shiv';
          <legend>NewsLetter</legend>
+
 
          <input type="text" value="Name&hellip;"  onfocus="this.value=(this.value=='Name&hellip;')? '' : this.value ;" />
+
  /** The id for the the documents expando */
          <input type="text" value="Email&hellip;"  onfocus="this.value=(this.value=='Email&hellip;')? '' : this.value ;" />
+
  var expanID = 0;
          <input type="submit" name="news_go" id="news_go" value="Sign Up" />
+
 
        </fieldset>
+
  /** Cached data for each document */
      </form>
+
  var expandoData = {};
    </div>
+
 
    <br class="clear" />
+
   /** Detect whether the browser supports unknown elements */
   </div>
+
  var supportsUnknownElements;
</div>
+
 
<div class="wrapper col2">
+
   (function() {
   <div id="topbar">
+
     var a = document.createElement('a');
     <div id="topnav">
+
 
      <ul>
+
    a.innerHTML = '<xyz></xyz>';
        <li><a href="../index.html">Home</a></li>
+
 
        <li class="active"><a href="style-demo.html">Style Demo</a></li>
+
    //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
        <li><a href="full-width.html">Full Width</a></li>
+
    supportsHtml5Styles = ('hidden' in a);
        <li><a href="#">DropDown</a>
+
 
          <ul>
+
    supportsUnknownElements = a.childNodes.length == 1 || (function() {
            <li><a href="#">Link 1</a></li>
+
       // assign a false positive if unable to shiv
            <li><a href="#">Link 2</a></li>
+
       try {
            <li><a href="#">Link 3</a></li>
+
         (document.createElement)('a');
          </ul>
+
      } catch(e) {
        </li>
+
         return true;
        <li class="last"><a href="#">A Long Link Text</a></li>
+
       }
       </ul>
+
      var frag = document.createDocumentFragment();
    </div>
+
      return (
    <div id="search">
+
        typeof frag.cloneNode == 'undefined' ||
       <form action="#" method="post">
+
        typeof frag.createDocumentFragment == 'undefined' ||
         <fieldset>
+
        typeof frag.createElement == 'undefined'
          <legend>Site Search</legend>
+
       );
          <input type="text" value="Search Our Website&hellip;"  onfocus="this.value=(this.value=='Search Our Website&hellip;')? '' : this.value ;" />
+
    }());
          <input type="submit" name="go" id="go" value="Search" />
+
 
         </fieldset>
+
  }());
       </form>
+
 
    </div>
+
  /*--------------------------------------------------------------------------*/
    <br class="clear" />
+
 
  </div>
+
   /**
</div>
+
  * Creates a style sheet with the given CSS text and adds it to the document.
<div class="wrapper col3">
+
  * @private
  <div id="breadcrumb">
+
  * @param {Document} ownerDocument The document.
    <ul>
+
  * @param {String} cssText The CSS text.
      <li class="first">You Are Here</li>
+
  * @returns {StyleSheet} The style element.
       <li>&#187;</li>
+
  */
      <li><a href="#">Home</a></li>
+
  function addStyleSheet(ownerDocument, cssText) {
      <li>&#187;</li>
+
    var p = ownerDocument.createElement('p'),
      <li><a href="#">Grand Parent</a></li>
+
        parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
      <li>&#187;</li>
+
 
      <li><a href="#">Parent</a></li>
+
    p.innerHTML = 'x<style>' + cssText + '</style>';
      <li>&#187;</li>
+
    return parent.insertBefore(p.lastChild, parent.firstChild);
      <li class="current"><a href="#">Child</a></li>
+
  }
    </ul>
+
 
   </div>
+
  /**
</div>
+
  * Returns the value of `html5.elements` as an array.
<div class="wrapper col5">
+
  * @private
  <div id="container">
+
  * @returns {Array} An array of shived element node names.
    <div id="content">
+
  */
      <h1>&lt;h1&gt; to &lt;h6&gt; - Headline Colour and Size Are All The Same</h1>
+
  function getElements() {
      <img class="imgr" src="../images/demo/imgr.gif" alt="" width="125" height="125" />
+
    var elements = html5.elements;
      <p>Aliquatjusto quisque nam consequat doloreet vest orna partur scetur portortis nam. Metadipiscing eget facilis elit sagittis felisi eger id justo maurisus convallicitur.</p>
+
    return typeof elements == 'string' ? elements.split(' ') : elements;
      <p>Dapiensociis <a href="#">temper donec auctortortis cumsan</a> et curabitur condis lorem loborttis leo. Ipsumcommodo libero nunc at in velis tincidunt pellentum tincidunt vel lorem.</p>
+
  }
      <img class="imgl" src="../images/demo/imgl.gif" alt="" width="125" height="125" />
+
 
      <p>This is a W3C compliant free website template from <a href="http://www.os-templates.com/" title="Free Website Templates">OS Templates</a>. This template is distributed using a <a href="http://www.os-templates.com/template-terms">Website Template Licence</a>.</p>
+
    /**
      <p>You can use and modify the template for both personal and commercial use. You must keep all copyright information and credit links in the template and associated files. For more CSS templates visit <a href="http://www.os-templates.com/">Free Website Templates</a>.</p>
+
  * Returns the data associated to the given document
      <p>Portortornec condimenterdum eget consectetuer condis consequam pretium pellus sed mauris enim. Puruselit mauris nulla hendimentesque elit semper nam a sapien urna sempus.</p>
+
  * @private
      <h2>Table(s)</h2>
+
  * @param {Document} ownerDocument The document.
      <table summary="Summary Here" cellpadding="0" cellspacing="0">
+
  * @returns {Object} An object of data.
        <thead>
+
  */
          <tr>
+
  function getExpandoData(ownerDocument) {
            <th>Header 1</th>
+
    var data = expandoData[ownerDocument[expando]];
            <th>Header 2</th>
+
    if (!data) {
            <th>Header 3</th>
+
        data = {};
            <th>Header 4</th>
+
        expanID++;
          </tr>
+
        ownerDocument[expando] = expanID;
        </thead>
+
        expandoData[expanID] = data;
        <tbody>
+
    }
          <tr class="light">
+
    return data;
            <td>Value 1</td>
+
  }
            <td>Value 2</td>
+
 
            <td>Value 3</td>
+
  /**
            <td>Value 4</td>
+
  * returns a shived element for the given nodeName and document
          </tr>
+
  * @memberOf html5
          <tr class="dark">
+
  * @param {String} nodeName name of the element
            <td>Value 5</td>
+
  * @param {Document} ownerDocument The context document.
            <td>Value 6</td>
+
  * @returns {Object} The shived element.
            <td>Value 7</td>
+
  */
            <td>Value 8</td>
+
  function createElement(nodeName, ownerDocument, data){
          </tr>
+
    if (!ownerDocument) {
          <tr class="light">
+
        ownerDocument = document;
            <td>Value 9</td>
+
    }
            <td>Value 10</td>
+
    if(supportsUnknownElements){
            <td>Value 11</td>
+
         return ownerDocument.createElement(nodeName);
            <td>Value 12</td>
+
    }
          </tr>
+
    data = data || getExpandoData(ownerDocument);
          <tr class="dark">
+
    var node;
            <td>Value 13</td>
+
 
            <td>Value 14</td>
+
    if (data.cache[nodeName]) {
            <td>Value 15</td>
+
        node = data.cache[nodeName].cloneNode();
            <td>Value 16</td>
+
    } else if (saveClones.test(nodeName)) {
          </tr>
+
        node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
         </tbody>
+
    } else {
      </table>
+
        node = data.createElem(nodeName);
      <div id="comments">
+
    }
        <h2>Comments</h2>
+
 
        <ul class="commentlist">
+
    // Avoid adding some elements to fragments in IE < 9 because
          <li class="comment_odd">
+
    // * Attributes like `name` or `type` cannot be set/changed once an element
            <div class="author"><img class="avatar" src="../images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name"><a href="#">A Name</a></span> <span class="wrote">wrote:</span></div>
+
    //  is inserted into a document/fragment
            <div class="submitdate"><a href="#">August 4, 2009 at 8:35 am</a></div>
+
    // * Link elements with `src` attributes that are inaccessible, as with
            <p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
+
    //   a 403 response, will cause the tab/window to crash
          </li>
+
    // * Script elements appended to fragments will execute when their `src`
          <li class="comment_even">
+
    //  or `text` property is set
            <div class="author"><img class="avatar" src="../images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name"><a href="#">A Name</a></span> <span class="wrote">wrote:</span></div>
+
    return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
            <div class="submitdate"><a href="#">August 4, 2009 at 8:35 am</a></div>
+
  }
            <p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
+
 
          </li>
+
  /**
          <li class="comment_odd">
+
  * returns a shived DocumentFragment for the given document
            <div class="author"><img class="avatar" src="../images/demo/avatar.gif" width="32" height="32" alt="" /><span class="name"><a href="#">A Name</a></span> <span class="wrote">wrote:</span></div>
+
  * @memberOf html5
            <div class="submitdate"><a href="#">August 4, 2009 at 8:35 am</a></div>
+
  * @param {Document} ownerDocument The context document.
            <p>This is an example of a comment made on a post. You can either edit the comment, delete the comment or reply to the comment. Use this as a place to respond to the post or to share what you are thinking.</p>
+
  * @returns {Object} The shived DocumentFragment.
          </li>
+
  */
         </ul>
+
  function createDocumentFragment(ownerDocument, data){
      </div>
+
    if (!ownerDocument) {
      <h2>Write A Comment</h2>
+
         ownerDocument = document;
      <div id="respond">
+
    }
         <form action="#" method="post">
+
    if(supportsUnknownElements){
          <p>
+
         return ownerDocument.createDocumentFragment();
            <input type="text" name="name" id="name" value="" size="22" />
+
    }
            <label for="name"><small>Name (required)</small></label>
+
    data = data || getExpandoData(ownerDocument);
          </p>
+
    var clone = data.frag.cloneNode(),
          <p>
+
        i = 0,
            <input type="text" name="email" id="email" value="" size="22" />
+
        elems = getElements(),
            <label for="email"><small>Mail (required)</small></label>
+
        l = elems.length;
          </p>
+
    for(;i<l;i++){
          <p>
+
        clone.createElement(elems[i]);
            <textarea name="comment" id="comment" cols="100%" rows="10"></textarea>
+
    }
            <label for="comment" style="display:none;"><small>Comment (required)</small></label>
+
    return clone;
          </p>
+
  }
          <p>
+
 
            <input name="submit" type="submit" id="submit" value="Submit Form" />
+
  /**
            &nbsp;
+
  * Shivs the `createElement` and `createDocumentFragment` methods of the document.
            <input name="reset" type="reset" id="reset" tabindex="5" value="Reset Form" />
+
  * @private
          </p>
+
  * @param {Document|DocumentFragment} ownerDocument The document.
        </form>
+
  * @param {Object} data of the document.
      </div>
+
  */
    </div>
+
  function shivMethods(ownerDocument, data) {
     <div id="column">
+
     if (!data.cache) {
      <div class="subnav">
+
        data.cache = {};
         <h2>Secondary Navigation</h2>
+
         data.createElem = ownerDocument.createElement;
         <ul>
+
         data.createFrag = ownerDocument.createDocumentFragment;
          <li><a href="#">Navigation - Level 1</a></li>
+
        data.frag = data.createFrag();
          <li><a href="#">Navigation - Level 1</a>
+
    }
            <ul>
+
 
              <li><a href="#">Navigation - Level 2</a></li>
+
 
              <li><a href="#">Navigation - Level 2</a></li>
+
    ownerDocument.createElement = function(nodeName) {
            </ul>
+
      //abort shiv
           </li>
+
      if (!html5.shivMethods) {
          <li><a href="#">Navigation - Level 1</a>
+
           return data.createElem(nodeName);
            <ul>
+
      }
              <li><a href="#">Navigation - Level 2</a></li>
+
      return createElement(nodeName);
              <li><a href="#">Navigation - Level 2</a>
+
    };
                <ul>
+
 
                  <li><a href="#">Navigation - Level 3</a></li>
+
    ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
                  <li><a href="#">Navigation - Level 3</a></li>
+
      'var n=f.cloneNode(),c=n.createElement;' +
                </ul>
+
      'h.shivMethods&&(' +
              </li>
+
         // unroll the `createElement` calls
            </ul>
+
         getElements().join().replace(/\w+/g, function(nodeName) {
          </li>
+
          data.createElem(nodeName);
          <li><a href="#">Navigation - Level 1</a></li>
+
          data.frag.createElement(nodeName);
         </ul>
+
          return 'c("' + nodeName + '")';
      </div>
+
        }) +
      <div class="holder">
+
       ');return n}'
         <h2 class="title"><img src="../images/demo/60x60.gif" alt="" />Nullamlacus dui ipsum conseque loborttis</h2>
+
    )(html5, data.frag);
        <p>Nullamlacus dui ipsum conseque loborttis non euisque morbi penas dapibulum orna. Urnaultrices quis curabitur phasellentesque.</p>
+
  }
        <p class="readmore"><a href="#">Continue Reading &raquo;</a></p>
+
 
      </div>
+
  /*--------------------------------------------------------------------------*/
       <div id="featured">
+
 
        <ul>
+
  /**
          <li>
+
  * Shivs the given document.
            <h2>Indonectetus facilis leonib</h2>
+
  * @memberOf html5
            <p class="imgholder"><img src="../images/demo/240x90.gif" alt="" /></p>
+
  * @param {Document} ownerDocument The document to shiv.
            <p>Nullamlacus dui ipsum conseque loborttis non euisque morbi penas dapibulum orna. Urnaultrices quis curabitur phasellentesque congue magnis vestibulum quismodo nulla et feugiat. Adipisciniapellentum leo ut consequam ris felit elit id nibh sociis malesuada.</p>
+
  * @returns {Document} The shived document.
            <p class="readmore"><a href="#">Continue Reading &raquo;</a></p>
+
  */
          </li>
+
  function shivDocument(ownerDocument) {
         </ul>
+
    if (!ownerDocument) {
      </div>
+
         ownerDocument = document;
      <div class="holder">
+
    }
        <h2>Lorem ipsum dolor</h2>
+
    var data = getExpandoData(ownerDocument);
        <p>Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed.</p>
+
 
         <ul>
+
    if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
          <li><a href="#">Lorem ipsum dolor sit</a></li>
+
      data.hasCSS = !!addStyleSheet(ownerDocument,
          <li>Etiam vel sapien et</li>
+
         // corrects block display not defined in IE6/7/8/9
          <li><a href="#">Etiam vel sapien et</a></li>
+
         'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
         </ul>
+
         // adds styling not present in IE6/7/8/9
         <p>Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed. Condimentumsantincidunt dui mattis magna intesque purus orci augue lor nibh.</p>
+
         'mark{background:#FF0;color:#000}'
         <p class="readmore"><a href="#">Continue Reading &raquo;</a></p>
+
       );
       </div>
+
     }
     </div>
+
     if (!supportsUnknownElements) {
     <div class="clear"></div>
+
      shivMethods(ownerDocument, data);
  </div>
+
    }
</div>
+
    return ownerDocument;
<div class="wrapper col6">
+
   }
   <div id="footer">
+
 
    <div id="login">
+
  /*--------------------------------------------------------------------------*/
      <h2>Client Login !</h2>
+
 
      <p>Clients can Login to their accounts here.</p>
+
  /**
      <form action="#" method="post">
+
  * The `html5` object is exposed so that more elements can be shived and
        <fieldset>
+
  * existing shiving can be detected on iframes.
          <legend>Client Login</legend>
+
  * @type Object
          <div class="fl_left">
+
  * @example
            <input type="text" value="Enter email address&hellip;"  onfocus="this.value=(this.value=='Enter email address&hellip;')? '' : this.value ;" />
+
  *
            <input type="password" value="Enter password&hellip;"  onfocus="this.value=(this.value=='Enter password&hellip;')? '' : this.value ;" />
+
  * // options can be changed before the script is included
          </div>
+
  * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
          <div class="fl_right">
+
  */
            <input type="submit" name="login_go" id="login_go" value="&raquo;" />
+
  var html5 = {
          </div>
+
 
        </fieldset>
+
    /**
      </form>
+
    * An array or space separated string of node names of the elements to shiv.
      <p><a href="#">&raquo; Lost Your Password</a> | <a href="#">Create An Account &raquo;</a></p>
+
    * @memberOf html5
     </div>
+
    * @type Array|String
     <div class="footbox">
+
    */
      <h2>Lacus interdum</h2>
+
     'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
      <ul>
+
 
        <li><a href="#">Praesent et eros</a></li>
+
     /**
        <li><a href="#">Praesent et eros</a></li>
+
    * A flag to indicate that the HTML5 style sheet should be inserted.
        <li><a href="#">Lorem ipsum dolor</a></li>
+
    * @memberOf html5
        <li><a href="#">Suspendisse in neque</a></li>
+
    * @type Boolean
        <li class="last"><a href="#">Praesent et eros</a></li>
+
    */
      </ul>
+
    'shivCSS': !(options.shivCSS === false),
     </div>
+
 
     <div class="footbox">
+
    /**
      <h2>Lacus interdum</h2>
+
    * Is equal to true if a browser supports creating unknown/HTML5 elements
      <ul>
+
    * @memberOf html5
        <li><a href="#">Praesent et eros</a></li>
+
    * @type boolean
        <li><a href="#">Praesent et eros</a></li>
+
    */
        <li><a href="#">Lorem ipsum dolor</a></li>
+
     'supportsUnknownElements': supportsUnknownElements,
        <li><a href="#">Suspendisse in neque</a></li>
+
 
        <li class="last"><a href="#">Praesent et eros</a></li>
+
     /**
      </ul>
+
    * A flag to indicate that the document's `createElement` and `createDocumentFragment`
     </div>
+
    * methods should be overwritten.
    <div class="footbox">
+
    * @memberOf html5
      <h2>Lacus interdum</h2>
+
    * @type Boolean
      <ul>
+
    */
        <li><a href="#">Praesent et eros</a></li>
+
    'shivMethods': !(options.shivMethods === false),
        <li><a href="#">Praesent et eros</a></li>
+
 
        <li><a href="#">Lorem ipsum dolor</a></li>
+
     /**
        <li><a href="#">Suspendisse in neque</a></li>
+
    * A string to describe the type of `html5` object ("default" or "default print").
        <li class="last"><a href="#">Praesent et eros</a></li>
+
    * @memberOf html5
      </ul>
+
    * @type String
     </div>
+
    */
     <br class="clear" />
+
    'type': 'default',
  </div>
+
 
</div>
+
     // shivs the document according to the specified `html5` object options
<div class="wrapper col7">
+
     'shivDocument': shivDocument,
  <div id="copyright">
+
 
     <p class="fl_left">Copyright &copy; 2014 - All Rights Reserved - <a href="#">Domain Name</a></p>
+
    //creates a shived element
     <p class="fl_right">Template by <a target="_blank" href="http://www.os-templates.com/" title="Free Website Templates">OS Templates</a></p>
+
    createElement: createElement,
    <br class="clear" />
+
 
   </div>
+
     //creates a shived documentFragment
</div>
+
     createDocumentFragment: createDocumentFragment
</body>
+
  };
</html>
+
 
 +
  /*--------------------------------------------------------------------------*/
 +
 
 +
  // expose html5
 +
  window.html5 = html5;
 +
 
 +
   // shiv the document
 +
  shivDocument(document);
 +
 
 +
}(this, document));

Revision as of 14:26, 26 July 2015

{

/*! HTML5 Shiv vpre3.6 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */

(function(window, document) {
 /** Preset options */
 var options = window.html5 || {};
 /** Used to skip problem elements */
 var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
 /** Not all elements can be cloned in IE (this list can be shortend) **/
 var saveClones = /^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i;
 /** Detect whether the browser supports default html5 styles */
 var supportsHtml5Styles;
 /** Name of the expando, to work with multiple documents or to re-shiv one document */
 var expando = '_html5shiv';
 /** The id for the the documents expando */
 var expanID = 0;
 /** Cached data for each document */
 var expandoData = {};
 /** Detect whether the browser supports unknown elements */
 var supportsUnknownElements;
 (function() {
   var a = document.createElement('a');
   a.innerHTML = '<xyz></xyz>';
   //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
   supportsHtml5Styles = ('hidden' in a);
   supportsUnknownElements = a.childNodes.length == 1 || (function() {
     // assign a false positive if unable to shiv
     try {
       (document.createElement)('a');
     } catch(e) {
       return true;
     }
     var frag = document.createDocumentFragment();
     return (
       typeof frag.cloneNode == 'undefined' ||
       typeof frag.createDocumentFragment == 'undefined' ||
       typeof frag.createElement == 'undefined'
     );
   }());
 }());
 /*--------------------------------------------------------------------------*/
 /**
  * Creates a style sheet with the given CSS text and adds it to the document.
  * @private
  * @param {Document} ownerDocument The document.
  * @param {String} cssText The CSS text.
  * @returns {StyleSheet} The style element.
  */
 function addStyleSheet(ownerDocument, cssText) {
   var p = ownerDocument.createElement('p'),
       parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
   p.innerHTML = 'x<style>' + cssText + '</style>';
   return parent.insertBefore(p.lastChild, parent.firstChild);
 }
 /**
  * Returns the value of `html5.elements` as an array.
  * @private
  * @returns {Array} An array of shived element node names.
  */
 function getElements() {
   var elements = html5.elements;
   return typeof elements == 'string' ? elements.split(' ') : elements;
 }
 
   /**
  * Returns the data associated to the given document
  * @private
  * @param {Document} ownerDocument The document.
  * @returns {Object} An object of data.
  */
 function getExpandoData(ownerDocument) {
   var data = expandoData[ownerDocument[expando]];
   if (!data) {
       data = {};
       expanID++;
       ownerDocument[expando] = expanID;
       expandoData[expanID] = data;
   }
   return data;
 }
 /**
  * returns a shived element for the given nodeName and document
  * @memberOf html5
  * @param {String} nodeName name of the element
  * @param {Document} ownerDocument The context document.
  * @returns {Object} The shived element.
  */
 function createElement(nodeName, ownerDocument, data){
   if (!ownerDocument) {
       ownerDocument = document;
   }
   if(supportsUnknownElements){
       return ownerDocument.createElement(nodeName);
   }
   data = data || getExpandoData(ownerDocument);
   var node;
   if (data.cache[nodeName]) {
       node = data.cache[nodeName].cloneNode();
   } else if (saveClones.test(nodeName)) {
       node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
   } else {
       node = data.createElem(nodeName);
   }
   // Avoid adding some elements to fragments in IE < 9 because
   // * Attributes like `name` or `type` cannot be set/changed once an element
   //   is inserted into a document/fragment
   // * Link elements with `src` attributes that are inaccessible, as with
   //   a 403 response, will cause the tab/window to crash
   // * Script elements appended to fragments will execute when their `src`
   //   or `text` property is set
   return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
 }
 /**
  * returns a shived DocumentFragment for the given document
  * @memberOf html5
  * @param {Document} ownerDocument The context document.
  * @returns {Object} The shived DocumentFragment.
  */
 function createDocumentFragment(ownerDocument, data){
   if (!ownerDocument) {
       ownerDocument = document;
   }
   if(supportsUnknownElements){
       return ownerDocument.createDocumentFragment();
   }
   data = data || getExpandoData(ownerDocument);
   var clone = data.frag.cloneNode(),
       i = 0,
       elems = getElements(),
       l = elems.length;
   for(;i<l;i++){
       clone.createElement(elems[i]);
   }
   return clone;
 }
 /**
  * Shivs the `createElement` and `createDocumentFragment` methods of the document.
  * @private
  * @param {Document|DocumentFragment} ownerDocument The document.
  * @param {Object} data of the document.
  */
 function shivMethods(ownerDocument, data) {
   if (!data.cache) {
       data.cache = {};
       data.createElem = ownerDocument.createElement;
       data.createFrag = ownerDocument.createDocumentFragment;
       data.frag = data.createFrag();
   }


   ownerDocument.createElement = function(nodeName) {
     //abort shiv
     if (!html5.shivMethods) {
         return data.createElem(nodeName);
     }
     return createElement(nodeName);
   };
   ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
     'var n=f.cloneNode(),c=n.createElement;' +
     'h.shivMethods&&(' +
       // unroll the `createElement` calls
       getElements().join().replace(/\w+/g, function(nodeName) {
         data.createElem(nodeName);
         data.frag.createElement(nodeName);
         return 'c("' + nodeName + '")';
       }) +
     ');return n}'
   )(html5, data.frag);
 }
 /*--------------------------------------------------------------------------*/
 /**
  * Shivs the given document.
  * @memberOf html5
  * @param {Document} ownerDocument The document to shiv.
  * @returns {Document} The shived document.
  */
 function shivDocument(ownerDocument) {
   if (!ownerDocument) {
       ownerDocument = document;
   }
   var data = getExpandoData(ownerDocument);
   if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
     data.hasCSS = !!addStyleSheet(ownerDocument,
       // corrects block display not defined in IE6/7/8/9
       'article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}' +
       // adds styling not present in IE6/7/8/9
       'mark{background:#FF0;color:#000}'
     );
   }
   if (!supportsUnknownElements) {
     shivMethods(ownerDocument, data);
   }
   return ownerDocument;
 }
 /*--------------------------------------------------------------------------*/
 /**
  * The `html5` object is exposed so that more elements can be shived and
  * existing shiving can be detected on iframes.
  * @type Object
  * @example
  *
  * // options can be changed before the script is included
  * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
  */
 var html5 = {
   /**
    * An array or space separated string of node names of the elements to shiv.
    * @memberOf html5
    * @type Array|String
    */
   'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video',
   /**
    * A flag to indicate that the HTML5 style sheet should be inserted.
    * @memberOf html5
    * @type Boolean
    */
   'shivCSS': !(options.shivCSS === false),
   /**
    * Is equal to true if a browser supports creating unknown/HTML5 elements
    * @memberOf html5
    * @type boolean
    */
   'supportsUnknownElements': supportsUnknownElements,
   /**
    * A flag to indicate that the document's `createElement` and `createDocumentFragment`
    * methods should be overwritten.
    * @memberOf html5
    * @type Boolean
    */
   'shivMethods': !(options.shivMethods === false),
   /**
    * A string to describe the type of `html5` object ("default" or "default print").
    * @memberOf html5
    * @type String
    */
   'type': 'default',
   // shivs the document according to the specified `html5` object options
   'shivDocument': shivDocument,
   //creates a shived element
   createElement: createElement,
   //creates a shived documentFragment
   createDocumentFragment: createDocumentFragment
 };
 /*--------------------------------------------------------------------------*/
 // expose html5
 window.html5 = html5;
 // shiv the document
 shivDocument(document);

}(this, document));