[
  {
    "path": ".gitattributes",
    "content": "* text=auto"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\nnode_modules"
  },
  {
    "path": "Gruntfile.js",
    "content": "/*global module:false*/\nmodule.exports = function(grunt){\n\n\t\n\t// Project configuration.\n\tgrunt.initConfig({\n\t\tpkg: grunt.file.readJSON('package.json'),\n\t\tbower: grunt.file.readJSON('bower.json'),\n\t\tcopy: {\n\t\t\tdemo: {\n\t\t\t\tfiles: [\n\t\t\t\t\t{expand: true, src: ['src/*'], dest: 'dist/', filter: 'isFile', flatten: true}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\n\t\tuglify: {\n\t\t\toptions: {\n\t\t\t\tbeautify: {\n\t\t\t\t\tascii_only : true\n\t\t\t\t},\n\t\t\t\tpreserveComments: 'some'\n\t\t\t},\n\t\t\thtml5shiv: {\n\t\t\t\tfiles: [{\n\t\t\t\t\texpand: true,     // Enable dynamic expansion.\n\t\t\t\t\tcwd: 'src/',      // Src matches are relative to this path.\n\t\t\t\t\tsrc: ['**/*.js'], // Actual pattern(s) to match.\n\t\t\t\t\tdest: 'dist/',   // Destination path prefix.\n\t\t\t\t\text: '.min.js'\n\t\t\t\t}]\n\t\t\t}\n\t\t},\n\t\twatch: {\n\t\t\tjs: {\n\t\t\t\tfiles: ['src/**/*.js'],\n\t\t\t\ttasks: ['copy', 'uglify', 'bytesize']\n\t\t\t}\n\t\t},\n\t\tbytesize: {\n\t\t\tall: {\n\t\t\t\tsrc: [\n\t\t\t\t\t'dist/**.min.js'\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t});\n\n\t\n\t// Default task.\n\n\t\n\n\tgrunt.loadNpmTasks('grunt-contrib-copy');\n\tgrunt.loadNpmTasks('grunt-contrib-uglify');\n\tgrunt.loadNpmTasks('grunt-contrib-watch');\n\tgrunt.loadNpmTasks('grunt-bytesize');\n\n\tgrunt.registerTask('default', ['copy', 'uglify', 'bytesize', 'watch']);\n\n};\n"
  },
  {
    "path": "MIT and GPL2 licenses.md",
    "content": "Copyright (c) 2014 Alexander Farkas (aFarkas).\n\nThis software is licensed under a dual license system (MIT or GPL version 2). \nThis means you are free to choose with which of both licenses (MIT or \nGPL version 2) you want to use this library. \n\nThe license texts of the MIT license and the GPL version 2 are as follows:\n\n\n## MIT License\n \n Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the \"Software\"),\n to deal in the Software without restriction, including without limitation\n the rights to use, copy, modify, merge, publish, distribute, sublicense,\n and/or sell copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n DEALINGS IN THE SOFTWARE.\n\n\n\n## GNU GENERAL PUBLIC LICENSE Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.\n                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Library General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n\t\t    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\n\t    How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <Html5shiv, The HTML5 Shiv enables use of HTML5 sectioning elements in \n    legacy Internet Explorer and provides basic HTML5 styling for Internet Explorer 6-9, \n    Safari 4.x (and iPhone 3.x), and Firefox 3.x.>\n    Copyright (C) 2014  Alexander Farkas (aFarkas)\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program; if not, write to the Free Software\n    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) 2014  Alexander Farkas (aFarkas)\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Library General\nPublic License instead of this License.\n"
  },
  {
    "path": "bower.json",
    "content": "{\n  \"name\": \"html5shiv\",\n  \"version\": \"3.7.3\",\n  \"main\": [\n  \t\"dist/html5shiv.js\"\n  ],\n  \"ignore\": [\n    \"**/.*\",\n    \"composer.json\",\n    \"test\",\n    \"build\",\n    \"src\",\n    \"build.xml\"\n  ]\n}\n"
  },
  {
    "path": "composer.json",
    "content": "{\n  \"name\": \"afarkas/html5shiv\",\n  \"description\": \"Defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer.\",\n  \"type\": \"component\",\n  \"homepage\": \"http://paulirish.com/2011/the-history-of-the-html5-shiv/\",\n  \"license\": [\n    \"MIT\",\n    \"GPL-2.0\"\n  ],\n  \"extra\": {\n    \"component\": {\n      \"scripts\": [\n        \"dist/html5shiv.js\"\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "dist/html5shiv-printshiv.js",
    "content": "/**\n* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed\n*/\n;(function(window, document) {\n/*jshint evil:true */\n  /** version */\n  var version = '3.7.3';\n\n  /** Preset options */\n  var options = window.html5 || {};\n\n  /** Used to skip problem elements */\n  var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;\n\n  /** Not all elements can be cloned in IE **/\n  var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;\n\n  /** Detect whether the browser supports default html5 styles */\n  var supportsHtml5Styles;\n\n  /** Name of the expando, to work with multiple documents or to re-shiv one document */\n  var expando = '_html5shiv';\n\n  /** The id for the the documents expando */\n  var expanID = 0;\n\n  /** Cached data for each document */\n  var expandoData = {};\n\n  /** Detect whether the browser supports unknown elements */\n  var supportsUnknownElements;\n\n  (function() {\n    try {\n        var a = document.createElement('a');\n        a.innerHTML = '<xyz></xyz>';\n        //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles\n        supportsHtml5Styles = ('hidden' in a);\n\n        supportsUnknownElements = a.childNodes.length == 1 || (function() {\n          // assign a false positive if unable to shiv\n          (document.createElement)('a');\n          var frag = document.createDocumentFragment();\n          return (\n            typeof frag.cloneNode == 'undefined' ||\n            typeof frag.createDocumentFragment == 'undefined' ||\n            typeof frag.createElement == 'undefined'\n          );\n        }());\n    } catch(e) {\n      // assign a false positive if detection fails => unable to shiv\n      supportsHtml5Styles = true;\n      supportsUnknownElements = true;\n    }\n\n  }());\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Creates a style sheet with the given CSS text and adds it to the document.\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @param {String} cssText The CSS text.\n   * @returns {StyleSheet} The style element.\n   */\n  function addStyleSheet(ownerDocument, cssText) {\n    var p = ownerDocument.createElement('p'),\n        parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;\n\n    p.innerHTML = 'x<style>' + cssText + '</style>';\n    return parent.insertBefore(p.lastChild, parent.firstChild);\n  }\n\n  /**\n   * Returns the value of `html5.elements` as an array.\n   * @private\n   * @returns {Array} An array of shived element node names.\n   */\n  function getElements() {\n    var elements = html5.elements;\n    return typeof elements == 'string' ? elements.split(' ') : elements;\n  }\n\n  /**\n   * Extends the built-in list of html5 elements\n   * @memberOf html5\n   * @param {String|Array} newElements whitespace separated list or array of new element names to shiv\n   * @param {Document} ownerDocument The context document.\n   */\n  function addElements(newElements, ownerDocument) {\n    var elements = html5.elements;\n    if(typeof elements != 'string'){\n      elements = elements.join(' ');\n    }\n    if(typeof newElements != 'string'){\n      newElements = newElements.join(' ');\n    }\n    html5.elements = elements +' '+ newElements;\n    shivDocument(ownerDocument);\n  }\n\n    /**\n   * Returns the data associated to the given document\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @returns {Object} An object of data.\n   */\n  function getExpandoData(ownerDocument) {\n    var data = expandoData[ownerDocument[expando]];\n    if (!data) {\n        data = {};\n        expanID++;\n        ownerDocument[expando] = expanID;\n        expandoData[expanID] = data;\n    }\n    return data;\n  }\n\n  /**\n   * returns a shived element for the given nodeName and document\n   * @memberOf html5\n   * @param {String} nodeName name of the element\n   * @param {Document} ownerDocument The context document.\n   * @returns {Object} The shived element.\n   */\n  function createElement(nodeName, ownerDocument, data){\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    if(supportsUnknownElements){\n        return ownerDocument.createElement(nodeName);\n    }\n    if (!data) {\n        data = getExpandoData(ownerDocument);\n    }\n    var node;\n\n    if (data.cache[nodeName]) {\n        node = data.cache[nodeName].cloneNode();\n    } else if (saveClones.test(nodeName)) {\n        node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();\n    } else {\n        node = data.createElem(nodeName);\n    }\n\n    // Avoid adding some elements to fragments in IE < 9 because\n    // * Attributes like `name` or `type` cannot be set/changed once an element\n    //   is inserted into a document/fragment\n    // * Link elements with `src` attributes that are inaccessible, as with\n    //   a 403 response, will cause the tab/window to crash\n    // * Script elements appended to fragments will execute when their `src`\n    //   or `text` property is set\n    return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;\n  }\n\n  /**\n   * returns a shived DocumentFragment for the given document\n   * @memberOf html5\n   * @param {Document} ownerDocument The context document.\n   * @returns {Object} The shived DocumentFragment.\n   */\n  function createDocumentFragment(ownerDocument, data){\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    if(supportsUnknownElements){\n        return ownerDocument.createDocumentFragment();\n    }\n    data = data || getExpandoData(ownerDocument);\n    var clone = data.frag.cloneNode(),\n        i = 0,\n        elems = getElements(),\n        l = elems.length;\n    for(;i<l;i++){\n        clone.createElement(elems[i]);\n    }\n    return clone;\n  }\n\n  /**\n   * Shivs the `createElement` and `createDocumentFragment` methods of the document.\n   * @private\n   * @param {Document|DocumentFragment} ownerDocument The document.\n   * @param {Object} data of the document.\n   */\n  function shivMethods(ownerDocument, data) {\n    if (!data.cache) {\n        data.cache = {};\n        data.createElem = ownerDocument.createElement;\n        data.createFrag = ownerDocument.createDocumentFragment;\n        data.frag = data.createFrag();\n    }\n\n\n    ownerDocument.createElement = function(nodeName) {\n      //abort shiv\n      if (!html5.shivMethods) {\n          return data.createElem(nodeName);\n      }\n      return createElement(nodeName, ownerDocument, data);\n    };\n\n    ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +\n      'var n=f.cloneNode(),c=n.createElement;' +\n      'h.shivMethods&&(' +\n        // unroll the `createElement` calls\n        getElements().join().replace(/[\\w\\-:]+/g, function(nodeName) {\n          data.createElem(nodeName);\n          data.frag.createElement(nodeName);\n          return 'c(\"' + nodeName + '\")';\n        }) +\n      ');return n}'\n    )(html5, data.frag);\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Shivs the given document.\n   * @memberOf html5\n   * @param {Document} ownerDocument The document to shiv.\n   * @returns {Document} The shived document.\n   */\n  function shivDocument(ownerDocument) {\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    var data = getExpandoData(ownerDocument);\n\n    if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {\n      data.hasCSS = !!addStyleSheet(ownerDocument,\n        // corrects block display not defined in IE6/7/8/9\n        'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +\n        // adds styling not present in IE6/7/8/9\n        'mark{background:#FF0;color:#000}' +\n        // hides non-rendered elements\n        'template{display:none}'\n      );\n    }\n    if (!supportsUnknownElements) {\n      shivMethods(ownerDocument, data);\n    }\n    return ownerDocument;\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * The `html5` object is exposed so that more elements can be shived and\n   * existing shiving can be detected on iframes.\n   * @type Object\n   * @example\n   *\n   * // options can be changed before the script is included\n   * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };\n   */\n  var html5 = {\n\n    /**\n     * An array or space separated string of node names of the elements to shiv.\n     * @memberOf html5\n     * @type Array|String\n     */\n    'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',\n\n    /**\n     * current version of html5shiv\n     */\n    'version': version,\n\n    /**\n     * A flag to indicate that the HTML5 style sheet should be inserted.\n     * @memberOf html5\n     * @type Boolean\n     */\n    'shivCSS': (options.shivCSS !== false),\n\n    /**\n     * Is equal to true if a browser supports creating unknown/HTML5 elements\n     * @memberOf html5\n     * @type boolean\n     */\n    'supportsUnknownElements': supportsUnknownElements,\n\n    /**\n     * A flag to indicate that the document's `createElement` and `createDocumentFragment`\n     * methods should be overwritten.\n     * @memberOf html5\n     * @type Boolean\n     */\n    'shivMethods': (options.shivMethods !== false),\n\n    /**\n     * A string to describe the type of `html5` object (\"default\" or \"default print\").\n     * @memberOf html5\n     * @type String\n     */\n    'type': 'default',\n\n    // shivs the document according to the specified `html5` object options\n    'shivDocument': shivDocument,\n\n    //creates a shived element\n    createElement: createElement,\n\n    //creates a shived documentFragment\n    createDocumentFragment: createDocumentFragment,\n\n    //extends list of elements\n    addElements: addElements\n  };\n\n  /*--------------------------------------------------------------------------*/\n\n  // expose html5\n  window.html5 = html5;\n\n  // shiv the document\n  shivDocument(document);\n\n  /*------------------------------- Print Shiv -------------------------------*/\n\n  /** Used to filter media types */\n  var reMedia = /^$|\\b(?:all|print)\\b/;\n\n  /** Used to namespace printable elements */\n  var shivNamespace = 'html5shiv';\n\n  /** Detect whether the browser supports shivable style sheets */\n  var supportsShivableSheets = !supportsUnknownElements && (function() {\n    // assign a false negative if unable to shiv\n    var docEl = document.documentElement;\n    return !(\n      typeof document.namespaces == 'undefined' ||\n      typeof document.parentWindow == 'undefined' ||\n      typeof docEl.applyElement == 'undefined' ||\n      typeof docEl.removeNode == 'undefined' ||\n      typeof window.attachEvent == 'undefined'\n    );\n  }());\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Wraps all HTML5 elements in the given document with printable elements.\n   * (eg. the \"header\" element is wrapped with the \"html5shiv:header\" element)\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @returns {Array} An array wrappers added.\n   */\n  function addWrappers(ownerDocument) {\n    var node,\n        nodes = ownerDocument.getElementsByTagName('*'),\n        index = nodes.length,\n        reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'),\n        result = [];\n\n    while (index--) {\n      node = nodes[index];\n      if (reElements.test(node.nodeName)) {\n        result.push(node.applyElement(createWrapper(node)));\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Creates a printable wrapper for the given element.\n   * @private\n   * @param {Element} element The element.\n   * @returns {Element} The wrapper.\n   */\n  function createWrapper(element) {\n    var node,\n        nodes = element.attributes,\n        index = nodes.length,\n        wrapper = element.ownerDocument.createElement(shivNamespace + ':' + element.nodeName);\n\n    // copy element attributes to the wrapper\n    while (index--) {\n      node = nodes[index];\n      node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue);\n    }\n    // copy element styles to the wrapper\n    wrapper.style.cssText = element.style.cssText;\n    return wrapper;\n  }\n\n  /**\n   * Shivs the given CSS text.\n   * (eg. header{} becomes html5shiv\\:header{})\n   * @private\n   * @param {String} cssText The CSS text to shiv.\n   * @returns {String} The shived CSS text.\n   */\n  function shivCssText(cssText) {\n    var pair,\n        parts = cssText.split('{'),\n        index = parts.length,\n        reElements = RegExp('(^|[\\\\s,>+~])(' + getElements().join('|') + ')(?=[[\\\\s,>+~#.:]|$)', 'gi'),\n        replacement = '$1' + shivNamespace + '\\\\:$2';\n\n    while (index--) {\n      pair = parts[index] = parts[index].split('}');\n      pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement);\n      parts[index] = pair.join('}');\n    }\n    return parts.join('{');\n  }\n\n  /**\n   * Removes the given wrappers, leaving the original elements.\n   * @private\n   * @params {Array} wrappers An array of printable wrappers.\n   */\n  function removeWrappers(wrappers) {\n    var index = wrappers.length;\n    while (index--) {\n      wrappers[index].removeNode();\n    }\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Shivs the given document for print.\n   * @memberOf html5\n   * @param {Document} ownerDocument The document to shiv.\n   * @returns {Document} The shived document.\n   */\n  function shivPrint(ownerDocument) {\n    var shivedSheet,\n        wrappers,\n        data = getExpandoData(ownerDocument),\n        namespaces = ownerDocument.namespaces,\n        ownerWindow = ownerDocument.parentWindow;\n\n    if (!supportsShivableSheets || ownerDocument.printShived) {\n      return ownerDocument;\n    }\n    if (typeof namespaces[shivNamespace] == 'undefined') {\n      namespaces.add(shivNamespace);\n    }\n\n    function removeSheet() {\n      clearTimeout(data._removeSheetTimer);\n      if (shivedSheet) {\n          shivedSheet.removeNode(true);\n      }\n      shivedSheet= null;\n    }\n\n    ownerWindow.attachEvent('onbeforeprint', function() {\n\n      removeSheet();\n\n      var imports,\n          length,\n          sheet,\n          collection = ownerDocument.styleSheets,\n          cssText = [],\n          index = collection.length,\n          sheets = Array(index);\n\n      // convert styleSheets collection to an array\n      while (index--) {\n        sheets[index] = collection[index];\n      }\n      // concat all style sheet CSS text\n      while ((sheet = sheets.pop())) {\n        // IE does not enforce a same origin policy for external style sheets...\n        // but has trouble with some dynamically created stylesheets\n        if (!sheet.disabled && reMedia.test(sheet.media)) {\n\n          try {\n            imports = sheet.imports;\n            length = imports.length;\n          } catch(er){\n            length = 0;\n          }\n\n          for (index = 0; index < length; index++) {\n            sheets.push(imports[index]);\n          }\n\n          try {\n            cssText.push(sheet.cssText);\n          } catch(er){}\n        }\n      }\n\n      // wrap all HTML5 elements with printable elements and add the shived style sheet\n      cssText = shivCssText(cssText.reverse().join(''));\n      wrappers = addWrappers(ownerDocument);\n      shivedSheet = addStyleSheet(ownerDocument, cssText);\n\n    });\n\n    ownerWindow.attachEvent('onafterprint', function() {\n      // remove wrappers, leaving the original elements, and remove the shived style sheet\n      removeWrappers(wrappers);\n      clearTimeout(data._removeSheetTimer);\n      data._removeSheetTimer = setTimeout(removeSheet, 500);\n    });\n\n    ownerDocument.printShived = true;\n    return ownerDocument;\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  // expose API\n  html5.type += ' print';\n  html5.shivPrint = shivPrint;\n\n  // shiv for print\n  shivPrint(document);\n\n  if(typeof module == 'object' && module.exports){\n    module.exports = html5;\n  }\n\n}(typeof window !== \"undefined\" ? window : this, document));\n"
  },
  {
    "path": "dist/html5shiv.js",
    "content": "/**\n* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed\n*/\n;(function(window, document) {\n/*jshint evil:true */\n  /** version */\n  var version = '3.7.3';\n\n  /** Preset options */\n  var options = window.html5 || {};\n\n  /** Used to skip problem elements */\n  var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;\n\n  /** Not all elements can be cloned in IE **/\n  var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;\n\n  /** Detect whether the browser supports default html5 styles */\n  var supportsHtml5Styles;\n\n  /** Name of the expando, to work with multiple documents or to re-shiv one document */\n  var expando = '_html5shiv';\n\n  /** The id for the the documents expando */\n  var expanID = 0;\n\n  /** Cached data for each document */\n  var expandoData = {};\n\n  /** Detect whether the browser supports unknown elements */\n  var supportsUnknownElements;\n\n  (function() {\n    try {\n        var a = document.createElement('a');\n        a.innerHTML = '<xyz></xyz>';\n        //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles\n        supportsHtml5Styles = ('hidden' in a);\n\n        supportsUnknownElements = a.childNodes.length == 1 || (function() {\n          // assign a false positive if unable to shiv\n          (document.createElement)('a');\n          var frag = document.createDocumentFragment();\n          return (\n            typeof frag.cloneNode == 'undefined' ||\n            typeof frag.createDocumentFragment == 'undefined' ||\n            typeof frag.createElement == 'undefined'\n          );\n        }());\n    } catch(e) {\n      // assign a false positive if detection fails => unable to shiv\n      supportsHtml5Styles = true;\n      supportsUnknownElements = true;\n    }\n\n  }());\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Creates a style sheet with the given CSS text and adds it to the document.\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @param {String} cssText The CSS text.\n   * @returns {StyleSheet} The style element.\n   */\n  function addStyleSheet(ownerDocument, cssText) {\n    var p = ownerDocument.createElement('p'),\n        parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;\n\n    p.innerHTML = 'x<style>' + cssText + '</style>';\n    return parent.insertBefore(p.lastChild, parent.firstChild);\n  }\n\n  /**\n   * Returns the value of `html5.elements` as an array.\n   * @private\n   * @returns {Array} An array of shived element node names.\n   */\n  function getElements() {\n    var elements = html5.elements;\n    return typeof elements == 'string' ? elements.split(' ') : elements;\n  }\n\n  /**\n   * Extends the built-in list of html5 elements\n   * @memberOf html5\n   * @param {String|Array} newElements whitespace separated list or array of new element names to shiv\n   * @param {Document} ownerDocument The context document.\n   */\n  function addElements(newElements, ownerDocument) {\n    var elements = html5.elements;\n    if(typeof elements != 'string'){\n      elements = elements.join(' ');\n    }\n    if(typeof newElements != 'string'){\n      newElements = newElements.join(' ');\n    }\n    html5.elements = elements +' '+ newElements;\n    shivDocument(ownerDocument);\n  }\n\n   /**\n   * Returns the data associated to the given document\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @returns {Object} An object of data.\n   */\n  function getExpandoData(ownerDocument) {\n    var data = expandoData[ownerDocument[expando]];\n    if (!data) {\n        data = {};\n        expanID++;\n        ownerDocument[expando] = expanID;\n        expandoData[expanID] = data;\n    }\n    return data;\n  }\n\n  /**\n   * returns a shived element for the given nodeName and document\n   * @memberOf html5\n   * @param {String} nodeName name of the element\n   * @param {Document|DocumentFragment} ownerDocument The context document.\n   * @returns {Object} The shived element.\n   */\n  function createElement(nodeName, ownerDocument, data){\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    if(supportsUnknownElements){\n        return ownerDocument.createElement(nodeName);\n    }\n    if (!data) {\n        data = getExpandoData(ownerDocument);\n    }\n    var node;\n\n    if (data.cache[nodeName]) {\n        node = data.cache[nodeName].cloneNode();\n    } else if (saveClones.test(nodeName)) {\n        node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();\n    } else {\n        node = data.createElem(nodeName);\n    }\n\n    // Avoid adding some elements to fragments in IE < 9 because\n    // * Attributes like `name` or `type` cannot be set/changed once an element\n    //   is inserted into a document/fragment\n    // * Link elements with `src` attributes that are inaccessible, as with\n    //   a 403 response, will cause the tab/window to crash\n    // * Script elements appended to fragments will execute when their `src`\n    //   or `text` property is set\n    return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;\n  }\n\n  /**\n   * returns a shived DocumentFragment for the given document\n   * @memberOf html5\n   * @param {Document} ownerDocument The context document.\n   * @returns {Object} The shived DocumentFragment.\n   */\n  function createDocumentFragment(ownerDocument, data){\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    if(supportsUnknownElements){\n        return ownerDocument.createDocumentFragment();\n    }\n    data = data || getExpandoData(ownerDocument);\n    var clone = data.frag.cloneNode(),\n        i = 0,\n        elems = getElements(),\n        l = elems.length;\n    for(;i<l;i++){\n        clone.createElement(elems[i]);\n    }\n    return clone;\n  }\n\n  /**\n   * Shivs the `createElement` and `createDocumentFragment` methods of the document.\n   * @private\n   * @param {Document|DocumentFragment} ownerDocument The document.\n   * @param {Object} data of the document.\n   */\n  function shivMethods(ownerDocument, data) {\n    if (!data.cache) {\n        data.cache = {};\n        data.createElem = ownerDocument.createElement;\n        data.createFrag = ownerDocument.createDocumentFragment;\n        data.frag = data.createFrag();\n    }\n\n\n    ownerDocument.createElement = function(nodeName) {\n      //abort shiv\n      if (!html5.shivMethods) {\n          return data.createElem(nodeName);\n      }\n      return createElement(nodeName, ownerDocument, data);\n    };\n\n    ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +\n      'var n=f.cloneNode(),c=n.createElement;' +\n      'h.shivMethods&&(' +\n        // unroll the `createElement` calls\n        getElements().join().replace(/[\\w\\-:]+/g, function(nodeName) {\n          data.createElem(nodeName);\n          data.frag.createElement(nodeName);\n          return 'c(\"' + nodeName + '\")';\n        }) +\n      ');return n}'\n    )(html5, data.frag);\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Shivs the given document.\n   * @memberOf html5\n   * @param {Document} ownerDocument The document to shiv.\n   * @returns {Document} The shived document.\n   */\n  function shivDocument(ownerDocument) {\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    var data = getExpandoData(ownerDocument);\n\n    if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {\n      data.hasCSS = !!addStyleSheet(ownerDocument,\n        // corrects block display not defined in IE6/7/8/9\n        'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +\n        // adds styling not present in IE6/7/8/9\n        'mark{background:#FF0;color:#000}' +\n        // hides non-rendered elements\n        'template{display:none}'\n      );\n    }\n    if (!supportsUnknownElements) {\n      shivMethods(ownerDocument, data);\n    }\n    return ownerDocument;\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * The `html5` object is exposed so that more elements can be shived and\n   * existing shiving can be detected on iframes.\n   * @type Object\n   * @example\n   *\n   * // options can be changed before the script is included\n   * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };\n   */\n  var html5 = {\n\n    /**\n     * An array or space separated string of node names of the elements to shiv.\n     * @memberOf html5\n     * @type Array|String\n     */\n    'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',\n\n    /**\n     * current version of html5shiv\n     */\n    'version': version,\n\n    /**\n     * A flag to indicate that the HTML5 style sheet should be inserted.\n     * @memberOf html5\n     * @type Boolean\n     */\n    'shivCSS': (options.shivCSS !== false),\n\n    /**\n     * Is equal to true if a browser supports creating unknown/HTML5 elements\n     * @memberOf html5\n     * @type boolean\n     */\n    'supportsUnknownElements': supportsUnknownElements,\n\n    /**\n     * A flag to indicate that the document's `createElement` and `createDocumentFragment`\n     * methods should be overwritten.\n     * @memberOf html5\n     * @type Boolean\n     */\n    'shivMethods': (options.shivMethods !== false),\n\n    /**\n     * A string to describe the type of `html5` object (\"default\" or \"default print\").\n     * @memberOf html5\n     * @type String\n     */\n    'type': 'default',\n\n    // shivs the document according to the specified `html5` object options\n    'shivDocument': shivDocument,\n\n    //creates a shived element\n    createElement: createElement,\n\n    //creates a shived documentFragment\n    createDocumentFragment: createDocumentFragment,\n\n    //extends list of elements\n    addElements: addElements\n  };\n\n  /*--------------------------------------------------------------------------*/\n\n  // expose html5\n  window.html5 = html5;\n\n  // shiv the document\n  shivDocument(document);\n\n  if(typeof module == 'object' && module.exports){\n    module.exports = html5;\n  }\n\n}(typeof window !== \"undefined\" ? window : this, document));\n"
  },
  {
    "path": "package.json",
    "content": "{\n\t\"name\": \"html5shiv\",\n\t\"version\": \"3.7.3\",\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"https://github.com/aFarkas/html5shiv.git\"\n\t},\n\t\"main\": \"dist/html5shiv.js\",\n\t\"devDependencies\": {\n\t\t\"grunt-bytesize\": \">=0.1.0\",\n\t\t\"grunt-contrib-watch\": \">=0.3.0\",\n\t\t\"grunt-contrib-copy\": \">=0.4.0\",\n\t\t\"grunt-contrib-uglify\": \">=0.2.7\",\n\t\t\"grunt\": \">=0.4.1\"\n\t}\n}\n"
  },
  {
    "path": "readme.md",
    "content": "# The HTML5 Shiv\n\nThe HTML5 Shiv enables use of HTML5 sectioning elements in legacy Internet Explorer and provides basic HTML5 styling for Internet Explorer 6-9, Safari 4.x (and iPhone 3.x), and Firefox 3.x.\n\n### What do these files do?\n\n#### `html5shiv.js`\n*  This includes the basic `createElement()` shiv technique, along with monkeypatches for `document.createElement` and `document.createDocumentFragment` for IE6-8. It also applies [basic styling](https://github.com/aFarkas/html5shiv/blob/51da98dabd3c537891b7fe6114633fb10de52473/src/html5shiv.js#L216-220) for HTML5 elements for IE6-9, Safari 4.x and FF 3.x.\n\n#### `html5shiv-printshiv.js` \n*  This includes all of the above, as well as a mechanism allowing HTML5 elements to be styled and contain children while being printed in IE 6-8.\n\n### Who can I get mad at now?\n\nHTML5 Shiv is maintained by [Alexander Farkas](https://github.com/aFarkas/), [Jonathan Neal](https://twitter.com/jon_neal) and [Paul Irish](https://twitter.com/paul_irish), with many contributions from [John-David Dalton](https://twitter.com/jdalton). It is also distributed with [Modernizr](http://modernizr.com/).\n\nIf you have any issues in these implementations, you can report them here! :)\n\nFor the full story of HTML5 Shiv and all of the people involved in making it, read [The Story of the HTML5 Shiv](http://paulirish.com/2011/the-history-of-the-html5-shiv/).\n\n## Installation\n\n### Using [Bower](http://bower.io/)\n\n`bower install html5shiv --save`\n\nThis will clone the latest version of the HTML5 shiv into the `bower_components` directory at the root of your project and also create or update the file `bower.json` which specifies your projects dependencies.\n\nInclude the HTML5 shiv in the `<head>` of your page in a conditional comment and after any stylesheets.\n\n```html\n<!--[if lt IE 9]>\n\t<script src=\"bower_components/html5shiv/dist/html5shiv.js\"></script>\n<![endif]-->\n```\n\n### Manual installation\n\nDownload and extract the [latest zip package](https://github.com/aFarkas/html5shiv/archive/master.zip) from this repositiory and copy the two files `dist/html5shiv.js` and `dist/html5shiv-printshiv.js` into your project. Then include one of them into your `<head>` as above. \n\n## HTML5 Shiv API\n\nHTML5 Shiv works as a simple drop-in solution. In most cases there is no need to configure HTML5 Shiv or use methods provided by HTML5 Shiv.\n\n### `html5.elements` option\n\nThe `elements` option is a space separated string or array, which describes the **full** list of the elements to shiv. see also `addElements`.\n\n**Configuring `elements` before `html5shiv.js` is included.**\n\n```js\n//create a global html5 options object\nwindow.html5 = {\n  'elements': 'mark section customelement' \n};\n```\n**Configuring `elements` after `html5shiv.js` is included.**\n\n```js\n//change the html5shiv options object \nwindow.html5.elements = 'mark section customelement';\n//and re-invoke the `shivDocument` method\nhtml5.shivDocument(document);\n```\n\n### `html5.shivCSS`\n\nIf `shivCSS` is set to `true` HTML5 Shiv will add basic styles (mostly display: block) to sectioning elements (like section, article). In most cases a webpage author should include those basic styles in his normal stylesheet to ensure older browser support (i.e. Firefox 3.6) without JavaScript.\n\nThe `shivCSS` is true by default and can be set false, only before html5shiv.js is included: \n\n```js\n//create a global html5 options object\nwindow.html5 = {\n\t'shivCSS': false\n};\n```\n\n### `html5.shivMethods`\n\nIf the `shivMethods` option is set to `true` (by default) HTML5 Shiv will override `document.createElement`/`document.createDocumentFragment` in Internet Explorer 6-8 to allow dynamic DOM creation of HTML5 elements. \n\nKnown issue: If an element is created using the overridden `createElement` method this element returns a document fragment as its `parentNode`, but should be normally `null`. If a script relies on this behavior, `shivMethods`should be set to `false`.\nNote: jQuery 1.7+ has implemented his own HTML5 DOM creation fix for Internet Explorer 6-8. If all your scripts (including Third party scripts) are using jQuery's manipulation and DOM creation methods, you might want to set this option to `false`.\n\n**Configuring `shivMethods` before `html5shiv.js` is included.**\n\n```js\n//create a global html5 options object\nwindow.html5 = {\n\t'shivMethods': false\n};\n```\n**Configuring `elements` after `html5shiv.js` is included.**\n\n```js\n//change the html5shiv options object \nwindow.html5.shivMethods = false;\n```\n\n### `html5.addElements( newElements [, document] )`\n\nThe `html5.addElements` method extends the list of elements to shiv. The newElements argument can be a whitespace separated list or an array.\n\n```js\n//extend list of elements to shiv\nhtml5.addElements('element content');\n```\n\n### `html5.createElement( nodeName [, document] )`\n\nThe `html5.createElement` method creates a shived element, even if `shivMethods` is set to false.\n\n```js\nvar container = html5.createElement('div');\n//container is shived so we can add HTML5 elements using `innerHTML`\ncontainer.innerHTML = '<section>This is a section</section>';\n```\n\n### `html5.createDocumentFragment( [document] )`\n\nThe `html5.createDocumentFragment` method creates a shived document fragment, even if `shivMethods` is set to false.\n\n```js\nvar fragment = html5.createDocumentFragment();\nvar container = document.createElement('div');\nfragment.appendChild(container);\n//fragment is shived so we can add HTML5 elements using `innerHTML`\ncontainer.innerHTML = '<section>This is a section</section>';\n```\n\n## HTML5 Shiv Known Issues and Limitations\n\n- The `shivMethods` option (overriding `document.createElement`) and the `html5.createElement` method create elements, which are not disconnected and have a parentNode (see also issue #64)\n- The cloneNode problem is currently not addressed by HTML5 Shiv. HTML5 elements can be dynamically created, but can't be cloned in all cases.\n- The printshiv version of HTML5 Shiv has to alter the print styles and the whole DOM for printing. In case of complex websites and or a lot of print styles this might cause performance and/or styling issues. A possible solution could be the [htc-branch](https://github.com/aFarkas/html5shiv/tree/iepp-htc) of HTML5 Shiv, which uses another technique to implement print styles for Internet Explorer 6-8.\n\n### What about the other HTML5 element projects?\n\n- The original conception and community collaboration story of the project is described at [The History of the HTML5 Shiv](http://paulirish.com/2011/the-history-of-the-html5-shiv/). \n- [IEPP](https://code.google.com/p/ie-print-protector), by Jon Neal, addressed the printing fault of the original `html5shiv`. It was merged into `html5shiv`.\n- **Shimprove**, in April 2010, patched `cloneNode` and `createElement` was later merged into `html5shiv`\n- **innerShiv**, introduced in August 2010 by JD Barlett, addressed dynamically adding new HTML5 elements into the DOM. [jQuery added support](http://blog.jquery.com/2011/11/03/jquery-1-7-released/) that made innerShiv redundant and `html5shiv` addressed the same issues as well, so the project was completed.\n- The **html5shim** and **html5shiv** sites on Google Code are maintained by Remy Sharp and are identical distribution points of this `html5shiv` project.\n- **Modernizr** is developed by the same people as `html5shiv` and can include the latest version in any custom builds created at modernizr.com\n- This `html5shiv` repo now contains tests for all the edge cases pursued by the above libraries and has been extensively tested, both in development and production. \n\nA [detailed changelog of html5shiv](https://github.com/aFarkas/html5shiv/wiki) is available.\n\n### Why is it called a *shiv*?\n\nThe term **shiv** [originates](http://ejohn.org/blog/html5-shiv/) from [John Resig](https://github.com/jeresig), who was thought to have used the word for its slang meaning, *a sharp object used as a knife-like weapon*, intended for Internet Explorer. Truth be known, John probably intended to use the word [shim](http://en.wikipedia.org/wiki/Shim_(computing)), which in computing means *an application compatibility workaround*. Rather than correct his mispelling, most developers familiar with Internet Explorer appreciated the visual imagery. And that, kids, is [etymology](https://en.wikipedia.org/wiki/Etymology).\n"
  },
  {
    "path": "src/html5shiv-printshiv.js",
    "content": "/**\n* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed\n*/\n;(function(window, document) {\n/*jshint evil:true */\n  /** version */\n  var version = '3.7.3';\n\n  /** Preset options */\n  var options = window.html5 || {};\n\n  /** Used to skip problem elements */\n  var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;\n\n  /** Not all elements can be cloned in IE **/\n  var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;\n\n  /** Detect whether the browser supports default html5 styles */\n  var supportsHtml5Styles;\n\n  /** Name of the expando, to work with multiple documents or to re-shiv one document */\n  var expando = '_html5shiv';\n\n  /** The id for the the documents expando */\n  var expanID = 0;\n\n  /** Cached data for each document */\n  var expandoData = {};\n\n  /** Detect whether the browser supports unknown elements */\n  var supportsUnknownElements;\n\n  (function() {\n    try {\n        var a = document.createElement('a');\n        a.innerHTML = '<xyz></xyz>';\n        //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles\n        supportsHtml5Styles = ('hidden' in a);\n\n        supportsUnknownElements = a.childNodes.length == 1 || (function() {\n          // assign a false positive if unable to shiv\n          (document.createElement)('a');\n          var frag = document.createDocumentFragment();\n          return (\n            typeof frag.cloneNode == 'undefined' ||\n            typeof frag.createDocumentFragment == 'undefined' ||\n            typeof frag.createElement == 'undefined'\n          );\n        }());\n    } catch(e) {\n      // assign a false positive if detection fails => unable to shiv\n      supportsHtml5Styles = true;\n      supportsUnknownElements = true;\n    }\n\n  }());\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Creates a style sheet with the given CSS text and adds it to the document.\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @param {String} cssText The CSS text.\n   * @returns {StyleSheet} The style element.\n   */\n  function addStyleSheet(ownerDocument, cssText) {\n    var p = ownerDocument.createElement('p'),\n        parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;\n\n    p.innerHTML = 'x<style>' + cssText + '</style>';\n    return parent.insertBefore(p.lastChild, parent.firstChild);\n  }\n\n  /**\n   * Returns the value of `html5.elements` as an array.\n   * @private\n   * @returns {Array} An array of shived element node names.\n   */\n  function getElements() {\n    var elements = html5.elements;\n    return typeof elements == 'string' ? elements.split(' ') : elements;\n  }\n\n  /**\n   * Extends the built-in list of html5 elements\n   * @memberOf html5\n   * @param {String|Array} newElements whitespace separated list or array of new element names to shiv\n   * @param {Document} ownerDocument The context document.\n   */\n  function addElements(newElements, ownerDocument) {\n    var elements = html5.elements;\n    if(typeof elements != 'string'){\n      elements = elements.join(' ');\n    }\n    if(typeof newElements != 'string'){\n      newElements = newElements.join(' ');\n    }\n    html5.elements = elements +' '+ newElements;\n    shivDocument(ownerDocument);\n  }\n\n    /**\n   * Returns the data associated to the given document\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @returns {Object} An object of data.\n   */\n  function getExpandoData(ownerDocument) {\n    var data = expandoData[ownerDocument[expando]];\n    if (!data) {\n        data = {};\n        expanID++;\n        ownerDocument[expando] = expanID;\n        expandoData[expanID] = data;\n    }\n    return data;\n  }\n\n  /**\n   * returns a shived element for the given nodeName and document\n   * @memberOf html5\n   * @param {String} nodeName name of the element\n   * @param {Document} ownerDocument The context document.\n   * @returns {Object} The shived element.\n   */\n  function createElement(nodeName, ownerDocument, data){\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    if(supportsUnknownElements){\n        return ownerDocument.createElement(nodeName);\n    }\n    if (!data) {\n        data = getExpandoData(ownerDocument);\n    }\n    var node;\n\n    if (data.cache[nodeName]) {\n        node = data.cache[nodeName].cloneNode();\n    } else if (saveClones.test(nodeName)) {\n        node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();\n    } else {\n        node = data.createElem(nodeName);\n    }\n\n    // Avoid adding some elements to fragments in IE < 9 because\n    // * Attributes like `name` or `type` cannot be set/changed once an element\n    //   is inserted into a document/fragment\n    // * Link elements with `src` attributes that are inaccessible, as with\n    //   a 403 response, will cause the tab/window to crash\n    // * Script elements appended to fragments will execute when their `src`\n    //   or `text` property is set\n    return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;\n  }\n\n  /**\n   * returns a shived DocumentFragment for the given document\n   * @memberOf html5\n   * @param {Document} ownerDocument The context document.\n   * @returns {Object} The shived DocumentFragment.\n   */\n  function createDocumentFragment(ownerDocument, data){\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    if(supportsUnknownElements){\n        return ownerDocument.createDocumentFragment();\n    }\n    data = data || getExpandoData(ownerDocument);\n    var clone = data.frag.cloneNode(),\n        i = 0,\n        elems = getElements(),\n        l = elems.length;\n    for(;i<l;i++){\n        clone.createElement(elems[i]);\n    }\n    return clone;\n  }\n\n  /**\n   * Shivs the `createElement` and `createDocumentFragment` methods of the document.\n   * @private\n   * @param {Document|DocumentFragment} ownerDocument The document.\n   * @param {Object} data of the document.\n   */\n  function shivMethods(ownerDocument, data) {\n    if (!data.cache) {\n        data.cache = {};\n        data.createElem = ownerDocument.createElement;\n        data.createFrag = ownerDocument.createDocumentFragment;\n        data.frag = data.createFrag();\n    }\n\n\n    ownerDocument.createElement = function(nodeName) {\n      //abort shiv\n      if (!html5.shivMethods) {\n          return data.createElem(nodeName);\n      }\n      return createElement(nodeName, ownerDocument, data);\n    };\n\n    ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +\n      'var n=f.cloneNode(),c=n.createElement;' +\n      'h.shivMethods&&(' +\n        // unroll the `createElement` calls\n        getElements().join().replace(/[\\w\\-:]+/g, function(nodeName) {\n          data.createElem(nodeName);\n          data.frag.createElement(nodeName);\n          return 'c(\"' + nodeName + '\")';\n        }) +\n      ');return n}'\n    )(html5, data.frag);\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Shivs the given document.\n   * @memberOf html5\n   * @param {Document} ownerDocument The document to shiv.\n   * @returns {Document} The shived document.\n   */\n  function shivDocument(ownerDocument) {\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    var data = getExpandoData(ownerDocument);\n\n    if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {\n      data.hasCSS = !!addStyleSheet(ownerDocument,\n        // corrects block display not defined in IE6/7/8/9\n        'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +\n        // adds styling not present in IE6/7/8/9\n        'mark{background:#FF0;color:#000}' +\n        // hides non-rendered elements\n        'template{display:none}'\n      );\n    }\n    if (!supportsUnknownElements) {\n      shivMethods(ownerDocument, data);\n    }\n    return ownerDocument;\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * The `html5` object is exposed so that more elements can be shived and\n   * existing shiving can be detected on iframes.\n   * @type Object\n   * @example\n   *\n   * // options can be changed before the script is included\n   * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };\n   */\n  var html5 = {\n\n    /**\n     * An array or space separated string of node names of the elements to shiv.\n     * @memberOf html5\n     * @type Array|String\n     */\n    'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',\n\n    /**\n     * current version of html5shiv\n     */\n    'version': version,\n\n    /**\n     * A flag to indicate that the HTML5 style sheet should be inserted.\n     * @memberOf html5\n     * @type Boolean\n     */\n    'shivCSS': (options.shivCSS !== false),\n\n    /**\n     * Is equal to true if a browser supports creating unknown/HTML5 elements\n     * @memberOf html5\n     * @type boolean\n     */\n    'supportsUnknownElements': supportsUnknownElements,\n\n    /**\n     * A flag to indicate that the document's `createElement` and `createDocumentFragment`\n     * methods should be overwritten.\n     * @memberOf html5\n     * @type Boolean\n     */\n    'shivMethods': (options.shivMethods !== false),\n\n    /**\n     * A string to describe the type of `html5` object (\"default\" or \"default print\").\n     * @memberOf html5\n     * @type String\n     */\n    'type': 'default',\n\n    // shivs the document according to the specified `html5` object options\n    'shivDocument': shivDocument,\n\n    //creates a shived element\n    createElement: createElement,\n\n    //creates a shived documentFragment\n    createDocumentFragment: createDocumentFragment,\n\n    //extends list of elements\n    addElements: addElements\n  };\n\n  /*--------------------------------------------------------------------------*/\n\n  // expose html5\n  window.html5 = html5;\n\n  // shiv the document\n  shivDocument(document);\n\n  /*------------------------------- Print Shiv -------------------------------*/\n\n  /** Used to filter media types */\n  var reMedia = /^$|\\b(?:all|print)\\b/;\n\n  /** Used to namespace printable elements */\n  var shivNamespace = 'html5shiv';\n\n  /** Detect whether the browser supports shivable style sheets */\n  var supportsShivableSheets = !supportsUnknownElements && (function() {\n    // assign a false negative if unable to shiv\n    var docEl = document.documentElement;\n    return !(\n      typeof document.namespaces == 'undefined' ||\n      typeof document.parentWindow == 'undefined' ||\n      typeof docEl.applyElement == 'undefined' ||\n      typeof docEl.removeNode == 'undefined' ||\n      typeof window.attachEvent == 'undefined'\n    );\n  }());\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Wraps all HTML5 elements in the given document with printable elements.\n   * (eg. the \"header\" element is wrapped with the \"html5shiv:header\" element)\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @returns {Array} An array wrappers added.\n   */\n  function addWrappers(ownerDocument) {\n    var node,\n        nodes = ownerDocument.getElementsByTagName('*'),\n        index = nodes.length,\n        reElements = RegExp('^(?:' + getElements().join('|') + ')$', 'i'),\n        result = [];\n\n    while (index--) {\n      node = nodes[index];\n      if (reElements.test(node.nodeName)) {\n        result.push(node.applyElement(createWrapper(node)));\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Creates a printable wrapper for the given element.\n   * @private\n   * @param {Element} element The element.\n   * @returns {Element} The wrapper.\n   */\n  function createWrapper(element) {\n    var node,\n        nodes = element.attributes,\n        index = nodes.length,\n        wrapper = element.ownerDocument.createElement(shivNamespace + ':' + element.nodeName);\n\n    // copy element attributes to the wrapper\n    while (index--) {\n      node = nodes[index];\n      node.specified && wrapper.setAttribute(node.nodeName, node.nodeValue);\n    }\n    // copy element styles to the wrapper\n    wrapper.style.cssText = element.style.cssText;\n    return wrapper;\n  }\n\n  /**\n   * Shivs the given CSS text.\n   * (eg. header{} becomes html5shiv\\:header{})\n   * @private\n   * @param {String} cssText The CSS text to shiv.\n   * @returns {String} The shived CSS text.\n   */\n  function shivCssText(cssText) {\n    var pair,\n        parts = cssText.split('{'),\n        index = parts.length,\n        reElements = RegExp('(^|[\\\\s,>+~])(' + getElements().join('|') + ')(?=[[\\\\s,>+~#.:]|$)', 'gi'),\n        replacement = '$1' + shivNamespace + '\\\\:$2';\n\n    while (index--) {\n      pair = parts[index] = parts[index].split('}');\n      pair[pair.length - 1] = pair[pair.length - 1].replace(reElements, replacement);\n      parts[index] = pair.join('}');\n    }\n    return parts.join('{');\n  }\n\n  /**\n   * Removes the given wrappers, leaving the original elements.\n   * @private\n   * @params {Array} wrappers An array of printable wrappers.\n   */\n  function removeWrappers(wrappers) {\n    var index = wrappers.length;\n    while (index--) {\n      wrappers[index].removeNode();\n    }\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Shivs the given document for print.\n   * @memberOf html5\n   * @param {Document} ownerDocument The document to shiv.\n   * @returns {Document} The shived document.\n   */\n  function shivPrint(ownerDocument) {\n    var shivedSheet,\n        wrappers,\n        data = getExpandoData(ownerDocument),\n        namespaces = ownerDocument.namespaces,\n        ownerWindow = ownerDocument.parentWindow;\n\n    if (!supportsShivableSheets || ownerDocument.printShived) {\n      return ownerDocument;\n    }\n    if (typeof namespaces[shivNamespace] == 'undefined') {\n      namespaces.add(shivNamespace);\n    }\n\n    function removeSheet() {\n      clearTimeout(data._removeSheetTimer);\n      if (shivedSheet) {\n          shivedSheet.removeNode(true);\n      }\n      shivedSheet= null;\n    }\n\n    ownerWindow.attachEvent('onbeforeprint', function() {\n\n      removeSheet();\n\n      var imports,\n          length,\n          sheet,\n          collection = ownerDocument.styleSheets,\n          cssText = [],\n          index = collection.length,\n          sheets = Array(index);\n\n      // convert styleSheets collection to an array\n      while (index--) {\n        sheets[index] = collection[index];\n      }\n      // concat all style sheet CSS text\n      while ((sheet = sheets.pop())) {\n        // IE does not enforce a same origin policy for external style sheets...\n        // but has trouble with some dynamically created stylesheets\n        if (!sheet.disabled && reMedia.test(sheet.media)) {\n\n          try {\n            imports = sheet.imports;\n            length = imports.length;\n          } catch(er){\n            length = 0;\n          }\n\n          for (index = 0; index < length; index++) {\n            sheets.push(imports[index]);\n          }\n\n          try {\n            cssText.push(sheet.cssText);\n          } catch(er){}\n        }\n      }\n\n      // wrap all HTML5 elements with printable elements and add the shived style sheet\n      cssText = shivCssText(cssText.reverse().join(''));\n      wrappers = addWrappers(ownerDocument);\n      shivedSheet = addStyleSheet(ownerDocument, cssText);\n\n    });\n\n    ownerWindow.attachEvent('onafterprint', function() {\n      // remove wrappers, leaving the original elements, and remove the shived style sheet\n      removeWrappers(wrappers);\n      clearTimeout(data._removeSheetTimer);\n      data._removeSheetTimer = setTimeout(removeSheet, 500);\n    });\n\n    ownerDocument.printShived = true;\n    return ownerDocument;\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  // expose API\n  html5.type += ' print';\n  html5.shivPrint = shivPrint;\n\n  // shiv for print\n  shivPrint(document);\n\n  if(typeof module == 'object' && module.exports){\n    module.exports = html5;\n  }\n\n}(typeof window !== \"undefined\" ? window : this, document));\n"
  },
  {
    "path": "src/html5shiv.js",
    "content": "/**\n* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed\n*/\n;(function(window, document) {\n/*jshint evil:true */\n  /** version */\n  var version = '3.7.3';\n\n  /** Preset options */\n  var options = window.html5 || {};\n\n  /** Used to skip problem elements */\n  var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;\n\n  /** Not all elements can be cloned in IE **/\n  var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;\n\n  /** Detect whether the browser supports default html5 styles */\n  var supportsHtml5Styles;\n\n  /** Name of the expando, to work with multiple documents or to re-shiv one document */\n  var expando = '_html5shiv';\n\n  /** The id for the the documents expando */\n  var expanID = 0;\n\n  /** Cached data for each document */\n  var expandoData = {};\n\n  /** Detect whether the browser supports unknown elements */\n  var supportsUnknownElements;\n\n  (function() {\n    try {\n        var a = document.createElement('a');\n        a.innerHTML = '<xyz></xyz>';\n        //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles\n        supportsHtml5Styles = ('hidden' in a);\n\n        supportsUnknownElements = a.childNodes.length == 1 || (function() {\n          // assign a false positive if unable to shiv\n          (document.createElement)('a');\n          var frag = document.createDocumentFragment();\n          return (\n            typeof frag.cloneNode == 'undefined' ||\n            typeof frag.createDocumentFragment == 'undefined' ||\n            typeof frag.createElement == 'undefined'\n          );\n        }());\n    } catch(e) {\n      // assign a false positive if detection fails => unable to shiv\n      supportsHtml5Styles = true;\n      supportsUnknownElements = true;\n    }\n\n  }());\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Creates a style sheet with the given CSS text and adds it to the document.\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @param {String} cssText The CSS text.\n   * @returns {StyleSheet} The style element.\n   */\n  function addStyleSheet(ownerDocument, cssText) {\n    var p = ownerDocument.createElement('p'),\n        parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;\n\n    p.innerHTML = 'x<style>' + cssText + '</style>';\n    return parent.insertBefore(p.lastChild, parent.firstChild);\n  }\n\n  /**\n   * Returns the value of `html5.elements` as an array.\n   * @private\n   * @returns {Array} An array of shived element node names.\n   */\n  function getElements() {\n    var elements = html5.elements;\n    return typeof elements == 'string' ? elements.split(' ') : elements;\n  }\n\n  /**\n   * Extends the built-in list of html5 elements\n   * @memberOf html5\n   * @param {String|Array} newElements whitespace separated list or array of new element names to shiv\n   * @param {Document} ownerDocument The context document.\n   */\n  function addElements(newElements, ownerDocument) {\n    var elements = html5.elements;\n    if(typeof elements != 'string'){\n      elements = elements.join(' ');\n    }\n    if(typeof newElements != 'string'){\n      newElements = newElements.join(' ');\n    }\n    html5.elements = elements +' '+ newElements;\n    shivDocument(ownerDocument);\n  }\n\n   /**\n   * Returns the data associated to the given document\n   * @private\n   * @param {Document} ownerDocument The document.\n   * @returns {Object} An object of data.\n   */\n  function getExpandoData(ownerDocument) {\n    var data = expandoData[ownerDocument[expando]];\n    if (!data) {\n        data = {};\n        expanID++;\n        ownerDocument[expando] = expanID;\n        expandoData[expanID] = data;\n    }\n    return data;\n  }\n\n  /**\n   * returns a shived element for the given nodeName and document\n   * @memberOf html5\n   * @param {String} nodeName name of the element\n   * @param {Document|DocumentFragment} ownerDocument The context document.\n   * @returns {Object} The shived element.\n   */\n  function createElement(nodeName, ownerDocument, data){\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    if(supportsUnknownElements){\n        return ownerDocument.createElement(nodeName);\n    }\n    if (!data) {\n        data = getExpandoData(ownerDocument);\n    }\n    var node;\n\n    if (data.cache[nodeName]) {\n        node = data.cache[nodeName].cloneNode();\n    } else if (saveClones.test(nodeName)) {\n        node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();\n    } else {\n        node = data.createElem(nodeName);\n    }\n\n    // Avoid adding some elements to fragments in IE < 9 because\n    // * Attributes like `name` or `type` cannot be set/changed once an element\n    //   is inserted into a document/fragment\n    // * Link elements with `src` attributes that are inaccessible, as with\n    //   a 403 response, will cause the tab/window to crash\n    // * Script elements appended to fragments will execute when their `src`\n    //   or `text` property is set\n    return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;\n  }\n\n  /**\n   * returns a shived DocumentFragment for the given document\n   * @memberOf html5\n   * @param {Document} ownerDocument The context document.\n   * @returns {Object} The shived DocumentFragment.\n   */\n  function createDocumentFragment(ownerDocument, data){\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    if(supportsUnknownElements){\n        return ownerDocument.createDocumentFragment();\n    }\n    data = data || getExpandoData(ownerDocument);\n    var clone = data.frag.cloneNode(),\n        i = 0,\n        elems = getElements(),\n        l = elems.length;\n    for(;i<l;i++){\n        clone.createElement(elems[i]);\n    }\n    return clone;\n  }\n\n  /**\n   * Shivs the `createElement` and `createDocumentFragment` methods of the document.\n   * @private\n   * @param {Document|DocumentFragment} ownerDocument The document.\n   * @param {Object} data of the document.\n   */\n  function shivMethods(ownerDocument, data) {\n    if (!data.cache) {\n        data.cache = {};\n        data.createElem = ownerDocument.createElement;\n        data.createFrag = ownerDocument.createDocumentFragment;\n        data.frag = data.createFrag();\n    }\n\n\n    ownerDocument.createElement = function(nodeName) {\n      //abort shiv\n      if (!html5.shivMethods) {\n          return data.createElem(nodeName);\n      }\n      return createElement(nodeName, ownerDocument, data);\n    };\n\n    ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +\n      'var n=f.cloneNode(),c=n.createElement;' +\n      'h.shivMethods&&(' +\n        // unroll the `createElement` calls\n        getElements().join().replace(/[\\w\\-:]+/g, function(nodeName) {\n          data.createElem(nodeName);\n          data.frag.createElement(nodeName);\n          return 'c(\"' + nodeName + '\")';\n        }) +\n      ');return n}'\n    )(html5, data.frag);\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Shivs the given document.\n   * @memberOf html5\n   * @param {Document} ownerDocument The document to shiv.\n   * @returns {Document} The shived document.\n   */\n  function shivDocument(ownerDocument) {\n    if (!ownerDocument) {\n        ownerDocument = document;\n    }\n    var data = getExpandoData(ownerDocument);\n\n    if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {\n      data.hasCSS = !!addStyleSheet(ownerDocument,\n        // corrects block display not defined in IE6/7/8/9\n        'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +\n        // adds styling not present in IE6/7/8/9\n        'mark{background:#FF0;color:#000}' +\n        // hides non-rendered elements\n        'template{display:none}'\n      );\n    }\n    if (!supportsUnknownElements) {\n      shivMethods(ownerDocument, data);\n    }\n    return ownerDocument;\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * The `html5` object is exposed so that more elements can be shived and\n   * existing shiving can be detected on iframes.\n   * @type Object\n   * @example\n   *\n   * // options can be changed before the script is included\n   * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };\n   */\n  var html5 = {\n\n    /**\n     * An array or space separated string of node names of the elements to shiv.\n     * @memberOf html5\n     * @type Array|String\n     */\n    'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',\n\n    /**\n     * current version of html5shiv\n     */\n    'version': version,\n\n    /**\n     * A flag to indicate that the HTML5 style sheet should be inserted.\n     * @memberOf html5\n     * @type Boolean\n     */\n    'shivCSS': (options.shivCSS !== false),\n\n    /**\n     * Is equal to true if a browser supports creating unknown/HTML5 elements\n     * @memberOf html5\n     * @type boolean\n     */\n    'supportsUnknownElements': supportsUnknownElements,\n\n    /**\n     * A flag to indicate that the document's `createElement` and `createDocumentFragment`\n     * methods should be overwritten.\n     * @memberOf html5\n     * @type Boolean\n     */\n    'shivMethods': (options.shivMethods !== false),\n\n    /**\n     * A string to describe the type of `html5` object (\"default\" or \"default print\").\n     * @memberOf html5\n     * @type String\n     */\n    'type': 'default',\n\n    // shivs the document according to the specified `html5` object options\n    'shivDocument': shivDocument,\n\n    //creates a shived element\n    createElement: createElement,\n\n    //creates a shived documentFragment\n    createDocumentFragment: createDocumentFragment,\n\n    //extends list of elements\n    addElements: addElements\n  };\n\n  /*--------------------------------------------------------------------------*/\n\n  // expose html5\n  window.html5 = html5;\n\n  // shiv the document\n  shivDocument(document);\n\n  if(typeof module == 'object' && module.exports){\n    module.exports = html5;\n  }\n\n}(typeof window !== \"undefined\" ? window : this, document));\n"
  },
  {
    "path": "test/data/iframed-tests.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>iframe tests</title>\n\t\t\n\t\t\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tbackground: url(body-crash.jpg) no-repeat -999px -999px;\n\t\t\t}\n\t\t\tarticle {\n\t\t\t\tborder: 2px solid #8C8;\n\t\t\t}\n\t\t</style>\n\t\t<script>\n\t\t\t(function(){\n\t\t\t\twindow.querys = {};\n\t\t\t\tvar name;\n\t\t\t\tvar search= location.search.replace('?', '');\n\t\t\t\tif(search){\n\t\t\t\t\tsearch = search.split('&');\n\t\t\t\t\tfor(var i = 0; i < search.length; i++){\n\t\t\t\t\t\tname = search[i].split('=');\n\t\t\t\t\t\tquerys[name[0]] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})();\n\t\t</script>\n\t\t<script>\n\t\t\tif(querys.disableMethodsBefore){\n\t\t\t\tif(!window.html5){\n\t\t\t\t\twindow.html5 = {};\n\t\t\t\t}\n\t\t\t\twindow.html5.shivMethods = false;\n\t\t\t}\n\t\t\tif(querys.disableCSS){\n\t\t\t\tif(!window.html5){\n\t\t\t\t\twindow.html5 = {};\n\t\t\t\t}\n\t\t\t\twindow.html5.shivCSS = false;\n\t\t\t}\n\t\t\tif(querys.addUnknownBefore){\n\t\t\t\tif(!window.html5){\n\t\t\t\t\twindow.html5 = {};\n\t\t\t\t}\n\t\t\t\twindow.html5.elements = 'abcxyz abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output picture progress section summary time video';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(!querys.noEmbed){\n\t\t\t\tdocument.write('<script src=\"..\\/..\\/src\\/html5shiv-printshiv.js\"><\\/script>');\n\t\t\t}\n\t\t</script>\n\t\t<script>\n\t\t\n\t\t\tif(querys.disableMethodsAfter){\n\t\t\t\twindow.html5.shivMethods = false;\n\t\t\t}\n\t\t\t\n\t\t\tif(querys.addUnknownAfter){\n\t\t\t\twindow.html5.elements = 'abcxyz abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output picture progress section summary time video';\n\t\t\t\thtml5.shivDocument(document);\n\t\t\t}\n\t\t</script>\n\t\t\n\t</head>\n\t<body>\n\t\t<div id=\"qunit-fixture\">\n\t\t\t<abcxyz>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</abcxyz>\n\t\t\t<article>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</article>\n\t\t\t<aside>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</aside>\n\t\t\t<figcaption>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</figcaption>\n\t\t\t<figure>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</figure>\n\t\t\t<footer>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</footer>\n\t\t\t<header>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</header>\n\t\t\t<hgroup>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</hgroup>\n\t\t\t<nav>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</nav>\n\t\t\t<section>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</section>\n\t\t\t\n\t\t</div>\n\t</body>\n</html>"
  },
  {
    "path": "test/data/inline-mixed-media.css",
    "content": "@media screen, handheld {\n\tarticle.inline-mixed-media {\n\t\tborder: 5px solid #000;\n\t}\n}\n\n@media print  {\n\tarticle.inline-mixed-media {\n\t\tborder: 5px dotted #000;\n\t}\n}"
  },
  {
    "path": "test/data/inline-print-media.css",
    "content": ".inline-print-media form {\n\tborder: 5px solid #000;\n}\n@media print  {\n\t.inline-print-media form {\n\t\tborder: 5px dotted #000;\n\t}\n}\n"
  },
  {
    "path": "test/data/no-print.css",
    "content": "article:before {\n   content: \"isfnotorprint\";\n   isfnotorprint: true;\n}\narticle {\n   content: \"isfnotorprint\";\n   isfnotorprint: true;\n}"
  },
  {
    "path": "test/data/print-styles.css",
    "content": ".print-styles article {\n\tborder: 5px dotted #000;\n}\n@media print {\n\tarticle.print-styles-print {\n\t\tborder: 5px dotted #000;\n\t}\n}\n"
  },
  {
    "path": "test/data/print.css",
    "content": "article.print {\n\tborder: 5px dotted #000;\n}"
  },
  {
    "path": "test/data/screen.css",
    "content": "article.print {\n\tborder: 5px solid #000;\n}\n.print-styles article {\n\tborder: 5px solid #000;\n}\narticle.print-styles-print {\n\tborder: 5px solid #000;\n}"
  },
  {
    "path": "test/highcharts/area-basic.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>Highcharts Example</title>\n\t\t<script src=\"../../src/html5shiv-printshiv.js\"></script>\n\t\t<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js\"></script>\n\t\t<script src=\"highcharts.js\"></script>\n\t</head>\n\t<body>\n\t\t<div id=\"container\" style=\"width:800px;height:400px;margin:0 auto\"></div>\n\t\t<script>\n\t\t\tnew Highcharts.Chart({\n\t\t\t\t'chart': {\n\t\t\t\t\t'renderTo': 'container',\n\t\t\t\t\t'defaultSeriesType': 'area'\n\t\t\t\t},\n\t\t\t\t'title': {\n\t\t\t\t\t'text': 'US and USSR nuclear stockpiles'\n\t\t\t\t},\n\t\t\t\t'subtitle': {\n\t\t\t\t\t'text': 'Source: <a href=\"http://thebulletin.metapress.com/content/c4120650912x74k7/fulltext.pdf\">'+\n\t\t\t\t\t\t'thebulletin.metapress.com</a>'\n\t\t\t\t},\n\t\t\t\t'xAxis': {\n\t\t\t\t\t'labels': {\n\t\t\t\t\t\t'formatter': function() {\n\t\t\t\t\t\t\treturn this.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'yAxis': {\n\t\t\t\t\t'title': {\n\t\t\t\t\t\t'text': 'Nuclear weapon states'\n\t\t\t\t\t},\n\t\t\t\t\t'labels': {\n\t\t\t\t\t\t'formatter': function() {\n\t\t\t\t\t\t\treturn this.value / 1000 +'k';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'tooltip': {\n\t\t\t\t\t'formatter': function() {\n\t\t\t\t\t\treturn this.series.name +' produced <b>'+\n\t\t\t\t\t\t\tHighcharts.numberFormat(this.y, 0) +'</b><br/>warheads in '+ this.x;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'plotOptions': {\n\t\t\t\t\t'area': {\n\t\t\t\t\t\t'pointStart': 1940,\n\t\t\t\t\t\t'marker': {\n\t\t\t\t\t\t\t'enabled': false,\n\t\t\t\t\t\t\t'symbol': 'circle',\n\t\t\t\t\t\t\t'radius': 2,\n\t\t\t\t\t\t\t'states': {\n\t\t\t\t\t\t\t\t'hover': {\n\t\t\t\t\t\t\t\t\t'enabled': true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'series': [{\n\t\t\t\t\t'name': 'USA',\n\t\t\t\t\t'data': [null, null, null, null, null, 6 , 11, 32, 110, 235, 369, 640,\n\t\t\t\t\t\t1005, 1436, 2063, 3057, 4618, 6444, 9822, 15468, 20434, 24126,\n\t\t\t\t\t\t27387, 29459, 31056, 31982, 32040, 31233, 29224, 27342, 26662,\n\t\t\t\t\t\t26956, 27912, 28999, 28965, 27826, 25579, 25722, 24826, 24605,\n\t\t\t\t\t\t24304, 23464, 23708, 24099, 24357, 24237, 24401, 24344, 23586,\n\t\t\t\t\t\t22380, 21004, 17287, 14747, 13076, 12555, 12144, 11009, 10950,\n\t\t\t\t\t\t10871, 10824, 10577, 10527, 10475, 10421, 10358, 10295, 10104 ]\n\t\t\t\t}, {\n\t\t\t\t\t'name': 'USSR/Russia',\n\t\t\t\t\t'data': [null, null, null, null, null, null, null , null, null, null,\n\t\t\t\t\t5, 25, 50, 120, 150, 200, 426, 660, 869, 1060, 1605, 2471, 3322,\n\t\t\t\t\t4238, 5221, 6129, 7089, 8339, 9399, 10538, 11643, 13092, 14478,\n\t\t\t\t\t15915, 17385, 19055, 21205, 23044, 25393, 27935, 30062, 32049,\n\t\t\t\t\t33952, 35804, 37431, 39197, 45000, 43000, 41000, 39000, 37000,\n\t\t\t\t\t35000, 33000, 31000, 29000, 27000, 25000, 24000, 23000, 22000,\n\t\t\t\t\t21000, 20000, 19000, 18000, 18000, 17000, 16000]\n\t\t\t\t}]\n\t\t\t});\n\t\t</script>\n\t</body>\n</html>"
  },
  {
    "path": "test/highcharts/highcharts.js",
    "content": "/*\n Highcharts JS v2.1.9 (2011-11-11)\n\n (c) 2009-2011 Torstein H?nsi\n\n License: www.highcharts.com/license\n*/\n(function(){function sa(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ja(a,b){return parseInt(a,b||10)}function Sb(a){return typeof a===\"string\"}function Nb(a){return typeof a===\"object\"}function lc(a){return typeof a===\"number\"}function mc(a){return Fa.log(a)/Fa.LN10}function nc(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function K(a){return a!==Wa&&a!==null}function Ga(a,b,c){var d,e;if(Sb(b))if(K(c))a.setAttribute(b,c);else{if(a&&a.getAttribute)e=a.getAttribute(b)}else if(K(b)&&\nNb(b))for(d in b)a.setAttribute(d,b[d]);return e}function zc(a){return Object.prototype.toString.call(a)===\"[object Array]\"?a:[a]}function A(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++){c=a[b];if(typeof c!==\"undefined\"&&c!==null)return c}}function Ja(a,b){if(Pc)if(b&&b.opacity!==Wa)b.filter=\"alpha(opacity=\"+b.opacity*100+\")\";sa(a.style,b)}function hb(a,b,c,d,e){a=ua.createElement(a);b&&sa(a,b);e&&Ja(a,{padding:0,border:jb,margin:0});c&&Ja(a,c);d&&d.appendChild(a);return a}function yb(a,b){var c=\nfunction(){};c.prototype=new a;sa(c.prototype,b);return c}function Ed(a,b,c,d){var e=Xa.lang;a=a;var f=isNaN(b=bb(b))?2:b;b=c===undefined?e.decimalPoint:c;d=d===undefined?e.thousandsSep:d;e=a<0?\"-\":\"\";c=String(ja(a=bb(+a||0).toFixed(f)));var g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:\"\")+c.substr(g).replace(/(\\d{3})(?=\\d)/g,\"$1\"+d)+(f?b+bb(a-c).toFixed(f).slice(2):\"\")}function Fd(a){var b={left:a.offsetLeft,top:a.offsetTop};for(a=a.offsetParent;a;){b.left+=a.offsetLeft;b.top+=a.offsetTop;\nif(a!==ua.body&&a!==ua.documentElement){b.left-=a.scrollLeft;b.top-=a.scrollTop}a=a.offsetParent}return b}function Gd(){this.symbol=this.color=0}function fe(a,b,c,d,e,f,g){var h=g.x;g=g.y;var i=h-a+c-25,j=g-b+d+10,m;if(i<7)i=c+h+15;if(i+a>c+e){i-=i+a-(c+e);j-=b;m=true}if(j<5){j=5;if(m&&g>=j&&g<=j+b)j=g+b-5}else if(j+b>d+f)j=d+f-b-5;return{x:i,y:j}}function Hd(a,b){var c=a.length,d;for(d=0;d<c;d++)a[d].ss_i=d;a.sort(function(e,f){var g=b(e,f);return g===0?e.ss_i-f.ss_i:g});for(d=0;d<c;d++)delete a[d].ss_i}\nfunction Ac(a){for(var b in a){a[b]&&a[b].destroy&&a[b].destroy();delete a[b]}}function oc(a,b){Bc=A(a,b.animation)}function Id(){var a=Xa.global.useUTC;Qc=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,A(d,1),A(e,0),A(f,0),A(g,0))).getTime()};id=a?\"getUTCMinutes\":\"getMinutes\";jd=a?\"getUTCHours\":\"getHours\";kd=a?\"getUTCDay\":\"getDay\";Cc=a?\"getUTCDate\":\"getDate\";Rc=a?\"getUTCMonth\":\"getMonth\";Sc=a?\"getUTCFullYear\":\"getFullYear\";Jd=a?\"setUTCMinutes\":\"setMinutes\";Kd=a?\"setUTCHours\":\"setHours\";ld=\na?\"setUTCDate\":\"setDate\";Ld=a?\"setUTCMonth\":\"setMonth\";Md=a?\"setUTCFullYear\":\"setFullYear\"}function pc(a){Tc||(Tc=hb(Tb));a&&Tc.appendChild(a);Tc.innerHTML=\"\"}function Uc(){}function Nd(a,b){function c(p){function q(k,n){this.pos=k;this.minor=n;this.isNew=true;n||this.addLabel()}function w(k){if(k){this.options=k;this.id=k.id}return this}function x(k,n,t,r){this.isNegative=n;this.options=k;this.x=t;this.stack=r;this.alignOptions={align:k.align||(va?n?\"left\":\"right\":\"center\"),verticalAlign:k.verticalAlign||\n(va?\"middle\":n?\"bottom\":\"top\"),y:A(k.y,va?4:n?14:-6),x:A(k.x,va?n?-6:6:0)};this.textAlign=k.textAlign||(va?n?\"right\":\"left\":\"center\")}function V(){var k=[],n=[],t;pa=wa=null;zb=[];u(Ha,function(r){t=false;u([\"xAxis\",\"yAxis\"],function(F){if(r.isCartesian&&(F===\"xAxis\"&&xa||F===\"yAxis\"&&!xa)&&(r.options[F]===o.index||r.options[F]===Wa&&o.index===0)){r[F]=I;zb.push(r);t=true}});if(!r.visible&&z.ignoreHiddenSeries)t=false;if(t){var J,E,Q,fa,ka,$;if(!xa){J=r.options.stacking;Vc=J===\"percent\";if(J){ka=\nr.options.stack;fa=r.type+A(ka,\"\");$=\"-\"+fa;r.stackKey=fa;E=k[fa]||[];k[fa]=E;Q=n[$]||[];n[$]=Q}if(Vc){pa=0;wa=99}}if(r.isCartesian){u(r.data,function(F){var O=F.x,S=F.y,aa=S<0,Eb=aa?Q:E,kb=aa?$:fa;if(pa===null)pa=wa=F[qa];if(xa)if(O>wa)wa=O;else{if(O<pa)pa=O}else if(K(S)){if(J)Eb[O]=K(Eb[O])?Eb[O]+S:S;S=Eb?Eb[O]:S;F=A(F.low,S);if(!Vc)if(S>wa)wa=S;else if(F<pa)pa=F;if(J){s[kb]||(s[kb]={});s[kb][O]||(s[kb][O]=new x(o.stackLabels,aa,O,ka));s[kb][O].setTotal(S)}}});if(/(area|column|bar)/.test(r.type)&&\n!xa)if(pa>=0){pa=0;Od=true}else if(wa<0){wa=0;Pd=true}}}})}function N(k,n){var t,r;Fb=n?1:Fa.pow(10,lb(Fa.log(k)/Fa.LN10));t=k/Fb;if(!n){n=[1,2,2.5,5,10];if(o.allowDecimals===false||ca)if(Fb===1)n=[1,2,5,10];else if(Fb<=0.1)n=[1/Fb]}for(r=0;r<n.length;r++){k=n[r];if(t<=(n[r]+(n[r+1]||n[r]))/2)break}k*=Fb;return k}function ta(k){var n;n=k;Fb=A(Fb,Fa.pow(10,lb(Fa.log(Ta)/Fa.LN10)));if(Fb<1){n=W(1/Fb)*10;n=W(k*n)/n}return n}function da(){var k,n,t,r,J=o.tickInterval,E=o.tickPixelInterval;k=o.maxZoom||\n(xa&&!K(o.min)&&!K(o.max)?tb(l.smallestInterval*5,wa-pa):null);ya=R?Da:Aa;if(Ub){t=l[xa?\"xAxis\":\"yAxis\"][o.linkedTo];r=t.getExtremes();ia=A(r.min,r.dataMin);ra=A(r.max,r.dataMax)}else{ia=A(Vb,o.min,pa);ra=A(Gb,o.max,wa)}if(ca){ia=mc(ia);ra=mc(ra)}if(ra-ia<k){r=(k-ra+ia)/2;ia=Ia(ia-r,A(o.min,ia-r),pa);ra=tb(ia+k,A(o.max,ia+k),wa)}if(!Ya&&!Vc&&!Ub&&K(ia)&&K(ra)){k=ra-ia||1;if(!K(o.min)&&!K(Vb)&&Qd&&(pa<0||!Od))ia-=k*Qd;if(!K(o.max)&&!K(Gb)&&Rd&&(wa>0||!Pd))ra+=k*Rd}Ta=ia===ra?1:Ub&&!J&&E===t.options.tickPixelInterval?\nt.tickInterval:A(J,Ya?1:(ra-ia)*E/ya);if(!D&&!K(o.tickInterval))Ta=N(Ta);I.tickInterval=Ta;Wc=o.minorTickInterval===\"auto\"&&Ta?Ta/5:o.minorTickInterval;if(D){Ba=[];J=Xa.global.useUTC;var Q=1E3/ub,fa=6E4/ub,ka=36E5/ub;E=864E5/ub;k=6048E5/ub;r=2592E6/ub;var $=31556952E3/ub,F=[[\"second\",Q,[1,2,5,10,15,30]],[\"minute\",fa,[1,2,5,10,15,30]],[\"hour\",ka,[1,2,3,4,6,8,12]],[\"day\",E,[1,2]],[\"week\",k,[1,2]],[\"month\",r,[1,2,3,4,6]],[\"year\",$,null]],O=F[6],S=O[1],aa=O[2];for(t=0;t<F.length;t++){O=F[t];S=O[1];aa=\nO[2];if(F[t+1])if(Ta<=(S*aa[aa.length-1]+F[t+1][1])/2)break}if(S===$&&Ta<5*S)aa=[1,2,5];F=N(Ta/S,aa);aa=new Date(ia*ub);aa.setMilliseconds(0);if(S>=Q)aa.setSeconds(S>=fa?0:F*lb(aa.getSeconds()/F));if(S>=fa)aa[Jd](S>=ka?0:F*lb(aa[id]()/F));if(S>=ka)aa[Kd](S>=E?0:F*lb(aa[jd]()/F));if(S>=E)aa[ld](S>=r?1:F*lb(aa[Cc]()/F));if(S>=r){aa[Ld](S>=$?0:F*lb(aa[Rc]()/F));n=aa[Sc]()}if(S>=$){n-=n%F;aa[Md](n)}S===k&&aa[ld](aa[Cc]()-aa[kd]()+o.startOfWeek);t=1;n=aa[Sc]();Q=aa.getTime()/ub;fa=aa[Rc]();for(ka=aa[Cc]();Q<\nra&&t<Da;){Ba.push(Q);if(S===$)Q=Qc(n+t*F,0)/ub;else if(S===r)Q=Qc(n,fa+t*F)/ub;else if(!J&&(S===E||S===k))Q=Qc(n,fa,ka+t*F*(S===E?1:7));else Q+=S*F;t++}Ba.push(Q);Xc=o.dateTimeLabelFormats[O[0]]}else{t=ta(lb(ia/Ta)*Ta);n=ta(md(ra/Ta)*Ta);Ba=[];for(t=ta(t);t<=n;){Ba.push(t);t=ta(t+Ta)}}if(!Ub){if(Ya||xa&&l.hasColumn){n=(Ya?1:Ta)*0.5;if(Ya||!K(A(o.min,Vb)))ia-=n;if(Ya||!K(A(o.max,Gb)))ra+=n}n=Ba[0];t=Ba[Ba.length-1];if(o.startOnTick)ia=n;else ia>n&&Ba.shift();if(o.endOnTick)ra=t;else ra<t&&Ba.pop();\nOb||(Ob={x:0,y:0});if(!D&&Ba.length>Ob[qa])Ob[qa]=Ba.length}}function Ma(){var k,n;Dc=ia;Sd=ra;V();da();Hb=fb;fb=ya/(ra-ia||1);if(!xa)for(k in s)for(n in s[k])s[k][n].cum=s[k][n].total;if(!I.isDirty)I.isDirty=ia!==Dc||ra!==Sd}function za(k){k=(new w(k)).render();Pb.push(k);return k}function eb(){var k=o.title,n=o.stackLabels,t=o.alternateGridColor,r=o.lineWidth,J,E,Q=(J=l.hasRendered)&&K(Dc)&&!isNaN(Dc);E=zb.length&&K(ia)&&K(ra);ya=R?Da:Aa;fb=ya/(ra-ia||1);cc=R?X:vb;if(E||Ub){if(Wc&&!Ya)for(E=ia+\n(Ba[0]-ia)%Wc;E<=ra;E+=Wc){Wb[E]||(Wb[E]=new q(E,true));Q&&Wb[E].isNew&&Wb[E].render(null,true);Wb[E].isActive=true;Wb[E].render()}u(Ba,function($,F){if(!Ub||$>=ia&&$<=ra){Q&&mb[$].isNew&&mb[$].render(F,true);mb[$].isActive=true;mb[$].render(F)}});t&&u(Ba,function($,F){if(F%2===0&&$<ra){dc[$]||(dc[$]=new w);dc[$].options={from:$,to:Ba[F+1]!==Wa?Ba[F+1]:ra,color:t};dc[$].render();dc[$].isActive=true}});J||u((o.plotLines||[]).concat(o.plotBands||[]),function($){Pb.push((new w($)).render())})}u([mb,\nWb,dc],function($){for(var F in $)if($[F].isActive)$[F].isActive=false;else{$[F].destroy();delete $[F]}});if(r){J=X+(Oa?Da:0)+la;E=cb-vb-(Oa?Aa:0)+la;J=ga.crispLine([Za,R?X:J,R?E:ea,Ka,R?$a-Ib:J,R?E:cb-vb],r);if(La)La.animate({d:J});else La=ga.path(J).attr({stroke:o.lineColor,\"stroke-width\":r,zIndex:7}).add()}if(ba){J=R?X:ea;r=ja(k.style.fontSize||12);J={low:J+(R?0:ya),middle:J+ya/2,high:J+(R?ya:0)}[k.align];r=(R?ea+Aa:X)+(R?1:-1)*(Oa?-1:1)*nd+(L===2?r:0);ba[ba.isNew?\"attr\":\"animate\"]({x:R?J:r+(Oa?\nDa:0)+la+(k.x||0),y:R?r-(Oa?Aa:0)+la:J+(k.y||0)});ba.isNew=false}if(n&&n.enabled){var fa,ka;n=I.stackTotalGroup;if(!n)I.stackTotalGroup=n=ga.g(\"stack-labels\").attr({visibility:Ab,zIndex:6}).translate(X,ea).add();for(fa in s){k=s[fa];for(ka in k)k[ka].render(n)}}I.isDirty=false}function ab(k){for(var n=Pb.length;n--;)Pb[n].id===k&&Pb[n].destroy()}var xa=p.isX,Oa=p.opposite,R=va?!xa:xa,L=R?Oa?0:2:Oa?1:3,s={},o=Ca(xa?Yc:od,[ge,he,Td,ie][L],p),I=this,ba,B=o.type,D=B===\"datetime\",ca=B===\"logarithmic\",\nla=o.offset||0,qa=xa?\"x\":\"y\",ya,fb,Hb,cc=R?X:vb,G,ha,na,Ra,La,pa,wa,zb,Vb,Gb,ra=null,ia=null,Dc,Sd,Qd=o.minPadding,Rd=o.maxPadding,Ub=K(o.linkedTo),Od,Pd,Vc;B=o.events;var pd,Pb=[],Ta,Wc,Fb,Ba,mb={},Wb={},dc={},qc,rc,nd,Xc,Ya=o.categories,je=o.labels.formatter||function(){var k=this.value;return Xc?Zc(Xc,k):Ta%1E6===0?k/1E6+\"M\":Ta%1E3===0?k/1E3+\"k\":!Ya&&k>=1E3?Ed(k,0):k},$c=R&&o.labels.staggerLines,ec=o.reversed,fc=Ya&&o.tickmarkPlacement===\"between\"?0.5:0;q.prototype={addLabel:function(){var k=this.pos,\nn=o.labels,t=!(k===ia&&!A(o.showFirstLabel,1)||k===ra&&!A(o.showLastLabel,0)),r=Ya&&R&&Ya.length&&!n.step&&!n.staggerLines&&!n.rotation&&Da/Ya.length||!R&&Da/2,J=Ya&&K(Ya[k])?Ya[k]:k,E=this.label;k=je.call({isFirst:k===Ba[0],isLast:k===Ba[Ba.length-1],dateTimeLabelFormat:Xc,value:ca?Fa.pow(10,J):J});r=r&&{width:Ia(1,W(r-2*(n.padding||10)))+Ua};r=sa(r,n.style);if(E===Wa)this.label=K(k)&&t&&n.enabled?ga.text(k,0,0,n.useHTML).attr({align:n.align,rotation:n.rotation}).css(r).add(na):null;else E&&E.attr({text:k}).css(r)},\ngetLabelSize:function(){var k=this.label;return k?(this.labelBBox=k.getBBox())[R?\"height\":\"width\"]:0},render:function(k,n){var t=!this.minor,r=this.label,J=this.pos,E=o.labels,Q=this.gridLine,fa=t?o.gridLineWidth:o.minorGridLineWidth,ka=t?o.gridLineColor:o.minorGridLineColor,$=t?o.gridLineDashStyle:o.minorGridLineDashStyle,F=this.mark,O=t?o.tickLength:o.minorTickLength,S=t?o.tickWidth:o.minorTickWidth||0,aa=t?o.tickColor:o.minorTickColor,Eb=t?o.tickPosition:o.minorTickPosition,kb=E.step,nb=n&&ad||\ncb,Qb;Qb=R?G(J+fc,null,null,n)+cc:X+la+(Oa?(n&&qd||$a)-Ib-X:0);nb=R?nb-vb+la-(Oa?Aa:0):nb-G(J+fc,null,null,n)-cc;if(fa){J=ha(J+fc,fa,n);if(Q===Wa){Q={stroke:ka,\"stroke-width\":fa};if($)Q.dashstyle=$;if(t)Q.zIndex=1;this.gridLine=Q=fa?ga.path(J).attr(Q).add(Ra):null}!n&&Q&&J&&Q.animate({d:J})}if(S){if(Eb===\"inside\")O=-O;if(Oa)O=-O;t=ga.crispLine([Za,Qb,nb,Ka,Qb+(R?0:-O),nb+(R?O:0)],S);if(F)F.animate({d:t});else this.mark=ga.path(t).attr({stroke:aa,\"stroke-width\":S}).add(na)}if(r&&!isNaN(Qb)){Qb=Qb+\nE.x-(fc&&R?fc*fb*(ec?-1:1):0);nb=nb+E.y-(fc&&!R?fc*fb*(ec?1:-1):0);K(E.y)||(nb+=ja(r.styles.lineHeight)*0.9-r.getBBox().height/2);if($c)nb+=k/(kb||1)%$c*16;if(kb)r[k%kb?\"hide\":\"show\"]();r[this.isNew?\"attr\":\"animate\"]({x:Qb,y:nb})}this.isNew=false},destroy:function(){Ac(this)}};w.prototype={render:function(){var k=this,n=k.options,t=n.label,r=k.label,J=n.width,E=n.to,Q=n.from,fa=n.value,ka,$=n.dashStyle,F=k.svgElem,O=[],S,aa,Eb=n.color;aa=n.zIndex;var kb=n.events;if(ca){Q=mc(Q);E=mc(E);fa=mc(fa)}if(J){O=\nha(fa,J);n={stroke:Eb,\"stroke-width\":J};if($)n.dashstyle=$}else if(K(Q)&&K(E)){Q=Ia(Q,ia);E=tb(E,ra);ka=ha(E);if((O=ha(Q))&&ka)O.push(ka[4],ka[5],ka[1],ka[2]);else O=null;n={fill:Eb}}else return;if(K(aa))n.zIndex=aa;if(F)if(O)F.animate({d:O},null,F.onGetPath);else{F.hide();F.onGetPath=function(){F.show()}}else if(O&&O.length){k.svgElem=F=ga.path(O).attr(n).add();if(kb){$=function(nb){F.on(nb,function(Qb){kb[nb].apply(k,[Qb])})};for(S in kb)$(S)}}if(t&&K(t.text)&&O&&O.length&&Da>0&&Aa>0){t=Ca({align:R&&\nka&&\"center\",x:R?!ka&&4:10,verticalAlign:!R&&ka&&\"middle\",y:R?ka?16:10:ka?6:-4,rotation:R&&!ka&&90},t);if(!r)k.label=r=ga.text(t.text,0,0).attr({align:t.textAlign||t.align,rotation:t.rotation,zIndex:aa}).css(t.style).add();ka=[O[1],O[4],A(O[6],O[1])];O=[O[2],O[5],A(O[7],O[2])];S=tb.apply(Fa,ka);aa=tb.apply(Fa,O);r.align(t,false,{x:S,y:aa,width:Ia.apply(Fa,ka)-S,height:Ia.apply(Fa,O)-aa});r.show()}else r&&r.hide();return k},destroy:function(){Ac(this);nc(Pb,this)}};x.prototype={destroy:function(){Ac(this)},\nsetTotal:function(k){this.cum=this.total=k},render:function(k){var n=this.options.formatter.call(this);if(this.label)this.label.attr({text:n,visibility:ob});else this.label=l.renderer.text(n,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:ob}).add(k)},setOffset:function(k,n){var t=this.isNegative,r=I.translate(this.total),J=I.translate(0);J=bb(r-J);var E=l.xAxis[0].translate(this.x)+k,Q=l.plotHeight;t={x:va?t?r:r-J:E,y:va?Q-E-n:t?Q-r-J:Q-r,width:va?\nJ:n,height:va?n:J};this.label&&this.label.align(this.alignOptions,null,t).attr({visibility:Ab})}};G=function(k,n,t,r,J){var E=1,Q=0,fa=r?Hb:fb;r=r?Dc:ia;fa||(fa=fb);if(t){E*=-1;Q=ya}if(ec){E*=-1;Q-=E*ya}if(n){if(ec)k=ya-k;k=k/fa+r;if(ca&&J)k=Fa.pow(10,k)}else{if(ca&&J)k=mc(k);k=E*(k-r)*fa+Q}return k};ha=function(k,n,t){var r,J,E;k=G(k,null,null,t);var Q=t&&ad||cb,fa=t&&qd||$a,ka;t=J=W(k+cc);r=E=W(Q-k-cc);if(isNaN(k))ka=true;else if(R){r=ea;E=Q-vb;if(t<X||t>X+Da)ka=true}else{t=X;J=fa-Ib;if(r<ea||r>\nea+Aa)ka=true}return ka?null:ga.crispLine([Za,t,r,Ka,J,E],n||0)};if(va&&xa&&ec===Wa)ec=true;sa(I,{addPlotBand:za,addPlotLine:za,adjustTickAmount:function(){if(Ob&&!D&&!Ya&&!Ub){var k=qc,n=Ba.length;qc=Ob[qa];if(n<qc){for(;Ba.length<qc;)Ba.push(ta(Ba[Ba.length-1]+Ta));fb*=(n-1)/(qc-1);ra=Ba[Ba.length-1]}if(K(k)&&qc!==k)I.isDirty=true}},categories:Ya,getExtremes:function(){return{min:ia,max:ra,dataMin:pa,dataMax:wa,userMin:Vb,userMax:Gb}},getPlotLinePath:ha,getThreshold:function(k){if(ia>k)k=ia;else if(ra<\nk)k=ra;return G(k,0,1)},isXAxis:xa,options:o,plotLinesAndBands:Pb,getOffset:function(){var k=zb.length&&K(ia)&&K(ra),n=0,t=0,r=o.title,J=o.labels,E=[-1,1,1,-1][L],Q;if(!na){na=ga.g(\"axis\").attr({zIndex:7}).add();Ra=ga.g(\"grid\").attr({zIndex:1}).add()}rc=0;if(k||Ub){u(Ba,function(fa){if(mb[fa])mb[fa].addLabel();else mb[fa]=new q(fa);if(L===0||L===2||{1:\"left\",3:\"right\"}[L]===J.align)rc=Ia(mb[fa].getLabelSize(),rc)});if($c)rc+=($c-1)*16}else for(Q in mb){mb[Q].destroy();delete mb[Q]}if(r&&r.text){if(!ba){ba=\nI.axisTitle=ga.text(r.text,0,0,r.useHTML).attr({zIndex:7,rotation:r.rotation||0,align:r.textAlign||{low:\"left\",middle:\"center\",high:\"right\"}[r.align]}).css(r.style).add();ba.isNew=true}n=ba.getBBox()[R?\"height\":\"width\"];t=A(r.margin,R?5:10)}la=E*(o.offset||Xb[L]);nd=rc+(L!==2&&rc&&E*o.labels[R?\"y\":\"x\"])+t;Xb[L]=Ia(Xb[L],nd+n+E*la)},render:eb,setCategories:function(k,n){I.categories=p.categories=Ya=k;u(zb,function(t){t.translate();t.setTooltipPoints(true)});I.isDirty=true;A(n,true)&&l.redraw()},setExtremes:function(k,\nn,t,r){t=A(t,true);Pa(I,\"setExtremes\",{min:k,max:n},function(){Vb=k;Gb=n;t&&l.redraw(r)})},setScale:Ma,setTickPositions:da,translate:G,redraw:function(){Yb.resetTracker&&Yb.resetTracker();eb();u(Pb,function(k){k.render()});u(zb,function(k){k.isDirty=true})},removePlotBand:ab,removePlotLine:ab,reversed:ec,stacks:s,destroy:function(){var k;pb(I);for(k in s){Ac(s[k]);s[k]=null}if(I.stackTotalGroup)I.stackTotalGroup=I.stackTotalGroup.destroy();u([mb,Wb,dc,Pb],function(n){Ac(n)});u([La,na,Ra,ba],function(n){n&&\nn.destroy()});La=na=Ra=ba=null}});for(pd in B)Qa(I,pd,B[pd]);Ma()}function d(){var p={};return{add:function(q,w,x,V){if(!p[q]){w=ga.text(w,0,0).css(a.toolbar.itemStyle).align({align:\"right\",x:-Ib-20,y:ea+30}).on(\"click\",V).attr({align:\"right\",zIndex:20}).add();p[q]=w}},remove:function(q){pc(p[q].element);p[q]=null}}}function e(p){function q(){var B=this.points||zc(this),D=B[0].series.xAxis,ca=this.x;D=D&&D.options.type===\"datetime\";var la=Sb(ca)||D,qa;qa=la?['<span style=\"font-size: 10px\">'+(D?Zc(\"%A, %b %e, %Y\",\nca):ca)+\"</span>\"]:[];u(B,function(ya){qa.push(ya.point.tooltipFormatter(la))});return qa.join(\"<br/>\")}function w(B,D){L=xa?B:(2*L+B)/3;s=xa?D:(s+D)/2;o.translate(L,s);rd=bb(B-L)>1||bb(D-s)>1?function(){w(B,D)}:null}function x(){if(!xa){var B=l.hoverPoints;o.hide();u(da,function(D){D&&D.hide()});B&&u(B,function(D){D.setState()});l.hoverPoints=null;xa=true}}var V,N=p.borderWidth,ta=p.crosshairs,da=[],Ma=p.style,za=p.shared,eb=ja(Ma.padding),ab=N+eb,xa=true,Oa,R,L=0,s=0;Ma.padding=0;var o=ga.g(\"tooltip\").attr({zIndex:8}).add(),\nI=ga.rect(ab,ab,0,0,p.borderRadius,N).attr({fill:p.backgroundColor,\"stroke-width\":N}).add(o).shadow(p.shadow),ba=ga.text(\"\",eb+ab,ja(Ma.fontSize)+eb+ab,p.useHTML).attr({zIndex:1}).css(Ma).add(o);o.hide();return{shared:za,refresh:function(B){var D,ca,la,qa=0,ya={},fb=[];la=B.tooltipPos;D=p.formatter||q;ya=l.hoverPoints;if(za){ya&&u(ya,function(Hb){Hb.setState()});l.hoverPoints=B;u(B,function(Hb){Hb.setState(Bb);qa+=Hb.plotY;fb.push(Hb.getLabelConfig())});ca=B[0].plotX;qa=W(qa)/B.length;ya={x:B[0].category};\nya.points=fb;B=B[0]}else ya=B.getLabelConfig();ya=D.call(ya);V=B.series;ca=za?ca:B.plotX;qa=za?qa:B.plotY;D=W(la?la[0]:va?Da-qa:ca);ca=W(la?la[1]:va?Aa-ca:qa);la=za||!B.series.isCartesian||gc(D,ca);if(ya===false||!la)x();else{if(xa){o.show();xa=false}ba.attr({text:ya});la=ba.getBBox();Oa=la.width+2*eb;R=la.height+2*eb;I.attr({width:Oa,height:R,stroke:p.borderColor||B.color||V.color||\"#606060\"});D=fe(Oa,R,X,ea,Da,Aa,{x:D,y:ca});w(W(D.x-ab),W(D.y-ab))}if(ta){ta=zc(ta);for(D=ta.length;D--;){ca=B.series[D?\n\"yAxis\":\"xAxis\"];if(ta[D]&&ca){ca=ca.getPlotLinePath(B[D?\"y\":\"x\"],1);if(da[D])da[D].attr({d:ca,visibility:Ab});else{la={\"stroke-width\":ta[D].width||1,stroke:ta[D].color||\"#C0C0C0\",zIndex:2};if(ta[D].dashStyle)la.dashstyle=ta[D].dashStyle;da[D]=ga.path(ca).attr(la).add()}}}}},hide:x,destroy:function(){u(da,function(B){B&&B.destroy()});u([I,ba,o],function(B){B&&B.destroy()});I=ba=o=null}}}function f(p){function q(L){var s,o=Ud&&ua.width/ua.body.scrollWidth-1,I,ba,B;L=L||db.event;if(!L.target)L.target=\nL.srcElement;s=L.touches?L.touches.item(0):L;if(L.type!==\"mousemove\"||db.opera||o){Jb=Fd(oa);I=Jb.left;ba=Jb.top}if(Pc){B=L.x;s=L.y}else if(s.layerX===Wa){B=s.pageX-I;s=s.pageY-ba}else{B=L.layerX;s=L.layerY}if(o){B+=W((o+1)*I-I);s+=W((o+1)*ba-ba)}return sa(L,{chartX:B,chartY:s})}function w(L){var s={xAxis:[],yAxis:[]};u(Va,function(o){var I=o.translate,ba=o.isXAxis;s[ba?\"xAxis\":\"yAxis\"].push({axis:o,value:I((va?!ba:ba)?L.chartX-X:Aa-L.chartY+ea,true)})});return s}function x(){var L=l.hoverSeries,\ns=l.hoverPoint;s&&s.onMouseOut();L&&L.onMouseOut();hc&&hc.hide();sd=null}function V(){if(za){var L={xAxis:[],yAxis:[]},s=za.getBBox(),o=s.x-X,I=s.y-ea;if(Ma){u(Va,function(ba){var B=ba.translate,D=ba.isXAxis,ca=va?!D:D,la=B(ca?o:Aa-I-s.height,true,0,0,1);B=B(ca?o+s.width:Aa-I,true,0,0,1);L[D?\"xAxis\":\"yAxis\"].push({axis:ba,min:tb(la,B),max:Ia(la,B)})});Pa(l,\"selection\",L,td)}za=za.destroy()}l.mouseIsDown=ud=Ma=false;pb(ua,Kb?\"touchend\":\"mouseup\",V)}function N(L){var s=K(L.pageX)?L.pageX:L.page.x;L=\nK(L.pageX)?L.pageY:L.page.y;Jb&&!gc(s-Jb.left-X,L-Jb.top-ea)&&x()}var ta,da,Ma,za,eb=z.zoomType,ab=/x/.test(eb),xa=/y/.test(eb),Oa=ab&&!va||xa&&va,R=xa&&!va||ab&&va;bd=function(){if(Ec){Ec.translate(X,ea);va&&Ec.attr({width:l.plotWidth,height:l.plotHeight}).invert()}else l.trackerGroup=Ec=ga.g(\"tracker\").attr({zIndex:9}).add()};bd();if(p.enabled)l.tooltip=hc=e(p);(function(){oa.onmousedown=function(s){s=q(s);!Kb&&s.preventDefault&&s.preventDefault();l.mouseIsDown=ud=true;ta=s.chartX;da=s.chartY;Qa(ua,\nKb?\"touchend\":\"mouseup\",V)};var L=function(s){if(!(s&&s.touches&&s.touches.length>1)){s=q(s);if(!Kb)s.returnValue=false;var o=s.chartX,I=s.chartY,ba=!gc(o-X,I-ea);Jb||(Jb=Fd(oa));if(Kb&&s.type===\"touchstart\")if(Ga(s.target,\"isTracker\"))l.runTrackerClick||s.preventDefault();else!ke&&!ba&&s.preventDefault();if(ba){if(o<X)o=X;else if(o>X+Da)o=X+Da;if(I<ea)I=ea;else if(I>ea+Aa)I=ea+Aa}if(ud&&s.type!==\"touchstart\"){Ma=Math.sqrt(Math.pow(ta-o,2)+Math.pow(da-I,2));if(Ma>10){if(sc&&(ab||xa)&&gc(ta-X,da-ea))za||\n(za=ga.rect(X,ea,Oa?1:Da,R?1:Aa,0).attr({fill:z.selectionMarkerFill||\"rgba(69,114,167,0.25)\",zIndex:7}).add());if(za&&Oa){o=o-ta;za.attr({width:bb(o),x:(o>0?0:o)+ta})}if(za&&R){I=I-da;za.attr({height:bb(I),y:(I>0?0:I)+da})}}}else if(!ba){var B;I=l.hoverPoint;o=l.hoverSeries;var D,ca,la=$a,qa=va?s.chartY:s.chartX-X;if(hc&&p.shared){B=[];D=Ha.length;for(ca=0;ca<D;ca++)if(Ha[ca].visible&&Ha[ca].tooltipPoints.length){s=Ha[ca].tooltipPoints[qa];s._dist=bb(qa-s.plotX);la=tb(la,s._dist);B.push(s)}for(D=\nB.length;D--;)B[D]._dist>la&&B.splice(D,1);if(B.length&&B[0].plotX!==sd){hc.refresh(B);sd=B[0].plotX}}if(o&&o.tracker)(s=o.tooltipPoints[qa])&&s!==I&&s.onMouseOver()}return ba||!sc}};oa.onmousemove=L;Qa(oa,\"mouseleave\",x);Qa(ua,\"mousemove\",N);oa.ontouchstart=function(s){if(ab||xa)oa.onmousedown(s);L(s)};oa.ontouchmove=L;oa.ontouchend=function(){Ma&&x()};oa.onclick=function(s){var o=l.hoverPoint;s=q(s);s.cancelBubble=true;if(!Ma)if(o&&Ga(s.target,\"isTracker\")){var I=o.plotX,ba=o.plotY;sa(o,{pageX:Jb.left+\nX+(va?Da-ba:I),pageY:Jb.top+ea+(va?Aa-I:ba)});Pa(o.series,\"click\",sa(s,{point:o}));o.firePointEvent(\"click\",s)}else{sa(s,w(s));gc(s.chartX-X,s.chartY-ea)&&Pa(l,\"click\",s)}Ma=false}})();Vd=setInterval(function(){rd&&rd()},32);sa(this,{zoomX:ab,zoomY:xa,resetTracker:x,destroy:function(){if(l.trackerGroup)l.trackerGroup=Ec=l.trackerGroup.destroy();pb(ua,\"mousemove\",N);oa.onclick=oa.onmousedown=oa.onmousemove=oa.ontouchstart=oa.ontouchend=oa.ontouchmove=null}})}function g(p){var q=p.type||z.type||z.defaultSeriesType,\nw=wb[q],x=l.hasRendered;if(x)if(va&&q===\"column\")w=wb.bar;else if(!va&&q===\"bar\")w=wb.column;q=new w;q.init(l,p);if(!x&&q.inverted)va=true;if(q.isCartesian)sc=q.isCartesian;Ha.push(q);return q}function h(){z.alignTicks!==false&&u(Va,function(p){p.adjustTickAmount()});Ob=null}function i(p){var q=l.isDirtyLegend,w,x=l.isDirtyBox,V=Ha.length,N=V,ta=l.clipRect;for(oc(p,l);N--;){p=Ha[N];if(p.isDirty&&p.options.stacking){w=true;break}}if(w)for(N=V;N--;){p=Ha[N];if(p.options.stacking)p.isDirty=true}u(Ha,\nfunction(da){if(da.isDirty){da.cleanData();da.getSegments();if(da.options.legendType===\"point\")q=true}});if(q&&Fc.renderLegend){Fc.renderLegend();l.isDirtyLegend=false}if(sc){if(!cd){Ob=null;u(Va,function(da){da.setScale()})}h();Gc();u(Va,function(da){if(da.isDirty||x){da.redraw();x=true}})}if(x){vd();bd();if(ta){Hc(ta);ta.animate({width:l.plotSizeX,height:l.plotSizeY})}}u(Ha,function(da){if(da.isDirty&&da.visible&&(!da.isCartesian||da.xAxis))da.redraw()});Yb&&Yb.resetTracker&&Yb.resetTracker();Pa(l,\n\"redraw\")}function j(){var p=a.xAxis||{},q=a.yAxis||{},w;p=zc(p);u(p,function(x,V){x.index=V;x.isX=true});q=zc(q);u(q,function(x,V){x.index=V});Va=p.concat(q);l.xAxis=[];l.yAxis=[];Va=tc(Va,function(x){w=new c(x);l[w.isXAxis?\"xAxis\":\"yAxis\"].push(w);return w});h()}function m(p,q){uc=Ca(a.title,p);Ic=Ca(a.subtitle,q);u([[\"title\",p,uc],[\"subtitle\",q,Ic]],function(w){var x=w[0],V=l[x],N=w[1];w=w[2];if(V&&N)V=V.destroy();if(w&&w.text&&!V)l[x]=ga.text(w.text,0,0,w.useHTML).attr({align:w.align,\"class\":\"highcharts-\"+\nx,zIndex:1}).css(w.style).add().align(w,false,Rb)})}function v(){qb=z.renderTo;Wd=vc+wd++;if(Sb(qb))qb=ua.getElementById(qb);qb.innerHTML=\"\";if(!qb.offsetWidth){Zb=qb.cloneNode(0);Ja(Zb,{position:ic,top:\"-9999px\",display:\"\"});ua.body.appendChild(Zb)}dd=(Zb||qb).offsetWidth;Jc=(Zb||qb).offsetHeight;l.chartWidth=$a=z.width||dd||600;l.chartHeight=cb=z.height||(Jc>19?Jc:400);l.container=oa=hb(Tb,{className:\"highcharts-container\"+(z.className?\" \"+z.className:\"\"),id:Wd},sa({position:Xd,overflow:ob,width:$a+\nUa,height:cb+Ua,textAlign:\"left\"},z.style),Zb||qb);l.renderer=ga=z.forExport?new ed(oa,$a,cb,true):new fd(oa,$a,cb);var p,q;if(Yd&&oa.getBoundingClientRect){p=function(){Ja(oa,{left:0,top:0});q=oa.getBoundingClientRect();Ja(oa,{left:-(q.left-ja(q.left))+Ua,top:-(q.top-ja(q.top))+Ua})};p();Qa(db,\"resize\",p);Qa(l,\"destroy\",function(){pb(db,\"resize\",p)})}}function P(){function p(){var w=z.width||qb.offsetWidth,x=z.height||qb.offsetHeight;if(w&&x){if(w!==dd||x!==Jc){clearTimeout(q);q=setTimeout(function(){xd(w,\nx,false)},100)}dd=w;Jc=x}}var q;Qa(db,\"resize\",p);Qa(l,\"destroy\",function(){pb(db,\"resize\",p)})}function T(){Pa(l,\"endResize\",null,function(){cd-=1})}function Y(){var p=a.labels,q=a.credits,w;m();Fc=l.legend=new le;Gc();u(Va,function(x){x.setTickPositions(true)});h();Gc();vd();sc&&u(Va,function(x){x.render()});if(!l.seriesGroup)l.seriesGroup=ga.g(\"series-group\").attr({zIndex:3}).add();u(Ha,function(x){x.translate();x.setTooltipPoints();x.render()});p.items&&u(p.items,function(){var x=sa(p.style,this.style),\nV=ja(x.left)+X,N=ja(x.top)+ea+12;delete x.left;delete x.top;ga.text(this.html,V,N).attr({zIndex:2}).css(x).add()});if(!l.toolbar)l.toolbar=d();if(q.enabled&&!l.credits){w=q.href;l.credits=ga.text(q.text,0,0).on(\"click\",function(){if(w)location.href=w}).attr({align:q.position.align,zIndex:8}).css(q.style).add().align(q.position)}bd();l.hasRendered=true;if(Zb){qb.appendChild(oa);pc(Zb)}}function H(){var p,q=oa&&oa.parentNode;if(l!==null){Pa(l,\"destroy\");pb(db,\"unload\",H);pb(l);for(p=Va.length;p--;)Va[p]=\nVa[p].destroy();for(p=Ha.length;p--;)Ha[p]=Ha[p].destroy();u([\"title\",\"subtitle\",\"seriesGroup\",\"clipRect\",\"credits\",\"tracker\"],function(w){var x=l[w];if(x)l[w]=x.destroy()});u([wc,xc,Kc,Fc,hc,ga,Yb],function(w){w&&w.destroy&&w.destroy()});wc=xc=Kc=Fc=hc=ga=Yb=null;if(oa){oa.innerHTML=\"\";pb(oa);q&&pc(oa);oa=null}clearInterval(Vd);for(p in l)delete l[p];l=null}}function U(){if(!Lc&&db==db.top&&ua.readyState!==\"complete\")ua.attachEvent(\"onreadystatechange\",function(){ua.detachEvent(\"onreadystatechange\",\nU);ua.readyState===\"complete\"&&U()});else{v();yd();zd();u(a.series||[],function(p){g(p)});l.inverted=va=A(va,a.chart.inverted);j();l.render=Y;l.tracker=Yb=new f(a.tooltip);Y();Pa(l,\"load\");b&&b.apply(l,[l]);u(l.callbacks,function(p){p.apply(l,[l])})}}Yc=Ca(Yc,Xa.xAxis);od=Ca(od,Xa.yAxis);Xa.xAxis=Xa.yAxis=null;a=Ca(Xa,a);var z=a.chart,M=z.margin;M=Nb(M)?M:[M,M,M,M];var y=A(z.marginTop,M[0]),C=A(z.marginRight,M[1]),Z=A(z.marginBottom,M[2]),Sa=A(z.marginLeft,M[3]),Na=z.spacingTop,Ea=z.spacingRight,\ngb=z.spacingBottom,Lb=z.spacingLeft,Rb,uc,Ic,ea,Ib,vb,X,Xb,qb,Zb,oa,Wd,dd,Jc,$a,cb,qd,ad,wc,Kc,Ad,xc,l=this,ke=(M=z.events)&&!!M.click,Bd,gc,hc,ud,jc,Zd,Cd,Aa,Da,Yb,Ec,bd,Fc,$b,ac,Jb,sc=z.showAxes,cd=0,Va=[],Ob,Ha=[],va,ga,rd,Vd,sd,vd,Gc,yd,zd,xd,td,$d,le=function(){function p(G,ha){var na=G.legendItem,Ra=G.legendLine,La=G.legendSymbol,pa=Oa.color,wa=ha?N.itemStyle.color:pa,zb=ha?G.color:pa;pa=ha?G.pointAttr[ib]:{stroke:pa,fill:pa};na&&na.css({fill:wa});Ra&&Ra.attr({stroke:zb});La&&La.attr(pa)}function q(G,\nha,na){var Ra=G.legendItem,La=G.legendLine,pa=G.legendSymbol;G=G.checkbox;Ra&&Ra.attr({x:ha,y:na});La&&La.translate(ha,na-4);pa&&pa.attr({x:ha+pa.xOff,y:na+pa.yOff});if(G){G.x=ha;G.y=na}}function w(){u(za,function(G){var ha=G.checkbox,na=qa.alignAttr;ha&&Ja(ha,{left:na.translateX+G.legendItemWidth+ha.x-40+Ua,top:na.translateY+ha.y-11+Ua})})}function x(G){var ha,na,Ra,La,pa=G.legendItem;La=G.series||G;var wa=La.options,zb=wa&&wa.borderWidth||0;if(!pa){La=/^(bar|pie|area|column)$/.test(La.type);G.legendItem=\npa=ga.text(N.labelFormatter.call(G),0,0).css(G.visible?ab:Oa).on(\"mouseover\",function(){G.setState(Bb);pa.css(xa)}).on(\"mouseout\",function(){pa.css(G.visible?ab:Oa);G.setState()}).on(\"click\",function(){var Gb=function(){G.setVisible()};G.firePointEvent?G.firePointEvent(\"legendItemClick\",null,Gb):Pa(G,\"legendItemClick\",null,Gb)}).attr({zIndex:2}).add(qa);if(!La&&wa&&wa.lineWidth){var Vb={\"stroke-width\":wa.lineWidth,zIndex:2};if(wa.dashStyle)Vb.dashstyle=wa.dashStyle;G.legendLine=ga.path([Za,-da-Ma,\n0,Ka,-Ma,0]).attr(Vb).add(qa)}if(La)ha=ga.rect(na=-da-Ma,Ra=-11,da,12,2).attr({zIndex:3}).add(qa);else if(wa&&wa.marker&&wa.marker.enabled)ha=ga.symbol(G.symbol,na=-da/2-Ma,Ra=-4,wa.marker.radius).attr({zIndex:3}).add(qa);if(ha){ha.xOff=na+zb%2/2;ha.yOff=Ra+zb%2/2}G.legendSymbol=ha;p(G,G.visible);if(wa&&wa.showCheckbox){G.checkbox=hb(\"input\",{type:\"checkbox\",checked:G.selected,defaultChecked:G.selected},N.itemCheckboxStyle,oa);Qa(G.checkbox,\"click\",function(Gb){Pa(G,\"checkboxClick\",{checked:Gb.target.checked},\nfunction(){G.select()})})}}ha=pa.getBBox();na=G.legendItemWidth=N.itemWidth||da+Ma+ha.width+R;B=ha.height;if(ta&&o-s+na>(fb||$a-2*R-s)){o=s;I+=B}ba=I;q(G,o,I);if(ta)o+=na;else I+=B;ya=fb||Ia(ta?o-s:na,ya)}function V(){o=s;I=L;ba=ya=0;qa||(qa=ga.g(\"legend\").attr({zIndex:7}).add());za=[];u(Hb,function(Ra){var La=Ra.options;if(La.showInLegend)za=za.concat(La.legendType===\"point\"?Ra.data:Ra)});Hd(za,function(Ra,La){return(Ra.options.legendIndex||0)-(La.options.legendIndex||0)});cc&&za.reverse();u(za,\nx);$b=fb||ya;ac=ba-L+B;if(ca||la){$b+=2*R;ac+=2*R;if(D){if($b>0&&ac>0){D[D.isNew?\"attr\":\"animate\"](D.crisp(null,null,null,$b,ac));D.isNew=false}}else{D=ga.rect(0,0,$b,ac,N.borderRadius,ca||0).attr({stroke:N.borderColor,\"stroke-width\":ca||0,fill:la||jb}).add(qa).shadow(N.shadow);D.isNew=true}D[za.length?\"show\":\"hide\"]()}for(var G=[\"left\",\"right\",\"top\",\"bottom\"],ha,na=4;na--;){ha=G[na];if(eb[ha]&&eb[ha]!==\"auto\"){N[na<2?\"align\":\"verticalAlign\"]=ha;N[na<2?\"x\":\"y\"]=ja(eb[ha])*(na%2?-1:1)}}za.length&&\nqa.align(sa(N,{width:$b,height:ac}),true,Rb);cd||w()}var N=l.options.legend;if(N.enabled){var ta=N.layout===\"horizontal\",da=N.symbolWidth,Ma=N.symbolPadding,za,eb=N.style,ab=N.itemStyle,xa=N.itemHoverStyle,Oa=N.itemHiddenStyle,R=ja(eb.padding),L=18,s=4+R+da+Ma,o,I,ba,B=0,D,ca=N.borderWidth,la=N.backgroundColor,qa,ya,fb=N.width,Hb=l.series,cc=N.reversed;V();Qa(l,\"endResize\",w);return{colorizeItem:p,destroyItem:function(G){var ha=G.checkbox;u([\"legendItem\",\"legendLine\",\"legendSymbol\"],function(na){G[na]&&\nG[na].destroy()});ha&&pc(G.checkbox)},renderLegend:V,destroy:function(){if(D)D=D.destroy();if(qa)qa=qa.destroy()}}}};gc=function(p,q){return p>=0&&p<=Da&&q>=0&&q<=Aa};$d=function(){Pa(l,\"selection\",{resetSelection:true},td);l.toolbar.remove(\"zoom\")};td=function(p){var q=Xa.lang,w=l.pointCount<100;l.toolbar.add(\"zoom\",q.resetZoom,q.resetZoomTitle,$d);!p||p.resetSelection?u(Va,function(x){x.setExtremes(null,null,false,w)}):u(p.xAxis.concat(p.yAxis),function(x){var V=x.axis;if(l.tracker[V.isXAxis?\"zoomX\":\n\"zoomY\"])V.setExtremes(x.min,x.max,false,w)});i()};Gc=function(){var p=a.legend,q=A(p.margin,10),w=p.x,x=p.y,V=p.align,N=p.verticalAlign,ta;yd();if((l.title||l.subtitle)&&!K(y))if(ta=Ia(l.title&&!uc.floating&&!uc.verticalAlign&&uc.y||0,l.subtitle&&!Ic.floating&&!Ic.verticalAlign&&Ic.y||0))ea=Ia(ea,ta+A(uc.margin,15)+Na);if(p.enabled&&!p.floating)if(V===\"right\")K(C)||(Ib=Ia(Ib,$b-w+q+Ea));else if(V===\"left\")K(Sa)||(X=Ia(X,$b+w+q+Lb));else if(N===\"top\")K(y)||(ea=Ia(ea,ac+x+q+Na));else if(N===\"bottom\")K(Z)||\n(vb=Ia(vb,ac-x+q+gb));sc&&u(Va,function(da){da.getOffset()});K(Sa)||(X+=Xb[3]);K(y)||(ea+=Xb[0]);K(Z)||(vb+=Xb[2]);K(C)||(Ib+=Xb[1]);zd()};xd=function(p,q,w){var x=l.title,V=l.subtitle;cd+=1;oc(w,l);ad=cb;qd=$a;l.chartWidth=$a=W(p);l.chartHeight=cb=W(q);Ja(oa,{width:$a+Ua,height:cb+Ua});ga.setSize($a,cb,w);Da=$a-X-Ib;Aa=cb-ea-vb;Ob=null;u(Va,function(N){N.isDirty=true;N.setScale()});u(Ha,function(N){N.isDirty=true});l.isDirtyLegend=true;l.isDirtyBox=true;Gc();x&&x.align(null,null,Rb);V&&V.align(null,\nnull,Rb);i(w);ad=null;Pa(l,\"resize\");Bc===false?T():setTimeout(T,Bc&&Bc.duration||500)};zd=function(){l.plotLeft=X=W(X);l.plotTop=ea=W(ea);l.plotWidth=Da=W($a-X-Ib);l.plotHeight=Aa=W(cb-ea-vb);l.plotSizeX=va?Aa:Da;l.plotSizeY=va?Da:Aa;Rb={x:Lb,y:Na,width:$a-Lb-Ea,height:cb-Na-gb}};yd=function(){ea=A(y,Na);Ib=A(C,Ea);vb=A(Z,gb);X=A(Sa,Lb);Xb=[0,0,0,0]};vd=function(){var p=z.borderWidth||0,q=z.backgroundColor,w=z.plotBackgroundColor,x=z.plotBackgroundImage,V,N={x:X,y:ea,width:Da,height:Aa};V=p+(z.shadow?\n8:0);if(p||q)if(wc)wc.animate(wc.crisp(null,null,null,$a-V,cb-V));else wc=ga.rect(V/2,V/2,$a-V,cb-V,z.borderRadius,p).attr({stroke:z.borderColor,\"stroke-width\":p,fill:q||jb}).add().shadow(z.shadow);if(w)if(Kc)Kc.animate(N);else Kc=ga.rect(X,ea,Da,Aa,0).attr({fill:w}).add().shadow(z.plotShadow);if(x)if(Ad)Ad.animate(N);else Ad=ga.image(x,X,ea,Da,Aa).add();if(z.plotBorderWidth)if(xc)xc.animate(xc.crisp(null,X,ea,Da,Aa));else xc=ga.rect(X,ea,Da,Aa,0,z.plotBorderWidth).attr({stroke:z.plotBorderColor,\n\"stroke-width\":z.plotBorderWidth,zIndex:4}).add();l.isDirtyBox=false};Qa(db,\"unload\",H);z.reflow!==false&&Qa(l,\"load\",P);if(M)for(Bd in M)Qa(l,Bd,M[Bd]);l.options=a;l.series=Ha;l.addSeries=function(p,q,w){var x;if(p){oc(w,l);q=A(q,true);Pa(l,\"addSeries\",{options:p},function(){x=g(p);x.isDirty=true;l.isDirtyLegend=true;q&&l.redraw()})}return x};l.animation=A(z.animation,true);l.destroy=H;l.get=function(p){var q,w,x;for(q=0;q<Va.length;q++)if(Va[q].options.id===p)return Va[q];for(q=0;q<Ha.length;q++)if(Ha[q].options.id===\np)return Ha[q];for(q=0;q<Ha.length;q++){x=Ha[q].data;for(w=0;w<x.length;w++)if(x[w].id===p)return x[w]}return null};l.getSelectedPoints=function(){var p=[];u(Ha,function(q){p=p.concat(Dd(q.data,function(w){return w.selected}))});return p};l.getSelectedSeries=function(){return Dd(Ha,function(p){return p.selected})};l.hideLoading=function(){gd(jc,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Ja(jc,{display:jb})}});Cd=false};l.isInsidePlot=gc;l.redraw=i;l.setSize=xd;l.setTitle=m;l.showLoading=\nfunction(p){var q=a.loading;if(!jc){jc=hb(Tb,{className:\"highcharts-loading\"},sa(q.style,{left:X+Ua,top:ea+Ua,width:Da+Ua,height:Aa+Ua,zIndex:10,display:jb}),oa);Zd=hb(\"span\",null,q.labelStyle,jc)}Zd.innerHTML=p||a.lang.loading;if(!Cd){Ja(jc,{opacity:0,display:\"\"});gd(jc,{opacity:q.style.opacity},{duration:q.showDuration});Cd=true}};l.pointCount=0;l.counters=new Gd;U()}var ua=document,db=window,Fa=Math,W=Fa.round,lb=Fa.floor,md=Fa.ceil,Ia=Fa.max,tb=Fa.min,bb=Fa.abs,rb=Fa.cos,Cb=Fa.sin,kc=Fa.PI,ae=\nkc*2/360,yc=navigator.userAgent,Pc=/msie/i.test(yc)&&!db.opera,Mc=ua.documentMode===8,Ud=/AppleWebKit/.test(yc),Yd=/Firefox/.test(yc),Lc=!!ua.createElementNS&&!!ua.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\").createSVGRect,me=Yd&&parseInt(yc.split(\"Firefox/\")[1],10)<4,fd,Kb=ua.documentElement.ontouchstart!==undefined,be={},wd=0,ub=1,Tc,Xa,Zc,Bc,Nc,Wa,Tb=\"div\",ic=\"absolute\",Xd=\"relative\",ob=\"hidden\",vc=\"highcharts-\",Ab=\"visible\",Ua=\"px\",jb=\"none\",Za=\"M\",Ka=\"L\",ce=\"rgba(192,192,192,\"+(Lc?1.0E-6:\n0.0020)+\")\",ib=\"\",Bb=\"hover\",Qc,id,jd,kd,Cc,Rc,Sc,Jd,Kd,ld,Ld,Md,ma=db.HighchartsAdapter,Db=ma||{},u=Db.each,Dd=Db.grep,tc=Db.map,Ca=Db.merge,Qa=Db.addEvent,pb=Db.removeEvent,Pa=Db.fireEvent,gd=Db.animate,Hc=Db.stop,wb={};Zc=function(a,b,c){function d(P){return P.toString().replace(/^([0-9])$/,\"0$1\")}if(!K(b)||isNaN(b))return\"Invalid date\";a=A(a,\"%Y-%m-%d %H:%M:%S\");b=new Date(b*ub);var e,f=b[jd](),g=b[kd](),h=b[Cc](),i=b[Rc](),j=b[Sc](),m=Xa.lang,v=m.weekdays;b={a:v[g].substr(0,3),A:v[g],d:d(h),\ne:h,b:m.shortMonths[i],B:m.months[i],m:d(i+1),y:j.toString().substr(2,2),Y:j,H:d(f),I:d(f%12||12),l:f%12||12,M:d(b[id]()),p:f<12?\"AM\":\"PM\",P:f<12?\"am\":\"pm\",S:d(b.getSeconds())};for(e in b)a=a.replace(\"%\"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Gd.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};Nc={init:function(a,b,c){b=b||\"\";var d=a.shift,e=b.indexOf(\"C\")>-1,f=e?7:3,g;b=b.split(\" \");c=[].concat(c);var h,\ni,j=function(m){for(g=m.length;g--;)m[g]===Za&&m.splice(g+1,0,m[g+1],m[g+2],m[g+1],m[g+2])};if(e){j(b);j(c)}if(a.isArea){h=b.splice(b.length-6,6);i=c.splice(c.length-6,6)}if(d){c=[].concat(c).splice(0,f).concat(c);a.shift=false}if(b.length)for(a=c.length;b.length<a;){d=[].concat(b).splice(b.length-f,f);if(e){d[f-6]=d[f-2];d[f-5]=d[f-1]}b=b.concat(d)}if(h){b=b.concat(h);c=c.concat(i)}return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;){d=parseFloat(a[f]);\ne[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d}else e=b;return e}};ma&&ma.init&&ma.init(Nc);if(!ma&&db.jQuery){var Mb=jQuery;u=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===false)return c};Dd=Mb.grep;tc=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c};Ca=function(){var a=arguments;return Mb.extend(true,null,a[0],a[1],a[2],a[3])};Qa=function(a,b,c){Mb(a).bind(b,c)};pb=function(a,b,c){var d=ua.removeEventListener?\"removeEventListener\":\"detachEvent\";\nif(ua[d]&&!a[d])a[d]=function(){};Mb(a).unbind(b,c)};Pa=function(a,b,c,d){var e=Mb.Event(b),f=\"detached\"+b;sa(e,c);if(a[b]){a[f]=a[b];a[b]=null}Mb(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}d&&!e.isDefaultPrevented()&&d(e)};gd=function(a,b,c){var d=Mb(a);if(b.d){a.toD=b.d;b.d=1}d.stop();d.animate(b,c)};Hc=function(a){Mb(a).stop()};Mb.extend(Mb.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var de=jQuery.fx,ee=de.step;u([\"cur\",\"_default\",\"width\",\"height\"],function(a,b){var c=b?\nee:de.prototype,d=c[a],e;if(d)c[a]=function(f){f=b?f:this;e=f.elem;return e.attr?e.attr(f.prop,f.now):d.apply(this,arguments)}});ee.d=function(a){var b=a.elem;if(!a.started){var c=Nc.init(b,b.d,b.toD);a.start=c[0];a.end=c[1];a.started=true}b.attr(\"d\",Nc.step(a.start,a.end,a.pos,b.toD))}}ma={enabled:true,align:\"center\",x:0,y:15,style:{color:\"#666\",fontSize:\"11px\",lineHeight:\"14px\"}};Xa={colors:[\"#4572A7\",\"#AA4643\",\"#89A54E\",\"#80699B\",\"#3D96AE\",\"#DB843D\",\"#92A8CD\",\"#A47D7C\",\"#B5CA92\"],symbols:[\"circle\",\n\"diamond\",\"square\",\"triangle\",\"triangle-down\"],lang:{loading:\"Loading...\",months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"June\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],weekdays:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],decimalPoint:\".\",resetZoom:\"Reset zoom\",resetZoomTitle:\"Reset zoom level 1:1\",thousandsSep:\",\"},global:{useUTC:true},chart:{borderColor:\"#4572A7\",\nborderRadius:5,defaultSeriesType:\"line\",ignoreHiddenSeries:true,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif',fontSize:\"12px\"},backgroundColor:\"#FFFFFF\",plotBorderColor:\"#C0C0C0\"},title:{text:\"Chart title\",align:\"center\",y:15,style:{color:\"#3E576F\",fontSize:\"16px\"}},subtitle:{text:\"\",align:\"center\",y:30,style:{color:\"#6D869F\"}},plotOptions:{line:{allowPointSelect:false,showCheckbox:false,\nanimation:{duration:1E3},events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:\"#FFFFFF\",states:{hover:{},select:{fillColor:\"#FFFFFF\",lineColor:\"#000000\",lineWidth:2}}},point:{events:{}},dataLabels:Ca(ma,{enabled:false,y:-6,formatter:function(){return this.y}}),showInLegend:true,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:ic,color:\"#3E576F\"}},legend:{enabled:true,align:\"center\",layout:\"horizontal\",labelFormatter:function(){return this.name},\nborderWidth:1,borderColor:\"#909090\",borderRadius:5,shadow:false,style:{padding:\"5px\"},itemStyle:{cursor:\"pointer\",color:\"#3E576F\"},itemHoverStyle:{cursor:\"pointer\",color:\"#000000\"},itemHiddenStyle:{color:\"#C0C0C0\"},itemCheckboxStyle:{position:ic,width:\"13px\",height:\"13px\"},symbolWidth:16,symbolPadding:5,verticalAlign:\"bottom\",x:0,y:0},loading:{hideDuration:100,labelStyle:{fontWeight:\"bold\",position:Xd,top:\"1em\"},showDuration:100,style:{position:ic,backgroundColor:\"white\",opacity:0.5,textAlign:\"center\"}},\ntooltip:{enabled:true,backgroundColor:\"rgba(255, 255, 255, .85)\",borderWidth:2,borderRadius:5,shadow:true,snap:Kb?25:10,style:{color:\"#333333\",fontSize:\"12px\",padding:\"5px\",whiteSpace:\"nowrap\"}},toolbar:{itemStyle:{color:\"#4572A7\",cursor:\"pointer\"}},credits:{enabled:true,text:\"Highcharts.com\",href:\"http://www.highcharts.com\",position:{align:\"right\",x:-10,verticalAlign:\"bottom\",y:-5},style:{cursor:\"pointer\",color:\"#909090\",fontSize:\"10px\"}}};var Yc={dateTimeLabelFormats:{second:\"%H:%M:%S\",minute:\"%H:%M\",\nhour:\"%H:%M\",day:\"%e. %b\",week:\"%e. %b\",month:\"%b '%y\",year:\"%Y\"},endOnTick:false,gridLineColor:\"#C0C0C0\",labels:ma,lineColor:\"#C0D0E0\",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:\"#E0E0E0\",minorGridLineWidth:1,minorTickColor:\"#A0A0A0\",minorTickLength:2,minorTickPosition:\"outside\",startOfWeek:1,startOnTick:false,tickColor:\"#C0D0E0\",tickLength:5,tickmarkPlacement:\"between\",tickPixelInterval:100,tickPosition:\"outside\",tickWidth:1,title:{align:\"middle\",style:{color:\"#6D869F\",\nfontWeight:\"bold\"}},type:\"linear\"},od=Ca(Yc,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:\"right\",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,title:{rotation:270,text:\"Y-values\"},stackLabels:{enabled:false,formatter:function(){return this.total},style:ma.style}}),ie={labels:{align:\"right\",x:-8,y:null},title:{rotation:270}},he={labels:{align:\"left\",x:8,y:null},title:{rotation:90}},Td={labels:{align:\"center\",x:0,y:14},title:{rotation:0}},\nge=Ca(Td,{labels:{y:-5}}),xb=Xa.plotOptions;ma=xb.line;xb.spline=Ca(ma);xb.scatter=Ca(ma,{lineWidth:0,states:{hover:{lineWidth:0}}});xb.area=Ca(ma,{});xb.areaspline=Ca(xb.area);xb.column=Ca(ma,{borderColor:\"#FFFFFF\",borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,shadow:false},select:{color:\"#C0C0C0\",borderColor:\"#000000\",shadow:false}},dataLabels:{y:null,verticalAlign:null}});xb.bar=Ca(xb.column,{dataLabels:{align:\"left\",x:5,\ny:0}});xb.pie=Ca(ma,{borderColor:\"#FFFFFF\",borderWidth:1,center:[\"50%\",\"50%\"],colorByPoint:true,dataLabels:{distance:30,enabled:true,formatter:function(){return this.point.name},y:5},legendType:\"point\",marker:null,size:\"75%\",showInLegend:false,slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});Id();var bc=function(a){var b=[],c;(function(d){if(c=/rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]?(?:\\.[0-9]+)?)\\s*\\)/.exec(d))b=[ja(c[1]),ja(c[2]),ja(c[3]),parseFloat(c[4],\n10)];else if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(d))b=[ja(c[1],16),ja(c[2],16),ja(c[3],16),1]})(a);return{get:function(d){return b&&!isNaN(b[0])?d===\"rgb\"?\"rgb(\"+b[0]+\",\"+b[1]+\",\"+b[2]+\")\":d===\"a\"?b[3]:\"rgba(\"+b.join(\",\")+\")\":a},brighten:function(d){if(lc(d)&&d!==0){var e;for(e=0;e<3;e++){b[e]+=ja(d*255);if(b[e]<0)b[e]=0;if(b[e]>255)b[e]=255}}return this},setOpacity:function(d){b[3]=d;return this}}};Uc.prototype={init:function(a,b){this.element=ua.createElementNS(\"http://www.w3.org/2000/svg\",\nb);this.renderer=a},animate:function(a,b,c){if(b=A(b,Bc,true)){b=Ca(b);if(c)b.complete=c;gd(this,a,b)}else{this.attr(a);c&&c()}},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,i=this.renderer,j,m=this.shadows,v=this.htmlNode,P,T=this;if(Sb(a)&&K(b)){c=a;a={};a[c]=b}if(Sb(a)){c=a;if(h===\"circle\")c={x:\"cx\",y:\"cy\"}[c]||c;else if(c===\"strokeWidth\")c=\"stroke-width\";T=Ga(g,c)||this[c]||0;if(c!==\"d\"&&c!==\"visibility\")T=parseFloat(T)}else for(c in a){j=false;d=a[c];if(c===\"d\"){if(d&&d.join)d=\nd.join(\" \");if(/(NaN| {2}|^$)/.test(d))d=\"M 0 0\";this.d=d}else if(c===\"x\"&&h===\"text\"){for(e=0;e<g.childNodes.length;e++){f=g.childNodes[e];Ga(f,\"x\")===Ga(g,\"x\")&&Ga(f,\"x\",d)}if(this.rotation)Ga(g,\"transform\",\"rotate(\"+this.rotation+\" \"+d+\" \"+ja(a.y||Ga(g,\"y\"))+\")\")}else if(c===\"fill\")d=i.color(d,g,c);else if(h===\"circle\"&&(c===\"x\"||c===\"y\"))c={x:\"cx\",y:\"cy\"}[c]||c;else if(c===\"translateX\"||c===\"translateY\"||c===\"rotation\"||c===\"verticalAlign\"){this[c]=d;this.updateTransform();j=true}else if(c===\n\"stroke\")d=i.color(d,g,c);else if(c===\"dashstyle\"){c=\"stroke-dasharray\";d=d&&d.toLowerCase();if(d===\"solid\")d=jb;else if(d){d=d.replace(\"shortdashdotdot\",\"3,1,1,1,1,1,\").replace(\"shortdashdot\",\"3,1,1,1\").replace(\"shortdot\",\"1,1,\").replace(\"shortdash\",\"3,1,\").replace(\"longdash\",\"8,3,\").replace(/dot/g,\"1,3,\").replace(\"dash\",\"4,3,\").replace(/,$/,\"\").split(\",\");for(e=d.length;e--;)d[e]=ja(d[e])*a[\"stroke-width\"];d=d.join(\",\")}}else if(c===\"isTracker\")this[c]=d;else if(c===\"width\")d=ja(d);else if(c===\n\"align\"){c=\"text-anchor\";d={left:\"start\",center:\"middle\",right:\"end\"}[d]}else if(c===\"title\"){e=ua.createElementNS(\"http://www.w3.org/2000/svg\",\"title\");e.appendChild(ua.createTextNode(d));g.appendChild(e)}if(c===\"strokeWidth\")c=\"stroke-width\";if(Ud&&c===\"stroke-width\"&&d===0)d=1.0E-6;if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!P){this.symbolAttr(a);P=true}j=true}if(m&&/^(width|height|visibility|x|y|d)$/.test(c))for(e=m.length;e--;)Ga(m[e],c,d);if((c===\"width\"||c===\"height\")&&h===\n\"rect\"&&d<0)d=0;if(c===\"text\"){this.textStr=d;this.added&&i.buildText(this)}else j||Ga(g,c,d);if(v&&(c===\"x\"||c===\"y\"||c===\"translateX\"||c===\"translateY\"||c===\"visibility\")){e=v.length?v:[this];f=e.length;var Y;for(Y=0;Y<f;Y++){v=e[Y];j=v.getBBox();v=v.htmlNode;Ja(v,sa(this.styles,{left:j.x+(this.translateX||0)+Ua,top:j.y+(this.translateY||0)+Ua}));c===\"visibility\"&&Ja(v,{visibility:d})}}}return T},symbolAttr:function(a){var b=this;u([\"x\",\"y\",\"r\",\"start\",\"end\",\"width\",\"height\",\"innerR\"],function(c){b[c]=\nA(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](W(b.x*2)/2,W(b.y*2)/2,b.r,{start:b.start,end:b.end,width:b.width,height:b.height,innerR:b.innerR})})},clip:function(a){return this.attr(\"clip-path\",\"url(\"+this.renderer.url+\"#\"+a.id+\")\")},crisp:function(a,b,c,d,e){var f,g={},h={},i;a=a||this.strokeWidth||0;i=a%2/2;h.x=lb(b||this.x||0)+i;h.y=lb(c||this.y||0)+i;h.width=lb((d||this.width||0)-2*i);h.height=lb((e||this.height||0)-2*i);h.strokeWidth=a;for(f in h)if(this[f]!==h[f])this[f]=g[f]=h[f];\nreturn g},css:function(a){var b=this.element;b=a&&a.width&&b.nodeName===\"text\";var c,d=\"\",e=function(f,g){return\"-\"+g.toLowerCase()};if(a&&a.color)a.fill=a.color;this.styles=a=sa(this.styles,a);if(Pc&&!Lc){b&&delete a.width;Ja(this.element,a)}else{for(c in a)d+=c.replace(/([A-Z])/g,e)+\":\"+a[c]+\";\";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;if(Kb&&a===\"click\"){a=\"touchstart\";c=function(d){d.preventDefault();b()}}this.element[\"on\"+a]=c;return this},\ntranslate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=true;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];if(c){a+=this.attr(\"width\");b+=this.attr(\"height\")}if(a||b)e.push(\"translate(\"+a+\",\"+b+\")\");if(c)e.push(\"rotate(90) scale(-1,1)\");else d&&e.push(\"rotate(\"+d+\" \"+this.x+\" \"+this.y+\")\");e.length&&Ga(this.element,\"transform\",e.join(\" \"))},toFront:function(){var a=\nthis.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){if(a){this.alignOptions=a;this.alignByTranslate=b;c||this.renderer.alignedObjects.push(this)}else{a=this.alignOptions;b=this.alignByTranslate}c=A(c,this.renderer);var d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};if(/^(right|center)$/.test(d))f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?\"translateX\":\"x\"]=W(f);if(/^(bottom|middle)$/.test(e))g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||\n1);h[b?\"translateY\":\"y\"]=W(g);this[this.placed?\"animate\":\"attr\"](h);this.placed=true;this.alignAttr=h;return this},getBBox:function(){var a,b,c,d=this.rotation,e=d*ae;try{a=sa({},this.element.getBBox())}catch(f){a={width:0,height:0}}b=a.width;c=a.height;if(d){a.width=bb(c*Cb(e))+bb(b*rb(e));a.height=bb(c*rb(e))+bb(b*Cb(e))}return a},show:function(){return this.attr({visibility:Ab})},hide:function(){return this.attr({visibility:ob})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=\nd.childNodes,f=this.element,g=Ga(f,\"zIndex\");this.parentInverted=a&&a.inverted;this.textStr!==undefined&&b.buildText(this);if(a&&this.htmlNode){if(!a.htmlNode)a.htmlNode=[];a.htmlNode.push(this)}if(g){c.handleZ=true;g=ja(g)}if(c.handleZ)for(c=0;c<e.length;c++){a=e[c];b=Ga(a,\"zIndex\");if(a!==f&&(ja(b)>g||!K(g)&&K(b))){d.insertBefore(f,a);return this}}d.appendChild(f);this.added=true;return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||\n{},c=a.shadows,d,e;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=null;Hc(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(e=0;e<a.stops.length;e++)a.stops[e]=a.stops[e].destroy();a.stops=null}a.safeRemoveChild(b);c&&u(c,function(f){a.safeRemoveChild(f)});nc(a.renderer.alignedObjects,a);for(d in a)delete a[d];return null},empty:function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b){var c=[],d,e,f=this.element,g=this.parentInverted?\n\"(-1,-1)\":\"(1,1)\";if(a){for(d=1;d<=3;d++){e=f.cloneNode(0);Ga(e,{isShadow:\"true\",stroke:\"rgb(0, 0, 0)\",\"stroke-opacity\":0.05*d,\"stroke-width\":7-2*d,transform:\"translate\"+g,fill:jb});b?b.element.appendChild(e):f.parentNode.insertBefore(e,f);c.push(e)}this.shadows=c}return this}};var ed=function(){this.init.apply(this,arguments)};ed.prototype={Element:Uc,init:function(a,b,c,d){var e=location,f;f=this.createElement(\"svg\").attr({xmlns:\"http://www.w3.org/2000/svg\",version:\"1.1\"});a.appendChild(f.element);\nthis.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Pc?\"\":e.href.replace(/#.*?$/,\"\");this.defs=this.createElement(\"defs\").add();this.forExport=d;this.gradients=[];this.setSize(b,c,false)},destroy:function(){var a,b=this.gradients,c=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();if(b){for(a=0;a<b.length;a++)this.gradients[a]=b[a].destroy();this.gradients=null}if(c)this.defs=c.destroy();return this.alignedObjects=null},createElement:function(a){var b=new this.Element;\nb.init(this,a);return b},buildText:function(a){for(var b=a.element,c=A(a.textStr,\"\").toString().replace(/<(b|strong)>/g,'<span style=\"font-weight:bold\">').replace(/<(i|em)>/g,'<span style=\"font-style:italic\">').replace(/<a/g,\"<span\").replace(/<\\/(b|strong|i|em|a)>/g,\"</span>\").split(/<br.*?>/g),d=b.childNodes,e=/style=\"([^\"]+)\"/,f=/href=\"([^\"]+)\"/,g=Ga(b,\"x\"),h=a.styles,i=h&&a.useHTML&&!this.forExport,j=a.htmlNode,m=h&&ja(h.width),v=h&&h.lineHeight,P,T=d.length;T--;)b.removeChild(d[T]);m&&!a.added&&\nthis.box.appendChild(b);u(c,function(Y,H){var U,z=0,M;Y=Y.replace(/<span/g,\"|||<span\").replace(/<\\/span>/g,\"</span>|||\");U=Y.split(\"|||\");u(U,function(y){if(y!==\"\"||U.length===1){var C={},Z=ua.createElementNS(\"http://www.w3.org/2000/svg\",\"tspan\");e.test(y)&&Ga(Z,\"style\",y.match(e)[1].replace(/(;| |^)color([ :])/,\"$1fill$2\"));if(f.test(y)){Ga(Z,\"onclick\",'location.href=\"'+y.match(f)[1]+'\"');Ja(Z,{cursor:\"pointer\"})}y=(y.replace(/<(.|\\n)*?>/g,\"\")||\" \").replace(/&lt;/g,\"<\").replace(/&gt;/g,\">\");Z.appendChild(ua.createTextNode(y));\nif(z)C.dx=3;else C.x=g;if(!z){if(H){!Lc&&a.renderer.forExport&&Ja(Z,{display:\"block\"});M=db.getComputedStyle&&ja(db.getComputedStyle(P,null).getPropertyValue(\"line-height\"));if(!M||isNaN(M))M=v||P.offsetHeight||18;Ga(Z,\"dy\",M)}P=Z}Ga(Z,C);b.appendChild(Z);z++;if(m){y=y.replace(/-/g,\"- \").split(\" \");for(var Sa,Na=[];y.length||Na.length;){Sa=b.getBBox().width;C=Sa>m;if(!C||y.length===1){y=Na;Na=[];if(y.length){Z=ua.createElementNS(\"http://www.w3.org/2000/svg\",\"tspan\");Ga(Z,{dy:v||16,x:g});b.appendChild(Z);\nif(Sa>m)m=Sa}}else{Z.removeChild(Z.firstChild);Na.unshift(y.pop())}y.length&&Z.appendChild(ua.createTextNode(y.join(\" \").replace(/- /g,\"-\")))}}}})});if(i){if(!j)j=a.htmlNode=hb(\"span\",null,sa(h,{position:ic,top:0,left:0}),this.box.parentNode);j.innerHTML=a.textStr;for(T=d.length;T--;)d[T].style.visibility=ob}},crispLine:function(a,b){if(a[1]===a[4])a[1]=a[4]=W(a[1])+b%2/2;if(a[2]===a[5])a[2]=a[5]=W(a[2])+b%2/2;return a},path:function(a){return this.createElement(\"path\").attr({d:a,fill:jb})},circle:function(a,\nb,c){a=Nb(a)?a:{x:a,y:b,r:c};return this.createElement(\"circle\").attr(a)},arc:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol(\"arc\",a||0,b||0,c||0,{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;a=a.x}e=this.createElement(\"rect\").attr({rx:e,ry:e,fill:jb});return e.attr(e.crisp(f,a,b,Ia(c,0),Ia(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;\nthis.height=b;for(this.boxWrapper[A(c,true)?\"animate\":\"attr\"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement(\"g\");return K(a)?b.attr({\"class\":vc+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:jb};arguments.length>1&&sa(f,{x:b,y:c,width:d,height:e});f=this.createElement(\"image\").attr(f);f.element.setAttributeNS?f.element.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\",a):f.element.setAttribute(\"hc-svg-href\",a);return f},symbol:function(a,b,c,d,e){var f,\ng=this.symbols[a];g=g&&g(W(b),W(c),d,e);var h=/^url\\((.*?)\\)$/,i;if(g){f=this.path(g);sa(f,{symbolName:a,x:b,y:c,r:d});e&&sa(f,e)}else if(h.test(a)){var j=function(m,v){m.attr({width:v[0],height:v[1]}).translate(-W(v[0]/2),-W(v[1]/2))};i=a.match(h)[1];a=be[i];f=this.image(i).attr({x:b,y:c});if(a)j(f,a);else{f.attr({width:0,height:0});hb(\"img\",{onload:function(){j(f,be[i]=[this.width,this.height])},src:i})}}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[Za,a-c,\nb-c,Ka,a+c,b-c,a+c,b+c,a-c,b+c,\"Z\"]},triangle:function(a,b,c){return[Za,a,b-1.33*c,Ka,a+c,b+0.67*c,a-c,b+0.67*c,\"Z\"]},\"triangle-down\":function(a,b,c){return[Za,a,b+1.33*c,Ka,a-c,b-0.67*c,a+c,b-0.67*c,\"Z\"]},diamond:function(a,b,c){return[Za,a,b-c,Ka,a+c,b,a,b+c,a-c,b,\"Z\"]},arc:function(a,b,c,d){var e=d.start,f=d.end-1.0E-6,g=d.innerR,h=rb(e),i=Cb(e),j=rb(f);f=Cb(f);d=d.end-e<kc?0:1;return[Za,a+c*h,b+c*i,\"A\",c,c,0,d,1,a+c*j,b+c*f,Ka,a+g*j,b+g*f,\"A\",g,g,0,d,0,a+g*h,b+g*i,\"Z\"]}},clipRect:function(a,b,\nc,d){var e=vc+wd++,f=this.createElement(\"clipPath\").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b=a.linearGradient;c=vc+wd++;var g,h,i;g=f.createElement(\"linearGradient\").attr({id:c,gradientUnits:\"userSpaceOnUse\",x1:b[0],y1:b[1],x2:b[2],y2:b[3]}).add(f.defs);f.gradients.push(g);g.stops=[];u(a.stops,function(j){if(e.test(j[1])){d=bc(j[1]);h=d.get(\"rgb\");i=d.get(\"a\")}else{h=j[1];i=1}j=\nf.createElement(\"stop\").attr({offset:j[0],\"stop-color\":h,\"stop-opacity\":i}).add(g);g.stops.push(j)});return\"url(\"+this.url+\"#\"+c+\")\"}else if(e.test(a)){d=bc(a);Ga(b,c+\"-opacity\",d.get(\"a\"));return d.get(\"rgb\")}else{b.removeAttribute(c+\"-opacity\");return a}},text:function(a,b,c,d){var e=Xa.chart.style;b=W(A(b,0));c=W(A(c,0));a=this.createElement(\"text\").attr({x:b,y:c,text:a}).css({fontFamily:e.fontFamily,fontSize:e.fontSize});a.x=b;a.y=c;a.useHTML=d;return a}};fd=ed;if(!Lc){Db=yb(Uc,{init:function(a,\nb){var c=[\"<\",b,' filled=\"f\" stroked=\"f\"'],d=[\"position: \",ic,\";\"];if(b===\"shape\"||b===Tb)d.push(\"left:0;top:0;width:10px;height:10px;\");if(Mc)d.push(\"visibility: \",b===Tb?ob:Ab);c.push(' style=\"',d.join(\"\"),'\"/>');if(b){c=b===Tb||b===\"span\"||b===\"img\"?c.join(\"\"):a.prepVML(c);this.element=hb(c)}this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box;d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);Mc&&d.gVis===ob&&Ja(c,{visibility:ob});d.appendChild(c);this.added=true;this.alignOnAdd&&\nthis.updateTransform();return this},attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,i=this.renderer,j=this.symbolName,m,v,P=this.shadows,T=this;if(Sb(a)&&K(b)){c=a;a={};a[c]=b}if(Sb(a)){c=a;T=c===\"strokeWidth\"||c===\"stroke-width\"?this.strokeweight:this[c]}else for(c in a){d=a[c];m=false;if(j&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!v){this.symbolAttr(a);v=true}m=true}else if(c===\"d\"){d=d||[];this.d=d.join(\" \");e=d.length;for(m=[];e--;)m[e]=lc(d[e])?W(d[e]*10)-\n5:d[e]===\"Z\"?\"x\":d[e];d=m.join(\" \")||\"x\";f.path=d;if(P)for(e=P.length;e--;)P[e].path=d;m=true}else if(c===\"zIndex\"||c===\"visibility\"){if(Mc&&c===\"visibility\"&&h===\"DIV\"){f.gVis=d;m=f.childNodes;for(e=m.length;e--;)Ja(m[e],{visibility:d});if(d===Ab)d=null}if(d)g[c]=d;m=true}else if(/^(width|height)$/.test(c)){this[c]=d;if(this.updateClipping){this[c]=d;this.updateClipping()}else g[c]=d;m=true}else if(/^(x|y)$/.test(c)){this[c]=d;if(f.tagName===\"SPAN\")this.updateTransform();else g[{x:\"left\",y:\"top\"}[c]]=\nd}else if(c===\"class\")f.className=d;else if(c===\"stroke\"){d=i.color(d,f,c);c=\"strokecolor\"}else if(c===\"stroke-width\"||c===\"strokeWidth\"){f.stroked=d?true:false;c=\"strokeweight\";this[c]=d;if(lc(d))d+=Ua}else if(c===\"dashstyle\"){(f.getElementsByTagName(\"stroke\")[0]||hb(i.prepVML([\"<stroke/>\"]),null,null,f))[c]=d||\"solid\";this.dashstyle=d;m=true}else if(c===\"fill\")if(h===\"SPAN\")g.color=d;else{f.filled=d!==jb?true:false;d=i.color(d,f,c);c=\"fillcolor\"}else if(c===\"translateX\"||c===\"translateY\"||c===\"rotation\"||\nc===\"align\"){if(c===\"align\")c=\"textAlign\";this[c]=d;this.updateTransform();m=true}else if(c===\"text\"){this.bBox=null;f.innerHTML=d;m=true}if(P&&c===\"visibility\")for(e=P.length;e--;)P[e].style[c]=d;if(!m)if(Mc)f[c]=d;else Ga(f,c,d)}return T},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){nc(c,b)};return b.css(a.getCSS(b.inverted))},css:function(a){var b=this.element;if(b=a&&b.tagName===\"SPAN\"&&a.width){delete a.width;this.textWidth=b;this.updateTransform()}this.styles=sa(this.styles,\na);Ja(this.element,a);return this},safeRemoveChild:function(a){a.parentNode&&pc(a)},destroy:function(){this.destroyClip&&this.destroyClip();return Uc.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element,b=this.bBox;if(!b){if(a.nodeName===\"text\")a.style.position=ic;b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b},on:function(a,b){this.element[\"on\"+\na]=function(){var c=db.event;c.target=c.srcElement;b(c)};return this},updateTransform:function(){if(this.added){var a=this,b=a.element,c=a.translateX||0,d=a.translateY||0,e=a.x||0,f=a.y||0,g=a.textAlign||\"left\",h={left:0,center:0.5,right:1}[g],i=g&&g!==\"left\";if(c||d)a.css({marginLeft:c,marginTop:d});a.inverted&&u(b.childNodes,function(z){a.renderer.invertChild(z,b)});if(b.tagName===\"SPAN\"){var j,m;c=a.rotation;var v;j=0;d=1;var P=0,T;v=ja(a.textWidth);var Y=a.xCorr||0,H=a.yCorr||0,U=[c,g,b.innerHTML,\na.textWidth].join(\",\");if(U!==a.cTT){if(K(c)){j=c*ae;d=rb(j);P=Cb(j);Ja(b,{filter:c?[\"progid:DXImageTransform.Microsoft.Matrix(M11=\",d,\", M12=\",-P,\", M21=\",P,\", M22=\",d,\", sizingMethod='auto expand')\"].join(\"\"):jb})}j=b.offsetWidth;m=b.offsetHeight;if(j>v){Ja(b,{width:v+Ua,display:\"block\",whiteSpace:\"normal\"});j=v}v=W((ja(b.style.fontSize)||12)*1.2);Y=d<0&&-j;H=P<0&&-m;T=d*P<0;Y+=P*v*(T?1-h:h);H-=d*v*(c?T?h:1-h:1);if(i){Y-=j*h*(d<0?-1:1);if(c)H-=m*h*(P<0?-1:1);Ja(b,{textAlign:g})}a.xCorr=Y;a.yCorr=\nH}Ja(b,{left:e+Y,top:f+H});a.cTT=U}}else this.alignOnAdd=true},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,i,j=e.path;if(j&&typeof j.value!==\"string\")j=\"x\";if(a){for(d=1;d<=3;d++){i=['<shape isShadow=\"true\" strokeweight=\"',7-2*d,'\" filled=\"false\" path=\"',j,'\" coordsize=\"100,100\" style=\"',e.style.cssText,'\" />'];g=hb(f.prepVML(i),null,{left:ja(h.left)+1,top:ja(h.top)+1});i=['<stroke color=\"black\" opacity=\"',0.05*d,'\"/>'];hb(f.prepVML(i),null,null,g);b?b.element.appendChild(g):\ne.parentNode.insertBefore(g,e);c.push(g)}this.shadows=c}return this}});ma=function(){this.init.apply(this,arguments)};ma.prototype=Ca(ed.prototype,{Element:Db,isIE8:yc.indexOf(\"MSIE 8.0\")>-1,init:function(a,b,c){var d;this.alignedObjects=[];d=this.createElement(Tb);a.appendChild(d.element);this.box=d.element;this.boxWrapper=d;this.setSize(b,c,false);if(!ua.namespaces.hcv){ua.namespaces.add(\"hcv\",\"urn:schemas-microsoft-com:vml\");ua.createStyleSheet().cssText=\"hcv\\\\:fill, hcv\\\\:path, hcv\\\\:shape, hcv\\\\:stroke{ behavior:url(#default#VML); display: inline-block; } \"}},\nclipRect:function(a,b,c,d){var e=this.createElement();return sa(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(f){var g=this.top,h=this.left,i=h+this.width,j=g+this.height;g={clip:\"rect(\"+W(f?h:g)+\"px,\"+W(f?j:i)+\"px,\"+W(f?i:j)+\"px,\"+W(f?g:h)+\"px)\"};!f&&Mc&&sa(g,{width:i+Ua,height:j+Ua});return g},updateClipping:function(){u(e.members,function(f){f.css(e.getCSS(f.inverted))})}})},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,i,j,m,v;u(a.stops,\nfunction(P,T){if(e.test(P[1])){d=bc(P[1]);f=d.get(\"rgb\");g=d.get(\"a\")}else{f=P[1];g=1}if(T){m=f;v=g}else{i=f;j=g}});a=90-Fa.atan((h[3]-h[1])/(h[2]-h[0]))*180/kc;a=[\"<\",c,' colors=\"0% ',i,\",100% \",m,'\" angle=\"',a,'\" opacity=\"',v,'\" o:opacity2=\"',j,'\" type=\"gradient\" focus=\"100%\" />'];hb(this.prepVML(a),null,null,b)}else if(e.test(a)&&b.tagName!==\"IMG\"){d=bc(a);a=[\"<\",c,' opacity=\"',d.get(\"a\"),'\"/>'];hb(this.prepVML(a),null,null,b);return d.get(\"rgb\")}else{b=b.getElementsByTagName(c);if(b.length)b[0].opacity=\n1;return a}},prepVML:function(a){var b=this.isIE8;a=a.join(\"\");if(b){a=a.replace(\"/>\",' xmlns=\"urn:schemas-microsoft-com:vml\" />');a=a.indexOf('style=\"')===-1?a.replace(\"/>\",' style=\"display:inline-block;behavior:url(#default#VML);\" />'):a.replace('style=\"','style=\"display:inline-block;behavior:url(#default#VML);')}else a=a.replace(\"<\",\"<hcv:\");return a},text:function(a,b,c){var d=Xa.chart.style;return this.createElement(\"span\").attr({text:a,x:W(b),y:W(c)}).css({whiteSpace:\"nowrap\",fontFamily:d.fontFamily,\nfontSize:d.fontSize})},path:function(a){return this.createElement(\"shape\").attr({coordsize:\"100 100\",d:a})},circle:function(a,b,c){return this.symbol(\"circle\").attr({x:a,y:b,r:c})},g:function(a){var b;if(a)b={className:vc+a,\"class\":vc+a};return this.createElement(Tb).attr(b)},image:function(a,b,c,d,e){var f=this.createElement(\"img\").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){if(Nb(a)){b=a.y;c=a.width;d=a.height;e=a.r;f=a.strokeWidth;\na=a.x}var g=this.symbol(\"rect\");g.r=e;return g.attr(g.crisp(f,a,b,Ia(c,0),Ia(d,0)))},invertChild:function(a,b){var c=b.style;Ja(a,{flip:\"x\",left:ja(c.width)-10,top:ja(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=rb(e),h=Cb(e),i=rb(f),j=Cb(f);d=d.innerR;var m=0.07/c,v=d&&0.1/d||0;if(f-e===0)return[\"x\"];else if(2*kc-f+e<m)i=-m;else if(f-e<v)i=rb(e+v);return[\"wa\",a-c,b-c,a+c,b+c,a+c*g,b+c*h,a+c*i,b+c*j,\"at\",a-d,b-d,a+d,b+d,a+d*i,b+d*j,a+d*g,b+d*h,\"x\",\"e\"]},circle:function(a,\nb,c){return[\"wa\",a-c,b-c,a+c,b+c,a+c,b,a+c,b,\"e\"]},rect:function(a,b,c,d){if(!K(d))return[];var e=d.width;d=d.height;var f=a+e,g=b+d;c=tb(c,e,d);return[Za,a+c,b,Ka,f-c,b,\"wa\",f-2*c,b,f,b+2*c,f-c,b,f,b+c,Ka,f,g-c,\"wa\",f-2*c,g-2*c,f,g,f,g-c,f-c,g,Ka,a+c,g,\"wa\",a,g-2*c,a+2*c,g,a+c,g,a,g-c,Ka,a,b+c,\"wa\",a,b,a+2*c,b+2*c,a,b+c,a+c,b,\"x\",\"e\"]}}});fd=ma}Nd.prototype.callbacks=[];var Oc=function(){};Oc.prototype={init:function(a,b){var c=a.chart.counters,d;this.series=a;this.applyOptions(b);this.pointAttr=\n{};if(a.options.colorByPoint){d=a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||d[c.color++];c.wrapColor(d.length)}a.chart.pointCount++;return this},applyOptions:function(a){var b=this.series;this.config=a;if(lc(a)||a===null)this.y=a;else if(Nb(a)&&!lc(a.length)){sa(this,a);this.options=a}else if(Sb(a[0])){this.name=a[0];this.y=a[1]}else if(lc(a[0])){this.x=a[0];this.y=a[1]}if(this.x===Wa)this.x=b.autoIncrement()},destroy:function(){var a=this,b=a.series,\nc=b.chart.hoverPoints,d;b.chart.pointCount--;if(c){a.setState();nc(c,a)}a===b.chart.hoverPoint&&a.onMouseOut();pb(a);u([\"graphic\",\"tracker\",\"group\",\"dataLabel\",\"connector\",\"shadowGroup\"],function(e){a[e]&&a[e].destroy()});a.legendItem&&a.series.chart.legend.destroyItem(a);for(d in a)a[d]=null},getLabelConfig:function(){return{x:this.category,y:this.y,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=this,d=c.series.chart;a=A(a,\n!c.selected);c.firePointEvent(a?\"select\":\"unselect\",{accumulate:b},function(){c.selected=a;c.setState(a&&\"select\");b||u(d.getSelectedPoints(),function(e){if(e.selected&&e!==c){e.selected=false;e.setState(ib);e.firePointEvent(\"unselect\")}})})},onMouseOver:function(){var a=this.series.chart,b=a.tooltip,c=a.hoverPoint;c&&c!==this&&c.onMouseOut();this.firePointEvent(\"mouseOver\");b&&!b.shared&&b.refresh(this);this.setState(Bb);a.hoverPoint=this},onMouseOut:function(){this.firePointEvent(\"mouseOut\");this.setState();\nthis.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series;return['<span style=\"color:'+b.color+'\">',this.name||b.name,\"</span>: \",!a?\"<b>x = \"+(this.name||this.x)+\",</b> \":\"\",\"<b>\",!a?\"y = \":\"\",this.y,\"</b>\"].join(\"\")},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g=e.chart;b=A(b,true);d.firePointEvent(\"update\",{options:a},function(){d.applyOptions(a);if(Nb(a)){e.getAttribs();f&&f.attr(d.pointAttr[e.state])}e.isDirty=true;b&&g.redraw(c)})},remove:function(a,b){var c=\nthis,d=c.series,e=d.chart,f=d.data;oc(b,e);a=A(a,true);c.firePointEvent(\"remove\",null,function(){nc(f,c);c.destroy();d.isDirty=true;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();if(a===\"click\"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};Pa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=Ca(this.series.options.point,\nthis.options).events,b;this.events=a;for(b in a)Qa(this,b,a[b]);this.hasImportedEvents=true}},setState:function(a){var b=this.series,c=b.options.states,d=xb[b.type].marker&&b.options.marker,e=d&&!d.enabled,f=(d=d&&d.states[a])&&d.enabled===false,g=b.stateMarkerGraphic,h=b.chart,i=this.pointAttr;a=a||ib;if(!(a===this.state||this.selected&&a!==\"select\"||c[a]&&c[a].enabled===false||a&&(f||e&&!d.enabled))){if(this.graphic)this.graphic.attr(i[a]);else{if(a){if(!g)b.stateMarkerGraphic=g=h.renderer.circle(0,\n0,i[a].r).attr(i[a]).add(b.group);g.translate(this.plotX,this.plotY)}if(g)g[a?\"show\":\"hide\"]()}this.state=a}}};var sb=function(){};sb.prototype={isCartesian:true,type:\"line\",pointClass:Oc,pointAttrToOptions:{stroke:\"lineColor\",\"stroke-width\":\"lineWidth\",fill:\"fillColor\",r:\"radius\"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;b=this.setOptions(b);sa(this,{index:d,options:b,name:b.name||\"Series \"+(d+1),state:ib,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});d=b.events;\nfor(c in d)Qa(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=true;this.getColor();this.getSymbol();this.setData(b.data,false)},autoIncrement:function(){var a=this.options,b=this.xIncrement;b=A(b,a.pointStart,0);this.pointInterval=A(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},cleanData:function(){var a=this.chart,b=this.data,c,d,e=a.smallestInterval,f,g;Hd(b,function(h,i){return h.x-i.x});if(this.options.connectNulls)for(g=\nb.length-1;g>=0;g--)b[g].y===null&&b[g-1]&&b[g+1]&&b.splice(g,1);for(g=b.length-1;g>=0;g--)if(b[g-1]){f=b[g].x-b[g-1].x;if(f>0&&(d===Wa||f<d)){d=f;c=g}}if(e===Wa||d<e)a.smallestInterval=d;this.closestPoints=c},getSegments:function(){var a=-1,b=[],c=this.data;u(c,function(d,e){if(d.y===null){e>a+1&&b.push(c.slice(a+1,e));a=e}else e===c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return Ca(b[this.type],b.series,a)},getColor:function(){var a=\nthis.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||\"#0000ff\";b.wrapColor(a.length)},getSymbol:function(){var a=this.chart.options.symbols,b=this.chart.counters;this.symbol=this.options.marker.symbol||a[b.symbol++];b.wrapSymbol(a.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart;a=(new this.pointClass).init(this,a);oc(d,h);if(f&&c)f.shift=c;if(g){g.shift=c;g.isArea=true}b=A(b,true);e.push(a);c&&e[0].remove(false);this.getAttribs();\nthis.isDirty=true;b&&h.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=c.chart,g=d&&d.length||0;c.xIncrement=null;if(K(e))f.counters.color=e;for(a=tc(zc(a||[]),function(h){return(new c.pointClass).init(c,h)});g--;)d[g].destroy();c.data=a;c.cleanData();c.getSegments();c.getAttribs();c.isDirty=true;f.isDirtyBox=true;A(b,true)&&f.redraw(false)},remove:function(a,b){var c=this,d=c.chart;a=A(a,true);if(!c.isRemoving){c.isRemoving=true;Pa(c,\"remove\",null,function(){c.destroy();d.isDirtyLegend=\nd.isDirtyBox=true;a&&d.redraw(b)})}c.isRemoving=false},translate:function(){for(var a=this.chart,b=this.options.stacking,c=this.xAxis.categories,d=this.yAxis,e=this.data,f=e.length;f--;){var g=e[f],h=g.x,i=g.y,j=g.low,m=d.stacks[(i<0?\"-\":\"\")+this.stackKey];g.plotX=this.xAxis.translate(h);if(b&&this.visible&&m&&m[h]){j=m[h];h=j.total;j.cum=j=j.cum-i;i=j+i;if(b===\"percent\"){j=h?j*100/h:0;i=h?i*100/h:0}g.percentage=h?g.y*100/h:0;g.stackTotal=h}if(K(j))g.yBottom=d.translate(j,0,1,0,1);if(i!==null)g.plotY=\nd.translate(i,0,1,0,1);g.clientX=a.inverted?a.plotHeight-g.plotX:g.plotX;g.category=c&&c[g.x]!==Wa?c[g.x]:g.x}},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],e=W((c?b.plotTop:b.plotLeft)+b.plotSizeX),f,g,h=[];if(a)this.tooltipPoints=null;u(this.segments,function(i){d=d.concat(i)});if(this.xAxis&&this.xAxis.reversed)d=d.reverse();u(d,function(i,j){f=d[j-1]?d[j-1]._high+1:0;for(g=i._high=d[j+1]?lb((i.plotX+(d[j+1]?d[j+1].plotX:e))/2):e;f<=g;)h[c?e-f++:f++]=i});this.tooltipPoints=h},\nonMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(!(!Kb&&a.mouseIsDown)){b&&b!==this&&b.onMouseOut();this.options.events.mouseOver&&Pa(this,\"mouseOver\");this.tracker&&this.tracker.toFront();this.setState(Bb);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut();this&&a.events.mouseOut&&Pa(this,\"mouseOut\");c&&!a.stickyTracking&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,\nd=this.options.animation;if(d&&!Nb(d))d={};if(a){if(!c.isAnimating){c.attr(\"width\",0);c.isAnimating=true}}else{c.animate({width:b.plotSizeX},d);this.animate=null}},drawPoints:function(){var a,b=this.data,c=this.chart,d,e,f,g,h,i;if(this.options.marker.enabled)for(f=b.length;f--;){g=b[f];d=g.plotX;e=g.plotY;i=g.graphic;if(e!==Wa&&!isNaN(e)){a=g.pointAttr[g.selected?\"select\":ib];h=a.r;if(i)i.animate({x:d,y:e,r:h});else g.graphic=c.renderer.symbol(A(g.marker&&g.marker.symbol,this.symbol),d,e,h).attr(a).add(this.group)}}},\nconvertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];h[f]=A(a[g],b[f],c[f],d[f])}return h},getAttribs:function(){var a=this,b=xb[a.type].marker?a.options.marker:a.options,c=b.states,d=c[Bb],e,f=a.color,g={stroke:f,fill:f},h=a.data,i=[],j,m=a.pointAttrToOptions,v;if(a.options.marker){d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else d.color=d.color||bc(d.color||f).brighten(d.brightness).get();i[ib]=a.convertAttribs(b,\ng);u([Bb,\"select\"],function(P){i[P]=a.convertAttribs(c[P],i[ib])});a.pointAttr=i;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===false)b.radius=0;e=false;if(g.options)for(v in m)if(K(b[m[v]]))e=true;if(e){j=[];c=b.states||{};e=c[Bb]=c[Bb]||{};if(!a.options.marker)e.color=bc(e.color||g.options.color).brighten(e.brightness||d.brightness).get();j[ib]=a.convertAttribs(b,i[ib]);j[Bb]=a.convertAttribs(c[Bb],i[Bb],j[ib]);j.select=a.convertAttribs(c.select,i.select,\nj[ib])}else j=i;g.pointAttr=j}},destroy:function(){var a=this,b=a.chart,c=a.clipRect,d=/\\/5[0-9\\.]+ (Safari|Mobile)\\//.test(yc),e,f;Pa(a,\"destroy\");pb(a);a.legendItem&&a.chart.legend.destroyItem(a);u(a.data,function(g){g.destroy()});if(c&&c!==b.clipRect)a.clipRect=c.destroy();u([\"area\",\"graph\",\"dataLabelsGroup\",\"group\",\"tracker\"],function(g){if(a[g]){e=d&&g===\"group\"?\"hide\":\"destroy\";a[g][e]()}});if(b.hoverSeries===a)b.hoverSeries=null;nc(b.series,a);for(f in a)delete a[f]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a,\nb,c=this.data,d=this.options,e=d.dataLabels,f,g=this.dataLabelsGroup,h=this.chart,i=h.renderer,j=h.inverted,m=this.type,v;v=d.stacking;var P=m===\"column\"||m===\"bar\",T=e.verticalAlign===null,Y=e.y===null;if(P)if(v){if(T)e=Ca(e,{verticalAlign:\"middle\"});if(Y)e=Ca(e,{y:{top:14,middle:4,bottom:-6}[e.verticalAlign]})}else if(T)e=Ca(e,{verticalAlign:\"top\"});if(g)g.translate(h.plotLeft,h.plotTop);else g=this.dataLabelsGroup=i.g(\"data-labels\").attr({visibility:this.visible?Ab:ob,zIndex:6}).translate(h.plotLeft,\nh.plotTop).add();v=e.color;if(v===\"auto\")v=null;e.style.color=A(v,this.color,\"black\");u(c,function(H){var U=H.barX,z=U&&U+H.barW/2||H.plotX||-999,M=A(H.plotY,-999),y=H.dataLabel,C=e.align,Z=Y?H.y>=0?-6:12:e.y;f=e.formatter.call(H.getLabelConfig());a=(j?h.plotWidth-M:z)+e.x;b=(j?h.plotHeight-z:M)+Z;if(m===\"column\")a+={left:-1,right:1}[C]*H.barW/2||0;if(j&&H.y<0){C=\"right\";a-=10}if(y){if(j&&!e.y)b=b+ja(y.styles.lineHeight)*0.9-y.getBBox().height/2;y.attr({text:f}).animate({x:a,y:b})}else if(K(f)){y=\nH.dataLabel=i.text(f,a,b).attr({align:C,rotation:e.rotation,zIndex:1}).css(e.style).add(g);j&&!e.y&&y.attr({y:b+ja(y.styles.lineHeight)*0.9-y.getBBox().height/2})}if(P&&d.stacking&&y){z=H.barY;M=H.barW;H=H.barH;y.align(e,null,{x:j?h.plotWidth-z-H:U,y:j?h.plotHeight-U-M:z,width:j?H:M,height:j?M:H})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,i=b.lineWidth,j=b.dashStyle,m,v=a.chart.renderer,P=a.yAxis.getThreshold(b.threshold||0),T=/^area/.test(a.type),\nY=[],H=[];u(a.segments,function(U){m=[];u(U,function(C,Z){if(a.getPointSpline)m.push.apply(m,a.getPointSpline(U,C,Z));else{m.push(Z?Ka:Za);Z&&b.step&&m.push(C.plotX,U[Z-1].plotY);m.push(C.plotX,C.plotY)}});if(U.length>1)d=d.concat(m);else Y.push(U[0]);if(T){var z=[],M,y=m.length;for(M=0;M<y;M++)z.push(m[M]);y===3&&z.push(Ka,m[1],m[2]);if(b.stacking&&a.type!==\"areaspline\")for(M=U.length-1;M>=0;M--)z.push(U[M].plotX,U[M].yBottom);else z.push(Ka,U[U.length-1].plotX,P,Ka,U[0].plotX,P);H=H.concat(z)}});\na.graphPath=d;a.singlePoints=Y;if(T){e=A(b.fillColor,bc(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.animate({d:H});else a.area=a.chart.renderer.path(H).attr({fill:e}).add(g)}if(c){Hc(c);c.animate({d:d})}else if(i){c={stroke:h,\"stroke-width\":i};if(j)c.dashstyle=j;a.graph=v.path(d).attr(c).add(g).shadow(b.shadow)}},render:function(){var a=this,b=a.chart,c,d,e=a.options,f=e.animation,g=f&&a.animate;f=g?f&&f.duration||500:0;var h=a.clipRect,i=b.renderer;if(!h){h=a.clipRect=!b.hasRendered&&\nb.clipRect?b.clipRect:i.clipRect(0,0,b.plotSizeX,b.plotSizeY);if(!b.clipRect)b.clipRect=h}if(!a.group){c=a.group=i.g(\"series\");if(b.inverted){d=function(){c.attr({width:b.plotWidth,height:b.plotHeight}).invert()};d();Qa(b,\"resize\",d);Qa(a,\"destroy\",function(){pb(b,\"resize\",d)})}c.clip(a.clipRect).attr({visibility:a.visible?Ab:ob,zIndex:e.zIndex}).translate(b.plotLeft,b.plotTop).add(b.seriesGroup)}a.drawDataLabels();g&&a.animate(true);a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==\nfalse&&a.drawTracker();g&&a.animate();setTimeout(function(){h.isAnimating=false;if((c=a.group)&&h!==b.clipRect&&h.renderer){c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=false},redraw:function(){var a=this.chart,b=this.group;if(b){a.inverted&&b.attr({width:a.plotWidth,height:a.plotHeight});b.animate({translateX:a.plotLeft,translateY:a.plotTop})}this.translate();this.setTooltipPoints(true);this.render()},setState:function(a){var b=this.options,c=this.graph,d=b.states;b=b.lineWidth;a=a||\nib;if(this.state!==a){this.state=a;if(!(d[a]&&d[a].enabled===false)){if(a)b=d[a].lineWidth||b+1;if(c&&!c.dashstyle)c.attr({\"stroke-width\":b},a?0:500)}}},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,i=this.data,j=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===Wa?!h:a)?\"show\":\"hide\";e&&e[h]();if(f)f[h]();else for(e=i.length;e--;){f=i[e];f.tracker&&f.tracker[h]()}g&&g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=\ntrue;this.options.stacking&&u(c.series,function(m){if(m.options.stacking&&m.visible)m.isDirty=true});if(j)c.isDirtyBox=true;b!==false&&c.redraw();Pa(this,h)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){this.selected=a=a===Wa?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;Pa(this,a?\"select\":\"unselect\")},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.options.tooltip.snap,g=a.tracker,h=b.cursor;\nh=h&&{cursor:h};var i=a.singlePoints,j;if(d)for(j=d+1;j--;){c[j]===Za&&c.splice(j+1,0,c[j+1]-f,c[j+2],Ka);if(j&&c[j]===Za||j===d)c.splice(j,0,Ka,c[j-2]+f,c[j-1])}for(j=0;j<i.length;j++){d=i[j];c.push(Za,d.plotX-f,d.plotY,Ka,d.plotX+f,d.plotY)}if(g)g.attr({d:c});else a.tracker=e.renderer.path(c).attr({isTracker:true,stroke:ce,fill:jb,\"stroke-width\":b.lineWidth+2*f,visibility:a.visible?Ab:ob,zIndex:b.zIndex||1}).on(Kb?\"touchstart\":\"mouseover\",function(){e.hoverSeries!==a&&a.onMouseOver()}).on(\"mouseout\",\nfunction(){b.stickyTracking||a.onMouseOut()}).css(h).add(e.trackerGroup)}};ma=yb(sb);wb.line=ma;ma=yb(sb,{type:\"area\"});wb.area=ma;ma=yb(sb,{type:\"spline\",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,i,j,m;if(c&&c<a.length-1){a=f.plotY;j=g.plotX;g=g.plotY;var v;h=(1.5*d+f.plotX)/2.5;i=(1.5*e+a)/2.5;j=(1.5*d+j)/2.5;m=(1.5*e+g)/2.5;v=(m-i)*(j-d)/(j-h)+e-m;i+=v;m+=v;if(i>a&&i>e){i=Ia(a,e);m=2*e-i}else if(i<a&&i<e){i=tb(a,e);m=2*e-i}if(m>g&&m>e){m=Ia(g,e);i=2*e-m}else if(m<\ng&&m<e){m=tb(g,e);i=2*e-m}b.rightContX=j;b.rightContY=m}if(c){b=[\"C\",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e];f.rightContX=f.rightContY=null}else b=[Za,d,e];return b}});wb.spline=ma;ma=yb(ma,{type:\"areaspline\"});wb.areaspline=ma;var hd=yb(sb,{type:\"column\",pointAttrToOptions:{stroke:\"borderColor\",\"stroke-width\":\"borderWidth\",fill:\"color\",r:\"borderRadius\"},init:function(){sb.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasColumn=true;b.hasRendered&&u(b.series,function(c){if(c.type===\na.type)c.isDirty=true})},translate:function(){var a=this,b=a.chart,c=a.options,d=c.stacking,e=c.borderWidth,f=0,g=a.xAxis.reversed,h=a.xAxis.categories,i={},j,m;sb.prototype.translate.apply(a);u(b.series,function(C){if(C.type===a.type&&C.visible){if(C.options.stacking){j=C.stackKey;if(i[j]===Wa)i[j]=f++;m=i[j]}else m=f++;C.columnIndex=m}});var v=a.data,P=a.closestPoints;h=bb(v[1]?v[P].plotX-v[P-1].plotX:b.plotSizeX/(h&&h.length||1));P=h*c.groupPadding;var T=(h-2*P)/f,Y=c.pointWidth,H=K(Y)?(T-Y)/2:\nT*c.pointPadding,U=Ia(A(Y,T-2*H),1),z=H+(P+((g?f-a.columnIndex:a.columnIndex)||0)*T-h/2)*(g?-1:1),M=a.yAxis.getThreshold(c.threshold||0),y=A(c.minPointLength,5);u(v,function(C){var Z=C.plotY,Sa=C.yBottom||M,Na=C.plotX+z,Ea=md(tb(Z,Sa)),gb=md(Ia(Z,Sa)-Ea),Lb=a.yAxis.stacks[(C.y<0?\"-\":\"\")+a.stackKey],Rb;d&&a.visible&&Lb&&Lb[C.x]&&Lb[C.x].setOffset(z,U);if(bb(gb)<y){if(y){gb=y;Ea=bb(Ea-M)>y?Sa-y:M-(Z<=M?y:0)}Rb=Ea-3}sa(C,{barX:Na,barY:Ea,barW:U,barH:gb});C.shapeType=\"rect\";Z=sa(b.renderer.Element.prototype.crisp.apply({},\n[e,Na,Ea,U,gb]),{r:c.borderRadius});if(e%2){Z.y-=1;Z.height+=1}C.shapeArgs=Z;C.trackerArgs=K(Rb)&&Ca(C.shapeArgs,{height:Ia(6,gb+3),y:Rb})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;u(a.data,function(f){var g=f.plotY;if(g!==Wa&&!isNaN(g)&&f.y!==null){d=f.graphic;e=f.shapeArgs;if(d){Hc(d);d.animate(e)}else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?\"select\":ib]).add(a.group).shadow(b.shadow)}})},drawTracker:function(){var a=\nthis,b=a.chart,c=b.renderer,d,e,f=+new Date,g=a.options,h=g.cursor,i=h&&{cursor:h},j;u(a.data,function(m){e=m.tracker;d=m.trackerArgs||m.shapeArgs;delete d.strokeWidth;if(m.y!==null)if(e)e.attr(d);else m.tracker=c[m.shapeType](d).attr({isTracker:f,fill:ce,visibility:a.visible?Ab:ob,zIndex:g.zIndex||1}).on(Kb?\"touchstart\":\"mouseover\",function(v){j=v.relatedTarget||v.fromElement;b.hoverSeries!==a&&Ga(j,\"isTracker\")!==f&&a.onMouseOver();m.onMouseOver()}).on(\"mouseout\",function(v){if(!g.stickyTracking){j=\nv.relatedTarget||v.toElement;Ga(j,\"isTracker\")!==f&&a.onMouseOut()}}).css(i).add(m.group||b.trackerGroup)})},animate:function(a){var b=this,c=b.data;if(!a){u(c,function(d){var e=d.graphic;d=d.shapeArgs;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.height,y:d.y},b.options.animation)}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&u(b.series,function(c){if(c.type===a.type)c.isDirty=true});sb.prototype.remove.apply(a,arguments)}});wb.column=hd;ma=yb(hd,\n{type:\"bar\",init:function(a){a.inverted=this.inverted=true;hd.prototype.init.apply(this,arguments)}});wb.bar=ma;ma=yb(sb,{type:\"scatter\",translate:function(){var a=this;sb.prototype.translate.apply(a);u(a.data,function(b){b.shapeType=\"circle\";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;u(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on(\"mouseover\",function(){a.onMouseOver();e.onMouseOver()}).on(\"mouseout\",\nfunction(){a.options.stickyTracking||a.onMouseOut()}).css(c)})},cleanData:function(){}});wb.scatter=ma;ma=yb(Oc,{init:function(){Oc.prototype.init.apply(this,arguments);var a=this,b;sa(a,{visible:a.visible!==false,name:A(a.name,\"Slice\")});b=function(){a.slice()};Qa(a,\"select\",b);Qa(a,\"unselect\",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===Wa?!this.visible:a)?\"show\":\"hide\";this.group[g]();c&&\nc[g]();d&&d[g]();e&&e[g]();f&&f[g]();this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;oc(c,d);A(b,true);a=this.sliced=K(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});ma=yb(sb,{type:\"pie\",isCartesian:false,pointClass:ma,pointAttrToOptions:{stroke:\"borderColor\",\"stroke-width\":\"borderWidth\",fill:\"color\"},getColor:function(){this.initialColor=\nthis.chart.counters.color},animate:function(){var a=this;u(a.data,function(b){var c=b.graphic;b=b.shapeArgs;var d=-kc/2;if(c){c.attr({r:0,start:d,end:d});c.animate({r:b.r,start:b.start,end:b.end},a.options.animation)}});a.animate=null},translate:function(){var a=0,b=-0.25,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f=c.center.concat([c.size,c.innerSize||0]),g=this.chart,h=g.plotWidth,i=g.plotHeight,j,m,v,P=this.data,T=2*kc,Y,H=tb(h,i),U,z,M,y=c.dataLabels.distance;f=tc(f,function(C,Z){return(U=\n/%$/.test(C))?[h,i,H,H][Z]*ja(C)/100:C});this.getX=function(C,Z){v=Fa.asin((C-f[1])/(f[2]/2+y));return f[0]+(Z?-1:1)*rb(v)*(f[2]/2+y)};this.center=f;u(P,function(C){a+=C.y});u(P,function(C){Y=a?C.y/a:0;j=W(b*T*1E3)/1E3;b+=Y;m=W(b*T*1E3)/1E3;C.shapeType=\"arc\";C.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:j,end:m};v=(m+j)/2;C.slicedTranslation=tc([rb(v)*d+g.plotLeft,Cb(v)*d+g.plotTop],W);z=rb(v)*f[2]/2;M=Cb(v)*f[2]/2;C.tooltipPos=[f[0]+z*0.7,f[1]+M*0.7];C.labelPos=[f[0]+z+rb(v)*y,f[1]+M+Cb(v)*\ny,f[0]+z+rb(v)*e,f[1]+M+Cb(v)*e,f[0]+z,f[1]+M,y<0?\"center\":v<T/4?\"left\":\"right\",v];C.percentage=Y*100;C.total=a});this.setTooltipPoints()},render:function(){this.drawPoints();this.options.enableMouseTracking!==false&&this.drawTracker();this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=false},drawPoints:function(){var a=this.chart,b=a.renderer,c,d,e,f=this.options.shadow,g,h;u(this.data,function(i){d=i.graphic;h=i.shapeArgs;e=i.group;g=i.shadowGroup;if(f&&!g)g=\ni.shadowGroup=b.g(\"shadow\").attr({zIndex:4}).add();if(!e)e=i.group=b.g(\"point\").attr({zIndex:5}).add();c=i.sliced?i.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);g&&g.translate(c[0],c[1]);if(d)d.animate(h);else i.graphic=b.arc(h).attr(sa(i.pointAttr[ib],{\"stroke-linejoin\":\"round\"})).add(i.group).shadow(f,g);i.visible===false&&i.setVisible(false)})},drawDataLabels:function(){var a=this.data,b,c=this.chart,d=this.options.dataLabels,e=A(d.connectorPadding,10),f=A(d.connectorWidth,1),\ng,h,i=A(d.softConnector,true),j=d.distance,m=this.center,v=m[2]/2;m=m[1];var P=j>0,T=[[],[]],Y,H,U,z,M=2,y;if(d.enabled){sb.prototype.drawDataLabels.apply(this);u(a,function(gb){if(gb.dataLabel)T[gb.labelPos[7]<kc/2?0:1].push(gb)});T[1].reverse();z=function(gb,Lb){return Lb.y-gb.y};for(a=T[0][0]&&T[0][0].dataLabel&&ja(T[0][0].dataLabel.styles.lineHeight);M--;){var C=[],Z=[],Sa=T[M],Na=Sa.length,Ea;for(y=m-v-j;y<=m+v+j;y+=a)C.push(y);U=C.length;if(Na>U){h=[].concat(Sa);h.sort(z);for(y=Na;y--;)h[y].rank=\ny;for(y=Na;y--;)Sa[y].rank>=U&&Sa.splice(y,1);Na=Sa.length}for(y=0;y<Na;y++){b=Sa[y];h=b.labelPos;b=9999;for(H=0;H<U;H++){g=bb(C[H]-h[1]);if(g<b){b=g;Ea=H}}if(Ea<y&&C[y]!==null)Ea=y;else{if(U<Na-y+Ea&&C[y]!==null)Ea=U-Na+y;for(;C[Ea]===null;)Ea++}Z.push({i:Ea,y:C[Ea]});C[Ea]=null}Z.sort(z);for(y=0;y<Na;y++){b=Sa[y];h=b.labelPos;g=b.dataLabel;H=Z.pop();Y=h[1];U=b.visible===false?ob:Ab;Ea=H.i;H=H.y;if(Y>H&&C[Ea+1]!==null||Y<H&&C[Ea-1]!==null)H=Y;Y=this.getX(Ea===0||Ea===C.length-1?Y:H,M);g.attr({visibility:U,\nalign:h[6]})[g.moved?\"animate\":\"attr\"]({x:Y+d.x+({left:e,right:-e}[h[6]]||0),y:H+d.y});g.moved=true;if(P&&f){g=b.connector;h=i?[Za,Y+(h[6]===\"left\"?5:-5),H,\"C\",Y,H,2*h[2]-h[4],2*h[3]-h[5],h[2],h[3],Ka,h[4],h[5]]:[Za,Y+(h[6]===\"left\"?5:-5),H,Ka,h[2],h[3],Ka,h[4],h[5]];if(g){g.animate({d:h});g.attr(\"visibility\",U)}else b.connector=g=this.chart.renderer.path(h).attr({\"stroke-width\":f,stroke:d.connectorColor||b.color||\"#606060\",visibility:U,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}}},drawTracker:hd.prototype.drawTracker,\ngetSymbol:function(){}});wb.pie=ma;db.Highcharts={Chart:Nd,dateFormat:Zc,pathAnim:Nc,getOptions:function(){return Xa},hasRtlBug:me,numberFormat:Ed,Point:Oc,Color:bc,Renderer:fd,seriesTypes:wb,setOptions:function(a){Xa=Ca(Xa,a);Id();return Xa},Series:sb,addEvent:Qa,removeEvent:pb,createElement:hb,discardElement:pc,css:Ja,each:u,extend:sa,map:tc,merge:Ca,pick:A,extendClass:yb,product:\"Highcharts\",version:\"2.1.9\"}})();\n"
  },
  {
    "path": "test/html5shiv.html",
    "content": "<!doctype html>\n<html lang=\"en\" dir=\"ltr\" id=\"html\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>html5shiv Test Suite</title>\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tbackground: url(data/body-crash.jpg) no-repeat -999px -999px;\n\t\t\t}\n\t\t\tarticle {\n\t\t\t\tborder: 2px solid #8C8;\n\t\t\t}\n\t\t</style>\n\t\t<link rel=\"stylesheet\" media=\"screen\" href=\"qunit/qunit.css\">\n\t\t<script src=\"../src/html5shiv-printshiv.js\"></script>\n\t\t\n\t\t<script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js\"></script>\n\t\t\n\t\t<script src=\"qunit/qunit.js\"></script>\n\t\t\n\t\t<script src=\"unit/tests.js\"></script>\n\t</head>\n\t<body id=\"body\">\n\t\t<h1 id=\"qunit-header\">html5shiv Test Suite</h1>\n\t\t<h2 id=\"qunit-banner\"></h2>\n\t\t<div id=\"qunit-testrunner-toolbar\"></div>\n\t\t<h2 id=\"qunit-userAgent\"></h2>\n\t\t<ol id=\"qunit-tests\"></ol>\n\t\t\n\t\t<iframe class=\"test-frame\" src=\"data/iframed-tests.html?disableMethodsBefore\"></iframe>\n\t\t<iframe class=\"test-frame\" src=\"data/iframed-tests.html?disableMethodsAfter\"></iframe>\n\t\t<iframe class=\"test-frame\" src=\"data/iframed-tests.html?addUnknownBefore\"></iframe>\n\t\t<iframe class=\"test-frame\" src=\"data/iframed-tests.html?addUnknownAfter\"></iframe>\n\t\t<iframe class=\"test-frame\" src=\"data/iframed-tests.html?disableCSS\"></iframe>\n\t\t<iframe class=\"test-frame\" src=\"data/iframed-tests.html?noEmbed\"></iframe>\n\t\t\n\t\t\n\t\t<div id=\"qunit-fixture\">\n\t\t\t<abcxyz>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</abcxyz>\n\t\t\t<article>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</article>\n\t\t\t<aside>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</aside>\n\t\t\t<figcaption>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</figcaption>\n\t\t\t<figure>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</figure>\n\t\t\t<footer>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</footer>\n\t\t\t<header>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</header>\n\t\t\t<hgroup>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</hgroup>\n\t\t\t<nav>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</nav>\n\t\t\t<section>\n\t\t\t\t<div class=\"inside\"></div>\n\t\t\t</section>\n\t\t</div>\n\t</body>\n</html>"
  },
  {
    "path": "test/iframe.1-1.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>Test 1</title>\n\t\t<link rel=\"stylesheet\" href=\"style.css\">\n\t\t<script src=\"../src/html5shiv-printshiv.js\"></script>\n\t</head>\n\t<body>\n\t\t<section>\n\t\t\t<p><a href=\"iframe.1-2.html\">Change to Test Page 2</a></p>\n\t\t</section>\n\t</body>\n</html>"
  },
  {
    "path": "test/iframe.1-2.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>Test 2</title>\n\t\t<link rel=\"stylesheet\" href=\"style.css\">\n\t\t<script src=\"../src/html5shiv-printshiv.js\"></script>\n\t<body>\n\t\t<section>\n\t\t\t<p><a href=\"iframe.1-1.html\">Change to Test Page 1</a> <span contenteditable>...</span></p>\n\t\t</section>\n\t</body>\n</html>"
  },
  {
    "path": "test/iframe.1.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>HTML5Shiv</title>\n\t\t<link rel=\"stylesheet\" href=\"style.css\">\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tcolor: #fff;\n\t\t\t\tbackground: url(data/body-crash.jpg);\n\t\t\t}\n\t\t</style>\n\t\t<script src=\"../src/html5shiv-printshiv.js\"></script>\n\t\t<script src=\"//use.typekit.com/fbz1vwc.js\"></script>\n\t\t<script>\n\t\t\tTypekit.load();\n\t\t</script>\n\t</head>\n\t<body>\n\t\t<section>1</section>\n\t\t<section>2</section>\n\t\t<section style=\"border-color: red;\">3</section>\n\t\t<section>\n\t\t\t<iframe src=\"iframe.1-1.html\" style=\"width:100%;height:100%;\" frameborder=\"0\"></iframe>\n\t\t</section>\n\t</body>\n</html>"
  },
  {
    "path": "test/index.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>IE&lt;9 HTML5 Shiv Tests</title>\n\t\t<link rel=\"stylesheet\" href=\"style.css\">\n\t\t<script src=\"../src/html5shiv-printshiv.js\"></script>\n\t</head>\n\t<body>\n\t\t<h1>\n\t\t\tHTML5 Shiv Tests\n\t\t</h1>\n\t\t<h2>manual Print tests</h2>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"html5shiv.html\">html5shiv testsuite</a>: <span class=\"pass\">PASS</span>\n\t\t\t</li>\n\t\t\t\n\t\t</ul>\n\t\t<h2>manual Print tests</h2>\n\t\t<ul>\n\t\t\t<li>\n\t\t\t\t<a href=\"iframe.1.html\">iframe.1.html</a>: <span class=\"pass\">PASS</span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"mixed-test.html\">mixed-test.html</a>: <span class=\"pass\">PASS</span>\n\t\t\t</li>\n\t\t\t\n\t\t</ul>\n\t\t<h2>additional tests</h2>\n\t\t<ul>\n\t\t\t\n\t\t\t<li>\n\t\t\t\t<a href=\"object-test.html\">object-test.html</a>: <span class=\"pass\">PASS</span>\n\t\t\t</li>\n\t\t\t\n\t\t\t<li>\n\t\t\t\t<a href=\"highcharts/area-basic.html\">area-basic.html</a>: <span class=\"pass\">PASS</span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<a href=\"jquery-1.7.1/index.html\">simplified jQuery test suite</a>:\n\t\t\t</li>\n\t\t</ul>\n\t<body>\n</html>\n"
  },
  {
    "path": "test/jquery-1.7.1/data/dashboard.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<dashboard>\n\t<locations class=\"foo\">\n\t\t<location for=\"bar\" checked=\"different\">\n\t\t\t<infowindowtab>\n\t\t\t\t<tab title=\"Location\"><![CDATA[blabla]]></tab>\n\t\t\t\t<tab title=\"Users\"><![CDATA[blublu]]></tab>\n\t\t\t</infowindowtab>\n\t\t</location>\n\t</locations>\n</dashboard>\n"
  },
  {
    "path": "test/jquery-1.7.1/data/iframe.html",
    "content": "<html>\n  <head>\n    <title>iframe</title>\n  </head>\n  <body>\n    <div><span>span text</span></div>\n  </body>\n</html>\n"
  },
  {
    "path": "test/jquery-1.7.1/data/test.js",
    "content": "var foobar = \"bar\";\njQuery('#ap').html('bar');\nok( true, \"test.js executed\");\n"
  },
  {
    "path": "test/jquery-1.7.1/data/testinit.js",
    "content": "var jQuery = this.jQuery || \"jQuery\", // For testing .noConflict()\n\t$ = this.$ || \"$\",\n\toriginaljQuery = jQuery,\n\toriginal$ = $,\n\tamdDefined;\n\n/**\n * Set up a mock AMD define function for testing AMD registration.\n */\nfunction define(name, dependencies, callback) {\n\tamdDefined = callback();\n}\n\ndefine.amd = {\n\tjQuery: true\n};\n\n/**\n * Returns an array of elements with the given IDs, eg.\n * @example q(\"main\", \"foo\", \"bar\")\n * @result [<div id=\"main\">, <span id=\"foo\">, <input id=\"bar\">]\n */\nfunction q() {\n\tvar r = [];\n\n\tfor ( var i = 0; i < arguments.length; i++ ) {\n\t\tr.push( document.getElementById( arguments[i] ) );\n\t}\n\n\treturn r;\n}\n\n/**\n * Asserts that a select matches the given IDs * @example t(\"Check for something\", \"//[a]\", [\"foo\", \"baar\"]);\n * @result returns true if \"//[a]\" return two elements with the IDs 'foo' and 'baar'\n */\nfunction t(a,b,c) {\n\tvar f = jQuery(b).get(), s = \"\";\n\n\tfor ( var i = 0; i < f.length; i++ ) {\n\t\ts += (s && \",\") + '\"' + f[i].id + '\"';\n\t}\n\n\tdeepEqual(f, q.apply(q,c), a + \" (\" + b + \")\");\n}\n\nvar fireNative;\nif ( document.createEvent ) {\n\tfireNative = function( node, type ) {\n\t\tvar event = document.createEvent('HTMLEvents');\n\t\tevent.initEvent( type, true, true );\n\t\tnode.dispatchEvent( event );\n\t};\n} else {\n\tfireNative = function( node, type ) {\n\t\tvar event = document.createEventObject();\n\t\tnode.fireEvent( 'on' + type, event );\n\t};\n}\n\n/**\n * Add random number to url to stop IE from caching\n *\n * @example url(\"data/test.html\")\n * @result \"data/test.html?10538358428943\"\n *\n * @example url(\"data/test.php?foo=bar\")\n * @result \"data/test.php?foo=bar&10538358345554\"\n */\nfunction url(value) {\n\treturn value + (/\\?/.test(value) ? \"&\" : \"?\") + new Date().getTime() + \"\" + parseInt(Math.random()*100000);\n}\n\n(function () {\n\t// Store the old counts so that we only assert on tests that have actually leaked,\n\t// instead of asserting every time a test has leaked sometime in the past\n\tvar oldCacheLength = 0,\n\t\toldFragmentsLength = 0,\n\t\toldTimersLength = 0,\n\t\toldActive = 0;\n\n\t/**\n\t * Ensures that tests have cleaned up properly after themselves. Should be passed as the\n\t * teardown function on all modules' lifecycle object.\n\t */\n\tthis.moduleTeardown = function () {\n\t\tvar i, fragmentsLength = 0, cacheLength = 0;\n\n\t\t// Allow QUnit.reset to clean up any attached elements before checking for leaks\n\t\tQUnit.reset();\n\n\t\tfor ( i in jQuery.cache ) {\n\t\t\t++cacheLength;\n\t\t}\n\n\t\tjQuery.fragments = {};\n\n\t\tfor ( i in jQuery.fragments ) {\n\t\t\t++fragmentsLength;\n\t\t}\n\n\t\t// Because QUnit doesn't have a mechanism for retrieving the number of expected assertions for a test,\n\t\t// if we unconditionally assert any of these, the test will fail with too many assertions :|\n\t\tif ( cacheLength !== oldCacheLength ) {\n\t\t\tequal( cacheLength, oldCacheLength, \"No unit tests leak memory in jQuery.cache\" );\n\t\t\toldCacheLength = cacheLength;\n\t\t}\n\t\tif ( fragmentsLength !== oldFragmentsLength ) {\n\t\t\tequal( fragmentsLength, oldFragmentsLength, \"No unit tests leak memory in jQuery.fragments\" );\n\t\t\toldFragmentsLength = fragmentsLength;\n\t\t}\n\t\tif ( jQuery.timers.length !== oldTimersLength ) {\n\t\t\tequal( jQuery.timers.length, oldTimersLength, \"No timers are still running\" );\n\t\t\toldTimersLength = jQuery.timers.length;\n\t\t}\n\t\tif ( jQuery.active !== oldActive ) {\n\t\t\tequal( jQuery.active, 0, \"No AJAX requests are still active\" );\n\t\t\toldActive = jQuery.active;\n\t\t}\n\t}\n}());"
  },
  {
    "path": "test/jquery-1.7.1/data/testrunner.js",
    "content": "jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.\n\n// jQuery-specific QUnit.reset\n(function() {\n\tvar reset = QUnit.reset,\n\t\tajaxSettings = jQuery.ajaxSettings;\n\n\tQUnit.reset = function() {\n\t\treset.apply(this, arguments);\n\t\tjQuery.event.global = {};\n\t\tjQuery.ajaxSettings = jQuery.extend({}, ajaxSettings);\n\t};\n})();\n\n// load testswarm agent\n(function() {\n\tvar url = window.location.search;\n\turl = decodeURIComponent( url.slice( url.indexOf(\"swarmURL=\") + 9 ) );\n\tif ( !url || url.indexOf(\"http\") !== 0 ) {\n\t\treturn;\n\t}\n\n\t// (Temporarily) Disable Ajax tests to reduce network strain\n\t// isLocal = QUnit.isLocal = true;\n\n\tdocument.write(\"<scr\" + \"ipt src='http://swarm.jquery.org/js/inject.js?\" + (new Date).getTime() + \"'></scr\" + \"ipt>\");\n})();\n"
  },
  {
    "path": "test/jquery-1.7.1/data/testsuite.css",
    "content": "/* for testing opacity set in styles in IE */\nol#empty { opacity: 0; filter:Alpha(opacity=0) progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffff0000', EndColorStr='#ffffffff'); }\n\ndiv#fx-tests h4 {\n        background: red;\n}\n\ndiv#fx-tests h4.pass {\n        background: green;\n}\n\ndiv#fx-tests div.box {\n        background: red;\n        overflow: hidden;\n        border: 2px solid #000;\n}\n\ndiv#fx-tests div.overflow {\n        overflow: visible;\n}\n\ndiv.inline {\n        display: inline;\n}\n\ndiv.autoheight {\n        height: auto;\n}\n\ndiv.autowidth {\n        width: auto;\n}\n\ndiv.autoopacity {\n        opacity: auto;\n}\n\ndiv.largewidth {\n        width: 100px;\n}\n\ndiv.largeheight {\n        height: 100px;\n}\n\ndiv.largeopacity {\n        filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100);\n}\n\ndiv.medwidth {\n        width: 50px;\n}\n\ndiv.medheight {\n        height: 50px;\n}\n\ndiv.medopacity {\n        opacity: 0.5;\n        filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);\n}\n\ndiv.nowidth {\n        width: 0px;\n}\n\ndiv.noheight {\n        height: 0px;\n}\n\ndiv.noopacity {\n        opacity: 0;\n        filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);\n}\n\ndiv.hidden {\n        display: none;\n}\n\ndiv#fx-tests div.widewidth {\n        background-repeat: repeat-x;\n}\n\ndiv#fx-tests div.wideheight {\n        background-repeat: repeat-y;\n}\n\ndiv#fx-tests div.widewidth.wideheight {\n        background-repeat: repeat;\n}\n\ndiv#fx-tests div.noback {\n        background-image: none;\n}\n\ndiv.chain, div.chain div { width: 100px; height: 20px; position: relative; float: left; }\ndiv.chain div { position: absolute; top: 0px; left: 0px; }\n\ndiv.chain.test { background: red; }\ndiv.chain.test div { background: green; }\n\ndiv.chain.out { background: green; }\ndiv.chain.out div { background: red; display: none; }\n\n/* tests to ensure jQuery can determine the native display mode of elements\n   that have been set as display: none in stylesheets */\ndiv#show-tests * { display: none; }\n\n#nothiddendiv { font-size: 16px; }\n#nothiddendivchild.em { font-size: 2em; }\n#nothiddendivchild.prct { font-size: 150%; }\n\n/* For testing type on vml in IE #7071 */\nv\\:oval { behavior:url(#default#VML); display:inline-block; }\n\n/* 8099 changes to default styles are read correctly */\ntt { display: none; }\nsup { display: none; }\ndfn { display: none; }\n\n/* #9239 Attach a background to the body( avoid crashes in removing the test element in support ) */\nbody, div { background: url(http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif) no-repeat -1000px 0; }\n\n/* #6652 REMOVE FILTER:ALPHA(OPACITY=100) AFTER ANIMATION */\n#t6652 div { filter: alpha(opacity=50); }\n\n/* #10501 */\nsection { background:#f0f; display:block; }"
  },
  {
    "path": "test/jquery-1.7.1/data/versioncheck.js",
    "content": "// Run minified source from dist (do make first)\n// Should be loaded before QUnit but after src\n(function() {\n\tif ( /jquery\\=min/.test( window.location.search ) ) {\n\t\tjQuery.noConflict( true );\n\t\tdocument.write(unescape(\"%3Cscript%20src%3D%27../dist/jquery.min.js%27%3E%3C/script%3E\"));\n\t}\n})();"
  },
  {
    "path": "test/jquery-1.7.1/index.html",
    "content": "<!doctype html>\n<html lang=\"en\" dir=\"ltr\" id=\"html\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>jQuery Test Suite</title>\n\t\t<link rel=\"stylesheet\" media=\"screen\" href=\"../qunit/qunit.css\">\n\t\t<link rel=\"stylesheet\" media=\"screen\" href=\"data/testsuite.css\">\n\t\t<script src=\"data/testinit.js\"></script>\n\t\t<script src=\"../../src/html5shiv-printshiv.js\"></script>\n\t\t<script src=\"//code.jquery.com/jquery-1.7.1.min.js\"></script>\n\t\t<script src=\"data/versioncheck.js\"></script>\n\t\t<script src=\"../qunit/qunit.js\"></script>\n\t\t<script src=\"data/testrunner.js\"></script>\n\t\t<script src=\"unit/core.js\"></script>\n\t\t<script src=\"unit/traversing.js\"></script>\n\t\t<script src=\"unit/manipulation.js\"></script>\n\t</head>\n\t<body id=\"body\">\n\t\t<h1 id=\"qunit-header\"><a href=\"/jquery/test/index.html\">jQuery Test Suite</a>\n\t\t\t<a href=\"?jquery=min\">(minified)</a>\n\t\t</h1>\n\t\t<h2 id=\"qunit-banner\"></h2>\n\t\t<div id=\"qunit-testrunner-toolbar\"></div>\n\t\t<h2 id=\"qunit-userAgent\"></h2>\n\t\t<ol id=\"qunit-tests\"></ol>\n\n\t\t<!-- Test HTML -->\n\t\t<div id=\"nothiddendiv\" style=\"height:1px;background:white;\" class=\"nothiddendiv\">\n\t\t\t<div id=\"nothiddendivchild\"></div>\n\t\t</div>\n\n\t\t<!-- this iframe is outside the #qunit-fixture so it won't reload constantly wasting time, but it means the tests must be \"safe\" and clean up after themselves -->\n\t\t<iframe id=\"loadediframe\" name=\"loadediframe\" style=\"display:none;\" src=\"data/iframe.html\"></iframe>\n\t\t<dl id=\"dl\" style=\"position:absolute;top:-32767px;left:-32767px;width:1px\">\n\t\t<div id=\"qunit-fixture\">\n\t\t\t<p id=\"firstp\">See <a id=\"simon1\" href=\"http://simon.incutio.com/archive/2003/03/25/#getElementsBySelector\" rel=\"bookmark\">this blog entry</a> for more information.</p>\n\t\t\t<p id=\"ap\">\n\t\t\t\tHere are some links in a normal paragraph: <a id=\"google\" href=\"http://www.google.com/\" title=\"Google!\">Google</a>,\n\t\t\t\t<a id=\"groups\" href=\"http://groups.google.com/\" class=\"GROUPS\">Google Groups (Link)</a>.\n\t\t\t\tThis link has <code><a href=\"http://smin\" id=\"anchor1\">class=\"blog\"</a></code>:\n\t\t\t\t<a href=\"http://diveintomark.org/\" class=\"blog\" hreflang=\"en\" id=\"mark\">diveintomark</a>\n\t\t\t</p>\n\t\t\t<div id=\"foo\">\n\t\t\t\t<p id=\"sndp\">Everything inside the red border is inside a div with <code>id=\"foo\"</code>.</p>\n\t\t\t\t<p lang=\"en\" id=\"en\">This is a normal link: <a id=\"yahoo\" href=\"http://www.yahoo.com/\" class=\"blogTest\">Yahoo</a></p>\n\t\t\t\t<p id=\"sap\">This link has <code><a href=\"#2\" id=\"anchor2\">class=\"blog\"</a></code>: <a href=\"http://simon.incutio.com/\" class=\"blog link\" id=\"simon\">Simon Willison's Weblog</a></p>\n\t\t\t</div>\n\t\t\t<span id=\"name+value\"></span>\n\t\t\t<p id=\"first\">Try them out:</p>\n\t\t\t<ul id=\"firstUL\"></ul>\n\t\t\t<ol id=\"empty\"></ol>\n\t\t\t<form id=\"form\" action=\"formaction\">\n\t\t\t\t<label for=\"action\" id=\"label-for\">Action:</label>\n\t\t\t\t<input type=\"text\" name=\"action\" value=\"Test\" id=\"text1\" maxlength=\"30\">\n\t\t\t\t<input type=\"text\" name=\"text2\" value=\"Test\" id=\"text2\" disabled=\"disabled\">\n\t\t\t\t<input type=\"radio\" name=\"radio1\" id=\"radio1\" value=\"on\">\n\n\t\t\t\t<input type=\"radio\" name=\"radio2\" id=\"radio2\" checked=\"checked\">\n\t\t\t\t<input type=\"checkbox\" name=\"check\" id=\"check1\" checked=\"checked\">\n\t\t\t\t<input type=\"checkbox\" id=\"check2\" value=\"on\">\n\n\t\t\t\t<input type=\"hidden\" name=\"hidden\" id=\"hidden1\">\n\t\t\t\t<input type=\"text\" style=\"display:none;\" name=\"foo[bar]\" id=\"hidden2\">\n\n\t\t\t\t<input type=\"text\" id=\"name\" name=\"name\" value=\"name\">\n\t\t\t\t<input type=\"search\" id=\"search\" name=\"search\" value=\"search\">\n\n\t\t\t\t<button id=\"button\" name=\"button\" type=\"button\">Button</button>\n\t\t\t\t<textarea id=\"area1\" maxlength=\"30\">foobar</textarea>\n\n\t\t\t\t<select name=\"select1\" id=\"select1\">\n\t\t\t\t\t<option id=\"option1a\" class=\"emptyopt\" value=\"\">Nothing</option>\n\t\t\t\t\t<option id=\"option1b\" value=\"1\">1</option>\n\t\t\t\t\t<option id=\"option1c\" value=\"2\">2</option>\n\t\t\t\t\t<option id=\"option1d\" value=\"3\">3</option>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"select2\" id=\"select2\">\n\t\t\t\t\t<option id=\"option2a\" class=\"emptyopt\" value=\"\">Nothing</option>\n\t\t\t\t\t<option id=\"option2b\" value=\"1\">1</option>\n\t\t\t\t\t<option id=\"option2c\" value=\"2\">2</option>\n\t\t\t\t\t<option id=\"option2d\" selected=\"selected\" value=\"3\">3</option>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"select3\" id=\"select3\" multiple=\"multiple\">\n\t\t\t\t\t<option id=\"option3a\" class=\"emptyopt\" value=\"\">Nothing</option>\n\t\t\t\t\t<option id=\"option3b\" selected=\"selected\" value=\"1\">1</option>\n\t\t\t\t\t<option id=\"option3c\" selected=\"selected\" value=\"2\">2</option>\n\t\t\t\t\t<option id=\"option3d\" value=\"3\">3</option>\n\t\t\t\t\t<option id=\"option3e\">no value</option>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"select4\" id=\"select4\" multiple=\"multiple\">\n\t\t\t\t\t<optgroup disabled=\"disabled\">\n\t\t\t\t\t\t<option id=\"option4a\" class=\"emptyopt\" value=\"\">Nothing</option>\n\t\t\t\t\t\t<option id=\"option4b\" disabled=\"disabled\" selected=\"selected\" value=\"1\">1</option>\n\t\t\t\t\t\t<option id=\"option4c\" selected=\"selected\" value=\"2\">2</option>\n\t\t\t\t\t</optgroup>\n\t\t\t\t\t<option selected=\"selected\" disabled=\"disabled\" id=\"option4d\" value=\"3\">3</option>\n\t\t\t\t\t<option id=\"option4e\">no value</option>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"select5\" id=\"select5\">\n\t\t\t\t\t<option id=\"option5a\" value=\"3\">1</option>\n\t\t\t\t\t<option id=\"option5b\" value=\"2\">2</option>\n\t\t\t\t\t<option id=\"option5c\" value=\"1\" data-attr=\"\">3</option>\n\t\t\t\t</select>\n\n\t\t\t\t<object id=\"object1\" codebase=\"stupid\">\n\t\t\t\t\t<param name=\"p1\" value=\"x1\">\n\t\t\t\t\t<param name=\"p2\" value=\"x2\">\n\t\t\t\t</object>\n\n\t\t\t\t<span id=\"台北Táiběi\"></span>\n\t\t\t\t<span id=\"台北\" lang=\"中文\"></span>\n\t\t\t\t<span id=\"utf8class1\" class=\"台北Táiběi 台北\"></span>\n\t\t\t\t<span id=\"utf8class2\" class=\"台北\"></span>\n\t\t\t\t<span id=\"foo:bar\" class=\"foo:bar\"></span>\n\t\t\t\t<span id=\"test.foo[5]bar\" class=\"test.foo[5]bar\"></span>\n\t\t\t\t<foo_bar id=\"foobar\">test element</foo_bar>\n\t\t\t</form>\n\t\t\t<b id=\"floatTest\">Float test.</b>\n\t\t\t<iframe id=\"iframe\" name=\"iframe\"></iframe>\n\t\t\t<form id=\"lengthtest\">\n\t\t\t\t<input type=\"text\" id=\"length\" name=\"test\">\n\t\t\t\t<input type=\"text\" id=\"idTest\" name=\"id\">\n\t\t\t</form>\n\t\t\t<table id=\"table\"></table>\n\n\t\t\t<form id=\"name-tests\">\n\t\t\t\t<!-- Inputs with a grouped name attribute. -->\n\t\t\t\t<input name=\"types[]\" id=\"types_all\" type=\"checkbox\" value=\"all\">\n\t\t\t\t<input name=\"types[]\" id=\"types_anime\" type=\"checkbox\" value=\"anime\">\n\t\t\t\t<input name=\"types[]\" id=\"types_movie\" type=\"checkbox\" value=\"movie\">\n\t\t\t</form>\n\n\t\t\t<form id=\"testForm\" action=\"#\" method=\"get\">\n\t\t\t\t<textarea name=\"T3\" rows=\"2\" cols=\"15\">?\nZ</textarea>\n\t\t\t\t<input type=\"hidden\" name=\"H1\" value=\"x\">\n\t\t\t\t<input type=\"hidden\" name=\"H2\">\n\t\t\t\t<input name=\"PWD\" type=\"password\" value=\"\">\n\t\t\t\t<input name=\"T1\" type=\"text\">\n\t\t\t\t<input name=\"T2\" type=\"text\" value=\"YES\" readonly=\"readonly\">\n\t\t\t\t<input type=\"checkbox\" name=\"C1\" value=\"1\">\n\t\t\t\t<input type=\"checkbox\" name=\"C2\">\n\t\t\t\t<input type=\"radio\" name=\"R1\" value=\"1\">\n\t\t\t\t<input type=\"radio\" name=\"R1\" value=\"2\">\n\t\t\t\t<input type=\"text\" name=\"My Name\" value=\"me\">\n\t\t\t\t<input type=\"reset\" name=\"reset\" value=\"NO\">\n\t\t\t\t<select name=\"S1\">\n\t\t\t\t\t<option value=\"abc\">ABC</option>\n\t\t\t\t\t<option value=\"abc\">ABC</option>\n\t\t\t\t\t<option value=\"abc\">ABC</option>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"S2\" multiple=\"multiple\" size=\"3\">\n\t\t\t\t\t<option value=\"abc\">ABC</option>\n\t\t\t\t\t<option value=\"abc\">ABC</option>\n\t\t\t\t\t<option value=\"abc\">ABC</option>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"S3\">\n\t\t\t\t\t<option selected=\"selected\">YES</option>\n\t\t\t\t</select>\n\t\t\t\t<select name=\"S4\">\n\t\t\t\t\t<option value=\"\" selected=\"selected\">NO</option>\n\t\t\t\t</select>\n\t\t\t\t<input type=\"submit\" name=\"sub1\" value=\"NO\">\n\t\t\t\t<input type=\"submit\" name=\"sub2\" value=\"NO\">\n\t\t\t\t<input type=\"image\" name=\"sub3\" value=\"NO\">\n\t\t\t\t<button name=\"sub4\" type=\"submit\" value=\"NO\">NO</button>\n\t\t\t\t<input name=\"D1\" type=\"text\" value=\"NO\" disabled=\"disabled\">\n\t\t\t\t<input type=\"checkbox\" checked=\"checked\" disabled=\"disabled\" name=\"D2\" value=\"NO\">\n\t\t\t\t<input type=\"radio\" name=\"D3\" value=\"NO\" checked=\"checked\" disabled=\"disabled\">\n\t\t\t\t<select name=\"D4\" disabled=\"disabled\">\n\t\t\t\t\t<option selected=\"selected\" value=\"NO\">NO</option>\n\t\t\t\t</select>\n\t\t\t\t<input id=\"list-test\" type=\"text\">\n\t\t\t\t<datalist id=\"datalist\">\n\t\t\t\t\t<option value=\"option\"></option>\n\t\t\t\t</datalist>\n\t\t\t</form>\n\t\t\t<div id=\"moretests\">\n\t\t\t\t<form>\n\t\t\t\t\t<div id=\"checkedtest\" style=\"display:none;\">\n\t\t\t\t\t\t<input type=\"radio\" name=\"checkedtestradios\" checked=\"checked\">\n\t\t\t\t\t\t<input type=\"radio\" name=\"checkedtestradios\" value=\"on\">\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"checkedtestcheckboxes\" checked=\"checked\">\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"checkedtestcheckboxes\">\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t\t<div id=\"nonnodes\"><span>hi</span> there <!-- mon ami --></div>\n\t\t\t\t<div id=\"t2037\">\n\t\t\t\t\t<div><div class=\"hidden\">hidden</div></div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"t6652\">\n\t\t\t\t\t<div></div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"no-clone-exception\"><object><embed></embed></object></div>\n\t\t\t</div>\n\n\t\t\t<div id=\"tabindex-tests\">\n\t\t\t\t<ol id=\"listWithTabIndex\" tabindex=\"5\">\n\t\t\t\t\t<li id=\"foodWithNegativeTabIndex\" tabindex=\"-1\">Rice</li>\n\t\t\t\t\t<li id=\"foodNoTabIndex\">Beans</li>\n\t\t\t\t\t<li>Blinis</li>\n\t\t\t\t\t<li>Tofu</li>\n\t\t\t\t</ol>\n\t\t\t\t<div id=\"divWithNoTabIndex\">I'm hungry. I should...</div>\n\t\t\t\t<span>...</span><a href=\"#\" id=\"linkWithNoTabIndex\">Eat lots of food</a><span>...</span> |\n\t\t\t\t<span>...</span><a href=\"#\" id=\"linkWithTabIndex\" tabindex=\"2\">Eat a little food</a><span>...</span> |\n\t\t\t\t<span>...</span><a href=\"#\" id=\"linkWithNegativeTabIndex\" tabindex=\"-1\">Eat no food</a><span>...</span>\n\t\t\t\t<span>...</span><a id=\"linkWithNoHrefWithNoTabIndex\">Eat a burger</a><span>...</span>\n\t\t\t\t<span>...</span><a id=\"linkWithNoHrefWithTabIndex\" tabindex=\"1\">Eat some funyuns</a><span>...</span>\n\t\t\t\t<span>...</span><a id=\"linkWithNoHrefWithNegativeTabIndex\" tabindex=\"-1\">Eat some funyuns</a><span>...</span>\n\t\t\t</div>\n\n\t\t\t<div id=\"liveHandlerOrder\">\n\t\t\t\t<span id=\"liveSpan1\"><a href=\"#\" id=\"liveLink1\"></a></span>\n\t\t\t\t<span id=\"liveSpan2\"><a href=\"#\" id=\"liveLink2\"></a></span>\n\t\t\t</div>\n\n\t\t\t<div id=\"siblingTest\">\n\t\t\t\t<em id=\"siblingfirst\">1</em>\n\t\t\t\t<em id=\"siblingnext\">2</em>\n\t\t\t</div>\n\t\t</div>\n\t\t</dl>\n\t\t<div id=\"fx-test-group\" style=\"position:absolute;width:1px;height:1px;overflow:hidden;\">\n\t\t\t<div id=\"fx-queue\" name=\"test\">\n\t\t\t\t<div id=\"fadein\" class='chain test' name='div'>fadeIn<div>fadeIn</div></div>\n\t\t\t\t<div id=\"fadeout\" class='chain test out'>fadeOut<div>fadeOut</div></div>\n\n\t\t\t\t<div id=\"show\" class='chain test'>show<div>show</div></div>\n\t\t\t\t<div id=\"hide\" class='chain test out'>hide<div>hide</div></div>\n\n\t\t\t\t<div id=\"togglein\" class='chain test'>togglein<div>togglein</div></div>\n\t\t\t\t<div id=\"toggleout\" class='chain test out'>toggleout<div>toggleout</div></div>\n\n\t\t\t\t<div id=\"slideup\" class='chain test'>slideUp<div>slideUp</div></div>\n\t\t\t\t<div id=\"slidedown\" class='chain test out'>slideDown<div>slideDown</div></div>\n\n\t\t\t\t<div id=\"slidetogglein\" class='chain test'>slideToggleIn<div>slideToggleIn</div></div>\n\t\t\t\t<div id=\"slidetoggleout\" class='chain test out'>slideToggleOut<div>slideToggleOut</div></div>\n\n\t\t\t\t<div id=\"fadetogglein\" class='chain test'>fadeToggleIn<div>fadeToggleIn</div></div>\n\t\t\t\t<div id=\"fadetoggleout\" class='chain test out'>fadeToggleOut<div>fadeToggleOut</div></div>\n\n\t\t\t\t<div id=\"fadeto\" class='chain test'>fadeTo<div>fadeTo</div></div>\n\t\t\t</div>\n\t\t\t<div id=\"fx-tests\"></div>\n\t\t</div>\n\t</body>\n</html>"
  },
  {
    "path": "test/jquery-1.7.1/unit/core.js",
    "content": "module(\"core\", { teardown: moduleTeardown });\n\ntest(\"Basic requirements\", function() {\n\texpect(7);\n\tok( Array.prototype.push, \"Array.push()\" );\n\tok( Function.prototype.apply, \"Function.apply()\" );\n\tok( document.getElementById, \"getElementById\" );\n\tok( document.getElementsByTagName, \"getElementsByTagName\" );\n\tok( RegExp, \"RegExp\" );\n\tok( jQuery, \"jQuery\" );\n\tok( $, \"$\" );\n});\n\ntest(\"jQuery()\", function() {\n\texpect(29);\n\n\t// Basic constructor's behavior\n\n\tequal( jQuery().length, 0, \"jQuery() === jQuery([])\" );\n\tequal( jQuery(undefined).length, 0, \"jQuery(undefined) === jQuery([])\" );\n\tequal( jQuery(null).length, 0, \"jQuery(null) === jQuery([])\" );\n\tequal( jQuery(\"\").length, 0, \"jQuery('') === jQuery([])\" );\n\tequal( jQuery(\"#\").length, 0, \"jQuery('#') === jQuery([])\" );\n\n\tvar obj = jQuery(\"div\");\n\tequal( jQuery(obj).selector, \"div\", \"jQuery(jQueryObj) == jQueryObj\" );\n\n\t\t// can actually yield more than one, when iframes are included, the window is an array as well\n\tequal( jQuery(window).length, 1, \"Correct number of elements generated for jQuery(window)\" );\n\n\n\tvar main = jQuery(\"#qunit-fixture\");\n\tdeepEqual( jQuery(\"div p\", main).get(), q(\"sndp\", \"en\", \"sap\"), \"Basic selector with jQuery object as context\" );\n\n/*\n\t// disabled since this test was doing nothing. i tried to fix it but i'm not sure\n\t// what the expected behavior should even be. FF returns \"\\n\" for the text node\n\t// make sure this is handled\n\tvar crlfContainer = jQuery('<p>\\r\\n</p>');\n\tvar x = crlfContainer.contents().get(0).nodeValue;\n\tequal( x, what???, \"Check for \\\\r and \\\\n in jQuery()\" );\n*/\n\n\t/* // Disabled until we add this functionality in\n\tvar pass = true;\n\ttry {\n\t\tjQuery(\"<div>Testing</div>\").appendTo(document.getElementById(\"iframe\").contentDocument.body);\n\t} catch(e){\n\t\tpass = false;\n\t}\n\tok( pass, \"jQuery('&lt;tag&gt;') needs optional document parameter to ease cross-frame DOM wrangling, see #968\" );*/\n\n\tvar code = jQuery(\"<code/>\");\n\tequal( code.length, 1, \"Correct number of elements generated for code\" );\n\tequal( code.parent().length, 0, \"Make sure that the generated HTML has no parent.\" );\n\tvar img = jQuery(\"<img/>\");\n\tequal( img.length, 1, \"Correct number of elements generated for img\" );\n\tequal( img.parent().length, 0, \"Make sure that the generated HTML has no parent.\" );\n\tvar div = jQuery(\"<div/><hr/><code/><b/>\");\n\tequal( div.length, 4, \"Correct number of elements generated for div hr code b\" );\n\tequal( div.parent().length, 0, \"Make sure that the generated HTML has no parent.\" );\n\n\tequal( jQuery([1,2,3]).get(1), 2, \"Test passing an array to the factory\" );\n\n\tequal( jQuery(document.body).get(0), jQuery(\"body\").get(0), \"Test passing an html node to the factory\" );\n\n\tvar exec = false;\n\n\tvar elem = jQuery(\"<div/>\", {\n\t\twidth: 10,\n\t\tcss: { paddingLeft:1, paddingRight:1 },\n\t\tclick: function(){ ok(exec, \"Click executed.\"); },\n\t\ttext: \"test\",\n\t\t\"class\": \"test2\",\n\t\tid: \"test3\"\n\t});\n\n\tequal( elem[0].style.width, \"10px\", \"jQuery() quick setter width\");\n\tequal( elem[0].style.paddingLeft, \"1px\", \"jQuery quick setter css\");\n\tequal( elem[0].style.paddingRight, \"1px\", \"jQuery quick setter css\");\n\tequal( elem[0].childNodes.length, 1, \"jQuery quick setter text\");\n\tequal( elem[0].firstChild.nodeValue, \"test\", \"jQuery quick setter text\");\n\tequal( elem[0].className, \"test2\", \"jQuery() quick setter class\");\n\tequal( elem[0].id, \"test3\", \"jQuery() quick setter id\");\n\n\texec = true;\n\telem.click();\n\n\t// manually clean up detached elements\n\telem.remove();\n\n\tfor ( var i = 0; i < 3; ++i ) {\n\t\telem = jQuery(\"<input type='text' value='TEST' />\");\n\t}\n\tequal( elem[0].defaultValue, \"TEST\", \"Ensure cached nodes are cloned properly (Bug #6655)\" );\n\n\t// manually clean up detached elements\n\telem.remove();\n\n\tequal( jQuery(\" <div/> \").length, 1, \"Make sure whitespace is trimmed.\" );\n\tequal( jQuery(\" a<div/>b \").length, 1, \"Make sure whitespace and other characters are trimmed.\" );\n\n\tvar long = \"\";\n\tfor ( var i = 0; i < 128; i++ ) {\n\t\tlong += \"12345678\";\n\t}\n\n\tequal( jQuery(\" <div>\" + long + \"</div> \").length, 1, \"Make sure whitespace is trimmed on long strings.\" );\n\tequal( jQuery(\" a<div>\" + long + \"</div>b \").length, 1, \"Make sure whitespace and other characters are trimmed on long strings.\" );\n});\n\ntest(\"selector state\", function() {\n\texpect(31);\n\n\tvar test;\n\n\ttest = jQuery(undefined);\n\tequal( test.selector, \"\", \"Empty jQuery Selector\" );\n\tequal( test.context, undefined, \"Empty jQuery Context\" );\n\n\ttest = jQuery(document);\n\tequal( test.selector, \"\", \"Document Selector\" );\n\tequal( test.context, document, \"Document Context\" );\n\n\ttest = jQuery(document.body);\n\tequal( test.selector, \"\", \"Body Selector\" );\n\tequal( test.context, document.body, \"Body Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\");\n\tequal( test.selector, \"#qunit-fixture\", \"#qunit-fixture Selector\" );\n\tequal( test.context, document, \"#qunit-fixture Context\" );\n\n\ttest = jQuery(\"#notfoundnono\");\n\tequal( test.selector, \"#notfoundnono\", \"#notfoundnono Selector\" );\n\tequal( test.context, document, \"#notfoundnono Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\", document);\n\tequal( test.selector, \"#qunit-fixture\", \"#qunit-fixture Selector\" );\n\tequal( test.context, document, \"#qunit-fixture Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\", document.body);\n\tequal( test.selector, \"#qunit-fixture\", \"#qunit-fixture Selector\" );\n\tequal( test.context, document.body, \"#qunit-fixture Context\" );\n\n\t// Test cloning\n\ttest = jQuery(test);\n\tequal( test.selector, \"#qunit-fixture\", \"#qunit-fixture Selector\" );\n\tequal( test.context, document.body, \"#qunit-fixture Context\" );\n\n\ttest = jQuery(document.body).find(\"#qunit-fixture\");\n\tequal( test.selector, \"#qunit-fixture\", \"#qunit-fixture find Selector\" );\n\tequal( test.context, document.body, \"#qunit-fixture find Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\").filter(\"div\");\n\tequal( test.selector, \"#qunit-fixture.filter(div)\", \"#qunit-fixture filter Selector\" );\n\tequal( test.context, document, \"#qunit-fixture filter Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\").not(\"div\");\n\tequal( test.selector, \"#qunit-fixture.not(div)\", \"#qunit-fixture not Selector\" );\n\tequal( test.context, document, \"#qunit-fixture not Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\").filter(\"div\").not(\"div\");\n\tequal( test.selector, \"#qunit-fixture.filter(div).not(div)\", \"#qunit-fixture filter, not Selector\" );\n\tequal( test.context, document, \"#qunit-fixture filter, not Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\").filter(\"div\").not(\"div\").end();\n\tequal( test.selector, \"#qunit-fixture.filter(div)\", \"#qunit-fixture filter, not, end Selector\" );\n\tequal( test.context, document, \"#qunit-fixture filter, not, end Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\").parent(\"body\");\n\tequal( test.selector, \"#qunit-fixture.parent(body)\", \"#qunit-fixture parent Selector\" );\n\tequal( test.context, document, \"#qunit-fixture parent Context\" );\n\n\ttest = jQuery(\"#qunit-fixture\").eq(0);\n\tequal( test.selector, \"#qunit-fixture.slice(0,1)\", \"#qunit-fixture eq Selector\" );\n\tequal( test.context, document, \"#qunit-fixture eq Context\" );\n\n\tvar d = \"<div />\";\n\tequal(\n\t\tjQuery(d).appendTo(jQuery(d)).selector,\n\t\tjQuery(d).appendTo(d).selector,\n\t\t\"manipulation methods make same selector for jQuery objects\"\n\t);\n});\n\ntest( \"globalEval\", function() {\n\n\texpect( 3 );\n\n\tjQuery.globalEval( \"var globalEvalTest = true;\" );\n\tok( window.globalEvalTest, \"Test variable declarations are global\" );\n\n\twindow.globalEvalTest = false;\n\n\tjQuery.globalEval( \"globalEvalTest = true;\" );\n\tok( window.globalEvalTest, \"Test variable assignments are global\" );\n\n\twindow.globalEvalTest = false;\n\n\tjQuery.globalEval( \"this.globalEvalTest = true;\" );\n\tok( window.globalEvalTest, \"Test context (this) is the window object\" );\n\n\twindow.globalEvalTest = undefined;\n});\n\n\n\ntest(\"noConflict\", function() {\n\texpect(7);\n\n\tvar $$ = jQuery;\n\n\tequal( jQuery, jQuery.noConflict(), \"noConflict returned the jQuery object\" );\n\tequal( jQuery, $$, \"Make sure jQuery wasn't touched.\" );\n\tequal( $, original$, \"Make sure $ was reverted.\" );\n\n\tjQuery = $ = $$;\n\n\tequal( jQuery.noConflict(true), $$, \"noConflict returned the jQuery object\" );\n\tequal( jQuery, originaljQuery, \"Make sure jQuery was reverted.\" );\n\tequal( $, original$, \"Make sure $ was reverted.\" );\n\tok( $$(\"#qunit-fixture\").html(\"test\"), \"Make sure that jQuery still works.\" );\n\n\tjQuery = $$;\n});\n\ntest(\"trim\", function() {\n\texpect(9);\n\n\tvar nbsp = String.fromCharCode(160);\n\n\tequal( jQuery.trim(\"hello  \"), \"hello\", \"trailing space\" );\n\tequal( jQuery.trim(\"  hello\"), \"hello\", \"leading space\" );\n\tequal( jQuery.trim(\"  hello   \"), \"hello\", \"space on both sides\" );\n\tequal( jQuery.trim(\"  \" + nbsp + \"hello  \" + nbsp + \" \"), \"hello\", \"&nbsp;\" );\n\n\tequal( jQuery.trim(), \"\", \"Nothing in.\" );\n\tequal( jQuery.trim( undefined ), \"\", \"Undefined\" );\n\tequal( jQuery.trim( null ), \"\", \"Null\" );\n\tequal( jQuery.trim( 5 ), \"5\", \"Number\" );\n\tequal( jQuery.trim( false ), \"false\", \"Boolean\" );\n});\n\ntest(\"type\", function() {\n\texpect(23);\n\n\tequal( jQuery.type(null), \"null\", \"null\" );\n\tequal( jQuery.type(undefined), \"undefined\", \"undefined\" );\n\tequal( jQuery.type(true), \"boolean\", \"Boolean\" );\n\tequal( jQuery.type(false), \"boolean\", \"Boolean\" );\n\tequal( jQuery.type(Boolean(true)), \"boolean\", \"Boolean\" );\n\tequal( jQuery.type(0), \"number\", \"Number\" );\n\tequal( jQuery.type(1), \"number\", \"Number\" );\n\tequal( jQuery.type(Number(1)), \"number\", \"Number\" );\n\tequal( jQuery.type(\"\"), \"string\", \"String\" );\n\tequal( jQuery.type(\"a\"), \"string\", \"String\" );\n\tequal( jQuery.type(String(\"a\")), \"string\", \"String\" );\n\tequal( jQuery.type({}), \"object\", \"Object\" );\n\tequal( jQuery.type(/foo/), \"regexp\", \"RegExp\" );\n\tequal( jQuery.type(new RegExp(\"asdf\")), \"regexp\", \"RegExp\" );\n\tequal( jQuery.type([1]), \"array\", \"Array\" );\n\tequal( jQuery.type(new Date()), \"date\", \"Date\" );\n\tequal( jQuery.type(new Function(\"return;\")), \"function\", \"Function\" );\n\tequal( jQuery.type(function(){}), \"function\", \"Function\" );\n\tequal( jQuery.type(window), \"object\", \"Window\" );\n\tequal( jQuery.type(document), \"object\", \"Document\" );\n\tequal( jQuery.type(document.body), \"object\", \"Element\" );\n\tequal( jQuery.type(document.createTextNode(\"foo\")), \"object\", \"TextNode\" );\n\tequal( jQuery.type(document.getElementsByTagName(\"*\")), \"object\", \"NodeList\" );\n});\n\ntest(\"isPlainObject\", function() {\n\texpect(15);\n\n\tstop();\n\n\t// The use case that we want to match\n\tok(jQuery.isPlainObject({}), \"{}\");\n\n\t// Not objects shouldn't be matched\n\tok(!jQuery.isPlainObject(\"\"), \"string\");\n\tok(!jQuery.isPlainObject(0) && !jQuery.isPlainObject(1), \"number\");\n\tok(!jQuery.isPlainObject(true) && !jQuery.isPlainObject(false), \"boolean\");\n\tok(!jQuery.isPlainObject(null), \"null\");\n\tok(!jQuery.isPlainObject(undefined), \"undefined\");\n\n\t// Arrays shouldn't be matched\n\tok(!jQuery.isPlainObject([]), \"array\");\n\n\t// Instantiated objects shouldn't be matched\n\tok(!jQuery.isPlainObject(new Date), \"new Date\");\n\n\tvar fn = function(){};\n\n\t// Functions shouldn't be matched\n\tok(!jQuery.isPlainObject(fn), \"fn\");\n\n\t// Again, instantiated objects shouldn't be matched\n\tok(!jQuery.isPlainObject(new fn), \"new fn (no methods)\");\n\n\t// Makes the function a little more realistic\n\t// (and harder to detect, incidentally)\n\tfn.prototype = {someMethod: function(){}};\n\n\t// Again, instantiated objects shouldn't be matched\n\tok(!jQuery.isPlainObject(new fn), \"new fn\");\n\n\t// DOM Element\n\tok(!jQuery.isPlainObject(document.createElement(\"div\")), \"DOM Element\");\n\n\t// Window\n\tok(!jQuery.isPlainObject(window), \"window\");\n\n\ttry {\n\t\tjQuery.isPlainObject( window.location );\n\t\tok( true, \"Does not throw exceptions on host objects\");\n\t} catch ( e ) {\n\t\tok( false, \"Does not throw exceptions on host objects -- FAIL\");\n\t}\n\n\ttry {\n\t\tvar iframe = document.createElement(\"iframe\");\n\t\tdocument.body.appendChild(iframe);\n\n\t\twindow.iframeDone = function(otherObject){\n\t\t\t// Objects from other windows should be matched\n\t\t\tok(jQuery.isPlainObject(new otherObject), \"new otherObject\");\n\t\t\tdocument.body.removeChild( iframe );\n\t\t\tstart();\n\t\t};\n\n\t\tvar doc = iframe.contentDocument || iframe.contentWindow.document;\n\t\tdoc.open();\n\t\tdoc.write(\"<body onload='window.parent.iframeDone(Object);'>\");\n\t\tdoc.close();\n\t} catch(e) {\n\t\tdocument.body.removeChild( iframe );\n\n\t\tok(true, \"new otherObject - iframes not supported\");\n\t\tstart();\n\t}\n});\n\ntest(\"isFunction\", function() {\n\texpect(19);\n\n\t// Make sure that false values return false\n\tok( !jQuery.isFunction(), \"No Value\" );\n\tok( !jQuery.isFunction( null ), \"null Value\" );\n\tok( !jQuery.isFunction( undefined ), \"undefined Value\" );\n\tok( !jQuery.isFunction( \"\" ), \"Empty String Value\" );\n\tok( !jQuery.isFunction( 0 ), \"0 Value\" );\n\n\t// Check built-ins\n\t// Safari uses \"(Internal Function)\"\n\tok( jQuery.isFunction(String), \"String Function(\"+String+\")\" );\n\tok( jQuery.isFunction(Array), \"Array Function(\"+Array+\")\" );\n\tok( jQuery.isFunction(Object), \"Object Function(\"+Object+\")\" );\n\tok( jQuery.isFunction(Function), \"Function Function(\"+Function+\")\" );\n\n\t// When stringified, this could be misinterpreted\n\tvar mystr = \"function\";\n\tok( !jQuery.isFunction(mystr), \"Function String\" );\n\n\t// When stringified, this could be misinterpreted\n\tvar myarr = [ \"function\" ];\n\tok( !jQuery.isFunction(myarr), \"Function Array\" );\n\n\t// When stringified, this could be misinterpreted\n\tvar myfunction = { \"function\": \"test\" };\n\tok( !jQuery.isFunction(myfunction), \"Function Object\" );\n\n\t// Make sure normal functions still work\n\tvar fn = function(){};\n\tok( jQuery.isFunction(fn), \"Normal Function\" );\n\n\tvar obj = document.createElement(\"object\");\n\n\t// Firefox says this is a function\n\tok( !jQuery.isFunction(obj), \"Object Element\" );\n\n\t// IE says this is an object\n\t// Since 1.3, this isn't supported (#2968)\n\t//ok( jQuery.isFunction(obj.getAttribute), \"getAttribute Function\" );\n\n\tvar nodes = document.body.childNodes;\n\n\t// Safari says this is a function\n\tok( !jQuery.isFunction(nodes), \"childNodes Property\" );\n\n\tvar first = document.body.firstChild;\n\n\t// Normal elements are reported ok everywhere\n\tok( !jQuery.isFunction(first), \"A normal DOM Element\" );\n\n\tvar input = document.createElement(\"input\");\n\tinput.type = \"text\";\n\tdocument.body.appendChild( input );\n\n\t// IE says this is an object\n\t// Since 1.3, this isn't supported (#2968)\n\t//ok( jQuery.isFunction(input.focus), \"A default function property\" );\n\n\tdocument.body.removeChild( input );\n\n\tvar a = document.createElement(\"a\");\n\ta.href = \"some-function\";\n\tdocument.body.appendChild( a );\n\n\t// This serializes with the word 'function' in it\n\tok( !jQuery.isFunction(a), \"Anchor Element\" );\n\n\tdocument.body.removeChild( a );\n\n\t// Recursive function calls have lengths and array-like properties\n\tfunction callme(callback){\n\t\tfunction fn(response){\n\t\t\tcallback(response);\n\t\t}\n\n\t\tok( jQuery.isFunction(fn), \"Recursive Function Call\" );\n\n\t\tfn({ some: \"data\" });\n\t};\n\n\tcallme(function(){\n\t\tcallme(function(){});\n\t});\n});\n\ntest( \"isNumeric\", function() {\n\texpect( 37 );\n\n\tvar t = jQuery.isNumeric,\n\t\tTraditionalists = function(n) {\n\t\t\tthis.value = n;\n\t\t\tthis.toString = function(){\n\t\t\t\treturn String(this.value);\n\t\t\t};\n\t\t},\n\t\tanswer = new Traditionalists( \"42\" ),\n\t\trong = new Traditionalists( \"Devo\" );\n\n\tok( t(\"-10\"), \"Negative integer string\");\n\tok( t(\"0\"), \"Zero string\");\n\tok( t(\"5\"), \"Positive integer string\");\n\tok( t(-16), \"Negative integer number\");\n\tok( t(0), \"Zero integer number\");\n\tok( t(32), \"Positive integer number\");\n\tok( t(\"040\"), \"Octal integer literal string\");\n\tok( t(0144), \"Octal integer literal\");\n\tok( t(\"0xFF\"), \"Hexadecimal integer literal string\");\n\tok( t(0xFFF), \"Hexadecimal integer literal\");\n\tok( t(\"-1.6\"), \"Negative floating point string\");\n\tok( t(\"4.536\"), \"Positive floating point string\");\n\tok( t(-2.6), \"Negative floating point number\");\n\tok( t(3.1415), \"Positive floating point number\");\n\tok( t(8e5), \"Exponential notation\");\n\tok( t(\"123e-2\"), \"Exponential notation string\");\n\tok( t(answer), \"Custom .toString returning number\");\n\tequal( t(\"\"), false, \"Empty string\");\n\tequal( t(\"        \"), false, \"Whitespace characters string\");\n\tequal( t(\"\\t\\t\"), false, \"Tab characters string\");\n\tequal( t(\"abcdefghijklm1234567890\"), false, \"Alphanumeric character string\");\n\tequal( t(\"xabcdefx\"), false, \"Non-numeric character string\");\n\tequal( t(true), false, \"Boolean true literal\");\n\tequal( t(false), false, \"Boolean false literal\");\n\tequal( t(\"bcfed5.2\"), false, \"Number with preceding non-numeric characters\");\n\tequal( t(\"7.2acdgs\"), false, \"Number with trailling non-numeric characters\");\n\tequal( t(undefined), false, \"Undefined value\");\n\tequal( t(null), false, \"Null value\");\n\tequal( t(NaN), false, \"NaN value\");\n\tequal( t(Infinity), false, \"Infinity primitive\");\n\tequal( t(Number.POSITIVE_INFINITY), false, \"Positive Infinity\");\n\tequal( t(Number.NEGATIVE_INFINITY), false, \"Negative Infinity\");\n\tequal( t(rong), false, \"Custom .toString returning non-number\");\n\tequal( t({}), false, \"Empty object\");\n\tequal( t(function(){} ), false, \"Instance of a function\");\n\tequal( t( new Date ), false, \"Instance of a Date\");\n\tequal( t(function(){} ), false, \"Instance of a function\");\n});\n\ntest(\"isXMLDoc - HTML\", function() {\n\texpect(4);\n\n\tok( !jQuery.isXMLDoc( document ), \"HTML document\" );\n\tok( !jQuery.isXMLDoc( document.documentElement ), \"HTML documentElement\" );\n\tok( !jQuery.isXMLDoc( document.body ), \"HTML Body Element\" );\n\n\tvar iframe = document.createElement(\"iframe\");\n\tdocument.body.appendChild( iframe );\n\n\ttry {\n\t\tvar body = jQuery(iframe).contents()[0];\n\n\t\ttry {\n\t\t\tok( !jQuery.isXMLDoc( body ), \"Iframe body element\" );\n\t\t} catch(e) {\n\t\t\tok( false, \"Iframe body element exception\" );\n\t\t}\n\n\t} catch(e) {\n\t\tok( true, \"Iframe body element - iframe not working correctly\" );\n\t}\n\n\tdocument.body.removeChild( iframe );\n});\n\ntest(\"XSS via location.hash\", function() {\n\texpect(1);\n\n\tstop();\n\tjQuery._check9521 = function(x){\n\t\tok( x, \"script called from #id-like selector with inline handler\" );\n\t\tjQuery(\"#check9521\").remove();\n\t\tdelete jQuery._check9521;\n\t\tstart();\n\t};\n\ttry {\n\t\t// This throws an error because it's processed like an id\n\t\tjQuery( '#<img id=\"check9521\" src=\"no-such-.gif\" onerror=\"jQuery._check9521(false)\">' ).appendTo(\"#qunit-fixture\");\n\t} catch (err) {\n\t\tjQuery._check9521(true);\n\t};\n});\n\nif ( !isLocal ) {\ntest(\"isXMLDoc - XML\", function() {\n\texpect(3);\n\tstop();\n\tjQuery.get(\"data/dashboard.xml\", function(xml) {\n\t\tok( jQuery.isXMLDoc( xml ), \"XML document\" );\n\t\tok( jQuery.isXMLDoc( xml.documentElement ), \"XML documentElement\" );\n\t\tok( jQuery.isXMLDoc( jQuery(\"tab\", xml)[0] ), \"XML Tab Element\" );\n\t\tstart();\n\t});\n});\n}\n\ntest(\"isWindow\", function() {\n\texpect( 12 );\n\n\tok( jQuery.isWindow(window), \"window\" );\n\tok( !jQuery.isWindow(), \"empty\" );\n\tok( !jQuery.isWindow(null), \"null\" );\n\tok( !jQuery.isWindow(undefined), \"undefined\" );\n\tok( !jQuery.isWindow(document), \"document\" );\n\tok( !jQuery.isWindow(document.documentElement), \"documentElement\" );\n\tok( !jQuery.isWindow(\"\"), \"string\" );\n\tok( !jQuery.isWindow(1), \"number\" );\n\tok( !jQuery.isWindow(true), \"boolean\" );\n\tok( !jQuery.isWindow({}), \"object\" );\n\t// HMMM\n\t// ok( !jQuery.isWindow({ setInterval: function(){} }), \"fake window\" );\n\tok( !jQuery.isWindow(/window/), \"regexp\" );\n\tok( !jQuery.isWindow(function(){}), \"function\" );\n});\n\ntest(\"jQuery('html')\", function() {\n\texpect(18);\n\n\tQUnit.reset();\n\tjQuery.foo = false;\n\tvar s = jQuery(\"<script>jQuery.foo='test';</script>\")[0];\n\tok( s, \"Creating a script\" );\n\tok( !jQuery.foo, \"Make sure the script wasn't executed prematurely\" );\n\tjQuery(\"body\").append(\"<script>jQuery.foo='test';</script>\");\n\tok( jQuery.foo, \"Executing a scripts contents in the right context\" );\n\n\t// Test multi-line HTML\n\tvar div = jQuery(\"<div>\\r\\nsome text\\n<p>some p</p>\\nmore text\\r\\n</div>\")[0];\n\tequal( div.nodeName.toUpperCase(), \"DIV\", \"Make sure we're getting a div.\" );\n\tequal( div.firstChild.nodeType, 3, \"Text node.\" );\n\tequal( div.lastChild.nodeType, 3, \"Text node.\" );\n\tequal( div.childNodes[1].nodeType, 1, \"Paragraph.\" );\n\tequal( div.childNodes[1].firstChild.nodeType, 3, \"Paragraph text.\" );\n\n\tQUnit.reset();\n\tok( jQuery(\"<link rel='stylesheet'/>\")[0], \"Creating a link\" );\n\n\tok( !jQuery(\"<script/>\")[0].parentNode, \"Create a script\" );\n\n\tok( jQuery(\"<input/>\").attr(\"type\", \"hidden\"), \"Create an input and set the type.\" );\n\n\tvar j = jQuery(\"<span>hi</span> there <!-- mon ami -->\");\n\tok( j.length >= 2, \"Check node,textnode,comment creation (some browsers delete comments)\" );\n\n\tok( !jQuery(\"<option>test</option>\")[0].selected, \"Make sure that options are auto-selected #2050\" );\n\n\tok( jQuery(\"<div></div>\")[0], \"Create a div with closing tag.\" );\n\tok( jQuery(\"<table></table>\")[0], \"Create a table with closing tag.\" );\n\n\t// Test very large html string #7990\n\tvar i;\n\tvar li = \"<li>very large html string</li>\";\n\tvar html = [\"<ul>\"];\n\tfor ( i = 0; i < 50000; i += 1 ) {\n\t\thtml.push(li);\n\t}\n\thtml.push(\"</ul>\");\n\thtml = jQuery(html.join(\"\"))[0];\n\tequal( html.nodeName.toUpperCase(), \"UL\");\n\tequal( html.firstChild.nodeName.toUpperCase(), \"LI\");\n\tequal( html.childNodes.length, 50000 );\n});\n\ntest(\"jQuery('html', context)\", function() {\n\texpect(1);\n\n\tvar $div = jQuery(\"<div/>\")[0];\n\tvar $span = jQuery(\"<span/>\", $div);\n\tequal($span.length, 1, \"Verify a span created with a div context works, #1763\");\n});\n\nif ( !isLocal ) {\ntest(\"jQuery(selector, xml).text(str) - Loaded via XML document\", function() {\n\texpect(2);\n\tstop();\n\tjQuery.get(\"data/dashboard.xml\", function(xml) {\n\t\t// tests for #1419 where IE was a problem\n\t\tvar tab = jQuery(\"tab\", xml).eq(0);\n\t\tequal( tab.text(), \"blabla\", \"Verify initial text correct\" );\n\t\ttab.text(\"newtext\");\n\t\tequal( tab.text(), \"newtext\", \"Verify new text correct\" );\n\t\tstart();\n\t});\n});\n}\n\ntest(\"end()\", function() {\n\texpect(3);\n\tequal( \"Yahoo\", jQuery(\"#yahoo\").parent().end().text(), \"Check for end\" );\n\tok( jQuery(\"#yahoo\").end(), \"Check for end with nothing to end\" );\n\n\tvar x = jQuery(\"#yahoo\");\n\tx.parent();\n\tequal( \"Yahoo\", jQuery(\"#yahoo\").text(), \"Check for non-destructive behaviour\" );\n});\n\ntest(\"length\", function() {\n\texpect(1);\n\tequal( jQuery(\"#qunit-fixture p\").length, 6, \"Get Number of Elements Found\" );\n});\n\ntest(\"size()\", function() {\n\texpect(1);\n\tequal( jQuery(\"#qunit-fixture p\").size(), 6, \"Get Number of Elements Found\" );\n});\n\ntest(\"get()\", function() {\n\texpect(1);\n\tdeepEqual( jQuery(\"#qunit-fixture p\").get(), q(\"firstp\",\"ap\",\"sndp\",\"en\",\"sap\",\"first\"), \"Get All Elements\" );\n});\n\ntest(\"toArray()\", function() {\n\texpect(1);\n\tdeepEqual( jQuery(\"#qunit-fixture p\").toArray(),\n\t\tq(\"firstp\",\"ap\",\"sndp\",\"en\",\"sap\",\"first\"),\n\t\t\"Convert jQuery object to an Array\" )\n})\n\ntest(\"inArray()\", function() {\n\texpect(19);\n\n\tvar selections = {\n\t\tp:   q(\"firstp\", \"sap\", \"ap\", \"first\"),\n\t\tem:  q(\"siblingnext\", \"siblingfirst\"),\n\t\tdiv: q(\"qunit-testrunner-toolbar\", \"nothiddendiv\", \"nothiddendivchild\", \"foo\"),\n\t\ta:   q(\"mark\", \"groups\", \"google\", \"simon1\"),\n\t\tempty: []\n\t},\n\ttests = {\n\t\tp:    { elem: jQuery(\"#ap\")[0],           index: 2 },\n\t\tem:   { elem: jQuery(\"#siblingfirst\")[0], index: 1 },\n\t\tdiv:  { elem: jQuery(\"#nothiddendiv\")[0], index: 1 },\n\t\ta:    { elem: jQuery(\"#simon1\")[0],       index: 3 }\n\t},\n\tfalseTests = {\n\t\tp:  jQuery(\"#liveSpan1\")[0],\n\t\tem: jQuery(\"#nothiddendiv\")[0],\n\t\tempty: \"\"\n\t};\n\n\tjQuery.each( tests, function( key, obj ) {\n\t\tequal( jQuery.inArray( obj.elem, selections[ key ] ), obj.index, \"elem is in the array of selections of its tag\" );\n\t\t// Third argument (fromIndex)\n\t\tequal( !!~jQuery.inArray( obj.elem, selections[ key ], 5 ), false, \"elem is NOT in the array of selections given a starting index greater than its position\" );\n\t\tequal( !!~jQuery.inArray( obj.elem, selections[ key ], 1 ), true, \"elem is in the array of selections given a starting index less than or equal to its position\" );\n\t\tequal( !!~jQuery.inArray( obj.elem, selections[ key ], -3 ), true, \"elem is in the array of selections given a negative index\" );\n\t});\n\n\tjQuery.each( falseTests, function( key, elem ) {\n\t\tequal( !!~jQuery.inArray( elem, selections[ key ] ), false, \"elem is NOT in the array of selections\" );\n\t});\n\n});\n\ntest(\"get(Number)\", function() {\n\texpect(2);\n\tequal( jQuery(\"#qunit-fixture p\").get(0), document.getElementById(\"firstp\"), \"Get A Single Element\" );\n\tstrictEqual( jQuery(\"#firstp\").get(1), undefined, \"Try get with index larger elements count\" );\n});\n\ntest(\"get(-Number)\",function() {\n\texpect(2);\n\tequal( jQuery(\"p\").get(-1), document.getElementById(\"first\"), \"Get a single element with negative index\" );\n\tstrictEqual( jQuery(\"#firstp\").get(-2), undefined, \"Try get with index negative index larger then elements count\" );\n})\n\ntest(\"each(Function)\", function() {\n\texpect(1);\n\tvar div = jQuery(\"div\");\n\tdiv.each(function(){this.foo = \"zoo\";});\n\tvar pass = true;\n\tfor ( var i = 0; i < div.size(); i++ ) {\n\t\tif ( div.get(i).foo != \"zoo\" ) pass = false;\n\t}\n\tok( pass, \"Execute a function, Relative\" );\n});\n\ntest(\"slice()\", function() {\n\texpect(7);\n\n\tvar $links = jQuery(\"#ap a\");\n\n\tdeepEqual( $links.slice(1,2).get(), q(\"groups\"), \"slice(1,2)\" );\n\tdeepEqual( $links.slice(1).get(), q(\"groups\", \"anchor1\", \"mark\"), \"slice(1)\" );\n\tdeepEqual( $links.slice(0,3).get(), q(\"google\", \"groups\", \"anchor1\"), \"slice(0,3)\" );\n\tdeepEqual( $links.slice(-1).get(), q(\"mark\"), \"slice(-1)\" );\n\n\tdeepEqual( $links.eq(1).get(), q(\"groups\"), \"eq(1)\" );\n\tdeepEqual( $links.eq(\"2\").get(), q(\"anchor1\"), \"eq('2')\" );\n\tdeepEqual( $links.eq(-1).get(), q(\"mark\"), \"eq(-1)\" );\n});\n\ntest(\"first()/last()\", function() {\n\texpect(4);\n\n\tvar $links = jQuery(\"#ap a\"), $none = jQuery(\"asdf\");\n\n\tdeepEqual( $links.first().get(), q(\"google\"), \"first()\" );\n\tdeepEqual( $links.last().get(), q(\"mark\"), \"last()\" );\n\n\tdeepEqual( $none.first().get(), [], \"first() none\" );\n\tdeepEqual( $none.last().get(), [], \"last() none\" );\n});\n\ntest(\"map()\", function() {\n\texpect(8);\n\n\tdeepEqual(\n\t\tjQuery(\"#ap\").map(function(){\n\t\t\treturn jQuery(this).find(\"a\").get();\n\t\t}).get(),\n\t\tq(\"google\", \"groups\", \"anchor1\", \"mark\"),\n\t\t\"Array Map\"\n\t);\n\n\tdeepEqual(\n\t\tjQuery(\"#ap > a\").map(function(){\n\t\t\treturn this.parentNode;\n\t\t}).get(),\n\t\tq(\"ap\",\"ap\",\"ap\"),\n\t\t\"Single Map\"\n\t);\n\n\t//for #2616\n\tvar keys = jQuery.map( {a:1,b:2}, function( v, k ){\n\t\treturn k;\n\t});\n\tequal( keys.join(\"\"), \"ab\", \"Map the keys from a hash to an array\" );\n\n\tvar values = jQuery.map( {a:1,b:2}, function( v, k ){\n\t\treturn v;\n\t});\n\tequal( values.join(\"\"), \"12\", \"Map the values from a hash to an array\" );\n\n\t// object with length prop\n\tvar values = jQuery.map( {a:1,b:2, length:3}, function( v, k ){\n\t\treturn v;\n\t});\n\tequal( values.join(\"\"), \"123\", \"Map the values from a hash with a length property to an array\" );\n\n\tvar scripts = document.getElementsByTagName(\"script\");\n\tvar mapped = jQuery.map( scripts, function( v, k ){\n\t\treturn v;\n\t});\n\tequal( mapped.length, scripts.length, \"Map an array(-like) to a hash\" );\n\n\tvar nonsense = document.getElementsByTagName(\"asdf\");\n\tvar mapped = jQuery.map( nonsense, function( v, k ){\n\t\treturn v;\n\t});\n\tequal( mapped.length, nonsense.length, \"Map an empty array(-like) to a hash\" );\n\n\tvar flat = jQuery.map( Array(4), function( v, k ){\n\t\treturn k % 2 ? k : [k,k,k];//try mixing array and regular returns\n\t});\n\tequal( flat.join(\"\"), \"00012223\", \"try the new flatten technique(#2616)\" );\n});\n\ntest(\"jQuery.merge()\", function() {\n\texpect(8);\n\n\tvar parse = jQuery.merge;\n\n\tdeepEqual( parse([],[]), [], \"Empty arrays\" );\n\n\tdeepEqual( parse([1],[2]), [1,2], \"Basic\" );\n\tdeepEqual( parse([1,2],[3,4]), [1,2,3,4], \"Basic\" );\n\n\tdeepEqual( parse([1,2],[]), [1,2], \"Second empty\" );\n\tdeepEqual( parse([],[1,2]), [1,2], \"First empty\" );\n\n\t// Fixed at [5998], #3641\n\tdeepEqual( parse([-2,-1], [0,1,2]), [-2,-1,0,1,2], \"Second array including a zero (falsy)\");\n\n\t// After fixing #5527\n\tdeepEqual( parse([], [null, undefined]), [null, undefined], \"Second array including null and undefined values\");\n\tdeepEqual( parse({length:0}, [1,2]), {length:2, 0:1, 1:2}, \"First array like\");\n});\n\ntest(\"jQuery.extend(Object, Object)\", function() {\n\texpect(28);\n\n\tvar settings = { xnumber1: 5, xnumber2: 7, xstring1: \"peter\", xstring2: \"pan\" },\n\t\toptions = { xnumber2: 1, xstring2: \"x\", xxx: \"newstring\" },\n\t\toptionsCopy = { xnumber2: 1, xstring2: \"x\", xxx: \"newstring\" },\n\t\tmerged = { xnumber1: 5, xnumber2: 1, xstring1: \"peter\", xstring2: \"x\", xxx: \"newstring\" },\n\t\tdeep1 = { foo: { bar: true } },\n\t\tdeep1copy = { foo: { bar: true } },\n\t\tdeep2 = { foo: { baz: true }, foo2: document },\n\t\tdeep2copy = { foo: { baz: true }, foo2: document },\n\t\tdeepmerged = { foo: { bar: true, baz: true }, foo2: document },\n\t\tarr = [1, 2, 3],\n\t\tnestedarray = { arr: arr };\n\n\tjQuery.extend(settings, options);\n\tdeepEqual( settings, merged, \"Check if extended: settings must be extended\" );\n\tdeepEqual( options, optionsCopy, \"Check if not modified: options must not be modified\" );\n\n\tjQuery.extend(settings, null, options);\n\tdeepEqual( settings, merged, \"Check if extended: settings must be extended\" );\n\tdeepEqual( options, optionsCopy, \"Check if not modified: options must not be modified\" );\n\n\tjQuery.extend(true, deep1, deep2);\n\tdeepEqual( deep1.foo, deepmerged.foo, \"Check if foo: settings must be extended\" );\n\tdeepEqual( deep2.foo, deep2copy.foo, \"Check if not deep2: options must not be modified\" );\n\tequal( deep1.foo2, document, \"Make sure that a deep clone was not attempted on the document\" );\n\n\tok( jQuery.extend(true, {}, nestedarray).arr !== arr, \"Deep extend of object must clone child array\" );\n\n\t// #5991\n\tok( jQuery.isArray( jQuery.extend(true, { arr: {} }, nestedarray).arr ), \"Cloned array heve to be an Array\" );\n\tok( jQuery.isPlainObject( jQuery.extend(true, { arr: arr }, { arr: {} }).arr ), \"Cloned object heve to be an plain object\" );\n\n\tvar empty = {};\n\tvar optionsWithLength = { foo: { length: -1 } };\n\tjQuery.extend(true, empty, optionsWithLength);\n\tdeepEqual( empty.foo, optionsWithLength.foo, \"The length property must copy correctly\" );\n\n\tempty = {};\n\tvar optionsWithDate = { foo: { date: new Date } };\n\tjQuery.extend(true, empty, optionsWithDate);\n\tdeepEqual( empty.foo, optionsWithDate.foo, \"Dates copy correctly\" );\n\n\tvar myKlass = function() {};\n\tvar customObject = new myKlass();\n\tvar optionsWithCustomObject = { foo: { date: customObject } };\n\tempty = {};\n\tjQuery.extend(true, empty, optionsWithCustomObject);\n\tok( empty.foo && empty.foo.date === customObject, \"Custom objects copy correctly (no methods)\" );\n\n\t// Makes the class a little more realistic\n\tmyKlass.prototype = { someMethod: function(){} };\n\tempty = {};\n\tjQuery.extend(true, empty, optionsWithCustomObject);\n\tok( empty.foo && empty.foo.date === customObject, \"Custom objects copy correctly\" );\n\n\tvar ret = jQuery.extend(true, { foo: 4 }, { foo: new Number(5) } );\n\tok( ret.foo == 5, \"Wrapped numbers copy correctly\" );\n\n\tvar nullUndef;\n\tnullUndef = jQuery.extend({}, options, { xnumber2: null });\n\tok( nullUndef.xnumber2 === null, \"Check to make sure null values are copied\");\n\n\tnullUndef = jQuery.extend({}, options, { xnumber2: undefined });\n\tok( nullUndef.xnumber2 === options.xnumber2, \"Check to make sure undefined values are not copied\");\n\n\tnullUndef = jQuery.extend({}, options, { xnumber0: null });\n\tok( nullUndef.xnumber0 === null, \"Check to make sure null values are inserted\");\n\n\tvar target = {};\n\tvar recursive = { foo:target, bar:5 };\n\tjQuery.extend(true, target, recursive);\n\tdeepEqual( target, { bar:5 }, \"Check to make sure a recursive obj doesn't go never-ending loop by not copying it over\" );\n\n\tvar ret = jQuery.extend(true, { foo: [] }, { foo: [0] } ); // 1907\n\tequal( ret.foo.length, 1, \"Check to make sure a value with coersion 'false' copies over when necessary to fix #1907\" );\n\n\tvar ret = jQuery.extend(true, { foo: \"1,2,3\" }, { foo: [1, 2, 3] } );\n\tok( typeof ret.foo != \"string\", \"Check to make sure values equal with coersion (but not actually equal) overwrite correctly\" );\n\n\tvar ret = jQuery.extend(true, { foo:\"bar\" }, { foo:null } );\n\tok( typeof ret.foo !== \"undefined\", \"Make sure a null value doesn't crash with deep extend, for #1908\" );\n\n\tvar obj = { foo:null };\n\tjQuery.extend(true, obj, { foo:\"notnull\" } );\n\tequal( obj.foo, \"notnull\", \"Make sure a null value can be overwritten\" );\n\n\tfunction func() {}\n\tjQuery.extend(func, { key: \"value\" } );\n\tequal( func.key, \"value\", \"Verify a function can be extended\" );\n\n\tvar defaults = { xnumber1: 5, xnumber2: 7, xstring1: \"peter\", xstring2: \"pan\" },\n\t\tdefaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: \"peter\", xstring2: \"pan\" },\n\t\toptions1 = { xnumber2: 1, xstring2: \"x\" },\n\t\toptions1Copy = { xnumber2: 1, xstring2: \"x\" },\n\t\toptions2 = { xstring2: \"xx\", xxx: \"newstringx\" },\n\t\toptions2Copy = { xstring2: \"xx\", xxx: \"newstringx\" },\n\t\tmerged2 = { xnumber1: 5, xnumber2: 1, xstring1: \"peter\", xstring2: \"xx\", xxx: \"newstringx\" };\n\n\tvar settings = jQuery.extend({}, defaults, options1, options2);\n\tdeepEqual( settings, merged2, \"Check if extended: settings must be extended\" );\n\tdeepEqual( defaults, defaultsCopy, \"Check if not modified: options1 must not be modified\" );\n\tdeepEqual( options1, options1Copy, \"Check if not modified: options1 must not be modified\" );\n\tdeepEqual( options2, options2Copy, \"Check if not modified: options2 must not be modified\" );\n});\n\ntest(\"jQuery.each(Object,Function)\", function() {\n\texpect(14);\n\tjQuery.each( [0,1,2], function(i, n){\n\t\tequal( i, n, \"Check array iteration\" );\n\t});\n\n\tjQuery.each( [5,6,7], function(i, n){\n\t\tequal( i, n - 5, \"Check array iteration\" );\n\t});\n\n\tjQuery.each( { name: \"name\", lang: \"lang\" }, function(i, n){\n\t\tequal( i, n, \"Check object iteration\" );\n\t});\n\n\tvar total = 0;\n\tjQuery.each([1,2,3], function(i,v){ total += v; });\n\tequal( total, 6, \"Looping over an array\" );\n\ttotal = 0;\n\tjQuery.each([1,2,3], function(i,v){ total += v; if ( i == 1 ) return false; });\n\tequal( total, 3, \"Looping over an array, with break\" );\n\ttotal = 0;\n\tjQuery.each({\"a\":1,\"b\":2,\"c\":3}, function(i,v){ total += v; });\n\tequal( total, 6, \"Looping over an object\" );\n\ttotal = 0;\n\tjQuery.each({\"a\":3,\"b\":3,\"c\":3}, function(i,v){ total += v; return false; });\n\tequal( total, 3, \"Looping over an object, with break\" );\n\n\tvar f = function(){};\n\tf.foo = \"bar\";\n\tjQuery.each(f, function(i){\n\t\tf[i] = \"baz\";\n\t});\n\tequal( \"baz\", f.foo, \"Loop over a function\" );\n\n\tvar stylesheet_count = 0;\n\tjQuery.each(document.styleSheets, function(i){\n\t\tstylesheet_count++;\n\t});\n\t//html5shiv may add 1-2 stylesheets\n\tok(stylesheet_count > 1 && stylesheet_count < 5, \"should not throw an error in IE while looping over document.styleSheets and return proper amount\");\n\n});\n\ntest(\"jQuery.makeArray\", function(){\n\texpect(17);\n\n\tequal( jQuery.makeArray(jQuery(\"html>*\"))[0].nodeName.toUpperCase(), \"HEAD\", \"Pass makeArray a jQuery object\" );\n\n\tequal( jQuery.makeArray(document.getElementsByName(\"PWD\")).slice(0,1)[0].name, \"PWD\", \"Pass makeArray a nodelist\" );\n\n\tequal( (function(){ return jQuery.makeArray(arguments); })(1,2).join(\"\"), \"12\", \"Pass makeArray an arguments array\" );\n\n\tequal( jQuery.makeArray([1,2,3]).join(\"\"), \"123\", \"Pass makeArray a real array\" );\n\n\tequal( jQuery.makeArray().length, 0, \"Pass nothing to makeArray and expect an empty array\" );\n\n\tequal( jQuery.makeArray( 0 )[0], 0 , \"Pass makeArray a number\" );\n\n\tequal( jQuery.makeArray( \"foo\" )[0], \"foo\", \"Pass makeArray a string\" );\n\n\tequal( jQuery.makeArray( true )[0].constructor, Boolean, \"Pass makeArray a boolean\" );\n\n\tequal( jQuery.makeArray( document.createElement(\"div\") )[0].nodeName.toUpperCase(), \"DIV\", \"Pass makeArray a single node\" );\n\n\tequal( jQuery.makeArray( {length:2, 0:\"a\", 1:\"b\"} ).join(\"\"), \"ab\", \"Pass makeArray an array like map (with length)\" );\n\n\tok( !!jQuery.makeArray( document.documentElement.childNodes ).slice(0,1)[0].nodeName, \"Pass makeArray a childNodes array\" );\n\n\t// function, is tricky as it has length\n\tequal( jQuery.makeArray( function(){ return 1;} )[0](), 1, \"Pass makeArray a function\" );\n\n\t//window, also has length\n\tequal( jQuery.makeArray(window)[0], window, \"Pass makeArray the window\" );\n\n\tequal( jQuery.makeArray(/a/)[0].constructor, RegExp, \"Pass makeArray a regex\" );\n\n\tok( jQuery.makeArray(document.getElementById(\"form\")).length >= 13, \"Pass makeArray a form (treat as elements)\" );\n\n\t// For #5610\n\tdeepEqual( jQuery.makeArray({length: \"0\"}), [], \"Make sure object is coerced properly.\");\n\tdeepEqual( jQuery.makeArray({length: \"5\"}), [], \"Make sure object is coerced properly.\");\n});\n\ntest(\"jQuery.inArray\", function(){\n\texpect(3);\n\n\tequal( jQuery.inArray( 0, false ), -1 , \"Search in 'false' as array returns -1 and doesn't throw exception\" );\n\n\tequal( jQuery.inArray( 0, null ), -1 , \"Search in 'null' as array returns -1 and doesn't throw exception\" );\n\n\tequal( jQuery.inArray( 0, undefined ), -1 , \"Search in 'undefined' as array returns -1 and doesn't throw exception\" );\n});\n\ntest(\"jQuery.isEmptyObject\", function(){\n\texpect(2);\n\n\tequal(true, jQuery.isEmptyObject({}), \"isEmptyObject on empty object literal\" );\n\tequal(false, jQuery.isEmptyObject({a:1}), \"isEmptyObject on non-empty object literal\" );\n\n\t// What about this ?\n\t// equal(true, jQuery.isEmptyObject(null), \"isEmptyObject on null\" );\n});\n\ntest(\"jQuery.proxy\", function(){\n\texpect(7);\n\n\tvar test = function(){ equal( this, thisObject, \"Make sure that scope is set properly.\" ); };\n\tvar thisObject = { foo: \"bar\", method: test };\n\n\t// Make sure normal works\n\ttest.call( thisObject );\n\n\t// Basic scoping\n\tjQuery.proxy( test, thisObject )();\n\n\t// Another take on it\n\tjQuery.proxy( thisObject, \"method\" )();\n\n\t// Make sure it doesn't freak out\n\tequal( jQuery.proxy( null, thisObject ), undefined, \"Make sure no function was returned.\" );\n\n        // Partial application\n        var test2 = function( a ){ equal( a, \"pre-applied\", \"Ensure arguments can be pre-applied.\" ); };\n        jQuery.proxy( test2, null, \"pre-applied\" )();\n\n        // Partial application w/ normal arguments\n        var test3 = function( a, b ){ equal( b, \"normal\", \"Ensure arguments can be pre-applied and passed as usual.\" ); };\n        jQuery.proxy( test3, null, \"pre-applied\" )( \"normal\" );\n\n\t// Test old syntax\n\tvar test4 = { meth: function( a ){ equal( a, \"boom\", \"Ensure old syntax works.\" ); } };\n\tjQuery.proxy( test4, \"meth\" )( \"boom\" );\n});\n\ntest(\"jQuery.parseJSON\", function(){\n\texpect(8);\n\n\tequal( jQuery.parseJSON(), null, \"Nothing in, null out.\" );\n\tequal( jQuery.parseJSON( null ), null, \"Nothing in, null out.\" );\n\tequal( jQuery.parseJSON( \"\" ), null, \"Nothing in, null out.\" );\n\n\tdeepEqual( jQuery.parseJSON(\"{}\"), {}, \"Plain object parsing.\" );\n\tdeepEqual( jQuery.parseJSON(\"{\\\"test\\\":1}\"), {\"test\":1}, \"Plain object parsing.\" );\n\n\tdeepEqual( jQuery.parseJSON(\"\\n{\\\"test\\\":1}\"), {\"test\":1}, \"Make sure leading whitespaces are handled.\" );\n\n\ttry {\n\t\tjQuery.parseJSON(\"{a:1}\");\n\t\tok( false, \"Test malformed JSON string.\" );\n\t} catch( e ) {\n\t\tok( true, \"Test malformed JSON string.\" );\n\t}\n\n\ttry {\n\t\tjQuery.parseJSON(\"{'a':1}\");\n\t\tok( false, \"Test malformed JSON string.\" );\n\t} catch( e ) {\n\t\tok( true, \"Test malformed JSON string.\" );\n\t}\n});\n\ntest(\"jQuery.parseXML\", 4, function(){\n\tvar xml, tmp;\n\ttry {\n\t\txml = jQuery.parseXML( \"<p>A <b>well-formed</b> xml string</p>\" );\n\t\ttmp = xml.getElementsByTagName( \"p\" )[ 0 ];\n\t\tok( !!tmp, \"<p> present in document\" );\n\t\ttmp = tmp.getElementsByTagName( \"b\" )[ 0 ];\n\t\tok( !!tmp, \"<b> present in document\" );\n\t\tstrictEqual( tmp.childNodes[ 0 ].nodeValue, \"well-formed\", \"<b> text is as expected\" );\n\t} catch (e) {\n\t\tstrictEqual( e, undefined, \"unexpected error\" );\n\t}\n\ttry {\n\t\txml = jQuery.parseXML( \"<p>Not a <<b>well-formed</b> xml string</p>\" );\n\t\tok( false, \"invalid xml not detected\" );\n\t} catch( e ) {\n\t\tstrictEqual( e.message, \"Invalid XML: <p>Not a <<b>well-formed</b> xml string</p>\", \"invalid xml detected\" );\n\t}\n});\n\ntest(\"jQuery.sub() - Static Methods\", function(){\n    expect(18);\n    var Subclass = jQuery.sub();\n    Subclass.extend({\n        topLevelMethod: function() {return this.debug;},\n        debug: false,\n        config: {\n            locale: \"en_US\"\n        },\n        setup: function(config) {\n            this.extend(true, this.config, config);\n        }\n    });\n    Subclass.fn.extend({subClassMethod: function() { return this;}});\n\n    //Test Simple Subclass\n    ok(Subclass.topLevelMethod() === false, \"Subclass.topLevelMethod thought debug was true\");\n    ok(Subclass.config.locale == \"en_US\", Subclass.config.locale + \" is wrong!\");\n    deepEqual(Subclass.config.test, undefined, \"Subclass.config.test is set incorrectly\");\n    equal(jQuery.ajax, Subclass.ajax, \"The subclass failed to get all top level methods\");\n\n    //Create a SubSubclass\n    var SubSubclass = Subclass.sub();\n\n    //Make Sure the SubSubclass inherited properly\n    ok(SubSubclass.topLevelMethod() === false, \"SubSubclass.topLevelMethod thought debug was true\");\n    ok(SubSubclass.config.locale == \"en_US\", SubSubclass.config.locale + \" is wrong!\");\n    deepEqual(SubSubclass.config.test, undefined, \"SubSubclass.config.test is set incorrectly\");\n    equal(jQuery.ajax, SubSubclass.ajax, \"The subsubclass failed to get all top level methods\");\n\n    //Modify The Subclass and test the Modifications\n    SubSubclass.fn.extend({subSubClassMethod: function() { return this;}});\n    SubSubclass.setup({locale: \"es_MX\", test: \"worked\"});\n    SubSubclass.debug = true;\n    SubSubclass.ajax = function() {return false;};\n    ok(SubSubclass.topLevelMethod(), \"SubSubclass.topLevelMethod thought debug was false\");\n    deepEqual(SubSubclass(document).subClassMethod, Subclass.fn.subClassMethod, \"Methods Differ!\");\n    ok(SubSubclass.config.locale == \"es_MX\", SubSubclass.config.locale + \" is wrong!\");\n    ok(SubSubclass.config.test == \"worked\", \"SubSubclass.config.test is set incorrectly\");\n    notEqual(jQuery.ajax, SubSubclass.ajax, \"The subsubclass failed to get all top level methods\");\n\n    //This shows that the modifications to the SubSubClass did not bubble back up to it's superclass\n    ok(Subclass.topLevelMethod() === false, \"Subclass.topLevelMethod thought debug was true\");\n    ok(Subclass.config.locale == \"en_US\", Subclass.config.locale + \" is wrong!\");\n    deepEqual(Subclass.config.test, undefined, \"Subclass.config.test is set incorrectly\");\n    deepEqual(Subclass(document).subSubClassMethod, undefined, \"subSubClassMethod set incorrectly\");\n    equal(jQuery.ajax, Subclass.ajax, \"The subclass failed to get all top level methods\");\n});\n\ntest(\"jQuery.sub() - .fn Methods\", function(){\n\texpect(378);\n\n\tvar Subclass = jQuery.sub(),\n\t\t\tSubclassSubclass = Subclass.sub(),\n\t\t\tjQueryDocument = jQuery(document),\n\t\t\tselectors, contexts, methods, method, arg, description;\n\n\tjQueryDocument.toString = function(){ return \"jQueryDocument\"; };\n\n\tSubclass.fn.subclassMethod = function(){};\n\tSubclassSubclass.fn.subclassSubclassMethod = function(){};\n\n\tselectors = [\n\t\t\"body\",\n\t\t\"html, body\",\n\t\t\"<div></div>\"\n\t];\n\n\tmethods = [ // all methods that return a new jQuery instance\n\t\t[\"eq\", 1],\n\t\t[\"add\", document],\n\t\t[\"end\"],\n\t\t[\"has\"],\n\t\t[\"closest\", \"div\"],\n\t\t[\"filter\", document],\n\t\t[\"find\", \"div\"]\n\t];\n\n\tcontexts = [undefined, document, jQueryDocument];\n\n\tjQuery.each(selectors, function(i, selector){\n\n\t\tjQuery.each(methods, function(){\n\t\t\tmethod = this[0];\n\t\t\targ = this[1];\n\n\t\t\tjQuery.each(contexts, function(i, context){\n\n\t\t\t\tdescription = \"(\\\"\"+selector+\"\\\", \"+context+\").\"+method+\"(\"+(arg||\"\")+\")\";\n\n\t\t\t\tdeepEqual(\n\t\t\t\t\tjQuery(selector, context)[method](arg).subclassMethod, undefined,\n\t\t\t\t\t\"jQuery\"+description+\" doesn't have Subclass methods\"\n\t\t\t\t);\n\t\t\t\tdeepEqual(\n\t\t\t\t\tjQuery(selector, context)[method](arg).subclassSubclassMethod, undefined,\n\t\t\t\t\t\"jQuery\"+description+\" doesn't have SubclassSubclass methods\"\n\t\t\t\t);\n\t\t\t\tdeepEqual(\n\t\t\t\t\tSubclass(selector, context)[method](arg).subclassMethod, Subclass.fn.subclassMethod,\n\t\t\t\t\t\"Subclass\"+description+\" has Subclass methods\"\n\t\t\t\t);\n\t\t\t\tdeepEqual(\n\t\t\t\t\tSubclass(selector, context)[method](arg).subclassSubclassMethod, undefined,\n\t\t\t\t\t\"Subclass\"+description+\" doesn't have SubclassSubclass methods\"\n\t\t\t\t);\n\t\t\t\tdeepEqual(\n\t\t\t\t\tSubclassSubclass(selector, context)[method](arg).subclassMethod, Subclass.fn.subclassMethod,\n\t\t\t\t\t\"SubclassSubclass\"+description+\" has Subclass methods\"\n\t\t\t\t);\n\t\t\t\tdeepEqual(\n\t\t\t\t\tSubclassSubclass(selector, context)[method](arg).subclassSubclassMethod, SubclassSubclass.fn.subclassSubclassMethod,\n\t\t\t\t\t\"SubclassSubclass\"+description+\" has SubclassSubclass methods\"\n\t\t\t\t);\n\n\t\t\t});\n\t\t});\n\t});\n\n});\n\ntest(\"jQuery.camelCase()\", function() {\n\n\tvar tests = {\n\t\t\"foo-bar\": \"fooBar\",\n\t\t\"foo-bar-baz\": \"fooBarBaz\",\n\t\t\"girl-u-want\": \"girlUWant\",\n\t\t\"the-4th-dimension\": \"the4thDimension\",\n\t\t\"-o-tannenbaum\": \"OTannenbaum\",\n\t\t\"-moz-illa\": \"MozIlla\",\n\t\t\"-ms-take\": \"msTake\"\n\t};\n\n\texpect(7);\n\n\tjQuery.each( tests, function( key, val ) {\n\t\tequal( jQuery.camelCase( key ), val, \"Converts: \" + key + \" => \" + val );\n\t});\n});\n"
  },
  {
    "path": "test/jquery-1.7.1/unit/manipulation.js",
    "content": "module(\"manipulation\", { teardown: moduleTeardown });\n\n// Ensure that an extended Array prototype doesn't break jQuery\nArray.prototype.arrayProtoFn = function(arg) { throw(\"arrayProtoFn should not be called\"); };\n\nvar bareObj = function(value) { return value; };\nvar functionReturningObj = function(value) { return (function() { return value; }); };\n\ntest(\"text()\", function() {\n\texpect(3);\n\tvar expected = \"This link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for merged text of more then one element.\" );\n\n\t// Check serialization of text values\n\tequal( jQuery(document.createTextNode(\"foo\")).text(), \"foo\", \"Text node was retreived from .text().\" );\n\tnotEqual( jQuery(document).text(), \"\", \"Retrieving text for the document retrieves all text (#10724).\");\n});\n\nvar testText = function(valueObj) {\n\texpect(4);\n\tvar val = valueObj(\"<div><b>Hello</b> cruel world!</div>\");\n\tequal( jQuery(\"#foo\").text(val)[0].innerHTML.replace(/>/g, \"&gt;\"), \"&lt;div&gt;&lt;b&gt;Hello&lt;/b&gt; cruel world!&lt;/div&gt;\", \"Check escaped text\" );\n\n\t// using contents will get comments regular, text, and comment nodes\n\tvar j = jQuery(\"#nonnodes\").contents();\n\tj.text(valueObj(\"hi!\"));\n\tequal( jQuery(j[0]).text(), \"hi!\", \"Check node,textnode,comment with text()\" );\n\tequal( j[1].nodeValue, \" there \", \"Check node,textnode,comment with text()\" );\n\n\t// Blackberry 4.6 doesn't maintain comments in the DOM\n\tequal( jQuery(\"#nonnodes\")[0].childNodes.length < 3 ? 8 : j[2].nodeType, 8, \"Check node,textnode,comment with text()\" );\n};\n\ntest(\"text(String)\", function() {\n\ttestText(bareObj);\n});\n\ntest(\"text(Function)\", function() {\n\ttestText(functionReturningObj);\n});\n\ntest(\"text(Function) with incoming value\", function() {\n\texpect(2);\n\n\tvar old = \"This link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\n\tjQuery(\"#sap\").text(function(i, val) {\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn \"foobar\";\n\t});\n\n\tequal( jQuery(\"#sap\").text(), \"foobar\", \"Check for merged text of more then one element.\" );\n\n\tQUnit.reset();\n});\n\nvar testWrap = function(val) {\n\texpect(19);\n\tvar defaultText = \"Try them out:\";\n\tvar result = jQuery(\"#first\").wrap(val( \"<div class='red'><span></span></div>\" )).text();\n\tequal( defaultText, result, \"Check for wrapping of on-the-fly html\" );\n\tok( jQuery(\"#first\").parent().parent().is(\".red\"), \"Check if wrapper has class 'red'\" );\n\n\tQUnit.reset();\n\tresult = jQuery(\"#first\").wrap(val( document.getElementById(\"empty\") )).parent();\n\tok( result.is(\"ol\"), \"Check for element wrapping\" );\n\tequal( result.text(), defaultText, \"Check for element wrapping\" );\n\n\tQUnit.reset();\n\tjQuery(\"#check1\").click(function() {\n\t\tvar checkbox = this;\n\t\tok( checkbox.checked, \"Checkbox's state is erased after wrap() action, see #769\" );\n\t\tjQuery(checkbox).wrap(val( \"<div id='c1' style='display:none;'></div>\" ));\n\t\tok( checkbox.checked, \"Checkbox's state is erased after wrap() action, see #769\" );\n\t}).click();\n\n\t// using contents will get comments regular, text, and comment nodes\n\tvar j = jQuery(\"#nonnodes\").contents();\n\tj.wrap(val( \"<i></i>\" ));\n\n\t// Blackberry 4.6 doesn't maintain comments in the DOM\n\tequal( jQuery(\"#nonnodes > i\").length, jQuery(\"#nonnodes\")[0].childNodes.length, \"Check node,textnode,comment wraps ok\" );\n\tequal( jQuery(\"#nonnodes > i\").text(), j.text(), \"Check node,textnode,comment wraps doesn't hurt text\" );\n\n\t// Try wrapping a disconnected node\n\tvar cacheLength = 0;\n\tfor (var i in jQuery.cache) {\n\t\tcacheLength++;\n\t}\n\n\tj = jQuery(\"<label/>\").wrap(val( \"<li/>\" ));\n\tequal( j[0].nodeName.toUpperCase(), \"LABEL\", \"Element is a label\" );\n\tequal( j[0].parentNode.nodeName.toUpperCase(), \"LI\", \"Element has been wrapped\" );\n\n\tfor (i in jQuery.cache) {\n\t\tcacheLength--;\n\t}\n\tequal(cacheLength, 0, \"No memory leak in jQuery.cache (bug #7165)\");\n\n\t// Wrap an element containing a text node\n\tj = jQuery(\"<span/>\").wrap(\"<div>test</div>\");\n\tequal( j[0].previousSibling.nodeType, 3, \"Make sure the previous node is a text element\" );\n\tequal( j[0].parentNode.nodeName.toUpperCase(), \"DIV\", \"And that we're in the div element.\" );\n\n\t// Try to wrap an element with multiple elements (should fail)\n\tj = jQuery(\"<div><span></span></div>\").children().wrap(\"<p></p><div></div>\");\n\tequal( j[0].parentNode.parentNode.childNodes.length, 1, \"There should only be one element wrapping.\" );\n\tequal( j.length, 1, \"There should only be one element (no cloning).\" );\n\tequal( j[0].parentNode.nodeName.toUpperCase(), \"P\", \"The span should be in the paragraph.\" );\n\n\t// Wrap an element with a jQuery set\n\tj = jQuery(\"<span/>\").wrap(jQuery(\"<div></div>\"));\n\tequal( j[0].parentNode.nodeName.toLowerCase(), \"div\", \"Wrapping works.\" );\n\n\t// Wrap an element with a jQuery set and event\n\tresult = jQuery(\"<div></div>\").click(function(){\n\t\tok(true, \"Event triggered.\");\n\n\t\t// Remove handlers on detached elements\n\t\tresult.unbind();\n\t\tjQuery(this).unbind();\n\t});\n\n\tj = jQuery(\"<span/>\").wrap(result);\n\tequal( j[0].parentNode.nodeName.toLowerCase(), \"div\", \"Wrapping works.\" );\n\n\tj.parent().trigger(\"click\");\n\n\t// clean up attached elements\n\tQUnit.reset();\n}\n\ntest(\"wrap(String|Element)\", function() {\n\ttestWrap(bareObj);\n});\n\ntest(\"wrap(Function)\", function() {\n\ttestWrap(functionReturningObj);\n});\n\ntest(\"wrap(Function) with index (#10177)\", function() {\n\tvar expectedIndex = 0,\n\t    targets = jQuery(\"#qunit-fixture p\");\n\n\texpect(targets.length);\n\ttargets.wrap(function(i) {\n\t\tequal( i, expectedIndex, \"Check if the provided index (\" + i + \") is as expected (\" + expectedIndex + \")\" );\n\t\texpectedIndex++;\n\n\t\treturn \"<div id='wrap_index_'\" + i + \"'></div>\";\n\t});\n});\n\ntest(\"wrap(String) consecutive elements (#10177)\", function() {\n\tvar targets = jQuery(\"#qunit-fixture p\");\n\n\texpect(targets.length * 2);\n\ttargets.wrap(\"<div class='wrapper'></div>\");\n\t\n\ttargets.each(function() {\n\t\tvar $this = jQuery(this);\n\t\t\n\t\tok( $this.parent().is('.wrapper'), \"Check each elements parent is correct (.wrapper)\" );\n\t\tequal( $this.siblings().length, 0, \"Each element should be wrapped individually\" );\n\t});\n});\n\nvar testWrapAll = function(val) {\n\texpect(8);\n\tvar prev = jQuery(\"#firstp\")[0].previousSibling;\n\tvar p = jQuery(\"#firstp,#first\")[0].parentNode;\n\n\tvar result = jQuery(\"#firstp,#first\").wrapAll(val( \"<div class='red'><div class='tmp'></div></div>\" ));\n\tequal( result.parent().length, 1, \"Check for wrapping of on-the-fly html\" );\n\tok( jQuery(\"#first\").parent().parent().is(\".red\"), \"Check if wrapper has class 'red'\" );\n\tok( jQuery(\"#firstp\").parent().parent().is(\".red\"), \"Check if wrapper has class 'red'\" );\n\tequal( jQuery(\"#first\").parent().parent()[0].previousSibling, prev, \"Correct Previous Sibling\" );\n\tequal( jQuery(\"#first\").parent().parent()[0].parentNode, p, \"Correct Parent\" );\n\n\tQUnit.reset();\n\tvar prev = jQuery(\"#firstp\")[0].previousSibling;\n\tvar p = jQuery(\"#first\")[0].parentNode;\n\tvar result = jQuery(\"#firstp,#first\").wrapAll(val( document.getElementById(\"empty\") ));\n\tequal( jQuery(\"#first\").parent()[0], jQuery(\"#firstp\").parent()[0], \"Same Parent\" );\n\tequal( jQuery(\"#first\").parent()[0].previousSibling, prev, \"Correct Previous Sibling\" );\n\tequal( jQuery(\"#first\").parent()[0].parentNode, p, \"Correct Parent\" );\n}\n\ntest(\"wrapAll(String|Element)\", function() {\n\ttestWrapAll(bareObj);\n});\n\nvar testWrapInner = function(val) {\n\texpect(11);\n\tvar num = jQuery(\"#first\").children().length;\n\tvar result = jQuery(\"#first\").wrapInner(val(\"<div class='red'><div id='tmp'></div></div>\"));\n\tequal( jQuery(\"#first\").children().length, 1, \"Only one child\" );\n\tok( jQuery(\"#first\").children().is(\".red\"), \"Verify Right Element\" );\n\tequal( jQuery(\"#first\").children().children().children().length, num, \"Verify Elements Intact\" );\n\n\tQUnit.reset();\n\tvar num = jQuery(\"#first\").html(\"foo<div>test</div><div>test2</div>\").children().length;\n\tvar result = jQuery(\"#first\").wrapInner(val(\"<div class='red'><div id='tmp'></div></div>\"));\n\tequal( jQuery(\"#first\").children().length, 1, \"Only one child\" );\n\tok( jQuery(\"#first\").children().is(\".red\"), \"Verify Right Element\" );\n\tequal( jQuery(\"#first\").children().children().children().length, num, \"Verify Elements Intact\" );\n\n\tQUnit.reset();\n\tvar num = jQuery(\"#first\").children().length;\n\tvar result = jQuery(\"#first\").wrapInner(val(document.getElementById(\"empty\")));\n\tequal( jQuery(\"#first\").children().length, 1, \"Only one child\" );\n\tok( jQuery(\"#first\").children().is(\"#empty\"), \"Verify Right Element\" );\n\tequal( jQuery(\"#first\").children().children().length, num, \"Verify Elements Intact\" );\n\n\tvar div = jQuery(\"<div/>\");\n\tdiv.wrapInner(val(\"<span></span>\"));\n\tequal(div.children().length, 1, \"The contents were wrapped.\");\n\tequal(div.children()[0].nodeName.toLowerCase(), \"span\", \"A span was inserted.\");\n}\n\ntest(\"wrapInner(String|Element)\", function() {\n\ttestWrapInner(bareObj);\n});\n\ntest(\"wrapInner(Function)\", function() {\n\ttestWrapInner(functionReturningObj)\n});\n\ntest(\"unwrap()\", function() {\n\texpect(9);\n\n\tjQuery(\"body\").append(\"  <div id='unwrap' style='display: none;'> <div id='unwrap1'> <span class='unwrap'>a</span> <span class='unwrap'>b</span> </div> <div id='unwrap2'> <span class='unwrap'>c</span> <span class='unwrap'>d</span> </div> <div id='unwrap3'> <b><span class='unwrap unwrap3'>e</span></b> <b><span class='unwrap unwrap3'>f</span></b> </div> </div>\");\n\n\tvar abcd = jQuery(\"#unwrap1 > span, #unwrap2 > span\").get(),\n\t\tabcdef = jQuery(\"#unwrap span\").get();\n\n\tequal( jQuery(\"#unwrap1 span\").add(\"#unwrap2 span:first\").unwrap().length, 3, \"make #unwrap1 and #unwrap2 go away\" );\n\tdeepEqual( jQuery(\"#unwrap > span\").get(), abcd, \"all four spans should still exist\" );\n\n\tdeepEqual( jQuery(\"#unwrap3 span\").unwrap().get(), jQuery(\"#unwrap3 > span\").get(), \"make all b in #unwrap3 go away\" );\n\n\tdeepEqual( jQuery(\"#unwrap3 span\").unwrap().get(), jQuery(\"#unwrap > span.unwrap3\").get(), \"make #unwrap3 go away\" );\n\n\tdeepEqual( jQuery(\"#unwrap\").children().get(), abcdef, \"#unwrap only contains 6 child spans\" );\n\n\tdeepEqual( jQuery(\"#unwrap > span\").unwrap().get(), jQuery(\"body > span.unwrap\").get(), \"make the 6 spans become children of body\" );\n\n\tdeepEqual( jQuery(\"body > span.unwrap\").unwrap().get(), jQuery(\"body > span.unwrap\").get(), \"can't unwrap children of body\" );\n\tdeepEqual( jQuery(\"body > span.unwrap\").unwrap().get(), abcdef, \"can't unwrap children of body\" );\n\n\tdeepEqual( jQuery(\"body > span.unwrap\").get(), abcdef, \"body contains 6 .unwrap child spans\" );\n\n\tjQuery(\"body > span.unwrap\").remove();\n});\n\nvar testAppend = function(valueObj) {\n\texpect(41);\n\tvar defaultText = \"Try them out:\"\n\tvar result = jQuery(\"#first\").append(valueObj(\"<b>buga</b>\"));\n\tequal( result.text(), defaultText + \"buga\", \"Check if text appending works\" );\n\tequal( jQuery(\"#select3\").append(valueObj(\"<option value='appendTest'>Append Test</option>\")).find(\"option:last-child\").attr(\"value\"), \"appendTest\", \"Appending html options to select element\");\n\n\tQUnit.reset();\n\tvar expected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogTry them out:\";\n\tjQuery(\"#sap\").append(valueObj(document.getElementById(\"first\")));\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of element\" );\n\n\tQUnit.reset();\n\texpected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogTry them out:Yahoo\";\n\tjQuery(\"#sap\").append(valueObj([document.getElementById(\"first\"), document.getElementById(\"yahoo\")]));\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of array of elements\" );\n\n\tQUnit.reset();\n\texpected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogYahooTry them out:\";\n\tjQuery(\"#sap\").append(valueObj(jQuery(\"#yahoo, #first\")));\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of jQuery object\" );\n\n\tQUnit.reset();\n\tjQuery(\"#sap\").append(valueObj( 5 ));\n\tok( jQuery(\"#sap\")[0].innerHTML.match( /5$/ ), \"Check for appending a number\" );\n\n\tQUnit.reset();\n\tjQuery(\"#sap\").append(valueObj( \" text with spaces \" ));\n\tok( jQuery(\"#sap\")[0].innerHTML.match(/ text with spaces $/), \"Check for appending text with spaces\" );\n\n\tQUnit.reset();\n\tok( jQuery(\"#sap\").append(valueObj( [] )), \"Check for appending an empty array.\" );\n\tok( jQuery(\"#sap\").append(valueObj( \"\" )), \"Check for appending an empty string.\" );\n\tok( jQuery(\"#sap\").append(valueObj( document.getElementsByTagName(\"foo\") )), \"Check for appending an empty nodelist.\" );\n\n\tQUnit.reset();\n\tjQuery(\"form\").append(valueObj(\"<input name='radiotest' type='radio' checked='checked' />\"));\n\tjQuery(\"form input[name=radiotest]\").each(function(){\n\t\tok( jQuery(this).is(\":checked\"), \"Append checked radio\");\n\t}).remove();\n\n\tQUnit.reset();\n\tjQuery(\"form\").append(valueObj(\"<input name='radiotest' type='radio' checked    =   'checked' />\"));\n\tjQuery(\"form input[name=radiotest]\").each(function(){\n\t\tok( jQuery(this).is(\":checked\"), \"Append alternately formated checked radio\");\n\t}).remove();\n\n\tQUnit.reset();\n\tjQuery(\"form\").append(valueObj(\"<input name='radiotest' type='radio' checked />\"));\n\tjQuery(\"form input[name=radiotest]\").each(function(){\n\t\tok( jQuery(this).is(\":checked\"), \"Append HTML5-formated checked radio\");\n\t}).remove();\n\n\tQUnit.reset();\n\tjQuery(\"#sap\").append(valueObj( document.getElementById(\"form\") ));\n\tequal( jQuery(\"#sap>form\").size(), 1, \"Check for appending a form\" ); // Bug #910\n\n\tQUnit.reset();\n\tvar pass = true;\n\ttry {\n\t\tvar body = jQuery(\"#iframe\")[0].contentWindow.document.body;\n\n\t\tpass = false;\n\t\tjQuery( body ).append(valueObj( \"<div>test</div>\" ));\n\t\tpass = true;\n\t} catch(e) {}\n\n\tok( pass, \"Test for appending a DOM node to the contents of an IFrame\" );\n\n\tQUnit.reset();\n\tjQuery(\"<fieldset/>\").appendTo(\"#form\").append(valueObj( \"<legend id='legend'>test</legend>\" ));\n\tt( \"Append legend\", \"#legend\", [\"legend\"] );\n\n\tQUnit.reset();\n\tjQuery(\"#select1\").append(valueObj( \"<OPTION>Test</OPTION>\" ));\n\tequal( jQuery(\"#select1 option:last\").text(), \"Test\", \"Appending &lt;OPTION&gt; (all caps)\" );\n\n\tjQuery(\"#table\").append(valueObj( \"<colgroup></colgroup>\" ));\n\tok( jQuery(\"#table colgroup\").length, \"Append colgroup\" );\n\n\tjQuery(\"#table colgroup\").append(valueObj( \"<col/>\" ));\n\tok( jQuery(\"#table colgroup col\").length, \"Append col\" );\n\n\tQUnit.reset();\n\tjQuery(\"#table\").append(valueObj( \"<caption></caption>\" ));\n\tok( jQuery(\"#table caption\").length, \"Append caption\" );\n\n\tQUnit.reset();\n\tjQuery(\"form:last\")\n\t\t.append(valueObj( \"<select id='appendSelect1'></select>\" ))\n\t\t.append(valueObj( \"<select id='appendSelect2'><option>Test</option></select>\" ));\n\n\tt( \"Append Select\", \"#appendSelect1, #appendSelect2\", [\"appendSelect1\", \"appendSelect2\"] );\n\n\tequal( \"Two nodes\", jQuery(\"<div />\").append(\"Two\", \" nodes\").text(), \"Appending two text nodes (#4011)\" );\n\n\t// using contents will get comments regular, text, and comment nodes\n\tvar j = jQuery(\"#nonnodes\").contents();\n\tvar d = jQuery(\"<div/>\").appendTo(\"#nonnodes\").append(j);\n\tequal( jQuery(\"#nonnodes\").length, 1, \"Check node,textnode,comment append moved leaving just the div\" );\n\tok( d.contents().length >= 2, \"Check node,textnode,comment append works\" );\n\td.contents().appendTo(\"#nonnodes\");\n\td.remove();\n\tok( jQuery(\"#nonnodes\").contents().length >= 2, \"Check node,textnode,comment append cleanup worked\" );\n\n\tQUnit.reset();\n\tvar $input = jQuery(\"<input />\").attr({ \"type\": \"checkbox\", \"checked\": true }).appendTo('#testForm');\n\tequal( $input[0].checked, true, \"A checked checkbox that is appended stays checked\" );\n\n\tQUnit.reset();\n\tvar $radios = jQuery(\"input:radio[name='R1']\"),\n\t\t$radioNot = jQuery(\"<input type='radio' name='R1' checked='checked'/>\").insertAfter( $radios ),\n\t\t$radio = $radios.eq(1).click();\n\t$radioNot[0].checked = false;\n\t$radios.parent().wrap(\"<div></div>\");\n\tequal( $radio[0].checked, true, \"Reappending radios uphold which radio is checked\" );\n\tequal( $radioNot[0].checked, false, \"Reappending radios uphold not being checked\" );\n\tQUnit.reset();\n\n\tvar prev = jQuery(\"#sap\").children().length;\n\n\tjQuery(\"#sap\").append(\n\t\t\"<span></span>\",\n\t\t\"<span></span>\",\n\t\t\"<span></span>\"\n\t);\n\n\tequal( jQuery(\"#sap\").children().length, prev + 3, \"Make sure that multiple arguments works.\" );\n\tQUnit.reset();\n}\n\ntest(\"append(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\ttestAppend(bareObj);\n});\n\ntest(\"append(Function)\", function() {\n\ttestAppend(functionReturningObj);\n});\n\ntest(\"append(Function) with incoming value\", function() {\n\texpect(12);\n\n\tvar defaultText = \"Try them out:\", old = jQuery(\"#first\").html();\n\n\tvar result = jQuery(\"#first\").append(function(i, val){\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn \"<b>buga</b>\";\n\t});\n\tequal( result.text(), defaultText + \"buga\", \"Check if text appending works\" );\n\n\tvar select = jQuery(\"#select3\");\n\told = select.html();\n\n\tequal( select.append(function(i, val){\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn \"<option value='appendTest'>Append Test</option>\";\n\t}).find(\"option:last-child\").attr(\"value\"), \"appendTest\", \"Appending html options to select element\");\n\n\tQUnit.reset();\n\tvar expected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogTry them out:\";\n\told = jQuery(\"#sap\").html();\n\n\tjQuery(\"#sap\").append(function(i, val){\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn document.getElementById(\"first\");\n\t});\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of element\" );\n\n\tQUnit.reset();\n\texpected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogTry them out:Yahoo\";\n\told = jQuery(\"#sap\").html();\n\n\tjQuery(\"#sap\").append(function(i, val){\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn [document.getElementById(\"first\"), document.getElementById(\"yahoo\")];\n\t});\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of array of elements\" );\n\n\tQUnit.reset();\n\texpected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogYahooTry them out:\";\n\told = jQuery(\"#sap\").html();\n\n\tjQuery(\"#sap\").append(function(i, val){\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn jQuery(\"#yahoo, #first\");\n\t});\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of jQuery object\" );\n\n\tQUnit.reset();\n\told = jQuery(\"#sap\").html();\n\n\tjQuery(\"#sap\").append(function(i, val){\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn 5;\n\t});\n\tok( jQuery(\"#sap\")[0].innerHTML.match( /5$/ ), \"Check for appending a number\" );\n\n\tQUnit.reset();\n});\n\ntest(\"append the same fragment with events (Bug #6997, 5566)\", function () {\n\tvar doExtra = !jQuery.support.noCloneEvent && document.fireEvent;\n\texpect(2 + (doExtra ? 1 : 0));\n\tstop();\n\n\tvar element;\n\n\t// This patch modified the way that cloning occurs in IE; we need to make sure that\n\t// native event handlers on the original object don't get disturbed when they are\n\t// modified on the clone\n\tif ( doExtra ) {\n\t\telement = jQuery(\"div:first\").click(function () {\n\t\t\tok(true, \"Event exists on original after being unbound on clone\");\n\t\t\tjQuery(this).unbind(\"click\");\n\t\t});\n\t\tvar clone = element.clone(true).unbind(\"click\");\n\t\tclone[0].fireEvent(\"onclick\");\n\t\telement[0].fireEvent(\"onclick\");\n\n\t\t// manually clean up detached elements\n\t\tclone.remove();\n\t}\n\n\telement = jQuery(\"<a class='test6997'></a>\").click(function () {\n\t\tok(true, \"Append second element events work\");\n\t});\n\n\tjQuery(\"#listWithTabIndex li\").append(element)\n\t\t.find(\"a.test6997\").eq(1).click();\n\n\telement = jQuery(\"<li class='test6997'></li>\").click(function () {\n\t\tok(true, \"Before second element events work\");\n\t\tstart();\n\t});\n\n\tjQuery(\"#listWithTabIndex li\").before(element);\n\tjQuery(\"#listWithTabIndex li.test6997\").eq(1).click();\n});\n\ntest(\"append HTML5 sectioning elements (Bug #6485)\", function () {\n\texpect(2);\n\n\tjQuery(\"#qunit-fixture\").append(\"<article style='font-size:10px'><section><aside>HTML5 elements</aside></section></article>\");\n\n\tvar article = jQuery(\"article\"),\n\taside = jQuery(\"aside\");\n\n\tequal( article.css(\"fontSize\"), \"10px\", \"HTML5 elements are styleable\");\n\tequal( aside.length, 1, \"HTML5 elements do not collapse their children\")\n});\n\ntest(\"HTML5 Elements inherit styles from style rules (Bug #10501)\", function () {\n\texpect(1);\n\n\tjQuery(\"#qunit-fixture\").append(\"<article id='article'></article>\");\n\tjQuery(\"#article\").append(\"<section>This section should have a pink background.</section>\");\n\n\t// In IE, the missing background color will claim its value is \"transparent\"\n\tnotEqual( jQuery(\"section\").css(\"background-color\"), \"transparent\", \"HTML5 elements inherit styles\");\n});\n\ntest(\"html5 clone() cannot use the fragment cache in IE (#6485)\", function () {\n\texpect(1);\n\n\tjQuery(\"<article><section><aside>HTML5 elements</aside></section></article>\").appendTo(\"#qunit-fixture\");\n\n\tvar clone = jQuery(\"article\").clone();\n\n\tjQuery(\"#qunit-fixture\").append( clone );\n\n\tequal( jQuery(\"aside\").length, 2, \"clone()ing HTML5 elems does not collapse them\" );\n});\n\ntest(\"html(String) with HTML5 (Bug #6485)\", function() {\n\texpect(2);\n\n\tjQuery(\"#qunit-fixture\").html(\"<article><section><aside>HTML5 elements</aside></section></article>\");\n\tequal( jQuery(\"#qunit-fixture\").children().children().length, 1, \"Make sure HTML5 article elements can hold children. innerHTML shortcut path\" );\n\tequal( jQuery(\"#qunit-fixture\").children().children().children().length, 1, \"Make sure nested HTML5 elements can hold children.\" );\n});\n\ntest(\"append(xml)\", function() {\n\texpect( 1 );\n\n\tfunction createXMLDoc() {\n\t\t// Initialize DOM based upon latest installed MSXML or Netscape\n\t\tvar elem,\n\t\t\taActiveX =\n\t\t\t\t[ \"MSXML6.DomDocument\",\n\t\t\t\t\"MSXML3.DomDocument\",\n\t\t\t\t\"MSXML2.DomDocument\",\n\t\t\t\t\"MSXML.DomDocument\",\n\t\t\t\t\"Microsoft.XmlDom\" ];\n\n\t\tif ( document.implementation && \"createDocument\" in document.implementation ) {\n\t\t\treturn document.implementation.createDocument( \"\", \"\", null );\n\t\t} else {\n\t\t\t// IE\n\t\t\tfor ( var n = 0, len = aActiveX.length; n < len; n++ ) {\n\t\t\t\ttry {\n\t\t\t\t\telem = new ActiveXObject( aActiveX[ n ] );\n\t\t\t\t\treturn elem;\n\t\t\t\t} catch(_){};\n\t\t\t}\n\t\t}\n\t}\n\n\tvar xmlDoc = createXMLDoc(),\n\t\txml1 = xmlDoc.createElement(\"head\"),\n\t\txml2 = xmlDoc.createElement(\"test\");\n\n\tok( jQuery( xml1 ).append( xml2 ), \"Append an xml element to another without raising an exception.\" );\n\n});\n\ntest(\"appendTo(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\texpect(17);\n\n\tvar defaultText = \"Try them out:\"\n\tjQuery(\"<b>buga</b>\").appendTo(\"#first\");\n\tequal( jQuery(\"#first\").text(), defaultText + \"buga\", \"Check if text appending works\" );\n\tequal( jQuery(\"<option value='appendTest'>Append Test</option>\").appendTo(\"#select3\").parent().find(\"option:last-child\").attr(\"value\"), \"appendTest\", \"Appending html options to select element\");\n\n\tQUnit.reset();\n\tvar l = jQuery(\"#first\").children().length + 2;\n\tjQuery(\"<strong>test</strong>\");\n\tjQuery(\"<strong>test</strong>\");\n\tjQuery([ jQuery(\"<strong>test</strong>\")[0], jQuery(\"<strong>test</strong>\")[0] ])\n\t\t.appendTo(\"#first\");\n\tequal( jQuery(\"#first\").children().length, l, \"Make sure the elements were inserted.\" );\n\tequal( jQuery(\"#first\").children().last()[0].nodeName.toLowerCase(), \"strong\", \"Verify the last element.\" );\n\n\tQUnit.reset();\n\tvar expected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogTry them out:\";\n\tjQuery(document.getElementById(\"first\")).appendTo(\"#sap\");\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of element\" );\n\n\tQUnit.reset();\n\texpected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogTry them out:Yahoo\";\n\tjQuery([document.getElementById(\"first\"), document.getElementById(\"yahoo\")]).appendTo(\"#sap\");\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of array of elements\" );\n\n\tQUnit.reset();\n\tok( jQuery(document.createElement(\"script\")).appendTo(\"body\").length, \"Make sure a disconnected script can be appended.\" );\n\n\tQUnit.reset();\n\texpected = \"This link has class=\\\"blog\\\": Simon Willison's WeblogYahooTry them out:\";\n\tjQuery(\"#yahoo, #first\").appendTo(\"#sap\");\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for appending of jQuery object\" );\n\n\tQUnit.reset();\n\tjQuery(\"#select1\").appendTo(\"#foo\");\n\tt( \"Append select\", \"#foo select\", [\"select1\"] );\n\n\tQUnit.reset();\n\tvar div = jQuery(\"<div/>\").click(function(){\n\t\tok(true, \"Running a cloned click.\");\n\t});\n\tdiv.appendTo(\"#qunit-fixture, #moretests\");\n\n\tjQuery(\"#qunit-fixture div:last\").click();\n\tjQuery(\"#moretests div:last\").click();\n\n\tQUnit.reset();\n\tdiv = jQuery(\"<div/>\").appendTo(\"#qunit-fixture, #moretests\");\n\n\tequal( div.length, 2, \"appendTo returns the inserted elements\" );\n\n\tdiv.addClass(\"test\");\n\n\tok( jQuery(\"#qunit-fixture div:last\").hasClass(\"test\"), \"appendTo element was modified after the insertion\" );\n\tok( jQuery(\"#moretests div:last\").hasClass(\"test\"), \"appendTo element was modified after the insertion\" );\n\n\tQUnit.reset();\n\n\tdiv = jQuery(\"<div/>\");\n\tjQuery(\"<span>a</span><b>b</b>\").filter(\"span\").appendTo( div );\n\n\tequal( div.children().length, 1, \"Make sure the right number of children were inserted.\" );\n\n\tdiv = jQuery(\"#moretests div\");\n\n\tvar num = jQuery(\"#qunit-fixture div\").length;\n\tdiv.remove().appendTo(\"#qunit-fixture\");\n\n\tequal( jQuery(\"#qunit-fixture div\").length, num, \"Make sure all the removed divs were inserted.\" );\n\n\tQUnit.reset();\n\n\tstop();\n\tjQuery.getScript('data/test.js', function() {\n\t\tjQuery('script[src*=\"data\\\\/test\\\\.js\"]').remove();\n\t\tstart();\n\t});\n});\n\nvar testPrepend = function(val) {\n\texpect(5);\n\tvar defaultText = \"Try them out:\"\n\tvar result = jQuery(\"#first\").prepend(val( \"<b>buga</b>\" ));\n\tequal( result.text(), \"buga\" + defaultText, \"Check if text prepending works\" );\n\tequal( jQuery(\"#select3\").prepend(val( \"<option value='prependTest'>Prepend Test</option>\" )).find(\"option:first-child\").attr(\"value\"), \"prependTest\", \"Prepending html options to select element\");\n\n\tQUnit.reset();\n\tvar expected = \"Try them out:This link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\tjQuery(\"#sap\").prepend(val( document.getElementById(\"first\") ));\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of element\" );\n\n\tQUnit.reset();\n\texpected = \"Try them out:YahooThis link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\tjQuery(\"#sap\").prepend(val( [document.getElementById(\"first\"), document.getElementById(\"yahoo\")] ));\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of array of elements\" );\n\n\tQUnit.reset();\n\texpected = \"YahooTry them out:This link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\tjQuery(\"#sap\").prepend(val( jQuery(\"#yahoo, #first\") ));\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of jQuery object\" );\n};\n\ntest(\"prepend(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\ttestPrepend(bareObj);\n});\n\ntest(\"prepend(Function)\", function() {\n\ttestPrepend(functionReturningObj);\n});\n\ntest(\"prepend(Function) with incoming value\", function() {\n\texpect(10);\n\n\tvar defaultText = \"Try them out:\", old = jQuery(\"#first\").html();\n\tvar result = jQuery(\"#first\").prepend(function(i, val) {\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn \"<b>buga</b>\";\n\t});\n\tequal( result.text(), \"buga\" + defaultText, \"Check if text prepending works\" );\n\n\told = jQuery(\"#select3\").html();\n\n\tequal( jQuery(\"#select3\").prepend(function(i, val) {\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn \"<option value='prependTest'>Prepend Test</option>\";\n\t}).find(\"option:first-child\").attr(\"value\"), \"prependTest\", \"Prepending html options to select element\");\n\n\tQUnit.reset();\n\tvar expected = \"Try them out:This link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\told = jQuery(\"#sap\").html();\n\n\tjQuery(\"#sap\").prepend(function(i, val) {\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn document.getElementById(\"first\");\n\t});\n\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of element\" );\n\n\tQUnit.reset();\n\texpected = \"Try them out:YahooThis link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\told = jQuery(\"#sap\").html();\n\n\tjQuery(\"#sap\").prepend(function(i, val) {\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn [document.getElementById(\"first\"), document.getElementById(\"yahoo\")];\n\t});\n\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of array of elements\" );\n\n\tQUnit.reset();\n\texpected = \"YahooTry them out:This link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\told = jQuery(\"#sap\").html();\n\n\tjQuery(\"#sap\").prepend(function(i, val) {\n\t\tequal( val, old, \"Make sure the incoming value is correct.\" );\n\t\treturn jQuery(\"#yahoo, #first\");\n\t});\n\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of jQuery object\" );\n});\n\ntest(\"prependTo(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\texpect(6);\n\tvar defaultText = \"Try them out:\"\n\tjQuery(\"<b>buga</b>\").prependTo(\"#first\");\n\tequal( jQuery(\"#first\").text(), \"buga\" + defaultText, \"Check if text prepending works\" );\n\tequal( jQuery(\"<option value='prependTest'>Prepend Test</option>\").prependTo(\"#select3\").parent().find(\"option:first-child\").attr(\"value\"), \"prependTest\", \"Prepending html options to select element\");\n\n\tQUnit.reset();\n\tvar expected = \"Try them out:This link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\tjQuery(document.getElementById(\"first\")).prependTo(\"#sap\");\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of element\" );\n\n\tQUnit.reset();\n\texpected = \"Try them out:YahooThis link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\tjQuery([document.getElementById(\"first\"), document.getElementById(\"yahoo\")]).prependTo(\"#sap\");\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of array of elements\" );\n\n\tQUnit.reset();\n\texpected = \"YahooTry them out:This link has class=\\\"blog\\\": Simon Willison's Weblog\";\n\tjQuery(\"#yahoo, #first\").prependTo(\"#sap\");\n\tequal( jQuery(\"#sap\").text(), expected, \"Check for prepending of jQuery object\" );\n\n\tQUnit.reset();\n\tjQuery(\"<select id='prependSelect1'></select>\").prependTo(\"form:last\");\n\tjQuery(\"<select id='prependSelect2'><option>Test</option></select>\").prependTo(\"form:last\");\n\n\tt( \"Prepend Select\", \"#prependSelect2, #prependSelect1\", [\"prependSelect2\", \"prependSelect1\"] );\n});\n\nvar testBefore = function(val) {\n\texpect(6);\n\tvar expected = \"This is a normal link: bugaYahoo\";\n\tjQuery(\"#yahoo\").before(val( \"<b>buga</b>\" ));\n\tequal( jQuery(\"#en\").text(), expected, \"Insert String before\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: Try them out:Yahoo\";\n\tjQuery(\"#yahoo\").before(val( document.getElementById(\"first\") ));\n\tequal( jQuery(\"#en\").text(), expected, \"Insert element before\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: Try them out:diveintomarkYahoo\";\n\tjQuery(\"#yahoo\").before(val( [document.getElementById(\"first\"), document.getElementById(\"mark\")] ));\n\tequal( jQuery(\"#en\").text(), expected, \"Insert array of elements before\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: diveintomarkTry them out:Yahoo\";\n\tjQuery(\"#yahoo\").before(val( jQuery(\"#mark, #first\") ));\n\tequal( jQuery(\"#en\").text(), expected, \"Insert jQuery before\" );\n\n\tvar set = jQuery(\"<div/>\").before(\"<span>test</span>\");\n\tequal( set[0].nodeName.toLowerCase(), \"span\", \"Insert the element before the disconnected node.\" );\n\tequal( set.length, 2, \"Insert the element before the disconnected node.\" );\n};\n\ntest(\"before(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\ttestBefore(bareObj);\n});\n\ntest(\"before(Function)\", function() {\n\ttestBefore(functionReturningObj);\n});\n\ntest(\"before and after w/ empty object (#10812)\", function() {\n\texpect(2);\n\n\tvar res = jQuery( \"#notInTheDocument\" ).before( \"(\" ).after( \")\" );\n\tequal( res.length, 2, \"didn't choke on empty object\" );\n\tequal( res.wrapAll(\"<div/>\").parent().text(), \"()\", \"correctly appended text\" );\n});\n\ntest(\"insertBefore(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\texpect(4);\n\tvar expected = \"This is a normal link: bugaYahoo\";\n\tjQuery(\"<b>buga</b>\").insertBefore(\"#yahoo\");\n\tequal( jQuery(\"#en\").text(), expected, \"Insert String before\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: Try them out:Yahoo\";\n\tjQuery(document.getElementById(\"first\")).insertBefore(\"#yahoo\");\n\tequal( jQuery(\"#en\").text(), expected, \"Insert element before\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: Try them out:diveintomarkYahoo\";\n\tjQuery([document.getElementById(\"first\"), document.getElementById(\"mark\")]).insertBefore(\"#yahoo\");\n\tequal( jQuery(\"#en\").text(), expected, \"Insert array of elements before\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: diveintomarkTry them out:Yahoo\";\n\tjQuery(\"#mark, #first\").insertBefore(\"#yahoo\");\n\tequal( jQuery(\"#en\").text(), expected, \"Insert jQuery before\" );\n});\n\nvar testAfter = function(val) {\n\texpect(6);\n\tvar expected = \"This is a normal link: Yahoobuga\";\n\tjQuery(\"#yahoo\").after(val( \"<b>buga</b>\" ));\n\tequal( jQuery(\"#en\").text(), expected, \"Insert String after\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: YahooTry them out:\";\n\tjQuery(\"#yahoo\").after(val( document.getElementById(\"first\") ));\n\tequal( jQuery(\"#en\").text(), expected, \"Insert element after\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: YahooTry them out:diveintomark\";\n\tjQuery(\"#yahoo\").after(val( [document.getElementById(\"first\"), document.getElementById(\"mark\")] ));\n\tequal( jQuery(\"#en\").text(), expected, \"Insert array of elements after\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: YahoodiveintomarkTry them out:\";\n\tjQuery(\"#yahoo\").after(val( jQuery(\"#mark, #first\") ));\n\tequal( jQuery(\"#en\").text(), expected, \"Insert jQuery after\" );\n\n\tvar set = jQuery(\"<div/>\").after(\"<span>test</span>\");\n\tequal( set[1].nodeName.toLowerCase(), \"span\", \"Insert the element after the disconnected node.\" );\n\tequal( set.length, 2, \"Insert the element after the disconnected node.\" );\n};\n\ntest(\"after(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\ttestAfter(bareObj);\n});\n\ntest(\"after(Function)\", function() {\n\ttestAfter(functionReturningObj);\n});\n\ntest(\"insertAfter(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\texpect(4);\n\tvar expected = \"This is a normal link: Yahoobuga\";\n\tjQuery(\"<b>buga</b>\").insertAfter(\"#yahoo\");\n\tequal( jQuery(\"#en\").text(), expected, \"Insert String after\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: YahooTry them out:\";\n\tjQuery(document.getElementById(\"first\")).insertAfter(\"#yahoo\");\n\tequal( jQuery(\"#en\").text(), expected, \"Insert element after\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: YahooTry them out:diveintomark\";\n\tjQuery([document.getElementById(\"first\"), document.getElementById(\"mark\")]).insertAfter(\"#yahoo\");\n\tequal( jQuery(\"#en\").text(), expected, \"Insert array of elements after\" );\n\n\tQUnit.reset();\n\texpected = \"This is a normal link: YahoodiveintomarkTry them out:\";\n\tjQuery(\"#mark, #first\").insertAfter(\"#yahoo\");\n\tequal( jQuery(\"#en\").text(), expected, \"Insert jQuery after\" );\n});\n\nvar testReplaceWith = function(val) {\n\texpect(21);\n\tjQuery(\"#yahoo\").replaceWith(val( \"<b id='replace'>buga</b>\" ));\n\tok( jQuery(\"#replace\")[0], \"Replace element with string\" );\n\tok( !jQuery(\"#yahoo\")[0], \"Verify that original element is gone, after string\" );\n\n\tQUnit.reset();\n\tjQuery(\"#yahoo\").replaceWith(val( document.getElementById(\"first\") ));\n\tok( jQuery(\"#first\")[0], \"Replace element with element\" );\n\tok( !jQuery(\"#yahoo\")[0], \"Verify that original element is gone, after element\" );\n\n\tQUnit.reset();\n\tjQuery(\"#qunit-fixture\").append(\"<div id='bar'><div id='baz'</div></div>\");\n\tjQuery(\"#baz\").replaceWith(\"Baz\");\n\tequal( jQuery(\"#bar\").text(),\"Baz\", \"Replace element with text\" );\n\tok( !jQuery(\"#baz\")[0], \"Verify that original element is gone, after element\" );\n\n\tQUnit.reset();\n\tjQuery(\"#yahoo\").replaceWith(val( [document.getElementById(\"first\"), document.getElementById(\"mark\")] ));\n\tok( jQuery(\"#first\")[0], \"Replace element with array of elements\" );\n\tok( jQuery(\"#mark\")[0], \"Replace element with array of elements\" );\n\tok( !jQuery(\"#yahoo\")[0], \"Verify that original element is gone, after array of elements\" );\n\n\tQUnit.reset();\n\tjQuery(\"#yahoo\").replaceWith(val( jQuery(\"#mark, #first\") ));\n\tok( jQuery(\"#first\")[0], \"Replace element with set of elements\" );\n\tok( jQuery(\"#mark\")[0], \"Replace element with set of elements\" );\n\tok( !jQuery(\"#yahoo\")[0], \"Verify that original element is gone, after set of elements\" );\n\n\tQUnit.reset();\n\tvar tmp = jQuery(\"<div/>\").appendTo(\"body\").click(function(){ ok(true, \"Newly bound click run.\" ); });\n\tvar y = jQuery(\"<div/>\").appendTo(\"body\").click(function(){ ok(true, \"Previously bound click run.\" ); });\n\tvar child = y.append(\"<b>test</b>\").find(\"b\").click(function(){ ok(true, \"Child bound click run.\" ); return false; });\n\n\ty.replaceWith( tmp );\n\n\ttmp.click();\n\ty.click(); // Shouldn't be run\n\tchild.click(); // Shouldn't be run\n\n\ttmp.remove();\n\ty.remove();\n\tchild.remove();\n\n\tQUnit.reset();\n\n\ty = jQuery(\"<div/>\").appendTo(\"body\").click(function(){ ok(true, \"Previously bound click run.\" ); });\n\tvar child2 = y.append(\"<u>test</u>\").find(\"u\").click(function(){ ok(true, \"Child 2 bound click run.\" ); return false; });\n\n\ty.replaceWith( child2 );\n\n\tchild2.click();\n\n\ty.remove();\n\tchild2.remove();\n\n\tQUnit.reset();\n\n\tvar set = jQuery(\"<div/>\").replaceWith(val(\"<span>test</span>\"));\n\tequal( set[0].nodeName.toLowerCase(), \"span\", \"Replace the disconnected node.\" );\n\tequal( set.length, 1, \"Replace the disconnected node.\" );\n\n\tvar non_existant = jQuery(\"#does-not-exist\").replaceWith( val(\"<b>should not throw an error</b>\") );\n\tequal( non_existant.length, 0, \"Length of non existant element.\" );\n\n\tvar $div = jQuery(\"<div class='replacewith'></div>\").appendTo(\"body\");\n\t// TODO: Work on jQuery(...) inline script execution\n\t//$div.replaceWith(\"<div class='replacewith'></div><script>\" +\n\t\t//\"equal(jQuery('.replacewith').length, 1, 'Check number of elements in page.');\" +\n\t\t//\"</script>\");\n\tequal(jQuery(\".replacewith\").length, 1, \"Check number of elements in page.\");\n\tjQuery(\".replacewith\").remove();\n\n\tQUnit.reset();\n\n\tjQuery(\"#qunit-fixture\").append(\"<div id='replaceWith'></div>\");\n\tequal( jQuery(\"#qunit-fixture\").find(\"div[id=replaceWith]\").length, 1, \"Make sure only one div exists.\" );\n\n\tjQuery(\"#replaceWith\").replaceWith( val(\"<div id='replaceWith'></div>\") );\n\tequal( jQuery(\"#qunit-fixture\").find(\"div[id=replaceWith]\").length, 1, \"Make sure only one div exists.\" );\n\n\tjQuery(\"#replaceWith\").replaceWith( val(\"<div id='replaceWith'></div>\") );\n\tequal( jQuery(\"#qunit-fixture\").find(\"div[id=replaceWith]\").length, 1, \"Make sure only one div exists.\" );\n}\n\ntest(\"replaceWith(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\ttestReplaceWith(bareObj);\n});\n\ntest(\"replaceWith(Function)\", function() {\n\ttestReplaceWith(functionReturningObj);\n\n\texpect(22);\n\n\tvar y = jQuery(\"#yahoo\")[0];\n\n\tjQuery(y).replaceWith(function(){\n\t\tequal( this, y, \"Make sure the context is coming in correctly.\" );\n\t});\n\n\tQUnit.reset();\n});\n\ntest(\"replaceWith(string) for more than one element\", function(){\n\texpect(3);\n\n\tequal(jQuery(\"#foo p\").length, 3, \"ensuring that test data has not changed\");\n\n\tjQuery(\"#foo p\").replaceWith(\"<span>bar</span>\");\n\tequal(jQuery(\"#foo span\").length, 3, \"verify that all the three original element have been replaced\");\n\tequal(jQuery(\"#foo p\").length, 0, \"verify that all the three original element have been replaced\");\n});\n\ntest(\"replaceAll(String|Element|Array&lt;Element&gt;|jQuery)\", function() {\n\texpect(10);\n\tjQuery(\"<b id='replace'>buga</b>\").replaceAll(\"#yahoo\");\n\tok( jQuery(\"#replace\")[0], \"Replace element with string\" );\n\tok( !jQuery(\"#yahoo\")[0], \"Verify that original element is gone, after string\" );\n\n\tQUnit.reset();\n\tjQuery(document.getElementById(\"first\")).replaceAll(\"#yahoo\");\n\tok( jQuery(\"#first\")[0], \"Replace element with element\" );\n\tok( !jQuery(\"#yahoo\")[0], \"Verify that original element is gone, after element\" );\n\n\tQUnit.reset();\n\tjQuery([document.getElementById(\"first\"), document.getElementById(\"mark\")]).replaceAll(\"#yahoo\");\n\tok( jQuery(\"#first\")[0], \"Replace element with array of elements\" );\n\tok( jQuery(\"#mark\")[0], \"Replace element with array of elements\" );\n\tok( !jQuery(\"#yahoo\")[0], \"Verify that original element is gone, after array of elements\" );\n\n\tQUnit.reset();\n\tjQuery(\"#mark, #first\").replaceAll(\"#yahoo\");\n\tok( jQuery(\"#first\")[0], \"Replace element with set of elements\" );\n\tok( jQuery(\"#mark\")[0], \"Replace element with set of elements\" );\n\tok( !jQuery(\"#yahoo\")[0], \"Verify that original element is gone, after set of elements\" );\n});\n\ntest(\"jQuery.clone() (#8017)\", function() {\n\n\texpect(2);\n\n\tok( jQuery.clone && jQuery.isFunction( jQuery.clone ) , \"jQuery.clone() utility exists and is a function.\");\n\n\tvar main = jQuery(\"#qunit-fixture\")[0],\n\t\t\tclone = jQuery.clone( main );\n\n\tequal( main.childNodes.length, clone.childNodes.length, \"Simple child length to ensure a large dom tree copies correctly\" );\n});\n\ntest(\"clone() (#8070)\", function () {\n\texpect(2);\n\n\tjQuery(\"<select class='test8070'></select><select class='test8070'></select>\").appendTo(\"#qunit-fixture\");\n\tvar selects = jQuery(\".test8070\");\n\tselects.append(\"<OPTION>1</OPTION><OPTION>2</OPTION>\");\n\n\tequal( selects[0].childNodes.length, 2, \"First select got two nodes\" );\n\tequal( selects[1].childNodes.length, 2, \"Second select got two nodes\" );\n\n\tselects.remove();\n});\n\ntest(\"clone()\", function() {\n\texpect(39);\n\tequal( \"This is a normal link: Yahoo\", jQuery(\"#en\").text(), \"Assert text for #en\" );\n\tvar clone = jQuery(\"#yahoo\").clone();\n\tequal( \"Try them out:Yahoo\", jQuery(\"#first\").append(clone).text(), \"Check for clone\" );\n\tequal( \"This is a normal link: Yahoo\", jQuery(\"#en\").text(), \"Reassert text for #en\" );\n\n\tvar cloneTags = [\n\t\t\"<table/>\", \"<tr/>\", \"<td/>\", \"<div/>\",\n\t\t\"<button/>\", \"<ul/>\", \"<ol/>\", \"<li/>\",\n\t\t\"<input type='checkbox' />\", \"<select/>\", \"<option/>\", \"<textarea/>\",\n\t\t\"<tbody/>\", \"<thead/>\", \"<tfoot/>\", \"<iframe/>\"\n\t];\n\tfor (var i = 0; i < cloneTags.length; i++) {\n\t\tvar j = jQuery(cloneTags[i]);\n\t\tequal( j[0].tagName, j.clone()[0].tagName, \"Clone a \" + cloneTags[i]);\n\t}\n\n\t// using contents will get comments regular, text, and comment nodes\n\tvar cl = jQuery(\"#nonnodes\").contents().clone();\n\tok( cl.length >= 2, \"Check node,textnode,comment clone works (some browsers delete comments on clone)\" );\n\n\tvar div = jQuery(\"<div><ul><li>test</li></ul></div>\").click(function(){\n\t\tok( true, \"Bound event still exists.\" );\n\t});\n\n\tclone = div.clone(true);\n\n\t// manually clean up detached elements\n\tdiv.remove();\n\n\tdiv = clone.clone(true);\n\n\t// manually clean up detached elements\n\tclone.remove();\n\n\tequal( div.length, 1, \"One element cloned\" );\n\tequal( div[0].nodeName.toUpperCase(), \"DIV\", \"DIV element cloned\" );\n\tdiv.trigger(\"click\");\n\n\t// manually clean up detached elements\n\tdiv.remove();\n\n\tdiv = jQuery(\"<div/>\").append([ document.createElement(\"table\"), document.createElement(\"table\") ]);\n\tdiv.find(\"table\").click(function(){\n\t\tok( true, \"Bound event still exists.\" );\n\t});\n\n\tclone = div.clone(true);\n\tequal( clone.length, 1, \"One element cloned\" );\n\tequal( clone[0].nodeName.toUpperCase(), \"DIV\", \"DIV element cloned\" );\n\tclone.find(\"table:last\").trigger(\"click\");\n\n\t// manually clean up detached elements\n\tdiv.remove();\n\tclone.remove();\n\n\tvar divEvt = jQuery(\"<div><ul><li>test</li></ul></div>\").click(function(){\n\t\tok( false, \"Bound event still exists after .clone().\" );\n\t}),\n\t\tcloneEvt = divEvt.clone();\n\n\t// Make sure that doing .clone() doesn't clone events\n\tcloneEvt.trigger(\"click\");\n\n\tcloneEvt.remove();\n\tdivEvt.remove();\n\n\t// Test both html() and clone() for <embed and <object types\n\tdiv = jQuery(\"<div/>\").html('<embed height=\"355\" width=\"425\" src=\"http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en\"></embed>');\n\n\tclone = div.clone(true);\n\tequal( clone.length, 1, \"One element cloned\" );\n\tequal( clone.html(), div.html(), \"Element contents cloned\" );\n\tequal( clone[0].nodeName.toUpperCase(), \"DIV\", \"DIV element cloned\" );\n\n\t// this is technically an invalid object, but because of the special\n\t// classid instantiation it is the only kind that IE has trouble with,\n\t// so let's test with it too.\n\tdiv = jQuery(\"<div/>\").html(\"<object height='355' width='425' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'>  <param name='movie' value='http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en'>  <param name='wmode' value='transparent'> </object>\");\n\n\tclone = div.clone(true);\n\tequal( clone.length, 1, \"One element cloned\" );\n\t// equal( clone.html(), div.html(), \"Element contents cloned\" );\n\tequal( clone[0].nodeName.toUpperCase(), \"DIV\", \"DIV element cloned\" );\n\n\t// and here's a valid one.\n\tdiv = jQuery(\"<div/>\").html(\"<object height='355' width='425' type='application/x-shockwave-flash' data='http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en'>  <param name='movie' value='http://www.youtube.com/v/3KANI2dpXLw&amp;hl=en'>  <param name='wmode' value='transparent'> </object>\");\n\n\tclone = div.clone(true);\n\tequal( clone.length, 1, \"One element cloned\" );\n\tequal( clone.html(), div.html(), \"Element contents cloned\" );\n\tequal( clone[0].nodeName.toUpperCase(), \"DIV\", \"DIV element cloned\" );\n\n\tdiv = jQuery(\"<div/>\").data({ a: true });\n\tclone = div.clone(true);\n\tequal( clone.data(\"a\"), true, \"Data cloned.\" );\n\tclone.data(\"a\", false);\n\tequal( clone.data(\"a\"), false, \"Ensure cloned element data object was correctly modified\" );\n\tequal( div.data(\"a\"), true, \"Ensure cloned element data object is copied, not referenced\" );\n\n\t// manually clean up detached elements\n\tdiv.remove();\n\tclone.remove();\n\n\tvar form = document.createElement(\"form\");\n\tform.action = \"/test/\";\n\tvar div = document.createElement(\"div\");\n\tdiv.appendChild( document.createTextNode(\"test\") );\n\tform.appendChild( div );\n\n\tequal( jQuery(form).clone().children().length, 1, \"Make sure we just get the form back.\" );\n\n\tequal( jQuery(\"body\").clone().children()[0].id, \"qunit-header\", \"Make sure cloning body works\" );\n});\n\ntest(\"clone(form element) (Bug #3879, #6655)\", function() {\n\texpect(5);\n\tvar element = jQuery(\"<select><option>Foo</option><option selected>Bar</option></select>\");\n\n\tequal( element.clone().find(\"option:selected\").val(), element.find(\"option:selected\").val(), \"Selected option cloned correctly\" );\n\n\telement = jQuery(\"<input type='checkbox' value='foo'>\").attr(\"checked\", \"checked\");\n\tclone = element.clone();\n\n\tequal( clone.is(\":checked\"), element.is(\":checked\"), \"Checked input cloned correctly\" );\n\tequal( clone[0].defaultValue, \"foo\", \"Checked input defaultValue cloned correctly\" );\n\n\t// defaultChecked also gets set now due to setAttribute in attr, is this check still valid?\n\t// equal( clone[0].defaultChecked, !jQuery.support.noCloneChecked, \"Checked input defaultChecked cloned correctly\" );\n\n\telement = jQuery(\"<input type='text' value='foo'>\");\n\tclone = element.clone();\n\tequal( clone[0].defaultValue, \"foo\", \"Text input defaultValue cloned correctly\" );\n\n\telement = jQuery(\"<textarea>foo</textarea>\");\n\tclone = element.clone();\n\tequal( clone[0].defaultValue, \"foo\", \"Textarea defaultValue cloned correctly\" );\n});\n\ntest(\"clone(multiple selected options) (Bug #8129)\", function() {\n\texpect(1);\n\tvar element = jQuery(\"<select><option>Foo</option><option selected>Bar</option><option selected>Baz</option></select>\");\n\n\tequal( element.clone().find(\"option:selected\").length, element.find(\"option:selected\").length, \"Multiple selected options cloned correctly\" );\n\n});\n\nif (!isLocal) {\ntest(\"clone() on XML nodes\", function() {\n\texpect(2);\n\tstop();\n\tjQuery.get(\"data/dashboard.xml\", function (xml) {\n\t\tvar root = jQuery(xml.documentElement).clone();\n\t\tvar origTab = jQuery(\"tab\", xml).eq(0);\n\t\tvar cloneTab = jQuery(\"tab\", root).eq(0);\n\t\torigTab.text(\"origval\");\n\t\tcloneTab.text(\"cloneval\");\n\t\tequal(origTab.text(), \"origval\", \"Check original XML node was correctly set\");\n\t\tequal(cloneTab.text(), \"cloneval\", \"Check cloned XML node was correctly set\");\n\t\tstart();\n\t});\n});\n}\n\nvar testHtml = function(valueObj) {\n\texpect(34);\n\n\tjQuery.scriptorder = 0;\n\n\tvar div = jQuery(\"#qunit-fixture > div\");\n\tdiv.html(valueObj(\"<b>test</b>\"));\n\tvar pass = true;\n\tfor ( var i = 0; i < div.size(); i++ ) {\n\t\tif ( div.get(i).childNodes.length != 1 ) pass = false;\n\t}\n\tok( pass, \"Set HTML\" );\n\n\tdiv = jQuery(\"<div/>\").html( valueObj(\"<div id='parent_1'><div id='child_1'/></div><div id='parent_2'/>\") );\n\n\tequal( div.children().length, 2, \"Make sure two child nodes exist.\" );\n\tequal( div.children().children().length, 1, \"Make sure that a grandchild exists.\" );\n\n\tvar space = jQuery(\"<div/>\").html(valueObj(\"&#160;\"))[0].innerHTML;\n\tok( /^\\xA0$|^&nbsp;$/.test( space ), \"Make sure entities are passed through correctly.\" );\n\tequal( jQuery(\"<div/>\").html(valueObj(\"&amp;\"))[0].innerHTML, \"&amp;\", \"Make sure entities are passed through correctly.\" );\n\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"<style>.foobar{color:green;}</style>\"));\n\n\tequal( jQuery(\"#qunit-fixture\").children().length, 1, \"Make sure there is a child element.\" );\n\tequal( jQuery(\"#qunit-fixture\").children()[0].nodeName.toUpperCase(), \"STYLE\", \"And that a style element was inserted.\" );\n\n\tQUnit.reset();\n\t// using contents will get comments regular, text, and comment nodes\n\tvar j = jQuery(\"#nonnodes\").contents();\n\tj.html(valueObj(\"<b>bold</b>\"));\n\n\t// this is needed, or the expando added by jQuery unique will yield a different html\n\tj.find(\"b\").removeData();\n\tequal( j.html().replace(/ xmlns=\"[^\"]+\"/g, \"\").toLowerCase(), \"<b>bold</b>\", \"Check node,textnode,comment with html()\" );\n\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"<select/>\"));\n\tjQuery(\"#qunit-fixture select\").html(valueObj(\"<option>O1</option><option selected='selected'>O2</option><option>O3</option>\"));\n\tequal( jQuery(\"#qunit-fixture select\").val(), \"O2\", \"Selected option correct\" );\n\n\tvar $div = jQuery(\"<div />\");\n\tequal( $div.html(valueObj( 5 )).html(), \"5\", \"Setting a number as html\" );\n\tequal( $div.html(valueObj( 0 )).html(), \"0\", \"Setting a zero as html\" );\n\n\tvar $div2 = jQuery(\"<div/>\"), insert = \"&lt;div&gt;hello1&lt;/div&gt;\";\n\tequal( $div2.html(insert).html().replace(/>/g, \"&gt;\"), insert, \"Verify escaped insertion.\" );\n\tequal( $div2.html(\"x\" + insert).html().replace(/>/g, \"&gt;\"), \"x\" + insert, \"Verify escaped insertion.\" );\n\tequal( $div2.html(\" \" + insert).html().replace(/>/g, \"&gt;\"), \" \" + insert, \"Verify escaped insertion.\" );\n\n\tvar map = jQuery(\"<map/>\").html(valueObj(\"<area id='map01' shape='rect' coords='50,50,150,150' href='http://www.jquery.com/' alt='jQuery'>\"));\n\n\tequal( map[0].childNodes.length, 1, \"The area was inserted.\" );\n\tequal( map[0].firstChild.nodeName.toLowerCase(), \"area\", \"The area was inserted.\" );\n\n\tQUnit.reset();\n\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"<script type='something/else'>ok( false, 'Non-script evaluated.' );</script><script type='text/javascript'>ok( true, 'text/javascript is evaluated.' );</script><script>ok( true, 'No type is evaluated.' );</script><div><script type='text/javascript'>ok( true, 'Inner text/javascript is evaluated.' );</script><script>ok( true, 'Inner No type is evaluated.' );</script><script type='something/else'>ok( false, 'Non-script evaluated.' );</script></div>\"));\n\n\tvar child = jQuery(\"#qunit-fixture\").find(\"script\");\n\n\tequal( child.length, 2, \"Make sure that two non-JavaScript script tags are left.\" );\n\tequal( child[0].type, \"something/else\", \"Verify type of script tag.\" );\n\tequal( child[1].type, \"something/else\", \"Verify type of script tag.\" );\n\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"<script>ok( true, 'Test repeated injection of script.' );</script>\"));\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"<script>ok( true, 'Test repeated injection of script.' );</script>\"));\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"<script>ok( true, 'Test repeated injection of script.' );</script>\"));\n\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"<script type='text/javascript'>ok( true, 'jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (1)' );</script>\"));\n\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"foo <form><script type='text/javascript'>ok( true, 'jQuery().html().evalScripts() Evals Scripts Twice in Firefox, see #975 (2)' );</script></form>\"));\n\n\tjQuery(\"#qunit-fixture\").html(valueObj(\"<script>equal(jQuery.scriptorder++, 0, 'Script is executed in order');equal(jQuery('#scriptorder').length, 1,'Execute after html (even though appears before)')<\\/script><span id='scriptorder'><script>equal(jQuery.scriptorder++, 1, 'Script (nested) is executed in order');equal(jQuery('#scriptorder').length, 1,'Execute after html')<\\/script></span><script>equal(jQuery.scriptorder++, 2, 'Script (unnested) is executed in order');equal(jQuery('#scriptorder').length, 1,'Execute after html')<\\/script>\"));\n}\n\ntest(\"html(String)\", function() {\n\ttestHtml(bareObj);\n});\n\ntest(\"html(Function)\", function() {\n\ttestHtml(functionReturningObj);\n\n\texpect(36);\n\n\tQUnit.reset();\n\n\tjQuery(\"#qunit-fixture\").html(function(){\n\t\treturn jQuery(this).text();\n\t});\n\n\tok( !/</.test( jQuery(\"#qunit-fixture\").html() ), \"Replace html with text.\" );\n\tok( jQuery(\"#qunit-fixture\").html().length > 0, \"Make sure text exists.\" );\n});\n\ntest(\"html(Function) with incoming value\", function() {\n\texpect(20);\n\n\tvar div = jQuery(\"#qunit-fixture > div\"), old = div.map(function(){ return jQuery(this).html() });\n\n\tdiv.html(function(i, val) {\n\t\tequal( val, old[i], \"Make sure the incoming value is correct.\" );\n\t\treturn \"<b>test</b>\";\n\t});\n\n\tvar pass = true;\n\tdiv.each(function(){\n\t\tif ( this.childNodes.length !== 1 ) {\n\t\t\tpass = false;\n\t\t}\n\t})\n\tok( pass, \"Set HTML\" );\n\n\tQUnit.reset();\n\t// using contents will get comments regular, text, and comment nodes\n\tvar j = jQuery(\"#nonnodes\").contents();\n\told = j.map(function(){ return jQuery(this).html(); });\n\n\tj.html(function(i, val) {\n\t\tequal( val, old[i], \"Make sure the incoming value is correct.\" );\n\t\treturn \"<b>bold</b>\";\n\t});\n\n\t// Handle the case where no comment is in the document\n\tif ( j.length === 2 ) {\n\t\tequal( null, null, \"Make sure the incoming value is correct.\" );\n\t}\n\n\tj.find(\"b\").removeData();\n\tequal( j.html().replace(/ xmlns=\"[^\"]+\"/g, \"\").toLowerCase(), \"<b>bold</b>\", \"Check node,textnode,comment with html()\" );\n\n\tvar $div = jQuery(\"<div />\");\n\n\tequal( $div.html(function(i, val) {\n\t\tequal( val, \"\", \"Make sure the incoming value is correct.\" );\n\t\treturn 5;\n\t}).html(), \"5\", \"Setting a number as html\" );\n\n\tequal( $div.html(function(i, val) {\n\t\tequal( val, \"5\", \"Make sure the incoming value is correct.\" );\n\t\treturn 0;\n\t}).html(), \"0\", \"Setting a zero as html\" );\n\n\tvar $div2 = jQuery(\"<div/>\"), insert = \"&lt;div&gt;hello1&lt;/div&gt;\";\n\tequal( $div2.html(function(i, val) {\n\t\tequal( val, \"\", \"Make sure the incoming value is correct.\" );\n\t\treturn insert;\n\t}).html().replace(/>/g, \"&gt;\"), insert, \"Verify escaped insertion.\" );\n\n\tequal( $div2.html(function(i, val) {\n\t\tequal( val.replace(/>/g, \"&gt;\"), insert, \"Make sure the incoming value is correct.\" );\n\t\treturn \"x\" + insert;\n\t}).html().replace(/>/g, \"&gt;\"), \"x\" + insert, \"Verify escaped insertion.\" );\n\n\tequal( $div2.html(function(i, val) {\n\t\tequal( val.replace(/>/g, \"&gt;\"), \"x\" + insert, \"Make sure the incoming value is correct.\" );\n\t\treturn \" \" + insert;\n\t}).html().replace(/>/g, \"&gt;\"), \" \" + insert, \"Verify escaped insertion.\" );\n});\n\nvar testRemove = function(method) {\n\texpect(9);\n\n\tvar first = jQuery(\"#ap\").children(\":first\");\n\tfirst.data(\"foo\", \"bar\");\n\n\tjQuery(\"#ap\").children()[method]();\n\tok( jQuery(\"#ap\").text().length > 10, \"Check text is not removed\" );\n\tequal( jQuery(\"#ap\").children().length, 0, \"Check remove\" );\n\n\tequal( first.data(\"foo\"), method == \"remove\" ? null : \"bar\" );\n\n\tQUnit.reset();\n\tjQuery(\"#ap\").children()[method](\"a\");\n\tok( jQuery(\"#ap\").text().length > 10, \"Check text is not removed\" );\n\tequal( jQuery(\"#ap\").children().length, 1, \"Check filtered remove\" );\n\n\tjQuery(\"#ap\").children()[method](\"a, code\");\n\tequal( jQuery(\"#ap\").children().length, 0, \"Check multi-filtered remove\" );\n\n\t// using contents will get comments regular, text, and comment nodes\n\t// Handle the case where no comment is in the document\n\tok( jQuery(\"#nonnodes\").contents().length >= 2, \"Check node,textnode,comment remove works\" );\n\tjQuery(\"#nonnodes\").contents()[method]();\n\tequal( jQuery(\"#nonnodes\").contents().length, 0, \"Check node,textnode,comment remove works\" );\n\n\t// manually clean up detached elements\n\tif (method === \"detach\") {\n\t\tfirst.remove();\n\t}\n\n\tQUnit.reset();\n\n\tvar count = 0;\n\tvar first = jQuery(\"#ap\").children(\":first\");\n\tvar cleanUp = first.click(function() { count++ })[method]().appendTo(\"#qunit-fixture\").click();\n\n\tequal( method == \"remove\" ? 0 : 1, count );\n\n\t// manually clean up detached elements\n\tcleanUp.remove();\n};\n\ntest(\"remove()\", function() {\n\ttestRemove(\"remove\");\n});\n\ntest(\"detach()\", function() {\n\ttestRemove(\"detach\");\n});\n\ntest(\"empty()\", function() {\n\texpect(3);\n\tequal( jQuery(\"#ap\").children().empty().text().length, 0, \"Check text is removed\" );\n\tequal( jQuery(\"#ap\").children().length, 4, \"Check elements are not removed\" );\n\n\t// using contents will get comments regular, text, and comment nodes\n\tvar j = jQuery(\"#nonnodes\").contents();\n\tj.empty();\n\tequal( j.html(), \"\", \"Check node,textnode,comment empty works\" );\n});\n\ntest(\"jQuery.cleanData\", function() {\n\texpect(14);\n\n\tvar type, pos, div, child;\n\n\ttype = \"remove\";\n\n\t// Should trigger 4 remove event\n\tdiv = getDiv().remove();\n\n\t// Should both do nothing\n\tpos = \"Outer\";\n\tdiv.trigger(\"click\");\n\n\tpos = \"Inner\";\n\tdiv.children().trigger(\"click\");\n\n\ttype = \"empty\";\n\tdiv = getDiv();\n\tchild = div.children();\n\n\t// Should trigger 2 remove event\n\tdiv.empty();\n\n\t// Should trigger 1\n\tpos = \"Outer\";\n\tdiv.trigger(\"click\");\n\n\t// Should do nothing\n\tpos = \"Inner\";\n\tchild.trigger(\"click\");\n\n\t// Should trigger 2\n\tdiv.remove();\n\n\ttype = \"html\";\n\n\tdiv = getDiv();\n\tchild = div.children();\n\n\t// Should trigger 2 remove event\n\tdiv.html(\"<div></div>\");\n\n\t// Should trigger 1\n\tpos = \"Outer\";\n\tdiv.trigger(\"click\");\n\n\t// Should do nothing\n\tpos = \"Inner\";\n\tchild.trigger(\"click\");\n\n\t// Should trigger 2\n\tdiv.remove();\n\n\tfunction getDiv() {\n\t\tvar div = jQuery(\"<div class='outer'><div class='inner'></div></div>\").click(function(){\n\t\t\tok( true, type + \" \" + pos + \" Click event fired.\" );\n\t\t}).focus(function(){\n\t\t\tok( true, type + \" \" + pos + \" Focus event fired.\" );\n\t\t}).find(\"div\").click(function(){\n\t\t\tok( false, type + \" \" + pos + \" Click event fired.\" );\n\t\t}).focus(function(){\n\t\t\tok( false, type + \" \" + pos + \" Focus event fired.\" );\n\t\t}).end().appendTo(\"body\");\n\n\t\tdiv[0].detachEvent = div[0].removeEventListener = function(t){\n\t\t\tok( true, type + \" Outer \" + t + \" event unbound\" );\n\t\t};\n\n\t\tdiv[0].firstChild.detachEvent = div[0].firstChild.removeEventListener = function(t){\n\t\t\tok( true, type + \" Inner \" + t + \" event unbound\" );\n\t\t};\n\n\t\treturn div;\n\t}\n});\n\ntest(\"jQuery.buildFragment - no plain-text caching (Bug #6779)\", function() {\n\texpect(1);\n\n\t// DOM manipulation fails if added text matches an Object method\n\tvar $f = jQuery( \"<div />\" ).appendTo( \"#qunit-fixture\" ),\n\t\tbad = [ \"start-\", \"toString\", \"hasOwnProperty\", \"append\", \"here&there!\", \"-end\" ];\n\n\tfor ( var i=0; i < bad.length; i++ ) {\n\t\ttry {\n\t\t\t$f.append( bad[i] );\n\t\t}\n\t\tcatch(e) {}\n\t}\n\tequal($f.text(), bad.join(\"\"), \"Cached strings that match Object properties\");\n\t$f.remove();\n});\n\ntest( \"jQuery.html - execute scripts escaped with html comment or CDATA (#9221)\", function() {\n\texpect( 3 );\n\tjQuery( [\n\t         '<script type=\"text/javascript\">',\n\t         '<!--',\n\t         'ok( true, \"<!-- handled\" );',\n\t         '//-->',\n\t         '</script>'\n\t     ].join ( \"\\n\" ) ).appendTo( \"#qunit-fixture\" );\n\tjQuery( [\n\t         '<script type=\"text/javascript\">',\n\t         '<![CDATA[',\n\t         'ok( true, \"<![CDATA[ handled\" );',\n\t         '//]]>',\n\t         '</script>'\n\t     ].join ( \"\\n\" ) ).appendTo( \"#qunit-fixture\" );\n\tjQuery( [\n\t         '<script type=\"text/javascript\">',\n\t         '<!--//--><![CDATA[//><!--',\n\t         'ok( true, \"<!--//--><![CDATA[//><!-- (Drupal case) handled\" );',\n\t         '//--><!]]>',\n\t         '</script>'\n\t     ].join ( \"\\n\" ) ).appendTo( \"#qunit-fixture\" );\n});\n\ntest(\"jQuery.buildFragment - plain objects are not a document #8950\", function() {\n\texpect(1);\n\n\ttry {\n\t\tjQuery('<input type=\"hidden\">', {});\n\t\tok( true, \"Does not allow attribute object to be treated like a doc object\");\n\t} catch (e) {}\n\n});\n\ntest(\"jQuery.clone - no exceptions for object elements #9587\", function() {\n\texpect(1);\n\n\ttry {\n\t\tjQuery(\"#no-clone-exception\").clone();\n\t\tok( true, \"cloned with no exceptions\" );\n\t} catch( e ) {\n\t\tok( false, e.message );\n\t}\n});\n\ntest(\"jQuery(<tag>) & wrap[Inner/All]() handle unknown elems (#10667)\", function() {\n\texpect(2);\n\n\tvar $wraptarget = jQuery( \"<div id='wrap-target'>Target</div>\" ).appendTo( \"#qunit-fixture\" ),\n\t\t\t$section = jQuery( \"<section>\" ).appendTo( \"#qunit-fixture\" );\n\n\t$wraptarget.wrapAll(\"<aside style='background-color:green'></aside>\");\n\n\tnotEqual( $wraptarget.parent(\"aside\").css(\"background-color\"), \"transparent\", \"HTML5 elements created with wrapAll inherit styles\" );\n\tnotEqual( $section.css(\"background-color\"), \"transparent\", \"HTML5 elements create with jQuery( string ) inherit styles\" );\n});\n\ntest(\"Cloned, detached HTML5 elems (#10667,10670)\", function() {\n\texpect(7);\n\n\tvar $section = jQuery( \"<section>\" ).appendTo( \"#qunit-fixture\" ),\n\t\t\t$clone;\n\n\t// First clone\n\t$clone = $section.clone();\n\n\t// Infer that the test is being run in IE<=8\n\tif ( $clone[0].outerHTML && !jQuery.support.opacity ) {\n\t\t// This branch tests cloning nodes by reading the outerHTML, used only in IE<=8\n\t\tequal( $clone[0].outerHTML, \"<section></section>\", \"detached clone outerHTML matches '<section></section>'\" );\n\t} else {\n\t\t// This branch tests a known behaviour in modern browsers that should never fail.\n\t\t// Included for expected test count symmetry (expecting 1)\n\t\tequal( $clone[0].nodeName, \"SECTION\", \"detached clone nodeName matches 'SECTION' in modern browsers\" );\n\t}\n\n\t// Bind an event\n\t$section.bind( \"click\", function( event ) {\n\t\tok( true, \"clone fired event\" );\n\t});\n\n\t// Second clone (will have an event bound)\n\t$clone = $section.clone( true );\n\n\t// Trigger an event from the first clone\n\t$clone.trigger( \"click\" );\n\t$clone.unbind( \"click\" );\n\n\t// Add a child node with text to the original\n\t$section.append( \"<p>Hello</p>\" );\n\n\t// Third clone (will have child node and text)\n\t$clone = $section.clone( true );\n\n\tequal( $clone.find(\"p\").text(), \"Hello\", \"Assert text in child of clone\" );\n\n\t// Trigger an event from the third clone\n\t$clone.trigger( \"click\" );\n\t$clone.unbind( \"click\" );\n\n\t// Add attributes to copy\n\t$section.attr({\n\t\t\"class\": \"foo bar baz\",\n\t\t\"title\": \"This is a title\"\n\t});\n\n\t// Fourth clone (will have newly added attributes)\n\t$clone = $section.clone( true );\n\n\tequal( $clone.attr(\"class\"), $section.attr(\"class\"), \"clone and element have same class attribute\" );\n\tequal( $clone.attr(\"title\"), $section.attr(\"title\"), \"clone and element have same title attribute\" );\n\n\t// Remove the original\n\t$section.remove();\n\n\t// Clone the clone\n\t$section = $clone.clone( true );\n\n\t// Remove the clone\n\t$clone.remove();\n\n\t// Trigger an event from the clone of the clone\n\t$section.trigger( \"click\" );\n\n\t// Unbind any remaining events\n\t$section.unbind( \"click\" );\n\t$clone.unbind( \"click\" );\n});\n\ntest(\"jQuery.fragments cache expectations\", function() {\n\n\texpect( 10 );\n\n\tjQuery.fragments = {};\n\n\tfunction fragmentCacheSize() {\n\t\tvar n = 0, c;\n\n\t\tfor ( c in jQuery.fragments ) {\n\t\t\tn++;\n\t\t}\n\t\treturn n;\n\t}\n\n\tjQuery(\"<li></li>\");\n\tjQuery(\"<li>?</li>\");\n\tjQuery(\"<li>whip</li>\");\n\tjQuery(\"<li>it</li>\");\n\tjQuery(\"<li>good</li>\");\n\tjQuery(\"<div></div>\");\n\tjQuery(\"<div><div><span></span></div></div>\");\n\tjQuery(\"<tr><td></td></tr>\");\n\tjQuery(\"<tr><td></tr>\");\n\tjQuery(\"<li>aaa</li>\");\n\tjQuery(\"<ul><li>?</li></ul>\");\n\tjQuery(\"<div><p>arf</p>nnn</div>\");\n\tjQuery(\"<div><p>dog</p>?</div>\");\n\tjQuery(\"<span><span>\");\n\n\tequal( fragmentCacheSize(), 12, \"12 entries exist in jQuery.fragments, 1\" );\n\n\tjQuery.each( [\n\t\t\"<tr><td></td></tr>\",\n\t\t\"<ul><li>?</li></ul>\",\n\t\t\"<div><p>dog</p>?</div>\",\n\t\t\"<span><span>\"\n\t], function( i, frag ) {\n\n\t\tjQuery( frag );\n\n\t\tequal( jQuery.fragments[ frag ].nodeType, 11, \"Second call with \" + frag + \" creates a cached DocumentFragment, has nodeType 11\" );\n\t\tok( jQuery.fragments[ frag ].childNodes.length, \"Second call with \" + frag + \" creates a cached DocumentFragment, has childNodes with length\" );\n\t});\n\n\tequal( fragmentCacheSize(), 12, \"12 entries exist in jQuery.fragments, 2\" );\n});\n"
  },
  {
    "path": "test/jquery-1.7.1/unit/traversing.js",
    "content": "module(\"traversing\", { teardown: moduleTeardown });\n\ntest(\"find(String)\", function() {\n\texpect(5);\n\tequal( \"Yahoo\", jQuery(\"#foo\").find(\".blogTest\").text(), \"Check for find\" );\n\n\t// using contents will get comments regular, text, and comment nodes\n\tvar j = jQuery(\"#nonnodes\").contents();\n\tequal( j.find(\"div\").length, 0, \"Check node,textnode,comment to find zero divs\" );\n\n\tdeepEqual( jQuery(\"#qunit-fixture\").find(\"> div\").get(), q(\"foo\", \"moretests\", \"tabindex-tests\", \"liveHandlerOrder\", \"siblingTest\"), \"find child elements\" );\n\tdeepEqual( jQuery(\"#qunit-fixture\").find(\"> #foo, > #moretests\").get(), q(\"foo\", \"moretests\"), \"find child elements\" );\n\tdeepEqual( jQuery(\"#qunit-fixture\").find(\"> #foo > p\").get(), q(\"sndp\", \"en\", \"sap\"), \"find child elements\" );\n});\n\ntest(\"find(node|jQuery object)\", function() {\n\texpect( 11 );\n\n\tvar $foo = jQuery(\"#foo\"),\n\t\t$blog = jQuery(\".blogTest\"),\n\t\t$first = jQuery(\"#first\"),\n\t\t$two = $blog.add( $first ),\n\t\t$fooTwo = $foo.add( $blog );\n\n\tequal( $foo.find( $blog ).text(), \"Yahoo\", \"Find with blog jQuery object\" );\n\tequal( $foo.find( $blog[0] ).text(), \"Yahoo\", \"Find with blog node\" );\n\tequal( $foo.find( $first ).length, 0, \"#first is not in #foo\" );\n\tequal( $foo.find( $first[0]).length, 0, \"#first not in #foo (node)\" );\n\tok( $foo.find( $two ).is(\".blogTest\"), \"Find returns only nodes within #foo\" );\n\tok( $fooTwo.find( $blog ).is(\".blogTest\"), \"Blog is part of the collection, but also within foo\" );\n\tok( $fooTwo.find( $blog[0] ).is(\".blogTest\"), \"Blog is part of the collection, but also within foo(node)\" );\n\n\tequal( $two.find( $foo ).length, 0, \"Foo is not in two elements\" );\n\tequal( $two.find( $foo[0] ).length, 0, \"Foo is not in two elements(node)\" );\n\tequal( $two.find( $first ).length, 0, \"first is in the collection and not within two\" );\n\tequal( $two.find( $first ).length, 0, \"first is in the collection and not within two(node)\" );\n\n});\n\ntest(\"is(String|undefined)\", function() {\n\texpect(29);\n\tok( jQuery(\"#form\").is(\"form\"), \"Check for element: A form must be a form\" );\n\tok( !jQuery(\"#form\").is(\"div\"), \"Check for element: A form is not a div\" );\n\tok( jQuery(\"#mark\").is(\".blog\"), \"Check for class: Expected class 'blog'\" );\n\tok( !jQuery(\"#mark\").is(\".link\"), \"Check for class: Did not expect class 'link'\" );\n\tok( jQuery(\"#simon\").is(\".blog.link\"), \"Check for multiple classes: Expected classes 'blog' and 'link'\" );\n\tok( !jQuery(\"#simon\").is(\".blogTest\"), \"Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'\" );\n\tok( jQuery(\"#en\").is(\"[lang=\\\"en\\\"]\"), \"Check for attribute: Expected attribute lang to be 'en'\" );\n\tok( !jQuery(\"#en\").is(\"[lang=\\\"de\\\"]\"), \"Check for attribute: Expected attribute lang to be 'en', not 'de'\" );\n\tok( jQuery(\"#text1\").is(\"[type=\\\"text\\\"]\"), \"Check for attribute: Expected attribute type to be 'text'\" );\n\tok( !jQuery(\"#text1\").is(\"[type=\\\"radio\\\"]\"), \"Check for attribute: Expected attribute type to be 'text', not 'radio'\" );\n\tok( jQuery(\"#text2\").is(\":disabled\"), \"Check for pseudoclass: Expected to be disabled\" );\n\tok( !jQuery(\"#text1\").is(\":disabled\"), \"Check for pseudoclass: Expected not disabled\" );\n\tok( jQuery(\"#radio2\").is(\":checked\"), \"Check for pseudoclass: Expected to be checked\" );\n\tok( !jQuery(\"#radio1\").is(\":checked\"), \"Check for pseudoclass: Expected not checked\" );\n\tok( jQuery(\"#foo\").is(\":has(p)\"), \"Check for child: Expected a child 'p' element\" );\n\tok( !jQuery(\"#foo\").is(\":has(ul)\"), \"Check for child: Did not expect 'ul' element\" );\n\tok( jQuery(\"#foo\").is(\":has(p):has(a):has(code)\"), \"Check for childs: Expected 'p', 'a' and 'code' child elements\" );\n\tok( !jQuery(\"#foo\").is(\":has(p):has(a):has(code):has(ol)\"), \"Check for childs: Expected 'p', 'a' and 'code' child elements, but no 'ol'\" );\n\n\tok( !jQuery(\"#foo\").is(0), \"Expected false for an invalid expression - 0\" );\n\tok( !jQuery(\"#foo\").is(null), \"Expected false for an invalid expression - null\" );\n\tok( !jQuery(\"#foo\").is(\"\"), \"Expected false for an invalid expression - \\\"\\\"\" );\n\tok( !jQuery(\"#foo\").is(undefined), \"Expected false for an invalid expression - undefined\" );\n\tok( !jQuery(\"#foo\").is({ plain: \"object\" }), \"Check passing invalid object\" );\n\n\t// test is() with comma-seperated expressions\n\tok( jQuery(\"#en\").is(\"[lang=\\\"en\\\"],[lang=\\\"de\\\"]\"), \"Comma-seperated; Check for lang attribute: Expect en or de\" );\n\tok( jQuery(\"#en\").is(\"[lang=\\\"de\\\"],[lang=\\\"en\\\"]\"), \"Comma-seperated; Check for lang attribute: Expect en or de\" );\n\tok( jQuery(\"#en\").is(\"[lang=\\\"en\\\"] , [lang=\\\"de\\\"]\"), \"Comma-seperated; Check for lang attribute: Expect en or de\" );\n\tok( jQuery(\"#en\").is(\"[lang=\\\"de\\\"] , [lang=\\\"en\\\"]\"), \"Comma-seperated; Check for lang attribute: Expect en or de\" );\n\n\tok( !jQuery(window).is('a'), \"Checking is on a window does not throw an exception(#10178)\" );\n\tok( !jQuery(document).is('a'), \"Checking is on a document does not throw an exception(#10178)\" );\n});\n\ntest(\"is(jQuery)\", function() {\n\texpect(21);\n\tok( jQuery(\"#form\").is( jQuery(\"form\") ), \"Check for element: A form is a form\" );\n\tok( !jQuery(\"#form\").is( jQuery(\"div\") ), \"Check for element: A form is not a div\" );\n\tok( jQuery(\"#mark\").is( jQuery(\".blog\") ), \"Check for class: Expected class 'blog'\" );\n\tok( !jQuery(\"#mark\").is( jQuery(\".link\") ), \"Check for class: Did not expect class 'link'\" );\n\tok( jQuery(\"#simon\").is( jQuery(\".blog.link\") ), \"Check for multiple classes: Expected classes 'blog' and 'link'\" );\n\tok( !jQuery(\"#simon\").is( jQuery(\".blogTest\") ), \"Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'\" );\n\tok( jQuery(\"#en\").is( jQuery(\"[lang=\\\"en\\\"]\") ), \"Check for attribute: Expected attribute lang to be 'en'\" );\n\tok( !jQuery(\"#en\").is( jQuery(\"[lang=\\\"de\\\"]\") ), \"Check for attribute: Expected attribute lang to be 'en', not 'de'\" );\n\tok( jQuery(\"#text1\").is( jQuery(\"[type=\\\"text\\\"]\") ), \"Check for attribute: Expected attribute type to be 'text'\" );\n\tok( !jQuery(\"#text1\").is( jQuery(\"[type=\\\"radio\\\"]\") ), \"Check for attribute: Expected attribute type to be 'text', not 'radio'\" );\n\tok( !jQuery(\"#text1\").is( jQuery(\"input:disabled\") ), \"Check for pseudoclass: Expected not disabled\" );\n\tok( jQuery(\"#radio2\").is( jQuery(\"input:checked\") ), \"Check for pseudoclass: Expected to be checked\" );\n\tok( !jQuery(\"#radio1\").is( jQuery(\"input:checked\") ), \"Check for pseudoclass: Expected not checked\" );\n\tok( jQuery(\"#foo\").is( jQuery(\"div:has(p)\") ), \"Check for child: Expected a child 'p' element\" );\n\tok( !jQuery(\"#foo\").is( jQuery(\"div:has(ul)\") ), \"Check for child: Did not expect 'ul' element\" );\n\n\t// Some raw elements\n\tok( jQuery(\"#form\").is( jQuery(\"form\")[0] ), \"Check for element: A form is a form\" );\n\tok( !jQuery(\"#form\").is( jQuery(\"div\")[0] ), \"Check for element: A form is not a div\" );\n\tok( jQuery(\"#mark\").is( jQuery(\".blog\")[0] ), \"Check for class: Expected class 'blog'\" );\n\tok( !jQuery(\"#mark\").is( jQuery(\".link\")[0] ), \"Check for class: Did not expect class 'link'\" );\n\tok( jQuery(\"#simon\").is( jQuery(\".blog.link\")[0] ), \"Check for multiple classes: Expected classes 'blog' and 'link'\" );\n\tok( !jQuery(\"#simon\").is( jQuery(\".blogTest\")[0] ), \"Check for multiple classes: Expected classes 'blog' and 'link', but not 'blogTest'\" );\n});\n\ntest(\"is() with positional selectors\", function() {\n\texpect(23);\n\n\tvar html = jQuery(\n\t\t\t\t'<p id=\"posp\"><a class=\"firsta\" href=\"#\"><em>first</em></a><a class=\"seconda\" href=\"#\"><b>test</b></a><em></em></p>'\n\t\t\t).appendTo( \"body\" ),\n\t\tisit = function(sel, match, expect) {\n\t\t\tequal( jQuery( sel ).is( match ), expect, \"jQuery( \" + sel + \" ).is( \" + match + \" )\" );\n\t\t};\n\n\tisit( \"#posp\", \"#posp:first\", true );\n\tisit( \"#posp\", \"#posp:eq(2)\", false );\n\tisit( \"#posp\", \"#posp a:first\", false );\n\n\tisit( \"#posp .firsta\", \"#posp a:first\", true );\n\tisit( \"#posp .firsta\", \"#posp a:last\", false );\n\tisit( \"#posp .firsta\", \"#posp a:even\", true );\n\tisit( \"#posp .firsta\", \"#posp a:odd\", false );\n\tisit( \"#posp .firsta\", \"#posp a:eq(0)\", true );\n\tisit( \"#posp .firsta\", \"#posp a:eq(9)\", false );\n\tisit( \"#posp .firsta\", \"#posp em:eq(0)\", false );\n\tisit( \"#posp .firsta\", \"#posp em:first\", false );\n\tisit( \"#posp .firsta\", \"#posp:first\", false );\n\n\tisit( \"#posp .seconda\", \"#posp a:first\", false );\n\tisit( \"#posp .seconda\", \"#posp a:last\", true );\n\tisit( \"#posp .seconda\", \"#posp a:gt(0)\", true );\n\tisit( \"#posp .seconda\", \"#posp a:lt(5)\", true );\n\tisit( \"#posp .seconda\", \"#posp a:lt(1)\", false );\n\n\tisit( \"#posp em\", \"#posp a:eq(0) em\", true );\n\tisit( \"#posp em\", \"#posp a:lt(1) em\", true );\n\tisit( \"#posp em\", \"#posp a:gt(1) em\", false );\n\tisit( \"#posp em\", \"#posp a:first em\", true );\n\tisit( \"#posp em\", \"#posp a em:last\", true );\n\tisit( \"#posp em\", \"#posp a em:eq(2)\", false );\n\n\thtml.remove();\n});\n\ntest(\"index()\", function() {\n\texpect( 2 );\n\n\tequal( jQuery(\"#text2\").index(), 2, \"Returns the index of a child amongst its siblings\" );\n\n\tequal( jQuery(\"<div/>\").index(), -1, \"Node without parent returns -1\" );\n});\n\ntest(\"index(Object|String|undefined)\", function() {\n\texpect(16);\n\n\tvar elements = jQuery([window, document]),\n\t\tinputElements = jQuery(\"#radio1,#radio2,#check1,#check2\");\n\n\t// Passing a node\n\tequal( elements.index(window), 0, \"Check for index of elements\" );\n\tequal( elements.index(document), 1, \"Check for index of elements\" );\n\tequal( inputElements.index(document.getElementById(\"radio1\")), 0, \"Check for index of elements\" );\n\tequal( inputElements.index(document.getElementById(\"radio2\")), 1, \"Check for index of elements\" );\n\tequal( inputElements.index(document.getElementById(\"check1\")), 2, \"Check for index of elements\" );\n\tequal( inputElements.index(document.getElementById(\"check2\")), 3, \"Check for index of elements\" );\n\tequal( inputElements.index(window), -1, \"Check for not found index\" );\n\tequal( inputElements.index(document), -1, \"Check for not found index\" );\n\n\t// Passing a jQuery object\n\t// enabled since [5500]\n\tequal( elements.index( elements ), 0, \"Pass in a jQuery object\" );\n\tequal( elements.index( elements.eq(1) ), 1, \"Pass in a jQuery object\" );\n\tequal( jQuery(\"#form :radio\").index( jQuery(\"#radio2\") ), 1, \"Pass in a jQuery object\" );\n\n\t// Passing a selector or nothing\n\t// enabled since [6330]\n\tequal( jQuery(\"#text2\").index(), 2, \"Check for index amongst siblings\" );\n\tequal( jQuery(\"#form\").children().eq(4).index(), 4, \"Check for index amongst siblings\" );\n\tequal( jQuery(\"#radio2\").index(\"#form :radio\") , 1, \"Check for index within a selector\" );\n\tequal( jQuery(\"#form :radio\").index( jQuery(\"#radio2\") ), 1, \"Check for index within a selector\" );\n\tequal( jQuery(\"#radio2\").index(\"#form :text\") , -1, \"Check for index not found within a selector\" );\n});\n\ntest(\"filter(Selector|undefined)\", function() {\n\texpect(9);\n\tdeepEqual( jQuery(\"#form input\").filter(\":checked\").get(), q(\"radio2\", \"check1\"), \"filter(String)\" );\n\tdeepEqual( jQuery(\"p\").filter(\"#ap, #sndp\").get(), q(\"ap\", \"sndp\"), \"filter('String, String')\" );\n\tdeepEqual( jQuery(\"p\").filter(\"#ap,#sndp\").get(), q(\"ap\", \"sndp\"), \"filter('String,String')\" );\n\n\tdeepEqual( jQuery(\"p\").filter(null).get(),      [], \"filter(null) should return an empty jQuery object\");\n\tdeepEqual( jQuery(\"p\").filter(undefined).get(), [], \"filter(undefined) should return an empty jQuery object\");\n\tdeepEqual( jQuery(\"p\").filter(0).get(),         [], \"filter(0) should return an empty jQuery object\");\n\tdeepEqual( jQuery(\"p\").filter(\"\").get(),        [], \"filter('') should return an empty jQuery object\");\n\n\t// using contents will get comments regular, text, and comment nodes\n\tvar j = jQuery(\"#nonnodes\").contents();\n\tequal( j.filter(\"span\").length, 1, \"Check node,textnode,comment to filter the one span\" );\n\tequal( j.filter(\"[name]\").length, 0, \"Check node,textnode,comment to filter the one span\" );\n});\n\ntest(\"filter(Function)\", function() {\n\texpect(2);\n\n\tdeepEqual( jQuery(\"#qunit-fixture p\").filter(function() { return !jQuery(\"a\", this).length }).get(), q(\"sndp\", \"first\"), \"filter(Function)\" );\n\n\tdeepEqual( jQuery(\"#qunit-fixture p\").filter(function(i, elem) { return !jQuery(\"a\", elem).length }).get(), q(\"sndp\", \"first\"), \"filter(Function) using arg\" );\n});\n\ntest(\"filter(Element)\", function() {\n\texpect(1);\n\n\tvar element = document.getElementById(\"text1\");\n\tdeepEqual( jQuery(\"#form input\").filter(element).get(), q(\"text1\"), \"filter(Element)\" );\n});\n\ntest(\"filter(Array)\", function() {\n\texpect(1);\n\n\tvar elements = [ document.getElementById(\"text1\") ];\n\tdeepEqual( jQuery(\"#form input\").filter(elements).get(), q(\"text1\"), \"filter(Element)\" );\n});\n\ntest(\"filter(jQuery)\", function() {\n\texpect(1);\n\n\tvar elements = jQuery(\"#text1\");\n\tdeepEqual( jQuery(\"#form input\").filter(elements).get(), q(\"text1\"), \"filter(Element)\" );\n});\n\n\ntest(\"filter() with positional selectors\", function() {\n\texpect(19);\n\n\tvar html = jQuery('' +\n\t\t'<p id=\"posp\">' +\n\t\t\t'<a class=\"firsta\" href=\"#\">' +\n\t\t\t\t'<em>first</em>' +\n\t\t\t'</a>' +\n\t\t\t'<a class=\"seconda\" href=\"#\">' +\n\t\t\t\t'<b>test</b>' +\n\t\t\t'</a>' +\n\t\t\t'<em></em>' +\n\t\t'</p>').appendTo( \"body\" ),\n\t\tfilterit = function(sel, filter, length) {\n\t\t\tequal( jQuery( sel ).filter( filter ).length, length, \"jQuery( \" + sel + \" ).filter( \" + filter + \" )\" );\n\t\t};\n\n\tfilterit( \"#posp\", \"#posp:first\", 1);\n\tfilterit( \"#posp\", \"#posp:eq(2)\", 0 );\n\tfilterit( \"#posp\", \"#posp a:first\", 0 );\n\n\t// Keep in mind this is within the selection and\n\t// not in relation to other elements (.is() is a different story)\n\tfilterit( \"#posp .firsta\", \"#posp a:first\", 1 );\n\tfilterit( \"#posp .firsta\", \"#posp a:last\", 1 );\n\tfilterit( \"#posp .firsta\", \"#posp a:last-child\", 0 );\n\tfilterit( \"#posp .firsta\", \"#posp a:even\", 1 );\n\tfilterit( \"#posp .firsta\", \"#posp a:odd\", 0 );\n\tfilterit( \"#posp .firsta\", \"#posp a:eq(0)\", 1 );\n\tfilterit( \"#posp .firsta\", \"#posp a:eq(9)\", 0 );\n\tfilterit( \"#posp .firsta\", \"#posp em:eq(0)\", 0 );\n\tfilterit( \"#posp .firsta\", \"#posp em:first\", 0 );\n\tfilterit( \"#posp .firsta\", \"#posp:first\", 0 );\n\n\tfilterit( \"#posp .seconda\", \"#posp a:first\", 1 );\n\tfilterit( \"#posp .seconda\", \"#posp em:first\", 0 );\n\tfilterit( \"#posp .seconda\", \"#posp a:last\", 1 );\n\tfilterit( \"#posp .seconda\", \"#posp a:gt(0)\", 0 );\n\tfilterit( \"#posp .seconda\", \"#posp a:lt(5)\", 1 );\n\tfilterit( \"#posp .seconda\", \"#posp a:lt(1)\", 1 );\n\thtml.remove();\n});\n\ntest(\"closest()\", function() {\n\texpect(13);\n\tdeepEqual( jQuery(\"body\").closest(\"body\").get(), q(\"body\"), \"closest(body)\" );\n\tdeepEqual( jQuery(\"body\").closest(\"html\").get(), q(\"html\"), \"closest(html)\" );\n\tdeepEqual( jQuery(\"body\").closest(\"div\").get(), [], \"closest(div)\" );\n\tdeepEqual( jQuery(\"#qunit-fixture\").closest(\"span,#html\").get(), q(\"html\"), \"closest(span,#html)\" );\n\n\tdeepEqual( jQuery(\"div:eq(1)\").closest(\"div:first\").get(), [], \"closest(div:first)\" );\n\tdeepEqual( jQuery(\"div\").closest(\"body:first div:last\").get(), q(\"fx-tests\"), \"closest(body:first div:last)\" );\n\n\t// Test .closest() limited by the context\n\tvar jq = jQuery(\"#nothiddendivchild\");\n\tdeepEqual( jq.closest(\"html\", document.body).get(), [], \"Context limited.\" );\n\tdeepEqual( jq.closest(\"body\", document.body).get(), [], \"Context limited.\" );\n\tdeepEqual( jq.closest(\"#nothiddendiv\", document.body).get(), q(\"nothiddendiv\"), \"Context not reached.\" );\n\n\t//Test that .closest() returns unique'd set\n\tequal( jQuery(\"#qunit-fixture p\").closest(\"#qunit-fixture\").length, 1, \"Closest should return a unique set\" );\n\n\t// Test on disconnected node\n\tequal( jQuery(\"<div><p></p></div>\").find(\"p\").closest(\"table\").length, 0, \"Make sure disconnected closest work.\" );\n\n\t// Bug #7369\n\tequal( jQuery(\"<div foo='bar'></div>\").closest(\"[foo]\").length, 1, \"Disconnected nodes with attribute selector\" );\n\tequal( jQuery(\"<div>text</div>\").closest(\"[lang]\").length, 0, \"Disconnected nodes with text and non-existent attribute selector\" );\n});\n\ntest(\"closest(Array)\", function() {\n\texpect(7);\n\tdeepEqual( jQuery(\"body\").closest([\"body\"]), [{selector:\"body\", elem:document.body, level:1}], \"closest([body])\" );\n\tdeepEqual( jQuery(\"body\").closest([\"html\"]), [{selector:\"html\", elem:document.documentElement, level:2}], \"closest([html])\" );\n\tdeepEqual( jQuery(\"body\").closest([\"div\"]), [], \"closest([div])\" );\n\tdeepEqual( jQuery(\"#yahoo\").closest([\"div\"]), [{\"selector\":\"div\", \"elem\": document.getElementById(\"foo\"), \"level\": 3}, { \"selector\": \"div\", \"elem\": document.getElementById(\"qunit-fixture\"), \"level\": 4 }], \"closest([div])\" );\n\tdeepEqual( jQuery(\"#qunit-fixture\").closest([\"span,#html\"]), [{selector:\"span,#html\", elem:document.documentElement, level:4}], \"closest([span,#html])\" );\n\n\tdeepEqual( jQuery(\"body\").closest([\"body\",\"html\"]), [{selector:\"body\", elem:document.body, level:1}, {selector:\"html\", elem:document.documentElement, level:2}], \"closest([body, html])\" );\n\tdeepEqual( jQuery(\"body\").closest([\"span\",\"html\"]), [{selector:\"html\", elem:document.documentElement, level:2}], \"closest([body, html])\" );\n});\n\ntest(\"closest(jQuery)\", function() {\n\texpect(8);\n\tvar $child = jQuery(\"#nothiddendivchild\"),\n\t\t$parent = jQuery(\"#nothiddendiv\"),\n\t\t$main = jQuery(\"#qunit-fixture\"),\n\t\t$body = jQuery(\"body\");\n\tok( $child.closest( $parent ).is(\"#nothiddendiv\"), \"closest( jQuery('#nothiddendiv') )\" );\n\tok( $child.closest( $parent[0] ).is(\"#nothiddendiv\"), \"closest( jQuery('#nothiddendiv') ) :: node\" );\n\tok( $child.closest( $child ).is(\"#nothiddendivchild\"), \"child is included\" );\n\tok( $child.closest( $child[0] ).is(\"#nothiddendivchild\"), \"child is included  :: node\" );\n\tequal( $child.closest( document.createElement(\"div\") ).length, 0, \"created element is not related\" );\n\tequal( $child.closest( $main ).length, 0, \"Main not a parent of child\" );\n\tequal( $child.closest( $main[0] ).length, 0, \"Main not a parent of child :: node\" );\n\tok( $child.closest( $body.add($parent) ).is(\"#nothiddendiv\"), \"Closest ancestor retrieved.\" );\n});\n\ntest(\"not(Selector|undefined)\", function() {\n\texpect(11);\n\tequal( jQuery(\"#qunit-fixture > p#ap > a\").not(\"#google\").length, 2, \"not('selector')\" );\n\tdeepEqual( jQuery(\"p\").not(\".result\").get(), q(\"firstp\", \"ap\", \"sndp\", \"en\", \"sap\", \"first\"), \"not('.class')\" );\n\tdeepEqual( jQuery(\"p\").not(\"#ap, #sndp, .result\").get(), q(\"firstp\", \"en\", \"sap\", \"first\"), \"not('selector, selector')\" );\n\tdeepEqual( jQuery(\"#form option\").not(\"option.emptyopt:contains('Nothing'),[selected],[value='1']\").get(), q(\"option1c\", \"option1d\", \"option2c\", \"option3d\", \"option3e\", \"option4e\",\"option5b\"), \"not('complex selector')\");\n\n\tdeepEqual( jQuery(\"#ap *\").not(\"code\").get(), q(\"google\", \"groups\", \"anchor1\", \"mark\"), \"not('tag selector')\" );\n\tdeepEqual( jQuery(\"#ap *\").not(\"code, #mark\").get(), q(\"google\", \"groups\", \"anchor1\"), \"not('tag, ID selector')\" );\n\tdeepEqual( jQuery(\"#ap *\").not(\"#mark, code\").get(), q(\"google\", \"groups\", \"anchor1\"), \"not('ID, tag selector')\");\n\n\tvar all = jQuery(\"p\").get();\n\tdeepEqual( jQuery(\"p\").not(null).get(),      all, \"not(null) should have no effect\");\n\tdeepEqual( jQuery(\"p\").not(undefined).get(), all, \"not(undefined) should have no effect\");\n\tdeepEqual( jQuery(\"p\").not(0).get(),         all, \"not(0) should have no effect\");\n\tdeepEqual( jQuery(\"p\").not(\"\").get(),        all, \"not('') should have no effect\");\n});\n\ntest(\"not(Element)\", function() {\n\texpect(1);\n\n\tvar selects = jQuery(\"#form select\");\n\tdeepEqual( selects.not( selects[1] ).get(), q(\"select1\", \"select3\", \"select4\", \"select5\"), \"filter out DOM element\");\n});\n\ntest(\"not(Function)\", function() {\n\tdeepEqual( jQuery(\"#qunit-fixture p\").not(function() { return jQuery(\"a\", this).length }).get(), q(\"sndp\", \"first\"), \"not(Function)\" );\n});\n\ntest(\"not(Array)\", function() {\n\texpect(2);\n\n\tequal( jQuery(\"#qunit-fixture > p#ap > a\").not(document.getElementById(\"google\")).length, 2, \"not(DOMElement)\" );\n\tequal( jQuery(\"p\").not(document.getElementsByTagName(\"p\")).length, 0, \"not(Array-like DOM collection)\" );\n});\n\ntest(\"not(jQuery)\", function() {\n\texpect(1);\n\n\tdeepEqual( jQuery(\"p\").not(jQuery(\"#ap, #sndp, .result\")).get(), q(\"firstp\", \"en\", \"sap\", \"first\"), \"not(jQuery)\" );\n});\n\ntest(\"has(Element)\", function() {\n\texpect(2);\n\n\tvar obj = jQuery(\"#qunit-fixture\").has(jQuery(\"#sndp\")[0]);\n\tdeepEqual( obj.get(), q(\"qunit-fixture\"), \"Keeps elements that have the element as a descendant\" );\n\n\tvar multipleParent = jQuery(\"#qunit-fixture, #header\").has(jQuery(\"#sndp\")[0]);\n\tdeepEqual( obj.get(), q(\"qunit-fixture\"), \"Does not include elements that do not have the element as a descendant\" );\n});\n\ntest(\"has(Selector)\", function() {\n\texpect(3);\n\n\tvar obj = jQuery(\"#qunit-fixture\").has(\"#sndp\");\n\tdeepEqual( obj.get(), q(\"qunit-fixture\"), \"Keeps elements that have any element matching the selector as a descendant\" );\n\n\tvar multipleParent = jQuery(\"#qunit-fixture, #header\").has(\"#sndp\");\n\tdeepEqual( obj.get(), q(\"qunit-fixture\"), \"Does not include elements that do not have the element as a descendant\" );\n\n\tvar multipleHas = jQuery(\"#qunit-fixture\").has(\"#sndp, #first\");\n\tdeepEqual( multipleHas.get(), q(\"qunit-fixture\"), \"Only adds elements once\" );\n});\n\ntest(\"has(Arrayish)\", function() {\n\texpect(3);\n\n\tvar simple = jQuery(\"#qunit-fixture\").has(jQuery(\"#sndp\"));\n\tdeepEqual( simple.get(), q(\"qunit-fixture\"), \"Keeps elements that have any element in the jQuery list as a descendant\" );\n\n\tvar multipleParent = jQuery(\"#qunit-fixture, #header\").has(jQuery(\"#sndp\"));\n\tdeepEqual( multipleParent.get(), q(\"qunit-fixture\"), \"Does not include elements that do not have an element in the jQuery list as a descendant\" );\n\n\tvar multipleHas = jQuery(\"#qunit-fixture\").has(jQuery(\"#sndp, #first\"));\n\tdeepEqual( simple.get(), q(\"qunit-fixture\"), \"Only adds elements once\" );\n});\n\ntest(\"andSelf()\", function() {\n\texpect(4);\n\tdeepEqual( jQuery(\"#en\").siblings().andSelf().get(), q(\"sndp\", \"en\", \"sap\"), \"Check for siblings and self\" );\n\tdeepEqual( jQuery(\"#foo\").children().andSelf().get(), q(\"foo\", \"sndp\", \"en\", \"sap\"), \"Check for children and self\" );\n\tdeepEqual( jQuery(\"#sndp, #en\").parent().andSelf().get(), q(\"foo\",\"sndp\",\"en\"), \"Check for parent and self\" );\n\tdeepEqual( jQuery(\"#groups\").parents(\"p, div\").andSelf().get(), q(\"qunit-fixture\", \"ap\", \"groups\"), \"Check for parents and self\" );\n});\n\ntest(\"siblings([String])\", function() {\n\texpect(6);\n\tdeepEqual( jQuery(\"#en\").siblings().get(), q(\"sndp\", \"sap\"), \"Check for siblings\" );\n\tdeepEqual( jQuery(\"#sndp\").siblings(\":has(code)\").get(), q(\"sap\"), \"Check for filtered siblings (has code child element)\" );\n\tdeepEqual( jQuery(\"#sndp\").siblings(\":has(a)\").get(), q(\"en\", \"sap\"), \"Check for filtered siblings (has anchor child element)\" );\n\tdeepEqual( jQuery(\"#foo\").siblings(\"form, b\").get(), q(\"form\", \"floatTest\", \"lengthtest\", \"name-tests\", \"testForm\"), \"Check for multiple filters\" );\n\tvar set = q(\"sndp\", \"en\", \"sap\");\n\tdeepEqual( jQuery(\"#en, #sndp\").siblings().get(), set, \"Check for unique results from siblings\" );\n\tdeepEqual( jQuery(\"#option5a\").siblings(\"option[data-attr]\").get(), q(\"option5c\"), \"Has attribute selector in siblings (#9261)\" );\n});\n\ntest(\"children([String])\", function() {\n\texpect(3);\n\tdeepEqual( jQuery(\"#foo\").children().get(), q(\"sndp\", \"en\", \"sap\"), \"Check for children\" );\n\tdeepEqual( jQuery(\"#foo\").children(\":has(code)\").get(), q(\"sndp\", \"sap\"), \"Check for filtered children\" );\n\tdeepEqual( jQuery(\"#foo\").children(\"#en, #sap\").get(), q(\"en\", \"sap\"), \"Check for multiple filters\" );\n});\n\ntest(\"parent([String])\", function() {\n\texpect(5);\n\tequal( jQuery(\"#groups\").parent()[0].id, \"ap\", \"Simple parent check\" );\n\tequal( jQuery(\"#groups\").parent(\"p\")[0].id, \"ap\", \"Filtered parent check\" );\n\tequal( jQuery(\"#groups\").parent(\"div\").length, 0, \"Filtered parent check, no match\" );\n\tequal( jQuery(\"#groups\").parent(\"div, p\")[0].id, \"ap\", \"Check for multiple filters\" );\n\tdeepEqual( jQuery(\"#en, #sndp\").parent().get(), q(\"foo\"), \"Check for unique results from parent\" );\n});\n\ntest(\"parents([String])\", function() {\n\texpect(5);\n\tequal( jQuery(\"#groups\").parents()[0].id, \"ap\", \"Simple parents check\" );\n\tequal( jQuery(\"#groups\").parents(\"p\")[0].id, \"ap\", \"Filtered parents check\" );\n\tequal( jQuery(\"#groups\").parents(\"div\")[0].id, \"qunit-fixture\", \"Filtered parents check2\" );\n\tdeepEqual( jQuery(\"#groups\").parents(\"p, div\").get(), q(\"ap\", \"qunit-fixture\"), \"Check for multiple filters\" );\n\tdeepEqual( jQuery(\"#en, #sndp\").parents().get(), q(\"foo\", \"qunit-fixture\", \"dl\", \"body\", \"html\"), \"Check for unique results from parents\" );\n});\n\ntest(\"parentsUntil([String])\", function() {\n\texpect(9);\n\n\tvar parents = jQuery(\"#groups\").parents();\n\n\tdeepEqual( jQuery(\"#groups\").parentsUntil().get(), parents.get(), \"parentsUntil with no selector (nextAll)\" );\n\tdeepEqual( jQuery(\"#groups\").parentsUntil(\".foo\").get(), parents.get(), \"parentsUntil with invalid selector (nextAll)\" );\n\tdeepEqual( jQuery(\"#groups\").parentsUntil(\"#html\").get(), parents.not(\":last\").get(), \"Simple parentsUntil check\" );\n\tequal( jQuery(\"#groups\").parentsUntil(\"#ap\").length, 0, \"Simple parentsUntil check\" );\n\tdeepEqual( jQuery(\"#groups\").parentsUntil(\"#html, #body\").get(), parents.slice( 0, 3 ).get(), \"Less simple parentsUntil check\" );\n\tdeepEqual( jQuery(\"#groups\").parentsUntil(\"#html\", \"div\").get(), jQuery(\"#qunit-fixture\").get(), \"Filtered parentsUntil check\" );\n\tdeepEqual( jQuery(\"#groups\").parentsUntil(\"#html\", \"p,div,dl\").get(), parents.slice( 0, 3 ).get(), \"Multiple-filtered parentsUntil check\" );\n\tequal( jQuery(\"#groups\").parentsUntil(\"#html\", \"span\").length, 0, \"Filtered parentsUntil check, no match\" );\n\tdeepEqual( jQuery(\"#groups, #ap\").parentsUntil(\"#html\", \"p,div,dl\").get(), parents.slice( 0, 3 ).get(), \"Multi-source, multiple-filtered parentsUntil check\" );\n});\n\ntest(\"next([String])\", function() {\n\texpect(4);\n\tequal( jQuery(\"#ap\").next()[0].id, \"foo\", \"Simple next check\" );\n\tequal( jQuery(\"#ap\").next(\"div\")[0].id, \"foo\", \"Filtered next check\" );\n\tequal( jQuery(\"#ap\").next(\"p\").length, 0, \"Filtered next check, no match\" );\n\tequal( jQuery(\"#ap\").next(\"div, p\")[0].id, \"foo\", \"Multiple filters\" );\n});\n\ntest(\"prev([String])\", function() {\n\texpect(4);\n\tequal( jQuery(\"#foo\").prev()[0].id, \"ap\", \"Simple prev check\" );\n\tequal( jQuery(\"#foo\").prev(\"p\")[0].id, \"ap\", \"Filtered prev check\" );\n\tequal( jQuery(\"#foo\").prev(\"div\").length, 0, \"Filtered prev check, no match\" );\n\tequal( jQuery(\"#foo\").prev(\"p, div\")[0].id, \"ap\", \"Multiple filters\" );\n});\n\ntest(\"nextAll([String])\", function() {\n\texpect(4);\n\n\tvar elems = jQuery(\"#form\").children();\n\n\tdeepEqual( jQuery(\"#label-for\").nextAll().get(), elems.not(\":first\").get(), \"Simple nextAll check\" );\n\tdeepEqual( jQuery(\"#label-for\").nextAll(\"input\").get(), elems.not(\":first\").filter(\"input\").get(), \"Filtered nextAll check\" );\n\tdeepEqual( jQuery(\"#label-for\").nextAll(\"input,select\").get(), elems.not(\":first\").filter(\"input,select\").get(), \"Multiple-filtered nextAll check\" );\n\tdeepEqual( jQuery(\"#label-for, #hidden1\").nextAll(\"input,select\").get(), elems.not(\":first\").filter(\"input,select\").get(), \"Multi-source, multiple-filtered nextAll check\" );\n});\n\ntest(\"prevAll([String])\", function() {\n\texpect(4);\n\n\tvar elems = jQuery( jQuery(\"#form\").children().slice(0, 12).get().reverse() );\n\n\tdeepEqual( jQuery(\"#area1\").prevAll().get(), elems.get(), \"Simple prevAll check\" );\n\tdeepEqual( jQuery(\"#area1\").prevAll(\"input\").get(), elems.filter(\"input\").get(), \"Filtered prevAll check\" );\n\tdeepEqual( jQuery(\"#area1\").prevAll(\"input,select\").get(), elems.filter(\"input,select\").get(), \"Multiple-filtered prevAll check\" );\n\tdeepEqual( jQuery(\"#area1, #hidden1\").prevAll(\"input,select\").get(), elems.filter(\"input,select\").get(), \"Multi-source, multiple-filtered prevAll check\" );\n});\n\ntest(\"nextUntil([String])\", function() {\n\texpect(11);\n\n\tvar elems = jQuery(\"#form\").children().slice( 2, 12 );\n\n\tdeepEqual( jQuery(\"#text1\").nextUntil().get(), jQuery(\"#text1\").nextAll().get(), \"nextUntil with no selector (nextAll)\" );\n\tdeepEqual( jQuery(\"#text1\").nextUntil(\".foo\").get(), jQuery(\"#text1\").nextAll().get(), \"nextUntil with invalid selector (nextAll)\" );\n\tdeepEqual( jQuery(\"#text1\").nextUntil(\"#area1\").get(), elems.get(), \"Simple nextUntil check\" );\n\tequal( jQuery(\"#text1\").nextUntil(\"#text2\").length, 0, \"Simple nextUntil check\" );\n\tdeepEqual( jQuery(\"#text1\").nextUntil(\"#area1, #radio1\").get(), jQuery(\"#text1\").next().get(), \"Less simple nextUntil check\" );\n\tdeepEqual( jQuery(\"#text1\").nextUntil(\"#area1\", \"input\").get(), elems.not(\"button\").get(), \"Filtered nextUntil check\" );\n\tdeepEqual( jQuery(\"#text1\").nextUntil(\"#area1\", \"button\").get(), elems.not(\"input\").get(), \"Filtered nextUntil check\" );\n\tdeepEqual( jQuery(\"#text1\").nextUntil(\"#area1\", \"button,input\").get(), elems.get(), \"Multiple-filtered nextUntil check\" );\n\tequal( jQuery(\"#text1\").nextUntil(\"#area1\", \"div\").length, 0, \"Filtered nextUntil check, no match\" );\n\tdeepEqual( jQuery(\"#text1, #hidden1\").nextUntil(\"#area1\", \"button,input\").get(), elems.get(), \"Multi-source, multiple-filtered nextUntil check\" );\n\n\tdeepEqual( jQuery(\"#text1\").nextUntil(\"[class=foo]\").get(), jQuery(\"#text1\").nextAll().get(), \"Non-element nodes must be skipped, since they have no attributes\" );\n});\n\ntest(\"prevUntil([String])\", function() {\n\texpect(10);\n\n\tvar elems = jQuery(\"#area1\").prevAll();\n\n\tdeepEqual( jQuery(\"#area1\").prevUntil().get(), elems.get(), \"prevUntil with no selector (prevAll)\" );\n\tdeepEqual( jQuery(\"#area1\").prevUntil(\".foo\").get(), elems.get(), \"prevUntil with invalid selector (prevAll)\" );\n\tdeepEqual( jQuery(\"#area1\").prevUntil(\"label\").get(), elems.not(\":last\").get(), \"Simple prevUntil check\" );\n\tequal( jQuery(\"#area1\").prevUntil(\"#button\").length, 0, \"Simple prevUntil check\" );\n\tdeepEqual( jQuery(\"#area1\").prevUntil(\"label, #search\").get(), jQuery(\"#area1\").prev().get(), \"Less simple prevUntil check\" );\n\tdeepEqual( jQuery(\"#area1\").prevUntil(\"label\", \"input\").get(), elems.not(\":last\").not(\"button\").get(), \"Filtered prevUntil check\" );\n\tdeepEqual( jQuery(\"#area1\").prevUntil(\"label\", \"button\").get(), elems.not(\":last\").not(\"input\").get(), \"Filtered prevUntil check\" );\n\tdeepEqual( jQuery(\"#area1\").prevUntil(\"label\", \"button,input\").get(), elems.not(\":last\").get(), \"Multiple-filtered prevUntil check\" );\n\tequal( jQuery(\"#area1\").prevUntil(\"label\", \"div\").length, 0, \"Filtered prevUntil check, no match\" );\n\tdeepEqual( jQuery(\"#area1, #hidden1\").prevUntil(\"label\", \"button,input\").get(), elems.not(\":last\").get(), \"Multi-source, multiple-filtered prevUntil check\" );\n});\n\ntest(\"contents()\", function() {\n\texpect(12);\n\tequal( jQuery(\"#ap\").contents().length, 9, \"Check element contents\" );\n\tok( jQuery(\"#iframe\").contents()[0], \"Check existance of IFrame document\" );\n\tvar ibody = jQuery(\"#loadediframe\").contents()[0].body;\n\tok( ibody, \"Check existance of IFrame body\" );\n\n\tequal( jQuery(\"span\", ibody).text(), \"span text\", \"Find span in IFrame and check its text\" );\n\n\tjQuery(ibody).append(\"<div>init text</div>\");\n\tequal( jQuery(\"div\", ibody).length, 2, \"Check the original div and the new div are in IFrame\" );\n\n\tequal( jQuery(\"div:last\", ibody).text(), \"init text\", \"Add text to div in IFrame\" );\n\n\tjQuery(\"div:last\", ibody).text(\"div text\");\n\tequal( jQuery(\"div:last\", ibody).text(), \"div text\", \"Add text to div in IFrame\" );\n\n\tjQuery(\"div:last\", ibody).remove();\n\tequal( jQuery(\"div\", ibody).length, 1, \"Delete the div and check only one div left in IFrame\" );\n\n\tequal( jQuery(\"div\", ibody).text(), \"span text\", \"Make sure the correct div is still left after deletion in IFrame\" );\n\n\tjQuery(\"<table/>\", ibody).append(\"<tr><td>cell</td></tr>\").appendTo(ibody);\n\tjQuery(\"table\", ibody).remove();\n\tequal( jQuery(\"div\", ibody).length, 1, \"Check for JS error on add and delete of a table in IFrame\" );\n\n\t// using contents will get comments regular, text, and comment nodes\n\tvar c = jQuery(\"#nonnodes\").contents().contents();\n\tequal( c.length, 1, \"Check node,textnode,comment contents is just one\" );\n\tequal( c[0].nodeValue, \"hi\", \"Check node,textnode,comment contents is just the one from span\" );\n});\n\ntest(\"add(String|Element|Array|undefined)\", function() {\n\texpect(16);\n\tdeepEqual( jQuery(\"#sndp\").add(\"#en\").add(\"#sap\").get(), q(\"sndp\", \"en\", \"sap\"), \"Check elements from document\" );\n\tdeepEqual( jQuery(\"#sndp\").add( jQuery(\"#en\")[0] ).add( jQuery(\"#sap\") ).get(), q(\"sndp\", \"en\", \"sap\"), \"Check elements from document\" );\n\n\t// We no longer support .add(form.elements), unfortunately.\n\t// There is no way, in browsers, to reliably determine the difference\n\t// between form.elements and form - and doing .add(form) and having it\n\t// add the form elements is way to unexpected, so this gets the boot.\n\t// ok( jQuery([]).add(jQuery(\"#form\")[0].elements).length >= 13, \"Check elements from array\" );\n\n\t// For the time being, we're discontinuing support for jQuery(form.elements) since it's ambiguous in IE\n\t// use jQuery([]).add(form.elements) instead.\n\t//equal( jQuery([]).add(jQuery(\"#form\")[0].elements).length, jQuery(jQuery(\"#form\")[0].elements).length, \"Array in constructor must equals array in add()\" );\n\n\tvar divs = jQuery(\"<div/>\").add(\"#sndp\");\n\tok( !divs[0].parentNode, \"Make sure the first element is still the disconnected node.\" );\n\n\tdivs = jQuery(\"<div>test</div>\").add(\"#sndp\");\n\tequal( divs[0].parentNode.nodeType, 11, \"Make sure the first element is still the disconnected node.\" );\n\n\tdivs = jQuery(\"#sndp\").add(\"<div/>\");\n\tok( !divs[1].parentNode, \"Make sure the first element is still the disconnected node.\" );\n\n\tvar tmp = jQuery(\"<div/>\");\n\n\tvar x = jQuery([]).add(jQuery(\"<p id='x1'>xxx</p>\").appendTo(tmp)).add(jQuery(\"<p id='x2'>xxx</p>\").appendTo(tmp));\n\tequal( x[0].id, \"x1\", \"Check on-the-fly element1\" );\n\tequal( x[1].id, \"x2\", \"Check on-the-fly element2\" );\n\n\tvar x = jQuery([]).add(jQuery(\"<p id='x1'>xxx</p>\").appendTo(tmp)[0]).add(jQuery(\"<p id='x2'>xxx</p>\").appendTo(tmp)[0]);\n\tequal( x[0].id, \"x1\", \"Check on-the-fly element1\" );\n\tequal( x[1].id, \"x2\", \"Check on-the-fly element2\" );\n\n\tvar x = jQuery([]).add(jQuery(\"<p id='x1'>xxx</p>\")).add(jQuery(\"<p id='x2'>xxx</p>\"));\n\tequal( x[0].id, \"x1\", \"Check on-the-fly element1\" );\n\tequal( x[1].id, \"x2\", \"Check on-the-fly element2\" );\n\n\tvar x = jQuery([]).add(\"<p id='x1'>xxx</p>\").add(\"<p id='x2'>xxx</p>\");\n\tequal( x[0].id, \"x1\", \"Check on-the-fly element1\" );\n\tequal( x[1].id, \"x2\", \"Check on-the-fly element2\" );\n\n\tvar notDefined;\n\tequal( jQuery([]).add(notDefined).length, 0, \"Check that undefined adds nothing\" );\n\n\tequal( jQuery([]).add( document.getElementById(\"form\") ).length, 1, \"Add a form\" );\n\tequal( jQuery([]).add( document.getElementById(\"select1\") ).length, 1, \"Add a select\" );\n});\n\ntest(\"add(String, Context)\", function() {\n\texpect(6);\n\n\tdeepEqual( jQuery( \"#firstp\" ).add( \"#ap\" ).get(), q( \"firstp\", \"ap\" ), \"Add selector to selector \" );\n\tdeepEqual( jQuery( document.getElementById(\"firstp\") ).add( \"#ap\" ).get(), q( \"firstp\", \"ap\" ), \"Add gEBId to selector\" );\n\tdeepEqual( jQuery( document.getElementById(\"firstp\") ).add( document.getElementById(\"ap\") ).get(), q( \"firstp\", \"ap\" ), \"Add gEBId to gEBId\" );\n\n\tvar ctx = document.getElementById(\"firstp\");\n\tdeepEqual( jQuery( \"#firstp\" ).add( \"#ap\", ctx ).get(), q( \"firstp\" ), \"Add selector to selector \" );\n\tdeepEqual( jQuery( document.getElementById(\"firstp\") ).add( \"#ap\", ctx ).get(), q( \"firstp\" ), \"Add gEBId to selector, not in context\" );\n\tdeepEqual( jQuery( document.getElementById(\"firstp\") ).add( \"#ap\", document.getElementsByTagName(\"body\")[0] ).get(), q( \"firstp\", \"ap\" ), \"Add gEBId to selector, in context\" );\n});\n\ntest(\"eq('-1') #10616\", function() {\n\texpect(3);\n\tvar $divs = jQuery( \"div\" );\n\n\tequal( $divs.eq( -1 ).length, 1, \"The number -1 returns a selection that has length 1\" );\n\tequal( $divs.eq( \"-1\" ).length, 1, \"The string '-1' returns a selection that has length 1\" );\n\tdeepEqual( $divs.eq( \"-1\" ), $divs.eq( -1 ), \"String and number -1 match\" );\n});\n\n"
  },
  {
    "path": "test/mixed-test.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>IEPP Test Suite</title>\n\t\t<link rel=\"stylesheet\" href=\"data/inline-mixed-media.css\">\n\t\t<link rel=\"stylesheet\" href=\"data/inline-print-media.css\">\n\t\t<link rel=\"stylesheet\" href=\"data/print.css\" media=\"print\">\n\t\t<link rel=\"stylesheet\" href=\"data/screen.css\" media=\"screen, projection\">\n\t\t<link rel=\"stylesheet\" href=\"data/print-styles.css\" media=\"print\">\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tbackground: url(data/body-crash.jpg) no-repeat;\n\t\t\t}\n\t\t</style>\n\t\t<style>\n\t\t\tform {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\tarticle#inline-print {\n\t\t\t\tborder: 5px solid #000;\n\t\t\t}\n\t\t\tsection div article {\n\t\t\t\tborder: 5px solid #000;\n\t\t\t}\n\t\t\tsection[data-article=\"article\"] {\n\t\t\t\tborder: 5px solid #000;\n\t\t\t}\n\t\t</style>\n\t\t<style media=\"print\">\n\t\t\tarticle#inline-print {\n\t\t\t\tborder: 5px dotted #000;\n\t\t\t}\n\t\t\tsection div article {\n\t\t\t\tborder: 5px dotted #000;\n\t\t\t}\n\t\t\tsection[data-article=\"article\"] {\n\t\t\t\tborder: 5px dotted #000;\n\t\t\t}\n\t\t\tp+article {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t</style>\n\t\t<script src=\"../src/html5shiv-printshiv.js\"></script>\n\t\t\n\t\t<script src=\"//use.typekit.com/fbz1vwc.js\"></script>\n\t\t<script>\n\t\t\tTypekit.load();\n\t\t</script>\n\t</head>\n\t<body id=\"print-body-id\" class=\"print-body-class\">\n\t\t<h1>\n\t\t\tPrint Me in IE!\n\t\t</h1>\n\t\t<p>You should see dotted broders in print.</p>\n\t\t<article class=\"inline-mixed-media\">\n\t\t\t<p>\n\t\t\t\t1. This text should be underlined in IE7+.\n\t\t\t</p>\n\t\t</article>\n\t\t<article class=\"inline-print-media\">\n\t\t\t<form action=\"/test/ test\">\n\t\t\t\t<div class=\"inside-of-form\">2. inside print</div>\n\t\t\t</form>\n\t\t</article>\n\t\t<article class=\"print\">\n\t\t\t<p>\n\t\t\t\t3. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam non\n\t\t\t</p>\n\t\t</article>\n\t\t<div class=\"print-styles\">\n\t\t\t<article>\n\t\t\t\t<p>\n\t\t\t\t\t4. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam non\n\t\t\t\t</p>\n\t\t\t</article>\n\t\t</div>\n\t\t<article class=\"print-styles-print\">\n\t\t\t<p>\n\t\t\t\t5. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam non\n\t\t\t</p>\n\t\t</article>\n\t\t<section>\n\t\t\t<div data-article=\"article\">\n\t\t\t\t<article>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t6. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam non\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<section data-article=\"article\">\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t7. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam non\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</section>\n\t\t\t\t</article>\n\t\t\t</div>\n\t\t</section>\n\t</body>\n</html>"
  },
  {
    "path": "test/object-test.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>HTML5 Shiv</title>\n\t\t<link rel=\"stylesheet\" href=\"style.css\">\n\t\t<style>\n\t\t\t.box {\n\t\t\t\tposition: relative;\n\t\t\t\tzoom: 1;\n\t\t\t}\n\t\t\t.swf-overlay {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 200px;\n\t\t\t\theight: 100px;\n\t\t\t\tborder: 1px solid #000;\n\t\t\t}\n\t\t</style>\n\t\t<script src=\"../src/html5shiv.js\"></script>\n\t\t<script src=\"//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js\"></script>\n\t\t<script>\n\t\t\tswfobject.registerObject('static-id', '6.0.0');\n\t\t\tswfobject.embedSWF('data/paramtracer.swf', 'dynamic-id', '480', '420', '6.0.0', null, { 'aFlashVar': 'aFlashVarValue' }, { 'wmode': 'transparent' });\n\t\t</script>\n\t</head>\n\t<body>\n\t\t<section>This sentence has 3px solid border <mark>with these words highlighted</mark>.</section>\n\t\t<h1>static swfobject</h1>\n\t\t<div class=\"box\">\n\t\t\t<object id=\"static-id\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"480\" height=\"420\">\n\t\t\t\t<param name=\"movie\" value=\"data/paramtracer.swf\">\n\t\t\t\t<!--[if !IE]>-->\n\t\t\t\t\t<object type=\"application/x-shockwave-flash\" data=\"data/paramtracer.swf\" width=\"480\" height=\"420\">\n\t\t\t\t\t<!--<![endif]-->\n\t\t\t\t\t\t<param name=\"flashvars\" value=\"aFlashVar=aFlashVarValue\">\n\t\t\t\t\t\t<param name=\"wmode\" value=\"transparent\">\n\t\t\t\t\t<!--[if !IE]>-->\n\t\t\t\t\t</object>\n\t\t\t\t<!--<![endif]-->\n\t\t\t</object>\n\t\t\t<div class=\"swf-overlay\"></div>\n\t\t</div>\n\n\t\t<h1>dynamic swfobject</h1>\n\t\t<div class=\"box\">\n\t\t\t<div id=\"dynamic-id\">\n\t\t\t</div>\n\t\t\t<div class=\"swf-overlay\"></div>\n\t\t</div>\n\n\t\t<h1>innerHTML object</h1>\n\t\t<div class=\"box\" id=\"checkinner\">\n\t\t\t<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"480\" height=\"420\">\n\t\t\t\t<param name=\"movie\" value=\"data/paramtracer.swf\">\n\t\t\t\t<!--[if !IE]>-->\n\t\t\t\t\t<object type=\"application/x-shockwave-flash\" data=\"data/paramtracer.swf\" width=\"480\" height=\"420\">\n\t\t\t\t\t<!--<![endif]-->\n\t\t\t\t\t\t<param name=\"flashvars\" value=\"aFlashVar=aFlashVarValue\">\n\t\t\t\t\t\t<param name=\"wmode\" value=\"transparent\">\n\t\t\t\t\t<!--[if !IE]>-->\n\t\t\t\t\t</object>\n\t\t\t\t<!--<![endif]-->\n\t\t\t</object>\n\t\t\t<div class=\"swf-overlay\"></div>\n\t\t</div>\n\t\t<script>\n\t\t\t(function(){\n\t\t\t\tvar box = document.getElementById('checkinner');\n\t\t\t\tvar box2 = document.createElement('div');\n\t\t\t\tbox2.innerHTML = box.innerHTML;\n\t\t\t\tbox.innerHTML = '';\n\t\t\t\tbox.appendChild(box2);\n\t\t\t})();\n\t\t</script>\n\t<body>\n</html>"
  },
  {
    "path": "test/perf.1.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>HTML5 Shiv</title>\n\t\t<link rel=\"stylesheet\" href=\"style.css\">\n\t\t<script src=\"../src/html5shiv-printshiv.js\"></script>\n\t\t<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js\"></script>\n\t</head>\n\t<body>\n\t\t<div id=\"time\"></div>\n\t\t<section>This sentence is in a green box <mark>with these words highlighted</mark>.</section>\n\t\t<script>\n\t\t\tfunction addDom(){\n\t\t\t\tvar div, frag, fragDiv, divFrag, divFragDiv;\n\t\t\t\tdiv = document.createElement('div');\n\t\t\t\tdiv.innerHTML = '<section>This native javascript sentence is in a green box <mark>with these words highlighted</mark>?</section>';\n\n\t\t\t\tfrag = document.createDocumentFragment();\n\t\t\t\tfrag.appendChild(div);\n\t\t\t\tdiv.innerHTML += '<section>This native javascript sentence is also in a green box <mark>with these words highlighted</mark>?</section>';\n\t\t\t\tdocument.body.appendChild(frag);\n\n\t\t\t\tfrag = document.createDocumentFragment();\n\t\t\t\tfragDiv = frag.appendChild(document.createElement('div'));\n\t\t\t\tfragDiv.innerHTML = '<section>This native javascript sentence is in a green box <mark>with these words highlighted</mark>?</section>';\n\t\t\t\tdocument.body.appendChild(fragDiv);\n\n\t\t\t\tjQuery(document.body).append('<section>This jQuery 1.6.4 sentence is in a green box <mark>with these words highlighted</mark>?</section><section>This jQuery 1.6.4 sentence is in a green box <mark>with these words highlighted</mark>?</section>');\n\t\t\t}\n\n\t\t\tvar time = document.getElementById('time');\n\t\t\tvar cur = new Date().getTime();\n\n\t\t\tfor(var i = 0; i < 1000; i++){\n\t\t\t\taddDom();\n\t\t\t}\n\t\t\ttime.innerHTML = new Date().getTime() - cur;\n\t\t</script>\n\t<body>\n</html>"
  },
  {
    "path": "test/perf.2.html",
    "content": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\t\t<title>HTML5 Shiv</title>\n\t\t<link rel=\"stylesheet\" href=\"style.css\">\n\t\t<script src=\"../src/html5shiv-printshiv.js\"></script>\n\t\t<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js\"></script>\n\t</head>\n\t<body>\n\t\t<div id=\"time\"></div>\n\t\t<section>This sentence is in a green box <mark>with these words highlighted</mark>.</section>\n\t\t<script>\n\t\t\tfunction addDom(){\n\t\t\t\tdocument.createElement('div');\n\t\t\t\tdocument.createDocumentFragment();\n\t\t\t}\n\n\t\t\tvar time = document.getElementById('time');\n\t\t\tvar cur = new Date().getTime();\n\n\t\t\tfor(var i = 0; i < 10000; i++){\n\t\t\t\taddDom();\n\t\t\t}\n\t\t\ttime.innerHTML = new Date().getTime() - cur;\n\t\t</script>\n\t<body>\n</html>"
  },
  {
    "path": "test/qunit/qunit.css",
    "content": "/**\n * QUnit v1.2.0 - A JavaScript Unit Testing Framework\n *\n * http://docs.jquery.com/QUnit\n *\n * Copyright (c) 2011 John Resig, Jörn Zaefferer\n * Dual licensed under the MIT (MIT-LICENSE.txt)\n * or GPL (GPL-LICENSE.txt) licenses.\n */\n\n/** Font Family and Sizes */\n\n#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {\n\tfont-family: \"Helvetica Neue Light\", \"HelveticaNeue-Light\", \"Helvetica Neue\", Calibri, Helvetica, Arial, sans-serif;\n}\n\n#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }\n#qunit-tests { font-size: smaller; }\n\n\n/** Resets */\n\n#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n\n/** Header */\n\n#qunit-header {\n\tpadding: 0.5em 0 0.5em 1em;\n\n\tcolor: #8699a4;\n\tbackground-color: #0d3349;\n\n\tfont-size: 1.5em;\n\tline-height: 1em;\n\tfont-weight: normal;\n\n\tborder-radius: 15px 15px 0 0;\n\t-moz-border-radius: 15px 15px 0 0;\n\t-webkit-border-top-right-radius: 15px;\n\t-webkit-border-top-left-radius: 15px;\n}\n\n#qunit-header a {\n\ttext-decoration: none;\n\tcolor: #c2ccd1;\n}\n\n#qunit-header a:hover,\n#qunit-header a:focus {\n\tcolor: #fff;\n}\n\n#qunit-banner {\n\theight: 5px;\n}\n\n#qunit-testrunner-toolbar {\n\tpadding: 0.5em 0 0.5em 2em;\n\tcolor: #5E740B;\n\tbackground-color: #eee;\n}\n\n#qunit-userAgent {\n\tpadding: 0.5em 0 0.5em 2.5em;\n\tbackground-color: #2b81af;\n\tcolor: #fff;\n\ttext-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;\n}\n\n\n/** Tests: Pass/Fail */\n\n#qunit-tests {\n\tlist-style-position: inside;\n}\n\n#qunit-tests li {\n\tpadding: 0.4em 0.5em 0.4em 2.5em;\n\tborder-bottom: 1px solid #fff;\n\tlist-style-position: inside;\n}\n\n#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running  {\n\tdisplay: none;\n}\n\n#qunit-tests li strong {\n\tcursor: pointer;\n}\n\n#qunit-tests li a {\n\tpadding: 0.5em;\n\tcolor: #c2ccd1;\n\ttext-decoration: none;\n}\n#qunit-tests li a:hover,\n#qunit-tests li a:focus {\n\tcolor: #000;\n}\n\n#qunit-tests ol {\n\tmargin-top: 0.5em;\n\tpadding: 0.5em;\n\n\tbackground-color: #fff;\n\n\tborder-radius: 15px;\n\t-moz-border-radius: 15px;\n\t-webkit-border-radius: 15px;\n\n\tbox-shadow: inset 0px 2px 13px #999;\n\t-moz-box-shadow: inset 0px 2px 13px #999;\n\t-webkit-box-shadow: inset 0px 2px 13px #999;\n}\n\n#qunit-tests table {\n\tborder-collapse: collapse;\n\tmargin-top: .2em;\n}\n\n#qunit-tests th {\n\ttext-align: right;\n\tvertical-align: top;\n\tpadding: 0 .5em 0 0;\n}\n\n#qunit-tests td {\n\tvertical-align: top;\n}\n\n#qunit-tests pre {\n\tmargin: 0;\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n}\n\n#qunit-tests del {\n\tbackground-color: #e0f2be;\n\tcolor: #374e0c;\n\ttext-decoration: none;\n}\n\n#qunit-tests ins {\n\tbackground-color: #ffcaca;\n\tcolor: #500;\n\ttext-decoration: none;\n}\n\n/*** Test Counts */\n\n#qunit-tests b.counts                       { color: black; }\n#qunit-tests b.passed                       { color: #5E740B; }\n#qunit-tests b.failed                       { color: #710909; }\n\n#qunit-tests li li {\n\tmargin: 0.5em;\n\tpadding: 0.4em 0.5em 0.4em 0.5em;\n\tbackground-color: #fff;\n\tborder-bottom: none;\n\tlist-style-position: inside;\n}\n\n/*** Passing Styles */\n\n#qunit-tests li li.pass {\n\tcolor: #5E740B;\n\tbackground-color: #fff;\n\tborder-left: 26px solid #C6E746;\n}\n\n#qunit-tests .pass                          { color: #528CE0; background-color: #D2E0E6; }\n#qunit-tests .pass .test-name               { color: #366097; }\n\n#qunit-tests .pass .test-actual,\n#qunit-tests .pass .test-expected           { color: #999999; }\n\n#qunit-banner.qunit-pass                    { background-color: #C6E746; }\n\n/*** Failing Styles */\n\n#qunit-tests li li.fail {\n\tcolor: #710909;\n\tbackground-color: #fff;\n\tborder-left: 26px solid #EE5757;\n\twhite-space: pre;\n}\n\n#qunit-tests > li:last-child {\n\tborder-radius: 0 0 15px 15px;\n\t-moz-border-radius: 0 0 15px 15px;\n\t-webkit-border-bottom-right-radius: 15px;\n\t-webkit-border-bottom-left-radius: 15px;\n}\n\n#qunit-tests .fail                          { color: #000000; background-color: #EE5757; }\n#qunit-tests .fail .test-name,\n#qunit-tests .fail .module-name             { color: #000000; }\n\n#qunit-tests .fail .test-actual             { color: #EE5757; }\n#qunit-tests .fail .test-expected           { color: green;   }\n\n#qunit-banner.qunit-fail                    { background-color: #EE5757; }\n\n\n/** Result */\n\n#qunit-testresult {\n\tpadding: 0.5em 0.5em 0.5em 2.5em;\n\n\tcolor: #2b81af;\n\tbackground-color: #D2E0E6;\n\n\tborder-bottom: 1px solid white;\n}\n\n/** Fixture */\n\n#qunit-fixture {\n\tposition: absolute;\n\ttop: -10000px;\n\tleft: -10000px;\n}\n"
  },
  {
    "path": "test/qunit/qunit.js",
    "content": "/**\n * QUnit v1.2.0 - A JavaScript Unit Testing Framework\n *\n * http://docs.jquery.com/QUnit\n *\n * Copyright (c) 2011 John Resig, Jörn Zaefferer\n * Dual licensed under the MIT (MIT-LICENSE.txt)\n * or GPL (GPL-LICENSE.txt) licenses.\n */\n\n(function(window) {\n\nvar defined = {\n\tsetTimeout: typeof window.setTimeout !== \"undefined\",\n\tsessionStorage: (function() {\n\t\ttry {\n\t\t\treturn !!sessionStorage.getItem;\n\t\t} catch(e) {\n\t\t\treturn false;\n\t\t}\n\t})()\n};\n\nvar\ttestId = 0,\n\ttoString = Object.prototype.toString,\n\thasOwn = Object.prototype.hasOwnProperty;\n\nvar Test = function(name, testName, expected, testEnvironmentArg, async, callback) {\n\tthis.name = name;\n\tthis.testName = testName;\n\tthis.expected = expected;\n\tthis.testEnvironmentArg = testEnvironmentArg;\n\tthis.async = async;\n\tthis.callback = callback;\n\tthis.assertions = [];\n};\nTest.prototype = {\n\tinit: function() {\n\t\tvar tests = id(\"qunit-tests\");\n\t\tif (tests) {\n\t\t\tvar b = document.createElement(\"strong\");\n\t\t\t\tb.innerHTML = \"Running \" + this.name;\n\t\t\tvar li = document.createElement(\"li\");\n\t\t\t\tli.appendChild( b );\n\t\t\t\tli.className = \"running\";\n\t\t\t\tli.id = this.id = \"test-output\" + testId++;\n\t\t\ttests.appendChild( li );\n\t\t}\n\t},\n\tsetup: function() {\n\t\tif (this.module != config.previousModule) {\n\t\t\tif ( config.previousModule ) {\n\t\t\t\trunLoggingCallbacks('moduleDone', QUnit, {\n\t\t\t\t\tname: config.previousModule,\n\t\t\t\t\tfailed: config.moduleStats.bad,\n\t\t\t\t\tpassed: config.moduleStats.all - config.moduleStats.bad,\n\t\t\t\t\ttotal: config.moduleStats.all\n\t\t\t\t} );\n\t\t\t}\n\t\t\tconfig.previousModule = this.module;\n\t\t\tconfig.moduleStats = { all: 0, bad: 0 };\n\t\t\trunLoggingCallbacks( 'moduleStart', QUnit, {\n\t\t\t\tname: this.module\n\t\t\t} );\n\t\t}\n\n\t\tconfig.current = this;\n\t\tthis.testEnvironment = extend({\n\t\t\tsetup: function() {},\n\t\t\tteardown: function() {}\n\t\t}, this.moduleTestEnvironment);\n\t\tif (this.testEnvironmentArg) {\n\t\t\textend(this.testEnvironment, this.testEnvironmentArg);\n\t\t}\n\n\t\trunLoggingCallbacks( 'testStart', QUnit, {\n\t\t\tname: this.testName,\n\t\t\tmodule: this.module\n\t\t});\n\n\t\t// allow utility functions to access the current test environment\n\t\t// TODO why??\n\t\tQUnit.current_testEnvironment = this.testEnvironment;\n\n\t\ttry {\n\t\t\tif ( !config.pollution ) {\n\t\t\t\tsaveGlobal();\n\t\t\t}\n\n\t\t\tthis.testEnvironment.setup.call(this.testEnvironment);\n\t\t} catch(e) {\n\t\t\tQUnit.ok( false, \"Setup failed on \" + this.testName + \": \" + e.message );\n\t\t}\n\t},\n\trun: function() {\n\t\tconfig.current = this;\n\t\tif ( this.async ) {\n\t\t\tQUnit.stop();\n\t\t}\n\n\t\tif ( config.notrycatch ) {\n\t\t\tthis.callback.call(this.testEnvironment);\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tthis.callback.call(this.testEnvironment);\n\t\t} catch(e) {\n\t\t\tfail(\"Test \" + this.testName + \" died, exception and test follows\", e, this.callback);\n\t\t\tQUnit.ok( false, \"Died on test #\" + (this.assertions.length + 1) + \": \" + e.message + \" - \" + QUnit.jsDump.parse(e) );\n\t\t\t// else next test will carry the responsibility\n\t\t\tsaveGlobal();\n\n\t\t\t// Restart the tests if they're blocking\n\t\t\tif ( config.blocking ) {\n\t\t\t\tQUnit.start();\n\t\t\t}\n\t\t}\n\t},\n\tteardown: function() {\n\t\tconfig.current = this;\n\t\ttry {\n\t\t\tthis.testEnvironment.teardown.call(this.testEnvironment);\n\t\t\tcheckPollution();\n\t\t} catch(e) {\n\t\t\tQUnit.ok( false, \"Teardown failed on \" + this.testName + \": \" + e.message );\n\t\t}\n\t},\n\tfinish: function() {\n\t\tconfig.current = this;\n\t\tif ( this.expected != null && this.expected != this.assertions.length ) {\n\t\t\tQUnit.ok( false, \"Expected \" + this.expected + \" assertions, but \" + this.assertions.length + \" were run\" );\n\t\t}\n\n\t\tvar good = 0, bad = 0,\n\t\t\ttests = id(\"qunit-tests\");\n\n\t\tconfig.stats.all += this.assertions.length;\n\t\tconfig.moduleStats.all += this.assertions.length;\n\n\t\tif ( tests ) {\n\t\t\tvar ol = document.createElement(\"ol\");\n\n\t\t\tfor ( var i = 0; i < this.assertions.length; i++ ) {\n\t\t\t\tvar assertion = this.assertions[i];\n\n\t\t\t\tvar li = document.createElement(\"li\");\n\t\t\t\tli.className = assertion.result ? \"pass\" : \"fail\";\n\t\t\t\tli.innerHTML = assertion.message || (assertion.result ? \"okay\" : \"failed\");\n\t\t\t\tol.appendChild( li );\n\n\t\t\t\tif ( assertion.result ) {\n\t\t\t\t\tgood++;\n\t\t\t\t} else {\n\t\t\t\t\tbad++;\n\t\t\t\t\tconfig.stats.bad++;\n\t\t\t\t\tconfig.moduleStats.bad++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// store result when possible\n\t\t\tif ( QUnit.config.reorder && defined.sessionStorage ) {\n\t\t\t\tif (bad) {\n\t\t\t\t\tsessionStorage.setItem(\"qunit-\" + this.module + \"-\" + this.testName, bad);\n\t\t\t\t} else {\n\t\t\t\t\tsessionStorage.removeItem(\"qunit-\" + this.module + \"-\" + this.testName);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (bad == 0) {\n\t\t\t\tol.style.display = \"none\";\n\t\t\t}\n\n\t\t\tvar b = document.createElement(\"strong\");\n\t\t\tb.innerHTML = this.name + \" <b class='counts'>(<b class='failed'>\" + bad + \"</b>, <b class='passed'>\" + good + \"</b>, \" + this.assertions.length + \")</b>\";\n\n\t\t\tvar a = document.createElement(\"a\");\n\t\t\ta.innerHTML = \"Rerun\";\n\t\t\ta.href = QUnit.url({ filter: getText([b]).replace(/\\([^)]+\\)$/, \"\").replace(/(^\\s*|\\s*$)/g, \"\") });\n\n\t\t\taddEvent(b, \"click\", function() {\n\t\t\t\tvar next = b.nextSibling.nextSibling,\n\t\t\t\t\tdisplay = next.style.display;\n\t\t\t\tnext.style.display = display === \"none\" ? \"block\" : \"none\";\n\t\t\t});\n\n\t\t\taddEvent(b, \"dblclick\", function(e) {\n\t\t\t\tvar target = e && e.target ? e.target : window.event.srcElement;\n\t\t\t\tif ( target.nodeName.toLowerCase() == \"span\" || target.nodeName.toLowerCase() == \"b\" ) {\n\t\t\t\t\ttarget = target.parentNode;\n\t\t\t\t}\n\t\t\t\tif ( window.location && target.nodeName.toLowerCase() === \"strong\" ) {\n\t\t\t\t\twindow.location = QUnit.url({ filter: getText([target]).replace(/\\([^)]+\\)$/, \"\").replace(/(^\\s*|\\s*$)/g, \"\") });\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar li = id(this.id);\n\t\t\tli.className = bad ? \"fail\" : \"pass\";\n\t\t\tli.removeChild( li.firstChild );\n\t\t\tli.appendChild( b );\n\t\t\tli.appendChild( a );\n\t\t\tli.appendChild( ol );\n\n\t\t} else {\n\t\t\tfor ( var i = 0; i < this.assertions.length; i++ ) {\n\t\t\t\tif ( !this.assertions[i].result ) {\n\t\t\t\t\tbad++;\n\t\t\t\t\tconfig.stats.bad++;\n\t\t\t\t\tconfig.moduleStats.bad++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tQUnit.reset();\n\t\t} catch(e) {\n\t\t\tfail(\"reset() failed, following Test \" + this.testName + \", exception and reset fn follows\", e, QUnit.reset);\n\t\t}\n\n\t\trunLoggingCallbacks( 'testDone', QUnit, {\n\t\t\tname: this.testName,\n\t\t\tmodule: this.module,\n\t\t\tfailed: bad,\n\t\t\tpassed: this.assertions.length - bad,\n\t\t\ttotal: this.assertions.length\n\t\t} );\n\t},\n\n\tqueue: function() {\n\t\tvar test = this;\n\t\tsynchronize(function() {\n\t\t\ttest.init();\n\t\t});\n\t\tfunction run() {\n\t\t\t// each of these can by async\n\t\t\tsynchronize(function() {\n\t\t\t\ttest.setup();\n\t\t\t});\n\t\t\tsynchronize(function() {\n\t\t\t\ttest.run();\n\t\t\t});\n\t\t\tsynchronize(function() {\n\t\t\t\ttest.teardown();\n\t\t\t});\n\t\t\tsynchronize(function() {\n\t\t\t\ttest.finish();\n\t\t\t});\n\t\t}\n\t\t// defer when previous test run passed, if storage is available\n\t\tvar bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem(\"qunit-\" + this.module + \"-\" + this.testName);\n\t\tif (bad) {\n\t\t\trun();\n\t\t} else {\n\t\t\tsynchronize(run, true);\n\t\t};\n\t}\n\n};\n\nvar QUnit = {\n\n\t// call on start of module test to prepend name to all tests\n\tmodule: function(name, testEnvironment) {\n\t\tconfig.currentModule = name;\n\t\tconfig.currentModuleTestEnviroment = testEnvironment;\n\t},\n\n\tasyncTest: function(testName, expected, callback) {\n\t\tif ( arguments.length === 2 ) {\n\t\t\tcallback = expected;\n\t\t\texpected = null;\n\t\t}\n\n\t\tQUnit.test(testName, expected, callback, true);\n\t},\n\n\ttest: function(testName, expected, callback, async) {\n\t\tvar name = '<span class=\"test-name\">' + testName + '</span>', testEnvironmentArg;\n\n\t\tif ( arguments.length === 2 ) {\n\t\t\tcallback = expected;\n\t\t\texpected = null;\n\t\t}\n\t\t// is 2nd argument a testEnvironment?\n\t\tif ( expected && typeof expected === 'object') {\n\t\t\ttestEnvironmentArg = expected;\n\t\t\texpected = null;\n\t\t}\n\n\t\tif ( config.currentModule ) {\n\t\t\tname = '<span class=\"module-name\">' + config.currentModule + \"</span>: \" + name;\n\t\t}\n\n\t\tif ( !validTest(config.currentModule + \": \" + testName) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar test = new Test(name, testName, expected, testEnvironmentArg, async, callback);\n\t\ttest.module = config.currentModule;\n\t\ttest.moduleTestEnvironment = config.currentModuleTestEnviroment;\n\t\ttest.queue();\n\t},\n\n\t/**\n\t * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.\n\t */\n\texpect: function(asserts) {\n\t\tconfig.current.expected = asserts;\n\t},\n\n\t/**\n\t * Asserts true.\n\t * @example ok( \"asdfasdf\".length > 5, \"There must be at least 5 chars\" );\n\t */\n\tok: function(a, msg) {\n\t\ta = !!a;\n\t\tvar details = {\n\t\t\tresult: a,\n\t\t\tmessage: msg\n\t\t};\n\t\tmsg = escapeInnerText(msg);\n\t\trunLoggingCallbacks( 'log', QUnit, details );\n\t\tconfig.current.assertions.push({\n\t\t\tresult: a,\n\t\t\tmessage: msg\n\t\t});\n\t},\n\n\t/**\n\t * Checks that the first two arguments are equal, with an optional message.\n\t * Prints out both actual and expected values.\n\t *\n\t * Prefered to ok( actual == expected, message )\n\t *\n\t * @example equal( format(\"Received {0} bytes.\", 2), \"Received 2 bytes.\" );\n\t *\n\t * @param Object actual\n\t * @param Object expected\n\t * @param String message (optional)\n\t */\n\tequal: function(actual, expected, message) {\n\t\tQUnit.push(expected == actual, actual, expected, message);\n\t},\n\n\tnotEqual: function(actual, expected, message) {\n\t\tQUnit.push(expected != actual, actual, expected, message);\n\t},\n\n\tdeepEqual: function(actual, expected, message) {\n\t\tQUnit.push(QUnit.equiv(actual, expected), actual, expected, message);\n\t},\n\n\tnotDeepEqual: function(actual, expected, message) {\n\t\tQUnit.push(!QUnit.equiv(actual, expected), actual, expected, message);\n\t},\n\n\tstrictEqual: function(actual, expected, message) {\n\t\tQUnit.push(expected === actual, actual, expected, message);\n\t},\n\n\tnotStrictEqual: function(actual, expected, message) {\n\t\tQUnit.push(expected !== actual, actual, expected, message);\n\t},\n\n\traises: function(block, expected, message) {\n\t\tvar actual, ok = false;\n\n\t\tif (typeof expected === 'string') {\n\t\t\tmessage = expected;\n\t\t\texpected = null;\n\t\t}\n\n\t\ttry {\n\t\t\tblock();\n\t\t} catch (e) {\n\t\t\tactual = e;\n\t\t}\n\n\t\tif (actual) {\n\t\t\t// we don't want to validate thrown error\n\t\t\tif (!expected) {\n\t\t\t\tok = true;\n\t\t\t// expected is a regexp\n\t\t\t} else if (QUnit.objectType(expected) === \"regexp\") {\n\t\t\t\tok = expected.test(actual);\n\t\t\t// expected is a constructor\n\t\t\t} else if (actual instanceof expected) {\n\t\t\t\tok = true;\n\t\t\t// expected is a validation function which returns true is validation passed\n\t\t\t} else if (expected.call({}, actual) === true) {\n\t\t\t\tok = true;\n\t\t\t}\n\t\t}\n\n\t\tQUnit.ok(ok, message);\n\t},\n\n\tstart: function(count) {\n\t\tconfig.semaphore -= count || 1;\n\t\tif (config.semaphore > 0) {\n\t\t\t// don't start until equal number of stop-calls\n\t\t\treturn;\n\t\t}\n\t\tif (config.semaphore < 0) {\n\t\t\t// ignore if start is called more often then stop\n\t\t\tconfig.semaphore = 0;\n\t\t}\n\t\t// A slight delay, to avoid any current callbacks\n\t\tif ( defined.setTimeout ) {\n\t\t\twindow.setTimeout(function() {\n\t\t\t\tif (config.semaphore > 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( config.timeout ) {\n\t\t\t\t\tclearTimeout(config.timeout);\n\t\t\t\t}\n\n\t\t\t\tconfig.blocking = false;\n\t\t\t\tprocess(true);\n\t\t\t}, 13);\n\t\t} else {\n\t\t\tconfig.blocking = false;\n\t\t\tprocess(true);\n\t\t}\n\t},\n\n\tstop: function(count) {\n\t\tconfig.semaphore += count || 1;\n\t\tconfig.blocking = true;\n\n\t\tif ( config.testTimeout && defined.setTimeout ) {\n\t\t\tclearTimeout(config.timeout);\n\t\t\tconfig.timeout = window.setTimeout(function() {\n\t\t\t\tQUnit.ok( false, \"Test timed out\" );\n\t\t\t\tconfig.semaphore = 1;\n\t\t\t\tQUnit.start();\n\t\t\t}, config.testTimeout);\n\t\t}\n\t}\n};\n\n//We want access to the constructor's prototype\n(function() {\n\tfunction F(){};\n\tF.prototype = QUnit;\n\tQUnit = new F();\n\t//Make F QUnit's constructor so that we can add to the prototype later\n\tQUnit.constructor = F;\n})();\n\n// Backwards compatibility, deprecated\nQUnit.equals = QUnit.equal;\nQUnit.same = QUnit.deepEqual;\n\n// Maintain internal state\nvar config = {\n\t// The queue of tests to run\n\tqueue: [],\n\n\t// block until document ready\n\tblocking: true,\n\n\t// when enabled, show only failing tests\n\t// gets persisted through sessionStorage and can be changed in UI via checkbox\n\thidepassed: false,\n\n\t// by default, run previously failed tests first\n\t// very useful in combination with \"Hide passed tests\" checked\n\treorder: true,\n\n\t// by default, modify document.title when suite is done\n\taltertitle: true,\n\n\turlConfig: ['noglobals', 'notrycatch'],\n\n\t//logging callback queues\n\tbegin: [],\n\tdone: [],\n\tlog: [],\n\ttestStart: [],\n\ttestDone: [],\n\tmoduleStart: [],\n\tmoduleDone: []\n};\n\n// Load paramaters\n(function() {\n\tvar location = window.location || { search: \"\", protocol: \"file:\" },\n\t\tparams = location.search.slice( 1 ).split( \"&\" ),\n\t\tlength = params.length,\n\t\turlParams = {},\n\t\tcurrent;\n\n\tif ( params[ 0 ] ) {\n\t\tfor ( var i = 0; i < length; i++ ) {\n\t\t\tcurrent = params[ i ].split( \"=\" );\n\t\t\tcurrent[ 0 ] = decodeURIComponent( current[ 0 ] );\n\t\t\t// allow just a key to turn on a flag, e.g., test.html?noglobals\n\t\t\tcurrent[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;\n\t\t\turlParams[ current[ 0 ] ] = current[ 1 ];\n\t\t}\n\t}\n\n\tQUnit.urlParams = urlParams;\n\tconfig.filter = urlParams.filter;\n\n\t// Figure out if we're running the tests from a server or not\n\tQUnit.isLocal = !!(location.protocol === 'file:');\n})();\n\n// Expose the API as global variables, unless an 'exports'\n// object exists, in that case we assume we're in CommonJS\nif ( typeof exports === \"undefined\" || typeof require === \"undefined\" ) {\n\textend(window, QUnit);\n\twindow.QUnit = QUnit;\n} else {\n\textend(exports, QUnit);\n\texports.QUnit = QUnit;\n}\n\n// define these after exposing globals to keep them in these QUnit namespace only\nextend(QUnit, {\n\tconfig: config,\n\n\t// Initialize the configuration options\n\tinit: function() {\n\t\textend(config, {\n\t\t\tstats: { all: 0, bad: 0 },\n\t\t\tmoduleStats: { all: 0, bad: 0 },\n\t\t\tstarted: +new Date,\n\t\t\tupdateRate: 1000,\n\t\t\tblocking: false,\n\t\t\tautostart: true,\n\t\t\tautorun: false,\n\t\t\tfilter: \"\",\n\t\t\tqueue: [],\n\t\t\tsemaphore: 0\n\t\t});\n\n\t\tvar tests = id( \"qunit-tests\" ),\n\t\t\tbanner = id( \"qunit-banner\" ),\n\t\t\tresult = id( \"qunit-testresult\" );\n\n\t\tif ( tests ) {\n\t\t\ttests.innerHTML = \"\";\n\t\t}\n\n\t\tif ( banner ) {\n\t\t\tbanner.className = \"\";\n\t\t}\n\n\t\tif ( result ) {\n\t\t\tresult.parentNode.removeChild( result );\n\t\t}\n\n\t\tif ( tests ) {\n\t\t\tresult = document.createElement( \"p\" );\n\t\t\tresult.id = \"qunit-testresult\";\n\t\t\tresult.className = \"result\";\n\t\t\ttests.parentNode.insertBefore( result, tests );\n\t\t\tresult.innerHTML = 'Running...<br/>&nbsp;';\n\t\t}\n\t},\n\n\t/**\n\t * Resets the test setup. Useful for tests that modify the DOM.\n\t *\n\t * If jQuery is available, uses jQuery's html(), otherwise just innerHTML.\n\t */\n\treset: function() {\n\t\tif ( window.jQuery ) {\n\t\t\tjQuery( \"#qunit-fixture\" ).html( config.fixture );\n\t\t} else {\n\t\t\tvar main = id( 'qunit-fixture' );\n\t\t\tif ( main ) {\n\t\t\t\tmain.innerHTML = config.fixture;\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Trigger an event on an element.\n\t *\n\t * @example triggerEvent( document.body, \"click\" );\n\t *\n\t * @param DOMElement elem\n\t * @param String type\n\t */\n\ttriggerEvent: function( elem, type, event ) {\n\t\tif ( document.createEvent ) {\n\t\t\tevent = document.createEvent(\"MouseEvents\");\n\t\t\tevent.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,\n\t\t\t\t0, 0, 0, 0, 0, false, false, false, false, 0, null);\n\t\t\telem.dispatchEvent( event );\n\n\t\t} else if ( elem.fireEvent ) {\n\t\t\telem.fireEvent(\"on\"+type);\n\t\t}\n\t},\n\n\t// Safe object type checking\n\tis: function( type, obj ) {\n\t\treturn QUnit.objectType( obj ) == type;\n\t},\n\n\tobjectType: function( obj ) {\n\t\tif (typeof obj === \"undefined\") {\n\t\t\t\treturn \"undefined\";\n\n\t\t// consider: typeof null === object\n\t\t}\n\t\tif (obj === null) {\n\t\t\t\treturn \"null\";\n\t\t}\n\n\t\tvar type = toString.call( obj ).match(/^\\[object\\s(.*)\\]$/)[1] || '';\n\n\t\tswitch (type) {\n\t\t\t\tcase 'Number':\n\t\t\t\t\t\tif (isNaN(obj)) {\n\t\t\t\t\t\t\t\treturn \"nan\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn \"number\";\n\t\t\t\t\t\t}\n\t\t\t\tcase 'String':\n\t\t\t\tcase 'Boolean':\n\t\t\t\tcase 'Array':\n\t\t\t\tcase 'Date':\n\t\t\t\tcase 'RegExp':\n\t\t\t\tcase 'Function':\n\t\t\t\t\t\treturn type.toLowerCase();\n\t\t}\n\t\tif (typeof obj === \"object\") {\n\t\t\t\treturn \"object\";\n\t\t}\n\t\treturn undefined;\n\t},\n\n\tpush: function(result, actual, expected, message) {\n\t\tvar details = {\n\t\t\tresult: result,\n\t\t\tmessage: message,\n\t\t\tactual: actual,\n\t\t\texpected: expected\n\t\t};\n\n\t\tmessage = escapeInnerText(message) || (result ? \"okay\" : \"failed\");\n\t\tmessage = '<span class=\"test-message\">' + message + \"</span>\";\n\t\texpected = escapeInnerText(QUnit.jsDump.parse(expected));\n\t\tactual = escapeInnerText(QUnit.jsDump.parse(actual));\n\t\tvar output = message + '<table><tr class=\"test-expected\"><th>Expected: </th><td><pre>' + expected + '</pre></td></tr>';\n\t\tif (actual != expected) {\n\t\t\toutput += '<tr class=\"test-actual\"><th>Result: </th><td><pre>' + actual + '</pre></td></tr>';\n\t\t\toutput += '<tr class=\"test-diff\"><th>Diff: </th><td><pre>' + QUnit.diff(expected, actual) +'</pre></td></tr>';\n\t\t}\n\t\tif (!result) {\n\t\t\tvar source = sourceFromStacktrace();\n\t\t\tif (source) {\n\t\t\t\tdetails.source = source;\n\t\t\t\toutput += '<tr class=\"test-source\"><th>Source: </th><td><pre>' + escapeInnerText(source) + '</pre></td></tr>';\n\t\t\t}\n\t\t}\n\t\toutput += \"</table>\";\n\n\t\trunLoggingCallbacks( 'log', QUnit, details );\n\n\t\tconfig.current.assertions.push({\n\t\t\tresult: !!result,\n\t\t\tmessage: output\n\t\t});\n\t},\n\n\turl: function( params ) {\n\t\tparams = extend( extend( {}, QUnit.urlParams ), params );\n\t\tvar querystring = \"?\",\n\t\t\tkey;\n\t\tfor ( key in params ) {\n\t\t\tif ( !hasOwn.call( params, key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tquerystring += encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( params[ key ] ) + \"&\";\n\t\t}\n\t\treturn window.location.pathname + querystring.slice( 0, -1 );\n\t},\n\n\textend: extend,\n\tid: id,\n\taddEvent: addEvent\n});\n\n//QUnit.constructor is set to the empty F() above so that we can add to it's prototype later\n//Doing this allows us to tell if the following methods have been overwritten on the actual\n//QUnit object, which is a deprecated way of using the callbacks.\nextend(QUnit.constructor.prototype, {\n\t// Logging callbacks; all receive a single argument with the listed properties\n\t// run test/logs.html for any related changes\n\tbegin: registerLoggingCallback('begin'),\n\t// done: { failed, passed, total, runtime }\n\tdone: registerLoggingCallback('done'),\n\t// log: { result, actual, expected, message }\n\tlog: registerLoggingCallback('log'),\n\t// testStart: { name }\n\ttestStart: registerLoggingCallback('testStart'),\n\t// testDone: { name, failed, passed, total }\n\ttestDone: registerLoggingCallback('testDone'),\n\t// moduleStart: { name }\n\tmoduleStart: registerLoggingCallback('moduleStart'),\n\t// moduleDone: { name, failed, passed, total }\n\tmoduleDone: registerLoggingCallback('moduleDone')\n});\n\nif ( typeof document === \"undefined\" || document.readyState === \"complete\" ) {\n\tconfig.autorun = true;\n}\n\nQUnit.load = function() {\n\trunLoggingCallbacks( 'begin', QUnit, {} );\n\n\t// Initialize the config, saving the execution queue\n\tvar oldconfig = extend({}, config);\n\tQUnit.init();\n\textend(config, oldconfig);\n\n\tconfig.blocking = false;\n\n\tvar urlConfigHtml = '', len = config.urlConfig.length;\n\tfor ( var i = 0, val; i < len, val = config.urlConfig[i]; i++ ) {\n\t\tconfig[val] = QUnit.urlParams[val];\n\t\turlConfigHtml += '<label><input name=\"' + val + '\" type=\"checkbox\"' + ( config[val] ? ' checked=\"checked\"' : '' ) + '>' + val + '</label>';\n\t}\n\n\tvar userAgent = id(\"qunit-userAgent\");\n\tif ( userAgent ) {\n\t\tuserAgent.innerHTML = navigator.userAgent;\n\t}\n\tvar banner = id(\"qunit-header\");\n\tif ( banner ) {\n\t\tbanner.innerHTML = '<a href=\"' + QUnit.url({ filter: undefined }) + '\"> ' + banner.innerHTML + '</a> ' + urlConfigHtml;\n\t\taddEvent( banner, \"change\", function( event ) {\n\t\t\tvar params = {};\n\t\t\tparams[ event.target.name ] = event.target.checked ? true : undefined;\n\t\t\twindow.location = QUnit.url( params );\n\t\t});\n\t}\n\n\tvar toolbar = id(\"qunit-testrunner-toolbar\");\n\tif ( toolbar ) {\n\t\tvar filter = document.createElement(\"input\");\n\t\tfilter.type = \"checkbox\";\n\t\tfilter.id = \"qunit-filter-pass\";\n\t\taddEvent( filter, \"click\", function() {\n\t\t\tvar ol = document.getElementById(\"qunit-tests\");\n\t\t\tif ( filter.checked ) {\n\t\t\t\tol.className = ol.className + \" hidepass\";\n\t\t\t} else {\n\t\t\t\tvar tmp = \" \" + ol.className.replace( /[\\n\\t\\r]/g, \" \" ) + \" \";\n\t\t\t\tol.className = tmp.replace(/ hidepass /, \" \");\n\t\t\t}\n\t\t\tif ( defined.sessionStorage ) {\n\t\t\t\tif (filter.checked) {\n\t\t\t\t\tsessionStorage.setItem(\"qunit-filter-passed-tests\", \"true\");\n\t\t\t\t} else {\n\t\t\t\t\tsessionStorage.removeItem(\"qunit-filter-passed-tests\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem(\"qunit-filter-passed-tests\") ) {\n\t\t\tfilter.checked = true;\n\t\t\tvar ol = document.getElementById(\"qunit-tests\");\n\t\t\tol.className = ol.className + \" hidepass\";\n\t\t}\n\t\ttoolbar.appendChild( filter );\n\n\t\tvar label = document.createElement(\"label\");\n\t\tlabel.setAttribute(\"for\", \"qunit-filter-pass\");\n\t\tlabel.innerHTML = \"Hide passed tests\";\n\t\ttoolbar.appendChild( label );\n\t}\n\n\tvar main = id('qunit-fixture');\n\tif ( main ) {\n\t\tconfig.fixture = main.innerHTML;\n\t}\n\n\tif (config.autostart) {\n\t\tQUnit.start();\n\t}\n};\n\naddEvent(window, \"load\", QUnit.load);\n\n// addEvent(window, \"error\") gives us a useless event object\nwindow.onerror = function( message, file, line ) {\n\tif ( QUnit.config.current ) {\n\t\tok( false, message + \", \" + file + \":\" + line );\n\t} else {\n\t\ttest( \"global failure\", function() {\n\t\t\tok( false, message + \", \" + file + \":\" + line );\n\t\t});\n\t}\n};\n\nfunction done() {\n\tconfig.autorun = true;\n\n\t// Log the last module results\n\tif ( config.currentModule ) {\n\t\trunLoggingCallbacks( 'moduleDone', QUnit, {\n\t\t\tname: config.currentModule,\n\t\t\tfailed: config.moduleStats.bad,\n\t\t\tpassed: config.moduleStats.all - config.moduleStats.bad,\n\t\t\ttotal: config.moduleStats.all\n\t\t} );\n\t}\n\n\tvar banner = id(\"qunit-banner\"),\n\t\ttests = id(\"qunit-tests\"),\n\t\truntime = +new Date - config.started,\n\t\tpassed = config.stats.all - config.stats.bad,\n\t\thtml = [\n\t\t\t'Tests completed in ',\n\t\t\truntime,\n\t\t\t' milliseconds.<br/>',\n\t\t\t'<span class=\"passed\">',\n\t\t\tpassed,\n\t\t\t'</span> tests of <span class=\"total\">',\n\t\t\tconfig.stats.all,\n\t\t\t'</span> passed, <span class=\"failed\">',\n\t\t\tconfig.stats.bad,\n\t\t\t'</span> failed.'\n\t\t].join('');\n\n\tif ( banner ) {\n\t\tbanner.className = (config.stats.bad ? \"qunit-fail\" : \"qunit-pass\");\n\t}\n\n\tif ( tests ) {\n\t\tid( \"qunit-testresult\" ).innerHTML = html;\n\t}\n\n\tif ( config.altertitle && typeof document !== \"undefined\" && document.title ) {\n\t\t// show ✖ for good, ✔ for bad suite result in title\n\t\t// use escape sequences in case file gets loaded with non-utf-8-charset\n\t\tdocument.title = [\n\t\t\t(config.stats.bad ? \"\\u2716\" : \"\\u2714\"),\n\t\t\tdocument.title.replace(/^[\\u2714\\u2716] /i, \"\")\n\t\t].join(\" \");\n\t}\n\n\trunLoggingCallbacks( 'done', QUnit, {\n\t\tfailed: config.stats.bad,\n\t\tpassed: passed,\n\t\ttotal: config.stats.all,\n\t\truntime: runtime\n\t} );\n}\n\nfunction validTest( name ) {\n\tvar filter = config.filter,\n\t\trun = false;\n\n\tif ( !filter ) {\n\t\treturn true;\n\t}\n\n\tvar not = filter.charAt( 0 ) === \"!\";\n\tif ( not ) {\n\t\tfilter = filter.slice( 1 );\n\t}\n\n\tif ( name.indexOf( filter ) !== -1 ) {\n\t\treturn !not;\n\t}\n\n\tif ( not ) {\n\t\trun = true;\n\t}\n\n\treturn run;\n}\n\n// so far supports only Firefox, Chrome and Opera (buggy)\n// could be extended in the future to use something like https://github.com/csnover/TraceKit\nfunction sourceFromStacktrace() {\n\ttry {\n\t\tthrow new Error();\n\t} catch ( e ) {\n\t\tif (e.stacktrace) {\n\t\t\t// Opera\n\t\t\treturn e.stacktrace.split(\"\\n\")[6];\n\t\t} else if (e.stack) {\n\t\t\t// Firefox, Chrome\n\t\t\treturn e.stack.split(\"\\n\")[4];\n\t\t} else if (e.sourceURL) {\n\t\t\t// Safari, PhantomJS\n\t\t\t// TODO sourceURL points at the 'throw new Error' line above, useless\n\t\t\t//return e.sourceURL + \":\" + e.line;\n\t\t}\n\t}\n}\n\nfunction escapeInnerText(s) {\n\tif (!s) {\n\t\treturn \"\";\n\t}\n\ts = s + \"\";\n\treturn s.replace(/[\\&<>]/g, function(s) {\n\t\tswitch(s) {\n\t\t\tcase \"&\": return \"&amp;\";\n\t\t\tcase \"<\": return \"&lt;\";\n\t\t\tcase \">\": return \"&gt;\";\n\t\t\tdefault: return s;\n\t\t}\n\t});\n}\n\nfunction synchronize( callback, last ) {\n\tconfig.queue.push( callback );\n\n\tif ( config.autorun && !config.blocking ) {\n\t\tprocess(last);\n\t}\n}\n\nfunction process( last ) {\n\tvar start = new Date().getTime();\n\tconfig.depth = config.depth ? config.depth + 1 : 1;\n\n\twhile ( config.queue.length && !config.blocking ) {\n\t\tif ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {\n\t\t\tconfig.queue.shift()();\n\t\t} else {\n\t\t\twindow.setTimeout( function(){\n\t\t\t\tprocess( last );\n\t\t\t}, 13 );\n\t\t\tbreak;\n\t\t}\n\t}\n\tconfig.depth--;\n\tif ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {\n\t\tdone();\n\t}\n}\n\nfunction saveGlobal() {\n\tconfig.pollution = [];\n\n\tif ( config.noglobals ) {\n\t\tfor ( var key in window ) {\n\t\t\tif ( !hasOwn.call( window, key ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconfig.pollution.push( key );\n\t\t}\n\t}\n}\n\nfunction checkPollution( name ) {\n\tvar old = config.pollution;\n\tsaveGlobal();\n\n\tvar newGlobals = diff( config.pollution, old );\n\tif ( newGlobals.length > 0 ) {\n\t\tok( false, \"Introduced global variable(s): \" + newGlobals.join(\", \") );\n\t}\n\n\tvar deletedGlobals = diff( old, config.pollution );\n\tif ( deletedGlobals.length > 0 ) {\n\t\tok( false, \"Deleted global variable(s): \" + deletedGlobals.join(\", \") );\n\t}\n}\n\n// returns a new Array with the elements that are in a but not in b\nfunction diff( a, b ) {\n\tvar result = a.slice();\n\tfor ( var i = 0; i < result.length; i++ ) {\n\t\tfor ( var j = 0; j < b.length; j++ ) {\n\t\t\tif ( result[i] === b[j] ) {\n\t\t\t\tresult.splice(i, 1);\n\t\t\t\ti--;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn result;\n}\n\nfunction fail(message, exception, callback) {\n\tif ( typeof console !== \"undefined\" && console.error && console.warn ) {\n\t\tconsole.error(message);\n\t\tconsole.error(exception);\n\t\tconsole.warn(callback.toString());\n\n\t} else if ( window.opera && opera.postError ) {\n\t\topera.postError(message, exception, callback.toString);\n\t}\n}\n\nfunction extend(a, b) {\n\tfor ( var prop in b ) {\n\t\tif ( b[prop] === undefined ) {\n\t\t\tdelete a[prop];\n\n\t\t// Avoid \"Member not found\" error in IE8 caused by setting window.constructor\n\t\t} else if ( prop !== \"constructor\" || a !== window ) {\n\t\t\ta[prop] = b[prop];\n\t\t}\n\t}\n\n\treturn a;\n}\n\nfunction addEvent(elem, type, fn) {\n\tif ( elem.addEventListener ) {\n\t\telem.addEventListener( type, fn, false );\n\t} else if ( elem.attachEvent ) {\n\t\telem.attachEvent( \"on\" + type, fn );\n\t} else {\n\t\tfn();\n\t}\n}\n\nfunction id(name) {\n\treturn !!(typeof document !== \"undefined\" && document && document.getElementById) &&\n\t\tdocument.getElementById( name );\n}\n\nfunction registerLoggingCallback(key){\n\treturn function(callback){\n\t\tconfig[key].push( callback );\n\t};\n}\n\n// Supports deprecated method of completely overwriting logging callbacks\nfunction runLoggingCallbacks(key, scope, args) {\n\t//debugger;\n\tvar callbacks;\n\tif ( QUnit.hasOwnProperty(key) ) {\n\t\tQUnit[key].call(scope, args);\n\t} else {\n\t\tcallbacks = config[key];\n\t\tfor( var i = 0; i < callbacks.length; i++ ) {\n\t\t\tcallbacks[i].call( scope, args );\n\t\t}\n\t}\n}\n\n// Test for equality any JavaScript type.\n// Author: Philippe Rathé <prathe@gmail.com>\nQUnit.equiv = function () {\n\n\tvar innerEquiv; // the real equiv function\n\tvar callers = []; // stack to decide between skip/abort functions\n\tvar parents = []; // stack to avoiding loops from circular referencing\n\n\t// Call the o related callback with the given arguments.\n\tfunction bindCallbacks(o, callbacks, args) {\n\t\tvar prop = QUnit.objectType(o);\n\t\tif (prop) {\n\t\t\tif (QUnit.objectType(callbacks[prop]) === \"function\") {\n\t\t\t\treturn callbacks[prop].apply(callbacks, args);\n\t\t\t} else {\n\t\t\t\treturn callbacks[prop]; // or undefined\n\t\t\t}\n\t\t}\n\t}\n\n\tvar getProto = Object.getPrototypeOf || function (obj) {\n\t\treturn obj.__proto__;\n\t};\n\n\tvar callbacks = function () {\n\n\t\t// for string, boolean, number and null\n\t\tfunction useStrictEquality(b, a) {\n\t\t\tif (b instanceof a.constructor || a instanceof b.constructor) {\n\t\t\t\t// to catch short annotaion VS 'new' annotation of a\n\t\t\t\t// declaration\n\t\t\t\t// e.g. var i = 1;\n\t\t\t\t// var j = new Number(1);\n\t\t\t\treturn a == b;\n\t\t\t} else {\n\t\t\t\treturn a === b;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t\"string\" : useStrictEquality,\n\t\t\t\"boolean\" : useStrictEquality,\n\t\t\t\"number\" : useStrictEquality,\n\t\t\t\"null\" : useStrictEquality,\n\t\t\t\"undefined\" : useStrictEquality,\n\n\t\t\t\"nan\" : function(b) {\n\t\t\t\treturn isNaN(b);\n\t\t\t},\n\n\t\t\t\"date\" : function(b, a) {\n\t\t\t\treturn QUnit.objectType(b) === \"date\"\n\t\t\t\t\t\t&& a.valueOf() === b.valueOf();\n\t\t\t},\n\n\t\t\t\"regexp\" : function(b, a) {\n\t\t\t\treturn QUnit.objectType(b) === \"regexp\"\n\t\t\t\t\t\t&& a.source === b.source && // the regex itself\n\t\t\t\t\t\ta.global === b.global && // and its modifers\n\t\t\t\t\t\t\t\t\t\t\t\t\t// (gmi) ...\n\t\t\t\t\t\ta.ignoreCase === b.ignoreCase\n\t\t\t\t\t\t&& a.multiline === b.multiline;\n\t\t\t},\n\n\t\t\t// - skip when the property is a method of an instance (OOP)\n\t\t\t// - abort otherwise,\n\t\t\t// initial === would have catch identical references anyway\n\t\t\t\"function\" : function() {\n\t\t\t\tvar caller = callers[callers.length - 1];\n\t\t\t\treturn caller !== Object && typeof caller !== \"undefined\";\n\t\t\t},\n\n\t\t\t\"array\" : function(b, a) {\n\t\t\t\tvar i, j, loop;\n\t\t\t\tvar len;\n\n\t\t\t\t// b could be an object literal here\n\t\t\t\tif (!(QUnit.objectType(b) === \"array\")) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tlen = a.length;\n\t\t\t\tif (len !== b.length) { // safe and faster\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// track reference to avoid circular references\n\t\t\t\tparents.push(a);\n\t\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\t\tloop = false;\n\t\t\t\t\tfor (j = 0; j < parents.length; j++) {\n\t\t\t\t\t\tif (parents[j] === a[i]) {\n\t\t\t\t\t\t\tloop = true;// dont rewalk array\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!loop && !innerEquiv(a[i], b[i])) {\n\t\t\t\t\t\tparents.pop();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tparents.pop();\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t\"object\" : function(b, a) {\n\t\t\t\tvar i, j, loop;\n\t\t\t\tvar eq = true; // unless we can proove it\n\t\t\t\tvar aProperties = [], bProperties = []; // collection of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// strings\n\n\t\t\t\t// comparing constructors is more strict than using\n\t\t\t\t// instanceof\n\t\t\t\tif (a.constructor !== b.constructor) {\n\t\t\t\t\t// Allow objects with no prototype to be equivalent to\n\t\t\t\t\t// objects with Object as their constructor.\n\t\t\t\t\tif (!((getProto(a) === null && getProto(b) === Object.prototype) ||\n\t\t\t\t\t\t  (getProto(b) === null && getProto(a) === Object.prototype)))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// stack constructor before traversing properties\n\t\t\t\tcallers.push(a.constructor);\n\t\t\t\t// track reference to avoid circular references\n\t\t\t\tparents.push(a);\n\n\t\t\t\tfor (i in a) { // be strict: don't ensures hasOwnProperty\n\t\t\t\t\t\t\t\t// and go deep\n\t\t\t\t\tloop = false;\n\t\t\t\t\tfor (j = 0; j < parents.length; j++) {\n\t\t\t\t\t\tif (parents[j] === a[i])\n\t\t\t\t\t\t\tloop = true; // don't go down the same path\n\t\t\t\t\t\t\t\t\t\t\t// twice\n\t\t\t\t\t}\n\t\t\t\t\taProperties.push(i); // collect a's properties\n\n\t\t\t\t\tif (!loop && !innerEquiv(a[i], b[i])) {\n\t\t\t\t\t\teq = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallers.pop(); // unstack, we are done\n\t\t\t\tparents.pop();\n\n\t\t\t\tfor (i in b) {\n\t\t\t\t\tbProperties.push(i); // collect b's properties\n\t\t\t\t}\n\n\t\t\t\t// Ensures identical properties name\n\t\t\t\treturn eq\n\t\t\t\t\t\t&& innerEquiv(aProperties.sort(), bProperties\n\t\t\t\t\t\t\t\t.sort());\n\t\t\t}\n\t\t};\n\t}();\n\n\tinnerEquiv = function() { // can take multiple arguments\n\t\tvar args = Array.prototype.slice.apply(arguments);\n\t\tif (args.length < 2) {\n\t\t\treturn true; // end transition\n\t\t}\n\n\t\treturn (function(a, b) {\n\t\t\tif (a === b) {\n\t\t\t\treturn true; // catch the most you can\n\t\t\t} else if (a === null || b === null || typeof a === \"undefined\"\n\t\t\t\t\t|| typeof b === \"undefined\"\n\t\t\t\t\t|| QUnit.objectType(a) !== QUnit.objectType(b)) {\n\t\t\t\treturn false; // don't lose time with error prone cases\n\t\t\t} else {\n\t\t\t\treturn bindCallbacks(a, callbacks, [ b, a ]);\n\t\t\t}\n\n\t\t\t// apply transition with (1..n) arguments\n\t\t})(args[0], args[1])\n\t\t\t\t&& arguments.callee.apply(this, args.splice(1,\n\t\t\t\t\t\targs.length - 1));\n\t};\n\n\treturn innerEquiv;\n\n}();\n\n/**\n * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |\n * http://flesler.blogspot.com Licensed under BSD\n * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008\n *\n * @projectDescription Advanced and extensible data dumping for Javascript.\n * @version 1.0.0\n * @author Ariel Flesler\n * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}\n */\nQUnit.jsDump = (function() {\n\tfunction quote( str ) {\n\t\treturn '\"' + str.toString().replace(/\"/g, '\\\\\"') + '\"';\n\t};\n\tfunction literal( o ) {\n\t\treturn o + '';\n\t};\n\tfunction join( pre, arr, post ) {\n\t\tvar s = jsDump.separator(),\n\t\t\tbase = jsDump.indent(),\n\t\t\tinner = jsDump.indent(1);\n\t\tif ( arr.join )\n\t\t\tarr = arr.join( ',' + s + inner );\n\t\tif ( !arr )\n\t\t\treturn pre + post;\n\t\treturn [ pre, inner + arr, base + post ].join(s);\n\t};\n\tfunction array( arr, stack ) {\n\t\tvar i = arr.length, ret = Array(i);\n\t\tthis.up();\n\t\twhile ( i-- )\n\t\t\tret[i] = this.parse( arr[i] , undefined , stack);\n\t\tthis.down();\n\t\treturn join( '[', ret, ']' );\n\t};\n\n\tvar reName = /^function (\\w+)/;\n\n\tvar jsDump = {\n\t\tparse:function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance\n\t\t\tstack = stack || [ ];\n\t\t\tvar parser = this.parsers[ type || this.typeOf(obj) ];\n\t\t\ttype = typeof parser;\n\t\t\tvar inStack = inArray(obj, stack);\n\t\t\tif (inStack != -1) {\n\t\t\t\treturn 'recursion('+(inStack - stack.length)+')';\n\t\t\t}\n\t\t\t//else\n\t\t\tif (type == 'function')  {\n\t\t\t\t\tstack.push(obj);\n\t\t\t\t\tvar res = parser.call( this, obj, stack );\n\t\t\t\t\tstack.pop();\n\t\t\t\t\treturn res;\n\t\t\t}\n\t\t\t// else\n\t\t\treturn (type == 'string') ? parser : this.parsers.error;\n\t\t},\n\t\ttypeOf:function( obj ) {\n\t\t\tvar type;\n\t\t\tif ( obj === null ) {\n\t\t\t\ttype = \"null\";\n\t\t\t} else if (typeof obj === \"undefined\") {\n\t\t\t\ttype = \"undefined\";\n\t\t\t} else if (QUnit.is(\"RegExp\", obj)) {\n\t\t\t\ttype = \"regexp\";\n\t\t\t} else if (QUnit.is(\"Date\", obj)) {\n\t\t\t\ttype = \"date\";\n\t\t\t} else if (QUnit.is(\"Function\", obj)) {\n\t\t\t\ttype = \"function\";\n\t\t\t} else if (typeof obj.setInterval !== undefined && typeof obj.document !== \"undefined\" && typeof obj.nodeType === \"undefined\") {\n\t\t\t\ttype = \"window\";\n\t\t\t} else if (obj.nodeType === 9) {\n\t\t\t\ttype = \"document\";\n\t\t\t} else if (obj.nodeType) {\n\t\t\t\ttype = \"node\";\n\t\t\t} else if (\n\t\t\t\t// native arrays\n\t\t\t\ttoString.call( obj ) === \"[object Array]\" ||\n\t\t\t\t// NodeList objects\n\t\t\t\t( typeof obj.length === \"number\" && typeof obj.item !== \"undefined\" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === \"undefined\" ) ) )\n\t\t\t) {\n\t\t\t\ttype = \"array\";\n\t\t\t} else {\n\t\t\t\ttype = typeof obj;\n\t\t\t}\n\t\t\treturn type;\n\t\t},\n\t\tseparator:function() {\n\t\t\treturn this.multiline ?\tthis.HTML ? '<br />' : '\\n' : this.HTML ? '&nbsp;' : ' ';\n\t\t},\n\t\tindent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing\n\t\t\tif ( !this.multiline )\n\t\t\t\treturn '';\n\t\t\tvar chr = this.indentChar;\n\t\t\tif ( this.HTML )\n\t\t\t\tchr = chr.replace(/\\t/g,'   ').replace(/ /g,'&nbsp;');\n\t\t\treturn Array( this._depth_ + (extra||0) ).join(chr);\n\t\t},\n\t\tup:function( a ) {\n\t\t\tthis._depth_ += a || 1;\n\t\t},\n\t\tdown:function( a ) {\n\t\t\tthis._depth_ -= a || 1;\n\t\t},\n\t\tsetParser:function( name, parser ) {\n\t\t\tthis.parsers[name] = parser;\n\t\t},\n\t\t// The next 3 are exposed so you can use them\n\t\tquote:quote,\n\t\tliteral:literal,\n\t\tjoin:join,\n\t\t//\n\t\t_depth_: 1,\n\t\t// This is the list of parsers, to modify them, use jsDump.setParser\n\t\tparsers:{\n\t\t\twindow: '[Window]',\n\t\t\tdocument: '[Document]',\n\t\t\terror:'[ERROR]', //when no parser is found, shouldn't happen\n\t\t\tunknown: '[Unknown]',\n\t\t\t'null':'null',\n\t\t\t'undefined':'undefined',\n\t\t\t'function':function( fn ) {\n\t\t\t\tvar ret = 'function',\n\t\t\t\t\tname = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE\n\t\t\t\tif ( name )\n\t\t\t\t\tret += ' ' + name;\n\t\t\t\tret += '(';\n\n\t\t\t\tret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join('');\n\t\t\t\treturn join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' );\n\t\t\t},\n\t\t\tarray: array,\n\t\t\tnodelist: array,\n\t\t\targuments: array,\n\t\t\tobject:function( map, stack ) {\n\t\t\t\tvar ret = [ ];\n\t\t\t\tQUnit.jsDump.up();\n\t\t\t\tfor ( var key in map ) {\n\t\t\t\t    var val = map[key];\n\t\t\t\t\tret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(val, undefined, stack));\n                }\n\t\t\t\tQUnit.jsDump.down();\n\t\t\t\treturn join( '{', ret, '}' );\n\t\t\t},\n\t\t\tnode:function( node ) {\n\t\t\t\tvar open = QUnit.jsDump.HTML ? '&lt;' : '<',\n\t\t\t\t\tclose = QUnit.jsDump.HTML ? '&gt;' : '>';\n\n\t\t\t\tvar tag = node.nodeName.toLowerCase(),\n\t\t\t\t\tret = open + tag;\n\n\t\t\t\tfor ( var a in QUnit.jsDump.DOMAttrs ) {\n\t\t\t\t\tvar val = node[QUnit.jsDump.DOMAttrs[a]];\n\t\t\t\t\tif ( val )\n\t\t\t\t\t\tret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' );\n\t\t\t\t}\n\t\t\t\treturn ret + close + open + '/' + tag + close;\n\t\t\t},\n\t\t\tfunctionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function\n\t\t\t\tvar l = fn.length;\n\t\t\t\tif ( !l ) return '';\n\n\t\t\t\tvar args = Array(l);\n\t\t\t\twhile ( l-- )\n\t\t\t\t\targs[l] = String.fromCharCode(97+l);//97 is 'a'\n\t\t\t\treturn ' ' + args.join(', ') + ' ';\n\t\t\t},\n\t\t\tkey:quote, //object calls it internally, the key part of an item in a map\n\t\t\tfunctionCode:'[code]', //function calls it internally, it's the content of the function\n\t\t\tattribute:quote, //node calls it internally, it's an html attribute value\n\t\t\tstring:quote,\n\t\t\tdate:quote,\n\t\t\tregexp:literal, //regex\n\t\t\tnumber:literal,\n\t\t\t'boolean':literal\n\t\t},\n\t\tDOMAttrs:{//attributes to dump from nodes, name=>realName\n\t\t\tid:'id',\n\t\t\tname:'name',\n\t\t\t'class':'className'\n\t\t},\n\t\tHTML:false,//if true, entities are escaped ( <, >, \\t, space and \\n )\n\t\tindentChar:'  ',//indentation unit\n\t\tmultiline:true //if true, items in a collection, are separated by a \\n, else just a space.\n\t};\n\n\treturn jsDump;\n})();\n\n// from Sizzle.js\nfunction getText( elems ) {\n\tvar ret = \"\", elem;\n\n\tfor ( var i = 0; elems[i]; i++ ) {\n\t\telem = elems[i];\n\n\t\t// Get the text from text nodes and CDATA nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 4 ) {\n\t\t\tret += elem.nodeValue;\n\n\t\t// Traverse everything else, except comment nodes\n\t\t} else if ( elem.nodeType !== 8 ) {\n\t\t\tret += getText( elem.childNodes );\n\t\t}\n\t}\n\n\treturn ret;\n};\n\n//from jquery.js\nfunction inArray( elem, array ) {\n\tif ( array.indexOf ) {\n\t\treturn array.indexOf( elem );\n\t}\n\n\tfor ( var i = 0, length = array.length; i < length; i++ ) {\n\t\tif ( array[ i ] === elem ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\n/*\n * Javascript Diff Algorithm\n *  By John Resig (http://ejohn.org/)\n *  Modified by Chu Alan \"sprite\"\n *\n * Released under the MIT license.\n *\n * More Info:\n *  http://ejohn.org/projects/javascript-diff-algorithm/\n *\n * Usage: QUnit.diff(expected, actual)\n *\n * QUnit.diff(\"the quick brown fox jumped over\", \"the quick fox jumps over\") == \"the  quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over\"\n */\nQUnit.diff = (function() {\n\tfunction diff(o, n) {\n\t\tvar ns = {};\n\t\tvar os = {};\n\n\t\tfor (var i = 0; i < n.length; i++) {\n\t\t\tif (ns[n[i]] == null)\n\t\t\t\tns[n[i]] = {\n\t\t\t\t\trows: [],\n\t\t\t\t\to: null\n\t\t\t\t};\n\t\t\tns[n[i]].rows.push(i);\n\t\t}\n\n\t\tfor (var i = 0; i < o.length; i++) {\n\t\t\tif (os[o[i]] == null)\n\t\t\t\tos[o[i]] = {\n\t\t\t\t\trows: [],\n\t\t\t\t\tn: null\n\t\t\t\t};\n\t\t\tos[o[i]].rows.push(i);\n\t\t}\n\n\t\tfor (var i in ns) {\n\t\t\tif ( !hasOwn.call( ns, i ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (ns[i].rows.length == 1 && typeof(os[i]) != \"undefined\" && os[i].rows.length == 1) {\n\t\t\t\tn[ns[i].rows[0]] = {\n\t\t\t\t\ttext: n[ns[i].rows[0]],\n\t\t\t\t\trow: os[i].rows[0]\n\t\t\t\t};\n\t\t\t\to[os[i].rows[0]] = {\n\t\t\t\t\ttext: o[os[i].rows[0]],\n\t\t\t\t\trow: ns[i].rows[0]\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = 0; i < n.length - 1; i++) {\n\t\t\tif (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null &&\n\t\t\tn[i + 1] == o[n[i].row + 1]) {\n\t\t\t\tn[i + 1] = {\n\t\t\t\t\ttext: n[i + 1],\n\t\t\t\t\trow: n[i].row + 1\n\t\t\t\t};\n\t\t\t\to[n[i].row + 1] = {\n\t\t\t\t\ttext: o[n[i].row + 1],\n\t\t\t\t\trow: i + 1\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tfor (var i = n.length - 1; i > 0; i--) {\n\t\t\tif (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&\n\t\t\tn[i - 1] == o[n[i].row - 1]) {\n\t\t\t\tn[i - 1] = {\n\t\t\t\t\ttext: n[i - 1],\n\t\t\t\t\trow: n[i].row - 1\n\t\t\t\t};\n\t\t\t\to[n[i].row - 1] = {\n\t\t\t\t\ttext: o[n[i].row - 1],\n\t\t\t\t\trow: i - 1\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\to: o,\n\t\t\tn: n\n\t\t};\n\t}\n\n\treturn function(o, n) {\n\t\to = o.replace(/\\s+$/, '');\n\t\tn = n.replace(/\\s+$/, '');\n\t\tvar out = diff(o == \"\" ? [] : o.split(/\\s+/), n == \"\" ? [] : n.split(/\\s+/));\n\n\t\tvar str = \"\";\n\n\t\tvar oSpace = o.match(/\\s+/g);\n\t\tif (oSpace == null) {\n\t\t\toSpace = [\" \"];\n\t\t}\n\t\telse {\n\t\t\toSpace.push(\" \");\n\t\t}\n\t\tvar nSpace = n.match(/\\s+/g);\n\t\tif (nSpace == null) {\n\t\t\tnSpace = [\" \"];\n\t\t}\n\t\telse {\n\t\t\tnSpace.push(\" \");\n\t\t}\n\n\t\tif (out.n.length == 0) {\n\t\t\tfor (var i = 0; i < out.o.length; i++) {\n\t\t\t\tstr += '<del>' + out.o[i] + oSpace[i] + \"</del>\";\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (out.n[0].text == null) {\n\t\t\t\tfor (n = 0; n < out.o.length && out.o[n].text == null; n++) {\n\t\t\t\t\tstr += '<del>' + out.o[n] + oSpace[n] + \"</del>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < out.n.length; i++) {\n\t\t\t\tif (out.n[i].text == null) {\n\t\t\t\t\tstr += '<ins>' + out.n[i] + nSpace[i] + \"</ins>\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar pre = \"\";\n\n\t\t\t\t\tfor (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) {\n\t\t\t\t\t\tpre += '<del>' + out.o[n] + oSpace[n] + \"</del>\";\n\t\t\t\t\t}\n\t\t\t\t\tstr += \" \" + out.n[i].text + nSpace[i] + pre;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn str;\n\t};\n})();\n\n})(this);\n"
  },
  {
    "path": "test/style.all.css",
    "content": "html { font: 75% sans-serif; overflow-y: scroll; }\nbody { margin: 0; }\npre { margin: 0; padding: 1em 0; }\nsection { border: 0.5em solid #8C8; margin: 1em; padding: 1em; }\nh1 { margin: 1em 2em; }\nul { font: bold 1.5em sans-serif; margin: 1em; padding: 0 0 0 1.5em; }\nli { margin: 1em; }\na { color: #66C; text-decoration: none; }\n\n.pass { color: #090; }\n.fail { color: #F00; }"
  },
  {
    "path": "test/style.css",
    "content": "@import url(style.all.css);\n@import url(style.print.css);"
  },
  {
    "path": "test/style.print.css",
    "content": "@media print {\n\tsection {\n\t\tborder-style: dotted;\n\t}\n}"
  },
  {
    "path": "test/unit/tests.js",
    "content": "(function(){\n\nmodule(\"html5shiv tests\");\nvar blockElements  = \"article,aside,figcaption,figure,footer,header,hgroup,nav,section\".split(',');\n\nvar testEnv = [\n\t{\n\t\tdoc: document,\n\t\tinitialShivMethods: html5.shivMethods,\n\t\thtml5: html5,\n\t\tname: 'default'\n\t}\n];\n\n\nvar shivTests = function(fn, env){\n\tif(!env){\n\t\tenv = testEnv[0];\n\t}\n\tenv.html5.shivMethods = true;\n\tfn();\n\tenv.html5.shivMethods = env.initialShivMethods;\n};\n\nvar envTest = function(name, fn, frames){\n\tif(!frames){\n\t\tframes = ['default'];\n\t}\n\tasyncTest(name, function(){\n\t\t$.each(testEnv, function(i, env){\n\t\t\tif($.inArray(env.name, frames) != -1){\n\t\t\t\tfn(env);\n\t\t\t}\n\t\t});\n\t\tif(testEnv.length > 1){\n\t\t\tstart();\n\t\t} else {\n\t\t\tinitIframes();\n\t\t}\n\t});\n\t\n};\n\nQUnit.reset = function() {\n\t$.each(testEnv, function(i, env){\n\t\t$('#qunit-fixture', env.doc).html(env.fixture);\n\t});\n};\n\n\nvar initIframes = function(){\n\tif(testEnv.length > 1){return;}\n\ttestEnv[0].fixture = $('#qunit-fixture').html();\n\t\n\t$('iframe.test-frame').each(function(){\n\t\tvar win = this.contentWindow;\n\t\tif($('#qunit-fixture', win.document).length){\n\t\t\ttestEnv.push({\n\t\t\t\tdoc: win.document,\n\t\t\t\thtml5: win.html5,\n\t\t\t\tinitialShivMethods: (win.html5 || {}).shivMethods,\n\t\t\t\tfixture: $('#qunit-fixture', win.document).html(),\n\t\t\t\tname: this.src.split('?')[1]\n\t\t\t});\n\t\t}\n\t});\n\tif(testEnv.length > 1){\n\t\tstart();\n\t} else {\n\t\tsetTimeout(initIframes, 30);\n\t}\n};\n\n\n$(initIframes);\n\n\nenvTest(\"display block tests\", function(env){\n\t$.each(blockElements, function(i, elem){\n\t\tequals($(elem, env.doc).css('display'), 'block', elem +\" has display: block\");\n\t});\n\n}, ['default', 'disableMethodsBefore']);\n\nenvTest(\"test html5.createElement/html5.createDocumentFragment\", function(env){\n\tvar doc5 = html5;\n\tif(env.html5){\n\t\tdoc5 = env.html5;\n\t\tenv.html5.shivMethods = false;\n\t}\n\thtml5.shivMethods = false;\n\t\n\tvar fragDiv =  doc5.createElement('div', env.doc);\n\tvar frag = doc5.createDocumentFragment(env.doc);\n\tvar markText = \"with these words highlighted\";\n\tvar div = $( doc5.createElement('div', env.doc) ).html('<section><article><mark>s</mark></article>?</section>').appendTo(env.doc.getElementById('qunit-fixture'));\n\t\n\tfragDiv.innerHTML = '<section>This native javascript sentence is in a green box <mark>'+markText+'</mark>?</section>';\n\t\n\tfrag.appendChild(fragDiv);\n\tfragDiv.innerHTML += '<article>This native javascript sentence is also in a green box <mark>'+markText+'</mark>?</article>';\n\t\n\tenv.doc.getElementById('qunit-fixture').appendChild(frag);\n\t\n\tequals($('section article > mark', div).length, 1, \"found mark in section > article\");\n\tequals($('section > mark', fragDiv).html(), markText, \"innerHTML getter equals innerHTML setter\");\n\tequals($('article', fragDiv).css('borderTopWidth'), '2px', \"article has a 2px border\");\n\t\n\tif(env.html5){\n\t\tenv.html5.shivMethods = env.initialShivMethods;\n\t}\n\thtml5.shivMethods = true;\n}, ['disableMethodsBefore', 'disableMethodsAfter']);\n\n\nif(!html5.supportsUnknownElements){\n\n\tenvTest(\"config shivMethods test\", function(env){\n\t\tvar div = $('<div/>', env.doc).html('<section><article><mark></mark></article>?</section>').appendTo(env.doc.getElementById('qunit-fixture'));\n\t\tequals($('section article > mark', div).length, (env.html5.shivMethods) ? 1 : 0, \"found/no found mark in section > article\");\n\t}, ['default', 'disableMethodsBefore', 'disableMethodsAfter']);\n\t\n\tenvTest(\"config shivCSS test\", function(env){\n\t\t$.each(blockElements, function(i, elem){\n\t\t\tequals($(elem, env.doc).css('display'), 'inline', elem +\" has display: inline if unshived\");\n\t\t});\n\t\tenv.html5.shivCSS = true;\n\t\tenv.html5.shivDocument();\n\t\t$.each(blockElements, function(i, elem){\n\t\t\tequals($(elem, env.doc).css('display'), 'block', elem +\" has display: block. after reshiving\");\n\t\t});\n\t}, ['disableCSS']);\n}\n\nenvTest(\"config add elements test\", function(env){\n\tvar value = $.trim($('abcxyz', env.doc).html());\n\tok((html5.supportsUnknownElements || env.html5.elements.indexOf('abcxyz') !== -1) ? value : !value, \"unknownelement has one/none div inside: \"+ value);\n}, ['default', 'disableMethodsBefore', 'addUnknownBefore', 'addUnknownAfter']);\n\nenvTest(\"parsing tests\", function(env){\n\t$.each(blockElements, function(i, elem){\n\t\tequals($(elem +' div.inside', env.doc).length, 1, elem +\" has a div inside\");\n\t});\t\n}, ['default', 'disableMethodsBefore']);\n\nenvTest(\"style test\", function(env){\n\tvar article = $('article', env.doc);\n\tequals(article.css('borderTopWidth'), '2px', \"article has a 2px border\");\n}, ['default', 'disableMethodsBefore']);\n\nif (!html5.supportsUnknownElements) {\n\tenvTest(\"shiv different document\", function(env){\n\t\tvar markText = \"with these words highlighted3\";\n\t\tvar markup = '<section><article>This jQuery 1.6.4 sentence is in a green box <mark>' + markText + '</mark></article>?</section>';\n\t\t\n\t\tvar div = $('<div/>', env.doc).html(markup).appendTo(env.doc.getElementById('qunit-fixture'));\n\t\tequals($('section article > mark', div).length, 0, \"document is not shived\");\n\t\t\n\t\thtml5.shivDocument(env.doc);\n\t\t\n\t\tdiv = $('<div/>', env.doc).html(markup).appendTo(env.doc.getElementById('qunit-fixture'));\n\t\tequals($('section article > mark', div).length, 1, \"document is shived\");\n\t\tequals($('article', div).css('borderTopWidth'), '2px', \"article has a 2px border\");\n\t\t\n\t}, ['noEmbed']);\n}\n\t\nenvTest(\"createElement/innerHTML test\", function(env){\n\tshivTests(\n\t\tfunction(){\n\t\t\tvar div = env.doc.createElement('div');\n\t\t\tvar text = \"This native javascript sentence is in a green box <mark>with these words highlighted</mark>?\";\n\t\t\tdiv.innerHTML = '<section id=\"section\">'+ text +'</section>';\n\t\t\tenv.doc.getElementById('qunit-fixture').appendChild(div);\n\t\t\tequals($('#section', env.doc).html(), text, \"innerHTML getter equals innerHTML setter\");\n\t\t\tequals($('#section mark', env.doc).length, 1, \"section has a mark element inside\");\n\t\t},\n\t\tenv\n\t);\n}, ['default', 'disableMethodsBefore']);\n\nenvTest(\"createElement/createDocumentFragment/innerHTML test\", function(env){\n\tshivTests(\n\t\tfunction(){\n\t\t\tvar div = env.doc.createElement('div');\n\t\t\tvar frag = env.doc.createDocumentFragment();\n\t\t\tvar markText = \"with these words highlighted\";\n\t\t\tdiv.innerHTML = '<section>This native javascript sentence is in a green box <mark>'+markText+'</mark>?</section>';\n\t\t\tfrag.appendChild(div);\n\t\t\tdiv.innerHTML += '<article>This native javascript sentence is also in a green box <mark>'+markText+'</mark>?</article>';\n\t\t\tenv.doc.getElementById('qunit-fixture').appendChild(frag);\n\t\t\tequals($('section > mark', div).html(), markText, \"innerHTML getter equals innerHTML setter\");\n\t\t\tequals($('article', div).css('borderTopWidth'), '2px', \"article has a 2px border\");\n\t\t},\n\t\tenv\n\t);\n}, ['default', 'disableMethodsBefore']);\n\n\nenvTest(\"createDocumentFragment/cloneNode/innerHTML test\", function(env){\n\tshivTests(\n\t\tfunction(){\n\t\t\tvar frag = env.doc.createDocumentFragment();\n\t\t\tvar fragDiv = env.doc.createElement('div');\n\t\t\t\n\t\t\tvar markText = \"with these words highlighted2\";\n\t\t\tvar fragDivClone;\n\t\t\tfrag.appendChild(fragDiv);\n\t\t\t\n\t\t\tfragDiv.innerHTML = '<div><article>This native javascript sentence is also in a green box <mark>'+markText+'</mark>?</article></div>';\n\t\t\t\n\t\t\tfragDivClone = fragDiv.cloneNode(true);\n\t\t\t\n\t\t\tenv.doc.getElementById('qunit-fixture').appendChild(fragDivClone);\n\t\t\tequals($('mark', env.doc).html(), markText, \"innerHTML getter equals innerHTML setter\");\n\t\t},\n\t\tenv\n\t);\n}, ['default', 'addUnknownAfter']);\n\ntest(\"form test\", function() {\n\tshivTests(\n\t\tfunction(){\n\t\t\tvar form = document.createElement('form');\n\t\t\tvar select = document.createElement('select');\n\t\t\tvar input = document.createElement('input');\n\t\t\tvar button = document.createElement('button');\n\t\t\tvar option = document.createElement('option');\n\t\t\tvar markText = \"with these words highlighted2\";\n\t\t\t\n\t\t\tform.setAttribute('action', 'some/path');\n\t\t\tform.setAttribute('name', 'formName');\n\t\t\tform.target = '_blank';\n\t\t\tselect.name = 'selectName';\n\t\t\toption.value = '1.value';\n\t\t\tbutton.setAttribute('type', 'submit');\n\t\t\tinput.type = 'submit';\n\t\t\t\n\t\t\tform.innerHTML = '<article>This native javascript sentence is also in a green box <mark>'+markText+'</mark>?</article>';\n\t\t\t\n\t\t\t\n\t\t\tform.appendChild(select);\n\t\t\tform.appendChild(button);\n\t\t\tform.appendChild(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(select.add){\n\t\t\t\ttry {\n\t\t\t\t\tselect.add(option);\n\t\t\t\t} catch(er){\n\t\t\t\t\tselect.appendChild(option);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tselect.appendChild(option);\n\t\t\t}\n\t\t\tdocument.getElementById('qunit-fixture').appendChild(form);\n\t\t\t\n\t\t\tequals($('select option', form).val(), '1.value', \"select has one option with value\");\n\t\t\tequals($('article > mark', form).html(), markText, \"innerHTML getter equals innerHTML setter\");\n\t\t\tequals($('article', form).css('borderTopWidth'), '2px', \"article has a 2px border\");\n\t\t}\n\t);\n});\n\nenvTest(\"jQuery test\", function(env){\n\tshivTests(\n\t\tfunction(){\n\t\t\tvar markText = \"with these words highlighted3\";\n\t\t\tvar div = $('<div/>', env.doc).html('<section><article>This jQuery 1.6.4 sentence is in a green box <mark>'+markText+'</mark></article>?</section>').appendTo(env.doc.getElementById('qunit-fixture'));\n\t\t\tequals($('article > mark', div).html(), markText, \"innerHTML getter equals innerHTML setter\");\n\t\t\tequals($('article', div).css('borderTopWidth'), '2px', \"article has a 2px border\");\n\t\t},\n\t\tenv\n\t);\n});\n\n\n\n\n})();\n"
  }
]