r88687 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88686‎ | r88687 | r88688 >
Date:21:13, 23 May 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added wikidom, the beginings of a proper Document Object Model for Wikitext.
Modified paths:
  • /trunk/parsers/wikidom (added) (history)
  • /trunk/parsers/wikidom/README (added) (history)
  • /trunk/parsers/wikidom/demos (added) (history)
  • /trunk/parsers/wikidom/demos/renderers (added) (history)
  • /trunk/parsers/wikidom/demos/renderers/document.js (added) (history)
  • /trunk/parsers/wikidom/demos/renderers/index.html (added) (history)
  • /trunk/parsers/wikidom/lib (added) (history)
  • /trunk/parsers/wikidom/lib/jquery.js (added) (history)
  • /trunk/parsers/wikidom/lib/jquery.json.js (added) (history)
  • /trunk/parsers/wikidom/lib/qunit.css (added) (history)
  • /trunk/parsers/wikidom/lib/qunit.js (added) (history)
  • /trunk/parsers/wikidom/tests (added) (history)
  • /trunk/parsers/wikidom/tests/index.html (added) (history)
  • /trunk/parsers/wikidom/tests/wikidom.test.js (added) (history)
  • /trunk/parsers/wikidom/wikidom.js (added) (history)

Diff [purge]

Index: trunk/parsers/wikidom/tests/index.html
@@ -0,0 +1,18 @@
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 3+ "http://www.w3.org/TR/html4/loose.dtd">
 4+<html>
 5+ <head>
 6+ <title>Wikidom Tests</title>
 7+ <link rel="stylesheet" href="../lib/qunit.css" type="text/css" />
 8+ </head>
 9+ <body>
 10+ <h1 id="qunit-header">Wikidom Tests</h1>
 11+ <h2 id="qunit-banner"></h2>
 12+ <h2 id="qunit-userAgent"></h2>
 13+ <ol id="qunit-tests"></ol>
 14+ <script src="../lib/jquery.js" type="text/javascript"></script>
 15+ <script src="../lib/qunit.js" type="text/javascript"></script>
 16+ <script src="../wikidom.js" type="text/javascript"></script>
 17+ <script src="../wikidom.test.js" type="text/javascript"></script>
 18+ </body>
 19+</html>
Property changes on: trunk/parsers/wikidom/tests/index.html
___________________________________________________________________
Added: svn:mime-type
120 + text/plain
Index: trunk/parsers/wikidom/tests/wikidom.test.js
@@ -0,0 +1,201 @@
 2+module( 'Wikidom Serialization' );
 3+
 4+function assertSerializations( tests ) {
 5+ var htmlRenderer = new HtmlRenderer();
 6+ var wikitextRenderer = new WikitextRenderer();
 7+ for ( var i = 0; i < tests.length; i++ ) {
 8+ equals(
 9+ htmlRenderer.render( tests[i].dom ),
 10+ tests[i].html,
 11+ 'Serialize ' + tests[i].subject + ' to HTML'
 12+ );
 13+ }
 14+ for ( var i = 0; i < tests.length; i++ ) {
 15+ equals(
 16+ wikitextRenderer.render( tests[i].dom ),
 17+ tests[i].wikitext,
 18+ 'Serialize ' + tests[i].subject + ' to Wikitext'
 19+ );
 20+ }
 21+}
 22+
 23+test( 'Comments', function() {
 24+ assertSerializations( [
 25+ {
 26+ 'subject': 'comment',
 27+ 'dom': { 'blocks': [ {
 28+ 'type': 'comment',
 29+ 'text': 'Hello world!'
 30+ } ] },
 31+ 'html': '<!--Hello world!-->',
 32+ 'wikitext': '<!--Hello world!-->'
 33+ }
 34+ ] );
 35+} );
 36+
 37+test( 'Horizontal rules', function() {
 38+ assertSerializations( [
 39+ {
 40+ 'subject': 'horizontal rule',
 41+ 'dom': { 'blocks': [ {
 42+ 'type': 'rule',
 43+ } ] },
 44+ 'html': '<hr />',
 45+ 'wikitext': '----'
 46+ }
 47+ ] );
 48+} );
 49+
 50+test( 'Headings', function() {
 51+ assertSerializations( [
 52+ {
 53+ 'subject': 'level 1 heading',
 54+ 'dom': { 'blocks': [ {
 55+ 'type': 'heading',
 56+ 'level': 1,
 57+ 'line': { 'text': 'Heading 1' }
 58+ } ] },
 59+ 'html': '<h1>Heading 1</h1>',
 60+ 'wikitext': '=Heading 1='
 61+ },
 62+ {
 63+ 'subject': 'level 2 heading',
 64+ 'dom': { 'blocks': [ {
 65+ 'type': 'heading',
 66+ 'level': 2,
 67+ 'line': { 'text': 'Heading 2' }
 68+ } ] },
 69+ 'html': '<h2>Heading 2</h2>',
 70+ 'wikitext': '==Heading 2=='
 71+ },
 72+ {
 73+ 'subject': 'level 3 heading',
 74+ 'dom': { 'blocks': [ {
 75+ 'type': 'heading',
 76+ 'level': 3,
 77+ 'line': { 'text': 'Heading 3' }
 78+ } ] },
 79+ 'html': '<h3>Heading 3</h3>',
 80+ 'wikitext': '===Heading 3==='
 81+ },
 82+ {
 83+ 'subject': 'level 4 heading',
 84+ 'dom': { 'blocks': [ {
 85+ 'type': 'heading',
 86+ 'level': 4,
 87+ 'line': { 'text': 'Heading 4' }
 88+ } ] },
 89+ 'html': '<h4>Heading 4</h4>',
 90+ 'wikitext': '====Heading 4===='
 91+ },
 92+ {
 93+ 'subject': 'level 5 heading',
 94+ 'dom': { 'blocks': [ {
 95+ 'type': 'heading',
 96+ 'level': 5,
 97+ 'line': { 'text': 'Heading 5' }
 98+ } ] },
 99+ 'html': '<h5>Heading 5</h5>',
 100+ 'wikitext': '=====Heading 5====='
 101+ },
 102+ {
 103+ 'subject': 'level 6 heading',
 104+ 'dom': { 'blocks': [ {
 105+ 'type': 'heading',
 106+ 'level': 6,
 107+ 'line': { 'text': 'Heading 6' }
 108+ } ] },
 109+ 'html': '<h6>Heading 6</h6>',
 110+ 'wikitext': '======Heading 6======'
 111+ },
 112+ {
 113+ 'subject': 'level 1 heading with annotated text',
 114+ 'dom': { 'blocks': [ {
 115+ 'type': 'heading',
 116+ 'level': 1,
 117+ 'line': {
 118+ 'text': 'Heading with a link',
 119+ 'annotations': [
 120+ {
 121+ 'type': 'ilink',
 122+ 'range': {
 123+ 'offset': 15,
 124+ 'length': 4
 125+ },
 126+ 'data': {
 127+ 'title': 'Main_Page'
 128+ }
 129+ }
 130+ ]
 131+ }
 132+ } ] },
 133+ 'html': '<h1>Heading with a <a href="https://www.mediawiki.org/wiki/Main_Page">link</a></h1>',
 134+ 'wikitext': '=Heading with a [[Main_Page|link]]='
 135+ },
 136+ ] );
 137+} );
 138+
 139+test( 'Paragraphs', function() {
 140+ assertSerializations( [
 141+ {
 142+ 'subject': 'paragraph with a single line of plain text',
 143+ 'dom': { 'blocks': [ {
 144+ 'type': 'paragraph',
 145+ 'lines': [ { 'text': 'Line with plain text' } ]
 146+ } ] },
 147+ 'html': '<p>Line with plain text</p>',
 148+ 'wikitext': 'Line with plain text'
 149+ },
 150+ {
 151+ 'subject': 'paragraph with multiple lines of plain text',
 152+ 'dom': { 'blocks': [ {
 153+ 'type': 'paragraph',
 154+ 'lines': [
 155+ { 'text': 'Line with plain text' },
 156+ { 'text': 'Line with more plain text' }
 157+ ]
 158+ } ] },
 159+ 'html': '<p>Line with plain text\nLine with more plain text</p>',
 160+ 'wikitext': 'Line with plain text\nLine with more plain text'
 161+ },
 162+ {
 163+ 'subject': 'paragraph with a single line of annotated text',
 164+ 'dom': { 'blocks': [ {
 165+ 'type': 'paragraph',
 166+ 'lines': [
 167+ {
 168+ 'text': 'Line with bold and italic text',
 169+ 'annotations': [
 170+ {
 171+ 'type': 'bold',
 172+ 'range': {
 173+ 'offset': 10,
 174+ 'length': 4
 175+ }
 176+ },
 177+ {
 178+ 'type': 'italic',
 179+ 'range': {
 180+ 'offset': 19,
 181+ 'length': 6
 182+ }
 183+ }
 184+ ]
 185+ }
 186+ ]
 187+ } ] },
 188+ 'html': '<p>Line with <strong>bold</strong> and <em>italic</em> text</p>',
 189+ 'wikitext': 'Line with \'\'\'bold\'\'\' and \'\'italic\'\' text'
 190+ }
 191+ ] );
 192+} );
 193+
 194+// Lists
 195+test( 'Lists', function() {
 196+ assertSerializations( [] );
 197+} );
 198+
 199+// Tables
 200+test( 'Tables', function() {
 201+ assertSerializations( [] );
 202+} );
Property changes on: trunk/parsers/wikidom/tests/wikidom.test.js
___________________________________________________________________
Added: svn:mime-type
1203 + text/plain
Added: svn:eol-style
2204 + native
Index: trunk/parsers/wikidom/lib/jquery.json.js
@@ -0,0 +1,180 @@
 2+/*
 3+ * jQuery JSON Plugin
 4+ * version: 2.1 (2009-08-14)
 5+ *
 6+ * This document is licensed as free software under the terms of the
 7+ * MIT License: http://www.opensource.org/licenses/mit-license.php
 8+ *
 9+ * Brantley Harris wrote this plugin. It is based somewhat on the JSON.org
 10+ * website's http://www.json.org/json2.js, which proclaims:
 11+ * "NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.", a sentiment that
 12+ * I uphold.
 13+ *
 14+ * It is also influenced heavily by MochiKit's serializeJSON, which is
 15+ * copyrighted 2005 by Bob Ippolito.
 16+ *
 17+ * @see http://code.google.com/p/jquery-json/
 18+ */
 19+
 20+(function($) {
 21+ /** jQuery.toJSON( json-serializble )
 22+ Converts the given argument into a JSON respresentation.
 23+
 24+ If an object has a "toJSON" function, that will be used to get the representation.
 25+ Non-integer/string keys are skipped in the object, as are keys that point to a function.
 26+
 27+ json-serializble:
 28+ The *thing* to be converted.
 29+ **/
 30+ $.toJSON = function(o)
 31+ {
 32+ if (typeof(JSON) == 'object' && JSON.stringify)
 33+ return JSON.stringify(o);
 34+
 35+ var type = typeof(o);
 36+
 37+ if (o === null)
 38+ return "null";
 39+
 40+ if (type == "undefined")
 41+ return undefined;
 42+
 43+ if (type == "number" || type == "boolean")
 44+ return o + "";
 45+
 46+ if (type == "string")
 47+ return $.quoteString(o);
 48+
 49+ if (type == 'object')
 50+ {
 51+ if (typeof o.toJSON == "function")
 52+ return $.toJSON( o.toJSON() );
 53+
 54+ if (o.constructor === Date)
 55+ {
 56+ var month = o.getUTCMonth() + 1;
 57+ if (month < 10) month = '0' + month;
 58+
 59+ var day = o.getUTCDate();
 60+ if (day < 10) day = '0' + day;
 61+
 62+ var year = o.getUTCFullYear();
 63+
 64+ var hours = o.getUTCHours();
 65+ if (hours < 10) hours = '0' + hours;
 66+
 67+ var minutes = o.getUTCMinutes();
 68+ if (minutes < 10) minutes = '0' + minutes;
 69+
 70+ var seconds = o.getUTCSeconds();
 71+ if (seconds < 10) seconds = '0' + seconds;
 72+
 73+ var milli = o.getUTCMilliseconds();
 74+ if (milli < 100) milli = '0' + milli;
 75+ if (milli < 10) milli = '0' + milli;
 76+
 77+ return '"' + year + '-' + month + '-' + day + 'T' +
 78+ hours + ':' + minutes + ':' + seconds +
 79+ '.' + milli + 'Z"';
 80+ }
 81+
 82+ if (o.constructor === Array)
 83+ {
 84+ var ret = [];
 85+ for (var i = 0; i < o.length; i++)
 86+ ret.push( $.toJSON(o[i]) || "null" );
 87+
 88+ return "[" + ret.join(",") + "]";
 89+ }
 90+
 91+ var pairs = [];
 92+ for (var k in o) {
 93+ var name;
 94+ var type = typeof k;
 95+
 96+ if (type == "number")
 97+ name = '"' + k + '"';
 98+ else if (type == "string")
 99+ name = $.quoteString(k);
 100+ else
 101+ continue; //skip non-string or number keys
 102+
 103+ if (typeof o[k] == "function")
 104+ continue; //skip pairs where the value is a function.
 105+
 106+ var val = $.toJSON(o[k]);
 107+
 108+ pairs.push(name + ":" + val);
 109+ }
 110+
 111+ return "{" + pairs.join(", ") + "}";
 112+ }
 113+ };
 114+
 115+ /** jQuery.evalJSON(src)
 116+ Evaluates a given piece of json source.
 117+ **/
 118+ $.evalJSON = function(src)
 119+ {
 120+ if (typeof(JSON) == 'object' && JSON.parse)
 121+ return JSON.parse(src);
 122+ return eval("(" + src + ")");
 123+ };
 124+
 125+ /** jQuery.secureEvalJSON(src)
 126+ Evals JSON in a way that is *more* secure.
 127+ **/
 128+ $.secureEvalJSON = function(src)
 129+ {
 130+ if (typeof(JSON) == 'object' && JSON.parse)
 131+ return JSON.parse(src);
 132+
 133+ var filtered = src;
 134+ filtered = filtered.replace(/\\["\\\/bfnrtu]/g, '@');
 135+ filtered = filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']');
 136+ filtered = filtered.replace(/(?:^|:|,)(?:\s*\[)+/g, '');
 137+
 138+ if (/^[\],:{}\s]*$/.test(filtered))
 139+ return eval("(" + src + ")");
 140+ else
 141+ throw new SyntaxError("Error parsing JSON, source is not valid.");
 142+ };
 143+
 144+ /** jQuery.quoteString(string)
 145+ Returns a string-repr of a string, escaping quotes intelligently.
 146+ Mostly a support function for toJSON.
 147+
 148+ Examples:
 149+ >>> jQuery.quoteString("apple")
 150+ "apple"
 151+
 152+ >>> jQuery.quoteString('"Where are we going?", she asked.')
 153+ "\"Where are we going?\", she asked."
 154+ **/
 155+ $.quoteString = function(string)
 156+ {
 157+ if (string.match(_escapeable))
 158+ {
 159+ return '"' + string.replace(_escapeable, function (a)
 160+ {
 161+ var c = _meta[a];
 162+ if (typeof c === 'string') return c;
 163+ c = a.charCodeAt();
 164+ return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
 165+ }) + '"';
 166+ }
 167+ return '"' + string + '"';
 168+ };
 169+
 170+ var _escapeable = /["\\\x00-\x1f\x7f-\x9f]/g;
 171+
 172+ var _meta = {
 173+ '\b': '\\b',
 174+ '\t': '\\t',
 175+ '\n': '\\n',
 176+ '\f': '\\f',
 177+ '\r': '\\r',
 178+ '"' : '\\"',
 179+ '\\': '\\\\'
 180+ };
 181+})(jQuery);
Property changes on: trunk/parsers/wikidom/lib/jquery.json.js
___________________________________________________________________
Added: svn:mime-type
1182 + text/plain
Added: svn:eol-style
2183 + native
Index: trunk/parsers/wikidom/lib/qunit.css
@@ -0,0 +1,225 @@
 2+/**
 3+ * QUnit - A JavaScript Unit Testing Framework
 4+ *
 5+ * http://docs.jquery.com/QUnit
 6+ *
 7+ * Copyright (c) 2011 John Resig, Jörn Zaefferer
 8+ * Dual licensed under the MIT (MIT-LICENSE.txt)
 9+ * or GPL (GPL-LICENSE.txt) licenses.
 10+ */
 11+
 12+/** Font Family and Sizes */
 13+
 14+#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
 15+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
 16+}
 17+
 18+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
 19+#qunit-tests { font-size: smaller; }
 20+
 21+
 22+/** Resets */
 23+
 24+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
 25+ margin: 0;
 26+ padding: 0;
 27+}
 28+
 29+
 30+/** Header */
 31+
 32+#qunit-header {
 33+ padding: 0.5em 0 0.5em 1em;
 34+
 35+ color: #8699a4;
 36+ background-color: #0d3349;
 37+
 38+ font-size: 1.5em;
 39+ line-height: 1em;
 40+ font-weight: normal;
 41+
 42+ border-radius: 15px 15px 0 0;
 43+ -moz-border-radius: 15px 15px 0 0;
 44+ -webkit-border-top-right-radius: 15px;
 45+ -webkit-border-top-left-radius: 15px;
 46+}
 47+
 48+#qunit-header a {
 49+ text-decoration: none;
 50+ color: #c2ccd1;
 51+}
 52+
 53+#qunit-header a:hover,
 54+#qunit-header a:focus {
 55+ color: #fff;
 56+}
 57+
 58+#qunit-banner {
 59+ height: 5px;
 60+}
 61+
 62+#qunit-testrunner-toolbar {
 63+ padding: 0.5em 0 0.5em 2em;
 64+ color: #5E740B;
 65+ background-color: #eee;
 66+}
 67+
 68+#qunit-userAgent {
 69+ padding: 0.5em 0 0.5em 2.5em;
 70+ background-color: #2b81af;
 71+ color: #fff;
 72+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
 73+}
 74+
 75+
 76+/** Tests: Pass/Fail */
 77+
 78+#qunit-tests {
 79+ list-style-position: inside;
 80+}
 81+
 82+#qunit-tests li {
 83+ padding: 0.4em 0.5em 0.4em 2.5em;
 84+ border-bottom: 1px solid #fff;
 85+ list-style-position: inside;
 86+}
 87+
 88+#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
 89+ display: none;
 90+}
 91+
 92+#qunit-tests li strong {
 93+ cursor: pointer;
 94+}
 95+
 96+#qunit-tests li a {
 97+ padding: 0.5em;
 98+ color: #c2ccd1;
 99+ text-decoration: none;
 100+}
 101+#qunit-tests li a:hover,
 102+#qunit-tests li a:focus {
 103+ color: #000;
 104+}
 105+
 106+#qunit-tests ol {
 107+ margin-top: 0.5em;
 108+ padding: 0.5em;
 109+
 110+ background-color: #fff;
 111+
 112+ border-radius: 15px;
 113+ -moz-border-radius: 15px;
 114+ -webkit-border-radius: 15px;
 115+
 116+ box-shadow: inset 0px 2px 13px #999;
 117+ -moz-box-shadow: inset 0px 2px 13px #999;
 118+ -webkit-box-shadow: inset 0px 2px 13px #999;
 119+}
 120+
 121+#qunit-tests table {
 122+ border-collapse: collapse;
 123+ margin-top: .2em;
 124+}
 125+
 126+#qunit-tests th {
 127+ text-align: right;
 128+ vertical-align: top;
 129+ padding: 0 .5em 0 0;
 130+}
 131+
 132+#qunit-tests td {
 133+ vertical-align: top;
 134+}
 135+
 136+#qunit-tests pre {
 137+ margin: 0;
 138+ white-space: pre-wrap;
 139+ word-wrap: break-word;
 140+}
 141+
 142+#qunit-tests del {
 143+ background-color: #e0f2be;
 144+ color: #374e0c;
 145+ text-decoration: none;
 146+}
 147+
 148+#qunit-tests ins {
 149+ background-color: #ffcaca;
 150+ color: #500;
 151+ text-decoration: none;
 152+}
 153+
 154+/*** Test Counts */
 155+
 156+#qunit-tests b.counts { color: black; }
 157+#qunit-tests b.passed { color: #5E740B; }
 158+#qunit-tests b.failed { color: #710909; }
 159+
 160+#qunit-tests li li {
 161+ margin: 0.5em;
 162+ padding: 0.4em 0.5em 0.4em 0.5em;
 163+ background-color: #fff;
 164+ border-bottom: none;
 165+ list-style-position: inside;
 166+}
 167+
 168+/*** Passing Styles */
 169+
 170+#qunit-tests li li.pass {
 171+ color: #5E740B;
 172+ background-color: #fff;
 173+ border-left: 26px solid #C6E746;
 174+}
 175+
 176+#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
 177+#qunit-tests .pass .test-name { color: #366097; }
 178+
 179+#qunit-tests .pass .test-actual,
 180+#qunit-tests .pass .test-expected { color: #999999; }
 181+
 182+#qunit-banner.qunit-pass { background-color: #C6E746; }
 183+
 184+/*** Failing Styles */
 185+
 186+#qunit-tests li li.fail {
 187+ color: #710909;
 188+ background-color: #fff;
 189+ border-left: 26px solid #EE5757;
 190+}
 191+
 192+#qunit-tests > li:last-child {
 193+ border-radius: 0 0 15px 15px;
 194+ -moz-border-radius: 0 0 15px 15px;
 195+ -webkit-border-bottom-right-radius: 15px;
 196+ -webkit-border-bottom-left-radius: 15px;
 197+}
 198+
 199+#qunit-tests .fail { color: #000000; background-color: #EE5757; }
 200+#qunit-tests .fail .test-name,
 201+#qunit-tests .fail .module-name { color: #000000; }
 202+
 203+#qunit-tests .fail .test-actual { color: #EE5757; }
 204+#qunit-tests .fail .test-expected { color: green; }
 205+
 206+#qunit-banner.qunit-fail { background-color: #EE5757; }
 207+
 208+
 209+/** Result */
 210+
 211+#qunit-testresult {
 212+ padding: 0.5em 0.5em 0.5em 2.5em;
 213+
 214+ color: #2b81af;
 215+ background-color: #D2E0E6;
 216+
 217+ border-bottom: 1px solid white;
 218+}
 219+
 220+/** Fixture */
 221+
 222+#qunit-fixture {
 223+ position: absolute;
 224+ top: -10000px;
 225+ left: -10000px;
 226+}
Property changes on: trunk/parsers/wikidom/lib/qunit.css
___________________________________________________________________
Added: svn:mime-type
1227 + text/plain
Added: svn:eol-style
2228 + native
Added: svn:executable
3229 + *
Index: trunk/parsers/wikidom/lib/jquery.js
@@ -0,0 +1,8936 @@
 2+/*!
 3+ * jQuery JavaScript Library v1.6.1
 4+ * http://jquery.com/
 5+ *
 6+ * Copyright 2011, John Resig
 7+ * Dual licensed under the MIT or GPL Version 2 licenses.
 8+ * http://jquery.org/license
 9+ *
 10+ * Includes Sizzle.js
 11+ * http://sizzlejs.com/
 12+ * Copyright 2011, The Dojo Foundation
 13+ * Released under the MIT, BSD, and GPL Licenses.
 14+ *
 15+ * Date: Thu May 12 15:04:36 2011 -0400
 16+ */
 17+(function( window, undefined ) {
 18+
 19+// Use the correct document accordingly with window argument (sandbox)
 20+var document = window.document,
 21+ navigator = window.navigator,
 22+ location = window.location;
 23+var jQuery = (function() {
 24+
 25+// Define a local copy of jQuery
 26+var jQuery = function( selector, context ) {
 27+ // The jQuery object is actually just the init constructor 'enhanced'
 28+ return new jQuery.fn.init( selector, context, rootjQuery );
 29+ },
 30+
 31+ // Map over jQuery in case of overwrite
 32+ _jQuery = window.jQuery,
 33+
 34+ // Map over the $ in case of overwrite
 35+ _$ = window.$,
 36+
 37+ // A central reference to the root jQuery(document)
 38+ rootjQuery,
 39+
 40+ // A simple way to check for HTML strings or ID strings
 41+ // (both of which we optimize for)
 42+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
 43+
 44+ // Check if a string has a non-whitespace character in it
 45+ rnotwhite = /\S/,
 46+
 47+ // Used for trimming whitespace
 48+ trimLeft = /^\s+/,
 49+ trimRight = /\s+$/,
 50+
 51+ // Check for digits
 52+ rdigit = /\d/,
 53+
 54+ // Match a standalone tag
 55+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
 56+
 57+ // JSON RegExp
 58+ rvalidchars = /^[\],:{}\s]*$/,
 59+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
 60+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
 61+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
 62+
 63+ // Useragent RegExp
 64+ rwebkit = /(webkit)[ \/]([\w.]+)/,
 65+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
 66+ rmsie = /(msie) ([\w.]+)/,
 67+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
 68+
 69+ // Keep a UserAgent string for use with jQuery.browser
 70+ userAgent = navigator.userAgent,
 71+
 72+ // For matching the engine and version of the browser
 73+ browserMatch,
 74+
 75+ // The deferred used on DOM ready
 76+ readyList,
 77+
 78+ // The ready event handler
 79+ DOMContentLoaded,
 80+
 81+ // Save a reference to some core methods
 82+ toString = Object.prototype.toString,
 83+ hasOwn = Object.prototype.hasOwnProperty,
 84+ push = Array.prototype.push,
 85+ slice = Array.prototype.slice,
 86+ trim = String.prototype.trim,
 87+ indexOf = Array.prototype.indexOf,
 88+
 89+ // [[Class]] -> type pairs
 90+ class2type = {};
 91+
 92+jQuery.fn = jQuery.prototype = {
 93+ constructor: jQuery,
 94+ init: function( selector, context, rootjQuery ) {
 95+ var match, elem, ret, doc;
 96+
 97+ // Handle $(""), $(null), or $(undefined)
 98+ if ( !selector ) {
 99+ return this;
 100+ }
 101+
 102+ // Handle $(DOMElement)
 103+ if ( selector.nodeType ) {
 104+ this.context = this[0] = selector;
 105+ this.length = 1;
 106+ return this;
 107+ }
 108+
 109+ // The body element only exists once, optimize finding it
 110+ if ( selector === "body" && !context && document.body ) {
 111+ this.context = document;
 112+ this[0] = document.body;
 113+ this.selector = selector;
 114+ this.length = 1;
 115+ return this;
 116+ }
 117+
 118+ // Handle HTML strings
 119+ if ( typeof selector === "string" ) {
 120+ // Are we dealing with HTML string or an ID?
 121+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
 122+ // Assume that strings that start and end with <> are HTML and skip the regex check
 123+ match = [ null, selector, null ];
 124+
 125+ } else {
 126+ match = quickExpr.exec( selector );
 127+ }
 128+
 129+ // Verify a match, and that no context was specified for #id
 130+ if ( match && (match[1] || !context) ) {
 131+
 132+ // HANDLE: $(html) -> $(array)
 133+ if ( match[1] ) {
 134+ context = context instanceof jQuery ? context[0] : context;
 135+ doc = (context ? context.ownerDocument || context : document);
 136+
 137+ // If a single string is passed in and it's a single tag
 138+ // just do a createElement and skip the rest
 139+ ret = rsingleTag.exec( selector );
 140+
 141+ if ( ret ) {
 142+ if ( jQuery.isPlainObject( context ) ) {
 143+ selector = [ document.createElement( ret[1] ) ];
 144+ jQuery.fn.attr.call( selector, context, true );
 145+
 146+ } else {
 147+ selector = [ doc.createElement( ret[1] ) ];
 148+ }
 149+
 150+ } else {
 151+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
 152+ selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
 153+ }
 154+
 155+ return jQuery.merge( this, selector );
 156+
 157+ // HANDLE: $("#id")
 158+ } else {
 159+ elem = document.getElementById( match[2] );
 160+
 161+ // Check parentNode to catch when Blackberry 4.6 returns
 162+ // nodes that are no longer in the document #6963
 163+ if ( elem && elem.parentNode ) {
 164+ // Handle the case where IE and Opera return items
 165+ // by name instead of ID
 166+ if ( elem.id !== match[2] ) {
 167+ return rootjQuery.find( selector );
 168+ }
 169+
 170+ // Otherwise, we inject the element directly into the jQuery object
 171+ this.length = 1;
 172+ this[0] = elem;
 173+ }
 174+
 175+ this.context = document;
 176+ this.selector = selector;
 177+ return this;
 178+ }
 179+
 180+ // HANDLE: $(expr, $(...))
 181+ } else if ( !context || context.jquery ) {
 182+ return (context || rootjQuery).find( selector );
 183+
 184+ // HANDLE: $(expr, context)
 185+ // (which is just equivalent to: $(context).find(expr)
 186+ } else {
 187+ return this.constructor( context ).find( selector );
 188+ }
 189+
 190+ // HANDLE: $(function)
 191+ // Shortcut for document ready
 192+ } else if ( jQuery.isFunction( selector ) ) {
 193+ return rootjQuery.ready( selector );
 194+ }
 195+
 196+ if (selector.selector !== undefined) {
 197+ this.selector = selector.selector;
 198+ this.context = selector.context;
 199+ }
 200+
 201+ return jQuery.makeArray( selector, this );
 202+ },
 203+
 204+ // Start with an empty selector
 205+ selector: "",
 206+
 207+ // The current version of jQuery being used
 208+ jquery: "1.6.1",
 209+
 210+ // The default length of a jQuery object is 0
 211+ length: 0,
 212+
 213+ // The number of elements contained in the matched element set
 214+ size: function() {
 215+ return this.length;
 216+ },
 217+
 218+ toArray: function() {
 219+ return slice.call( this, 0 );
 220+ },
 221+
 222+ // Get the Nth element in the matched element set OR
 223+ // Get the whole matched element set as a clean array
 224+ get: function( num ) {
 225+ return num == null ?
 226+
 227+ // Return a 'clean' array
 228+ this.toArray() :
 229+
 230+ // Return just the object
 231+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
 232+ },
 233+
 234+ // Take an array of elements and push it onto the stack
 235+ // (returning the new matched element set)
 236+ pushStack: function( elems, name, selector ) {
 237+ // Build a new jQuery matched element set
 238+ var ret = this.constructor();
 239+
 240+ if ( jQuery.isArray( elems ) ) {
 241+ push.apply( ret, elems );
 242+
 243+ } else {
 244+ jQuery.merge( ret, elems );
 245+ }
 246+
 247+ // Add the old object onto the stack (as a reference)
 248+ ret.prevObject = this;
 249+
 250+ ret.context = this.context;
 251+
 252+ if ( name === "find" ) {
 253+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
 254+ } else if ( name ) {
 255+ ret.selector = this.selector + "." + name + "(" + selector + ")";
 256+ }
 257+
 258+ // Return the newly-formed element set
 259+ return ret;
 260+ },
 261+
 262+ // Execute a callback for every element in the matched set.
 263+ // (You can seed the arguments with an array of args, but this is
 264+ // only used internally.)
 265+ each: function( callback, args ) {
 266+ return jQuery.each( this, callback, args );
 267+ },
 268+
 269+ ready: function( fn ) {
 270+ // Attach the listeners
 271+ jQuery.bindReady();
 272+
 273+ // Add the callback
 274+ readyList.done( fn );
 275+
 276+ return this;
 277+ },
 278+
 279+ eq: function( i ) {
 280+ return i === -1 ?
 281+ this.slice( i ) :
 282+ this.slice( i, +i + 1 );
 283+ },
 284+
 285+ first: function() {
 286+ return this.eq( 0 );
 287+ },
 288+
 289+ last: function() {
 290+ return this.eq( -1 );
 291+ },
 292+
 293+ slice: function() {
 294+ return this.pushStack( slice.apply( this, arguments ),
 295+ "slice", slice.call(arguments).join(",") );
 296+ },
 297+
 298+ map: function( callback ) {
 299+ return this.pushStack( jQuery.map(this, function( elem, i ) {
 300+ return callback.call( elem, i, elem );
 301+ }));
 302+ },
 303+
 304+ end: function() {
 305+ return this.prevObject || this.constructor(null);
 306+ },
 307+
 308+ // For internal use only.
 309+ // Behaves like an Array's method, not like a jQuery method.
 310+ push: push,
 311+ sort: [].sort,
 312+ splice: [].splice
 313+};
 314+
 315+// Give the init function the jQuery prototype for later instantiation
 316+jQuery.fn.init.prototype = jQuery.fn;
 317+
 318+jQuery.extend = jQuery.fn.extend = function() {
 319+ var options, name, src, copy, copyIsArray, clone,
 320+ target = arguments[0] || {},
 321+ i = 1,
 322+ length = arguments.length,
 323+ deep = false;
 324+
 325+ // Handle a deep copy situation
 326+ if ( typeof target === "boolean" ) {
 327+ deep = target;
 328+ target = arguments[1] || {};
 329+ // skip the boolean and the target
 330+ i = 2;
 331+ }
 332+
 333+ // Handle case when target is a string or something (possible in deep copy)
 334+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
 335+ target = {};
 336+ }
 337+
 338+ // extend jQuery itself if only one argument is passed
 339+ if ( length === i ) {
 340+ target = this;
 341+ --i;
 342+ }
 343+
 344+ for ( ; i < length; i++ ) {
 345+ // Only deal with non-null/undefined values
 346+ if ( (options = arguments[ i ]) != null ) {
 347+ // Extend the base object
 348+ for ( name in options ) {
 349+ src = target[ name ];
 350+ copy = options[ name ];
 351+
 352+ // Prevent never-ending loop
 353+ if ( target === copy ) {
 354+ continue;
 355+ }
 356+
 357+ // Recurse if we're merging plain objects or arrays
 358+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
 359+ if ( copyIsArray ) {
 360+ copyIsArray = false;
 361+ clone = src && jQuery.isArray(src) ? src : [];
 362+
 363+ } else {
 364+ clone = src && jQuery.isPlainObject(src) ? src : {};
 365+ }
 366+
 367+ // Never move original objects, clone them
 368+ target[ name ] = jQuery.extend( deep, clone, copy );
 369+
 370+ // Don't bring in undefined values
 371+ } else if ( copy !== undefined ) {
 372+ target[ name ] = copy;
 373+ }
 374+ }
 375+ }
 376+ }
 377+
 378+ // Return the modified object
 379+ return target;
 380+};
 381+
 382+jQuery.extend({
 383+ noConflict: function( deep ) {
 384+ if ( window.$ === jQuery ) {
 385+ window.$ = _$;
 386+ }
 387+
 388+ if ( deep && window.jQuery === jQuery ) {
 389+ window.jQuery = _jQuery;
 390+ }
 391+
 392+ return jQuery;
 393+ },
 394+
 395+ // Is the DOM ready to be used? Set to true once it occurs.
 396+ isReady: false,
 397+
 398+ // A counter to track how many items to wait for before
 399+ // the ready event fires. See #6781
 400+ readyWait: 1,
 401+
 402+ // Hold (or release) the ready event
 403+ holdReady: function( hold ) {
 404+ if ( hold ) {
 405+ jQuery.readyWait++;
 406+ } else {
 407+ jQuery.ready( true );
 408+ }
 409+ },
 410+
 411+ // Handle when the DOM is ready
 412+ ready: function( wait ) {
 413+ // Either a released hold or an DOMready/load event and not yet ready
 414+ if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
 415+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
 416+ if ( !document.body ) {
 417+ return setTimeout( jQuery.ready, 1 );
 418+ }
 419+
 420+ // Remember that the DOM is ready
 421+ jQuery.isReady = true;
 422+
 423+ // If a normal DOM Ready event fired, decrement, and wait if need be
 424+ if ( wait !== true && --jQuery.readyWait > 0 ) {
 425+ return;
 426+ }
 427+
 428+ // If there are functions bound, to execute
 429+ readyList.resolveWith( document, [ jQuery ] );
 430+
 431+ // Trigger any bound ready events
 432+ if ( jQuery.fn.trigger ) {
 433+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
 434+ }
 435+ }
 436+ },
 437+
 438+ bindReady: function() {
 439+ if ( readyList ) {
 440+ return;
 441+ }
 442+
 443+ readyList = jQuery._Deferred();
 444+
 445+ // Catch cases where $(document).ready() is called after the
 446+ // browser event has already occurred.
 447+ if ( document.readyState === "complete" ) {
 448+ // Handle it asynchronously to allow scripts the opportunity to delay ready
 449+ return setTimeout( jQuery.ready, 1 );
 450+ }
 451+
 452+ // Mozilla, Opera and webkit nightlies currently support this event
 453+ if ( document.addEventListener ) {
 454+ // Use the handy event callback
 455+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
 456+
 457+ // A fallback to window.onload, that will always work
 458+ window.addEventListener( "load", jQuery.ready, false );
 459+
 460+ // If IE event model is used
 461+ } else if ( document.attachEvent ) {
 462+ // ensure firing before onload,
 463+ // maybe late but safe also for iframes
 464+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
 465+
 466+ // A fallback to window.onload, that will always work
 467+ window.attachEvent( "onload", jQuery.ready );
 468+
 469+ // If IE and not a frame
 470+ // continually check to see if the document is ready
 471+ var toplevel = false;
 472+
 473+ try {
 474+ toplevel = window.frameElement == null;
 475+ } catch(e) {}
 476+
 477+ if ( document.documentElement.doScroll && toplevel ) {
 478+ doScrollCheck();
 479+ }
 480+ }
 481+ },
 482+
 483+ // See test/unit/core.js for details concerning isFunction.
 484+ // Since version 1.3, DOM methods and functions like alert
 485+ // aren't supported. They return false on IE (#2968).
 486+ isFunction: function( obj ) {
 487+ return jQuery.type(obj) === "function";
 488+ },
 489+
 490+ isArray: Array.isArray || function( obj ) {
 491+ return jQuery.type(obj) === "array";
 492+ },
 493+
 494+ // A crude way of determining if an object is a window
 495+ isWindow: function( obj ) {
 496+ return obj && typeof obj === "object" && "setInterval" in obj;
 497+ },
 498+
 499+ isNaN: function( obj ) {
 500+ return obj == null || !rdigit.test( obj ) || isNaN( obj );
 501+ },
 502+
 503+ type: function( obj ) {
 504+ return obj == null ?
 505+ String( obj ) :
 506+ class2type[ toString.call(obj) ] || "object";
 507+ },
 508+
 509+ isPlainObject: function( obj ) {
 510+ // Must be an Object.
 511+ // Because of IE, we also have to check the presence of the constructor property.
 512+ // Make sure that DOM nodes and window objects don't pass through, as well
 513+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
 514+ return false;
 515+ }
 516+
 517+ // Not own constructor property must be Object
 518+ if ( obj.constructor &&
 519+ !hasOwn.call(obj, "constructor") &&
 520+ !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
 521+ return false;
 522+ }
 523+
 524+ // Own properties are enumerated firstly, so to speed up,
 525+ // if last one is own, then all properties are own.
 526+
 527+ var key;
 528+ for ( key in obj ) {}
 529+
 530+ return key === undefined || hasOwn.call( obj, key );
 531+ },
 532+
 533+ isEmptyObject: function( obj ) {
 534+ for ( var name in obj ) {
 535+ return false;
 536+ }
 537+ return true;
 538+ },
 539+
 540+ error: function( msg ) {
 541+ throw msg;
 542+ },
 543+
 544+ parseJSON: function( data ) {
 545+ if ( typeof data !== "string" || !data ) {
 546+ return null;
 547+ }
 548+
 549+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
 550+ data = jQuery.trim( data );
 551+
 552+ // Attempt to parse using the native JSON parser first
 553+ if ( window.JSON && window.JSON.parse ) {
 554+ return window.JSON.parse( data );
 555+ }
 556+
 557+ // Make sure the incoming data is actual JSON
 558+ // Logic borrowed from http://json.org/json2.js
 559+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
 560+ .replace( rvalidtokens, "]" )
 561+ .replace( rvalidbraces, "")) ) {
 562+
 563+ return (new Function( "return " + data ))();
 564+
 565+ }
 566+ jQuery.error( "Invalid JSON: " + data );
 567+ },
 568+
 569+ // Cross-browser xml parsing
 570+ // (xml & tmp used internally)
 571+ parseXML: function( data , xml , tmp ) {
 572+
 573+ if ( window.DOMParser ) { // Standard
 574+ tmp = new DOMParser();
 575+ xml = tmp.parseFromString( data , "text/xml" );
 576+ } else { // IE
 577+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
 578+ xml.async = "false";
 579+ xml.loadXML( data );
 580+ }
 581+
 582+ tmp = xml.documentElement;
 583+
 584+ if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) {
 585+ jQuery.error( "Invalid XML: " + data );
 586+ }
 587+
 588+ return xml;
 589+ },
 590+
 591+ noop: function() {},
 592+
 593+ // Evaluates a script in a global context
 594+ // Workarounds based on findings by Jim Driscoll
 595+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
 596+ globalEval: function( data ) {
 597+ if ( data && rnotwhite.test( data ) ) {
 598+ // We use execScript on Internet Explorer
 599+ // We use an anonymous function so that context is window
 600+ // rather than jQuery in Firefox
 601+ ( window.execScript || function( data ) {
 602+ window[ "eval" ].call( window, data );
 603+ } )( data );
 604+ }
 605+ },
 606+
 607+ nodeName: function( elem, name ) {
 608+ return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
 609+ },
 610+
 611+ // args is for internal usage only
 612+ each: function( object, callback, args ) {
 613+ var name, i = 0,
 614+ length = object.length,
 615+ isObj = length === undefined || jQuery.isFunction( object );
 616+
 617+ if ( args ) {
 618+ if ( isObj ) {
 619+ for ( name in object ) {
 620+ if ( callback.apply( object[ name ], args ) === false ) {
 621+ break;
 622+ }
 623+ }
 624+ } else {
 625+ for ( ; i < length; ) {
 626+ if ( callback.apply( object[ i++ ], args ) === false ) {
 627+ break;
 628+ }
 629+ }
 630+ }
 631+
 632+ // A special, fast, case for the most common use of each
 633+ } else {
 634+ if ( isObj ) {
 635+ for ( name in object ) {
 636+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
 637+ break;
 638+ }
 639+ }
 640+ } else {
 641+ for ( ; i < length; ) {
 642+ if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
 643+ break;
 644+ }
 645+ }
 646+ }
 647+ }
 648+
 649+ return object;
 650+ },
 651+
 652+ // Use native String.trim function wherever possible
 653+ trim: trim ?
 654+ function( text ) {
 655+ return text == null ?
 656+ "" :
 657+ trim.call( text );
 658+ } :
 659+
 660+ // Otherwise use our own trimming functionality
 661+ function( text ) {
 662+ return text == null ?
 663+ "" :
 664+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
 665+ },
 666+
 667+ // results is for internal usage only
 668+ makeArray: function( array, results ) {
 669+ var ret = results || [];
 670+
 671+ if ( array != null ) {
 672+ // The window, strings (and functions) also have 'length'
 673+ // The extra typeof function check is to prevent crashes
 674+ // in Safari 2 (See: #3039)
 675+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
 676+ var type = jQuery.type( array );
 677+
 678+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
 679+ push.call( ret, array );
 680+ } else {
 681+ jQuery.merge( ret, array );
 682+ }
 683+ }
 684+
 685+ return ret;
 686+ },
 687+
 688+ inArray: function( elem, array ) {
 689+
 690+ if ( indexOf ) {
 691+ return indexOf.call( array, elem );
 692+ }
 693+
 694+ for ( var i = 0, length = array.length; i < length; i++ ) {
 695+ if ( array[ i ] === elem ) {
 696+ return i;
 697+ }
 698+ }
 699+
 700+ return -1;
 701+ },
 702+
 703+ merge: function( first, second ) {
 704+ var i = first.length,
 705+ j = 0;
 706+
 707+ if ( typeof second.length === "number" ) {
 708+ for ( var l = second.length; j < l; j++ ) {
 709+ first[ i++ ] = second[ j ];
 710+ }
 711+
 712+ } else {
 713+ while ( second[j] !== undefined ) {
 714+ first[ i++ ] = second[ j++ ];
 715+ }
 716+ }
 717+
 718+ first.length = i;
 719+
 720+ return first;
 721+ },
 722+
 723+ grep: function( elems, callback, inv ) {
 724+ var ret = [], retVal;
 725+ inv = !!inv;
 726+
 727+ // Go through the array, only saving the items
 728+ // that pass the validator function
 729+ for ( var i = 0, length = elems.length; i < length; i++ ) {
 730+ retVal = !!callback( elems[ i ], i );
 731+ if ( inv !== retVal ) {
 732+ ret.push( elems[ i ] );
 733+ }
 734+ }
 735+
 736+ return ret;
 737+ },
 738+
 739+ // arg is for internal usage only
 740+ map: function( elems, callback, arg ) {
 741+ var value, key, ret = [],
 742+ i = 0,
 743+ length = elems.length,
 744+ // jquery objects are treated as arrays
 745+ isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
 746+
 747+ // Go through the array, translating each of the items to their
 748+ if ( isArray ) {
 749+ for ( ; i < length; i++ ) {
 750+ value = callback( elems[ i ], i, arg );
 751+
 752+ if ( value != null ) {
 753+ ret[ ret.length ] = value;
 754+ }
 755+ }
 756+
 757+ // Go through every key on the object,
 758+ } else {
 759+ for ( key in elems ) {
 760+ value = callback( elems[ key ], key, arg );
 761+
 762+ if ( value != null ) {
 763+ ret[ ret.length ] = value;
 764+ }
 765+ }
 766+ }
 767+
 768+ // Flatten any nested arrays
 769+ return ret.concat.apply( [], ret );
 770+ },
 771+
 772+ // A global GUID counter for objects
 773+ guid: 1,
 774+
 775+ // Bind a function to a context, optionally partially applying any
 776+ // arguments.
 777+ proxy: function( fn, context ) {
 778+ if ( typeof context === "string" ) {
 779+ var tmp = fn[ context ];
 780+ context = fn;
 781+ fn = tmp;
 782+ }
 783+
 784+ // Quick check to determine if target is callable, in the spec
 785+ // this throws a TypeError, but we will just return undefined.
 786+ if ( !jQuery.isFunction( fn ) ) {
 787+ return undefined;
 788+ }
 789+
 790+ // Simulated bind
 791+ var args = slice.call( arguments, 2 ),
 792+ proxy = function() {
 793+ return fn.apply( context, args.concat( slice.call( arguments ) ) );
 794+ };
 795+
 796+ // Set the guid of unique handler to the same of original handler, so it can be removed
 797+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
 798+
 799+ return proxy;
 800+ },
 801+
 802+ // Mutifunctional method to get and set values to a collection
 803+ // The value/s can be optionally by executed if its a function
 804+ access: function( elems, key, value, exec, fn, pass ) {
 805+ var length = elems.length;
 806+
 807+ // Setting many attributes
 808+ if ( typeof key === "object" ) {
 809+ for ( var k in key ) {
 810+ jQuery.access( elems, k, key[k], exec, fn, value );
 811+ }
 812+ return elems;
 813+ }
 814+
 815+ // Setting one attribute
 816+ if ( value !== undefined ) {
 817+ // Optionally, function values get executed if exec is true
 818+ exec = !pass && exec && jQuery.isFunction(value);
 819+
 820+ for ( var i = 0; i < length; i++ ) {
 821+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
 822+ }
 823+
 824+ return elems;
 825+ }
 826+
 827+ // Getting an attribute
 828+ return length ? fn( elems[0], key ) : undefined;
 829+ },
 830+
 831+ now: function() {
 832+ return (new Date()).getTime();
 833+ },
 834+
 835+ // Use of jQuery.browser is frowned upon.
 836+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
 837+ uaMatch: function( ua ) {
 838+ ua = ua.toLowerCase();
 839+
 840+ var match = rwebkit.exec( ua ) ||
 841+ ropera.exec( ua ) ||
 842+ rmsie.exec( ua ) ||
 843+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
 844+ [];
 845+
 846+ return { browser: match[1] || "", version: match[2] || "0" };
 847+ },
 848+
 849+ sub: function() {
 850+ function jQuerySub( selector, context ) {
 851+ return new jQuerySub.fn.init( selector, context );
 852+ }
 853+ jQuery.extend( true, jQuerySub, this );
 854+ jQuerySub.superclass = this;
 855+ jQuerySub.fn = jQuerySub.prototype = this();
 856+ jQuerySub.fn.constructor = jQuerySub;
 857+ jQuerySub.sub = this.sub;
 858+ jQuerySub.fn.init = function init( selector, context ) {
 859+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
 860+ context = jQuerySub( context );
 861+ }
 862+
 863+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
 864+ };
 865+ jQuerySub.fn.init.prototype = jQuerySub.fn;
 866+ var rootjQuerySub = jQuerySub(document);
 867+ return jQuerySub;
 868+ },
 869+
 870+ browser: {}
 871+});
 872+
 873+// Populate the class2type map
 874+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
 875+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
 876+});
 877+
 878+browserMatch = jQuery.uaMatch( userAgent );
 879+if ( browserMatch.browser ) {
 880+ jQuery.browser[ browserMatch.browser ] = true;
 881+ jQuery.browser.version = browserMatch.version;
 882+}
 883+
 884+// Deprecated, use jQuery.browser.webkit instead
 885+if ( jQuery.browser.webkit ) {
 886+ jQuery.browser.safari = true;
 887+}
 888+
 889+// IE doesn't match non-breaking spaces with \s
 890+if ( rnotwhite.test( "\xA0" ) ) {
 891+ trimLeft = /^[\s\xA0]+/;
 892+ trimRight = /[\s\xA0]+$/;
 893+}
 894+
 895+// All jQuery objects should point back to these
 896+rootjQuery = jQuery(document);
 897+
 898+// Cleanup functions for the document ready method
 899+if ( document.addEventListener ) {
 900+ DOMContentLoaded = function() {
 901+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
 902+ jQuery.ready();
 903+ };
 904+
 905+} else if ( document.attachEvent ) {
 906+ DOMContentLoaded = function() {
 907+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
 908+ if ( document.readyState === "complete" ) {
 909+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
 910+ jQuery.ready();
 911+ }
 912+ };
 913+}
 914+
 915+// The DOM ready check for Internet Explorer
 916+function doScrollCheck() {
 917+ if ( jQuery.isReady ) {
 918+ return;
 919+ }
 920+
 921+ try {
 922+ // If IE is used, use the trick by Diego Perini
 923+ // http://javascript.nwbox.com/IEContentLoaded/
 924+ document.documentElement.doScroll("left");
 925+ } catch(e) {
 926+ setTimeout( doScrollCheck, 1 );
 927+ return;
 928+ }
 929+
 930+ // and execute any waiting functions
 931+ jQuery.ready();
 932+}
 933+
 934+// Expose jQuery to the global object
 935+return jQuery;
 936+
 937+})();
 938+
 939+
 940+var // Promise methods
 941+ promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ),
 942+ // Static reference to slice
 943+ sliceDeferred = [].slice;
 944+
 945+jQuery.extend({
 946+ // Create a simple deferred (one callbacks list)
 947+ _Deferred: function() {
 948+ var // callbacks list
 949+ callbacks = [],
 950+ // stored [ context , args ]
 951+ fired,
 952+ // to avoid firing when already doing so
 953+ firing,
 954+ // flag to know if the deferred has been cancelled
 955+ cancelled,
 956+ // the deferred itself
 957+ deferred = {
 958+
 959+ // done( f1, f2, ...)
 960+ done: function() {
 961+ if ( !cancelled ) {
 962+ var args = arguments,
 963+ i,
 964+ length,
 965+ elem,
 966+ type,
 967+ _fired;
 968+ if ( fired ) {
 969+ _fired = fired;
 970+ fired = 0;
 971+ }
 972+ for ( i = 0, length = args.length; i < length; i++ ) {
 973+ elem = args[ i ];
 974+ type = jQuery.type( elem );
 975+ if ( type === "array" ) {
 976+ deferred.done.apply( deferred, elem );
 977+ } else if ( type === "function" ) {
 978+ callbacks.push( elem );
 979+ }
 980+ }
 981+ if ( _fired ) {
 982+ deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] );
 983+ }
 984+ }
 985+ return this;
 986+ },
 987+
 988+ // resolve with given context and args
 989+ resolveWith: function( context, args ) {
 990+ if ( !cancelled && !fired && !firing ) {
 991+ // make sure args are available (#8421)
 992+ args = args || [];
 993+ firing = 1;
 994+ try {
 995+ while( callbacks[ 0 ] ) {
 996+ callbacks.shift().apply( context, args );
 997+ }
 998+ }
 999+ finally {
 1000+ fired = [ context, args ];
 1001+ firing = 0;
 1002+ }
 1003+ }
 1004+ return this;
 1005+ },
 1006+
 1007+ // resolve with this as context and given arguments
 1008+ resolve: function() {
 1009+ deferred.resolveWith( this, arguments );
 1010+ return this;
 1011+ },
 1012+
 1013+ // Has this deferred been resolved?
 1014+ isResolved: function() {
 1015+ return !!( firing || fired );
 1016+ },
 1017+
 1018+ // Cancel
 1019+ cancel: function() {
 1020+ cancelled = 1;
 1021+ callbacks = [];
 1022+ return this;
 1023+ }
 1024+ };
 1025+
 1026+ return deferred;
 1027+ },
 1028+
 1029+ // Full fledged deferred (two callbacks list)
 1030+ Deferred: function( func ) {
 1031+ var deferred = jQuery._Deferred(),
 1032+ failDeferred = jQuery._Deferred(),
 1033+ promise;
 1034+ // Add errorDeferred methods, then and promise
 1035+ jQuery.extend( deferred, {
 1036+ then: function( doneCallbacks, failCallbacks ) {
 1037+ deferred.done( doneCallbacks ).fail( failCallbacks );
 1038+ return this;
 1039+ },
 1040+ always: function() {
 1041+ return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments );
 1042+ },
 1043+ fail: failDeferred.done,
 1044+ rejectWith: failDeferred.resolveWith,
 1045+ reject: failDeferred.resolve,
 1046+ isRejected: failDeferred.isResolved,
 1047+ pipe: function( fnDone, fnFail ) {
 1048+ return jQuery.Deferred(function( newDefer ) {
 1049+ jQuery.each( {
 1050+ done: [ fnDone, "resolve" ],
 1051+ fail: [ fnFail, "reject" ]
 1052+ }, function( handler, data ) {
 1053+ var fn = data[ 0 ],
 1054+ action = data[ 1 ],
 1055+ returned;
 1056+ if ( jQuery.isFunction( fn ) ) {
 1057+ deferred[ handler ](function() {
 1058+ returned = fn.apply( this, arguments );
 1059+ if ( returned && jQuery.isFunction( returned.promise ) ) {
 1060+ returned.promise().then( newDefer.resolve, newDefer.reject );
 1061+ } else {
 1062+ newDefer[ action ]( returned );
 1063+ }
 1064+ });
 1065+ } else {
 1066+ deferred[ handler ]( newDefer[ action ] );
 1067+ }
 1068+ });
 1069+ }).promise();
 1070+ },
 1071+ // Get a promise for this deferred
 1072+ // If obj is provided, the promise aspect is added to the object
 1073+ promise: function( obj ) {
 1074+ if ( obj == null ) {
 1075+ if ( promise ) {
 1076+ return promise;
 1077+ }
 1078+ promise = obj = {};
 1079+ }
 1080+ var i = promiseMethods.length;
 1081+ while( i-- ) {
 1082+ obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
 1083+ }
 1084+ return obj;
 1085+ }
 1086+ });
 1087+ // Make sure only one callback list will be used
 1088+ deferred.done( failDeferred.cancel ).fail( deferred.cancel );
 1089+ // Unexpose cancel
 1090+ delete deferred.cancel;
 1091+ // Call given func if any
 1092+ if ( func ) {
 1093+ func.call( deferred, deferred );
 1094+ }
 1095+ return deferred;
 1096+ },
 1097+
 1098+ // Deferred helper
 1099+ when: function( firstParam ) {
 1100+ var args = arguments,
 1101+ i = 0,
 1102+ length = args.length,
 1103+ count = length,
 1104+ deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
 1105+ firstParam :
 1106+ jQuery.Deferred();
 1107+ function resolveFunc( i ) {
 1108+ return function( value ) {
 1109+ args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
 1110+ if ( !( --count ) ) {
 1111+ // Strange bug in FF4:
 1112+ // Values changed onto the arguments object sometimes end up as undefined values
 1113+ // outside the $.when method. Cloning the object into a fresh array solves the issue
 1114+ deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
 1115+ }
 1116+ };
 1117+ }
 1118+ if ( length > 1 ) {
 1119+ for( ; i < length; i++ ) {
 1120+ if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) {
 1121+ args[ i ].promise().then( resolveFunc(i), deferred.reject );
 1122+ } else {
 1123+ --count;
 1124+ }
 1125+ }
 1126+ if ( !count ) {
 1127+ deferred.resolveWith( deferred, args );
 1128+ }
 1129+ } else if ( deferred !== firstParam ) {
 1130+ deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
 1131+ }
 1132+ return deferred.promise();
 1133+ }
 1134+});
 1135+
 1136+
 1137+
 1138+jQuery.support = (function() {
 1139+
 1140+ var div = document.createElement( "div" ),
 1141+ documentElement = document.documentElement,
 1142+ all,
 1143+ a,
 1144+ select,
 1145+ opt,
 1146+ input,
 1147+ marginDiv,
 1148+ support,
 1149+ fragment,
 1150+ body,
 1151+ bodyStyle,
 1152+ tds,
 1153+ events,
 1154+ eventName,
 1155+ i,
 1156+ isSupported;
 1157+
 1158+ // Preliminary tests
 1159+ div.setAttribute("className", "t");
 1160+ div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
 1161+
 1162+ all = div.getElementsByTagName( "*" );
 1163+ a = div.getElementsByTagName( "a" )[ 0 ];
 1164+
 1165+ // Can't get basic test support
 1166+ if ( !all || !all.length || !a ) {
 1167+ return {};
 1168+ }
 1169+
 1170+ // First batch of supports tests
 1171+ select = document.createElement( "select" );
 1172+ opt = select.appendChild( document.createElement("option") );
 1173+ input = div.getElementsByTagName( "input" )[ 0 ];
 1174+
 1175+ support = {
 1176+ // IE strips leading whitespace when .innerHTML is used
 1177+ leadingWhitespace: ( div.firstChild.nodeType === 3 ),
 1178+
 1179+ // Make sure that tbody elements aren't automatically inserted
 1180+ // IE will insert them into empty tables
 1181+ tbody: !div.getElementsByTagName( "tbody" ).length,
 1182+
 1183+ // Make sure that link elements get serialized correctly by innerHTML
 1184+ // This requires a wrapper element in IE
 1185+ htmlSerialize: !!div.getElementsByTagName( "link" ).length,
 1186+
 1187+ // Get the style information from getAttribute
 1188+ // (IE uses .cssText instead)
 1189+ style: /top/.test( a.getAttribute("style") ),
 1190+
 1191+ // Make sure that URLs aren't manipulated
 1192+ // (IE normalizes it by default)
 1193+ hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
 1194+
 1195+ // Make sure that element opacity exists
 1196+ // (IE uses filter instead)
 1197+ // Use a regex to work around a WebKit issue. See #5145
 1198+ opacity: /^0.55$/.test( a.style.opacity ),
 1199+
 1200+ // Verify style float existence
 1201+ // (IE uses styleFloat instead of cssFloat)
 1202+ cssFloat: !!a.style.cssFloat,
 1203+
 1204+ // Make sure that if no value is specified for a checkbox
 1205+ // that it defaults to "on".
 1206+ // (WebKit defaults to "" instead)
 1207+ checkOn: ( input.value === "on" ),
 1208+
 1209+ // Make sure that a selected-by-default option has a working selected property.
 1210+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
 1211+ optSelected: opt.selected,
 1212+
 1213+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
 1214+ getSetAttribute: div.className !== "t",
 1215+
 1216+ // Will be defined later
 1217+ submitBubbles: true,
 1218+ changeBubbles: true,
 1219+ focusinBubbles: false,
 1220+ deleteExpando: true,
 1221+ noCloneEvent: true,
 1222+ inlineBlockNeedsLayout: false,
 1223+ shrinkWrapBlocks: false,
 1224+ reliableMarginRight: true
 1225+ };
 1226+
 1227+ // Make sure checked status is properly cloned
 1228+ input.checked = true;
 1229+ support.noCloneChecked = input.cloneNode( true ).checked;
 1230+
 1231+ // Make sure that the options inside disabled selects aren't marked as disabled
 1232+ // (WebKit marks them as disabled)
 1233+ select.disabled = true;
 1234+ support.optDisabled = !opt.disabled;
 1235+
 1236+ // Test to see if it's possible to delete an expando from an element
 1237+ // Fails in Internet Explorer
 1238+ try {
 1239+ delete div.test;
 1240+ } catch( e ) {
 1241+ support.deleteExpando = false;
 1242+ }
 1243+
 1244+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
 1245+ div.attachEvent( "onclick", function click() {
 1246+ // Cloning a node shouldn't copy over any
 1247+ // bound event handlers (IE does this)
 1248+ support.noCloneEvent = false;
 1249+ div.detachEvent( "onclick", click );
 1250+ });
 1251+ div.cloneNode( true ).fireEvent( "onclick" );
 1252+ }
 1253+
 1254+ // Check if a radio maintains it's value
 1255+ // after being appended to the DOM
 1256+ input = document.createElement("input");
 1257+ input.value = "t";
 1258+ input.setAttribute("type", "radio");
 1259+ support.radioValue = input.value === "t";
 1260+
 1261+ input.setAttribute("checked", "checked");
 1262+ div.appendChild( input );
 1263+ fragment = document.createDocumentFragment();
 1264+ fragment.appendChild( div.firstChild );
 1265+
 1266+ // WebKit doesn't clone checked state correctly in fragments
 1267+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
 1268+
 1269+ div.innerHTML = "";
 1270+
 1271+ // Figure out if the W3C box model works as expected
 1272+ div.style.width = div.style.paddingLeft = "1px";
 1273+
 1274+ // We use our own, invisible, body
 1275+ body = document.createElement( "body" );
 1276+ bodyStyle = {
 1277+ visibility: "hidden",
 1278+ width: 0,
 1279+ height: 0,
 1280+ border: 0,
 1281+ margin: 0,
 1282+ // Set background to avoid IE crashes when removing (#9028)
 1283+ background: "none"
 1284+ };
 1285+ for ( i in bodyStyle ) {
 1286+ body.style[ i ] = bodyStyle[ i ];
 1287+ }
 1288+ body.appendChild( div );
 1289+ documentElement.insertBefore( body, documentElement.firstChild );
 1290+
 1291+ // Check if a disconnected checkbox will retain its checked
 1292+ // value of true after appended to the DOM (IE6/7)
 1293+ support.appendChecked = input.checked;
 1294+
 1295+ support.boxModel = div.offsetWidth === 2;
 1296+
 1297+ if ( "zoom" in div.style ) {
 1298+ // Check if natively block-level elements act like inline-block
 1299+ // elements when setting their display to 'inline' and giving
 1300+ // them layout
 1301+ // (IE < 8 does this)
 1302+ div.style.display = "inline";
 1303+ div.style.zoom = 1;
 1304+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
 1305+
 1306+ // Check if elements with layout shrink-wrap their children
 1307+ // (IE 6 does this)
 1308+ div.style.display = "";
 1309+ div.innerHTML = "<div style='width:4px;'></div>";
 1310+ support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
 1311+ }
 1312+
 1313+ div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
 1314+ tds = div.getElementsByTagName( "td" );
 1315+
 1316+ // Check if table cells still have offsetWidth/Height when they are set
 1317+ // to display:none and there are still other visible table cells in a
 1318+ // table row; if so, offsetWidth/Height are not reliable for use when
 1319+ // determining if an element has been hidden directly using
 1320+ // display:none (it is still safe to use offsets if a parent element is
 1321+ // hidden; don safety goggles and see bug #4512 for more information).
 1322+ // (only IE 8 fails this test)
 1323+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
 1324+
 1325+ tds[ 0 ].style.display = "";
 1326+ tds[ 1 ].style.display = "none";
 1327+
 1328+ // Check if empty table cells still have offsetWidth/Height
 1329+ // (IE < 8 fail this test)
 1330+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
 1331+ div.innerHTML = "";
 1332+
 1333+ // Check if div with explicit width and no margin-right incorrectly
 1334+ // gets computed margin-right based on width of container. For more
 1335+ // info see bug #3333
 1336+ // Fails in WebKit before Feb 2011 nightlies
 1337+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
 1338+ if ( document.defaultView && document.defaultView.getComputedStyle ) {
 1339+ marginDiv = document.createElement( "div" );
 1340+ marginDiv.style.width = "0";
 1341+ marginDiv.style.marginRight = "0";
 1342+ div.appendChild( marginDiv );
 1343+ support.reliableMarginRight =
 1344+ ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
 1345+ }
 1346+
 1347+ // Remove the body element we added
 1348+ body.innerHTML = "";
 1349+ documentElement.removeChild( body );
 1350+
 1351+ // Technique from Juriy Zaytsev
 1352+ // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
 1353+ // We only care about the case where non-standard event systems
 1354+ // are used, namely in IE. Short-circuiting here helps us to
 1355+ // avoid an eval call (in setAttribute) which can cause CSP
 1356+ // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
 1357+ if ( div.attachEvent ) {
 1358+ for( i in {
 1359+ submit: 1,
 1360+ change: 1,
 1361+ focusin: 1
 1362+ } ) {
 1363+ eventName = "on" + i;
 1364+ isSupported = ( eventName in div );
 1365+ if ( !isSupported ) {
 1366+ div.setAttribute( eventName, "return;" );
 1367+ isSupported = ( typeof div[ eventName ] === "function" );
 1368+ }
 1369+ support[ i + "Bubbles" ] = isSupported;
 1370+ }
 1371+ }
 1372+
 1373+ return support;
 1374+})();
 1375+
 1376+// Keep track of boxModel
 1377+jQuery.boxModel = jQuery.support.boxModel;
 1378+
 1379+
 1380+
 1381+
 1382+var rbrace = /^(?:\{.*\}|\[.*\])$/,
 1383+ rmultiDash = /([a-z])([A-Z])/g;
 1384+
 1385+jQuery.extend({
 1386+ cache: {},
 1387+
 1388+ // Please use with caution
 1389+ uuid: 0,
 1390+
 1391+ // Unique for each copy of jQuery on the page
 1392+ // Non-digits removed to match rinlinejQuery
 1393+ expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
 1394+
 1395+ // The following elements throw uncatchable exceptions if you
 1396+ // attempt to add expando properties to them.
 1397+ noData: {
 1398+ "embed": true,
 1399+ // Ban all objects except for Flash (which handle expandos)
 1400+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
 1401+ "applet": true
 1402+ },
 1403+
 1404+ hasData: function( elem ) {
 1405+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
 1406+
 1407+ return !!elem && !isEmptyDataObject( elem );
 1408+ },
 1409+
 1410+ data: function( elem, name, data, pvt /* Internal Use Only */ ) {
 1411+ if ( !jQuery.acceptData( elem ) ) {
 1412+ return;
 1413+ }
 1414+
 1415+ var internalKey = jQuery.expando, getByName = typeof name === "string", thisCache,
 1416+
 1417+ // We have to handle DOM nodes and JS objects differently because IE6-7
 1418+ // can't GC object references properly across the DOM-JS boundary
 1419+ isNode = elem.nodeType,
 1420+
 1421+ // Only DOM nodes need the global jQuery cache; JS object data is
 1422+ // attached directly to the object so GC can occur automatically
 1423+ cache = isNode ? jQuery.cache : elem,
 1424+
 1425+ // Only defining an ID for JS objects if its cache already exists allows
 1426+ // the code to shortcut on the same path as a DOM node with no cache
 1427+ id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando;
 1428+
 1429+ // Avoid doing any more work than we need to when trying to get data on an
 1430+ // object that has no data at all
 1431+ if ( (!id || (pvt && id && !cache[ id ][ internalKey ])) && getByName && data === undefined ) {
 1432+ return;
 1433+ }
 1434+
 1435+ if ( !id ) {
 1436+ // Only DOM nodes need a new unique ID for each element since their data
 1437+ // ends up in the global cache
 1438+ if ( isNode ) {
 1439+ elem[ jQuery.expando ] = id = ++jQuery.uuid;
 1440+ } else {
 1441+ id = jQuery.expando;
 1442+ }
 1443+ }
 1444+
 1445+ if ( !cache[ id ] ) {
 1446+ cache[ id ] = {};
 1447+
 1448+ // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
 1449+ // metadata on plain JS objects when the object is serialized using
 1450+ // JSON.stringify
 1451+ if ( !isNode ) {
 1452+ cache[ id ].toJSON = jQuery.noop;
 1453+ }
 1454+ }
 1455+
 1456+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
 1457+ // shallow copied over onto the existing cache
 1458+ if ( typeof name === "object" || typeof name === "function" ) {
 1459+ if ( pvt ) {
 1460+ cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name);
 1461+ } else {
 1462+ cache[ id ] = jQuery.extend(cache[ id ], name);
 1463+ }
 1464+ }
 1465+
 1466+ thisCache = cache[ id ];
 1467+
 1468+ // Internal jQuery data is stored in a separate object inside the object's data
 1469+ // cache in order to avoid key collisions between internal data and user-defined
 1470+ // data
 1471+ if ( pvt ) {
 1472+ if ( !thisCache[ internalKey ] ) {
 1473+ thisCache[ internalKey ] = {};
 1474+ }
 1475+
 1476+ thisCache = thisCache[ internalKey ];
 1477+ }
 1478+
 1479+ if ( data !== undefined ) {
 1480+ thisCache[ jQuery.camelCase( name ) ] = data;
 1481+ }
 1482+
 1483+ // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should
 1484+ // not attempt to inspect the internal events object using jQuery.data, as this
 1485+ // internal data object is undocumented and subject to change.
 1486+ if ( name === "events" && !thisCache[name] ) {
 1487+ return thisCache[ internalKey ] && thisCache[ internalKey ].events;
 1488+ }
 1489+
 1490+ return getByName ? thisCache[ jQuery.camelCase( name ) ] : thisCache;
 1491+ },
 1492+
 1493+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
 1494+ if ( !jQuery.acceptData( elem ) ) {
 1495+ return;
 1496+ }
 1497+
 1498+ var internalKey = jQuery.expando, isNode = elem.nodeType,
 1499+
 1500+ // See jQuery.data for more information
 1501+ cache = isNode ? jQuery.cache : elem,
 1502+
 1503+ // See jQuery.data for more information
 1504+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
 1505+
 1506+ // If there is already no cache entry for this object, there is no
 1507+ // purpose in continuing
 1508+ if ( !cache[ id ] ) {
 1509+ return;
 1510+ }
 1511+
 1512+ if ( name ) {
 1513+ var thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ];
 1514+
 1515+ if ( thisCache ) {
 1516+ delete thisCache[ name ];
 1517+
 1518+ // If there is no data left in the cache, we want to continue
 1519+ // and let the cache object itself get destroyed
 1520+ if ( !isEmptyDataObject(thisCache) ) {
 1521+ return;
 1522+ }
 1523+ }
 1524+ }
 1525+
 1526+ // See jQuery.data for more information
 1527+ if ( pvt ) {
 1528+ delete cache[ id ][ internalKey ];
 1529+
 1530+ // Don't destroy the parent cache unless the internal data object
 1531+ // had been the only thing left in it
 1532+ if ( !isEmptyDataObject(cache[ id ]) ) {
 1533+ return;
 1534+ }
 1535+ }
 1536+
 1537+ var internalCache = cache[ id ][ internalKey ];
 1538+
 1539+ // Browsers that fail expando deletion also refuse to delete expandos on
 1540+ // the window, but it will allow it on all other JS objects; other browsers
 1541+ // don't care
 1542+ if ( jQuery.support.deleteExpando || cache != window ) {
 1543+ delete cache[ id ];
 1544+ } else {
 1545+ cache[ id ] = null;
 1546+ }
 1547+
 1548+ // We destroyed the entire user cache at once because it's faster than
 1549+ // iterating through each key, but we need to continue to persist internal
 1550+ // data if it existed
 1551+ if ( internalCache ) {
 1552+ cache[ id ] = {};
 1553+ // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery
 1554+ // metadata on plain JS objects when the object is serialized using
 1555+ // JSON.stringify
 1556+ if ( !isNode ) {
 1557+ cache[ id ].toJSON = jQuery.noop;
 1558+ }
 1559+
 1560+ cache[ id ][ internalKey ] = internalCache;
 1561+
 1562+ // Otherwise, we need to eliminate the expando on the node to avoid
 1563+ // false lookups in the cache for entries that no longer exist
 1564+ } else if ( isNode ) {
 1565+ // IE does not allow us to delete expando properties from nodes,
 1566+ // nor does it have a removeAttribute function on Document nodes;
 1567+ // we must handle all of these cases
 1568+ if ( jQuery.support.deleteExpando ) {
 1569+ delete elem[ jQuery.expando ];
 1570+ } else if ( elem.removeAttribute ) {
 1571+ elem.removeAttribute( jQuery.expando );
 1572+ } else {
 1573+ elem[ jQuery.expando ] = null;
 1574+ }
 1575+ }
 1576+ },
 1577+
 1578+ // For internal use only.
 1579+ _data: function( elem, name, data ) {
 1580+ return jQuery.data( elem, name, data, true );
 1581+ },
 1582+
 1583+ // A method for determining if a DOM node can handle the data expando
 1584+ acceptData: function( elem ) {
 1585+ if ( elem.nodeName ) {
 1586+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
 1587+
 1588+ if ( match ) {
 1589+ return !(match === true || elem.getAttribute("classid") !== match);
 1590+ }
 1591+ }
 1592+
 1593+ return true;
 1594+ }
 1595+});
 1596+
 1597+jQuery.fn.extend({
 1598+ data: function( key, value ) {
 1599+ var data = null;
 1600+
 1601+ if ( typeof key === "undefined" ) {
 1602+ if ( this.length ) {
 1603+ data = jQuery.data( this[0] );
 1604+
 1605+ if ( this[0].nodeType === 1 ) {
 1606+ var attr = this[0].attributes, name;
 1607+ for ( var i = 0, l = attr.length; i < l; i++ ) {
 1608+ name = attr[i].name;
 1609+
 1610+ if ( name.indexOf( "data-" ) === 0 ) {
 1611+ name = jQuery.camelCase( name.substring(5) );
 1612+
 1613+ dataAttr( this[0], name, data[ name ] );
 1614+ }
 1615+ }
 1616+ }
 1617+ }
 1618+
 1619+ return data;
 1620+
 1621+ } else if ( typeof key === "object" ) {
 1622+ return this.each(function() {
 1623+ jQuery.data( this, key );
 1624+ });
 1625+ }
 1626+
 1627+ var parts = key.split(".");
 1628+ parts[1] = parts[1] ? "." + parts[1] : "";
 1629+
 1630+ if ( value === undefined ) {
 1631+ data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
 1632+
 1633+ // Try to fetch any internally stored data first
 1634+ if ( data === undefined && this.length ) {
 1635+ data = jQuery.data( this[0], key );
 1636+ data = dataAttr( this[0], key, data );
 1637+ }
 1638+
 1639+ return data === undefined && parts[1] ?
 1640+ this.data( parts[0] ) :
 1641+ data;
 1642+
 1643+ } else {
 1644+ return this.each(function() {
 1645+ var $this = jQuery( this ),
 1646+ args = [ parts[0], value ];
 1647+
 1648+ $this.triggerHandler( "setData" + parts[1] + "!", args );
 1649+ jQuery.data( this, key, value );
 1650+ $this.triggerHandler( "changeData" + parts[1] + "!", args );
 1651+ });
 1652+ }
 1653+ },
 1654+
 1655+ removeData: function( key ) {
 1656+ return this.each(function() {
 1657+ jQuery.removeData( this, key );
 1658+ });
 1659+ }
 1660+});
 1661+
 1662+function dataAttr( elem, key, data ) {
 1663+ // If nothing was found internally, try to fetch any
 1664+ // data from the HTML5 data-* attribute
 1665+ if ( data === undefined && elem.nodeType === 1 ) {
 1666+ var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase();
 1667+
 1668+ data = elem.getAttribute( name );
 1669+
 1670+ if ( typeof data === "string" ) {
 1671+ try {
 1672+ data = data === "true" ? true :
 1673+ data === "false" ? false :
 1674+ data === "null" ? null :
 1675+ !jQuery.isNaN( data ) ? parseFloat( data ) :
 1676+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
 1677+ data;
 1678+ } catch( e ) {}
 1679+
 1680+ // Make sure we set the data so it isn't changed later
 1681+ jQuery.data( elem, key, data );
 1682+
 1683+ } else {
 1684+ data = undefined;
 1685+ }
 1686+ }
 1687+
 1688+ return data;
 1689+}
 1690+
 1691+// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON
 1692+// property to be considered empty objects; this property always exists in
 1693+// order to make sure JSON.stringify does not expose internal metadata
 1694+function isEmptyDataObject( obj ) {
 1695+ for ( var name in obj ) {
 1696+ if ( name !== "toJSON" ) {
 1697+ return false;
 1698+ }
 1699+ }
 1700+
 1701+ return true;
 1702+}
 1703+
 1704+
 1705+
 1706+
 1707+function handleQueueMarkDefer( elem, type, src ) {
 1708+ var deferDataKey = type + "defer",
 1709+ queueDataKey = type + "queue",
 1710+ markDataKey = type + "mark",
 1711+ defer = jQuery.data( elem, deferDataKey, undefined, true );
 1712+ if ( defer &&
 1713+ ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) &&
 1714+ ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) {
 1715+ // Give room for hard-coded callbacks to fire first
 1716+ // and eventually mark/queue something else on the element
 1717+ setTimeout( function() {
 1718+ if ( !jQuery.data( elem, queueDataKey, undefined, true ) &&
 1719+ !jQuery.data( elem, markDataKey, undefined, true ) ) {
 1720+ jQuery.removeData( elem, deferDataKey, true );
 1721+ defer.resolve();
 1722+ }
 1723+ }, 0 );
 1724+ }
 1725+}
 1726+
 1727+jQuery.extend({
 1728+
 1729+ _mark: function( elem, type ) {
 1730+ if ( elem ) {
 1731+ type = (type || "fx") + "mark";
 1732+ jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true );
 1733+ }
 1734+ },
 1735+
 1736+ _unmark: function( force, elem, type ) {
 1737+ if ( force !== true ) {
 1738+ type = elem;
 1739+ elem = force;
 1740+ force = false;
 1741+ }
 1742+ if ( elem ) {
 1743+ type = type || "fx";
 1744+ var key = type + "mark",
 1745+ count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 );
 1746+ if ( count ) {
 1747+ jQuery.data( elem, key, count, true );
 1748+ } else {
 1749+ jQuery.removeData( elem, key, true );
 1750+ handleQueueMarkDefer( elem, type, "mark" );
 1751+ }
 1752+ }
 1753+ },
 1754+
 1755+ queue: function( elem, type, data ) {
 1756+ if ( elem ) {
 1757+ type = (type || "fx") + "queue";
 1758+ var q = jQuery.data( elem, type, undefined, true );
 1759+ // Speed up dequeue by getting out quickly if this is just a lookup
 1760+ if ( data ) {
 1761+ if ( !q || jQuery.isArray(data) ) {
 1762+ q = jQuery.data( elem, type, jQuery.makeArray(data), true );
 1763+ } else {
 1764+ q.push( data );
 1765+ }
 1766+ }
 1767+ return q || [];
 1768+ }
 1769+ },
 1770+
 1771+ dequeue: function( elem, type ) {
 1772+ type = type || "fx";
 1773+
 1774+ var queue = jQuery.queue( elem, type ),
 1775+ fn = queue.shift(),
 1776+ defer;
 1777+
 1778+ // If the fx queue is dequeued, always remove the progress sentinel
 1779+ if ( fn === "inprogress" ) {
 1780+ fn = queue.shift();
 1781+ }
 1782+
 1783+ if ( fn ) {
 1784+ // Add a progress sentinel to prevent the fx queue from being
 1785+ // automatically dequeued
 1786+ if ( type === "fx" ) {
 1787+ queue.unshift("inprogress");
 1788+ }
 1789+
 1790+ fn.call(elem, function() {
 1791+ jQuery.dequeue(elem, type);
 1792+ });
 1793+ }
 1794+
 1795+ if ( !queue.length ) {
 1796+ jQuery.removeData( elem, type + "queue", true );
 1797+ handleQueueMarkDefer( elem, type, "queue" );
 1798+ }
 1799+ }
 1800+});
 1801+
 1802+jQuery.fn.extend({
 1803+ queue: function( type, data ) {
 1804+ if ( typeof type !== "string" ) {
 1805+ data = type;
 1806+ type = "fx";
 1807+ }
 1808+
 1809+ if ( data === undefined ) {
 1810+ return jQuery.queue( this[0], type );
 1811+ }
 1812+ return this.each(function() {
 1813+ var queue = jQuery.queue( this, type, data );
 1814+
 1815+ if ( type === "fx" && queue[0] !== "inprogress" ) {
 1816+ jQuery.dequeue( this, type );
 1817+ }
 1818+ });
 1819+ },
 1820+ dequeue: function( type ) {
 1821+ return this.each(function() {
 1822+ jQuery.dequeue( this, type );
 1823+ });
 1824+ },
 1825+ // Based off of the plugin by Clint Helfers, with permission.
 1826+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
 1827+ delay: function( time, type ) {
 1828+ time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
 1829+ type = type || "fx";
 1830+
 1831+ return this.queue( type, function() {
 1832+ var elem = this;
 1833+ setTimeout(function() {
 1834+ jQuery.dequeue( elem, type );
 1835+ }, time );
 1836+ });
 1837+ },
 1838+ clearQueue: function( type ) {
 1839+ return this.queue( type || "fx", [] );
 1840+ },
 1841+ // Get a promise resolved when queues of a certain type
 1842+ // are emptied (fx is the type by default)
 1843+ promise: function( type, object ) {
 1844+ if ( typeof type !== "string" ) {
 1845+ object = type;
 1846+ type = undefined;
 1847+ }
 1848+ type = type || "fx";
 1849+ var defer = jQuery.Deferred(),
 1850+ elements = this,
 1851+ i = elements.length,
 1852+ count = 1,
 1853+ deferDataKey = type + "defer",
 1854+ queueDataKey = type + "queue",
 1855+ markDataKey = type + "mark",
 1856+ tmp;
 1857+ function resolve() {
 1858+ if ( !( --count ) ) {
 1859+ defer.resolveWith( elements, [ elements ] );
 1860+ }
 1861+ }
 1862+ while( i-- ) {
 1863+ if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
 1864+ ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
 1865+ jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
 1866+ jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) {
 1867+ count++;
 1868+ tmp.done( resolve );
 1869+ }
 1870+ }
 1871+ resolve();
 1872+ return defer.promise();
 1873+ }
 1874+});
 1875+
 1876+
 1877+
 1878+
 1879+var rclass = /[\n\t\r]/g,
 1880+ rspace = /\s+/,
 1881+ rreturn = /\r/g,
 1882+ rtype = /^(?:button|input)$/i,
 1883+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
 1884+ rclickable = /^a(?:rea)?$/i,
 1885+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
 1886+ rinvalidChar = /\:/,
 1887+ formHook, boolHook;
 1888+
 1889+jQuery.fn.extend({
 1890+ attr: function( name, value ) {
 1891+ return jQuery.access( this, name, value, true, jQuery.attr );
 1892+ },
 1893+
 1894+ removeAttr: function( name ) {
 1895+ return this.each(function() {
 1896+ jQuery.removeAttr( this, name );
 1897+ });
 1898+ },
 1899+
 1900+ prop: function( name, value ) {
 1901+ return jQuery.access( this, name, value, true, jQuery.prop );
 1902+ },
 1903+
 1904+ removeProp: function( name ) {
 1905+ name = jQuery.propFix[ name ] || name;
 1906+ return this.each(function() {
 1907+ // try/catch handles cases where IE balks (such as removing a property on window)
 1908+ try {
 1909+ this[ name ] = undefined;
 1910+ delete this[ name ];
 1911+ } catch( e ) {}
 1912+ });
 1913+ },
 1914+
 1915+ addClass: function( value ) {
 1916+ if ( jQuery.isFunction( value ) ) {
 1917+ return this.each(function(i) {
 1918+ var self = jQuery(this);
 1919+ self.addClass( value.call(this, i, self.attr("class") || "") );
 1920+ });
 1921+ }
 1922+
 1923+ if ( value && typeof value === "string" ) {
 1924+ var classNames = (value || "").split( rspace );
 1925+
 1926+ for ( var i = 0, l = this.length; i < l; i++ ) {
 1927+ var elem = this[i];
 1928+
 1929+ if ( elem.nodeType === 1 ) {
 1930+ if ( !elem.className ) {
 1931+ elem.className = value;
 1932+
 1933+ } else {
 1934+ var className = " " + elem.className + " ",
 1935+ setClass = elem.className;
 1936+
 1937+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
 1938+ if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
 1939+ setClass += " " + classNames[c];
 1940+ }
 1941+ }
 1942+ elem.className = jQuery.trim( setClass );
 1943+ }
 1944+ }
 1945+ }
 1946+ }
 1947+
 1948+ return this;
 1949+ },
 1950+
 1951+ removeClass: function( value ) {
 1952+ if ( jQuery.isFunction(value) ) {
 1953+ return this.each(function(i) {
 1954+ var self = jQuery(this);
 1955+ self.removeClass( value.call(this, i, self.attr("class")) );
 1956+ });
 1957+ }
 1958+
 1959+ if ( (value && typeof value === "string") || value === undefined ) {
 1960+ var classNames = (value || "").split( rspace );
 1961+
 1962+ for ( var i = 0, l = this.length; i < l; i++ ) {
 1963+ var elem = this[i];
 1964+
 1965+ if ( elem.nodeType === 1 && elem.className ) {
 1966+ if ( value ) {
 1967+ var className = (" " + elem.className + " ").replace(rclass, " ");
 1968+ for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
 1969+ className = className.replace(" " + classNames[c] + " ", " ");
 1970+ }
 1971+ elem.className = jQuery.trim( className );
 1972+
 1973+ } else {
 1974+ elem.className = "";
 1975+ }
 1976+ }
 1977+ }
 1978+ }
 1979+
 1980+ return this;
 1981+ },
 1982+
 1983+ toggleClass: function( value, stateVal ) {
 1984+ var type = typeof value,
 1985+ isBool = typeof stateVal === "boolean";
 1986+
 1987+ if ( jQuery.isFunction( value ) ) {
 1988+ return this.each(function(i) {
 1989+ var self = jQuery(this);
 1990+ self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
 1991+ });
 1992+ }
 1993+
 1994+ return this.each(function() {
 1995+ if ( type === "string" ) {
 1996+ // toggle individual class names
 1997+ var className,
 1998+ i = 0,
 1999+ self = jQuery( this ),
 2000+ state = stateVal,
 2001+ classNames = value.split( rspace );
 2002+
 2003+ while ( (className = classNames[ i++ ]) ) {
 2004+ // check each className given, space seperated list
 2005+ state = isBool ? state : !self.hasClass( className );
 2006+ self[ state ? "addClass" : "removeClass" ]( className );
 2007+ }
 2008+
 2009+ } else if ( type === "undefined" || type === "boolean" ) {
 2010+ if ( this.className ) {
 2011+ // store className if set
 2012+ jQuery._data( this, "__className__", this.className );
 2013+ }
 2014+
 2015+ // toggle whole className
 2016+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
 2017+ }
 2018+ });
 2019+ },
 2020+
 2021+ hasClass: function( selector ) {
 2022+ var className = " " + selector + " ";
 2023+ for ( var i = 0, l = this.length; i < l; i++ ) {
 2024+ if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
 2025+ return true;
 2026+ }
 2027+ }
 2028+
 2029+ return false;
 2030+ },
 2031+
 2032+ val: function( value ) {
 2033+ var hooks, ret,
 2034+ elem = this[0];
 2035+
 2036+ if ( !arguments.length ) {
 2037+ if ( elem ) {
 2038+ hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
 2039+
 2040+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
 2041+ return ret;
 2042+ }
 2043+
 2044+ return (elem.value || "").replace(rreturn, "");
 2045+ }
 2046+
 2047+ return undefined;
 2048+ }
 2049+
 2050+ var isFunction = jQuery.isFunction( value );
 2051+
 2052+ return this.each(function( i ) {
 2053+ var self = jQuery(this), val;
 2054+
 2055+ if ( this.nodeType !== 1 ) {
 2056+ return;
 2057+ }
 2058+
 2059+ if ( isFunction ) {
 2060+ val = value.call( this, i, self.val() );
 2061+ } else {
 2062+ val = value;
 2063+ }
 2064+
 2065+ // Treat null/undefined as ""; convert numbers to string
 2066+ if ( val == null ) {
 2067+ val = "";
 2068+ } else if ( typeof val === "number" ) {
 2069+ val += "";
 2070+ } else if ( jQuery.isArray( val ) ) {
 2071+ val = jQuery.map(val, function ( value ) {
 2072+ return value == null ? "" : value + "";
 2073+ });
 2074+ }
 2075+
 2076+ hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
 2077+
 2078+ // If set returns undefined, fall back to normal setting
 2079+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
 2080+ this.value = val;
 2081+ }
 2082+ });
 2083+ }
 2084+});
 2085+
 2086+jQuery.extend({
 2087+ valHooks: {
 2088+ option: {
 2089+ get: function( elem ) {
 2090+ // attributes.value is undefined in Blackberry 4.7 but
 2091+ // uses .value. See #6932
 2092+ var val = elem.attributes.value;
 2093+ return !val || val.specified ? elem.value : elem.text;
 2094+ }
 2095+ },
 2096+ select: {
 2097+ get: function( elem ) {
 2098+ var value,
 2099+ index = elem.selectedIndex,
 2100+ values = [],
 2101+ options = elem.options,
 2102+ one = elem.type === "select-one";
 2103+
 2104+ // Nothing was selected
 2105+ if ( index < 0 ) {
 2106+ return null;
 2107+ }
 2108+
 2109+ // Loop through all the selected options
 2110+ for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
 2111+ var option = options[ i ];
 2112+
 2113+ // Don't return options that are disabled or in a disabled optgroup
 2114+ if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
 2115+ (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
 2116+
 2117+ // Get the specific value for the option
 2118+ value = jQuery( option ).val();
 2119+
 2120+ // We don't need an array for one selects
 2121+ if ( one ) {
 2122+ return value;
 2123+ }
 2124+
 2125+ // Multi-Selects return an array
 2126+ values.push( value );
 2127+ }
 2128+ }
 2129+
 2130+ // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
 2131+ if ( one && !values.length && options.length ) {
 2132+ return jQuery( options[ index ] ).val();
 2133+ }
 2134+
 2135+ return values;
 2136+ },
 2137+
 2138+ set: function( elem, value ) {
 2139+ var values = jQuery.makeArray( value );
 2140+
 2141+ jQuery(elem).find("option").each(function() {
 2142+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
 2143+ });
 2144+
 2145+ if ( !values.length ) {
 2146+ elem.selectedIndex = -1;
 2147+ }
 2148+ return values;
 2149+ }
 2150+ }
 2151+ },
 2152+
 2153+ attrFn: {
 2154+ val: true,
 2155+ css: true,
 2156+ html: true,
 2157+ text: true,
 2158+ data: true,
 2159+ width: true,
 2160+ height: true,
 2161+ offset: true
 2162+ },
 2163+
 2164+ attrFix: {
 2165+ // Always normalize to ensure hook usage
 2166+ tabindex: "tabIndex"
 2167+ },
 2168+
 2169+ attr: function( elem, name, value, pass ) {
 2170+ var nType = elem.nodeType;
 2171+
 2172+ // don't get/set attributes on text, comment and attribute nodes
 2173+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
 2174+ return undefined;
 2175+ }
 2176+
 2177+ if ( pass && name in jQuery.attrFn ) {
 2178+ return jQuery( elem )[ name ]( value );
 2179+ }
 2180+
 2181+ // Fallback to prop when attributes are not supported
 2182+ if ( !("getAttribute" in elem) ) {
 2183+ return jQuery.prop( elem, name, value );
 2184+ }
 2185+
 2186+ var ret, hooks,
 2187+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
 2188+
 2189+ // Normalize the name if needed
 2190+ name = notxml && jQuery.attrFix[ name ] || name;
 2191+
 2192+ hooks = jQuery.attrHooks[ name ];
 2193+
 2194+ if ( !hooks ) {
 2195+ // Use boolHook for boolean attributes
 2196+ if ( rboolean.test( name ) &&
 2197+ (typeof value === "boolean" || value === undefined || value.toLowerCase() === name.toLowerCase()) ) {
 2198+
 2199+ hooks = boolHook;
 2200+
 2201+ // Use formHook for forms and if the name contains certain characters
 2202+ } else if ( formHook && (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) {
 2203+ hooks = formHook;
 2204+ }
 2205+ }
 2206+
 2207+ if ( value !== undefined ) {
 2208+
 2209+ if ( value === null ) {
 2210+ jQuery.removeAttr( elem, name );
 2211+ return undefined;
 2212+
 2213+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
 2214+ return ret;
 2215+
 2216+ } else {
 2217+ elem.setAttribute( name, "" + value );
 2218+ return value;
 2219+ }
 2220+
 2221+ } else if ( hooks && "get" in hooks && notxml ) {
 2222+ return hooks.get( elem, name );
 2223+
 2224+ } else {
 2225+
 2226+ ret = elem.getAttribute( name );
 2227+
 2228+ // Non-existent attributes return null, we normalize to undefined
 2229+ return ret === null ?
 2230+ undefined :
 2231+ ret;
 2232+ }
 2233+ },
 2234+
 2235+ removeAttr: function( elem, name ) {
 2236+ var propName;
 2237+ if ( elem.nodeType === 1 ) {
 2238+ name = jQuery.attrFix[ name ] || name;
 2239+
 2240+ if ( jQuery.support.getSetAttribute ) {
 2241+ // Use removeAttribute in browsers that support it
 2242+ elem.removeAttribute( name );
 2243+ } else {
 2244+ jQuery.attr( elem, name, "" );
 2245+ elem.removeAttributeNode( elem.getAttributeNode( name ) );
 2246+ }
 2247+
 2248+ // Set corresponding property to false for boolean attributes
 2249+ if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) {
 2250+ elem[ propName ] = false;
 2251+ }
 2252+ }
 2253+ },
 2254+
 2255+ attrHooks: {
 2256+ type: {
 2257+ set: function( elem, value ) {
 2258+ // We can't allow the type property to be changed (since it causes problems in IE)
 2259+ if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
 2260+ jQuery.error( "type property can't be changed" );
 2261+ } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
 2262+ // Setting the type on a radio button after the value resets the value in IE6-9
 2263+ // Reset value to it's default in case type is set after value
 2264+ // This is for element creation
 2265+ var val = elem.value;
 2266+ elem.setAttribute( "type", value );
 2267+ if ( val ) {
 2268+ elem.value = val;
 2269+ }
 2270+ return value;
 2271+ }
 2272+ }
 2273+ },
 2274+ tabIndex: {
 2275+ get: function( elem ) {
 2276+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
 2277+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
 2278+ var attributeNode = elem.getAttributeNode("tabIndex");
 2279+
 2280+ return attributeNode && attributeNode.specified ?
 2281+ parseInt( attributeNode.value, 10 ) :
 2282+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
 2283+ 0 :
 2284+ undefined;
 2285+ }
 2286+ }
 2287+ },
 2288+
 2289+ propFix: {
 2290+ tabindex: "tabIndex",
 2291+ readonly: "readOnly",
 2292+ "for": "htmlFor",
 2293+ "class": "className",
 2294+ maxlength: "maxLength",
 2295+ cellspacing: "cellSpacing",
 2296+ cellpadding: "cellPadding",
 2297+ rowspan: "rowSpan",
 2298+ colspan: "colSpan",
 2299+ usemap: "useMap",
 2300+ frameborder: "frameBorder",
 2301+ contenteditable: "contentEditable"
 2302+ },
 2303+
 2304+ prop: function( elem, name, value ) {
 2305+ var nType = elem.nodeType;
 2306+
 2307+ // don't get/set properties on text, comment and attribute nodes
 2308+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
 2309+ return undefined;
 2310+ }
 2311+
 2312+ var ret, hooks,
 2313+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
 2314+
 2315+ // Try to normalize/fix the name
 2316+ name = notxml && jQuery.propFix[ name ] || name;
 2317+
 2318+ hooks = jQuery.propHooks[ name ];
 2319+
 2320+ if ( value !== undefined ) {
 2321+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
 2322+ return ret;
 2323+
 2324+ } else {
 2325+ return (elem[ name ] = value);
 2326+ }
 2327+
 2328+ } else {
 2329+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== undefined ) {
 2330+ return ret;
 2331+
 2332+ } else {
 2333+ return elem[ name ];
 2334+ }
 2335+ }
 2336+ },
 2337+
 2338+ propHooks: {}
 2339+});
 2340+
 2341+// Hook for boolean attributes
 2342+boolHook = {
 2343+ get: function( elem, name ) {
 2344+ // Align boolean attributes with corresponding properties
 2345+ return elem[ jQuery.propFix[ name ] || name ] ?
 2346+ name.toLowerCase() :
 2347+ undefined;
 2348+ },
 2349+ set: function( elem, value, name ) {
 2350+ var propName;
 2351+ if ( value === false ) {
 2352+ // Remove boolean attributes when set to false
 2353+ jQuery.removeAttr( elem, name );
 2354+ } else {
 2355+ // value is true since we know at this point it's type boolean and not false
 2356+ // Set boolean attributes to the same name and set the DOM property
 2357+ propName = jQuery.propFix[ name ] || name;
 2358+ if ( propName in elem ) {
 2359+ // Only set the IDL specifically if it already exists on the element
 2360+ elem[ propName ] = value;
 2361+ }
 2362+
 2363+ elem.setAttribute( name, name.toLowerCase() );
 2364+ }
 2365+ return name;
 2366+ }
 2367+};
 2368+
 2369+// Use the value property for back compat
 2370+// Use the formHook for button elements in IE6/7 (#1954)
 2371+jQuery.attrHooks.value = {
 2372+ get: function( elem, name ) {
 2373+ if ( formHook && jQuery.nodeName( elem, "button" ) ) {
 2374+ return formHook.get( elem, name );
 2375+ }
 2376+ return elem.value;
 2377+ },
 2378+ set: function( elem, value, name ) {
 2379+ if ( formHook && jQuery.nodeName( elem, "button" ) ) {
 2380+ return formHook.set( elem, value, name );
 2381+ }
 2382+ // Does not return so that setAttribute is also used
 2383+ elem.value = value;
 2384+ }
 2385+};
 2386+
 2387+// IE6/7 do not support getting/setting some attributes with get/setAttribute
 2388+if ( !jQuery.support.getSetAttribute ) {
 2389+
 2390+ // propFix is more comprehensive and contains all fixes
 2391+ jQuery.attrFix = jQuery.propFix;
 2392+
 2393+ // Use this for any attribute on a form in IE6/7
 2394+ formHook = jQuery.attrHooks.name = jQuery.valHooks.button = {
 2395+ get: function( elem, name ) {
 2396+ var ret;
 2397+ ret = elem.getAttributeNode( name );
 2398+ // Return undefined if nodeValue is empty string
 2399+ return ret && ret.nodeValue !== "" ?
 2400+ ret.nodeValue :
 2401+ undefined;
 2402+ },
 2403+ set: function( elem, value, name ) {
 2404+ // Check form objects in IE (multiple bugs related)
 2405+ // Only use nodeValue if the attribute node exists on the form
 2406+ var ret = elem.getAttributeNode( name );
 2407+ if ( ret ) {
 2408+ ret.nodeValue = value;
 2409+ return value;
 2410+ }
 2411+ }
 2412+ };
 2413+
 2414+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
 2415+ // This is for removals
 2416+ jQuery.each([ "width", "height" ], function( i, name ) {
 2417+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
 2418+ set: function( elem, value ) {
 2419+ if ( value === "" ) {
 2420+ elem.setAttribute( name, "auto" );
 2421+ return value;
 2422+ }
 2423+ }
 2424+ });
 2425+ });
 2426+}
 2427+
 2428+
 2429+// Some attributes require a special call on IE
 2430+if ( !jQuery.support.hrefNormalized ) {
 2431+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
 2432+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
 2433+ get: function( elem ) {
 2434+ var ret = elem.getAttribute( name, 2 );
 2435+ return ret === null ? undefined : ret;
 2436+ }
 2437+ });
 2438+ });
 2439+}
 2440+
 2441+if ( !jQuery.support.style ) {
 2442+ jQuery.attrHooks.style = {
 2443+ get: function( elem ) {
 2444+ // Return undefined in the case of empty string
 2445+ // Normalize to lowercase since IE uppercases css property names
 2446+ return elem.style.cssText.toLowerCase() || undefined;
 2447+ },
 2448+ set: function( elem, value ) {
 2449+ return (elem.style.cssText = "" + value);
 2450+ }
 2451+ };
 2452+}
 2453+
 2454+// Safari mis-reports the default selected property of an option
 2455+// Accessing the parent's selectedIndex property fixes it
 2456+if ( !jQuery.support.optSelected ) {
 2457+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
 2458+ get: function( elem ) {
 2459+ var parent = elem.parentNode;
 2460+
 2461+ if ( parent ) {
 2462+ parent.selectedIndex;
 2463+
 2464+ // Make sure that it also works with optgroups, see #5701
 2465+ if ( parent.parentNode ) {
 2466+ parent.parentNode.selectedIndex;
 2467+ }
 2468+ }
 2469+ }
 2470+ });
 2471+}
 2472+
 2473+// Radios and checkboxes getter/setter
 2474+if ( !jQuery.support.checkOn ) {
 2475+ jQuery.each([ "radio", "checkbox" ], function() {
 2476+ jQuery.valHooks[ this ] = {
 2477+ get: function( elem ) {
 2478+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
 2479+ return elem.getAttribute("value") === null ? "on" : elem.value;
 2480+ }
 2481+ };
 2482+ });
 2483+}
 2484+jQuery.each([ "radio", "checkbox" ], function() {
 2485+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
 2486+ set: function( elem, value ) {
 2487+ if ( jQuery.isArray( value ) ) {
 2488+ return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0);
 2489+ }
 2490+ }
 2491+ });
 2492+});
 2493+
 2494+
 2495+
 2496+
 2497+var hasOwn = Object.prototype.hasOwnProperty,
 2498+ rnamespaces = /\.(.*)$/,
 2499+ rformElems = /^(?:textarea|input|select)$/i,
 2500+ rperiod = /\./g,
 2501+ rspaces = / /g,
 2502+ rescape = /[^\w\s.|`]/g,
 2503+ fcleanup = function( nm ) {
 2504+ return nm.replace(rescape, "\\$&");
 2505+ };
 2506+
 2507+/*
 2508+ * A number of helper functions used for managing events.
 2509+ * Many of the ideas behind this code originated from
 2510+ * Dean Edwards' addEvent library.
 2511+ */
 2512+jQuery.event = {
 2513+
 2514+ // Bind an event to an element
 2515+ // Original by Dean Edwards
 2516+ add: function( elem, types, handler, data ) {
 2517+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
 2518+ return;
 2519+ }
 2520+
 2521+ if ( handler === false ) {
 2522+ handler = returnFalse;
 2523+ } else if ( !handler ) {
 2524+ // Fixes bug #7229. Fix recommended by jdalton
 2525+ return;
 2526+ }
 2527+
 2528+ var handleObjIn, handleObj;
 2529+
 2530+ if ( handler.handler ) {
 2531+ handleObjIn = handler;
 2532+ handler = handleObjIn.handler;
 2533+ }
 2534+
 2535+ // Make sure that the function being executed has a unique ID
 2536+ if ( !handler.guid ) {
 2537+ handler.guid = jQuery.guid++;
 2538+ }
 2539+
 2540+ // Init the element's event structure
 2541+ var elemData = jQuery._data( elem );
 2542+
 2543+ // If no elemData is found then we must be trying to bind to one of the
 2544+ // banned noData elements
 2545+ if ( !elemData ) {
 2546+ return;
 2547+ }
 2548+
 2549+ var events = elemData.events,
 2550+ eventHandle = elemData.handle;
 2551+
 2552+ if ( !events ) {
 2553+ elemData.events = events = {};
 2554+ }
 2555+
 2556+ if ( !eventHandle ) {
 2557+ elemData.handle = eventHandle = function( e ) {
 2558+ // Discard the second event of a jQuery.event.trigger() and
 2559+ // when an event is called after a page has unloaded
 2560+ return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
 2561+ jQuery.event.handle.apply( eventHandle.elem, arguments ) :
 2562+ undefined;
 2563+ };
 2564+ }
 2565+
 2566+ // Add elem as a property of the handle function
 2567+ // This is to prevent a memory leak with non-native events in IE.
 2568+ eventHandle.elem = elem;
 2569+
 2570+ // Handle multiple events separated by a space
 2571+ // jQuery(...).bind("mouseover mouseout", fn);
 2572+ types = types.split(" ");
 2573+
 2574+ var type, i = 0, namespaces;
 2575+
 2576+ while ( (type = types[ i++ ]) ) {
 2577+ handleObj = handleObjIn ?
 2578+ jQuery.extend({}, handleObjIn) :
 2579+ { handler: handler, data: data };
 2580+
 2581+ // Namespaced event handlers
 2582+ if ( type.indexOf(".") > -1 ) {
 2583+ namespaces = type.split(".");
 2584+ type = namespaces.shift();
 2585+ handleObj.namespace = namespaces.slice(0).sort().join(".");
 2586+
 2587+ } else {
 2588+ namespaces = [];
 2589+ handleObj.namespace = "";
 2590+ }
 2591+
 2592+ handleObj.type = type;
 2593+ if ( !handleObj.guid ) {
 2594+ handleObj.guid = handler.guid;
 2595+ }
 2596+
 2597+ // Get the current list of functions bound to this event
 2598+ var handlers = events[ type ],
 2599+ special = jQuery.event.special[ type ] || {};
 2600+
 2601+ // Init the event handler queue
 2602+ if ( !handlers ) {
 2603+ handlers = events[ type ] = [];
 2604+
 2605+ // Check for a special event handler
 2606+ // Only use addEventListener/attachEvent if the special
 2607+ // events handler returns false
 2608+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
 2609+ // Bind the global event handler to the element
 2610+ if ( elem.addEventListener ) {
 2611+ elem.addEventListener( type, eventHandle, false );
 2612+
 2613+ } else if ( elem.attachEvent ) {
 2614+ elem.attachEvent( "on" + type, eventHandle );
 2615+ }
 2616+ }
 2617+ }
 2618+
 2619+ if ( special.add ) {
 2620+ special.add.call( elem, handleObj );
 2621+
 2622+ if ( !handleObj.handler.guid ) {
 2623+ handleObj.handler.guid = handler.guid;
 2624+ }
 2625+ }
 2626+
 2627+ // Add the function to the element's handler list
 2628+ handlers.push( handleObj );
 2629+
 2630+ // Keep track of which events have been used, for event optimization
 2631+ jQuery.event.global[ type ] = true;
 2632+ }
 2633+
 2634+ // Nullify elem to prevent memory leaks in IE
 2635+ elem = null;
 2636+ },
 2637+
 2638+ global: {},
 2639+
 2640+ // Detach an event or set of events from an element
 2641+ remove: function( elem, types, handler, pos ) {
 2642+ // don't do events on text and comment nodes
 2643+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
 2644+ return;
 2645+ }
 2646+
 2647+ if ( handler === false ) {
 2648+ handler = returnFalse;
 2649+ }
 2650+
 2651+ var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType,
 2652+ elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
 2653+ events = elemData && elemData.events;
 2654+
 2655+ if ( !elemData || !events ) {
 2656+ return;
 2657+ }
 2658+
 2659+ // types is actually an event object here
 2660+ if ( types && types.type ) {
 2661+ handler = types.handler;
 2662+ types = types.type;
 2663+ }
 2664+
 2665+ // Unbind all events for the element
 2666+ if ( !types || typeof types === "string" && types.charAt(0) === "." ) {
 2667+ types = types || "";
 2668+
 2669+ for ( type in events ) {
 2670+ jQuery.event.remove( elem, type + types );
 2671+ }
 2672+
 2673+ return;
 2674+ }
 2675+
 2676+ // Handle multiple events separated by a space
 2677+ // jQuery(...).unbind("mouseover mouseout", fn);
 2678+ types = types.split(" ");
 2679+
 2680+ while ( (type = types[ i++ ]) ) {
 2681+ origType = type;
 2682+ handleObj = null;
 2683+ all = type.indexOf(".") < 0;
 2684+ namespaces = [];
 2685+
 2686+ if ( !all ) {
 2687+ // Namespaced event handlers
 2688+ namespaces = type.split(".");
 2689+ type = namespaces.shift();
 2690+
 2691+ namespace = new RegExp("(^|\\.)" +
 2692+ jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)");
 2693+ }
 2694+
 2695+ eventType = events[ type ];
 2696+
 2697+ if ( !eventType ) {
 2698+ continue;
 2699+ }
 2700+
 2701+ if ( !handler ) {
 2702+ for ( j = 0; j < eventType.length; j++ ) {
 2703+ handleObj = eventType[ j ];
 2704+
 2705+ if ( all || namespace.test( handleObj.namespace ) ) {
 2706+ jQuery.event.remove( elem, origType, handleObj.handler, j );
 2707+ eventType.splice( j--, 1 );
 2708+ }
 2709+ }
 2710+
 2711+ continue;
 2712+ }
 2713+
 2714+ special = jQuery.event.special[ type ] || {};
 2715+
 2716+ for ( j = pos || 0; j < eventType.length; j++ ) {
 2717+ handleObj = eventType[ j ];
 2718+
 2719+ if ( handler.guid === handleObj.guid ) {
 2720+ // remove the given handler for the given type
 2721+ if ( all || namespace.test( handleObj.namespace ) ) {
 2722+ if ( pos == null ) {
 2723+ eventType.splice( j--, 1 );
 2724+ }
 2725+
 2726+ if ( special.remove ) {
 2727+ special.remove.call( elem, handleObj );
 2728+ }
 2729+ }
 2730+
 2731+ if ( pos != null ) {
 2732+ break;
 2733+ }
 2734+ }
 2735+ }
 2736+
 2737+ // remove generic event handler if no more handlers exist
 2738+ if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
 2739+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
 2740+ jQuery.removeEvent( elem, type, elemData.handle );
 2741+ }
 2742+
 2743+ ret = null;
 2744+ delete events[ type ];
 2745+ }
 2746+ }
 2747+
 2748+ // Remove the expando if it's no longer used
 2749+ if ( jQuery.isEmptyObject( events ) ) {
 2750+ var handle = elemData.handle;
 2751+ if ( handle ) {
 2752+ handle.elem = null;
 2753+ }
 2754+
 2755+ delete elemData.events;
 2756+ delete elemData.handle;
 2757+
 2758+ if ( jQuery.isEmptyObject( elemData ) ) {
 2759+ jQuery.removeData( elem, undefined, true );
 2760+ }
 2761+ }
 2762+ },
 2763+
 2764+ // Events that are safe to short-circuit if no handlers are attached.
 2765+ // Native DOM events should not be added, they may have inline handlers.
 2766+ customEvent: {
 2767+ "getData": true,
 2768+ "setData": true,
 2769+ "changeData": true
 2770+ },
 2771+
 2772+ trigger: function( event, data, elem, onlyHandlers ) {
 2773+ // Event object or event type
 2774+ var type = event.type || event,
 2775+ namespaces = [],
 2776+ exclusive;
 2777+
 2778+ if ( type.indexOf("!") >= 0 ) {
 2779+ // Exclusive events trigger only for the exact event (no namespaces)
 2780+ type = type.slice(0, -1);
 2781+ exclusive = true;
 2782+ }
 2783+
 2784+ if ( type.indexOf(".") >= 0 ) {
 2785+ // Namespaced trigger; create a regexp to match event type in handle()
 2786+ namespaces = type.split(".");
 2787+ type = namespaces.shift();
 2788+ namespaces.sort();
 2789+ }
 2790+
 2791+ if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
 2792+ // No jQuery handlers for this event type, and it can't have inline handlers
 2793+ return;
 2794+ }
 2795+
 2796+ // Caller can pass in an Event, Object, or just an event type string
 2797+ event = typeof event === "object" ?
 2798+ // jQuery.Event object
 2799+ event[ jQuery.expando ] ? event :
 2800+ // Object literal
 2801+ new jQuery.Event( type, event ) :
 2802+ // Just the event type (string)
 2803+ new jQuery.Event( type );
 2804+
 2805+ event.type = type;
 2806+ event.exclusive = exclusive;
 2807+ event.namespace = namespaces.join(".");
 2808+ event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)");
 2809+
 2810+ // triggerHandler() and global events don't bubble or run the default action
 2811+ if ( onlyHandlers || !elem ) {
 2812+ event.preventDefault();
 2813+ event.stopPropagation();
 2814+ }
 2815+
 2816+ // Handle a global trigger
 2817+ if ( !elem ) {
 2818+ // TODO: Stop taunting the data cache; remove global events and always attach to document
 2819+ jQuery.each( jQuery.cache, function() {
 2820+ // internalKey variable is just used to make it easier to find
 2821+ // and potentially change this stuff later; currently it just
 2822+ // points to jQuery.expando
 2823+ var internalKey = jQuery.expando,
 2824+ internalCache = this[ internalKey ];
 2825+ if ( internalCache && internalCache.events && internalCache.events[ type ] ) {
 2826+ jQuery.event.trigger( event, data, internalCache.handle.elem );
 2827+ }
 2828+ });
 2829+ return;
 2830+ }
 2831+
 2832+ // Don't do events on text and comment nodes
 2833+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
 2834+ return;
 2835+ }
 2836+
 2837+ // Clean up the event in case it is being reused
 2838+ event.result = undefined;
 2839+ event.target = elem;
 2840+
 2841+ // Clone any incoming data and prepend the event, creating the handler arg list
 2842+ data = data ? jQuery.makeArray( data ) : [];
 2843+ data.unshift( event );
 2844+
 2845+ var cur = elem,
 2846+ // IE doesn't like method names with a colon (#3533, #8272)
 2847+ ontype = type.indexOf(":") < 0 ? "on" + type : "";
 2848+
 2849+ // Fire event on the current element, then bubble up the DOM tree
 2850+ do {
 2851+ var handle = jQuery._data( cur, "handle" );
 2852+
 2853+ event.currentTarget = cur;
 2854+ if ( handle ) {
 2855+ handle.apply( cur, data );
 2856+ }
 2857+
 2858+ // Trigger an inline bound script
 2859+ if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) {
 2860+ event.result = false;
 2861+ event.preventDefault();
 2862+ }
 2863+
 2864+ // Bubble up to document, then to window
 2865+ cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window;
 2866+ } while ( cur && !event.isPropagationStopped() );
 2867+
 2868+ // If nobody prevented the default action, do it now
 2869+ if ( !event.isDefaultPrevented() ) {
 2870+ var old,
 2871+ special = jQuery.event.special[ type ] || {};
 2872+
 2873+ if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) &&
 2874+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
 2875+
 2876+ // Call a native DOM method on the target with the same name name as the event.
 2877+ // Can't use an .isFunction)() check here because IE6/7 fails that test.
 2878+ // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch.
 2879+ try {
 2880+ if ( ontype && elem[ type ] ) {
 2881+ // Don't re-trigger an onFOO event when we call its FOO() method
 2882+ old = elem[ ontype ];
 2883+
 2884+ if ( old ) {
 2885+ elem[ ontype ] = null;
 2886+ }
 2887+
 2888+ jQuery.event.triggered = type;
 2889+ elem[ type ]();
 2890+ }
 2891+ } catch ( ieError ) {}
 2892+
 2893+ if ( old ) {
 2894+ elem[ ontype ] = old;
 2895+ }
 2896+
 2897+ jQuery.event.triggered = undefined;
 2898+ }
 2899+ }
 2900+
 2901+ return event.result;
 2902+ },
 2903+
 2904+ handle: function( event ) {
 2905+ event = jQuery.event.fix( event || window.event );
 2906+ // Snapshot the handlers list since a called handler may add/remove events.
 2907+ var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
 2908+ run_all = !event.exclusive && !event.namespace,
 2909+ args = Array.prototype.slice.call( arguments, 0 );
 2910+
 2911+ // Use the fix-ed Event rather than the (read-only) native event
 2912+ args[0] = event;
 2913+ event.currentTarget = this;
 2914+
 2915+ for ( var j = 0, l = handlers.length; j < l; j++ ) {
 2916+ var handleObj = handlers[ j ];
 2917+
 2918+ // Triggered event must 1) be non-exclusive and have no namespace, or
 2919+ // 2) have namespace(s) a subset or equal to those in the bound event.
 2920+ if ( run_all || event.namespace_re.test( handleObj.namespace ) ) {
 2921+ // Pass in a reference to the handler function itself
 2922+ // So that we can later remove it
 2923+ event.handler = handleObj.handler;
 2924+ event.data = handleObj.data;
 2925+ event.handleObj = handleObj;
 2926+
 2927+ var ret = handleObj.handler.apply( this, args );
 2928+
 2929+ if ( ret !== undefined ) {
 2930+ event.result = ret;
 2931+ if ( ret === false ) {
 2932+ event.preventDefault();
 2933+ event.stopPropagation();
 2934+ }
 2935+ }
 2936+
 2937+ if ( event.isImmediatePropagationStopped() ) {
 2938+ break;
 2939+ }
 2940+ }
 2941+ }
 2942+ return event.result;
 2943+ },
 2944+
 2945+ props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
 2946+
 2947+ fix: function( event ) {
 2948+ if ( event[ jQuery.expando ] ) {
 2949+ return event;
 2950+ }
 2951+
 2952+ // store a copy of the original event object
 2953+ // and "clone" to set read-only properties
 2954+ var originalEvent = event;
 2955+ event = jQuery.Event( originalEvent );
 2956+
 2957+ for ( var i = this.props.length, prop; i; ) {
 2958+ prop = this.props[ --i ];
 2959+ event[ prop ] = originalEvent[ prop ];
 2960+ }
 2961+
 2962+ // Fix target property, if necessary
 2963+ if ( !event.target ) {
 2964+ // Fixes #1925 where srcElement might not be defined either
 2965+ event.target = event.srcElement || document;
 2966+ }
 2967+
 2968+ // check if target is a textnode (safari)
 2969+ if ( event.target.nodeType === 3 ) {
 2970+ event.target = event.target.parentNode;
 2971+ }
 2972+
 2973+ // Add relatedTarget, if necessary
 2974+ if ( !event.relatedTarget && event.fromElement ) {
 2975+ event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
 2976+ }
 2977+
 2978+ // Calculate pageX/Y if missing and clientX/Y available
 2979+ if ( event.pageX == null && event.clientX != null ) {
 2980+ var eventDocument = event.target.ownerDocument || document,
 2981+ doc = eventDocument.documentElement,
 2982+ body = eventDocument.body;
 2983+
 2984+ event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
 2985+ event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
 2986+ }
 2987+
 2988+ // Add which for key events
 2989+ if ( event.which == null && (event.charCode != null || event.keyCode != null) ) {
 2990+ event.which = event.charCode != null ? event.charCode : event.keyCode;
 2991+ }
 2992+
 2993+ // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
 2994+ if ( !event.metaKey && event.ctrlKey ) {
 2995+ event.metaKey = event.ctrlKey;
 2996+ }
 2997+
 2998+ // Add which for click: 1 === left; 2 === middle; 3 === right
 2999+ // Note: button is not normalized, so don't use it
 3000+ if ( !event.which && event.button !== undefined ) {
 3001+ event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
 3002+ }
 3003+
 3004+ return event;
 3005+ },
 3006+
 3007+ // Deprecated, use jQuery.guid instead
 3008+ guid: 1E8,
 3009+
 3010+ // Deprecated, use jQuery.proxy instead
 3011+ proxy: jQuery.proxy,
 3012+
 3013+ special: {
 3014+ ready: {
 3015+ // Make sure the ready event is setup
 3016+ setup: jQuery.bindReady,
 3017+ teardown: jQuery.noop
 3018+ },
 3019+
 3020+ live: {
 3021+ add: function( handleObj ) {
 3022+ jQuery.event.add( this,
 3023+ liveConvert( handleObj.origType, handleObj.selector ),
 3024+ jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) );
 3025+ },
 3026+
 3027+ remove: function( handleObj ) {
 3028+ jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj );
 3029+ }
 3030+ },
 3031+
 3032+ beforeunload: {
 3033+ setup: function( data, namespaces, eventHandle ) {
 3034+ // We only want to do this special case on windows
 3035+ if ( jQuery.isWindow( this ) ) {
 3036+ this.onbeforeunload = eventHandle;
 3037+ }
 3038+ },
 3039+
 3040+ teardown: function( namespaces, eventHandle ) {
 3041+ if ( this.onbeforeunload === eventHandle ) {
 3042+ this.onbeforeunload = null;
 3043+ }
 3044+ }
 3045+ }
 3046+ }
 3047+};
 3048+
 3049+jQuery.removeEvent = document.removeEventListener ?
 3050+ function( elem, type, handle ) {
 3051+ if ( elem.removeEventListener ) {
 3052+ elem.removeEventListener( type, handle, false );
 3053+ }
 3054+ } :
 3055+ function( elem, type, handle ) {
 3056+ if ( elem.detachEvent ) {
 3057+ elem.detachEvent( "on" + type, handle );
 3058+ }
 3059+ };
 3060+
 3061+jQuery.Event = function( src, props ) {
 3062+ // Allow instantiation without the 'new' keyword
 3063+ if ( !this.preventDefault ) {
 3064+ return new jQuery.Event( src, props );
 3065+ }
 3066+
 3067+ // Event object
 3068+ if ( src && src.type ) {
 3069+ this.originalEvent = src;
 3070+ this.type = src.type;
 3071+
 3072+ // Events bubbling up the document may have been marked as prevented
 3073+ // by a handler lower down the tree; reflect the correct value.
 3074+ this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
 3075+ src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
 3076+
 3077+ // Event type
 3078+ } else {
 3079+ this.type = src;
 3080+ }
 3081+
 3082+ // Put explicitly provided properties onto the event object
 3083+ if ( props ) {
 3084+ jQuery.extend( this, props );
 3085+ }
 3086+
 3087+ // timeStamp is buggy for some events on Firefox(#3843)
 3088+ // So we won't rely on the native value
 3089+ this.timeStamp = jQuery.now();
 3090+
 3091+ // Mark it as fixed
 3092+ this[ jQuery.expando ] = true;
 3093+};
 3094+
 3095+function returnFalse() {
 3096+ return false;
 3097+}
 3098+function returnTrue() {
 3099+ return true;
 3100+}
 3101+
 3102+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
 3103+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
 3104+jQuery.Event.prototype = {
 3105+ preventDefault: function() {
 3106+ this.isDefaultPrevented = returnTrue;
 3107+
 3108+ var e = this.originalEvent;
 3109+ if ( !e ) {
 3110+ return;
 3111+ }
 3112+
 3113+ // if preventDefault exists run it on the original event
 3114+ if ( e.preventDefault ) {
 3115+ e.preventDefault();
 3116+
 3117+ // otherwise set the returnValue property of the original event to false (IE)
 3118+ } else {
 3119+ e.returnValue = false;
 3120+ }
 3121+ },
 3122+ stopPropagation: function() {
 3123+ this.isPropagationStopped = returnTrue;
 3124+
 3125+ var e = this.originalEvent;
 3126+ if ( !e ) {
 3127+ return;
 3128+ }
 3129+ // if stopPropagation exists run it on the original event
 3130+ if ( e.stopPropagation ) {
 3131+ e.stopPropagation();
 3132+ }
 3133+ // otherwise set the cancelBubble property of the original event to true (IE)
 3134+ e.cancelBubble = true;
 3135+ },
 3136+ stopImmediatePropagation: function() {
 3137+ this.isImmediatePropagationStopped = returnTrue;
 3138+ this.stopPropagation();
 3139+ },
 3140+ isDefaultPrevented: returnFalse,
 3141+ isPropagationStopped: returnFalse,
 3142+ isImmediatePropagationStopped: returnFalse
 3143+};
 3144+
 3145+// Checks if an event happened on an element within another element
 3146+// Used in jQuery.event.special.mouseenter and mouseleave handlers
 3147+var withinElement = function( event ) {
 3148+ // Check if mouse(over|out) are still within the same parent element
 3149+ var parent = event.relatedTarget;
 3150+
 3151+ // set the correct event type
 3152+ event.type = event.data;
 3153+
 3154+ // Firefox sometimes assigns relatedTarget a XUL element
 3155+ // which we cannot access the parentNode property of
 3156+ try {
 3157+
 3158+ // Chrome does something similar, the parentNode property
 3159+ // can be accessed but is null.
 3160+ if ( parent && parent !== document && !parent.parentNode ) {
 3161+ return;
 3162+ }
 3163+
 3164+ // Traverse up the tree
 3165+ while ( parent && parent !== this ) {
 3166+ parent = parent.parentNode;
 3167+ }
 3168+
 3169+ if ( parent !== this ) {
 3170+ // handle event if we actually just moused on to a non sub-element
 3171+ jQuery.event.handle.apply( this, arguments );
 3172+ }
 3173+
 3174+ // assuming we've left the element since we most likely mousedover a xul element
 3175+ } catch(e) { }
 3176+},
 3177+
 3178+// In case of event delegation, we only need to rename the event.type,
 3179+// liveHandler will take care of the rest.
 3180+delegate = function( event ) {
 3181+ event.type = event.data;
 3182+ jQuery.event.handle.apply( this, arguments );
 3183+};
 3184+
 3185+// Create mouseenter and mouseleave events
 3186+jQuery.each({
 3187+ mouseenter: "mouseover",
 3188+ mouseleave: "mouseout"
 3189+}, function( orig, fix ) {
 3190+ jQuery.event.special[ orig ] = {
 3191+ setup: function( data ) {
 3192+ jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
 3193+ },
 3194+ teardown: function( data ) {
 3195+ jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
 3196+ }
 3197+ };
 3198+});
 3199+
 3200+// submit delegation
 3201+if ( !jQuery.support.submitBubbles ) {
 3202+
 3203+ jQuery.event.special.submit = {
 3204+ setup: function( data, namespaces ) {
 3205+ if ( !jQuery.nodeName( this, "form" ) ) {
 3206+ jQuery.event.add(this, "click.specialSubmit", function( e ) {
 3207+ var elem = e.target,
 3208+ type = elem.type;
 3209+
 3210+ if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
 3211+ trigger( "submit", this, arguments );
 3212+ }
 3213+ });
 3214+
 3215+ jQuery.event.add(this, "keypress.specialSubmit", function( e ) {
 3216+ var elem = e.target,
 3217+ type = elem.type;
 3218+
 3219+ if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
 3220+ trigger( "submit", this, arguments );
 3221+ }
 3222+ });
 3223+
 3224+ } else {
 3225+ return false;
 3226+ }
 3227+ },
 3228+
 3229+ teardown: function( namespaces ) {
 3230+ jQuery.event.remove( this, ".specialSubmit" );
 3231+ }
 3232+ };
 3233+
 3234+}
 3235+
 3236+// change delegation, happens here so we have bind.
 3237+if ( !jQuery.support.changeBubbles ) {
 3238+
 3239+ var changeFilters,
 3240+
 3241+ getVal = function( elem ) {
 3242+ var type = elem.type, val = elem.value;
 3243+
 3244+ if ( type === "radio" || type === "checkbox" ) {
 3245+ val = elem.checked;
 3246+
 3247+ } else if ( type === "select-multiple" ) {
 3248+ val = elem.selectedIndex > -1 ?
 3249+ jQuery.map( elem.options, function( elem ) {
 3250+ return elem.selected;
 3251+ }).join("-") :
 3252+ "";
 3253+
 3254+ } else if ( jQuery.nodeName( elem, "select" ) ) {
 3255+ val = elem.selectedIndex;
 3256+ }
 3257+
 3258+ return val;
 3259+ },
 3260+
 3261+ testChange = function testChange( e ) {
 3262+ var elem = e.target, data, val;
 3263+
 3264+ if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) {
 3265+ return;
 3266+ }
 3267+
 3268+ data = jQuery._data( elem, "_change_data" );
 3269+ val = getVal(elem);
 3270+
 3271+ // the current data will be also retrieved by beforeactivate
 3272+ if ( e.type !== "focusout" || elem.type !== "radio" ) {
 3273+ jQuery._data( elem, "_change_data", val );
 3274+ }
 3275+
 3276+ if ( data === undefined || val === data ) {
 3277+ return;
 3278+ }
 3279+
 3280+ if ( data != null || val ) {
 3281+ e.type = "change";
 3282+ e.liveFired = undefined;
 3283+ jQuery.event.trigger( e, arguments[1], elem );
 3284+ }
 3285+ };
 3286+
 3287+ jQuery.event.special.change = {
 3288+ filters: {
 3289+ focusout: testChange,
 3290+
 3291+ beforedeactivate: testChange,
 3292+
 3293+ click: function( e ) {
 3294+ var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
 3295+
 3296+ if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) {
 3297+ testChange.call( this, e );
 3298+ }
 3299+ },
 3300+
 3301+ // Change has to be called before submit
 3302+ // Keydown will be called before keypress, which is used in submit-event delegation
 3303+ keydown: function( e ) {
 3304+ var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : "";
 3305+
 3306+ if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) ||
 3307+ (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
 3308+ type === "select-multiple" ) {
 3309+ testChange.call( this, e );
 3310+ }
 3311+ },
 3312+
 3313+ // Beforeactivate happens also before the previous element is blurred
 3314+ // with this event you can't trigger a change event, but you can store
 3315+ // information
 3316+ beforeactivate: function( e ) {
 3317+ var elem = e.target;
 3318+ jQuery._data( elem, "_change_data", getVal(elem) );
 3319+ }
 3320+ },
 3321+
 3322+ setup: function( data, namespaces ) {
 3323+ if ( this.type === "file" ) {
 3324+ return false;
 3325+ }
 3326+
 3327+ for ( var type in changeFilters ) {
 3328+ jQuery.event.add( this, type + ".specialChange", changeFilters[type] );
 3329+ }
 3330+
 3331+ return rformElems.test( this.nodeName );
 3332+ },
 3333+
 3334+ teardown: function( namespaces ) {
 3335+ jQuery.event.remove( this, ".specialChange" );
 3336+
 3337+ return rformElems.test( this.nodeName );
 3338+ }
 3339+ };
 3340+
 3341+ changeFilters = jQuery.event.special.change.filters;
 3342+
 3343+ // Handle when the input is .focus()'d
 3344+ changeFilters.focus = changeFilters.beforeactivate;
 3345+}
 3346+
 3347+function trigger( type, elem, args ) {
 3348+ // Piggyback on a donor event to simulate a different one.
 3349+ // Fake originalEvent to avoid donor's stopPropagation, but if the
 3350+ // simulated event prevents default then we do the same on the donor.
 3351+ // Don't pass args or remember liveFired; they apply to the donor event.
 3352+ var event = jQuery.extend( {}, args[ 0 ] );
 3353+ event.type = type;
 3354+ event.originalEvent = {};
 3355+ event.liveFired = undefined;
 3356+ jQuery.event.handle.call( elem, event );
 3357+ if ( event.isDefaultPrevented() ) {
 3358+ args[ 0 ].preventDefault();
 3359+ }
 3360+}
 3361+
 3362+// Create "bubbling" focus and blur events
 3363+if ( !jQuery.support.focusinBubbles ) {
 3364+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
 3365+
 3366+ // Attach a single capturing handler while someone wants focusin/focusout
 3367+ var attaches = 0;
 3368+
 3369+ jQuery.event.special[ fix ] = {
 3370+ setup: function() {
 3371+ if ( attaches++ === 0 ) {
 3372+ document.addEventListener( orig, handler, true );
 3373+ }
 3374+ },
 3375+ teardown: function() {
 3376+ if ( --attaches === 0 ) {
 3377+ document.removeEventListener( orig, handler, true );
 3378+ }
 3379+ }
 3380+ };
 3381+
 3382+ function handler( donor ) {
 3383+ // Donor event is always a native one; fix it and switch its type.
 3384+ // Let focusin/out handler cancel the donor focus/blur event.
 3385+ var e = jQuery.event.fix( donor );
 3386+ e.type = fix;
 3387+ e.originalEvent = {};
 3388+ jQuery.event.trigger( e, null, e.target );
 3389+ if ( e.isDefaultPrevented() ) {
 3390+ donor.preventDefault();
 3391+ }
 3392+ }
 3393+ });
 3394+}
 3395+
 3396+jQuery.each(["bind", "one"], function( i, name ) {
 3397+ jQuery.fn[ name ] = function( type, data, fn ) {
 3398+ var handler;
 3399+
 3400+ // Handle object literals
 3401+ if ( typeof type === "object" ) {
 3402+ for ( var key in type ) {
 3403+ this[ name ](key, data, type[key], fn);
 3404+ }
 3405+ return this;
 3406+ }
 3407+
 3408+ if ( arguments.length === 2 || data === false ) {
 3409+ fn = data;
 3410+ data = undefined;
 3411+ }
 3412+
 3413+ if ( name === "one" ) {
 3414+ handler = function( event ) {
 3415+ jQuery( this ).unbind( event, handler );
 3416+ return fn.apply( this, arguments );
 3417+ };
 3418+ handler.guid = fn.guid || jQuery.guid++;
 3419+ } else {
 3420+ handler = fn;
 3421+ }
 3422+
 3423+ if ( type === "unload" && name !== "one" ) {
 3424+ this.one( type, data, fn );
 3425+
 3426+ } else {
 3427+ for ( var i = 0, l = this.length; i < l; i++ ) {
 3428+ jQuery.event.add( this[i], type, handler, data );
 3429+ }
 3430+ }
 3431+
 3432+ return this;
 3433+ };
 3434+});
 3435+
 3436+jQuery.fn.extend({
 3437+ unbind: function( type, fn ) {
 3438+ // Handle object literals
 3439+ if ( typeof type === "object" && !type.preventDefault ) {
 3440+ for ( var key in type ) {
 3441+ this.unbind(key, type[key]);
 3442+ }
 3443+
 3444+ } else {
 3445+ for ( var i = 0, l = this.length; i < l; i++ ) {
 3446+ jQuery.event.remove( this[i], type, fn );
 3447+ }
 3448+ }
 3449+
 3450+ return this;
 3451+ },
 3452+
 3453+ delegate: function( selector, types, data, fn ) {
 3454+ return this.live( types, data, fn, selector );
 3455+ },
 3456+
 3457+ undelegate: function( selector, types, fn ) {
 3458+ if ( arguments.length === 0 ) {
 3459+ return this.unbind( "live" );
 3460+
 3461+ } else {
 3462+ return this.die( types, null, fn, selector );
 3463+ }
 3464+ },
 3465+
 3466+ trigger: function( type, data ) {
 3467+ return this.each(function() {
 3468+ jQuery.event.trigger( type, data, this );
 3469+ });
 3470+ },
 3471+
 3472+ triggerHandler: function( type, data ) {
 3473+ if ( this[0] ) {
 3474+ return jQuery.event.trigger( type, data, this[0], true );
 3475+ }
 3476+ },
 3477+
 3478+ toggle: function( fn ) {
 3479+ // Save reference to arguments for access in closure
 3480+ var args = arguments,
 3481+ guid = fn.guid || jQuery.guid++,
 3482+ i = 0,
 3483+ toggler = function( event ) {
 3484+ // Figure out which function to execute
 3485+ var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
 3486+ jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
 3487+
 3488+ // Make sure that clicks stop
 3489+ event.preventDefault();
 3490+
 3491+ // and execute the function
 3492+ return args[ lastToggle ].apply( this, arguments ) || false;
 3493+ };
 3494+
 3495+ // link all the functions, so any of them can unbind this click handler
 3496+ toggler.guid = guid;
 3497+ while ( i < args.length ) {
 3498+ args[ i++ ].guid = guid;
 3499+ }
 3500+
 3501+ return this.click( toggler );
 3502+ },
 3503+
 3504+ hover: function( fnOver, fnOut ) {
 3505+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
 3506+ }
 3507+});
 3508+
 3509+var liveMap = {
 3510+ focus: "focusin",
 3511+ blur: "focusout",
 3512+ mouseenter: "mouseover",
 3513+ mouseleave: "mouseout"
 3514+};
 3515+
 3516+jQuery.each(["live", "die"], function( i, name ) {
 3517+ jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
 3518+ var type, i = 0, match, namespaces, preType,
 3519+ selector = origSelector || this.selector,
 3520+ context = origSelector ? this : jQuery( this.context );
 3521+
 3522+ if ( typeof types === "object" && !types.preventDefault ) {
 3523+ for ( var key in types ) {
 3524+ context[ name ]( key, data, types[key], selector );
 3525+ }
 3526+
 3527+ return this;
 3528+ }
 3529+
 3530+ if ( name === "die" && !types &&
 3531+ origSelector && origSelector.charAt(0) === "." ) {
 3532+
 3533+ context.unbind( origSelector );
 3534+
 3535+ return this;
 3536+ }
 3537+
 3538+ if ( data === false || jQuery.isFunction( data ) ) {
 3539+ fn = data || returnFalse;
 3540+ data = undefined;
 3541+ }
 3542+
 3543+ types = (types || "").split(" ");
 3544+
 3545+ while ( (type = types[ i++ ]) != null ) {
 3546+ match = rnamespaces.exec( type );
 3547+ namespaces = "";
 3548+
 3549+ if ( match ) {
 3550+ namespaces = match[0];
 3551+ type = type.replace( rnamespaces, "" );
 3552+ }
 3553+
 3554+ if ( type === "hover" ) {
 3555+ types.push( "mouseenter" + namespaces, "mouseleave" + namespaces );
 3556+ continue;
 3557+ }
 3558+
 3559+ preType = type;
 3560+
 3561+ if ( liveMap[ type ] ) {
 3562+ types.push( liveMap[ type ] + namespaces );
 3563+ type = type + namespaces;
 3564+
 3565+ } else {
 3566+ type = (liveMap[ type ] || type) + namespaces;
 3567+ }
 3568+
 3569+ if ( name === "live" ) {
 3570+ // bind live handler
 3571+ for ( var j = 0, l = context.length; j < l; j++ ) {
 3572+ jQuery.event.add( context[j], "live." + liveConvert( type, selector ),
 3573+ { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } );
 3574+ }
 3575+
 3576+ } else {
 3577+ // unbind live handler
 3578+ context.unbind( "live." + liveConvert( type, selector ), fn );
 3579+ }
 3580+ }
 3581+
 3582+ return this;
 3583+ };
 3584+});
 3585+
 3586+function liveHandler( event ) {
 3587+ var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret,
 3588+ elems = [],
 3589+ selectors = [],
 3590+ events = jQuery._data( this, "events" );
 3591+
 3592+ // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911)
 3593+ if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) {
 3594+ return;
 3595+ }
 3596+
 3597+ if ( event.namespace ) {
 3598+ namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)");
 3599+ }
 3600+
 3601+ event.liveFired = this;
 3602+
 3603+ var live = events.live.slice(0);
 3604+
 3605+ for ( j = 0; j < live.length; j++ ) {
 3606+ handleObj = live[j];
 3607+
 3608+ if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) {
 3609+ selectors.push( handleObj.selector );
 3610+
 3611+ } else {
 3612+ live.splice( j--, 1 );
 3613+ }
 3614+ }
 3615+
 3616+ match = jQuery( event.target ).closest( selectors, event.currentTarget );
 3617+
 3618+ for ( i = 0, l = match.length; i < l; i++ ) {
 3619+ close = match[i];
 3620+
 3621+ for ( j = 0; j < live.length; j++ ) {
 3622+ handleObj = live[j];
 3623+
 3624+ if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) {
 3625+ elem = close.elem;
 3626+ related = null;
 3627+
 3628+ // Those two events require additional checking
 3629+ if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) {
 3630+ event.type = handleObj.preType;
 3631+ related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0];
 3632+
 3633+ // Make sure not to accidentally match a child element with the same selector
 3634+ if ( related && jQuery.contains( elem, related ) ) {
 3635+ related = elem;
 3636+ }
 3637+ }
 3638+
 3639+ if ( !related || related !== elem ) {
 3640+ elems.push({ elem: elem, handleObj: handleObj, level: close.level });
 3641+ }
 3642+ }
 3643+ }
 3644+ }
 3645+
 3646+ for ( i = 0, l = elems.length; i < l; i++ ) {
 3647+ match = elems[i];
 3648+
 3649+ if ( maxLevel && match.level > maxLevel ) {
 3650+ break;
 3651+ }
 3652+
 3653+ event.currentTarget = match.elem;
 3654+ event.data = match.handleObj.data;
 3655+ event.handleObj = match.handleObj;
 3656+
 3657+ ret = match.handleObj.origHandler.apply( match.elem, arguments );
 3658+
 3659+ if ( ret === false || event.isPropagationStopped() ) {
 3660+ maxLevel = match.level;
 3661+
 3662+ if ( ret === false ) {
 3663+ stop = false;
 3664+ }
 3665+ if ( event.isImmediatePropagationStopped() ) {
 3666+ break;
 3667+ }
 3668+ }
 3669+ }
 3670+
 3671+ return stop;
 3672+}
 3673+
 3674+function liveConvert( type, selector ) {
 3675+ return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&");
 3676+}
 3677+
 3678+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
 3679+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
 3680+ "change select submit keydown keypress keyup error").split(" "), function( i, name ) {
 3681+
 3682+ // Handle event binding
 3683+ jQuery.fn[ name ] = function( data, fn ) {
 3684+ if ( fn == null ) {
 3685+ fn = data;
 3686+ data = null;
 3687+ }
 3688+
 3689+ return arguments.length > 0 ?
 3690+ this.bind( name, data, fn ) :
 3691+ this.trigger( name );
 3692+ };
 3693+
 3694+ if ( jQuery.attrFn ) {
 3695+ jQuery.attrFn[ name ] = true;
 3696+ }
 3697+});
 3698+
 3699+
 3700+
 3701+/*!
 3702+ * Sizzle CSS Selector Engine
 3703+ * Copyright 2011, The Dojo Foundation
 3704+ * Released under the MIT, BSD, and GPL Licenses.
 3705+ * More information: http://sizzlejs.com/
 3706+ */
 3707+(function(){
 3708+
 3709+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
 3710+ done = 0,
 3711+ toString = Object.prototype.toString,
 3712+ hasDuplicate = false,
 3713+ baseHasDuplicate = true,
 3714+ rBackslash = /\\/g,
 3715+ rNonWord = /\W/;
 3716+
 3717+// Here we check if the JavaScript engine is using some sort of
 3718+// optimization where it does not always call our comparision
 3719+// function. If that is the case, discard the hasDuplicate value.
 3720+// Thus far that includes Google Chrome.
 3721+[0, 0].sort(function() {
 3722+ baseHasDuplicate = false;
 3723+ return 0;
 3724+});
 3725+
 3726+var Sizzle = function( selector, context, results, seed ) {
 3727+ results = results || [];
 3728+ context = context || document;
 3729+
 3730+ var origContext = context;
 3731+
 3732+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
 3733+ return [];
 3734+ }
 3735+
 3736+ if ( !selector || typeof selector !== "string" ) {
 3737+ return results;
 3738+ }
 3739+
 3740+ var m, set, checkSet, extra, ret, cur, pop, i,
 3741+ prune = true,
 3742+ contextXML = Sizzle.isXML( context ),
 3743+ parts = [],
 3744+ soFar = selector;
 3745+
 3746+ // Reset the position of the chunker regexp (start from head)
 3747+ do {
 3748+ chunker.exec( "" );
 3749+ m = chunker.exec( soFar );
 3750+
 3751+ if ( m ) {
 3752+ soFar = m[3];
 3753+
 3754+ parts.push( m[1] );
 3755+
 3756+ if ( m[2] ) {
 3757+ extra = m[3];
 3758+ break;
 3759+ }
 3760+ }
 3761+ } while ( m );
 3762+
 3763+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
 3764+
 3765+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
 3766+ set = posProcess( parts[0] + parts[1], context );
 3767+
 3768+ } else {
 3769+ set = Expr.relative[ parts[0] ] ?
 3770+ [ context ] :
 3771+ Sizzle( parts.shift(), context );
 3772+
 3773+ while ( parts.length ) {
 3774+ selector = parts.shift();
 3775+
 3776+ if ( Expr.relative[ selector ] ) {
 3777+ selector += parts.shift();
 3778+ }
 3779+
 3780+ set = posProcess( selector, set );
 3781+ }
 3782+ }
 3783+
 3784+ } else {
 3785+ // Take a shortcut and set the context if the root selector is an ID
 3786+ // (but not if it'll be faster if the inner selector is an ID)
 3787+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
 3788+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
 3789+
 3790+ ret = Sizzle.find( parts.shift(), context, contextXML );
 3791+ context = ret.expr ?
 3792+ Sizzle.filter( ret.expr, ret.set )[0] :
 3793+ ret.set[0];
 3794+ }
 3795+
 3796+ if ( context ) {
 3797+ ret = seed ?
 3798+ { expr: parts.pop(), set: makeArray(seed) } :
 3799+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
 3800+
 3801+ set = ret.expr ?
 3802+ Sizzle.filter( ret.expr, ret.set ) :
 3803+ ret.set;
 3804+
 3805+ if ( parts.length > 0 ) {
 3806+ checkSet = makeArray( set );
 3807+
 3808+ } else {
 3809+ prune = false;
 3810+ }
 3811+
 3812+ while ( parts.length ) {
 3813+ cur = parts.pop();
 3814+ pop = cur;
 3815+
 3816+ if ( !Expr.relative[ cur ] ) {
 3817+ cur = "";
 3818+ } else {
 3819+ pop = parts.pop();
 3820+ }
 3821+
 3822+ if ( pop == null ) {
 3823+ pop = context;
 3824+ }
 3825+
 3826+ Expr.relative[ cur ]( checkSet, pop, contextXML );
 3827+ }
 3828+
 3829+ } else {
 3830+ checkSet = parts = [];
 3831+ }
 3832+ }
 3833+
 3834+ if ( !checkSet ) {
 3835+ checkSet = set;
 3836+ }
 3837+
 3838+ if ( !checkSet ) {
 3839+ Sizzle.error( cur || selector );
 3840+ }
 3841+
 3842+ if ( toString.call(checkSet) === "[object Array]" ) {
 3843+ if ( !prune ) {
 3844+ results.push.apply( results, checkSet );
 3845+
 3846+ } else if ( context && context.nodeType === 1 ) {
 3847+ for ( i = 0; checkSet[i] != null; i++ ) {
 3848+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
 3849+ results.push( set[i] );
 3850+ }
 3851+ }
 3852+
 3853+ } else {
 3854+ for ( i = 0; checkSet[i] != null; i++ ) {
 3855+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
 3856+ results.push( set[i] );
 3857+ }
 3858+ }
 3859+ }
 3860+
 3861+ } else {
 3862+ makeArray( checkSet, results );
 3863+ }
 3864+
 3865+ if ( extra ) {
 3866+ Sizzle( extra, origContext, results, seed );
 3867+ Sizzle.uniqueSort( results );
 3868+ }
 3869+
 3870+ return results;
 3871+};
 3872+
 3873+Sizzle.uniqueSort = function( results ) {
 3874+ if ( sortOrder ) {
 3875+ hasDuplicate = baseHasDuplicate;
 3876+ results.sort( sortOrder );
 3877+
 3878+ if ( hasDuplicate ) {
 3879+ for ( var i = 1; i < results.length; i++ ) {
 3880+ if ( results[i] === results[ i - 1 ] ) {
 3881+ results.splice( i--, 1 );
 3882+ }
 3883+ }
 3884+ }
 3885+ }
 3886+
 3887+ return results;
 3888+};
 3889+
 3890+Sizzle.matches = function( expr, set ) {
 3891+ return Sizzle( expr, null, null, set );
 3892+};
 3893+
 3894+Sizzle.matchesSelector = function( node, expr ) {
 3895+ return Sizzle( expr, null, null, [node] ).length > 0;
 3896+};
 3897+
 3898+Sizzle.find = function( expr, context, isXML ) {
 3899+ var set;
 3900+
 3901+ if ( !expr ) {
 3902+ return [];
 3903+ }
 3904+
 3905+ for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
 3906+ var match,
 3907+ type = Expr.order[i];
 3908+
 3909+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
 3910+ var left = match[1];
 3911+ match.splice( 1, 1 );
 3912+
 3913+ if ( left.substr( left.length - 1 ) !== "\\" ) {
 3914+ match[1] = (match[1] || "").replace( rBackslash, "" );
 3915+ set = Expr.find[ type ]( match, context, isXML );
 3916+
 3917+ if ( set != null ) {
 3918+ expr = expr.replace( Expr.match[ type ], "" );
 3919+ break;
 3920+ }
 3921+ }
 3922+ }
 3923+ }
 3924+
 3925+ if ( !set ) {
 3926+ set = typeof context.getElementsByTagName !== "undefined" ?
 3927+ context.getElementsByTagName( "*" ) :
 3928+ [];
 3929+ }
 3930+
 3931+ return { set: set, expr: expr };
 3932+};
 3933+
 3934+Sizzle.filter = function( expr, set, inplace, not ) {
 3935+ var match, anyFound,
 3936+ old = expr,
 3937+ result = [],
 3938+ curLoop = set,
 3939+ isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
 3940+
 3941+ while ( expr && set.length ) {
 3942+ for ( var type in Expr.filter ) {
 3943+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
 3944+ var found, item,
 3945+ filter = Expr.filter[ type ],
 3946+ left = match[1];
 3947+
 3948+ anyFound = false;
 3949+
 3950+ match.splice(1,1);
 3951+
 3952+ if ( left.substr( left.length - 1 ) === "\\" ) {
 3953+ continue;
 3954+ }
 3955+
 3956+ if ( curLoop === result ) {
 3957+ result = [];
 3958+ }
 3959+
 3960+ if ( Expr.preFilter[ type ] ) {
 3961+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
 3962+
 3963+ if ( !match ) {
 3964+ anyFound = found = true;
 3965+
 3966+ } else if ( match === true ) {
 3967+ continue;
 3968+ }
 3969+ }
 3970+
 3971+ if ( match ) {
 3972+ for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
 3973+ if ( item ) {
 3974+ found = filter( item, match, i, curLoop );
 3975+ var pass = not ^ !!found;
 3976+
 3977+ if ( inplace && found != null ) {
 3978+ if ( pass ) {
 3979+ anyFound = true;
 3980+
 3981+ } else {
 3982+ curLoop[i] = false;
 3983+ }
 3984+
 3985+ } else if ( pass ) {
 3986+ result.push( item );
 3987+ anyFound = true;
 3988+ }
 3989+ }
 3990+ }
 3991+ }
 3992+
 3993+ if ( found !== undefined ) {
 3994+ if ( !inplace ) {
 3995+ curLoop = result;
 3996+ }
 3997+
 3998+ expr = expr.replace( Expr.match[ type ], "" );
 3999+
 4000+ if ( !anyFound ) {
 4001+ return [];
 4002+ }
 4003+
 4004+ break;
 4005+ }
 4006+ }
 4007+ }
 4008+
 4009+ // Improper expression
 4010+ if ( expr === old ) {
 4011+ if ( anyFound == null ) {
 4012+ Sizzle.error( expr );
 4013+
 4014+ } else {
 4015+ break;
 4016+ }
 4017+ }
 4018+
 4019+ old = expr;
 4020+ }
 4021+
 4022+ return curLoop;
 4023+};
 4024+
 4025+Sizzle.error = function( msg ) {
 4026+ throw "Syntax error, unrecognized expression: " + msg;
 4027+};
 4028+
 4029+var Expr = Sizzle.selectors = {
 4030+ order: [ "ID", "NAME", "TAG" ],
 4031+
 4032+ match: {
 4033+ ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
 4034+ CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
 4035+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
 4036+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
 4037+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
 4038+ CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
 4039+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
 4040+ PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
 4041+ },
 4042+
 4043+ leftMatch: {},
 4044+
 4045+ attrMap: {
 4046+ "class": "className",
 4047+ "for": "htmlFor"
 4048+ },
 4049+
 4050+ attrHandle: {
 4051+ href: function( elem ) {
 4052+ return elem.getAttribute( "href" );
 4053+ },
 4054+ type: function( elem ) {
 4055+ return elem.getAttribute( "type" );
 4056+ }
 4057+ },
 4058+
 4059+ relative: {
 4060+ "+": function(checkSet, part){
 4061+ var isPartStr = typeof part === "string",
 4062+ isTag = isPartStr && !rNonWord.test( part ),
 4063+ isPartStrNotTag = isPartStr && !isTag;
 4064+
 4065+ if ( isTag ) {
 4066+ part = part.toLowerCase();
 4067+ }
 4068+
 4069+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
 4070+ if ( (elem = checkSet[i]) ) {
 4071+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
 4072+
 4073+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
 4074+ elem || false :
 4075+ elem === part;
 4076+ }
 4077+ }
 4078+
 4079+ if ( isPartStrNotTag ) {
 4080+ Sizzle.filter( part, checkSet, true );
 4081+ }
 4082+ },
 4083+
 4084+ ">": function( checkSet, part ) {
 4085+ var elem,
 4086+ isPartStr = typeof part === "string",
 4087+ i = 0,
 4088+ l = checkSet.length;
 4089+
 4090+ if ( isPartStr && !rNonWord.test( part ) ) {
 4091+ part = part.toLowerCase();
 4092+
 4093+ for ( ; i < l; i++ ) {
 4094+ elem = checkSet[i];
 4095+
 4096+ if ( elem ) {
 4097+ var parent = elem.parentNode;
 4098+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
 4099+ }
 4100+ }
 4101+
 4102+ } else {
 4103+ for ( ; i < l; i++ ) {
 4104+ elem = checkSet[i];
 4105+
 4106+ if ( elem ) {
 4107+ checkSet[i] = isPartStr ?
 4108+ elem.parentNode :
 4109+ elem.parentNode === part;
 4110+ }
 4111+ }
 4112+
 4113+ if ( isPartStr ) {
 4114+ Sizzle.filter( part, checkSet, true );
 4115+ }
 4116+ }
 4117+ },
 4118+
 4119+ "": function(checkSet, part, isXML){
 4120+ var nodeCheck,
 4121+ doneName = done++,
 4122+ checkFn = dirCheck;
 4123+
 4124+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
 4125+ part = part.toLowerCase();
 4126+ nodeCheck = part;
 4127+ checkFn = dirNodeCheck;
 4128+ }
 4129+
 4130+ checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
 4131+ },
 4132+
 4133+ "~": function( checkSet, part, isXML ) {
 4134+ var nodeCheck,
 4135+ doneName = done++,
 4136+ checkFn = dirCheck;
 4137+
 4138+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
 4139+ part = part.toLowerCase();
 4140+ nodeCheck = part;
 4141+ checkFn = dirNodeCheck;
 4142+ }
 4143+
 4144+ checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
 4145+ }
 4146+ },
 4147+
 4148+ find: {
 4149+ ID: function( match, context, isXML ) {
 4150+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
 4151+ var m = context.getElementById(match[1]);
 4152+ // Check parentNode to catch when Blackberry 4.6 returns
 4153+ // nodes that are no longer in the document #6963
 4154+ return m && m.parentNode ? [m] : [];
 4155+ }
 4156+ },
 4157+
 4158+ NAME: function( match, context ) {
 4159+ if ( typeof context.getElementsByName !== "undefined" ) {
 4160+ var ret = [],
 4161+ results = context.getElementsByName( match[1] );
 4162+
 4163+ for ( var i = 0, l = results.length; i < l; i++ ) {
 4164+ if ( results[i].getAttribute("name") === match[1] ) {
 4165+ ret.push( results[i] );
 4166+ }
 4167+ }
 4168+
 4169+ return ret.length === 0 ? null : ret;
 4170+ }
 4171+ },
 4172+
 4173+ TAG: function( match, context ) {
 4174+ if ( typeof context.getElementsByTagName !== "undefined" ) {
 4175+ return context.getElementsByTagName( match[1] );
 4176+ }
 4177+ }
 4178+ },
 4179+ preFilter: {
 4180+ CLASS: function( match, curLoop, inplace, result, not, isXML ) {
 4181+ match = " " + match[1].replace( rBackslash, "" ) + " ";
 4182+
 4183+ if ( isXML ) {
 4184+ return match;
 4185+ }
 4186+
 4187+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
 4188+ if ( elem ) {
 4189+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
 4190+ if ( !inplace ) {
 4191+ result.push( elem );
 4192+ }
 4193+
 4194+ } else if ( inplace ) {
 4195+ curLoop[i] = false;
 4196+ }
 4197+ }
 4198+ }
 4199+
 4200+ return false;
 4201+ },
 4202+
 4203+ ID: function( match ) {
 4204+ return match[1].replace( rBackslash, "" );
 4205+ },
 4206+
 4207+ TAG: function( match, curLoop ) {
 4208+ return match[1].replace( rBackslash, "" ).toLowerCase();
 4209+ },
 4210+
 4211+ CHILD: function( match ) {
 4212+ if ( match[1] === "nth" ) {
 4213+ if ( !match[2] ) {
 4214+ Sizzle.error( match[0] );
 4215+ }
 4216+
 4217+ match[2] = match[2].replace(/^\+|\s*/g, '');
 4218+
 4219+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
 4220+ var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
 4221+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
 4222+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
 4223+
 4224+ // calculate the numbers (first)n+(last) including if they are negative
 4225+ match[2] = (test[1] + (test[2] || 1)) - 0;
 4226+ match[3] = test[3] - 0;
 4227+ }
 4228+ else if ( match[2] ) {
 4229+ Sizzle.error( match[0] );
 4230+ }
 4231+
 4232+ // TODO: Move to normal caching system
 4233+ match[0] = done++;
 4234+
 4235+ return match;
 4236+ },
 4237+
 4238+ ATTR: function( match, curLoop, inplace, result, not, isXML ) {
 4239+ var name = match[1] = match[1].replace( rBackslash, "" );
 4240+
 4241+ if ( !isXML && Expr.attrMap[name] ) {
 4242+ match[1] = Expr.attrMap[name];
 4243+ }
 4244+
 4245+ // Handle if an un-quoted value was used
 4246+ match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
 4247+
 4248+ if ( match[2] === "~=" ) {
 4249+ match[4] = " " + match[4] + " ";
 4250+ }
 4251+
 4252+ return match;
 4253+ },
 4254+
 4255+ PSEUDO: function( match, curLoop, inplace, result, not ) {
 4256+ if ( match[1] === "not" ) {
 4257+ // If we're dealing with a complex expression, or a simple one
 4258+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
 4259+ match[3] = Sizzle(match[3], null, null, curLoop);
 4260+
 4261+ } else {
 4262+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
 4263+
 4264+ if ( !inplace ) {
 4265+ result.push.apply( result, ret );
 4266+ }
 4267+
 4268+ return false;
 4269+ }
 4270+
 4271+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
 4272+ return true;
 4273+ }
 4274+
 4275+ return match;
 4276+ },
 4277+
 4278+ POS: function( match ) {
 4279+ match.unshift( true );
 4280+
 4281+ return match;
 4282+ }
 4283+ },
 4284+
 4285+ filters: {
 4286+ enabled: function( elem ) {
 4287+ return elem.disabled === false && elem.type !== "hidden";
 4288+ },
 4289+
 4290+ disabled: function( elem ) {
 4291+ return elem.disabled === true;
 4292+ },
 4293+
 4294+ checked: function( elem ) {
 4295+ return elem.checked === true;
 4296+ },
 4297+
 4298+ selected: function( elem ) {
 4299+ // Accessing this property makes selected-by-default
 4300+ // options in Safari work properly
 4301+ if ( elem.parentNode ) {
 4302+ elem.parentNode.selectedIndex;
 4303+ }
 4304+
 4305+ return elem.selected === true;
 4306+ },
 4307+
 4308+ parent: function( elem ) {
 4309+ return !!elem.firstChild;
 4310+ },
 4311+
 4312+ empty: function( elem ) {
 4313+ return !elem.firstChild;
 4314+ },
 4315+
 4316+ has: function( elem, i, match ) {
 4317+ return !!Sizzle( match[3], elem ).length;
 4318+ },
 4319+
 4320+ header: function( elem ) {
 4321+ return (/h\d/i).test( elem.nodeName );
 4322+ },
 4323+
 4324+ text: function( elem ) {
 4325+ var attr = elem.getAttribute( "type" ), type = elem.type;
 4326+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
 4327+ // use getAttribute instead to test this case
 4328+ return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
 4329+ },
 4330+
 4331+ radio: function( elem ) {
 4332+ return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
 4333+ },
 4334+
 4335+ checkbox: function( elem ) {
 4336+ return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
 4337+ },
 4338+
 4339+ file: function( elem ) {
 4340+ return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
 4341+ },
 4342+
 4343+ password: function( elem ) {
 4344+ return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
 4345+ },
 4346+
 4347+ submit: function( elem ) {
 4348+ var name = elem.nodeName.toLowerCase();
 4349+ return (name === "input" || name === "button") && "submit" === elem.type;
 4350+ },
 4351+
 4352+ image: function( elem ) {
 4353+ return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
 4354+ },
 4355+
 4356+ reset: function( elem ) {
 4357+ var name = elem.nodeName.toLowerCase();
 4358+ return (name === "input" || name === "button") && "reset" === elem.type;
 4359+ },
 4360+
 4361+ button: function( elem ) {
 4362+ var name = elem.nodeName.toLowerCase();
 4363+ return name === "input" && "button" === elem.type || name === "button";
 4364+ },
 4365+
 4366+ input: function( elem ) {
 4367+ return (/input|select|textarea|button/i).test( elem.nodeName );
 4368+ },
 4369+
 4370+ focus: function( elem ) {
 4371+ return elem === elem.ownerDocument.activeElement;
 4372+ }
 4373+ },
 4374+ setFilters: {
 4375+ first: function( elem, i ) {
 4376+ return i === 0;
 4377+ },
 4378+
 4379+ last: function( elem, i, match, array ) {
 4380+ return i === array.length - 1;
 4381+ },
 4382+
 4383+ even: function( elem, i ) {
 4384+ return i % 2 === 0;
 4385+ },
 4386+
 4387+ odd: function( elem, i ) {
 4388+ return i % 2 === 1;
 4389+ },
 4390+
 4391+ lt: function( elem, i, match ) {
 4392+ return i < match[3] - 0;
 4393+ },
 4394+
 4395+ gt: function( elem, i, match ) {
 4396+ return i > match[3] - 0;
 4397+ },
 4398+
 4399+ nth: function( elem, i, match ) {
 4400+ return match[3] - 0 === i;
 4401+ },
 4402+
 4403+ eq: function( elem, i, match ) {
 4404+ return match[3] - 0 === i;
 4405+ }
 4406+ },
 4407+ filter: {
 4408+ PSEUDO: function( elem, match, i, array ) {
 4409+ var name = match[1],
 4410+ filter = Expr.filters[ name ];
 4411+
 4412+ if ( filter ) {
 4413+ return filter( elem, i, match, array );
 4414+
 4415+ } else if ( name === "contains" ) {
 4416+ return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0;
 4417+
 4418+ } else if ( name === "not" ) {
 4419+ var not = match[3];
 4420+
 4421+ for ( var j = 0, l = not.length; j < l; j++ ) {
 4422+ if ( not[j] === elem ) {
 4423+ return false;
 4424+ }
 4425+ }
 4426+
 4427+ return true;
 4428+
 4429+ } else {
 4430+ Sizzle.error( name );
 4431+ }
 4432+ },
 4433+
 4434+ CHILD: function( elem, match ) {
 4435+ var type = match[1],
 4436+ node = elem;
 4437+
 4438+ switch ( type ) {
 4439+ case "only":
 4440+ case "first":
 4441+ while ( (node = node.previousSibling) ) {
 4442+ if ( node.nodeType === 1 ) {
 4443+ return false;
 4444+ }
 4445+ }
 4446+
 4447+ if ( type === "first" ) {
 4448+ return true;
 4449+ }
 4450+
 4451+ node = elem;
 4452+
 4453+ case "last":
 4454+ while ( (node = node.nextSibling) ) {
 4455+ if ( node.nodeType === 1 ) {
 4456+ return false;
 4457+ }
 4458+ }
 4459+
 4460+ return true;
 4461+
 4462+ case "nth":
 4463+ var first = match[2],
 4464+ last = match[3];
 4465+
 4466+ if ( first === 1 && last === 0 ) {
 4467+ return true;
 4468+ }
 4469+
 4470+ var doneName = match[0],
 4471+ parent = elem.parentNode;
 4472+
 4473+ if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
 4474+ var count = 0;
 4475+
 4476+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
 4477+ if ( node.nodeType === 1 ) {
 4478+ node.nodeIndex = ++count;
 4479+ }
 4480+ }
 4481+
 4482+ parent.sizcache = doneName;
 4483+ }
 4484+
 4485+ var diff = elem.nodeIndex - last;
 4486+
 4487+ if ( first === 0 ) {
 4488+ return diff === 0;
 4489+
 4490+ } else {
 4491+ return ( diff % first === 0 && diff / first >= 0 );
 4492+ }
 4493+ }
 4494+ },
 4495+
 4496+ ID: function( elem, match ) {
 4497+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
 4498+ },
 4499+
 4500+ TAG: function( elem, match ) {
 4501+ return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
 4502+ },
 4503+
 4504+ CLASS: function( elem, match ) {
 4505+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
 4506+ .indexOf( match ) > -1;
 4507+ },
 4508+
 4509+ ATTR: function( elem, match ) {
 4510+ var name = match[1],
 4511+ result = Expr.attrHandle[ name ] ?
 4512+ Expr.attrHandle[ name ]( elem ) :
 4513+ elem[ name ] != null ?
 4514+ elem[ name ] :
 4515+ elem.getAttribute( name ),
 4516+ value = result + "",
 4517+ type = match[2],
 4518+ check = match[4];
 4519+
 4520+ return result == null ?
 4521+ type === "!=" :
 4522+ type === "=" ?
 4523+ value === check :
 4524+ type === "*=" ?
 4525+ value.indexOf(check) >= 0 :
 4526+ type === "~=" ?
 4527+ (" " + value + " ").indexOf(check) >= 0 :
 4528+ !check ?
 4529+ value && result !== false :
 4530+ type === "!=" ?
 4531+ value !== check :
 4532+ type === "^=" ?
 4533+ value.indexOf(check) === 0 :
 4534+ type === "$=" ?
 4535+ value.substr(value.length - check.length) === check :
 4536+ type === "|=" ?
 4537+ value === check || value.substr(0, check.length + 1) === check + "-" :
 4538+ false;
 4539+ },
 4540+
 4541+ POS: function( elem, match, i, array ) {
 4542+ var name = match[2],
 4543+ filter = Expr.setFilters[ name ];
 4544+
 4545+ if ( filter ) {
 4546+ return filter( elem, i, match, array );
 4547+ }
 4548+ }
 4549+ }
 4550+};
 4551+
 4552+var origPOS = Expr.match.POS,
 4553+ fescape = function(all, num){
 4554+ return "\\" + (num - 0 + 1);
 4555+ };
 4556+
 4557+for ( var type in Expr.match ) {
 4558+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
 4559+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
 4560+}
 4561+
 4562+var makeArray = function( array, results ) {
 4563+ array = Array.prototype.slice.call( array, 0 );
 4564+
 4565+ if ( results ) {
 4566+ results.push.apply( results, array );
 4567+ return results;
 4568+ }
 4569+
 4570+ return array;
 4571+};
 4572+
 4573+// Perform a simple check to determine if the browser is capable of
 4574+// converting a NodeList to an array using builtin methods.
 4575+// Also verifies that the returned array holds DOM nodes
 4576+// (which is not the case in the Blackberry browser)
 4577+try {
 4578+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
 4579+
 4580+// Provide a fallback method if it does not work
 4581+} catch( e ) {
 4582+ makeArray = function( array, results ) {
 4583+ var i = 0,
 4584+ ret = results || [];
 4585+
 4586+ if ( toString.call(array) === "[object Array]" ) {
 4587+ Array.prototype.push.apply( ret, array );
 4588+
 4589+ } else {
 4590+ if ( typeof array.length === "number" ) {
 4591+ for ( var l = array.length; i < l; i++ ) {
 4592+ ret.push( array[i] );
 4593+ }
 4594+
 4595+ } else {
 4596+ for ( ; array[i]; i++ ) {
 4597+ ret.push( array[i] );
 4598+ }
 4599+ }
 4600+ }
 4601+
 4602+ return ret;
 4603+ };
 4604+}
 4605+
 4606+var sortOrder, siblingCheck;
 4607+
 4608+if ( document.documentElement.compareDocumentPosition ) {
 4609+ sortOrder = function( a, b ) {
 4610+ if ( a === b ) {
 4611+ hasDuplicate = true;
 4612+ return 0;
 4613+ }
 4614+
 4615+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
 4616+ return a.compareDocumentPosition ? -1 : 1;
 4617+ }
 4618+
 4619+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
 4620+ };
 4621+
 4622+} else {
 4623+ sortOrder = function( a, b ) {
 4624+ // The nodes are identical, we can exit early
 4625+ if ( a === b ) {
 4626+ hasDuplicate = true;
 4627+ return 0;
 4628+
 4629+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
 4630+ } else if ( a.sourceIndex && b.sourceIndex ) {
 4631+ return a.sourceIndex - b.sourceIndex;
 4632+ }
 4633+
 4634+ var al, bl,
 4635+ ap = [],
 4636+ bp = [],
 4637+ aup = a.parentNode,
 4638+ bup = b.parentNode,
 4639+ cur = aup;
 4640+
 4641+ // If the nodes are siblings (or identical) we can do a quick check
 4642+ if ( aup === bup ) {
 4643+ return siblingCheck( a, b );
 4644+
 4645+ // If no parents were found then the nodes are disconnected
 4646+ } else if ( !aup ) {
 4647+ return -1;
 4648+
 4649+ } else if ( !bup ) {
 4650+ return 1;
 4651+ }
 4652+
 4653+ // Otherwise they're somewhere else in the tree so we need
 4654+ // to build up a full list of the parentNodes for comparison
 4655+ while ( cur ) {
 4656+ ap.unshift( cur );
 4657+ cur = cur.parentNode;
 4658+ }
 4659+
 4660+ cur = bup;
 4661+
 4662+ while ( cur ) {
 4663+ bp.unshift( cur );
 4664+ cur = cur.parentNode;
 4665+ }
 4666+
 4667+ al = ap.length;
 4668+ bl = bp.length;
 4669+
 4670+ // Start walking down the tree looking for a discrepancy
 4671+ for ( var i = 0; i < al && i < bl; i++ ) {
 4672+ if ( ap[i] !== bp[i] ) {
 4673+ return siblingCheck( ap[i], bp[i] );
 4674+ }
 4675+ }
 4676+
 4677+ // We ended someplace up the tree so do a sibling check
 4678+ return i === al ?
 4679+ siblingCheck( a, bp[i], -1 ) :
 4680+ siblingCheck( ap[i], b, 1 );
 4681+ };
 4682+
 4683+ siblingCheck = function( a, b, ret ) {
 4684+ if ( a === b ) {
 4685+ return ret;
 4686+ }
 4687+
 4688+ var cur = a.nextSibling;
 4689+
 4690+ while ( cur ) {
 4691+ if ( cur === b ) {
 4692+ return -1;
 4693+ }
 4694+
 4695+ cur = cur.nextSibling;
 4696+ }
 4697+
 4698+ return 1;
 4699+ };
 4700+}
 4701+
 4702+// Utility function for retreiving the text value of an array of DOM nodes
 4703+Sizzle.getText = function( elems ) {
 4704+ var ret = "", elem;
 4705+
 4706+ for ( var i = 0; elems[i]; i++ ) {
 4707+ elem = elems[i];
 4708+
 4709+ // Get the text from text nodes and CDATA nodes
 4710+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
 4711+ ret += elem.nodeValue;
 4712+
 4713+ // Traverse everything else, except comment nodes
 4714+ } else if ( elem.nodeType !== 8 ) {
 4715+ ret += Sizzle.getText( elem.childNodes );
 4716+ }
 4717+ }
 4718+
 4719+ return ret;
 4720+};
 4721+
 4722+// Check to see if the browser returns elements by name when
 4723+// querying by getElementById (and provide a workaround)
 4724+(function(){
 4725+ // We're going to inject a fake input element with a specified name
 4726+ var form = document.createElement("div"),
 4727+ id = "script" + (new Date()).getTime(),
 4728+ root = document.documentElement;
 4729+
 4730+ form.innerHTML = "<a name='" + id + "'/>";
 4731+
 4732+ // Inject it into the root element, check its status, and remove it quickly
 4733+ root.insertBefore( form, root.firstChild );
 4734+
 4735+ // The workaround has to do additional checks after a getElementById
 4736+ // Which slows things down for other browsers (hence the branching)
 4737+ if ( document.getElementById( id ) ) {
 4738+ Expr.find.ID = function( match, context, isXML ) {
 4739+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
 4740+ var m = context.getElementById(match[1]);
 4741+
 4742+ return m ?
 4743+ m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
 4744+ [m] :
 4745+ undefined :
 4746+ [];
 4747+ }
 4748+ };
 4749+
 4750+ Expr.filter.ID = function( elem, match ) {
 4751+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
 4752+
 4753+ return elem.nodeType === 1 && node && node.nodeValue === match;
 4754+ };
 4755+ }
 4756+
 4757+ root.removeChild( form );
 4758+
 4759+ // release memory in IE
 4760+ root = form = null;
 4761+})();
 4762+
 4763+(function(){
 4764+ // Check to see if the browser returns only elements
 4765+ // when doing getElementsByTagName("*")
 4766+
 4767+ // Create a fake element
 4768+ var div = document.createElement("div");
 4769+ div.appendChild( document.createComment("") );
 4770+
 4771+ // Make sure no comments are found
 4772+ if ( div.getElementsByTagName("*").length > 0 ) {
 4773+ Expr.find.TAG = function( match, context ) {
 4774+ var results = context.getElementsByTagName( match[1] );
 4775+
 4776+ // Filter out possible comments
 4777+ if ( match[1] === "*" ) {
 4778+ var tmp = [];
 4779+
 4780+ for ( var i = 0; results[i]; i++ ) {
 4781+ if ( results[i].nodeType === 1 ) {
 4782+ tmp.push( results[i] );
 4783+ }
 4784+ }
 4785+
 4786+ results = tmp;
 4787+ }
 4788+
 4789+ return results;
 4790+ };
 4791+ }
 4792+
 4793+ // Check to see if an attribute returns normalized href attributes
 4794+ div.innerHTML = "<a href='#'></a>";
 4795+
 4796+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
 4797+ div.firstChild.getAttribute("href") !== "#" ) {
 4798+
 4799+ Expr.attrHandle.href = function( elem ) {
 4800+ return elem.getAttribute( "href", 2 );
 4801+ };
 4802+ }
 4803+
 4804+ // release memory in IE
 4805+ div = null;
 4806+})();
 4807+
 4808+if ( document.querySelectorAll ) {
 4809+ (function(){
 4810+ var oldSizzle = Sizzle,
 4811+ div = document.createElement("div"),
 4812+ id = "__sizzle__";
 4813+
 4814+ div.innerHTML = "<p class='TEST'></p>";
 4815+
 4816+ // Safari can't handle uppercase or unicode characters when
 4817+ // in quirks mode.
 4818+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
 4819+ return;
 4820+ }
 4821+
 4822+ Sizzle = function( query, context, extra, seed ) {
 4823+ context = context || document;
 4824+
 4825+ // Only use querySelectorAll on non-XML documents
 4826+ // (ID selectors don't work in non-HTML documents)
 4827+ if ( !seed && !Sizzle.isXML(context) ) {
 4828+ // See if we find a selector to speed up
 4829+ var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
 4830+
 4831+ if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
 4832+ // Speed-up: Sizzle("TAG")
 4833+ if ( match[1] ) {
 4834+ return makeArray( context.getElementsByTagName( query ), extra );
 4835+
 4836+ // Speed-up: Sizzle(".CLASS")
 4837+ } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
 4838+ return makeArray( context.getElementsByClassName( match[2] ), extra );
 4839+ }
 4840+ }
 4841+
 4842+ if ( context.nodeType === 9 ) {
 4843+ // Speed-up: Sizzle("body")
 4844+ // The body element only exists once, optimize finding it
 4845+ if ( query === "body" && context.body ) {
 4846+ return makeArray( [ context.body ], extra );
 4847+
 4848+ // Speed-up: Sizzle("#ID")
 4849+ } else if ( match && match[3] ) {
 4850+ var elem = context.getElementById( match[3] );
 4851+
 4852+ // Check parentNode to catch when Blackberry 4.6 returns
 4853+ // nodes that are no longer in the document #6963
 4854+ if ( elem && elem.parentNode ) {
 4855+ // Handle the case where IE and Opera return items
 4856+ // by name instead of ID
 4857+ if ( elem.id === match[3] ) {
 4858+ return makeArray( [ elem ], extra );
 4859+ }
 4860+
 4861+ } else {
 4862+ return makeArray( [], extra );
 4863+ }
 4864+ }
 4865+
 4866+ try {
 4867+ return makeArray( context.querySelectorAll(query), extra );
 4868+ } catch(qsaError) {}
 4869+
 4870+ // qSA works strangely on Element-rooted queries
 4871+ // We can work around this by specifying an extra ID on the root
 4872+ // and working up from there (Thanks to Andrew Dupont for the technique)
 4873+ // IE 8 doesn't work on object elements
 4874+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
 4875+ var oldContext = context,
 4876+ old = context.getAttribute( "id" ),
 4877+ nid = old || id,
 4878+ hasParent = context.parentNode,
 4879+ relativeHierarchySelector = /^\s*[+~]/.test( query );
 4880+
 4881+ if ( !old ) {
 4882+ context.setAttribute( "id", nid );
 4883+ } else {
 4884+ nid = nid.replace( /'/g, "\\$&" );
 4885+ }
 4886+ if ( relativeHierarchySelector && hasParent ) {
 4887+ context = context.parentNode;
 4888+ }
 4889+
 4890+ try {
 4891+ if ( !relativeHierarchySelector || hasParent ) {
 4892+ return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
 4893+ }
 4894+
 4895+ } catch(pseudoError) {
 4896+ } finally {
 4897+ if ( !old ) {
 4898+ oldContext.removeAttribute( "id" );
 4899+ }
 4900+ }
 4901+ }
 4902+ }
 4903+
 4904+ return oldSizzle(query, context, extra, seed);
 4905+ };
 4906+
 4907+ for ( var prop in oldSizzle ) {
 4908+ Sizzle[ prop ] = oldSizzle[ prop ];
 4909+ }
 4910+
 4911+ // release memory in IE
 4912+ div = null;
 4913+ })();
 4914+}
 4915+
 4916+(function(){
 4917+ var html = document.documentElement,
 4918+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
 4919+
 4920+ if ( matches ) {
 4921+ // Check to see if it's possible to do matchesSelector
 4922+ // on a disconnected node (IE 9 fails this)
 4923+ var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
 4924+ pseudoWorks = false;
 4925+
 4926+ try {
 4927+ // This should fail with an exception
 4928+ // Gecko does not error, returns false instead
 4929+ matches.call( document.documentElement, "[test!='']:sizzle" );
 4930+
 4931+ } catch( pseudoError ) {
 4932+ pseudoWorks = true;
 4933+ }
 4934+
 4935+ Sizzle.matchesSelector = function( node, expr ) {
 4936+ // Make sure that attribute selectors are quoted
 4937+ expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
 4938+
 4939+ if ( !Sizzle.isXML( node ) ) {
 4940+ try {
 4941+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
 4942+ var ret = matches.call( node, expr );
 4943+
 4944+ // IE 9's matchesSelector returns false on disconnected nodes
 4945+ if ( ret || !disconnectedMatch ||
 4946+ // As well, disconnected nodes are said to be in a document
 4947+ // fragment in IE 9, so check for that
 4948+ node.document && node.document.nodeType !== 11 ) {
 4949+ return ret;
 4950+ }
 4951+ }
 4952+ } catch(e) {}
 4953+ }
 4954+
 4955+ return Sizzle(expr, null, null, [node]).length > 0;
 4956+ };
 4957+ }
 4958+})();
 4959+
 4960+(function(){
 4961+ var div = document.createElement("div");
 4962+
 4963+ div.innerHTML = "<div class='test e'></div><div class='test'></div>";
 4964+
 4965+ // Opera can't find a second classname (in 9.6)
 4966+ // Also, make sure that getElementsByClassName actually exists
 4967+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
 4968+ return;
 4969+ }
 4970+
 4971+ // Safari caches class attributes, doesn't catch changes (in 3.2)
 4972+ div.lastChild.className = "e";
 4973+
 4974+ if ( div.getElementsByClassName("e").length === 1 ) {
 4975+ return;
 4976+ }
 4977+
 4978+ Expr.order.splice(1, 0, "CLASS");
 4979+ Expr.find.CLASS = function( match, context, isXML ) {
 4980+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
 4981+ return context.getElementsByClassName(match[1]);
 4982+ }
 4983+ };
 4984+
 4985+ // release memory in IE
 4986+ div = null;
 4987+})();
 4988+
 4989+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
 4990+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
 4991+ var elem = checkSet[i];
 4992+
 4993+ if ( elem ) {
 4994+ var match = false;
 4995+
 4996+ elem = elem[dir];
 4997+
 4998+ while ( elem ) {
 4999+ if ( elem.sizcache === doneName ) {
 5000+ match = checkSet[elem.sizset];
 5001+ break;
 5002+ }
 5003+
 5004+ if ( elem.nodeType === 1 && !isXML ){
 5005+ elem.sizcache = doneName;
 5006+ elem.sizset = i;
 5007+ }
 5008+
 5009+ if ( elem.nodeName.toLowerCase() === cur ) {
 5010+ match = elem;
 5011+ break;
 5012+ }
 5013+
 5014+ elem = elem[dir];
 5015+ }
 5016+
 5017+ checkSet[i] = match;
 5018+ }
 5019+ }
 5020+}
 5021+
 5022+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
 5023+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
 5024+ var elem = checkSet[i];
 5025+
 5026+ if ( elem ) {
 5027+ var match = false;
 5028+
 5029+ elem = elem[dir];
 5030+
 5031+ while ( elem ) {
 5032+ if ( elem.sizcache === doneName ) {
 5033+ match = checkSet[elem.sizset];
 5034+ break;
 5035+ }
 5036+
 5037+ if ( elem.nodeType === 1 ) {
 5038+ if ( !isXML ) {
 5039+ elem.sizcache = doneName;
 5040+ elem.sizset = i;
 5041+ }
 5042+
 5043+ if ( typeof cur !== "string" ) {
 5044+ if ( elem === cur ) {
 5045+ match = true;
 5046+ break;
 5047+ }
 5048+
 5049+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
 5050+ match = elem;
 5051+ break;
 5052+ }
 5053+ }
 5054+
 5055+ elem = elem[dir];
 5056+ }
 5057+
 5058+ checkSet[i] = match;
 5059+ }
 5060+ }
 5061+}
 5062+
 5063+if ( document.documentElement.contains ) {
 5064+ Sizzle.contains = function( a, b ) {
 5065+ return a !== b && (a.contains ? a.contains(b) : true);
 5066+ };
 5067+
 5068+} else if ( document.documentElement.compareDocumentPosition ) {
 5069+ Sizzle.contains = function( a, b ) {
 5070+ return !!(a.compareDocumentPosition(b) & 16);
 5071+ };
 5072+
 5073+} else {
 5074+ Sizzle.contains = function() {
 5075+ return false;
 5076+ };
 5077+}
 5078+
 5079+Sizzle.isXML = function( elem ) {
 5080+ // documentElement is verified for cases where it doesn't yet exist
 5081+ // (such as loading iframes in IE - #4833)
 5082+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
 5083+
 5084+ return documentElement ? documentElement.nodeName !== "HTML" : false;
 5085+};
 5086+
 5087+var posProcess = function( selector, context ) {
 5088+ var match,
 5089+ tmpSet = [],
 5090+ later = "",
 5091+ root = context.nodeType ? [context] : context;
 5092+
 5093+ // Position selectors must be done after the filter
 5094+ // And so must :not(positional) so we move all PSEUDOs to the end
 5095+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
 5096+ later += match[0];
 5097+ selector = selector.replace( Expr.match.PSEUDO, "" );
 5098+ }
 5099+
 5100+ selector = Expr.relative[selector] ? selector + "*" : selector;
 5101+
 5102+ for ( var i = 0, l = root.length; i < l; i++ ) {
 5103+ Sizzle( selector, root[i], tmpSet );
 5104+ }
 5105+
 5106+ return Sizzle.filter( later, tmpSet );
 5107+};
 5108+
 5109+// EXPOSE
 5110+jQuery.find = Sizzle;
 5111+jQuery.expr = Sizzle.selectors;
 5112+jQuery.expr[":"] = jQuery.expr.filters;
 5113+jQuery.unique = Sizzle.uniqueSort;
 5114+jQuery.text = Sizzle.getText;
 5115+jQuery.isXMLDoc = Sizzle.isXML;
 5116+jQuery.contains = Sizzle.contains;
 5117+
 5118+
 5119+})();
 5120+
 5121+
 5122+var runtil = /Until$/,
 5123+ rparentsprev = /^(?:parents|prevUntil|prevAll)/,
 5124+ // Note: This RegExp should be improved, or likely pulled from Sizzle
 5125+ rmultiselector = /,/,
 5126+ isSimple = /^.[^:#\[\.,]*$/,
 5127+ slice = Array.prototype.slice,
 5128+ POS = jQuery.expr.match.POS,
 5129+ // methods guaranteed to produce a unique set when starting from a unique set
 5130+ guaranteedUnique = {
 5131+ children: true,
 5132+ contents: true,
 5133+ next: true,
 5134+ prev: true
 5135+ };
 5136+
 5137+jQuery.fn.extend({
 5138+ find: function( selector ) {
 5139+ var self = this,
 5140+ i, l;
 5141+
 5142+ if ( typeof selector !== "string" ) {
 5143+ return jQuery( selector ).filter(function() {
 5144+ for ( i = 0, l = self.length; i < l; i++ ) {
 5145+ if ( jQuery.contains( self[ i ], this ) ) {
 5146+ return true;
 5147+ }
 5148+ }
 5149+ });
 5150+ }
 5151+
 5152+ var ret = this.pushStack( "", "find", selector ),
 5153+ length, n, r;
 5154+
 5155+ for ( i = 0, l = this.length; i < l; i++ ) {
 5156+ length = ret.length;
 5157+ jQuery.find( selector, this[i], ret );
 5158+
 5159+ if ( i > 0 ) {
 5160+ // Make sure that the results are unique
 5161+ for ( n = length; n < ret.length; n++ ) {
 5162+ for ( r = 0; r < length; r++ ) {
 5163+ if ( ret[r] === ret[n] ) {
 5164+ ret.splice(n--, 1);
 5165+ break;
 5166+ }
 5167+ }
 5168+ }
 5169+ }
 5170+ }
 5171+
 5172+ return ret;
 5173+ },
 5174+
 5175+ has: function( target ) {
 5176+ var targets = jQuery( target );
 5177+ return this.filter(function() {
 5178+ for ( var i = 0, l = targets.length; i < l; i++ ) {
 5179+ if ( jQuery.contains( this, targets[i] ) ) {
 5180+ return true;
 5181+ }
 5182+ }
 5183+ });
 5184+ },
 5185+
 5186+ not: function( selector ) {
 5187+ return this.pushStack( winnow(this, selector, false), "not", selector);
 5188+ },
 5189+
 5190+ filter: function( selector ) {
 5191+ return this.pushStack( winnow(this, selector, true), "filter", selector );
 5192+ },
 5193+
 5194+ is: function( selector ) {
 5195+ return !!selector && ( typeof selector === "string" ?
 5196+ jQuery.filter( selector, this ).length > 0 :
 5197+ this.filter( selector ).length > 0 );
 5198+ },
 5199+
 5200+ closest: function( selectors, context ) {
 5201+ var ret = [], i, l, cur = this[0];
 5202+
 5203+ // Array
 5204+ if ( jQuery.isArray( selectors ) ) {
 5205+ var match, selector,
 5206+ matches = {},
 5207+ level = 1;
 5208+
 5209+ if ( cur && selectors.length ) {
 5210+ for ( i = 0, l = selectors.length; i < l; i++ ) {
 5211+ selector = selectors[i];
 5212+
 5213+ if ( !matches[ selector ] ) {
 5214+ matches[ selector ] = POS.test( selector ) ?
 5215+ jQuery( selector, context || this.context ) :
 5216+ selector;
 5217+ }
 5218+ }
 5219+
 5220+ while ( cur && cur.ownerDocument && cur !== context ) {
 5221+ for ( selector in matches ) {
 5222+ match = matches[ selector ];
 5223+
 5224+ if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) {
 5225+ ret.push({ selector: selector, elem: cur, level: level });
 5226+ }
 5227+ }
 5228+
 5229+ cur = cur.parentNode;
 5230+ level++;
 5231+ }
 5232+ }
 5233+
 5234+ return ret;
 5235+ }
 5236+
 5237+ // String
 5238+ var pos = POS.test( selectors ) || typeof selectors !== "string" ?
 5239+ jQuery( selectors, context || this.context ) :
 5240+ 0;
 5241+
 5242+ for ( i = 0, l = this.length; i < l; i++ ) {
 5243+ cur = this[i];
 5244+
 5245+ while ( cur ) {
 5246+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
 5247+ ret.push( cur );
 5248+ break;
 5249+
 5250+ } else {
 5251+ cur = cur.parentNode;
 5252+ if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
 5253+ break;
 5254+ }
 5255+ }
 5256+ }
 5257+ }
 5258+
 5259+ ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
 5260+
 5261+ return this.pushStack( ret, "closest", selectors );
 5262+ },
 5263+
 5264+ // Determine the position of an element within
 5265+ // the matched set of elements
 5266+ index: function( elem ) {
 5267+ if ( !elem || typeof elem === "string" ) {
 5268+ return jQuery.inArray( this[0],
 5269+ // If it receives a string, the selector is used
 5270+ // If it receives nothing, the siblings are used
 5271+ elem ? jQuery( elem ) : this.parent().children() );
 5272+ }
 5273+ // Locate the position of the desired element
 5274+ return jQuery.inArray(
 5275+ // If it receives a jQuery object, the first element is used
 5276+ elem.jquery ? elem[0] : elem, this );
 5277+ },
 5278+
 5279+ add: function( selector, context ) {
 5280+ var set = typeof selector === "string" ?
 5281+ jQuery( selector, context ) :
 5282+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
 5283+ all = jQuery.merge( this.get(), set );
 5284+
 5285+ return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
 5286+ all :
 5287+ jQuery.unique( all ) );
 5288+ },
 5289+
 5290+ andSelf: function() {
 5291+ return this.add( this.prevObject );
 5292+ }
 5293+});
 5294+
 5295+// A painfully simple check to see if an element is disconnected
 5296+// from a document (should be improved, where feasible).
 5297+function isDisconnected( node ) {
 5298+ return !node || !node.parentNode || node.parentNode.nodeType === 11;
 5299+}
 5300+
 5301+jQuery.each({
 5302+ parent: function( elem ) {
 5303+ var parent = elem.parentNode;
 5304+ return parent && parent.nodeType !== 11 ? parent : null;
 5305+ },
 5306+ parents: function( elem ) {
 5307+ return jQuery.dir( elem, "parentNode" );
 5308+ },
 5309+ parentsUntil: function( elem, i, until ) {
 5310+ return jQuery.dir( elem, "parentNode", until );
 5311+ },
 5312+ next: function( elem ) {
 5313+ return jQuery.nth( elem, 2, "nextSibling" );
 5314+ },
 5315+ prev: function( elem ) {
 5316+ return jQuery.nth( elem, 2, "previousSibling" );
 5317+ },
 5318+ nextAll: function( elem ) {
 5319+ return jQuery.dir( elem, "nextSibling" );
 5320+ },
 5321+ prevAll: function( elem ) {
 5322+ return jQuery.dir( elem, "previousSibling" );
 5323+ },
 5324+ nextUntil: function( elem, i, until ) {
 5325+ return jQuery.dir( elem, "nextSibling", until );
 5326+ },
 5327+ prevUntil: function( elem, i, until ) {
 5328+ return jQuery.dir( elem, "previousSibling", until );
 5329+ },
 5330+ siblings: function( elem ) {
 5331+ return jQuery.sibling( elem.parentNode.firstChild, elem );
 5332+ },
 5333+ children: function( elem ) {
 5334+ return jQuery.sibling( elem.firstChild );
 5335+ },
 5336+ contents: function( elem ) {
 5337+ return jQuery.nodeName( elem, "iframe" ) ?
 5338+ elem.contentDocument || elem.contentWindow.document :
 5339+ jQuery.makeArray( elem.childNodes );
 5340+ }
 5341+}, function( name, fn ) {
 5342+ jQuery.fn[ name ] = function( until, selector ) {
 5343+ var ret = jQuery.map( this, fn, until ),
 5344+ // The variable 'args' was introduced in
 5345+ // https://github.com/jquery/jquery/commit/52a0238
 5346+ // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
 5347+ // http://code.google.com/p/v8/issues/detail?id=1050
 5348+ args = slice.call(arguments);
 5349+
 5350+ if ( !runtil.test( name ) ) {
 5351+ selector = until;
 5352+ }
 5353+
 5354+ if ( selector && typeof selector === "string" ) {
 5355+ ret = jQuery.filter( selector, ret );
 5356+ }
 5357+
 5358+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
 5359+
 5360+ if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
 5361+ ret = ret.reverse();
 5362+ }
 5363+
 5364+ return this.pushStack( ret, name, args.join(",") );
 5365+ };
 5366+});
 5367+
 5368+jQuery.extend({
 5369+ filter: function( expr, elems, not ) {
 5370+ if ( not ) {
 5371+ expr = ":not(" + expr + ")";
 5372+ }
 5373+
 5374+ return elems.length === 1 ?
 5375+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
 5376+ jQuery.find.matches(expr, elems);
 5377+ },
 5378+
 5379+ dir: function( elem, dir, until ) {
 5380+ var matched = [],
 5381+ cur = elem[ dir ];
 5382+
 5383+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
 5384+ if ( cur.nodeType === 1 ) {
 5385+ matched.push( cur );
 5386+ }
 5387+ cur = cur[dir];
 5388+ }
 5389+ return matched;
 5390+ },
 5391+
 5392+ nth: function( cur, result, dir, elem ) {
 5393+ result = result || 1;
 5394+ var num = 0;
 5395+
 5396+ for ( ; cur; cur = cur[dir] ) {
 5397+ if ( cur.nodeType === 1 && ++num === result ) {
 5398+ break;
 5399+ }
 5400+ }
 5401+
 5402+ return cur;
 5403+ },
 5404+
 5405+ sibling: function( n, elem ) {
 5406+ var r = [];
 5407+
 5408+ for ( ; n; n = n.nextSibling ) {
 5409+ if ( n.nodeType === 1 && n !== elem ) {
 5410+ r.push( n );
 5411+ }
 5412+ }
 5413+
 5414+ return r;
 5415+ }
 5416+});
 5417+
 5418+// Implement the identical functionality for filter and not
 5419+function winnow( elements, qualifier, keep ) {
 5420+
 5421+ // Can't pass null or undefined to indexOf in Firefox 4
 5422+ // Set to 0 to skip string check
 5423+ qualifier = qualifier || 0;
 5424+
 5425+ if ( jQuery.isFunction( qualifier ) ) {
 5426+ return jQuery.grep(elements, function( elem, i ) {
 5427+ var retVal = !!qualifier.call( elem, i, elem );
 5428+ return retVal === keep;
 5429+ });
 5430+
 5431+ } else if ( qualifier.nodeType ) {
 5432+ return jQuery.grep(elements, function( elem, i ) {
 5433+ return (elem === qualifier) === keep;
 5434+ });
 5435+
 5436+ } else if ( typeof qualifier === "string" ) {
 5437+ var filtered = jQuery.grep(elements, function( elem ) {
 5438+ return elem.nodeType === 1;
 5439+ });
 5440+
 5441+ if ( isSimple.test( qualifier ) ) {
 5442+ return jQuery.filter(qualifier, filtered, !keep);
 5443+ } else {
 5444+ qualifier = jQuery.filter( qualifier, filtered );
 5445+ }
 5446+ }
 5447+
 5448+ return jQuery.grep(elements, function( elem, i ) {
 5449+ return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
 5450+ });
 5451+}
 5452+
 5453+
 5454+
 5455+
 5456+var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
 5457+ rleadingWhitespace = /^\s+/,
 5458+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
 5459+ rtagName = /<([\w:]+)/,
 5460+ rtbody = /<tbody/i,
 5461+ rhtml = /<|&#?\w+;/,
 5462+ rnocache = /<(?:script|object|embed|option|style)/i,
 5463+ // checked="checked" or checked
 5464+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
 5465+ rscriptType = /\/(java|ecma)script/i,
 5466+ rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
 5467+ wrapMap = {
 5468+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
 5469+ legend: [ 1, "<fieldset>", "</fieldset>" ],
 5470+ thead: [ 1, "<table>", "</table>" ],
 5471+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
 5472+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
 5473+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
 5474+ area: [ 1, "<map>", "</map>" ],
 5475+ _default: [ 0, "", "" ]
 5476+ };
 5477+
 5478+wrapMap.optgroup = wrapMap.option;
 5479+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
 5480+wrapMap.th = wrapMap.td;
 5481+
 5482+// IE can't serialize <link> and <script> tags normally
 5483+if ( !jQuery.support.htmlSerialize ) {
 5484+ wrapMap._default = [ 1, "div<div>", "</div>" ];
 5485+}
 5486+
 5487+jQuery.fn.extend({
 5488+ text: function( text ) {
 5489+ if ( jQuery.isFunction(text) ) {
 5490+ return this.each(function(i) {
 5491+ var self = jQuery( this );
 5492+
 5493+ self.text( text.call(this, i, self.text()) );
 5494+ });
 5495+ }
 5496+
 5497+ if ( typeof text !== "object" && text !== undefined ) {
 5498+ return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
 5499+ }
 5500+
 5501+ return jQuery.text( this );
 5502+ },
 5503+
 5504+ wrapAll: function( html ) {
 5505+ if ( jQuery.isFunction( html ) ) {
 5506+ return this.each(function(i) {
 5507+ jQuery(this).wrapAll( html.call(this, i) );
 5508+ });
 5509+ }
 5510+
 5511+ if ( this[0] ) {
 5512+ // The elements to wrap the target around
 5513+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
 5514+
 5515+ if ( this[0].parentNode ) {
 5516+ wrap.insertBefore( this[0] );
 5517+ }
 5518+
 5519+ wrap.map(function() {
 5520+ var elem = this;
 5521+
 5522+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
 5523+ elem = elem.firstChild;
 5524+ }
 5525+
 5526+ return elem;
 5527+ }).append( this );
 5528+ }
 5529+
 5530+ return this;
 5531+ },
 5532+
 5533+ wrapInner: function( html ) {
 5534+ if ( jQuery.isFunction( html ) ) {
 5535+ return this.each(function(i) {
 5536+ jQuery(this).wrapInner( html.call(this, i) );
 5537+ });
 5538+ }
 5539+
 5540+ return this.each(function() {
 5541+ var self = jQuery( this ),
 5542+ contents = self.contents();
 5543+
 5544+ if ( contents.length ) {
 5545+ contents.wrapAll( html );
 5546+
 5547+ } else {
 5548+ self.append( html );
 5549+ }
 5550+ });
 5551+ },
 5552+
 5553+ wrap: function( html ) {
 5554+ return this.each(function() {
 5555+ jQuery( this ).wrapAll( html );
 5556+ });
 5557+ },
 5558+
 5559+ unwrap: function() {
 5560+ return this.parent().each(function() {
 5561+ if ( !jQuery.nodeName( this, "body" ) ) {
 5562+ jQuery( this ).replaceWith( this.childNodes );
 5563+ }
 5564+ }).end();
 5565+ },
 5566+
 5567+ append: function() {
 5568+ return this.domManip(arguments, true, function( elem ) {
 5569+ if ( this.nodeType === 1 ) {
 5570+ this.appendChild( elem );
 5571+ }
 5572+ });
 5573+ },
 5574+
 5575+ prepend: function() {
 5576+ return this.domManip(arguments, true, function( elem ) {
 5577+ if ( this.nodeType === 1 ) {
 5578+ this.insertBefore( elem, this.firstChild );
 5579+ }
 5580+ });
 5581+ },
 5582+
 5583+ before: function() {
 5584+ if ( this[0] && this[0].parentNode ) {
 5585+ return this.domManip(arguments, false, function( elem ) {
 5586+ this.parentNode.insertBefore( elem, this );
 5587+ });
 5588+ } else if ( arguments.length ) {
 5589+ var set = jQuery(arguments[0]);
 5590+ set.push.apply( set, this.toArray() );
 5591+ return this.pushStack( set, "before", arguments );
 5592+ }
 5593+ },
 5594+
 5595+ after: function() {
 5596+ if ( this[0] && this[0].parentNode ) {
 5597+ return this.domManip(arguments, false, function( elem ) {
 5598+ this.parentNode.insertBefore( elem, this.nextSibling );
 5599+ });
 5600+ } else if ( arguments.length ) {
 5601+ var set = this.pushStack( this, "after", arguments );
 5602+ set.push.apply( set, jQuery(arguments[0]).toArray() );
 5603+ return set;
 5604+ }
 5605+ },
 5606+
 5607+ // keepData is for internal use only--do not document
 5608+ remove: function( selector, keepData ) {
 5609+ for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
 5610+ if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
 5611+ if ( !keepData && elem.nodeType === 1 ) {
 5612+ jQuery.cleanData( elem.getElementsByTagName("*") );
 5613+ jQuery.cleanData( [ elem ] );
 5614+ }
 5615+
 5616+ if ( elem.parentNode ) {
 5617+ elem.parentNode.removeChild( elem );
 5618+ }
 5619+ }
 5620+ }
 5621+
 5622+ return this;
 5623+ },
 5624+
 5625+ empty: function() {
 5626+ for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
 5627+ // Remove element nodes and prevent memory leaks
 5628+ if ( elem.nodeType === 1 ) {
 5629+ jQuery.cleanData( elem.getElementsByTagName("*") );
 5630+ }
 5631+
 5632+ // Remove any remaining nodes
 5633+ while ( elem.firstChild ) {
 5634+ elem.removeChild( elem.firstChild );
 5635+ }
 5636+ }
 5637+
 5638+ return this;
 5639+ },
 5640+
 5641+ clone: function( dataAndEvents, deepDataAndEvents ) {
 5642+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
 5643+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
 5644+
 5645+ return this.map( function () {
 5646+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
 5647+ });
 5648+ },
 5649+
 5650+ html: function( value ) {
 5651+ if ( value === undefined ) {
 5652+ return this[0] && this[0].nodeType === 1 ?
 5653+ this[0].innerHTML.replace(rinlinejQuery, "") :
 5654+ null;
 5655+
 5656+ // See if we can take a shortcut and just use innerHTML
 5657+ } else if ( typeof value === "string" && !rnocache.test( value ) &&
 5658+ (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
 5659+ !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
 5660+
 5661+ value = value.replace(rxhtmlTag, "<$1></$2>");
 5662+
 5663+ try {
 5664+ for ( var i = 0, l = this.length; i < l; i++ ) {
 5665+ // Remove element nodes and prevent memory leaks
 5666+ if ( this[i].nodeType === 1 ) {
 5667+ jQuery.cleanData( this[i].getElementsByTagName("*") );
 5668+ this[i].innerHTML = value;
 5669+ }
 5670+ }
 5671+
 5672+ // If using innerHTML throws an exception, use the fallback method
 5673+ } catch(e) {
 5674+ this.empty().append( value );
 5675+ }
 5676+
 5677+ } else if ( jQuery.isFunction( value ) ) {
 5678+ this.each(function(i){
 5679+ var self = jQuery( this );
 5680+
 5681+ self.html( value.call(this, i, self.html()) );
 5682+ });
 5683+
 5684+ } else {
 5685+ this.empty().append( value );
 5686+ }
 5687+
 5688+ return this;
 5689+ },
 5690+
 5691+ replaceWith: function( value ) {
 5692+ if ( this[0] && this[0].parentNode ) {
 5693+ // Make sure that the elements are removed from the DOM before they are inserted
 5694+ // this can help fix replacing a parent with child elements
 5695+ if ( jQuery.isFunction( value ) ) {
 5696+ return this.each(function(i) {
 5697+ var self = jQuery(this), old = self.html();
 5698+ self.replaceWith( value.call( this, i, old ) );
 5699+ });
 5700+ }
 5701+
 5702+ if ( typeof value !== "string" ) {
 5703+ value = jQuery( value ).detach();
 5704+ }
 5705+
 5706+ return this.each(function() {
 5707+ var next = this.nextSibling,
 5708+ parent = this.parentNode;
 5709+
 5710+ jQuery( this ).remove();
 5711+
 5712+ if ( next ) {
 5713+ jQuery(next).before( value );
 5714+ } else {
 5715+ jQuery(parent).append( value );
 5716+ }
 5717+ });
 5718+ } else {
 5719+ return this.length ?
 5720+ this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
 5721+ this;
 5722+ }
 5723+ },
 5724+
 5725+ detach: function( selector ) {
 5726+ return this.remove( selector, true );
 5727+ },
 5728+
 5729+ domManip: function( args, table, callback ) {
 5730+ var results, first, fragment, parent,
 5731+ value = args[0],
 5732+ scripts = [];
 5733+
 5734+ // We can't cloneNode fragments that contain checked, in WebKit
 5735+ if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
 5736+ return this.each(function() {
 5737+ jQuery(this).domManip( args, table, callback, true );
 5738+ });
 5739+ }
 5740+
 5741+ if ( jQuery.isFunction(value) ) {
 5742+ return this.each(function(i) {
 5743+ var self = jQuery(this);
 5744+ args[0] = value.call(this, i, table ? self.html() : undefined);
 5745+ self.domManip( args, table, callback );
 5746+ });
 5747+ }
 5748+
 5749+ if ( this[0] ) {
 5750+ parent = value && value.parentNode;
 5751+
 5752+ // If we're in a fragment, just use that instead of building a new one
 5753+ if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
 5754+ results = { fragment: parent };
 5755+
 5756+ } else {
 5757+ results = jQuery.buildFragment( args, this, scripts );
 5758+ }
 5759+
 5760+ fragment = results.fragment;
 5761+
 5762+ if ( fragment.childNodes.length === 1 ) {
 5763+ first = fragment = fragment.firstChild;
 5764+ } else {
 5765+ first = fragment.firstChild;
 5766+ }
 5767+
 5768+ if ( first ) {
 5769+ table = table && jQuery.nodeName( first, "tr" );
 5770+
 5771+ for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
 5772+ callback.call(
 5773+ table ?
 5774+ root(this[i], first) :
 5775+ this[i],
 5776+ // Make sure that we do not leak memory by inadvertently discarding
 5777+ // the original fragment (which might have attached data) instead of
 5778+ // using it; in addition, use the original fragment object for the last
 5779+ // item instead of first because it can end up being emptied incorrectly
 5780+ // in certain situations (Bug #8070).
 5781+ // Fragments from the fragment cache must always be cloned and never used
 5782+ // in place.
 5783+ results.cacheable || (l > 1 && i < lastIndex) ?
 5784+ jQuery.clone( fragment, true, true ) :
 5785+ fragment
 5786+ );
 5787+ }
 5788+ }
 5789+
 5790+ if ( scripts.length ) {
 5791+ jQuery.each( scripts, evalScript );
 5792+ }
 5793+ }
 5794+
 5795+ return this;
 5796+ }
 5797+});
 5798+
 5799+function root( elem, cur ) {
 5800+ return jQuery.nodeName(elem, "table") ?
 5801+ (elem.getElementsByTagName("tbody")[0] ||
 5802+ elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
 5803+ elem;
 5804+}
 5805+
 5806+function cloneCopyEvent( src, dest ) {
 5807+
 5808+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
 5809+ return;
 5810+ }
 5811+
 5812+ var internalKey = jQuery.expando,
 5813+ oldData = jQuery.data( src ),
 5814+ curData = jQuery.data( dest, oldData );
 5815+
 5816+ // Switch to use the internal data object, if it exists, for the next
 5817+ // stage of data copying
 5818+ if ( (oldData = oldData[ internalKey ]) ) {
 5819+ var events = oldData.events;
 5820+ curData = curData[ internalKey ] = jQuery.extend({}, oldData);
 5821+
 5822+ if ( events ) {
 5823+ delete curData.handle;
 5824+ curData.events = {};
 5825+
 5826+ for ( var type in events ) {
 5827+ for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
 5828+ jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
 5829+ }
 5830+ }
 5831+ }
 5832+ }
 5833+}
 5834+
 5835+function cloneFixAttributes( src, dest ) {
 5836+ var nodeName;
 5837+
 5838+ // We do not need to do anything for non-Elements
 5839+ if ( dest.nodeType !== 1 ) {
 5840+ return;
 5841+ }
 5842+
 5843+ // clearAttributes removes the attributes, which we don't want,
 5844+ // but also removes the attachEvent events, which we *do* want
 5845+ if ( dest.clearAttributes ) {
 5846+ dest.clearAttributes();
 5847+ }
 5848+
 5849+ // mergeAttributes, in contrast, only merges back on the
 5850+ // original attributes, not the events
 5851+ if ( dest.mergeAttributes ) {
 5852+ dest.mergeAttributes( src );
 5853+ }
 5854+
 5855+ nodeName = dest.nodeName.toLowerCase();
 5856+
 5857+ // IE6-8 fail to clone children inside object elements that use
 5858+ // the proprietary classid attribute value (rather than the type
 5859+ // attribute) to identify the type of content to display
 5860+ if ( nodeName === "object" ) {
 5861+ dest.outerHTML = src.outerHTML;
 5862+
 5863+ } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
 5864+ // IE6-8 fails to persist the checked state of a cloned checkbox
 5865+ // or radio button. Worse, IE6-7 fail to give the cloned element
 5866+ // a checked appearance if the defaultChecked value isn't also set
 5867+ if ( src.checked ) {
 5868+ dest.defaultChecked = dest.checked = src.checked;
 5869+ }
 5870+
 5871+ // IE6-7 get confused and end up setting the value of a cloned
 5872+ // checkbox/radio button to an empty string instead of "on"
 5873+ if ( dest.value !== src.value ) {
 5874+ dest.value = src.value;
 5875+ }
 5876+
 5877+ // IE6-8 fails to return the selected option to the default selected
 5878+ // state when cloning options
 5879+ } else if ( nodeName === "option" ) {
 5880+ dest.selected = src.defaultSelected;
 5881+
 5882+ // IE6-8 fails to set the defaultValue to the correct value when
 5883+ // cloning other types of input fields
 5884+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
 5885+ dest.defaultValue = src.defaultValue;
 5886+ }
 5887+
 5888+ // Event data gets referenced instead of copied if the expando
 5889+ // gets copied too
 5890+ dest.removeAttribute( jQuery.expando );
 5891+}
 5892+
 5893+jQuery.buildFragment = function( args, nodes, scripts ) {
 5894+ var fragment, cacheable, cacheresults,
 5895+ doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
 5896+
 5897+ // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
 5898+ // Cloning options loses the selected state, so don't cache them
 5899+ // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
 5900+ // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
 5901+ if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document &&
 5902+ args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) {
 5903+
 5904+ cacheable = true;
 5905+
 5906+ cacheresults = jQuery.fragments[ args[0] ];
 5907+ if ( cacheresults && cacheresults !== 1 ) {
 5908+ fragment = cacheresults;
 5909+ }
 5910+ }
 5911+
 5912+ if ( !fragment ) {
 5913+ fragment = doc.createDocumentFragment();
 5914+ jQuery.clean( args, doc, fragment, scripts );
 5915+ }
 5916+
 5917+ if ( cacheable ) {
 5918+ jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
 5919+ }
 5920+
 5921+ return { fragment: fragment, cacheable: cacheable };
 5922+};
 5923+
 5924+jQuery.fragments = {};
 5925+
 5926+jQuery.each({
 5927+ appendTo: "append",
 5928+ prependTo: "prepend",
 5929+ insertBefore: "before",
 5930+ insertAfter: "after",
 5931+ replaceAll: "replaceWith"
 5932+}, function( name, original ) {
 5933+ jQuery.fn[ name ] = function( selector ) {
 5934+ var ret = [],
 5935+ insert = jQuery( selector ),
 5936+ parent = this.length === 1 && this[0].parentNode;
 5937+
 5938+ if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
 5939+ insert[ original ]( this[0] );
 5940+ return this;
 5941+
 5942+ } else {
 5943+ for ( var i = 0, l = insert.length; i < l; i++ ) {
 5944+ var elems = (i > 0 ? this.clone(true) : this).get();
 5945+ jQuery( insert[i] )[ original ]( elems );
 5946+ ret = ret.concat( elems );
 5947+ }
 5948+
 5949+ return this.pushStack( ret, name, insert.selector );
 5950+ }
 5951+ };
 5952+});
 5953+
 5954+function getAll( elem ) {
 5955+ if ( "getElementsByTagName" in elem ) {
 5956+ return elem.getElementsByTagName( "*" );
 5957+
 5958+ } else if ( "querySelectorAll" in elem ) {
 5959+ return elem.querySelectorAll( "*" );
 5960+
 5961+ } else {
 5962+ return [];
 5963+ }
 5964+}
 5965+
 5966+// Used in clean, fixes the defaultChecked property
 5967+function fixDefaultChecked( elem ) {
 5968+ if ( elem.type === "checkbox" || elem.type === "radio" ) {
 5969+ elem.defaultChecked = elem.checked;
 5970+ }
 5971+}
 5972+// Finds all inputs and passes them to fixDefaultChecked
 5973+function findInputs( elem ) {
 5974+ if ( jQuery.nodeName( elem, "input" ) ) {
 5975+ fixDefaultChecked( elem );
 5976+ } else if ( elem.getElementsByTagName ) {
 5977+ jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
 5978+ }
 5979+}
 5980+
 5981+jQuery.extend({
 5982+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
 5983+ var clone = elem.cloneNode(true),
 5984+ srcElements,
 5985+ destElements,
 5986+ i;
 5987+
 5988+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
 5989+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
 5990+ // IE copies events bound via attachEvent when using cloneNode.
 5991+ // Calling detachEvent on the clone will also remove the events
 5992+ // from the original. In order to get around this, we use some
 5993+ // proprietary methods to clear the events. Thanks to MooTools
 5994+ // guys for this hotness.
 5995+
 5996+ cloneFixAttributes( elem, clone );
 5997+
 5998+ // Using Sizzle here is crazy slow, so we use getElementsByTagName
 5999+ // instead
 6000+ srcElements = getAll( elem );
 6001+ destElements = getAll( clone );
 6002+
 6003+ // Weird iteration because IE will replace the length property
 6004+ // with an element if you are cloning the body and one of the
 6005+ // elements on the page has a name or id of "length"
 6006+ for ( i = 0; srcElements[i]; ++i ) {
 6007+ cloneFixAttributes( srcElements[i], destElements[i] );
 6008+ }
 6009+ }
 6010+
 6011+ // Copy the events from the original to the clone
 6012+ if ( dataAndEvents ) {
 6013+ cloneCopyEvent( elem, clone );
 6014+
 6015+ if ( deepDataAndEvents ) {
 6016+ srcElements = getAll( elem );
 6017+ destElements = getAll( clone );
 6018+
 6019+ for ( i = 0; srcElements[i]; ++i ) {
 6020+ cloneCopyEvent( srcElements[i], destElements[i] );
 6021+ }
 6022+ }
 6023+ }
 6024+
 6025+ // Return the cloned set
 6026+ return clone;
 6027+ },
 6028+
 6029+ clean: function( elems, context, fragment, scripts ) {
 6030+ var checkScriptType;
 6031+
 6032+ context = context || document;
 6033+
 6034+ // !context.createElement fails in IE with an error but returns typeof 'object'
 6035+ if ( typeof context.createElement === "undefined" ) {
 6036+ context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
 6037+ }
 6038+
 6039+ var ret = [], j;
 6040+
 6041+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
 6042+ if ( typeof elem === "number" ) {
 6043+ elem += "";
 6044+ }
 6045+
 6046+ if ( !elem ) {
 6047+ continue;
 6048+ }
 6049+
 6050+ // Convert html string into DOM nodes
 6051+ if ( typeof elem === "string" ) {
 6052+ if ( !rhtml.test( elem ) ) {
 6053+ elem = context.createTextNode( elem );
 6054+ } else {
 6055+ // Fix "XHTML"-style tags in all browsers
 6056+ elem = elem.replace(rxhtmlTag, "<$1></$2>");
 6057+
 6058+ // Trim whitespace, otherwise indexOf won't work as expected
 6059+ var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
 6060+ wrap = wrapMap[ tag ] || wrapMap._default,
 6061+ depth = wrap[0],
 6062+ div = context.createElement("div");
 6063+
 6064+ // Go to html and back, then peel off extra wrappers
 6065+ div.innerHTML = wrap[1] + elem + wrap[2];
 6066+
 6067+ // Move to the right depth
 6068+ while ( depth-- ) {
 6069+ div = div.lastChild;
 6070+ }
 6071+
 6072+ // Remove IE's autoinserted <tbody> from table fragments
 6073+ if ( !jQuery.support.tbody ) {
 6074+
 6075+ // String was a <table>, *may* have spurious <tbody>
 6076+ var hasBody = rtbody.test(elem),
 6077+ tbody = tag === "table" && !hasBody ?
 6078+ div.firstChild && div.firstChild.childNodes :
 6079+
 6080+ // String was a bare <thead> or <tfoot>
 6081+ wrap[1] === "<table>" && !hasBody ?
 6082+ div.childNodes :
 6083+ [];
 6084+
 6085+ for ( j = tbody.length - 1; j >= 0 ; --j ) {
 6086+ if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
 6087+ tbody[ j ].parentNode.removeChild( tbody[ j ] );
 6088+ }
 6089+ }
 6090+ }
 6091+
 6092+ // IE completely kills leading whitespace when innerHTML is used
 6093+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
 6094+ div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
 6095+ }
 6096+
 6097+ elem = div.childNodes;
 6098+ }
 6099+ }
 6100+
 6101+ // Resets defaultChecked for any radios and checkboxes
 6102+ // about to be appended to the DOM in IE 6/7 (#8060)
 6103+ var len;
 6104+ if ( !jQuery.support.appendChecked ) {
 6105+ if ( elem[0] && typeof (len = elem.length) === "number" ) {
 6106+ for ( j = 0; j < len; j++ ) {
 6107+ findInputs( elem[j] );
 6108+ }
 6109+ } else {
 6110+ findInputs( elem );
 6111+ }
 6112+ }
 6113+
 6114+ if ( elem.nodeType ) {
 6115+ ret.push( elem );
 6116+ } else {
 6117+ ret = jQuery.merge( ret, elem );
 6118+ }
 6119+ }
 6120+
 6121+ if ( fragment ) {
 6122+ checkScriptType = function( elem ) {
 6123+ return !elem.type || rscriptType.test( elem.type );
 6124+ };
 6125+ for ( i = 0; ret[i]; i++ ) {
 6126+ if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
 6127+ scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
 6128+
 6129+ } else {
 6130+ if ( ret[i].nodeType === 1 ) {
 6131+ var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
 6132+
 6133+ ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
 6134+ }
 6135+ fragment.appendChild( ret[i] );
 6136+ }
 6137+ }
 6138+ }
 6139+
 6140+ return ret;
 6141+ },
 6142+
 6143+ cleanData: function( elems ) {
 6144+ var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
 6145+ deleteExpando = jQuery.support.deleteExpando;
 6146+
 6147+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
 6148+ if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
 6149+ continue;
 6150+ }
 6151+
 6152+ id = elem[ jQuery.expando ];
 6153+
 6154+ if ( id ) {
 6155+ data = cache[ id ] && cache[ id ][ internalKey ];
 6156+
 6157+ if ( data && data.events ) {
 6158+ for ( var type in data.events ) {
 6159+ if ( special[ type ] ) {
 6160+ jQuery.event.remove( elem, type );
 6161+
 6162+ // This is a shortcut to avoid jQuery.event.remove's overhead
 6163+ } else {
 6164+ jQuery.removeEvent( elem, type, data.handle );
 6165+ }
 6166+ }
 6167+
 6168+ // Null the DOM reference to avoid IE6/7/8 leak (#7054)
 6169+ if ( data.handle ) {
 6170+ data.handle.elem = null;
 6171+ }
 6172+ }
 6173+
 6174+ if ( deleteExpando ) {
 6175+ delete elem[ jQuery.expando ];
 6176+
 6177+ } else if ( elem.removeAttribute ) {
 6178+ elem.removeAttribute( jQuery.expando );
 6179+ }
 6180+
 6181+ delete cache[ id ];
 6182+ }
 6183+ }
 6184+ }
 6185+});
 6186+
 6187+function evalScript( i, elem ) {
 6188+ if ( elem.src ) {
 6189+ jQuery.ajax({
 6190+ url: elem.src,
 6191+ async: false,
 6192+ dataType: "script"
 6193+ });
 6194+ } else {
 6195+ jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
 6196+ }
 6197+
 6198+ if ( elem.parentNode ) {
 6199+ elem.parentNode.removeChild( elem );
 6200+ }
 6201+}
 6202+
 6203+
 6204+
 6205+
 6206+var ralpha = /alpha\([^)]*\)/i,
 6207+ ropacity = /opacity=([^)]*)/,
 6208+ rdashAlpha = /-([a-z])/ig,
 6209+ // fixed for IE9, see #8346
 6210+ rupper = /([A-Z]|^ms)/g,
 6211+ rnumpx = /^-?\d+(?:px)?$/i,
 6212+ rnum = /^-?\d/,
 6213+ rrelNum = /^[+\-]=/,
 6214+ rrelNumFilter = /[^+\-\.\de]+/g,
 6215+
 6216+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
 6217+ cssWidth = [ "Left", "Right" ],
 6218+ cssHeight = [ "Top", "Bottom" ],
 6219+ curCSS,
 6220+
 6221+ getComputedStyle,
 6222+ currentStyle,
 6223+
 6224+ fcamelCase = function( all, letter ) {
 6225+ return letter.toUpperCase();
 6226+ };
 6227+
 6228+jQuery.fn.css = function( name, value ) {
 6229+ // Setting 'undefined' is a no-op
 6230+ if ( arguments.length === 2 && value === undefined ) {
 6231+ return this;
 6232+ }
 6233+
 6234+ return jQuery.access( this, name, value, true, function( elem, name, value ) {
 6235+ return value !== undefined ?
 6236+ jQuery.style( elem, name, value ) :
 6237+ jQuery.css( elem, name );
 6238+ });
 6239+};
 6240+
 6241+jQuery.extend({
 6242+ // Add in style property hooks for overriding the default
 6243+ // behavior of getting and setting a style property
 6244+ cssHooks: {
 6245+ opacity: {
 6246+ get: function( elem, computed ) {
 6247+ if ( computed ) {
 6248+ // We should always get a number back from opacity
 6249+ var ret = curCSS( elem, "opacity", "opacity" );
 6250+ return ret === "" ? "1" : ret;
 6251+
 6252+ } else {
 6253+ return elem.style.opacity;
 6254+ }
 6255+ }
 6256+ }
 6257+ },
 6258+
 6259+ // Exclude the following css properties to add px
 6260+ cssNumber: {
 6261+ "zIndex": true,
 6262+ "fontWeight": true,
 6263+ "opacity": true,
 6264+ "zoom": true,
 6265+ "lineHeight": true,
 6266+ "widows": true,
 6267+ "orphans": true
 6268+ },
 6269+
 6270+ // Add in properties whose names you wish to fix before
 6271+ // setting or getting the value
 6272+ cssProps: {
 6273+ // normalize float css property
 6274+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
 6275+ },
 6276+
 6277+ // Get and set the style property on a DOM Node
 6278+ style: function( elem, name, value, extra ) {
 6279+ // Don't set styles on text and comment nodes
 6280+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
 6281+ return;
 6282+ }
 6283+
 6284+ // Make sure that we're working with the right name
 6285+ var ret, type, origName = jQuery.camelCase( name ),
 6286+ style = elem.style, hooks = jQuery.cssHooks[ origName ];
 6287+
 6288+ name = jQuery.cssProps[ origName ] || origName;
 6289+
 6290+ // Check if we're setting a value
 6291+ if ( value !== undefined ) {
 6292+ type = typeof value;
 6293+
 6294+ // Make sure that NaN and null values aren't set. See: #7116
 6295+ if ( type === "number" && isNaN( value ) || value == null ) {
 6296+ return;
 6297+ }
 6298+
 6299+ // convert relative number strings (+= or -=) to relative numbers. #7345
 6300+ if ( type === "string" && rrelNum.test( value ) ) {
 6301+ value = +value.replace( rrelNumFilter, "" ) + parseFloat( jQuery.css( elem, name ) );
 6302+ }
 6303+
 6304+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
 6305+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
 6306+ value += "px";
 6307+ }
 6308+
 6309+ // If a hook was provided, use that value, otherwise just set the specified value
 6310+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
 6311+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
 6312+ // Fixes bug #5509
 6313+ try {
 6314+ style[ name ] = value;
 6315+ } catch(e) {}
 6316+ }
 6317+
 6318+ } else {
 6319+ // If a hook was provided get the non-computed value from there
 6320+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
 6321+ return ret;
 6322+ }
 6323+
 6324+ // Otherwise just get the value from the style object
 6325+ return style[ name ];
 6326+ }
 6327+ },
 6328+
 6329+ css: function( elem, name, extra ) {
 6330+ var ret, hooks;
 6331+
 6332+ // Make sure that we're working with the right name
 6333+ name = jQuery.camelCase( name );
 6334+ hooks = jQuery.cssHooks[ name ];
 6335+ name = jQuery.cssProps[ name ] || name;
 6336+
 6337+ // cssFloat needs a special treatment
 6338+ if ( name === "cssFloat" ) {
 6339+ name = "float";
 6340+ }
 6341+
 6342+ // If a hook was provided get the computed value from there
 6343+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
 6344+ return ret;
 6345+
 6346+ // Otherwise, if a way to get the computed value exists, use that
 6347+ } else if ( curCSS ) {
 6348+ return curCSS( elem, name );
 6349+ }
 6350+ },
 6351+
 6352+ // A method for quickly swapping in/out CSS properties to get correct calculations
 6353+ swap: function( elem, options, callback ) {
 6354+ var old = {};
 6355+
 6356+ // Remember the old values, and insert the new ones
 6357+ for ( var name in options ) {
 6358+ old[ name ] = elem.style[ name ];
 6359+ elem.style[ name ] = options[ name ];
 6360+ }
 6361+
 6362+ callback.call( elem );
 6363+
 6364+ // Revert the old values
 6365+ for ( name in options ) {
 6366+ elem.style[ name ] = old[ name ];
 6367+ }
 6368+ },
 6369+
 6370+ camelCase: function( string ) {
 6371+ return string.replace( rdashAlpha, fcamelCase );
 6372+ }
 6373+});
 6374+
 6375+// DEPRECATED, Use jQuery.css() instead
 6376+jQuery.curCSS = jQuery.css;
 6377+
 6378+jQuery.each(["height", "width"], function( i, name ) {
 6379+ jQuery.cssHooks[ name ] = {
 6380+ get: function( elem, computed, extra ) {
 6381+ var val;
 6382+
 6383+ if ( computed ) {
 6384+ if ( elem.offsetWidth !== 0 ) {
 6385+ val = getWH( elem, name, extra );
 6386+
 6387+ } else {
 6388+ jQuery.swap( elem, cssShow, function() {
 6389+ val = getWH( elem, name, extra );
 6390+ });
 6391+ }
 6392+
 6393+ if ( val <= 0 ) {
 6394+ val = curCSS( elem, name, name );
 6395+
 6396+ if ( val === "0px" && currentStyle ) {
 6397+ val = currentStyle( elem, name, name );
 6398+ }
 6399+
 6400+ if ( val != null ) {
 6401+ // Should return "auto" instead of 0, use 0 for
 6402+ // temporary backwards-compat
 6403+ return val === "" || val === "auto" ? "0px" : val;
 6404+ }
 6405+ }
 6406+
 6407+ if ( val < 0 || val == null ) {
 6408+ val = elem.style[ name ];
 6409+
 6410+ // Should return "auto" instead of 0, use 0 for
 6411+ // temporary backwards-compat
 6412+ return val === "" || val === "auto" ? "0px" : val;
 6413+ }
 6414+
 6415+ return typeof val === "string" ? val : val + "px";
 6416+ }
 6417+ },
 6418+
 6419+ set: function( elem, value ) {
 6420+ if ( rnumpx.test( value ) ) {
 6421+ // ignore negative width and height values #1599
 6422+ value = parseFloat(value);
 6423+
 6424+ if ( value >= 0 ) {
 6425+ return value + "px";
 6426+ }
 6427+
 6428+ } else {
 6429+ return value;
 6430+ }
 6431+ }
 6432+ };
 6433+});
 6434+
 6435+if ( !jQuery.support.opacity ) {
 6436+ jQuery.cssHooks.opacity = {
 6437+ get: function( elem, computed ) {
 6438+ // IE uses filters for opacity
 6439+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
 6440+ ( parseFloat( RegExp.$1 ) / 100 ) + "" :
 6441+ computed ? "1" : "";
 6442+ },
 6443+
 6444+ set: function( elem, value ) {
 6445+ var style = elem.style,
 6446+ currentStyle = elem.currentStyle;
 6447+
 6448+ // IE has trouble with opacity if it does not have layout
 6449+ // Force it by setting the zoom level
 6450+ style.zoom = 1;
 6451+
 6452+ // Set the alpha filter to set the opacity
 6453+ var opacity = jQuery.isNaN( value ) ?
 6454+ "" :
 6455+ "alpha(opacity=" + value * 100 + ")",
 6456+ filter = currentStyle && currentStyle.filter || style.filter || "";
 6457+
 6458+ style.filter = ralpha.test( filter ) ?
 6459+ filter.replace( ralpha, opacity ) :
 6460+ filter + " " + opacity;
 6461+ }
 6462+ };
 6463+}
 6464+
 6465+jQuery(function() {
 6466+ // This hook cannot be added until DOM ready because the support test
 6467+ // for it is not run until after DOM ready
 6468+ if ( !jQuery.support.reliableMarginRight ) {
 6469+ jQuery.cssHooks.marginRight = {
 6470+ get: function( elem, computed ) {
 6471+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
 6472+ // Work around by temporarily setting element display to inline-block
 6473+ var ret;
 6474+ jQuery.swap( elem, { "display": "inline-block" }, function() {
 6475+ if ( computed ) {
 6476+ ret = curCSS( elem, "margin-right", "marginRight" );
 6477+ } else {
 6478+ ret = elem.style.marginRight;
 6479+ }
 6480+ });
 6481+ return ret;
 6482+ }
 6483+ };
 6484+ }
 6485+});
 6486+
 6487+if ( document.defaultView && document.defaultView.getComputedStyle ) {
 6488+ getComputedStyle = function( elem, name ) {
 6489+ var ret, defaultView, computedStyle;
 6490+
 6491+ name = name.replace( rupper, "-$1" ).toLowerCase();
 6492+
 6493+ if ( !(defaultView = elem.ownerDocument.defaultView) ) {
 6494+ return undefined;
 6495+ }
 6496+
 6497+ if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
 6498+ ret = computedStyle.getPropertyValue( name );
 6499+ if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
 6500+ ret = jQuery.style( elem, name );
 6501+ }
 6502+ }
 6503+
 6504+ return ret;
 6505+ };
 6506+}
 6507+
 6508+if ( document.documentElement.currentStyle ) {
 6509+ currentStyle = function( elem, name ) {
 6510+ var left,
 6511+ ret = elem.currentStyle && elem.currentStyle[ name ],
 6512+ rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ],
 6513+ style = elem.style;
 6514+
 6515+ // From the awesome hack by Dean Edwards
 6516+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
 6517+
 6518+ // If we're not dealing with a regular pixel number
 6519+ // but a number that has a weird ending, we need to convert it to pixels
 6520+ if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
 6521+ // Remember the original values
 6522+ left = style.left;
 6523+
 6524+ // Put in the new values to get a computed value out
 6525+ if ( rsLeft ) {
 6526+ elem.runtimeStyle.left = elem.currentStyle.left;
 6527+ }
 6528+ style.left = name === "fontSize" ? "1em" : (ret || 0);
 6529+ ret = style.pixelLeft + "px";
 6530+
 6531+ // Revert the changed values
 6532+ style.left = left;
 6533+ if ( rsLeft ) {
 6534+ elem.runtimeStyle.left = rsLeft;
 6535+ }
 6536+ }
 6537+
 6538+ return ret === "" ? "auto" : ret;
 6539+ };
 6540+}
 6541+
 6542+curCSS = getComputedStyle || currentStyle;
 6543+
 6544+function getWH( elem, name, extra ) {
 6545+ var which = name === "width" ? cssWidth : cssHeight,
 6546+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
 6547+
 6548+ if ( extra === "border" ) {
 6549+ return val;
 6550+ }
 6551+
 6552+ jQuery.each( which, function() {
 6553+ if ( !extra ) {
 6554+ val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
 6555+ }
 6556+
 6557+ if ( extra === "margin" ) {
 6558+ val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
 6559+
 6560+ } else {
 6561+ val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0;
 6562+ }
 6563+ });
 6564+
 6565+ return val;
 6566+}
 6567+
 6568+if ( jQuery.expr && jQuery.expr.filters ) {
 6569+ jQuery.expr.filters.hidden = function( elem ) {
 6570+ var width = elem.offsetWidth,
 6571+ height = elem.offsetHeight;
 6572+
 6573+ return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none");
 6574+ };
 6575+
 6576+ jQuery.expr.filters.visible = function( elem ) {
 6577+ return !jQuery.expr.filters.hidden( elem );
 6578+ };
 6579+}
 6580+
 6581+
 6582+
 6583+
 6584+var r20 = /%20/g,
 6585+ rbracket = /\[\]$/,
 6586+ rCRLF = /\r?\n/g,
 6587+ rhash = /#.*$/,
 6588+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
 6589+ rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
 6590+ // #7653, #8125, #8152: local protocol detection
 6591+ rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/,
 6592+ rnoContent = /^(?:GET|HEAD)$/,
 6593+ rprotocol = /^\/\//,
 6594+ rquery = /\?/,
 6595+ rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
 6596+ rselectTextarea = /^(?:select|textarea)/i,
 6597+ rspacesAjax = /\s+/,
 6598+ rts = /([?&])_=[^&]*/,
 6599+ rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
 6600+
 6601+ // Keep a copy of the old load method
 6602+ _load = jQuery.fn.load,
 6603+
 6604+ /* Prefilters
 6605+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
 6606+ * 2) These are called:
 6607+ * - BEFORE asking for a transport
 6608+ * - AFTER param serialization (s.data is a string if s.processData is true)
 6609+ * 3) key is the dataType
 6610+ * 4) the catchall symbol "*" can be used
 6611+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
 6612+ */
 6613+ prefilters = {},
 6614+
 6615+ /* Transports bindings
 6616+ * 1) key is the dataType
 6617+ * 2) the catchall symbol "*" can be used
 6618+ * 3) selection will start with transport dataType and THEN go to "*" if needed
 6619+ */
 6620+ transports = {},
 6621+
 6622+ // Document location
 6623+ ajaxLocation,
 6624+
 6625+ // Document location segments
 6626+ ajaxLocParts;
 6627+
 6628+// #8138, IE may throw an exception when accessing
 6629+// a field from window.location if document.domain has been set
 6630+try {
 6631+ ajaxLocation = location.href;
 6632+} catch( e ) {
 6633+ // Use the href attribute of an A element
 6634+ // since IE will modify it given document.location
 6635+ ajaxLocation = document.createElement( "a" );
 6636+ ajaxLocation.href = "";
 6637+ ajaxLocation = ajaxLocation.href;
 6638+}
 6639+
 6640+// Segment location into parts
 6641+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
 6642+
 6643+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
 6644+function addToPrefiltersOrTransports( structure ) {
 6645+
 6646+ // dataTypeExpression is optional and defaults to "*"
 6647+ return function( dataTypeExpression, func ) {
 6648+
 6649+ if ( typeof dataTypeExpression !== "string" ) {
 6650+ func = dataTypeExpression;
 6651+ dataTypeExpression = "*";
 6652+ }
 6653+
 6654+ if ( jQuery.isFunction( func ) ) {
 6655+ var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
 6656+ i = 0,
 6657+ length = dataTypes.length,
 6658+ dataType,
 6659+ list,
 6660+ placeBefore;
 6661+
 6662+ // For each dataType in the dataTypeExpression
 6663+ for(; i < length; i++ ) {
 6664+ dataType = dataTypes[ i ];
 6665+ // We control if we're asked to add before
 6666+ // any existing element
 6667+ placeBefore = /^\+/.test( dataType );
 6668+ if ( placeBefore ) {
 6669+ dataType = dataType.substr( 1 ) || "*";
 6670+ }
 6671+ list = structure[ dataType ] = structure[ dataType ] || [];
 6672+ // then we add to the structure accordingly
 6673+ list[ placeBefore ? "unshift" : "push" ]( func );
 6674+ }
 6675+ }
 6676+ };
 6677+}
 6678+
 6679+// Base inspection function for prefilters and transports
 6680+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
 6681+ dataType /* internal */, inspected /* internal */ ) {
 6682+
 6683+ dataType = dataType || options.dataTypes[ 0 ];
 6684+ inspected = inspected || {};
 6685+
 6686+ inspected[ dataType ] = true;
 6687+
 6688+ var list = structure[ dataType ],
 6689+ i = 0,
 6690+ length = list ? list.length : 0,
 6691+ executeOnly = ( structure === prefilters ),
 6692+ selection;
 6693+
 6694+ for(; i < length && ( executeOnly || !selection ); i++ ) {
 6695+ selection = list[ i ]( options, originalOptions, jqXHR );
 6696+ // If we got redirected to another dataType
 6697+ // we try there if executing only and not done already
 6698+ if ( typeof selection === "string" ) {
 6699+ if ( !executeOnly || inspected[ selection ] ) {
 6700+ selection = undefined;
 6701+ } else {
 6702+ options.dataTypes.unshift( selection );
 6703+ selection = inspectPrefiltersOrTransports(
 6704+ structure, options, originalOptions, jqXHR, selection, inspected );
 6705+ }
 6706+ }
 6707+ }
 6708+ // If we're only executing or nothing was selected
 6709+ // we try the catchall dataType if not done already
 6710+ if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
 6711+ selection = inspectPrefiltersOrTransports(
 6712+ structure, options, originalOptions, jqXHR, "*", inspected );
 6713+ }
 6714+ // unnecessary when only executing (prefilters)
 6715+ // but it'll be ignored by the caller in that case
 6716+ return selection;
 6717+}
 6718+
 6719+jQuery.fn.extend({
 6720+ load: function( url, params, callback ) {
 6721+ if ( typeof url !== "string" && _load ) {
 6722+ return _load.apply( this, arguments );
 6723+
 6724+ // Don't do a request if no elements are being requested
 6725+ } else if ( !this.length ) {
 6726+ return this;
 6727+ }
 6728+
 6729+ var off = url.indexOf( " " );
 6730+ if ( off >= 0 ) {
 6731+ var selector = url.slice( off, url.length );
 6732+ url = url.slice( 0, off );
 6733+ }
 6734+
 6735+ // Default to a GET request
 6736+ var type = "GET";
 6737+
 6738+ // If the second parameter was provided
 6739+ if ( params ) {
 6740+ // If it's a function
 6741+ if ( jQuery.isFunction( params ) ) {
 6742+ // We assume that it's the callback
 6743+ callback = params;
 6744+ params = undefined;
 6745+
 6746+ // Otherwise, build a param string
 6747+ } else if ( typeof params === "object" ) {
 6748+ params = jQuery.param( params, jQuery.ajaxSettings.traditional );
 6749+ type = "POST";
 6750+ }
 6751+ }
 6752+
 6753+ var self = this;
 6754+
 6755+ // Request the remote document
 6756+ jQuery.ajax({
 6757+ url: url,
 6758+ type: type,
 6759+ dataType: "html",
 6760+ data: params,
 6761+ // Complete callback (responseText is used internally)
 6762+ complete: function( jqXHR, status, responseText ) {
 6763+ // Store the response as specified by the jqXHR object
 6764+ responseText = jqXHR.responseText;
 6765+ // If successful, inject the HTML into all the matched elements
 6766+ if ( jqXHR.isResolved() ) {
 6767+ // #4825: Get the actual response in case
 6768+ // a dataFilter is present in ajaxSettings
 6769+ jqXHR.done(function( r ) {
 6770+ responseText = r;
 6771+ });
 6772+ // See if a selector was specified
 6773+ self.html( selector ?
 6774+ // Create a dummy div to hold the results
 6775+ jQuery("<div>")
 6776+ // inject the contents of the document in, removing the scripts
 6777+ // to avoid any 'Permission Denied' errors in IE
 6778+ .append(responseText.replace(rscript, ""))
 6779+
 6780+ // Locate the specified elements
 6781+ .find(selector) :
 6782+
 6783+ // If not, just inject the full result
 6784+ responseText );
 6785+ }
 6786+
 6787+ if ( callback ) {
 6788+ self.each( callback, [ responseText, status, jqXHR ] );
 6789+ }
 6790+ }
 6791+ });
 6792+
 6793+ return this;
 6794+ },
 6795+
 6796+ serialize: function() {
 6797+ return jQuery.param( this.serializeArray() );
 6798+ },
 6799+
 6800+ serializeArray: function() {
 6801+ return this.map(function(){
 6802+ return this.elements ? jQuery.makeArray( this.elements ) : this;
 6803+ })
 6804+ .filter(function(){
 6805+ return this.name && !this.disabled &&
 6806+ ( this.checked || rselectTextarea.test( this.nodeName ) ||
 6807+ rinput.test( this.type ) );
 6808+ })
 6809+ .map(function( i, elem ){
 6810+ var val = jQuery( this ).val();
 6811+
 6812+ return val == null ?
 6813+ null :
 6814+ jQuery.isArray( val ) ?
 6815+ jQuery.map( val, function( val, i ){
 6816+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
 6817+ }) :
 6818+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
 6819+ }).get();
 6820+ }
 6821+});
 6822+
 6823+// Attach a bunch of functions for handling common AJAX events
 6824+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
 6825+ jQuery.fn[ o ] = function( f ){
 6826+ return this.bind( o, f );
 6827+ };
 6828+});
 6829+
 6830+jQuery.each( [ "get", "post" ], function( i, method ) {
 6831+ jQuery[ method ] = function( url, data, callback, type ) {
 6832+ // shift arguments if data argument was omitted
 6833+ if ( jQuery.isFunction( data ) ) {
 6834+ type = type || callback;
 6835+ callback = data;
 6836+ data = undefined;
 6837+ }
 6838+
 6839+ return jQuery.ajax({
 6840+ type: method,
 6841+ url: url,
 6842+ data: data,
 6843+ success: callback,
 6844+ dataType: type
 6845+ });
 6846+ };
 6847+});
 6848+
 6849+jQuery.extend({
 6850+
 6851+ getScript: function( url, callback ) {
 6852+ return jQuery.get( url, undefined, callback, "script" );
 6853+ },
 6854+
 6855+ getJSON: function( url, data, callback ) {
 6856+ return jQuery.get( url, data, callback, "json" );
 6857+ },
 6858+
 6859+ // Creates a full fledged settings object into target
 6860+ // with both ajaxSettings and settings fields.
 6861+ // If target is omitted, writes into ajaxSettings.
 6862+ ajaxSetup: function ( target, settings ) {
 6863+ if ( !settings ) {
 6864+ // Only one parameter, we extend ajaxSettings
 6865+ settings = target;
 6866+ target = jQuery.extend( true, jQuery.ajaxSettings, settings );
 6867+ } else {
 6868+ // target was provided, we extend into it
 6869+ jQuery.extend( true, target, jQuery.ajaxSettings, settings );
 6870+ }
 6871+ // Flatten fields we don't want deep extended
 6872+ for( var field in { context: 1, url: 1 } ) {
 6873+ if ( field in settings ) {
 6874+ target[ field ] = settings[ field ];
 6875+ } else if( field in jQuery.ajaxSettings ) {
 6876+ target[ field ] = jQuery.ajaxSettings[ field ];
 6877+ }
 6878+ }
 6879+ return target;
 6880+ },
 6881+
 6882+ ajaxSettings: {
 6883+ url: ajaxLocation,
 6884+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
 6885+ global: true,
 6886+ type: "GET",
 6887+ contentType: "application/x-www-form-urlencoded",
 6888+ processData: true,
 6889+ async: true,
 6890+ /*
 6891+ timeout: 0,
 6892+ data: null,
 6893+ dataType: null,
 6894+ username: null,
 6895+ password: null,
 6896+ cache: null,
 6897+ traditional: false,
 6898+ headers: {},
 6899+ */
 6900+
 6901+ accepts: {
 6902+ xml: "application/xml, text/xml",
 6903+ html: "text/html",
 6904+ text: "text/plain",
 6905+ json: "application/json, text/javascript",
 6906+ "*": "*/*"
 6907+ },
 6908+
 6909+ contents: {
 6910+ xml: /xml/,
 6911+ html: /html/,
 6912+ json: /json/
 6913+ },
 6914+
 6915+ responseFields: {
 6916+ xml: "responseXML",
 6917+ text: "responseText"
 6918+ },
 6919+
 6920+ // List of data converters
 6921+ // 1) key format is "source_type destination_type" (a single space in-between)
 6922+ // 2) the catchall symbol "*" can be used for source_type
 6923+ converters: {
 6924+
 6925+ // Convert anything to text
 6926+ "* text": window.String,
 6927+
 6928+ // Text to html (true = no transformation)
 6929+ "text html": true,
 6930+
 6931+ // Evaluate text as a json expression
 6932+ "text json": jQuery.parseJSON,
 6933+
 6934+ // Parse text as xml
 6935+ "text xml": jQuery.parseXML
 6936+ }
 6937+ },
 6938+
 6939+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
 6940+ ajaxTransport: addToPrefiltersOrTransports( transports ),
 6941+
 6942+ // Main method
 6943+ ajax: function( url, options ) {
 6944+
 6945+ // If url is an object, simulate pre-1.5 signature
 6946+ if ( typeof url === "object" ) {
 6947+ options = url;
 6948+ url = undefined;
 6949+ }
 6950+
 6951+ // Force options to be an object
 6952+ options = options || {};
 6953+
 6954+ var // Create the final options object
 6955+ s = jQuery.ajaxSetup( {}, options ),
 6956+ // Callbacks context
 6957+ callbackContext = s.context || s,
 6958+ // Context for global events
 6959+ // It's the callbackContext if one was provided in the options
 6960+ // and if it's a DOM node or a jQuery collection
 6961+ globalEventContext = callbackContext !== s &&
 6962+ ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
 6963+ jQuery( callbackContext ) : jQuery.event,
 6964+ // Deferreds
 6965+ deferred = jQuery.Deferred(),
 6966+ completeDeferred = jQuery._Deferred(),
 6967+ // Status-dependent callbacks
 6968+ statusCode = s.statusCode || {},
 6969+ // ifModified key
 6970+ ifModifiedKey,
 6971+ // Headers (they are sent all at once)
 6972+ requestHeaders = {},
 6973+ requestHeadersNames = {},
 6974+ // Response headers
 6975+ responseHeadersString,
 6976+ responseHeaders,
 6977+ // transport
 6978+ transport,
 6979+ // timeout handle
 6980+ timeoutTimer,
 6981+ // Cross-domain detection vars
 6982+ parts,
 6983+ // The jqXHR state
 6984+ state = 0,
 6985+ // To know if global events are to be dispatched
 6986+ fireGlobals,
 6987+ // Loop variable
 6988+ i,
 6989+ // Fake xhr
 6990+ jqXHR = {
 6991+
 6992+ readyState: 0,
 6993+
 6994+ // Caches the header
 6995+ setRequestHeader: function( name, value ) {
 6996+ if ( !state ) {
 6997+ var lname = name.toLowerCase();
 6998+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
 6999+ requestHeaders[ name ] = value;
 7000+ }
 7001+ return this;
 7002+ },
 7003+
 7004+ // Raw string
 7005+ getAllResponseHeaders: function() {
 7006+ return state === 2 ? responseHeadersString : null;
 7007+ },
 7008+
 7009+ // Builds headers hashtable if needed
 7010+ getResponseHeader: function( key ) {
 7011+ var match;
 7012+ if ( state === 2 ) {
 7013+ if ( !responseHeaders ) {
 7014+ responseHeaders = {};
 7015+ while( ( match = rheaders.exec( responseHeadersString ) ) ) {
 7016+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
 7017+ }
 7018+ }
 7019+ match = responseHeaders[ key.toLowerCase() ];
 7020+ }
 7021+ return match === undefined ? null : match;
 7022+ },
 7023+
 7024+ // Overrides response content-type header
 7025+ overrideMimeType: function( type ) {
 7026+ if ( !state ) {
 7027+ s.mimeType = type;
 7028+ }
 7029+ return this;
 7030+ },
 7031+
 7032+ // Cancel the request
 7033+ abort: function( statusText ) {
 7034+ statusText = statusText || "abort";
 7035+ if ( transport ) {
 7036+ transport.abort( statusText );
 7037+ }
 7038+ done( 0, statusText );
 7039+ return this;
 7040+ }
 7041+ };
 7042+
 7043+ // Callback for when everything is done
 7044+ // It is defined here because jslint complains if it is declared
 7045+ // at the end of the function (which would be more logical and readable)
 7046+ function done( status, statusText, responses, headers ) {
 7047+
 7048+ // Called once
 7049+ if ( state === 2 ) {
 7050+ return;
 7051+ }
 7052+
 7053+ // State is "done" now
 7054+ state = 2;
 7055+
 7056+ // Clear timeout if it exists
 7057+ if ( timeoutTimer ) {
 7058+ clearTimeout( timeoutTimer );
 7059+ }
 7060+
 7061+ // Dereference transport for early garbage collection
 7062+ // (no matter how long the jqXHR object will be used)
 7063+ transport = undefined;
 7064+
 7065+ // Cache response headers
 7066+ responseHeadersString = headers || "";
 7067+
 7068+ // Set readyState
 7069+ jqXHR.readyState = status ? 4 : 0;
 7070+
 7071+ var isSuccess,
 7072+ success,
 7073+ error,
 7074+ response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
 7075+ lastModified,
 7076+ etag;
 7077+
 7078+ // If successful, handle type chaining
 7079+ if ( status >= 200 && status < 300 || status === 304 ) {
 7080+
 7081+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
 7082+ if ( s.ifModified ) {
 7083+
 7084+ if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
 7085+ jQuery.lastModified[ ifModifiedKey ] = lastModified;
 7086+ }
 7087+ if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
 7088+ jQuery.etag[ ifModifiedKey ] = etag;
 7089+ }
 7090+ }
 7091+
 7092+ // If not modified
 7093+ if ( status === 304 ) {
 7094+
 7095+ statusText = "notmodified";
 7096+ isSuccess = true;
 7097+
 7098+ // If we have data
 7099+ } else {
 7100+
 7101+ try {
 7102+ success = ajaxConvert( s, response );
 7103+ statusText = "success";
 7104+ isSuccess = true;
 7105+ } catch(e) {
 7106+ // We have a parsererror
 7107+ statusText = "parsererror";
 7108+ error = e;
 7109+ }
 7110+ }
 7111+ } else {
 7112+ // We extract error from statusText
 7113+ // then normalize statusText and status for non-aborts
 7114+ error = statusText;
 7115+ if( !statusText || status ) {
 7116+ statusText = "error";
 7117+ if ( status < 0 ) {
 7118+ status = 0;
 7119+ }
 7120+ }
 7121+ }
 7122+
 7123+ // Set data for the fake xhr object
 7124+ jqXHR.status = status;
 7125+ jqXHR.statusText = statusText;
 7126+
 7127+ // Success/Error
 7128+ if ( isSuccess ) {
 7129+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
 7130+ } else {
 7131+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
 7132+ }
 7133+
 7134+ // Status-dependent callbacks
 7135+ jqXHR.statusCode( statusCode );
 7136+ statusCode = undefined;
 7137+
 7138+ if ( fireGlobals ) {
 7139+ globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
 7140+ [ jqXHR, s, isSuccess ? success : error ] );
 7141+ }
 7142+
 7143+ // Complete
 7144+ completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] );
 7145+
 7146+ if ( fireGlobals ) {
 7147+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s] );
 7148+ // Handle the global AJAX counter
 7149+ if ( !( --jQuery.active ) ) {
 7150+ jQuery.event.trigger( "ajaxStop" );
 7151+ }
 7152+ }
 7153+ }
 7154+
 7155+ // Attach deferreds
 7156+ deferred.promise( jqXHR );
 7157+ jqXHR.success = jqXHR.done;
 7158+ jqXHR.error = jqXHR.fail;
 7159+ jqXHR.complete = completeDeferred.done;
 7160+
 7161+ // Status-dependent callbacks
 7162+ jqXHR.statusCode = function( map ) {
 7163+ if ( map ) {
 7164+ var tmp;
 7165+ if ( state < 2 ) {
 7166+ for( tmp in map ) {
 7167+ statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
 7168+ }
 7169+ } else {
 7170+ tmp = map[ jqXHR.status ];
 7171+ jqXHR.then( tmp, tmp );
 7172+ }
 7173+ }
 7174+ return this;
 7175+ };
 7176+
 7177+ // Remove hash character (#7531: and string promotion)
 7178+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
 7179+ // We also use the url parameter if available
 7180+ s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
 7181+
 7182+ // Extract dataTypes list
 7183+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
 7184+
 7185+ // Determine if a cross-domain request is in order
 7186+ if ( s.crossDomain == null ) {
 7187+ parts = rurl.exec( s.url.toLowerCase() );
 7188+ s.crossDomain = !!( parts &&
 7189+ ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
 7190+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
 7191+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
 7192+ );
 7193+ }
 7194+
 7195+ // Convert data if not already a string
 7196+ if ( s.data && s.processData && typeof s.data !== "string" ) {
 7197+ s.data = jQuery.param( s.data, s.traditional );
 7198+ }
 7199+
 7200+ // Apply prefilters
 7201+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
 7202+
 7203+ // If request was aborted inside a prefiler, stop there
 7204+ if ( state === 2 ) {
 7205+ return false;
 7206+ }
 7207+
 7208+ // We can fire global events as of now if asked to
 7209+ fireGlobals = s.global;
 7210+
 7211+ // Uppercase the type
 7212+ s.type = s.type.toUpperCase();
 7213+
 7214+ // Determine if request has content
 7215+ s.hasContent = !rnoContent.test( s.type );
 7216+
 7217+ // Watch for a new set of requests
 7218+ if ( fireGlobals && jQuery.active++ === 0 ) {
 7219+ jQuery.event.trigger( "ajaxStart" );
 7220+ }
 7221+
 7222+ // More options handling for requests with no content
 7223+ if ( !s.hasContent ) {
 7224+
 7225+ // If data is available, append data to url
 7226+ if ( s.data ) {
 7227+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
 7228+ }
 7229+
 7230+ // Get ifModifiedKey before adding the anti-cache parameter
 7231+ ifModifiedKey = s.url;
 7232+
 7233+ // Add anti-cache in url if needed
 7234+ if ( s.cache === false ) {
 7235+
 7236+ var ts = jQuery.now(),
 7237+ // try replacing _= if it is there
 7238+ ret = s.url.replace( rts, "$1_=" + ts );
 7239+
 7240+ // if nothing was replaced, add timestamp to the end
 7241+ s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
 7242+ }
 7243+ }
 7244+
 7245+ // Set the correct header, if data is being sent
 7246+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
 7247+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
 7248+ }
 7249+
 7250+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
 7251+ if ( s.ifModified ) {
 7252+ ifModifiedKey = ifModifiedKey || s.url;
 7253+ if ( jQuery.lastModified[ ifModifiedKey ] ) {
 7254+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
 7255+ }
 7256+ if ( jQuery.etag[ ifModifiedKey ] ) {
 7257+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
 7258+ }
 7259+ }
 7260+
 7261+ // Set the Accepts header for the server, depending on the dataType
 7262+ jqXHR.setRequestHeader(
 7263+ "Accept",
 7264+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
 7265+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
 7266+ s.accepts[ "*" ]
 7267+ );
 7268+
 7269+ // Check for headers option
 7270+ for ( i in s.headers ) {
 7271+ jqXHR.setRequestHeader( i, s.headers[ i ] );
 7272+ }
 7273+
 7274+ // Allow custom headers/mimetypes and early abort
 7275+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
 7276+ // Abort if not done already
 7277+ jqXHR.abort();
 7278+ return false;
 7279+
 7280+ }
 7281+
 7282+ // Install callbacks on deferreds
 7283+ for ( i in { success: 1, error: 1, complete: 1 } ) {
 7284+ jqXHR[ i ]( s[ i ] );
 7285+ }
 7286+
 7287+ // Get transport
 7288+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
 7289+
 7290+ // If no transport, we auto-abort
 7291+ if ( !transport ) {
 7292+ done( -1, "No Transport" );
 7293+ } else {
 7294+ jqXHR.readyState = 1;
 7295+ // Send global event
 7296+ if ( fireGlobals ) {
 7297+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
 7298+ }
 7299+ // Timeout
 7300+ if ( s.async && s.timeout > 0 ) {
 7301+ timeoutTimer = setTimeout( function(){
 7302+ jqXHR.abort( "timeout" );
 7303+ }, s.timeout );
 7304+ }
 7305+
 7306+ try {
 7307+ state = 1;
 7308+ transport.send( requestHeaders, done );
 7309+ } catch (e) {
 7310+ // Propagate exception as error if not done
 7311+ if ( status < 2 ) {
 7312+ done( -1, e );
 7313+ // Simply rethrow otherwise
 7314+ } else {
 7315+ jQuery.error( e );
 7316+ }
 7317+ }
 7318+ }
 7319+
 7320+ return jqXHR;
 7321+ },
 7322+
 7323+ // Serialize an array of form elements or a set of
 7324+ // key/values into a query string
 7325+ param: function( a, traditional ) {
 7326+ var s = [],
 7327+ add = function( key, value ) {
 7328+ // If value is a function, invoke it and return its value
 7329+ value = jQuery.isFunction( value ) ? value() : value;
 7330+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
 7331+ };
 7332+
 7333+ // Set traditional to true for jQuery <= 1.3.2 behavior.
 7334+ if ( traditional === undefined ) {
 7335+ traditional = jQuery.ajaxSettings.traditional;
 7336+ }
 7337+
 7338+ // If an array was passed in, assume that it is an array of form elements.
 7339+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
 7340+ // Serialize the form elements
 7341+ jQuery.each( a, function() {
 7342+ add( this.name, this.value );
 7343+ });
 7344+
 7345+ } else {
 7346+ // If traditional, encode the "old" way (the way 1.3.2 or older
 7347+ // did it), otherwise encode params recursively.
 7348+ for ( var prefix in a ) {
 7349+ buildParams( prefix, a[ prefix ], traditional, add );
 7350+ }
 7351+ }
 7352+
 7353+ // Return the resulting serialization
 7354+ return s.join( "&" ).replace( r20, "+" );
 7355+ }
 7356+});
 7357+
 7358+function buildParams( prefix, obj, traditional, add ) {
 7359+ if ( jQuery.isArray( obj ) ) {
 7360+ // Serialize array item.
 7361+ jQuery.each( obj, function( i, v ) {
 7362+ if ( traditional || rbracket.test( prefix ) ) {
 7363+ // Treat each array item as a scalar.
 7364+ add( prefix, v );
 7365+
 7366+ } else {
 7367+ // If array item is non-scalar (array or object), encode its
 7368+ // numeric index to resolve deserialization ambiguity issues.
 7369+ // Note that rack (as of 1.0.0) can't currently deserialize
 7370+ // nested arrays properly, and attempting to do so may cause
 7371+ // a server error. Possible fixes are to modify rack's
 7372+ // deserialization algorithm or to provide an option or flag
 7373+ // to force array serialization to be shallow.
 7374+ buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
 7375+ }
 7376+ });
 7377+
 7378+ } else if ( !traditional && obj != null && typeof obj === "object" ) {
 7379+ // Serialize object item.
 7380+ for ( var name in obj ) {
 7381+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
 7382+ }
 7383+
 7384+ } else {
 7385+ // Serialize scalar item.
 7386+ add( prefix, obj );
 7387+ }
 7388+}
 7389+
 7390+// This is still on the jQuery object... for now
 7391+// Want to move this to jQuery.ajax some day
 7392+jQuery.extend({
 7393+
 7394+ // Counter for holding the number of active queries
 7395+ active: 0,
 7396+
 7397+ // Last-Modified header cache for next request
 7398+ lastModified: {},
 7399+ etag: {}
 7400+
 7401+});
 7402+
 7403+/* Handles responses to an ajax request:
 7404+ * - sets all responseXXX fields accordingly
 7405+ * - finds the right dataType (mediates between content-type and expected dataType)
 7406+ * - returns the corresponding response
 7407+ */
 7408+function ajaxHandleResponses( s, jqXHR, responses ) {
 7409+
 7410+ var contents = s.contents,
 7411+ dataTypes = s.dataTypes,
 7412+ responseFields = s.responseFields,
 7413+ ct,
 7414+ type,
 7415+ finalDataType,
 7416+ firstDataType;
 7417+
 7418+ // Fill responseXXX fields
 7419+ for( type in responseFields ) {
 7420+ if ( type in responses ) {
 7421+ jqXHR[ responseFields[type] ] = responses[ type ];
 7422+ }
 7423+ }
 7424+
 7425+ // Remove auto dataType and get content-type in the process
 7426+ while( dataTypes[ 0 ] === "*" ) {
 7427+ dataTypes.shift();
 7428+ if ( ct === undefined ) {
 7429+ ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
 7430+ }
 7431+ }
 7432+
 7433+ // Check if we're dealing with a known content-type
 7434+ if ( ct ) {
 7435+ for ( type in contents ) {
 7436+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
 7437+ dataTypes.unshift( type );
 7438+ break;
 7439+ }
 7440+ }
 7441+ }
 7442+
 7443+ // Check to see if we have a response for the expected dataType
 7444+ if ( dataTypes[ 0 ] in responses ) {
 7445+ finalDataType = dataTypes[ 0 ];
 7446+ } else {
 7447+ // Try convertible dataTypes
 7448+ for ( type in responses ) {
 7449+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
 7450+ finalDataType = type;
 7451+ break;
 7452+ }
 7453+ if ( !firstDataType ) {
 7454+ firstDataType = type;
 7455+ }
 7456+ }
 7457+ // Or just use first one
 7458+ finalDataType = finalDataType || firstDataType;
 7459+ }
 7460+
 7461+ // If we found a dataType
 7462+ // We add the dataType to the list if needed
 7463+ // and return the corresponding response
 7464+ if ( finalDataType ) {
 7465+ if ( finalDataType !== dataTypes[ 0 ] ) {
 7466+ dataTypes.unshift( finalDataType );
 7467+ }
 7468+ return responses[ finalDataType ];
 7469+ }
 7470+}
 7471+
 7472+// Chain conversions given the request and the original response
 7473+function ajaxConvert( s, response ) {
 7474+
 7475+ // Apply the dataFilter if provided
 7476+ if ( s.dataFilter ) {
 7477+ response = s.dataFilter( response, s.dataType );
 7478+ }
 7479+
 7480+ var dataTypes = s.dataTypes,
 7481+ converters = {},
 7482+ i,
 7483+ key,
 7484+ length = dataTypes.length,
 7485+ tmp,
 7486+ // Current and previous dataTypes
 7487+ current = dataTypes[ 0 ],
 7488+ prev,
 7489+ // Conversion expression
 7490+ conversion,
 7491+ // Conversion function
 7492+ conv,
 7493+ // Conversion functions (transitive conversion)
 7494+ conv1,
 7495+ conv2;
 7496+
 7497+ // For each dataType in the chain
 7498+ for( i = 1; i < length; i++ ) {
 7499+
 7500+ // Create converters map
 7501+ // with lowercased keys
 7502+ if ( i === 1 ) {
 7503+ for( key in s.converters ) {
 7504+ if( typeof key === "string" ) {
 7505+ converters[ key.toLowerCase() ] = s.converters[ key ];
 7506+ }
 7507+ }
 7508+ }
 7509+
 7510+ // Get the dataTypes
 7511+ prev = current;
 7512+ current = dataTypes[ i ];
 7513+
 7514+ // If current is auto dataType, update it to prev
 7515+ if( current === "*" ) {
 7516+ current = prev;
 7517+ // If no auto and dataTypes are actually different
 7518+ } else if ( prev !== "*" && prev !== current ) {
 7519+
 7520+ // Get the converter
 7521+ conversion = prev + " " + current;
 7522+ conv = converters[ conversion ] || converters[ "* " + current ];
 7523+
 7524+ // If there is no direct converter, search transitively
 7525+ if ( !conv ) {
 7526+ conv2 = undefined;
 7527+ for( conv1 in converters ) {
 7528+ tmp = conv1.split( " " );
 7529+ if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
 7530+ conv2 = converters[ tmp[1] + " " + current ];
 7531+ if ( conv2 ) {
 7532+ conv1 = converters[ conv1 ];
 7533+ if ( conv1 === true ) {
 7534+ conv = conv2;
 7535+ } else if ( conv2 === true ) {
 7536+ conv = conv1;
 7537+ }
 7538+ break;
 7539+ }
 7540+ }
 7541+ }
 7542+ }
 7543+ // If we found no converter, dispatch an error
 7544+ if ( !( conv || conv2 ) ) {
 7545+ jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
 7546+ }
 7547+ // If found converter is not an equivalence
 7548+ if ( conv !== true ) {
 7549+ // Convert with 1 or 2 converters accordingly
 7550+ response = conv ? conv( response ) : conv2( conv1(response) );
 7551+ }
 7552+ }
 7553+ }
 7554+ return response;
 7555+}
 7556+
 7557+
 7558+
 7559+
 7560+var jsc = jQuery.now(),
 7561+ jsre = /(\=)\?(&|$)|\?\?/i;
 7562+
 7563+// Default jsonp settings
 7564+jQuery.ajaxSetup({
 7565+ jsonp: "callback",
 7566+ jsonpCallback: function() {
 7567+ return jQuery.expando + "_" + ( jsc++ );
 7568+ }
 7569+});
 7570+
 7571+// Detect, normalize options and install callbacks for jsonp requests
 7572+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
 7573+
 7574+ var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
 7575+ ( typeof s.data === "string" );
 7576+
 7577+ if ( s.dataTypes[ 0 ] === "jsonp" ||
 7578+ s.jsonp !== false && ( jsre.test( s.url ) ||
 7579+ inspectData && jsre.test( s.data ) ) ) {
 7580+
 7581+ var responseContainer,
 7582+ jsonpCallback = s.jsonpCallback =
 7583+ jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
 7584+ previous = window[ jsonpCallback ],
 7585+ url = s.url,
 7586+ data = s.data,
 7587+ replace = "$1" + jsonpCallback + "$2";
 7588+
 7589+ if ( s.jsonp !== false ) {
 7590+ url = url.replace( jsre, replace );
 7591+ if ( s.url === url ) {
 7592+ if ( inspectData ) {
 7593+ data = data.replace( jsre, replace );
 7594+ }
 7595+ if ( s.data === data ) {
 7596+ // Add callback manually
 7597+ url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
 7598+ }
 7599+ }
 7600+ }
 7601+
 7602+ s.url = url;
 7603+ s.data = data;
 7604+
 7605+ // Install callback
 7606+ window[ jsonpCallback ] = function( response ) {
 7607+ responseContainer = [ response ];
 7608+ };
 7609+
 7610+ // Clean-up function
 7611+ jqXHR.always(function() {
 7612+ // Set callback back to previous value
 7613+ window[ jsonpCallback ] = previous;
 7614+ // Call if it was a function and we have a response
 7615+ if ( responseContainer && jQuery.isFunction( previous ) ) {
 7616+ window[ jsonpCallback ]( responseContainer[ 0 ] );
 7617+ }
 7618+ });
 7619+
 7620+ // Use data converter to retrieve json after script execution
 7621+ s.converters["script json"] = function() {
 7622+ if ( !responseContainer ) {
 7623+ jQuery.error( jsonpCallback + " was not called" );
 7624+ }
 7625+ return responseContainer[ 0 ];
 7626+ };
 7627+
 7628+ // force json dataType
 7629+ s.dataTypes[ 0 ] = "json";
 7630+
 7631+ // Delegate to script
 7632+ return "script";
 7633+ }
 7634+});
 7635+
 7636+
 7637+
 7638+
 7639+// Install script dataType
 7640+jQuery.ajaxSetup({
 7641+ accepts: {
 7642+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
 7643+ },
 7644+ contents: {
 7645+ script: /javascript|ecmascript/
 7646+ },
 7647+ converters: {
 7648+ "text script": function( text ) {
 7649+ jQuery.globalEval( text );
 7650+ return text;
 7651+ }
 7652+ }
 7653+});
 7654+
 7655+// Handle cache's special case and global
 7656+jQuery.ajaxPrefilter( "script", function( s ) {
 7657+ if ( s.cache === undefined ) {
 7658+ s.cache = false;
 7659+ }
 7660+ if ( s.crossDomain ) {
 7661+ s.type = "GET";
 7662+ s.global = false;
 7663+ }
 7664+});
 7665+
 7666+// Bind script tag hack transport
 7667+jQuery.ajaxTransport( "script", function(s) {
 7668+
 7669+ // This transport only deals with cross domain requests
 7670+ if ( s.crossDomain ) {
 7671+
 7672+ var script,
 7673+ head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
 7674+
 7675+ return {
 7676+
 7677+ send: function( _, callback ) {
 7678+
 7679+ script = document.createElement( "script" );
 7680+
 7681+ script.async = "async";
 7682+
 7683+ if ( s.scriptCharset ) {
 7684+ script.charset = s.scriptCharset;
 7685+ }
 7686+
 7687+ script.src = s.url;
 7688+
 7689+ // Attach handlers for all browsers
 7690+ script.onload = script.onreadystatechange = function( _, isAbort ) {
 7691+
 7692+ if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
 7693+
 7694+ // Handle memory leak in IE
 7695+ script.onload = script.onreadystatechange = null;
 7696+
 7697+ // Remove the script
 7698+ if ( head && script.parentNode ) {
 7699+ head.removeChild( script );
 7700+ }
 7701+
 7702+ // Dereference the script
 7703+ script = undefined;
 7704+
 7705+ // Callback if not abort
 7706+ if ( !isAbort ) {
 7707+ callback( 200, "success" );
 7708+ }
 7709+ }
 7710+ };
 7711+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
 7712+ // This arises when a base node is used (#2709 and #4378).
 7713+ head.insertBefore( script, head.firstChild );
 7714+ },
 7715+
 7716+ abort: function() {
 7717+ if ( script ) {
 7718+ script.onload( 0, 1 );
 7719+ }
 7720+ }
 7721+ };
 7722+ }
 7723+});
 7724+
 7725+
 7726+
 7727+
 7728+var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
 7729+ xhrOnUnloadAbort = window.ActiveXObject ? function() {
 7730+ // Abort all pending requests
 7731+ for ( var key in xhrCallbacks ) {
 7732+ xhrCallbacks[ key ]( 0, 1 );
 7733+ }
 7734+ } : false,
 7735+ xhrId = 0,
 7736+ xhrCallbacks;
 7737+
 7738+// Functions to create xhrs
 7739+function createStandardXHR() {
 7740+ try {
 7741+ return new window.XMLHttpRequest();
 7742+ } catch( e ) {}
 7743+}
 7744+
 7745+function createActiveXHR() {
 7746+ try {
 7747+ return new window.ActiveXObject( "Microsoft.XMLHTTP" );
 7748+ } catch( e ) {}
 7749+}
 7750+
 7751+// Create the request object
 7752+// (This is still attached to ajaxSettings for backward compatibility)
 7753+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
 7754+ /* Microsoft failed to properly
 7755+ * implement the XMLHttpRequest in IE7 (can't request local files),
 7756+ * so we use the ActiveXObject when it is available
 7757+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
 7758+ * we need a fallback.
 7759+ */
 7760+ function() {
 7761+ return !this.isLocal && createStandardXHR() || createActiveXHR();
 7762+ } :
 7763+ // For all other browsers, use the standard XMLHttpRequest object
 7764+ createStandardXHR;
 7765+
 7766+// Determine support properties
 7767+(function( xhr ) {
 7768+ jQuery.extend( jQuery.support, {
 7769+ ajax: !!xhr,
 7770+ cors: !!xhr && ( "withCredentials" in xhr )
 7771+ });
 7772+})( jQuery.ajaxSettings.xhr() );
 7773+
 7774+// Create transport if the browser can provide an xhr
 7775+if ( jQuery.support.ajax ) {
 7776+
 7777+ jQuery.ajaxTransport(function( s ) {
 7778+ // Cross domain only allowed if supported through XMLHttpRequest
 7779+ if ( !s.crossDomain || jQuery.support.cors ) {
 7780+
 7781+ var callback;
 7782+
 7783+ return {
 7784+ send: function( headers, complete ) {
 7785+
 7786+ // Get a new xhr
 7787+ var xhr = s.xhr(),
 7788+ handle,
 7789+ i;
 7790+
 7791+ // Open the socket
 7792+ // Passing null username, generates a login popup on Opera (#2865)
 7793+ if ( s.username ) {
 7794+ xhr.open( s.type, s.url, s.async, s.username, s.password );
 7795+ } else {
 7796+ xhr.open( s.type, s.url, s.async );
 7797+ }
 7798+
 7799+ // Apply custom fields if provided
 7800+ if ( s.xhrFields ) {
 7801+ for ( i in s.xhrFields ) {
 7802+ xhr[ i ] = s.xhrFields[ i ];
 7803+ }
 7804+ }
 7805+
 7806+ // Override mime type if needed
 7807+ if ( s.mimeType && xhr.overrideMimeType ) {
 7808+ xhr.overrideMimeType( s.mimeType );
 7809+ }
 7810+
 7811+ // X-Requested-With header
 7812+ // For cross-domain requests, seeing as conditions for a preflight are
 7813+ // akin to a jigsaw puzzle, we simply never set it to be sure.
 7814+ // (it can always be set on a per-request basis or even using ajaxSetup)
 7815+ // For same-domain requests, won't change header if already provided.
 7816+ if ( !s.crossDomain && !headers["X-Requested-With"] ) {
 7817+ headers[ "X-Requested-With" ] = "XMLHttpRequest";
 7818+ }
 7819+
 7820+ // Need an extra try/catch for cross domain requests in Firefox 3
 7821+ try {
 7822+ for ( i in headers ) {
 7823+ xhr.setRequestHeader( i, headers[ i ] );
 7824+ }
 7825+ } catch( _ ) {}
 7826+
 7827+ // Do send the request
 7828+ // This may raise an exception which is actually
 7829+ // handled in jQuery.ajax (so no try/catch here)
 7830+ xhr.send( ( s.hasContent && s.data ) || null );
 7831+
 7832+ // Listener
 7833+ callback = function( _, isAbort ) {
 7834+
 7835+ var status,
 7836+ statusText,
 7837+ responseHeaders,
 7838+ responses,
 7839+ xml;
 7840+
 7841+ // Firefox throws exceptions when accessing properties
 7842+ // of an xhr when a network error occured
 7843+ // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
 7844+ try {
 7845+
 7846+ // Was never called and is aborted or complete
 7847+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
 7848+
 7849+ // Only called once
 7850+ callback = undefined;
 7851+
 7852+ // Do not keep as active anymore
 7853+ if ( handle ) {
 7854+ xhr.onreadystatechange = jQuery.noop;
 7855+ if ( xhrOnUnloadAbort ) {
 7856+ delete xhrCallbacks[ handle ];
 7857+ }
 7858+ }
 7859+
 7860+ // If it's an abort
 7861+ if ( isAbort ) {
 7862+ // Abort it manually if needed
 7863+ if ( xhr.readyState !== 4 ) {
 7864+ xhr.abort();
 7865+ }
 7866+ } else {
 7867+ status = xhr.status;
 7868+ responseHeaders = xhr.getAllResponseHeaders();
 7869+ responses = {};
 7870+ xml = xhr.responseXML;
 7871+
 7872+ // Construct response list
 7873+ if ( xml && xml.documentElement /* #4958 */ ) {
 7874+ responses.xml = xml;
 7875+ }
 7876+ responses.text = xhr.responseText;
 7877+
 7878+ // Firefox throws an exception when accessing
 7879+ // statusText for faulty cross-domain requests
 7880+ try {
 7881+ statusText = xhr.statusText;
 7882+ } catch( e ) {
 7883+ // We normalize with Webkit giving an empty statusText
 7884+ statusText = "";
 7885+ }
 7886+
 7887+ // Filter status for non standard behaviors
 7888+
 7889+ // If the request is local and we have data: assume a success
 7890+ // (success with no data won't get notified, that's the best we
 7891+ // can do given current implementations)
 7892+ if ( !status && s.isLocal && !s.crossDomain ) {
 7893+ status = responses.text ? 200 : 404;
 7894+ // IE - #1450: sometimes returns 1223 when it should be 204
 7895+ } else if ( status === 1223 ) {
 7896+ status = 204;
 7897+ }
 7898+ }
 7899+ }
 7900+ } catch( firefoxAccessException ) {
 7901+ if ( !isAbort ) {
 7902+ complete( -1, firefoxAccessException );
 7903+ }
 7904+ }
 7905+
 7906+ // Call complete if needed
 7907+ if ( responses ) {
 7908+ complete( status, statusText, responses, responseHeaders );
 7909+ }
 7910+ };
 7911+
 7912+ // if we're in sync mode or it's in cache
 7913+ // and has been retrieved directly (IE6 & IE7)
 7914+ // we need to manually fire the callback
 7915+ if ( !s.async || xhr.readyState === 4 ) {
 7916+ callback();
 7917+ } else {
 7918+ handle = ++xhrId;
 7919+ if ( xhrOnUnloadAbort ) {
 7920+ // Create the active xhrs callbacks list if needed
 7921+ // and attach the unload handler
 7922+ if ( !xhrCallbacks ) {
 7923+ xhrCallbacks = {};
 7924+ jQuery( window ).unload( xhrOnUnloadAbort );
 7925+ }
 7926+ // Add to list of active xhrs callbacks
 7927+ xhrCallbacks[ handle ] = callback;
 7928+ }
 7929+ xhr.onreadystatechange = callback;
 7930+ }
 7931+ },
 7932+
 7933+ abort: function() {
 7934+ if ( callback ) {
 7935+ callback(0,1);
 7936+ }
 7937+ }
 7938+ };
 7939+ }
 7940+ });
 7941+}
 7942+
 7943+
 7944+
 7945+
 7946+var elemdisplay = {},
 7947+ iframe, iframeDoc,
 7948+ rfxtypes = /^(?:toggle|show|hide)$/,
 7949+ rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
 7950+ timerId,
 7951+ fxAttrs = [
 7952+ // height animations
 7953+ [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
 7954+ // width animations
 7955+ [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
 7956+ // opacity animations
 7957+ [ "opacity" ]
 7958+ ],
 7959+ fxNow,
 7960+ requestAnimationFrame = window.webkitRequestAnimationFrame ||
 7961+ window.mozRequestAnimationFrame ||
 7962+ window.oRequestAnimationFrame;
 7963+
 7964+jQuery.fn.extend({
 7965+ show: function( speed, easing, callback ) {
 7966+ var elem, display;
 7967+
 7968+ if ( speed || speed === 0 ) {
 7969+ return this.animate( genFx("show", 3), speed, easing, callback);
 7970+
 7971+ } else {
 7972+ for ( var i = 0, j = this.length; i < j; i++ ) {
 7973+ elem = this[i];
 7974+
 7975+ if ( elem.style ) {
 7976+ display = elem.style.display;
 7977+
 7978+ // Reset the inline display of this element to learn if it is
 7979+ // being hidden by cascaded rules or not
 7980+ if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
 7981+ display = elem.style.display = "";
 7982+ }
 7983+
 7984+ // Set elements which have been overridden with display: none
 7985+ // in a stylesheet to whatever the default browser style is
 7986+ // for such an element
 7987+ if ( display === "" && jQuery.css( elem, "display" ) === "none" ) {
 7988+ jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName));
 7989+ }
 7990+ }
 7991+ }
 7992+
 7993+ // Set the display of most of the elements in a second loop
 7994+ // to avoid the constant reflow
 7995+ for ( i = 0; i < j; i++ ) {
 7996+ elem = this[i];
 7997+
 7998+ if ( elem.style ) {
 7999+ display = elem.style.display;
 8000+
 8001+ if ( display === "" || display === "none" ) {
 8002+ elem.style.display = jQuery._data(elem, "olddisplay") || "";
 8003+ }
 8004+ }
 8005+ }
 8006+
 8007+ return this;
 8008+ }
 8009+ },
 8010+
 8011+ hide: function( speed, easing, callback ) {
 8012+ if ( speed || speed === 0 ) {
 8013+ return this.animate( genFx("hide", 3), speed, easing, callback);
 8014+
 8015+ } else {
 8016+ for ( var i = 0, j = this.length; i < j; i++ ) {
 8017+ if ( this[i].style ) {
 8018+ var display = jQuery.css( this[i], "display" );
 8019+
 8020+ if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) {
 8021+ jQuery._data( this[i], "olddisplay", display );
 8022+ }
 8023+ }
 8024+ }
 8025+
 8026+ // Set the display of the elements in a second loop
 8027+ // to avoid the constant reflow
 8028+ for ( i = 0; i < j; i++ ) {
 8029+ if ( this[i].style ) {
 8030+ this[i].style.display = "none";
 8031+ }
 8032+ }
 8033+
 8034+ return this;
 8035+ }
 8036+ },
 8037+
 8038+ // Save the old toggle function
 8039+ _toggle: jQuery.fn.toggle,
 8040+
 8041+ toggle: function( fn, fn2, callback ) {
 8042+ var bool = typeof fn === "boolean";
 8043+
 8044+ if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
 8045+ this._toggle.apply( this, arguments );
 8046+
 8047+ } else if ( fn == null || bool ) {
 8048+ this.each(function() {
 8049+ var state = bool ? fn : jQuery(this).is(":hidden");
 8050+ jQuery(this)[ state ? "show" : "hide" ]();
 8051+ });
 8052+
 8053+ } else {
 8054+ this.animate(genFx("toggle", 3), fn, fn2, callback);
 8055+ }
 8056+
 8057+ return this;
 8058+ },
 8059+
 8060+ fadeTo: function( speed, to, easing, callback ) {
 8061+ return this.filter(":hidden").css("opacity", 0).show().end()
 8062+ .animate({opacity: to}, speed, easing, callback);
 8063+ },
 8064+
 8065+ animate: function( prop, speed, easing, callback ) {
 8066+ var optall = jQuery.speed(speed, easing, callback);
 8067+
 8068+ if ( jQuery.isEmptyObject( prop ) ) {
 8069+ return this.each( optall.complete, [ false ] );
 8070+ }
 8071+
 8072+ // Do not change referenced properties as per-property easing will be lost
 8073+ prop = jQuery.extend( {}, prop );
 8074+
 8075+ return this[ optall.queue === false ? "each" : "queue" ](function() {
 8076+ // XXX 'this' does not always have a nodeName when running the
 8077+ // test suite
 8078+
 8079+ if ( optall.queue === false ) {
 8080+ jQuery._mark( this );
 8081+ }
 8082+
 8083+ var opt = jQuery.extend( {}, optall ),
 8084+ isElement = this.nodeType === 1,
 8085+ hidden = isElement && jQuery(this).is(":hidden"),
 8086+ name, val, p,
 8087+ display, e,
 8088+ parts, start, end, unit;
 8089+
 8090+ // will store per property easing and be used to determine when an animation is complete
 8091+ opt.animatedProperties = {};
 8092+
 8093+ for ( p in prop ) {
 8094+
 8095+ // property name normalization
 8096+ name = jQuery.camelCase( p );
 8097+ if ( p !== name ) {
 8098+ prop[ name ] = prop[ p ];
 8099+ delete prop[ p ];
 8100+ }
 8101+
 8102+ val = prop[ name ];
 8103+
 8104+ // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
 8105+ if ( jQuery.isArray( val ) ) {
 8106+ opt.animatedProperties[ name ] = val[ 1 ];
 8107+ val = prop[ name ] = val[ 0 ];
 8108+ } else {
 8109+ opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
 8110+ }
 8111+
 8112+ if ( val === "hide" && hidden || val === "show" && !hidden ) {
 8113+ return opt.complete.call( this );
 8114+ }
 8115+
 8116+ if ( isElement && ( name === "height" || name === "width" ) ) {
 8117+ // Make sure that nothing sneaks out
 8118+ // Record all 3 overflow attributes because IE does not
 8119+ // change the overflow attribute when overflowX and
 8120+ // overflowY are set to the same value
 8121+ opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
 8122+
 8123+ // Set display property to inline-block for height/width
 8124+ // animations on inline elements that are having width/height
 8125+ // animated
 8126+ if ( jQuery.css( this, "display" ) === "inline" &&
 8127+ jQuery.css( this, "float" ) === "none" ) {
 8128+ if ( !jQuery.support.inlineBlockNeedsLayout ) {
 8129+ this.style.display = "inline-block";
 8130+
 8131+ } else {
 8132+ display = defaultDisplay( this.nodeName );
 8133+
 8134+ // inline-level elements accept inline-block;
 8135+ // block-level elements need to be inline with layout
 8136+ if ( display === "inline" ) {
 8137+ this.style.display = "inline-block";
 8138+
 8139+ } else {
 8140+ this.style.display = "inline";
 8141+ this.style.zoom = 1;
 8142+ }
 8143+ }
 8144+ }
 8145+ }
 8146+ }
 8147+
 8148+ if ( opt.overflow != null ) {
 8149+ this.style.overflow = "hidden";
 8150+ }
 8151+
 8152+ for ( p in prop ) {
 8153+ e = new jQuery.fx( this, opt, p );
 8154+ val = prop[ p ];
 8155+
 8156+ if ( rfxtypes.test(val) ) {
 8157+ e[ val === "toggle" ? hidden ? "show" : "hide" : val ]();
 8158+
 8159+ } else {
 8160+ parts = rfxnum.exec( val );
 8161+ start = e.cur();
 8162+
 8163+ if ( parts ) {
 8164+ end = parseFloat( parts[2] );
 8165+ unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
 8166+
 8167+ // We need to compute starting value
 8168+ if ( unit !== "px" ) {
 8169+ jQuery.style( this, p, (end || 1) + unit);
 8170+ start = ((end || 1) / e.cur()) * start;
 8171+ jQuery.style( this, p, start + unit);
 8172+ }
 8173+
 8174+ // If a +=/-= token was provided, we're doing a relative animation
 8175+ if ( parts[1] ) {
 8176+ end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
 8177+ }
 8178+
 8179+ e.custom( start, end, unit );
 8180+
 8181+ } else {
 8182+ e.custom( start, val, "" );
 8183+ }
 8184+ }
 8185+ }
 8186+
 8187+ // For JS strict compliance
 8188+ return true;
 8189+ });
 8190+ },
 8191+
 8192+ stop: function( clearQueue, gotoEnd ) {
 8193+ if ( clearQueue ) {
 8194+ this.queue([]);
 8195+ }
 8196+
 8197+ this.each(function() {
 8198+ var timers = jQuery.timers,
 8199+ i = timers.length;
 8200+ // clear marker counters if we know they won't be
 8201+ if ( !gotoEnd ) {
 8202+ jQuery._unmark( true, this );
 8203+ }
 8204+ while ( i-- ) {
 8205+ if ( timers[i].elem === this ) {
 8206+ if (gotoEnd) {
 8207+ // force the next step to be the last
 8208+ timers[i](true);
 8209+ }
 8210+
 8211+ timers.splice(i, 1);
 8212+ }
 8213+ }
 8214+ });
 8215+
 8216+ // start the next in the queue if the last step wasn't forced
 8217+ if ( !gotoEnd ) {
 8218+ this.dequeue();
 8219+ }
 8220+
 8221+ return this;
 8222+ }
 8223+
 8224+});
 8225+
 8226+// Animations created synchronously will run synchronously
 8227+function createFxNow() {
 8228+ setTimeout( clearFxNow, 0 );
 8229+ return ( fxNow = jQuery.now() );
 8230+}
 8231+
 8232+function clearFxNow() {
 8233+ fxNow = undefined;
 8234+}
 8235+
 8236+// Generate parameters to create a standard animation
 8237+function genFx( type, num ) {
 8238+ var obj = {};
 8239+
 8240+ jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
 8241+ obj[ this ] = type;
 8242+ });
 8243+
 8244+ return obj;
 8245+}
 8246+
 8247+// Generate shortcuts for custom animations
 8248+jQuery.each({
 8249+ slideDown: genFx("show", 1),
 8250+ slideUp: genFx("hide", 1),
 8251+ slideToggle: genFx("toggle", 1),
 8252+ fadeIn: { opacity: "show" },
 8253+ fadeOut: { opacity: "hide" },
 8254+ fadeToggle: { opacity: "toggle" }
 8255+}, function( name, props ) {
 8256+ jQuery.fn[ name ] = function( speed, easing, callback ) {
 8257+ return this.animate( props, speed, easing, callback );
 8258+ };
 8259+});
 8260+
 8261+jQuery.extend({
 8262+ speed: function( speed, easing, fn ) {
 8263+ var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
 8264+ complete: fn || !fn && easing ||
 8265+ jQuery.isFunction( speed ) && speed,
 8266+ duration: speed,
 8267+ easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
 8268+ };
 8269+
 8270+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
 8271+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default;
 8272+
 8273+ // Queueing
 8274+ opt.old = opt.complete;
 8275+ opt.complete = function( noUnmark ) {
 8276+ if ( opt.queue !== false ) {
 8277+ jQuery.dequeue( this );
 8278+ } else if ( noUnmark !== false ) {
 8279+ jQuery._unmark( this );
 8280+ }
 8281+
 8282+ if ( jQuery.isFunction( opt.old ) ) {
 8283+ opt.old.call( this );
 8284+ }
 8285+ };
 8286+
 8287+ return opt;
 8288+ },
 8289+
 8290+ easing: {
 8291+ linear: function( p, n, firstNum, diff ) {
 8292+ return firstNum + diff * p;
 8293+ },
 8294+ swing: function( p, n, firstNum, diff ) {
 8295+ return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
 8296+ }
 8297+ },
 8298+
 8299+ timers: [],
 8300+
 8301+ fx: function( elem, options, prop ) {
 8302+ this.options = options;
 8303+ this.elem = elem;
 8304+ this.prop = prop;
 8305+
 8306+ options.orig = options.orig || {};
 8307+ }
 8308+
 8309+});
 8310+
 8311+jQuery.fx.prototype = {
 8312+ // Simple function for setting a style value
 8313+ update: function() {
 8314+ if ( this.options.step ) {
 8315+ this.options.step.call( this.elem, this.now, this );
 8316+ }
 8317+
 8318+ (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
 8319+ },
 8320+
 8321+ // Get the current size
 8322+ cur: function() {
 8323+ if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
 8324+ return this.elem[ this.prop ];
 8325+ }
 8326+
 8327+ var parsed,
 8328+ r = jQuery.css( this.elem, this.prop );
 8329+ // Empty strings, null, undefined and "auto" are converted to 0,
 8330+ // complex values such as "rotate(1rad)" are returned as is,
 8331+ // simple values such as "10px" are parsed to Float.
 8332+ return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
 8333+ },
 8334+
 8335+ // Start an animation from one number to another
 8336+ custom: function( from, to, unit ) {
 8337+ var self = this,
 8338+ fx = jQuery.fx,
 8339+ raf;
 8340+
 8341+ this.startTime = fxNow || createFxNow();
 8342+ this.start = from;
 8343+ this.end = to;
 8344+ this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
 8345+ this.now = this.start;
 8346+ this.pos = this.state = 0;
 8347+
 8348+ function t( gotoEnd ) {
 8349+ return self.step(gotoEnd);
 8350+ }
 8351+
 8352+ t.elem = this.elem;
 8353+
 8354+ if ( t() && jQuery.timers.push(t) && !timerId ) {
 8355+ // Use requestAnimationFrame instead of setInterval if available
 8356+ if ( requestAnimationFrame ) {
 8357+ timerId = 1;
 8358+ raf = function() {
 8359+ // When timerId gets set to null at any point, this stops
 8360+ if ( timerId ) {
 8361+ requestAnimationFrame( raf );
 8362+ fx.tick();
 8363+ }
 8364+ };
 8365+ requestAnimationFrame( raf );
 8366+ } else {
 8367+ timerId = setInterval( fx.tick, fx.interval );
 8368+ }
 8369+ }
 8370+ },
 8371+
 8372+ // Simple 'show' function
 8373+ show: function() {
 8374+ // Remember where we started, so that we can go back to it later
 8375+ this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
 8376+ this.options.show = true;
 8377+
 8378+ // Begin the animation
 8379+ // Make sure that we start at a small width/height to avoid any
 8380+ // flash of content
 8381+ this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
 8382+
 8383+ // Start by showing the element
 8384+ jQuery( this.elem ).show();
 8385+ },
 8386+
 8387+ // Simple 'hide' function
 8388+ hide: function() {
 8389+ // Remember where we started, so that we can go back to it later
 8390+ this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
 8391+ this.options.hide = true;
 8392+
 8393+ // Begin the animation
 8394+ this.custom(this.cur(), 0);
 8395+ },
 8396+
 8397+ // Each step of an animation
 8398+ step: function( gotoEnd ) {
 8399+ var t = fxNow || createFxNow(),
 8400+ done = true,
 8401+ elem = this.elem,
 8402+ options = this.options,
 8403+ i, n;
 8404+
 8405+ if ( gotoEnd || t >= options.duration + this.startTime ) {
 8406+ this.now = this.end;
 8407+ this.pos = this.state = 1;
 8408+ this.update();
 8409+
 8410+ options.animatedProperties[ this.prop ] = true;
 8411+
 8412+ for ( i in options.animatedProperties ) {
 8413+ if ( options.animatedProperties[i] !== true ) {
 8414+ done = false;
 8415+ }
 8416+ }
 8417+
 8418+ if ( done ) {
 8419+ // Reset the overflow
 8420+ if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
 8421+
 8422+ jQuery.each( [ "", "X", "Y" ], function (index, value) {
 8423+ elem.style[ "overflow" + value ] = options.overflow[index];
 8424+ });
 8425+ }
 8426+
 8427+ // Hide the element if the "hide" operation was done
 8428+ if ( options.hide ) {
 8429+ jQuery(elem).hide();
 8430+ }
 8431+
 8432+ // Reset the properties, if the item has been hidden or shown
 8433+ if ( options.hide || options.show ) {
 8434+ for ( var p in options.animatedProperties ) {
 8435+ jQuery.style( elem, p, options.orig[p] );
 8436+ }
 8437+ }
 8438+
 8439+ // Execute the complete function
 8440+ options.complete.call( elem );
 8441+ }
 8442+
 8443+ return false;
 8444+
 8445+ } else {
 8446+ // classical easing cannot be used with an Infinity duration
 8447+ if ( options.duration == Infinity ) {
 8448+ this.now = t;
 8449+ } else {
 8450+ n = t - this.startTime;
 8451+ this.state = n / options.duration;
 8452+
 8453+ // Perform the easing function, defaults to swing
 8454+ this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration );
 8455+ this.now = this.start + ((this.end - this.start) * this.pos);
 8456+ }
 8457+ // Perform the next step of the animation
 8458+ this.update();
 8459+ }
 8460+
 8461+ return true;
 8462+ }
 8463+};
 8464+
 8465+jQuery.extend( jQuery.fx, {
 8466+ tick: function() {
 8467+ for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
 8468+ if ( !timers[i]() ) {
 8469+ timers.splice(i--, 1);
 8470+ }
 8471+ }
 8472+
 8473+ if ( !timers.length ) {
 8474+ jQuery.fx.stop();
 8475+ }
 8476+ },
 8477+
 8478+ interval: 13,
 8479+
 8480+ stop: function() {
 8481+ clearInterval( timerId );
 8482+ timerId = null;
 8483+ },
 8484+
 8485+ speeds: {
 8486+ slow: 600,
 8487+ fast: 200,
 8488+ // Default speed
 8489+ _default: 400
 8490+ },
 8491+
 8492+ step: {
 8493+ opacity: function( fx ) {
 8494+ jQuery.style( fx.elem, "opacity", fx.now );
 8495+ },
 8496+
 8497+ _default: function( fx ) {
 8498+ if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
 8499+ fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
 8500+ } else {
 8501+ fx.elem[ fx.prop ] = fx.now;
 8502+ }
 8503+ }
 8504+ }
 8505+});
 8506+
 8507+if ( jQuery.expr && jQuery.expr.filters ) {
 8508+ jQuery.expr.filters.animated = function( elem ) {
 8509+ return jQuery.grep(jQuery.timers, function( fn ) {
 8510+ return elem === fn.elem;
 8511+ }).length;
 8512+ };
 8513+}
 8514+
 8515+// Try to restore the default display value of an element
 8516+function defaultDisplay( nodeName ) {
 8517+
 8518+ if ( !elemdisplay[ nodeName ] ) {
 8519+
 8520+ var elem = jQuery( "<" + nodeName + ">" ).appendTo( "body" ),
 8521+ display = elem.css( "display" );
 8522+
 8523+ elem.remove();
 8524+
 8525+ // If the simple way fails,
 8526+ // get element's real default display by attaching it to a temp iframe
 8527+ if ( display === "none" || display === "" ) {
 8528+ // No iframe to use yet, so create it
 8529+ if ( !iframe ) {
 8530+ iframe = document.createElement( "iframe" );
 8531+ iframe.frameBorder = iframe.width = iframe.height = 0;
 8532+ }
 8533+
 8534+ document.body.appendChild( iframe );
 8535+
 8536+ // Create a cacheable copy of the iframe document on first call.
 8537+ // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake html
 8538+ // document to it, Webkit & Firefox won't allow reusing the iframe document
 8539+ if ( !iframeDoc || !iframe.createElement ) {
 8540+ iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
 8541+ iframeDoc.write( "<!doctype><html><body></body></html>" );
 8542+ }
 8543+
 8544+ elem = iframeDoc.createElement( nodeName );
 8545+
 8546+ iframeDoc.body.appendChild( elem );
 8547+
 8548+ display = jQuery.css( elem, "display" );
 8549+
 8550+ document.body.removeChild( iframe );
 8551+ }
 8552+
 8553+ // Store the correct default display
 8554+ elemdisplay[ nodeName ] = display;
 8555+ }
 8556+
 8557+ return elemdisplay[ nodeName ];
 8558+}
 8559+
 8560+
 8561+
 8562+
 8563+var rtable = /^t(?:able|d|h)$/i,
 8564+ rroot = /^(?:body|html)$/i;
 8565+
 8566+if ( "getBoundingClientRect" in document.documentElement ) {
 8567+ jQuery.fn.offset = function( options ) {
 8568+ var elem = this[0], box;
 8569+
 8570+ if ( options ) {
 8571+ return this.each(function( i ) {
 8572+ jQuery.offset.setOffset( this, options, i );
 8573+ });
 8574+ }
 8575+
 8576+ if ( !elem || !elem.ownerDocument ) {
 8577+ return null;
 8578+ }
 8579+
 8580+ if ( elem === elem.ownerDocument.body ) {
 8581+ return jQuery.offset.bodyOffset( elem );
 8582+ }
 8583+
 8584+ try {
 8585+ box = elem.getBoundingClientRect();
 8586+ } catch(e) {}
 8587+
 8588+ var doc = elem.ownerDocument,
 8589+ docElem = doc.documentElement;
 8590+
 8591+ // Make sure we're not dealing with a disconnected DOM node
 8592+ if ( !box || !jQuery.contains( docElem, elem ) ) {
 8593+ return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
 8594+ }
 8595+
 8596+ var body = doc.body,
 8597+ win = getWindow(doc),
 8598+ clientTop = docElem.clientTop || body.clientTop || 0,
 8599+ clientLeft = docElem.clientLeft || body.clientLeft || 0,
 8600+ scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
 8601+ scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
 8602+ top = box.top + scrollTop - clientTop,
 8603+ left = box.left + scrollLeft - clientLeft;
 8604+
 8605+ return { top: top, left: left };
 8606+ };
 8607+
 8608+} else {
 8609+ jQuery.fn.offset = function( options ) {
 8610+ var elem = this[0];
 8611+
 8612+ if ( options ) {
 8613+ return this.each(function( i ) {
 8614+ jQuery.offset.setOffset( this, options, i );
 8615+ });
 8616+ }
 8617+
 8618+ if ( !elem || !elem.ownerDocument ) {
 8619+ return null;
 8620+ }
 8621+
 8622+ if ( elem === elem.ownerDocument.body ) {
 8623+ return jQuery.offset.bodyOffset( elem );
 8624+ }
 8625+
 8626+ jQuery.offset.initialize();
 8627+
 8628+ var computedStyle,
 8629+ offsetParent = elem.offsetParent,
 8630+ prevOffsetParent = elem,
 8631+ doc = elem.ownerDocument,
 8632+ docElem = doc.documentElement,
 8633+ body = doc.body,
 8634+ defaultView = doc.defaultView,
 8635+ prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
 8636+ top = elem.offsetTop,
 8637+ left = elem.offsetLeft;
 8638+
 8639+ while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
 8640+ if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
 8641+ break;
 8642+ }
 8643+
 8644+ computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
 8645+ top -= elem.scrollTop;
 8646+ left -= elem.scrollLeft;
 8647+
 8648+ if ( elem === offsetParent ) {
 8649+ top += elem.offsetTop;
 8650+ left += elem.offsetLeft;
 8651+
 8652+ if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
 8653+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
 8654+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
 8655+ }
 8656+
 8657+ prevOffsetParent = offsetParent;
 8658+ offsetParent = elem.offsetParent;
 8659+ }
 8660+
 8661+ if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
 8662+ top += parseFloat( computedStyle.borderTopWidth ) || 0;
 8663+ left += parseFloat( computedStyle.borderLeftWidth ) || 0;
 8664+ }
 8665+
 8666+ prevComputedStyle = computedStyle;
 8667+ }
 8668+
 8669+ if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
 8670+ top += body.offsetTop;
 8671+ left += body.offsetLeft;
 8672+ }
 8673+
 8674+ if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
 8675+ top += Math.max( docElem.scrollTop, body.scrollTop );
 8676+ left += Math.max( docElem.scrollLeft, body.scrollLeft );
 8677+ }
 8678+
 8679+ return { top: top, left: left };
 8680+ };
 8681+}
 8682+
 8683+jQuery.offset = {
 8684+ initialize: function() {
 8685+ var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0,
 8686+ html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
 8687+
 8688+ jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
 8689+
 8690+ container.innerHTML = html;
 8691+ body.insertBefore( container, body.firstChild );
 8692+ innerDiv = container.firstChild;
 8693+ checkDiv = innerDiv.firstChild;
 8694+ td = innerDiv.nextSibling.firstChild.firstChild;
 8695+
 8696+ this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
 8697+ this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
 8698+
 8699+ checkDiv.style.position = "fixed";
 8700+ checkDiv.style.top = "20px";
 8701+
 8702+ // safari subtracts parent border width here which is 5px
 8703+ this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
 8704+ checkDiv.style.position = checkDiv.style.top = "";
 8705+
 8706+ innerDiv.style.overflow = "hidden";
 8707+ innerDiv.style.position = "relative";
 8708+
 8709+ this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
 8710+
 8711+ this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
 8712+
 8713+ body.removeChild( container );
 8714+ jQuery.offset.initialize = jQuery.noop;
 8715+ },
 8716+
 8717+ bodyOffset: function( body ) {
 8718+ var top = body.offsetTop,
 8719+ left = body.offsetLeft;
 8720+
 8721+ jQuery.offset.initialize();
 8722+
 8723+ if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
 8724+ top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
 8725+ left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
 8726+ }
 8727+
 8728+ return { top: top, left: left };
 8729+ },
 8730+
 8731+ setOffset: function( elem, options, i ) {
 8732+ var position = jQuery.css( elem, "position" );
 8733+
 8734+ // set position first, in-case top/left are set even on static elem
 8735+ if ( position === "static" ) {
 8736+ elem.style.position = "relative";
 8737+ }
 8738+
 8739+ var curElem = jQuery( elem ),
 8740+ curOffset = curElem.offset(),
 8741+ curCSSTop = jQuery.css( elem, "top" ),
 8742+ curCSSLeft = jQuery.css( elem, "left" ),
 8743+ calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
 8744+ props = {}, curPosition = {}, curTop, curLeft;
 8745+
 8746+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
 8747+ if ( calculatePosition ) {
 8748+ curPosition = curElem.position();
 8749+ curTop = curPosition.top;
 8750+ curLeft = curPosition.left;
 8751+ } else {
 8752+ curTop = parseFloat( curCSSTop ) || 0;
 8753+ curLeft = parseFloat( curCSSLeft ) || 0;
 8754+ }
 8755+
 8756+ if ( jQuery.isFunction( options ) ) {
 8757+ options = options.call( elem, i, curOffset );
 8758+ }
 8759+
 8760+ if (options.top != null) {
 8761+ props.top = (options.top - curOffset.top) + curTop;
 8762+ }
 8763+ if (options.left != null) {
 8764+ props.left = (options.left - curOffset.left) + curLeft;
 8765+ }
 8766+
 8767+ if ( "using" in options ) {
 8768+ options.using.call( elem, props );
 8769+ } else {
 8770+ curElem.css( props );
 8771+ }
 8772+ }
 8773+};
 8774+
 8775+
 8776+jQuery.fn.extend({
 8777+ position: function() {
 8778+ if ( !this[0] ) {
 8779+ return null;
 8780+ }
 8781+
 8782+ var elem = this[0],
 8783+
 8784+ // Get *real* offsetParent
 8785+ offsetParent = this.offsetParent(),
 8786+
 8787+ // Get correct offsets
 8788+ offset = this.offset(),
 8789+ parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
 8790+
 8791+ // Subtract element margins
 8792+ // note: when an element has margin: auto the offsetLeft and marginLeft
 8793+ // are the same in Safari causing offset.left to incorrectly be 0
 8794+ offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
 8795+ offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
 8796+
 8797+ // Add offsetParent borders
 8798+ parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
 8799+ parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
 8800+
 8801+ // Subtract the two offsets
 8802+ return {
 8803+ top: offset.top - parentOffset.top,
 8804+ left: offset.left - parentOffset.left
 8805+ };
 8806+ },
 8807+
 8808+ offsetParent: function() {
 8809+ return this.map(function() {
 8810+ var offsetParent = this.offsetParent || document.body;
 8811+ while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
 8812+ offsetParent = offsetParent.offsetParent;
 8813+ }
 8814+ return offsetParent;
 8815+ });
 8816+ }
 8817+});
 8818+
 8819+
 8820+// Create scrollLeft and scrollTop methods
 8821+jQuery.each( ["Left", "Top"], function( i, name ) {
 8822+ var method = "scroll" + name;
 8823+
 8824+ jQuery.fn[ method ] = function( val ) {
 8825+ var elem, win;
 8826+
 8827+ if ( val === undefined ) {
 8828+ elem = this[ 0 ];
 8829+
 8830+ if ( !elem ) {
 8831+ return null;
 8832+ }
 8833+
 8834+ win = getWindow( elem );
 8835+
 8836+ // Return the scroll offset
 8837+ return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
 8838+ jQuery.support.boxModel && win.document.documentElement[ method ] ||
 8839+ win.document.body[ method ] :
 8840+ elem[ method ];
 8841+ }
 8842+
 8843+ // Set the scroll offset
 8844+ return this.each(function() {
 8845+ win = getWindow( this );
 8846+
 8847+ if ( win ) {
 8848+ win.scrollTo(
 8849+ !i ? val : jQuery( win ).scrollLeft(),
 8850+ i ? val : jQuery( win ).scrollTop()
 8851+ );
 8852+
 8853+ } else {
 8854+ this[ method ] = val;
 8855+ }
 8856+ });
 8857+ };
 8858+});
 8859+
 8860+function getWindow( elem ) {
 8861+ return jQuery.isWindow( elem ) ?
 8862+ elem :
 8863+ elem.nodeType === 9 ?
 8864+ elem.defaultView || elem.parentWindow :
 8865+ false;
 8866+}
 8867+
 8868+
 8869+
 8870+
 8871+// Create innerHeight, innerWidth, outerHeight and outerWidth methods
 8872+jQuery.each([ "Height", "Width" ], function( i, name ) {
 8873+
 8874+ var type = name.toLowerCase();
 8875+
 8876+ // innerHeight and innerWidth
 8877+ jQuery.fn["inner" + name] = function() {
 8878+ return this[0] ?
 8879+ parseFloat( jQuery.css( this[0], type, "padding" ) ) :
 8880+ null;
 8881+ };
 8882+
 8883+ // outerHeight and outerWidth
 8884+ jQuery.fn["outer" + name] = function( margin ) {
 8885+ return this[0] ?
 8886+ parseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :
 8887+ null;
 8888+ };
 8889+
 8890+ jQuery.fn[ type ] = function( size ) {
 8891+ // Get window width or height
 8892+ var elem = this[0];
 8893+ if ( !elem ) {
 8894+ return size == null ? null : this;
 8895+ }
 8896+
 8897+ if ( jQuery.isFunction( size ) ) {
 8898+ return this.each(function( i ) {
 8899+ var self = jQuery( this );
 8900+ self[ type ]( size.call( this, i, self[ type ]() ) );
 8901+ });
 8902+ }
 8903+
 8904+ if ( jQuery.isWindow( elem ) ) {
 8905+ // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
 8906+ // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
 8907+ var docElemProp = elem.document.documentElement[ "client" + name ];
 8908+ return elem.document.compatMode === "CSS1Compat" && docElemProp ||
 8909+ elem.document.body[ "client" + name ] || docElemProp;
 8910+
 8911+ // Get document width or height
 8912+ } else if ( elem.nodeType === 9 ) {
 8913+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
 8914+ return Math.max(
 8915+ elem.documentElement["client" + name],
 8916+ elem.body["scroll" + name], elem.documentElement["scroll" + name],
 8917+ elem.body["offset" + name], elem.documentElement["offset" + name]
 8918+ );
 8919+
 8920+ // Get or set width or height on the element
 8921+ } else if ( size === undefined ) {
 8922+ var orig = jQuery.css( elem, type ),
 8923+ ret = parseFloat( orig );
 8924+
 8925+ return jQuery.isNaN( ret ) ? orig : ret;
 8926+
 8927+ // Set the width or height on the element (default to pixels if value is unitless)
 8928+ } else {
 8929+ return this.css( type, typeof size === "string" ? size : size + "px" );
 8930+ }
 8931+ };
 8932+
 8933+});
 8934+
 8935+
 8936+window.jQuery = window.$ = jQuery;
 8937+})(window);
Property changes on: trunk/parsers/wikidom/lib/jquery.js
___________________________________________________________________
Added: svn:mime-type
18938 + text/plain
Added: svn:eol-style
28939 + native
Index: trunk/parsers/wikidom/lib/qunit.js
@@ -0,0 +1,1448 @@
 2+/**
 3+ * QUnit - A JavaScript Unit Testing Framework
 4+ *
 5+ * http://docs.jquery.com/QUnit
 6+ *
 7+ * Copyright (c) 2011 John Resig, Jörn Zaefferer
 8+ * Dual licensed under the MIT (MIT-LICENSE.txt)
 9+ * or GPL (GPL-LICENSE.txt) licenses.
 10+ */
 11+
 12+(function(window) {
 13+
 14+var defined = {
 15+ setTimeout: typeof window.setTimeout !== "undefined",
 16+ sessionStorage: (function() {
 17+ try {
 18+ return !!sessionStorage.getItem;
 19+ } catch(e){
 20+ return false;
 21+ }
 22+ })()
 23+};
 24+
 25+var testId = 0;
 26+
 27+var Test = function(name, testName, expected, testEnvironmentArg, async, callback) {
 28+ this.name = name;
 29+ this.testName = testName;
 30+ this.expected = expected;
 31+ this.testEnvironmentArg = testEnvironmentArg;
 32+ this.async = async;
 33+ this.callback = callback;
 34+ this.assertions = [];
 35+};
 36+Test.prototype = {
 37+ init: function() {
 38+ var tests = id("qunit-tests");
 39+ if (tests) {
 40+ var b = document.createElement("strong");
 41+ b.innerHTML = "Running " + this.name;
 42+ var li = document.createElement("li");
 43+ li.appendChild( b );
 44+ li.className = "running";
 45+ li.id = this.id = "test-output" + testId++;
 46+ tests.appendChild( li );
 47+ }
 48+ },
 49+ setup: function() {
 50+ if (this.module != config.previousModule) {
 51+ if ( config.previousModule ) {
 52+ QUnit.moduleDone( {
 53+ name: config.previousModule,
 54+ failed: config.moduleStats.bad,
 55+ passed: config.moduleStats.all - config.moduleStats.bad,
 56+ total: config.moduleStats.all
 57+ } );
 58+ }
 59+ config.previousModule = this.module;
 60+ config.moduleStats = { all: 0, bad: 0 };
 61+ QUnit.moduleStart( {
 62+ name: this.module
 63+ } );
 64+ }
 65+
 66+ config.current = this;
 67+ this.testEnvironment = extend({
 68+ setup: function() {},
 69+ teardown: function() {}
 70+ }, this.moduleTestEnvironment);
 71+ if (this.testEnvironmentArg) {
 72+ extend(this.testEnvironment, this.testEnvironmentArg);
 73+ }
 74+
 75+ QUnit.testStart( {
 76+ name: this.testName
 77+ } );
 78+
 79+ // allow utility functions to access the current test environment
 80+ // TODO why??
 81+ QUnit.current_testEnvironment = this.testEnvironment;
 82+
 83+ try {
 84+ if ( !config.pollution ) {
 85+ saveGlobal();
 86+ }
 87+
 88+ this.testEnvironment.setup.call(this.testEnvironment);
 89+ } catch(e) {
 90+ QUnit.ok( false, "Setup failed on " + this.testName + ": " + e.message );
 91+ }
 92+ },
 93+ run: function() {
 94+ if ( this.async ) {
 95+ QUnit.stop();
 96+ }
 97+
 98+ if ( config.notrycatch ) {
 99+ this.callback.call(this.testEnvironment);
 100+ return;
 101+ }
 102+ try {
 103+ this.callback.call(this.testEnvironment);
 104+ } catch(e) {
 105+ fail("Test " + this.testName + " died, exception and test follows", e, this.callback);
 106+ QUnit.ok( false, "Died on test #" + (this.assertions.length + 1) + ": " + e.message + " - " + QUnit.jsDump.parse(e) );
 107+ // else next test will carry the responsibility
 108+ saveGlobal();
 109+
 110+ // Restart the tests if they're blocking
 111+ if ( config.blocking ) {
 112+ start();
 113+ }
 114+ }
 115+ },
 116+ teardown: function() {
 117+ try {
 118+ this.testEnvironment.teardown.call(this.testEnvironment);
 119+ checkPollution();
 120+ } catch(e) {
 121+ QUnit.ok( false, "Teardown failed on " + this.testName + ": " + e.message );
 122+ }
 123+ },
 124+ finish: function() {
 125+ if ( this.expected && this.expected != this.assertions.length ) {
 126+ QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" );
 127+ }
 128+
 129+ var good = 0, bad = 0,
 130+ tests = id("qunit-tests");
 131+
 132+ config.stats.all += this.assertions.length;
 133+ config.moduleStats.all += this.assertions.length;
 134+
 135+ if ( tests ) {
 136+ var ol = document.createElement("ol");
 137+
 138+ for ( var i = 0; i < this.assertions.length; i++ ) {
 139+ var assertion = this.assertions[i];
 140+
 141+ var li = document.createElement("li");
 142+ li.className = assertion.result ? "pass" : "fail";
 143+ li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed");
 144+ ol.appendChild( li );
 145+
 146+ if ( assertion.result ) {
 147+ good++;
 148+ } else {
 149+ bad++;
 150+ config.stats.bad++;
 151+ config.moduleStats.bad++;
 152+ }
 153+ }
 154+
 155+ // store result when possible
 156+ if ( QUnit.config.reorder && defined.sessionStorage ) {
 157+ if (bad) {
 158+ sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad);
 159+ } else {
 160+ sessionStorage.removeItem("qunit-" + this.module + "-" + this.testName);
 161+ }
 162+ }
 163+
 164+ if (bad == 0) {
 165+ ol.style.display = "none";
 166+ }
 167+
 168+ var b = document.createElement("strong");
 169+ b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
 170+
 171+ var a = document.createElement("a");
 172+ a.innerHTML = "Rerun";
 173+ a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") });
 174+
 175+ addEvent(b, "click", function() {
 176+ var next = b.nextSibling.nextSibling,
 177+ display = next.style.display;
 178+ next.style.display = display === "none" ? "block" : "none";
 179+ });
 180+
 181+ addEvent(b, "dblclick", function(e) {
 182+ var target = e && e.target ? e.target : window.event.srcElement;
 183+ if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
 184+ target = target.parentNode;
 185+ }
 186+ if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
 187+ window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") });
 188+ }
 189+ });
 190+
 191+ var li = id(this.id);
 192+ li.className = bad ? "fail" : "pass";
 193+ li.removeChild( li.firstChild );
 194+ li.appendChild( b );
 195+ li.appendChild( a );
 196+ li.appendChild( ol );
 197+
 198+ } else {
 199+ for ( var i = 0; i < this.assertions.length; i++ ) {
 200+ if ( !this.assertions[i].result ) {
 201+ bad++;
 202+ config.stats.bad++;
 203+ config.moduleStats.bad++;
 204+ }
 205+ }
 206+ }
 207+
 208+ try {
 209+ QUnit.reset();
 210+ } catch(e) {
 211+ fail("reset() failed, following Test " + this.testName + ", exception and reset fn follows", e, QUnit.reset);
 212+ }
 213+
 214+ QUnit.testDone( {
 215+ name: this.testName,
 216+ failed: bad,
 217+ passed: this.assertions.length - bad,
 218+ total: this.assertions.length
 219+ } );
 220+ },
 221+
 222+ queue: function() {
 223+ var test = this;
 224+ synchronize(function() {
 225+ test.init();
 226+ });
 227+ function run() {
 228+ // each of these can by async
 229+ synchronize(function() {
 230+ test.setup();
 231+ });
 232+ synchronize(function() {
 233+ test.run();
 234+ });
 235+ synchronize(function() {
 236+ test.teardown();
 237+ });
 238+ synchronize(function() {
 239+ test.finish();
 240+ });
 241+ }
 242+ // defer when previous test run passed, if storage is available
 243+ var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.module + "-" + this.testName);
 244+ if (bad) {
 245+ run();
 246+ } else {
 247+ synchronize(run);
 248+ };
 249+ }
 250+
 251+};
 252+
 253+var QUnit = {
 254+
 255+ // call on start of module test to prepend name to all tests
 256+ module: function(name, testEnvironment) {
 257+ config.currentModule = name;
 258+ config.currentModuleTestEnviroment = testEnvironment;
 259+ },
 260+
 261+ asyncTest: function(testName, expected, callback) {
 262+ if ( arguments.length === 2 ) {
 263+ callback = expected;
 264+ expected = 0;
 265+ }
 266+
 267+ QUnit.test(testName, expected, callback, true);
 268+ },
 269+
 270+ test: function(testName, expected, callback, async) {
 271+ var name = '<span class="test-name">' + testName + '</span>', testEnvironmentArg;
 272+
 273+ if ( arguments.length === 2 ) {
 274+ callback = expected;
 275+ expected = null;
 276+ }
 277+ // is 2nd argument a testEnvironment?
 278+ if ( expected && typeof expected === 'object') {
 279+ testEnvironmentArg = expected;
 280+ expected = null;
 281+ }
 282+
 283+ if ( config.currentModule ) {
 284+ name = '<span class="module-name">' + config.currentModule + "</span>: " + name;
 285+ }
 286+
 287+ if ( !validTest(config.currentModule + ": " + testName) ) {
 288+ return;
 289+ }
 290+
 291+ var test = new Test(name, testName, expected, testEnvironmentArg, async, callback);
 292+ test.module = config.currentModule;
 293+ test.moduleTestEnvironment = config.currentModuleTestEnviroment;
 294+ test.queue();
 295+ },
 296+
 297+ /**
 298+ * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
 299+ */
 300+ expect: function(asserts) {
 301+ config.current.expected = asserts;
 302+ },
 303+
 304+ /**
 305+ * Asserts true.
 306+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
 307+ */
 308+ ok: function(a, msg) {
 309+ a = !!a;
 310+ var details = {
 311+ result: a,
 312+ message: msg
 313+ };
 314+ msg = escapeHtml(msg);
 315+ QUnit.log(details);
 316+ config.current.assertions.push({
 317+ result: a,
 318+ message: msg
 319+ });
 320+ },
 321+
 322+ /**
 323+ * Checks that the first two arguments are equal, with an optional message.
 324+ * Prints out both actual and expected values.
 325+ *
 326+ * Prefered to ok( actual == expected, message )
 327+ *
 328+ * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." );
 329+ *
 330+ * @param Object actual
 331+ * @param Object expected
 332+ * @param String message (optional)
 333+ */
 334+ equal: function(actual, expected, message) {
 335+ QUnit.push(expected == actual, actual, expected, message);
 336+ },
 337+
 338+ notEqual: function(actual, expected, message) {
 339+ QUnit.push(expected != actual, actual, expected, message);
 340+ },
 341+
 342+ deepEqual: function(actual, expected, message) {
 343+ QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
 344+ },
 345+
 346+ notDeepEqual: function(actual, expected, message) {
 347+ QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message);
 348+ },
 349+
 350+ strictEqual: function(actual, expected, message) {
 351+ QUnit.push(expected === actual, actual, expected, message);
 352+ },
 353+
 354+ notStrictEqual: function(actual, expected, message) {
 355+ QUnit.push(expected !== actual, actual, expected, message);
 356+ },
 357+
 358+ raises: function(block, expected, message) {
 359+ var actual, ok = false;
 360+
 361+ if (typeof expected === 'string') {
 362+ message = expected;
 363+ expected = null;
 364+ }
 365+
 366+ try {
 367+ block();
 368+ } catch (e) {
 369+ actual = e;
 370+ }
 371+
 372+ if (actual) {
 373+ // we don't want to validate thrown error
 374+ if (!expected) {
 375+ ok = true;
 376+ // expected is a regexp
 377+ } else if (QUnit.objectType(expected) === "regexp") {
 378+ ok = expected.test(actual);
 379+ // expected is a constructor
 380+ } else if (actual instanceof expected) {
 381+ ok = true;
 382+ // expected is a validation function which returns true is validation passed
 383+ } else if (expected.call({}, actual) === true) {
 384+ ok = true;
 385+ }
 386+ }
 387+
 388+ QUnit.ok(ok, message);
 389+ },
 390+
 391+ start: function() {
 392+ config.semaphore--;
 393+ if (config.semaphore > 0) {
 394+ // don't start until equal number of stop-calls
 395+ return;
 396+ }
 397+ if (config.semaphore < 0) {
 398+ // ignore if start is called more often then stop
 399+ config.semaphore = 0;
 400+ }
 401+ // A slight delay, to avoid any current callbacks
 402+ if ( defined.setTimeout ) {
 403+ window.setTimeout(function() {
 404+ if ( config.timeout ) {
 405+ clearTimeout(config.timeout);
 406+ }
 407+
 408+ config.blocking = false;
 409+ process();
 410+ }, 13);
 411+ } else {
 412+ config.blocking = false;
 413+ process();
 414+ }
 415+ },
 416+
 417+ stop: function(timeout) {
 418+ config.semaphore++;
 419+ config.blocking = true;
 420+
 421+ if ( timeout && defined.setTimeout ) {
 422+ clearTimeout(config.timeout);
 423+ config.timeout = window.setTimeout(function() {
 424+ QUnit.ok( false, "Test timed out" );
 425+ QUnit.start();
 426+ }, timeout);
 427+ }
 428+ }
 429+};
 430+
 431+// Backwards compatibility, deprecated
 432+QUnit.equals = QUnit.equal;
 433+QUnit.same = QUnit.deepEqual;
 434+
 435+// Maintain internal state
 436+var config = {
 437+ // The queue of tests to run
 438+ queue: [],
 439+
 440+ // block until document ready
 441+ blocking: true,
 442+
 443+ // by default, run previously failed tests first
 444+ // very useful in combination with "Hide passed tests" checked
 445+ reorder: true,
 446+
 447+ noglobals: false,
 448+ notrycatch: false
 449+};
 450+
 451+// Load paramaters
 452+(function() {
 453+ var location = window.location || { search: "", protocol: "file:" },
 454+ params = location.search.slice( 1 ).split( "&" ),
 455+ length = params.length,
 456+ urlParams = {},
 457+ current;
 458+
 459+ if ( params[ 0 ] ) {
 460+ for ( var i = 0; i < length; i++ ) {
 461+ current = params[ i ].split( "=" );
 462+ current[ 0 ] = decodeURIComponent( current[ 0 ] );
 463+ // allow just a key to turn on a flag, e.g., test.html?noglobals
 464+ current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
 465+ urlParams[ current[ 0 ] ] = current[ 1 ];
 466+ if ( current[ 0 ] in config ) {
 467+ config[ current[ 0 ] ] = current[ 1 ];
 468+ }
 469+ }
 470+ }
 471+
 472+ QUnit.urlParams = urlParams;
 473+ config.filter = urlParams.filter;
 474+
 475+ // Figure out if we're running the tests from a server or not
 476+ QUnit.isLocal = !!(location.protocol === 'file:');
 477+})();
 478+
 479+// Expose the API as global variables, unless an 'exports'
 480+// object exists, in that case we assume we're in CommonJS
 481+if ( typeof exports === "undefined" || typeof require === "undefined" ) {
 482+ extend(window, QUnit);
 483+ window.QUnit = QUnit;
 484+} else {
 485+ extend(exports, QUnit);
 486+ exports.QUnit = QUnit;
 487+}
 488+
 489+// define these after exposing globals to keep them in these QUnit namespace only
 490+extend(QUnit, {
 491+ config: config,
 492+
 493+ // Initialize the configuration options
 494+ init: function() {
 495+ extend(config, {
 496+ stats: { all: 0, bad: 0 },
 497+ moduleStats: { all: 0, bad: 0 },
 498+ started: +new Date,
 499+ updateRate: 1000,
 500+ blocking: false,
 501+ autostart: true,
 502+ autorun: false,
 503+ filter: "",
 504+ queue: [],
 505+ semaphore: 0
 506+ });
 507+
 508+ var tests = id( "qunit-tests" ),
 509+ banner = id( "qunit-banner" ),
 510+ result = id( "qunit-testresult" );
 511+
 512+ if ( tests ) {
 513+ tests.innerHTML = "";
 514+ }
 515+
 516+ if ( banner ) {
 517+ banner.className = "";
 518+ }
 519+
 520+ if ( result ) {
 521+ result.parentNode.removeChild( result );
 522+ }
 523+
 524+ if ( tests ) {
 525+ result = document.createElement( "p" );
 526+ result.id = "qunit-testresult";
 527+ result.className = "result";
 528+ tests.parentNode.insertBefore( result, tests );
 529+ result.innerHTML = 'Running...<br/>&nbsp;';
 530+ }
 531+ },
 532+
 533+ /**
 534+ * Resets the test setup. Useful for tests that modify the DOM.
 535+ *
 536+ * If jQuery is available, uses jQuery's html(), otherwise just innerHTML.
 537+ */
 538+ reset: function() {
 539+ if ( window.jQuery ) {
 540+ jQuery( "#qunit-fixture" ).html( config.fixture );
 541+ } else {
 542+ var main = id( 'qunit-fixture' );
 543+ if ( main ) {
 544+ main.innerHTML = config.fixture;
 545+ }
 546+ }
 547+ },
 548+
 549+ /**
 550+ * Trigger an event on an element.
 551+ *
 552+ * @example triggerEvent( document.body, "click" );
 553+ *
 554+ * @param DOMElement elem
 555+ * @param String type
 556+ */
 557+ triggerEvent: function( elem, type, event ) {
 558+ if ( document.createEvent ) {
 559+ event = document.createEvent("MouseEvents");
 560+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
 561+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
 562+ elem.dispatchEvent( event );
 563+
 564+ } else if ( elem.fireEvent ) {
 565+ elem.fireEvent("on"+type);
 566+ }
 567+ },
 568+
 569+ // Safe object type checking
 570+ is: function( type, obj ) {
 571+ return QUnit.objectType( obj ) == type;
 572+ },
 573+
 574+ objectType: function( obj ) {
 575+ if (typeof obj === "undefined") {
 576+ return "undefined";
 577+
 578+ // consider: typeof null === object
 579+ }
 580+ if (obj === null) {
 581+ return "null";
 582+ }
 583+
 584+ var type = Object.prototype.toString.call( obj )
 585+ .match(/^\[object\s(.*)\]$/)[1] || '';
 586+
 587+ switch (type) {
 588+ case 'Number':
 589+ if (isNaN(obj)) {
 590+ return "nan";
 591+ } else {
 592+ return "number";
 593+ }
 594+ case 'String':
 595+ case 'Boolean':
 596+ case 'Array':
 597+ case 'Date':
 598+ case 'RegExp':
 599+ case 'Function':
 600+ return type.toLowerCase();
 601+ }
 602+ if (typeof obj === "object") {
 603+ return "object";
 604+ }
 605+ return undefined;
 606+ },
 607+
 608+ push: function(result, actual, expected, message) {
 609+ var details = {
 610+ result: result,
 611+ message: message,
 612+ actual: actual,
 613+ expected: expected
 614+ };
 615+
 616+ message = escapeHtml(message) || (result ? "okay" : "failed");
 617+ message = '<span class="test-message">' + message + "</span>";
 618+ expected = escapeHtml(QUnit.jsDump.parse(expected));
 619+ actual = escapeHtml(QUnit.jsDump.parse(actual));
 620+ var output = message + '<table><tr class="test-expected"><th>Expected: </th><td><pre>' + expected + '</pre></td></tr>';
 621+ if (actual != expected) {
 622+ output += '<tr class="test-actual"><th>Result: </th><td><pre>' + actual + '</pre></td></tr>';
 623+ output += '<tr class="test-diff"><th>Diff: </th><td><pre>' + QUnit.diff(expected, actual) +'</pre></td></tr>';
 624+ }
 625+ if (!result) {
 626+ var source = sourceFromStacktrace();
 627+ if (source) {
 628+ details.source = source;
 629+ output += '<tr class="test-source"><th>Source: </th><td><pre>' + source +'</pre></td></tr>';
 630+ }
 631+ }
 632+ output += "</table>";
 633+
 634+ QUnit.log(details);
 635+
 636+ config.current.assertions.push({
 637+ result: !!result,
 638+ message: output
 639+ });
 640+ },
 641+
 642+ url: function( params ) {
 643+ params = extend( extend( {}, QUnit.urlParams ), params );
 644+ var querystring = "?",
 645+ key;
 646+ for ( key in params ) {
 647+ querystring += encodeURIComponent( key ) + "=" +
 648+ encodeURIComponent( params[ key ] ) + "&";
 649+ }
 650+ return window.location.pathname + querystring.slice( 0, -1 );
 651+ },
 652+
 653+ // Logging callbacks; all receive a single argument with the listed properties
 654+ // run test/logs.html for any related changes
 655+ begin: function() {},
 656+ // done: { failed, passed, total, runtime }
 657+ done: function() {},
 658+ // log: { result, actual, expected, message }
 659+ log: function() {},
 660+ // testStart: { name }
 661+ testStart: function() {},
 662+ // testDone: { name, failed, passed, total }
 663+ testDone: function() {},
 664+ // moduleStart: { name }
 665+ moduleStart: function() {},
 666+ // moduleDone: { name, failed, passed, total }
 667+ moduleDone: function() {}
 668+});
 669+
 670+if ( typeof document === "undefined" || document.readyState === "complete" ) {
 671+ config.autorun = true;
 672+}
 673+
 674+addEvent(window, "load", function() {
 675+ QUnit.begin({});
 676+
 677+ // Initialize the config, saving the execution queue
 678+ var oldconfig = extend({}, config);
 679+ QUnit.init();
 680+ extend(config, oldconfig);
 681+
 682+ config.blocking = false;
 683+
 684+ var userAgent = id("qunit-userAgent");
 685+ if ( userAgent ) {
 686+ userAgent.innerHTML = navigator.userAgent;
 687+ }
 688+ var banner = id("qunit-header");
 689+ if ( banner ) {
 690+ banner.innerHTML = '<a href="' + QUnit.url({ filter: undefined }) + '"> ' + banner.innerHTML + '</a> ' +
 691+ '<label><input name="noglobals" type="checkbox"' + ( config.noglobals ? ' checked="checked"' : '' ) + '>noglobals</label>' +
 692+ '<label><input name="notrycatch" type="checkbox"' + ( config.notrycatch ? ' checked="checked"' : '' ) + '>notrycatch</label>';
 693+ addEvent( banner, "change", function( event ) {
 694+ var params = {};
 695+ params[ event.target.name ] = event.target.checked ? true : undefined;
 696+ window.location = QUnit.url( params );
 697+ });
 698+ }
 699+
 700+ var toolbar = id("qunit-testrunner-toolbar");
 701+ if ( toolbar ) {
 702+ var filter = document.createElement("input");
 703+ filter.type = "checkbox";
 704+ filter.id = "qunit-filter-pass";
 705+ addEvent( filter, "click", function() {
 706+ var ol = document.getElementById("qunit-tests");
 707+ if ( filter.checked ) {
 708+ ol.className = ol.className + " hidepass";
 709+ } else {
 710+ var tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " ";
 711+ ol.className = tmp.replace(/ hidepass /, " ");
 712+ }
 713+ if ( defined.sessionStorage ) {
 714+ if (filter.checked) {
 715+ sessionStorage.setItem("qunit-filter-passed-tests", "true");
 716+ } else {
 717+ sessionStorage.removeItem("qunit-filter-passed-tests");
 718+ }
 719+ }
 720+ });
 721+ if ( defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests") ) {
 722+ filter.checked = true;
 723+ var ol = document.getElementById("qunit-tests");
 724+ ol.className = ol.className + " hidepass";
 725+ }
 726+ toolbar.appendChild( filter );
 727+
 728+ var label = document.createElement("label");
 729+ label.setAttribute("for", "qunit-filter-pass");
 730+ label.innerHTML = "Hide passed tests";
 731+ toolbar.appendChild( label );
 732+ }
 733+
 734+ var main = id('qunit-fixture');
 735+ if ( main ) {
 736+ config.fixture = main.innerHTML;
 737+ }
 738+
 739+ if (config.autostart) {
 740+ QUnit.start();
 741+ }
 742+});
 743+
 744+function done() {
 745+ config.autorun = true;
 746+
 747+ // Log the last module results
 748+ if ( config.currentModule ) {
 749+ QUnit.moduleDone( {
 750+ name: config.currentModule,
 751+ failed: config.moduleStats.bad,
 752+ passed: config.moduleStats.all - config.moduleStats.bad,
 753+ total: config.moduleStats.all
 754+ } );
 755+ }
 756+
 757+ var banner = id("qunit-banner"),
 758+ tests = id("qunit-tests"),
 759+ runtime = +new Date - config.started,
 760+ passed = config.stats.all - config.stats.bad,
 761+ html = [
 762+ 'Tests completed in ',
 763+ runtime,
 764+ ' milliseconds.<br/>',
 765+ '<span class="passed">',
 766+ passed,
 767+ '</span> tests of <span class="total">',
 768+ config.stats.all,
 769+ '</span> passed, <span class="failed">',
 770+ config.stats.bad,
 771+ '</span> failed.'
 772+ ].join('');
 773+
 774+ if ( banner ) {
 775+ banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass");
 776+ }
 777+
 778+ if ( tests ) {
 779+ id( "qunit-testresult" ).innerHTML = html;
 780+ }
 781+
 782+ if ( typeof document !== "undefined" && document.title ) {
 783+ // show ✖ for good, ✔ for bad suite result in title
 784+ // use escape sequences in case file gets loaded with non-utf-8-charset
 785+ document.title = (config.stats.bad ? "\u2716" : "\u2714") + " " + document.title;
 786+ }
 787+
 788+ QUnit.done( {
 789+ failed: config.stats.bad,
 790+ passed: passed,
 791+ total: config.stats.all,
 792+ runtime: runtime
 793+ } );
 794+}
 795+
 796+function validTest( name ) {
 797+ var filter = config.filter,
 798+ run = false;
 799+
 800+ if ( !filter ) {
 801+ return true;
 802+ }
 803+
 804+ var not = filter.charAt( 0 ) === "!";
 805+ if ( not ) {
 806+ filter = filter.slice( 1 );
 807+ }
 808+
 809+ if ( name.indexOf( filter ) !== -1 ) {
 810+ return !not;
 811+ }
 812+
 813+ if ( not ) {
 814+ run = true;
 815+ }
 816+
 817+ return run;
 818+}
 819+
 820+// so far supports only Firefox, Chrome and Opera (buggy)
 821+// could be extended in the future to use something like https://github.com/csnover/TraceKit
 822+function sourceFromStacktrace() {
 823+ try {
 824+ throw new Error();
 825+ } catch ( e ) {
 826+ if (e.stacktrace) {
 827+ // Opera
 828+ return e.stacktrace.split("\n")[6];
 829+ } else if (e.stack) {
 830+ // Firefox, Chrome
 831+ return e.stack.split("\n")[4];
 832+ }
 833+ }
 834+}
 835+
 836+function escapeHtml(s) {
 837+ if (!s) {
 838+ return "";
 839+ }
 840+ s = s + "";
 841+ return s.replace(/[\&"<>\\]/g, function(s) {
 842+ switch(s) {
 843+ case "&": return "&amp;";
 844+ case "\\": return "\\\\";
 845+ case '"': return '\"';
 846+ case "<": return "&lt;";
 847+ case ">": return "&gt;";
 848+ default: return s;
 849+ }
 850+ });
 851+}
 852+
 853+function synchronize( callback ) {
 854+ config.queue.push( callback );
 855+
 856+ if ( config.autorun && !config.blocking ) {
 857+ process();
 858+ }
 859+}
 860+
 861+function process() {
 862+ var start = (new Date()).getTime();
 863+
 864+ while ( config.queue.length && !config.blocking ) {
 865+ if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) {
 866+ config.queue.shift()();
 867+ } else {
 868+ window.setTimeout( process, 13 );
 869+ break;
 870+ }
 871+ }
 872+ if (!config.blocking && !config.queue.length) {
 873+ done();
 874+ }
 875+}
 876+
 877+function saveGlobal() {
 878+ config.pollution = [];
 879+
 880+ if ( config.noglobals ) {
 881+ for ( var key in window ) {
 882+ config.pollution.push( key );
 883+ }
 884+ }
 885+}
 886+
 887+function checkPollution( name ) {
 888+ var old = config.pollution;
 889+ saveGlobal();
 890+
 891+ var newGlobals = diff( config.pollution, old );
 892+ if ( newGlobals.length > 0 ) {
 893+ ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
 894+ }
 895+
 896+ var deletedGlobals = diff( old, config.pollution );
 897+ if ( deletedGlobals.length > 0 ) {
 898+ ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
 899+ }
 900+}
 901+
 902+// returns a new Array with the elements that are in a but not in b
 903+function diff( a, b ) {
 904+ var result = a.slice();
 905+ for ( var i = 0; i < result.length; i++ ) {
 906+ for ( var j = 0; j < b.length; j++ ) {
 907+ if ( result[i] === b[j] ) {
 908+ result.splice(i, 1);
 909+ i--;
 910+ break;
 911+ }
 912+ }
 913+ }
 914+ return result;
 915+}
 916+
 917+function fail(message, exception, callback) {
 918+ if ( typeof console !== "undefined" && console.error && console.warn ) {
 919+ console.error(message);
 920+ console.error(exception);
 921+ console.warn(callback.toString());
 922+
 923+ } else if ( window.opera && opera.postError ) {
 924+ opera.postError(message, exception, callback.toString);
 925+ }
 926+}
 927+
 928+function extend(a, b) {
 929+ for ( var prop in b ) {
 930+ if ( b[prop] === undefined ) {
 931+ delete a[prop];
 932+ } else {
 933+ a[prop] = b[prop];
 934+ }
 935+ }
 936+
 937+ return a;
 938+}
 939+
 940+function addEvent(elem, type, fn) {
 941+ if ( elem.addEventListener ) {
 942+ elem.addEventListener( type, fn, false );
 943+ } else if ( elem.attachEvent ) {
 944+ elem.attachEvent( "on" + type, fn );
 945+ } else {
 946+ fn();
 947+ }
 948+}
 949+
 950+function id(name) {
 951+ return !!(typeof document !== "undefined" && document && document.getElementById) &&
 952+ document.getElementById( name );
 953+}
 954+
 955+// Test for equality any JavaScript type.
 956+// Discussions and reference: http://philrathe.com/articles/equiv
 957+// Test suites: http://philrathe.com/tests/equiv
 958+// Author: Philippe Rathé <prathe@gmail.com>
 959+QUnit.equiv = function () {
 960+
 961+ var innerEquiv; // the real equiv function
 962+ var callers = []; // stack to decide between skip/abort functions
 963+ var parents = []; // stack to avoiding loops from circular referencing
 964+
 965+ // Call the o related callback with the given arguments.
 966+ function bindCallbacks(o, callbacks, args) {
 967+ var prop = QUnit.objectType(o);
 968+ if (prop) {
 969+ if (QUnit.objectType(callbacks[prop]) === "function") {
 970+ return callbacks[prop].apply(callbacks, args);
 971+ } else {
 972+ return callbacks[prop]; // or undefined
 973+ }
 974+ }
 975+ }
 976+
 977+ var callbacks = function () {
 978+
 979+ // for string, boolean, number and null
 980+ function useStrictEquality(b, a) {
 981+ if (b instanceof a.constructor || a instanceof b.constructor) {
 982+ // to catch short annotaion VS 'new' annotation of a declaration
 983+ // e.g. var i = 1;
 984+ // var j = new Number(1);
 985+ return a == b;
 986+ } else {
 987+ return a === b;
 988+ }
 989+ }
 990+
 991+ return {
 992+ "string": useStrictEquality,
 993+ "boolean": useStrictEquality,
 994+ "number": useStrictEquality,
 995+ "null": useStrictEquality,
 996+ "undefined": useStrictEquality,
 997+
 998+ "nan": function (b) {
 999+ return isNaN(b);
 1000+ },
 1001+
 1002+ "date": function (b, a) {
 1003+ return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf();
 1004+ },
 1005+
 1006+ "regexp": function (b, a) {
 1007+ return QUnit.objectType(b) === "regexp" &&
 1008+ a.source === b.source && // the regex itself
 1009+ a.global === b.global && // and its modifers (gmi) ...
 1010+ a.ignoreCase === b.ignoreCase &&
 1011+ a.multiline === b.multiline;
 1012+ },
 1013+
 1014+ // - skip when the property is a method of an instance (OOP)
 1015+ // - abort otherwise,
 1016+ // initial === would have catch identical references anyway
 1017+ "function": function () {
 1018+ var caller = callers[callers.length - 1];
 1019+ return caller !== Object &&
 1020+ typeof caller !== "undefined";
 1021+ },
 1022+
 1023+ "array": function (b, a) {
 1024+ var i, j, loop;
 1025+ var len;
 1026+
 1027+ // b could be an object literal here
 1028+ if ( ! (QUnit.objectType(b) === "array")) {
 1029+ return false;
 1030+ }
 1031+
 1032+ len = a.length;
 1033+ if (len !== b.length) { // safe and faster
 1034+ return false;
 1035+ }
 1036+
 1037+ //track reference to avoid circular references
 1038+ parents.push(a);
 1039+ for (i = 0; i < len; i++) {
 1040+ loop = false;
 1041+ for(j=0;j<parents.length;j++){
 1042+ if(parents[j] === a[i]){
 1043+ loop = true;//dont rewalk array
 1044+ }
 1045+ }
 1046+ if (!loop && ! innerEquiv(a[i], b[i])) {
 1047+ parents.pop();
 1048+ return false;
 1049+ }
 1050+ }
 1051+ parents.pop();
 1052+ return true;
 1053+ },
 1054+
 1055+ "object": function (b, a) {
 1056+ var i, j, loop;
 1057+ var eq = true; // unless we can proove it
 1058+ var aProperties = [], bProperties = []; // collection of strings
 1059+
 1060+ // comparing constructors is more strict than using instanceof
 1061+ if ( a.constructor !== b.constructor) {
 1062+ return false;
 1063+ }
 1064+
 1065+ // stack constructor before traversing properties
 1066+ callers.push(a.constructor);
 1067+ //track reference to avoid circular references
 1068+ parents.push(a);
 1069+
 1070+ for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
 1071+ loop = false;
 1072+ for(j=0;j<parents.length;j++){
 1073+ if(parents[j] === a[i])
 1074+ loop = true; //don't go down the same path twice
 1075+ }
 1076+ aProperties.push(i); // collect a's properties
 1077+
 1078+ if (!loop && ! innerEquiv(a[i], b[i])) {
 1079+ eq = false;
 1080+ break;
 1081+ }
 1082+ }
 1083+
 1084+ callers.pop(); // unstack, we are done
 1085+ parents.pop();
 1086+
 1087+ for (i in b) {
 1088+ bProperties.push(i); // collect b's properties
 1089+ }
 1090+
 1091+ // Ensures identical properties name
 1092+ return eq && innerEquiv(aProperties.sort(), bProperties.sort());
 1093+ }
 1094+ };
 1095+ }();
 1096+
 1097+ innerEquiv = function () { // can take multiple arguments
 1098+ var args = Array.prototype.slice.apply(arguments);
 1099+ if (args.length < 2) {
 1100+ return true; // end transition
 1101+ }
 1102+
 1103+ return (function (a, b) {
 1104+ if (a === b) {
 1105+ return true; // catch the most you can
 1106+ } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || QUnit.objectType(a) !== QUnit.objectType(b)) {
 1107+ return false; // don't lose time with error prone cases
 1108+ } else {
 1109+ return bindCallbacks(a, callbacks, [b, a]);
 1110+ }
 1111+
 1112+ // apply transition with (1..n) arguments
 1113+ })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));
 1114+ };
 1115+
 1116+ return innerEquiv;
 1117+
 1118+}();
 1119+
 1120+/**
 1121+ * jsDump
 1122+ * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 1123+ * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
 1124+ * Date: 5/15/2008
 1125+ * @projectDescription Advanced and extensible data dumping for Javascript.
 1126+ * @version 1.0.0
 1127+ * @author Ariel Flesler
 1128+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
 1129+ */
 1130+QUnit.jsDump = (function() {
 1131+ function quote( str ) {
 1132+ return '"' + str.toString().replace(/"/g, '\\"') + '"';
 1133+ };
 1134+ function literal( o ) {
 1135+ return o + '';
 1136+ };
 1137+ function join( pre, arr, post ) {
 1138+ var s = jsDump.separator(),
 1139+ base = jsDump.indent(),
 1140+ inner = jsDump.indent(1);
 1141+ if ( arr.join )
 1142+ arr = arr.join( ',' + s + inner );
 1143+ if ( !arr )
 1144+ return pre + post;
 1145+ return [ pre, inner + arr, base + post ].join(s);
 1146+ };
 1147+ function array( arr ) {
 1148+ var i = arr.length, ret = Array(i);
 1149+ this.up();
 1150+ while ( i-- )
 1151+ ret[i] = this.parse( arr[i] );
 1152+ this.down();
 1153+ return join( '[', ret, ']' );
 1154+ };
 1155+
 1156+ var reName = /^function (\w+)/;
 1157+
 1158+ var jsDump = {
 1159+ parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance
 1160+ var parser = this.parsers[ type || this.typeOf(obj) ];
 1161+ type = typeof parser;
 1162+
 1163+ return type == 'function' ? parser.call( this, obj ) :
 1164+ type == 'string' ? parser :
 1165+ this.parsers.error;
 1166+ },
 1167+ typeOf:function( obj ) {
 1168+ var type;
 1169+ if ( obj === null ) {
 1170+ type = "null";
 1171+ } else if (typeof obj === "undefined") {
 1172+ type = "undefined";
 1173+ } else if (QUnit.is("RegExp", obj)) {
 1174+ type = "regexp";
 1175+ } else if (QUnit.is("Date", obj)) {
 1176+ type = "date";
 1177+ } else if (QUnit.is("Function", obj)) {
 1178+ type = "function";
 1179+ } else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") {
 1180+ type = "window";
 1181+ } else if (obj.nodeType === 9) {
 1182+ type = "document";
 1183+ } else if (obj.nodeType) {
 1184+ type = "node";
 1185+ } else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) {
 1186+ type = "array";
 1187+ } else {
 1188+ type = typeof obj;
 1189+ }
 1190+ return type;
 1191+ },
 1192+ separator:function() {
 1193+ return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? '&nbsp;' : ' ';
 1194+ },
 1195+ indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
 1196+ if ( !this.multiline )
 1197+ return '';
 1198+ var chr = this.indentChar;
 1199+ if ( this.HTML )
 1200+ chr = chr.replace(/\t/g,' ').replace(/ /g,'&nbsp;');
 1201+ return Array( this._depth_ + (extra||0) ).join(chr);
 1202+ },
 1203+ up:function( a ) {
 1204+ this._depth_ += a || 1;
 1205+ },
 1206+ down:function( a ) {
 1207+ this._depth_ -= a || 1;
 1208+ },
 1209+ setParser:function( name, parser ) {
 1210+ this.parsers[name] = parser;
 1211+ },
 1212+ // The next 3 are exposed so you can use them
 1213+ quote:quote,
 1214+ literal:literal,
 1215+ join:join,
 1216+ //
 1217+ _depth_: 1,
 1218+ // This is the list of parsers, to modify them, use jsDump.setParser
 1219+ parsers:{
 1220+ window: '[Window]',
 1221+ document: '[Document]',
 1222+ error:'[ERROR]', //when no parser is found, shouldn't happen
 1223+ unknown: '[Unknown]',
 1224+ 'null':'null',
 1225+ 'undefined':'undefined',
 1226+ 'function':function( fn ) {
 1227+ var ret = 'function',
 1228+ name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
 1229+ if ( name )
 1230+ ret += ' ' + name;
 1231+ ret += '(';
 1232+
 1233+ ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join('');
 1234+ return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' );
 1235+ },
 1236+ array: array,
 1237+ nodelist: array,
 1238+ arguments: array,
 1239+ object:function( map ) {
 1240+ var ret = [ ];
 1241+ QUnit.jsDump.up();
 1242+ for ( var key in map )
 1243+ ret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(map[key]) );
 1244+ QUnit.jsDump.down();
 1245+ return join( '{', ret, '}' );
 1246+ },
 1247+ node:function( node ) {
 1248+ var open = QUnit.jsDump.HTML ? '&lt;' : '<',
 1249+ close = QUnit.jsDump.HTML ? '&gt;' : '>';
 1250+
 1251+ var tag = node.nodeName.toLowerCase(),
 1252+ ret = open + tag;
 1253+
 1254+ for ( var a in QUnit.jsDump.DOMAttrs ) {
 1255+ var val = node[QUnit.jsDump.DOMAttrs[a]];
 1256+ if ( val )
 1257+ ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' );
 1258+ }
 1259+ return ret + close + open + '/' + tag + close;
 1260+ },
 1261+ functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function
 1262+ var l = fn.length;
 1263+ if ( !l ) return '';
 1264+
 1265+ var args = Array(l);
 1266+ while ( l-- )
 1267+ args[l] = String.fromCharCode(97+l);//97 is 'a'
 1268+ return ' ' + args.join(', ') + ' ';
 1269+ },
 1270+ key:quote, //object calls it internally, the key part of an item in a map
 1271+ functionCode:'[code]', //function calls it internally, it's the content of the function
 1272+ attribute:quote, //node calls it internally, it's an html attribute value
 1273+ string:quote,
 1274+ date:quote,
 1275+ regexp:literal, //regex
 1276+ number:literal,
 1277+ 'boolean':literal
 1278+ },
 1279+ DOMAttrs:{//attributes to dump from nodes, name=>realName
 1280+ id:'id',
 1281+ name:'name',
 1282+ 'class':'className'
 1283+ },
 1284+ HTML:false,//if true, entities are escaped ( <, >, \t, space and \n )
 1285+ indentChar:' ',//indentation unit
 1286+ multiline:true //if true, items in a collection, are separated by a \n, else just a space.
 1287+ };
 1288+
 1289+ return jsDump;
 1290+})();
 1291+
 1292+// from Sizzle.js
 1293+function getText( elems ) {
 1294+ var ret = "", elem;
 1295+
 1296+ for ( var i = 0; elems[i]; i++ ) {
 1297+ elem = elems[i];
 1298+
 1299+ // Get the text from text nodes and CDATA nodes
 1300+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
 1301+ ret += elem.nodeValue;
 1302+
 1303+ // Traverse everything else, except comment nodes
 1304+ } else if ( elem.nodeType !== 8 ) {
 1305+ ret += getText( elem.childNodes );
 1306+ }
 1307+ }
 1308+
 1309+ return ret;
 1310+};
 1311+
 1312+/*
 1313+ * Javascript Diff Algorithm
 1314+ * By John Resig (http://ejohn.org/)
 1315+ * Modified by Chu Alan "sprite"
 1316+ *
 1317+ * Released under the MIT license.
 1318+ *
 1319+ * More Info:
 1320+ * http://ejohn.org/projects/javascript-diff-algorithm/
 1321+ *
 1322+ * Usage: QUnit.diff(expected, actual)
 1323+ *
 1324+ * 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"
 1325+ */
 1326+QUnit.diff = (function() {
 1327+ function diff(o, n){
 1328+ var ns = new Object();
 1329+ var os = new Object();
 1330+
 1331+ for (var i = 0; i < n.length; i++) {
 1332+ if (ns[n[i]] == null)
 1333+ ns[n[i]] = {
 1334+ rows: new Array(),
 1335+ o: null
 1336+ };
 1337+ ns[n[i]].rows.push(i);
 1338+ }
 1339+
 1340+ for (var i = 0; i < o.length; i++) {
 1341+ if (os[o[i]] == null)
 1342+ os[o[i]] = {
 1343+ rows: new Array(),
 1344+ n: null
 1345+ };
 1346+ os[o[i]].rows.push(i);
 1347+ }
 1348+
 1349+ for (var i in ns) {
 1350+ if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) {
 1351+ n[ns[i].rows[0]] = {
 1352+ text: n[ns[i].rows[0]],
 1353+ row: os[i].rows[0]
 1354+ };
 1355+ o[os[i].rows[0]] = {
 1356+ text: o[os[i].rows[0]],
 1357+ row: ns[i].rows[0]
 1358+ };
 1359+ }
 1360+ }
 1361+
 1362+ for (var i = 0; i < n.length - 1; i++) {
 1363+ if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null &&
 1364+ n[i + 1] == o[n[i].row + 1]) {
 1365+ n[i + 1] = {
 1366+ text: n[i + 1],
 1367+ row: n[i].row + 1
 1368+ };
 1369+ o[n[i].row + 1] = {
 1370+ text: o[n[i].row + 1],
 1371+ row: i + 1
 1372+ };
 1373+ }
 1374+ }
 1375+
 1376+ for (var i = n.length - 1; i > 0; i--) {
 1377+ if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&
 1378+ n[i - 1] == o[n[i].row - 1]) {
 1379+ n[i - 1] = {
 1380+ text: n[i - 1],
 1381+ row: n[i].row - 1
 1382+ };
 1383+ o[n[i].row - 1] = {
 1384+ text: o[n[i].row - 1],
 1385+ row: i - 1
 1386+ };
 1387+ }
 1388+ }
 1389+
 1390+ return {
 1391+ o: o,
 1392+ n: n
 1393+ };
 1394+ }
 1395+
 1396+ return function(o, n){
 1397+ o = o.replace(/\s+$/, '');
 1398+ n = n.replace(/\s+$/, '');
 1399+ var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/));
 1400+
 1401+ var str = "";
 1402+
 1403+ var oSpace = o.match(/\s+/g);
 1404+ if (oSpace == null) {
 1405+ oSpace = [" "];
 1406+ }
 1407+ else {
 1408+ oSpace.push(" ");
 1409+ }
 1410+ var nSpace = n.match(/\s+/g);
 1411+ if (nSpace == null) {
 1412+ nSpace = [" "];
 1413+ }
 1414+ else {
 1415+ nSpace.push(" ");
 1416+ }
 1417+
 1418+ if (out.n.length == 0) {
 1419+ for (var i = 0; i < out.o.length; i++) {
 1420+ str += '<del>' + out.o[i] + oSpace[i] + "</del>";
 1421+ }
 1422+ }
 1423+ else {
 1424+ if (out.n[0].text == null) {
 1425+ for (n = 0; n < out.o.length && out.o[n].text == null; n++) {
 1426+ str += '<del>' + out.o[n] + oSpace[n] + "</del>";
 1427+ }
 1428+ }
 1429+
 1430+ for (var i = 0; i < out.n.length; i++) {
 1431+ if (out.n[i].text == null) {
 1432+ str += '<ins>' + out.n[i] + nSpace[i] + "</ins>";
 1433+ }
 1434+ else {
 1435+ var pre = "";
 1436+
 1437+ for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) {
 1438+ pre += '<del>' + out.o[n] + oSpace[n] + "</del>";
 1439+ }
 1440+ str += " " + out.n[i].text + nSpace[i] + pre;
 1441+ }
 1442+ }
 1443+ }
 1444+
 1445+ return str;
 1446+ };
 1447+})();
 1448+
 1449+})(this);
Property changes on: trunk/parsers/wikidom/lib/qunit.js
___________________________________________________________________
Added: svn:mime-type
11450 + text/plain
Added: svn:eol-style
21451 + native
Added: svn:executable
31452 + *
Index: trunk/parsers/wikidom/demos/renderers/document.js
@@ -0,0 +1,227 @@
 2+{
 3+ "blocks": [
 4+ {
 5+ "type": "heading",
 6+ "level": 2,
 7+ "line": {
 8+ "text": "This is a heading",
 9+ "annotations": [
 10+ {
 11+ "type": "italic",
 12+ "range": {
 13+ "offset": 10,
 14+ "length": 7
 15+ }
 16+ }
 17+ ]
 18+ }
 19+ },
 20+ {
 21+ "type": "rule"
 22+ },
 23+ {
 24+ "type": "comment",
 25+ "text": "Hello wild world of wikitext!"
 26+ },
 27+ {
 28+ "type": "table",
 29+ "attributes": {
 30+ "class": "wikitable",
 31+ "width": "50%"
 32+ },
 33+ "rows": [
 34+ [
 35+ {
 36+ "type": "heading",
 37+ "document": {
 38+ "blocks": [
 39+ {
 40+ "type": "paragraph",
 41+ "lines": [
 42+ {
 43+ "text": "This is a table heading"
 44+ }
 45+ ]
 46+ }
 47+ ]
 48+ }
 49+ }
 50+ ],
 51+ [
 52+ {
 53+ "type": "data",
 54+ "document": {
 55+ "blocks": [
 56+ {
 57+ "type": "paragraph",
 58+ "lines": [
 59+ {
 60+ "text": "This is a table cell"
 61+ }
 62+ ]
 63+ },
 64+ {
 65+ "type": "paragraph",
 66+ "lines": [
 67+ {
 68+ "text": "This is another paragraph in a table cell"
 69+ }
 70+ ]
 71+ }
 72+ ]
 73+ }
 74+ }
 75+ ]
 76+ ]
 77+ },
 78+ {
 79+ "type": "paragraph",
 80+ "lines": [
 81+ {
 82+ "text": "This is a test paragraph!",
 83+ "annotations": [
 84+ {
 85+ "type": "italic",
 86+ "range": {
 87+ "offset": 0,
 88+ "length": 4
 89+ }
 90+ },
 91+ {
 92+ "type": "xlink",
 93+ "range": {
 94+ "offset": 8,
 95+ "length": 6
 96+ },
 97+ "data": {
 98+ "url": "http://www.a.com"
 99+ }
 100+ },
 101+ {
 102+ "type": "bold",
 103+ "range": {
 104+ "offset": 10,
 105+ "length": 4
 106+ }
 107+ }
 108+ ]
 109+ },
 110+ {
 111+ "text": "Paragraphs can have more than one line.",
 112+ "annotations": [
 113+ {
 114+ "type": "italic",
 115+ "range": {
 116+ "offset": 11,
 117+ "length": 3
 118+ }
 119+ },
 120+ {
 121+ "type": "bold",
 122+ "range": {
 123+ "offset": 20,
 124+ "length": 4
 125+ }
 126+ }
 127+ ]
 128+ }
 129+ ]
 130+ },
 131+ {
 132+ "type": "paragraph",
 133+ "lines": [
 134+ {
 135+ "text": "Documents can have one or more blocks.",
 136+ "annotations": [
 137+ {
 138+ "type": "bold",
 139+ "range": {
 140+ "offset": 0,
 141+ "length": 9
 142+ }
 143+ }
 144+ ]
 145+ }
 146+ ]
 147+ },
 148+ {
 149+ "type": "list",
 150+ "style": "number",
 151+ "items": [
 152+ {
 153+ "line": {
 154+ "text": "First item"
 155+ },
 156+ "lists": [
 157+ {
 158+ "type": "list",
 159+ "style": "bullet",
 160+ "items": [
 161+ {
 162+ "line": {
 163+ "text": "First sub-item"
 164+ }
 165+ },
 166+ {
 167+ "line": {
 168+ "text": "Second sub-item"
 169+ }
 170+ },
 171+ {
 172+ "line": {
 173+ "text": "Third sub-item"
 174+ }
 175+ }
 176+ ]
 177+ }
 178+ ]
 179+ },
 180+ {
 181+ "line": {
 182+ "text": "Second item",
 183+ "annotations": [
 184+ {
 185+ "type": "italic",
 186+ "range": {
 187+ "offset": 0,
 188+ "length": 6
 189+ }
 190+ }
 191+ ]
 192+ }
 193+ },
 194+ {
 195+ "line": {
 196+ "text": "Third item",
 197+ "annotations": [
 198+ {
 199+ "type": "bold",
 200+ "range": {
 201+ "offset": 0,
 202+ "length": 5
 203+ }
 204+ }
 205+ ]
 206+ }
 207+ },
 208+ {
 209+ "line": {
 210+ "text": "Fourth item",
 211+ "annotations": [
 212+ {
 213+ "type": "ilink",
 214+ "range": {
 215+ "offset": 7,
 216+ "length": 4
 217+ },
 218+ "data": {
 219+ "title": "User:JohnDoe"
 220+ }
 221+ }
 222+ ]
 223+ }
 224+ }
 225+ ]
 226+ }
 227+ ]
 228+}
\ No newline at end of file
Property changes on: trunk/parsers/wikidom/demos/renderers/document.js
___________________________________________________________________
Added: svn:mime-type
1229 + text/plain
Added: svn:eol-style
2230 + native
Index: trunk/parsers/wikidom/demos/renderers/index.html
@@ -0,0 +1,78 @@
 2+<!doctype html>
 3+
 4+<html>
 5+ <head>
 6+ <title>WikiDom Renderer Demo</title>
 7+ <style>
 8+ body {
 9+ font-family: "Arial", sans-serif;
 10+ font-size: 0.8em;
 11+ line-height: 1.5em;
 12+ }
 13+ p {
 14+ margin: 0.4em 0 .5em 0;
 15+ }
 16+ div.render,
 17+ div.source {
 18+ margin: 0;
 19+ padding: 1em;
 20+ border: solid 1px silver;
 21+ }
 22+ div.source {
 23+ white-space: pre-wrap;
 24+ font-family: "Droid Sans Mono", monospace;
 25+ }
 26+ /* wikitable class for skinning normal tables
 27+ * keep on sync with commonPrint.css
 28+ */
 29+ table.wikitable {
 30+ margin: 1em 1em 1em 0;
 31+ background: #f9f9f9;
 32+ border: 1px #aaa solid;
 33+ border-collapse: collapse;
 34+ color: black;
 35+ }
 36+ .wikitable th, .wikitable td {
 37+ border: 1px #aaa solid;
 38+ padding: 0.2em;
 39+ }
 40+ .wikitable th {
 41+ background: #f2f2f2;
 42+ text-align: center;
 43+ }
 44+ .wikitable caption {
 45+ font-weight: bold;
 46+ }
 47+ </style>
 48+ </head>
 49+ <body>
 50+ <h2>HTML Rendering</h2>
 51+ <div id="html-rendering" class="render"></div>
 52+ <h2>HTML Source</h2>
 53+ <div id="html-source" class="source"></div>
 54+ <h2>Wikitext Source</h2>
 55+ <div id="wikitext-source" class="source"></div>
 56+ <h2>JSON Source</h2>
 57+ <div id="json-source" class="source"></div>
 58+ <script src="../../lib/jquery.js"></script>
 59+ <script src="../../lib/jquery.json.js"></script>
 60+ <script src="../../wikidom.js"></script>
 61+ <script>
 62+ $( document ).ready( function() {
 63+ $.getJSON( 'document.js', function( data ) {
 64+ var htmlRenderer = new HtmlRenderer();
 65+ var html = htmlRenderer.render( data );
 66+ $( '#html-rendering' ).append( html );
 67+ $( '#html-source' ).text( html );
 68+
 69+ var wikitextRenderer = new WikitextRenderer();
 70+ var wikitext = wikitextRenderer.render( data );
 71+ $( '#wikitext-source' ).text( wikitext );
 72+
 73+ var json = $.toJSON( data );
 74+ $( '#json-source' ).text( json );
 75+ } );
 76+ } );
 77+ </script>
 78+ </body>
 79+</html>
Property changes on: trunk/parsers/wikidom/demos/renderers/index.html
___________________________________________________________________
Added: svn:mime-type
180 + text/plain
Index: trunk/parsers/wikidom/README
@@ -0,0 +1,44 @@
 2+= WikiDom =
 3+
 4+WikiDom is a document object model for Wikitext.
 5+
 6+== Contents of this directory ==
 7+
 8+* demos - A variety of demonstrative web pages
 9+* lib - Common dependencies
 10+* tests - QUnit tests
 11+* wikidom.js - WikiDom library
 12+
 13+== Status of components ==
 14+
 15+* Parsers
 16+** Wikitext: not yet started
 17+* Processors
 18+** Templates: not yet started
 19+** Hooks: not yet started
 20+* Renderers
 21+** HTML: basic functionaltiy
 22+** Wikitext: basic functionaltiy
 23+
 24+== DOM Specification ==
 25+
 26+Once parsed, Wikitext is stored in a syntax-agnostic structured form. This structure is built from
 27+a variety of objects.
 28+
 29+; Document
 30+: A series of one or more blocks.
 31+; Block
 32+: A discreet portion of a document, such as a paragraph, list or table.
 33+; Line
 34+: A single line of text with annotation information to describe formatting, rendering and meaning.
 35+; Item
 36+: A line of text and optionally a series of nested lists.
 37+
 38+=== Blocks ===
 39+
 40+; Paragraph
 41+: A series of line objects.
 42+; List
 43+: A series of item objects.
 44+; Table
 45+: A series of rows, each a series of document objects.
\ No newline at end of file
Index: trunk/parsers/wikidom/wikidom.js
@@ -0,0 +1,331 @@
 2+/* Utilities */
 3+
 4+var Xml = {
 5+ 'esc': function( text ) {
 6+ return text
 7+ .replace( /&/g, '&amp;' )
 8+ .replace( /</g, '&lt;' )
 9+ .replace( />/g, '&gt;' )
 10+ .replace( /"/g, '&quot;' )
 11+ .replace( /'/g, '&#039;' );
 12+ },
 13+ 'attr': function( attributes ) {
 14+ var attr = '';
 15+ if ( attributes ) {
 16+ for ( var name in attributes ) {
 17+ attr += ' ' + name + '="' + attributes[name] + '"';
 18+ }
 19+ }
 20+ return attr;
 21+ },
 22+ 'open': function( tag, attributes ) {
 23+ return '<' + tag + Xml.attr( attributes ) + '>';
 24+ },
 25+ 'close': function( tag ) {
 26+ return '</' + tag + '>';
 27+ },
 28+ 'tag': function( tag, attributes, value, escape ) {
 29+ if ( value === false ) {
 30+ return '<' + tag + Xml.attr( attributes ) + ' />';
 31+ } else {
 32+ if ( escape ) {
 33+ value = Xml.esc( value );
 34+ }
 35+ return '<' + tag + Xml.attr( attributes ) + '>' + value + '</' + tag + '>';
 36+ }
 37+ }
 38+};
 39+
 40+function repeat( pattern, count ) {
 41+ if ( count < 1 ) return '';
 42+ var result = '';
 43+ while ( count > 0 ) {
 44+ if ( count & 1 ) result += pattern;
 45+ count >>= 1, pattern += pattern;
 46+ };
 47+ return result;
 48+};
 49+
 50+function AnnotationSerialization() {
 51+ this.insertions = {};
 52+}
 53+
 54+AnnotationSerialization.prototype.wrapWithText = function( range, pre, post ) {
 55+ var start = range.offset;
 56+ if ( !( start in this.insertions ) ) {
 57+ this.insertions[start] = [pre];
 58+ } else {
 59+ this.insertions[start].push( pre );
 60+ }
 61+ var end = range.offset + range.length;
 62+ if ( !( end in this.insertions ) ) {
 63+ this.insertions[end] = [post];
 64+ } else {
 65+ this.insertions[end].unshift( post );
 66+ }
 67+};
 68+
 69+AnnotationSerialization.prototype.wrapWithXml = function( range, tag, attributes ) {
 70+ this.wrapWithText( range, Xml.open( tag, attributes ), Xml.close( tag ) );
 71+};
 72+
 73+AnnotationSerialization.prototype.apply = function( text ) {
 74+ var out = '';
 75+ for ( var i = 0, iMax = text.length; i <= iMax; i++ ) {
 76+ if ( i in this.insertions ) {
 77+ out += this.insertions[i].join( '' );
 78+ }
 79+ if ( i < iMax ) {
 80+ out += text[i];
 81+ }
 82+ }
 83+ return out;
 84+};
 85+
 86+/* Renderers */
 87+
 88+function HtmlRenderer() { }
 89+
 90+HtmlRenderer.prototype.render = function( doc ) {
 91+ return HtmlRenderer.renderers.document( doc );
 92+};
 93+
 94+HtmlRenderer.renderers = {
 95+ 'document': function( doc, rawFirstParagraph ) {
 96+ var out = [];
 97+ for ( var b = 0, bMax = doc.blocks.length; b < bMax; b++ ) {
 98+ var block = doc.blocks[b];
 99+ if ( block.type in HtmlRenderer.renderers ) {
 100+ if ( block.type === 'paragraph' ) {
 101+ out.push(
 102+ HtmlRenderer.renderers.paragraph( block, rawFirstParagraph && b === 0 )
 103+ );
 104+ } else {
 105+ out.push( HtmlRenderer.renderers[block.type]( block ) );
 106+ }
 107+ }
 108+ }
 109+ return out.join( '\n' );
 110+ },
 111+ 'comment': function( comment ) {
 112+ return '<!--' + comment.text + '-->';
 113+ },
 114+ 'rule': function( rule ) {
 115+ return Xml.tag( 'hr', {}, false );
 116+ },
 117+ 'heading': function( heading ) {
 118+ return Xml.tag( 'h' + heading.level, {}, HtmlRenderer.renderers.line( heading.line ) );
 119+ },
 120+ 'paragraph': function( paragraph, raw ) {
 121+ var out = [];
 122+ for ( var l = 0, lMax = paragraph.lines.length; l < lMax; l++ ) {
 123+ out.push( HtmlRenderer.renderers.line( paragraph.lines[l] ) );
 124+ }
 125+ if ( raw ) {
 126+ return out.join( '\n' );
 127+ } else {
 128+ return Xml.tag( 'p', {}, out.join( '\n' ) );
 129+ }
 130+ },
 131+ 'list': function( list ) {
 132+ var tags = {
 133+ 'bullet': 'ul',
 134+ 'number': 'ol'
 135+ };
 136+ var out = [];
 137+ out.push( Xml.open( tags[list.style] ) );
 138+ for ( var i = 0, iMax = list.items.length; i < iMax; i++ ) {
 139+ out.push( HtmlRenderer.renderers.item( list.items[i] ) );
 140+ }
 141+ out.push( Xml.close( tags[list.style] ) );
 142+ return out.join( '\n' );
 143+ },
 144+ 'table': function( table ) {
 145+ var out = [];
 146+ var types = {
 147+ 'heading': 'th',
 148+ 'data': 'td'
 149+ };
 150+ out.push( Xml.open( 'table', table.attributes ) );
 151+ for ( var r = 0, rMax = table.rows.length; r < rMax; r++ ) {
 152+ out.push( Xml.open( 'tr' ) );
 153+ var row = table.rows[r];
 154+ for ( var c = 0, cMax = row.length; c < cMax; c++ ) {
 155+ var type = types[row[c].type || 'data'];
 156+ out.push( Xml.tag(
 157+ type,
 158+ row[c].attributes,
 159+ HtmlRenderer.renderers.document( row[c].document, true )
 160+ ) );
 161+ }
 162+ out.push( Xml.close( 'tr' ) );
 163+ }
 164+ out.push( Xml.close( 'table' ) );
 165+ return out.join( '\n' );
 166+ },
 167+ 'item': function( item ) {
 168+ if ( 'lists' in item && item.lists.length ) {
 169+ var out = [];
 170+ out.push( Xml.open( 'li' ) + HtmlRenderer.renderers.line( item.line ) );
 171+ for ( var l = 0, lMax = item.lists.length; l < lMax; l++ ) {
 172+ out.push( HtmlRenderer.renderers.list( item.lists[l] ) );
 173+ }
 174+ out.push( Xml.close( 'li' ) )
 175+ return out.join( '\n' );
 176+ } else {
 177+ return Xml.tag( 'li', {}, HtmlRenderer.renderers.line( item.line ) );
 178+ }
 179+ },
 180+ 'line': function( line ) {
 181+ if ( 'annotations' in line && line.annotations.length ) {
 182+ var as = new AnnotationSerialization();
 183+ for ( var a = 0, aMax = line.annotations.length; a < aMax; a++ ) {
 184+ var an = line.annotations[a];
 185+ switch ( an.type ) {
 186+ case 'bold':
 187+ as.wrapWithXml( an.range, 'strong' );
 188+ break;
 189+ case 'italic':
 190+ as.wrapWithXml( an.range, 'em' );
 191+ break;
 192+ case 'xlink':
 193+ as.wrapWithXml( an.range, 'a', { 'href': an.data.url } );
 194+ break;
 195+ case 'ilink':
 196+ as.wrapWithXml( an.range, 'a', { 'href': '/wiki/' + an.data.title } );
 197+ break;
 198+ }
 199+ }
 200+ return as.apply( line.text );
 201+ } else {
 202+ return line.text;
 203+ }
 204+ }
 205+};
 206+
 207+function WikitextRenderer() { }
 208+
 209+WikitextRenderer.prototype.render = function( doc ) {
 210+ return WikitextRenderer.renderers.document( doc );
 211+};
 212+
 213+WikitextRenderer.renderers = {
 214+ 'document': function( doc, rawFirstParagraph ) {
 215+ var out = [];
 216+ for ( var b = 0, bMax = doc.blocks.length; b < bMax; b++ ) {
 217+ var block = doc.blocks[b];
 218+ if ( block.type in WikitextRenderer.renderers ) {
 219+ if ( block.type === 'paragraph' ) {
 220+ out.push(
 221+ WikitextRenderer.renderers.paragraph( block, rawFirstParagraph && b === 0 )
 222+ );
 223+ if ( b + 1 < bMax /* && doc.blocks[b + 1].type === 'paragraph' */ ) {
 224+ out.push( '' );
 225+ }
 226+ } else {
 227+ out.push( WikitextRenderer.renderers[block.type]( block ) );
 228+ }
 229+ }
 230+ }
 231+ return out.join( '\n' );
 232+ },
 233+ 'comment': HtmlRenderer.renderers.comment,
 234+ 'rule': function( rule ) {
 235+ return '----';
 236+ },
 237+ 'heading': function( heading ) {
 238+ var symbols = repeat( '=', heading.level );
 239+ return symbols + WikitextRenderer.renderers.line( heading.line ) + symbols;
 240+ },
 241+ 'paragraph': function( paragraph ) {
 242+ var out = [];
 243+ for ( var l = 0, lMax = paragraph.lines.length; l < lMax; l++ ) {
 244+ out.push( WikitextRenderer.renderers.line( paragraph.lines[l] ) );
 245+ }
 246+ return out.join( '\n' );
 247+ },
 248+ 'list': function( list, path ) {
 249+ if ( typeof path === 'undefined' ) {
 250+ path = '';
 251+ }
 252+ var symbols = {
 253+ 'bullet': '*',
 254+ 'number': '#'
 255+ };
 256+ path += symbols[list.style];
 257+ var out = [];
 258+ for ( var i = 0, iMax = list.items.length; i < iMax; i++ ) {
 259+ out.push( WikitextRenderer.renderers.item( list.items[i], path ) );
 260+ }
 261+ return out.join( '\n' );
 262+ },
 263+ 'table': function( table ) {
 264+ var out = [];
 265+ var types = {
 266+ 'heading': '!',
 267+ 'data': '|'
 268+ };
 269+ out.push( '{|' + Xml.attr( table.attributes ) );
 270+ for ( var r = 0, rMax = table.rows.length; r < rMax; r++ ) {
 271+ var row = table.rows[r];
 272+ if ( r ) {
 273+ out.push( '|-' );
 274+ }
 275+ for ( var c = 0, cMax = row.length; c < cMax; c++ ) {
 276+ var type = types[row[c].type || 'data'];
 277+ out.push(
 278+ type
 279+ + ( row[c].attributes ? Xml.attr( row[c].attributes ) + '|' : '' )
 280+ + WikitextRenderer.renderers.document( row[c].document, true )
 281+ );
 282+ }
 283+ }
 284+ out.push( '|}' );
 285+ return out.join( '\n' );
 286+ },
 287+ 'item': function( item, path ) {
 288+ if ( 'lists' in item && item.lists.length ) {
 289+ var out = [];
 290+ out.push( path + ' ' + WikitextRenderer.renderers.line( item.line ) );
 291+ for ( var l = 0, lMax = item.lists.length; l < lMax; l++ ) {
 292+ out.push( WikitextRenderer.renderers.list( item.lists[l], path ) );
 293+ }
 294+ return out.join( '\n' );
 295+ } else {
 296+ return path + ' ' + WikitextRenderer.renderers.line( item.line );
 297+ }
 298+ },
 299+ 'line': function( line ) {
 300+ if ( 'annotations' in line && line.annotations.length ) {
 301+ var as = new AnnotationSerialization();
 302+ for ( var a = 0, aMax = line.annotations.length; a < aMax; a++ ) {
 303+ var an = line.annotations[a];
 304+ switch ( an.type ) {
 305+ case 'bold':
 306+ as.wrapWithText( an.range, '\'\'\'', '\'\'\'' );
 307+ break;
 308+ case 'italic':
 309+ as.wrapWithText( an.range, '\'\'', '\'\'' );
 310+ break;
 311+ case 'xlink':
 312+ as.wrapWithText( an.range, '[' + an.data.url + ' ', ']' );
 313+ break;
 314+ case 'ilink':
 315+ as.wrapWithText( an.range, '[[' + an.data.title + '|', ']]' );
 316+ break;
 317+ }
 318+ }
 319+ return as.apply( line.text );
 320+ } else {
 321+ return line.text;
 322+ }
 323+ }
 324+};
 325+
 326+/* Parsers */
 327+
 328+function WikitextParser() { }
 329+
 330+WikitextParser.prototype.parse = function( text ) {
 331+ //
 332+};
Property changes on: trunk/parsers/wikidom/wikidom.js
___________________________________________________________________
Added: svn:mime-type
1333 + text/plain
Added: svn:eol-style
2334 + native

Status & tagging log